diff --git a/README.md b/README.md
new file mode 100644
index 0000000..1e7f434
--- /dev/null
+++ b/README.md
@@ -0,0 +1,7 @@
+build
+----------
+
+```
+mvn initialize -P -built
+mvn clean package
+```
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..b01cd4c
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,21 @@
+
+ 4.0.0
+
+ net.md-5
+ ForgeMod
+ 1.5.1-7.7.2-SNAPSHOT
+
+ net.aetherteam
+ Aether2
+ 1.0.2-SNAPSHOT
+ Aether2
+
+ ${project.name}
+
+
+
+ sonatype-oss-public
+ https://oss.sonatype.org/content/groups/public
+
+
+
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/Aether.java b/src/main/java/net/aetherteam/aether/Aether.java
new file mode 100644
index 0000000..c88807d
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/Aether.java
@@ -0,0 +1,508 @@
+package net.aetherteam.aether;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.Mod;
+import cpw.mods.fml.common.Mod.Init;
+import cpw.mods.fml.common.Mod.Instance;
+import cpw.mods.fml.common.Mod.PostInit;
+import cpw.mods.fml.common.Mod.PreInit;
+import cpw.mods.fml.common.Mod.ServerStarted;
+import cpw.mods.fml.common.Mod.ServerStarting;
+import cpw.mods.fml.common.Mod.ServerStopping;
+import cpw.mods.fml.common.SidedProxy;
+import cpw.mods.fml.common.event.FMLInitializationEvent;
+import cpw.mods.fml.common.event.FMLPostInitializationEvent;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.event.FMLServerStartedEvent;
+import cpw.mods.fml.common.event.FMLServerStartingEvent;
+import cpw.mods.fml.common.event.FMLServerStoppingEvent;
+import cpw.mods.fml.common.network.NetworkMod;
+import cpw.mods.fml.common.network.NetworkRegistry;
+import cpw.mods.fml.common.registry.GameRegistry;
+import cpw.mods.fml.common.registry.TickRegistry;
+import cpw.mods.fml.relauncher.Side;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.PrintStream;
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.security.InvalidKeyException;
+import java.security.KeyFactory;
+import java.security.NoSuchAlgorithmException;
+import java.security.PublicKey;
+import java.security.Signature;
+import java.security.SignatureException;
+import java.security.spec.InvalidKeySpecException;
+import java.security.spec.X509EncodedKeySpec;
+import java.util.ArrayList;
+import java.util.List;
+
+import net.aetherteam.aether.achievements.AetherAchievements;
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.client.PlayerBaseAetherClient;
+import net.aetherteam.aether.client.renders.RenderAetherTallGrass;
+import net.aetherteam.aether.client.renders.RenderBerryBush;
+import net.aetherteam.aether.commands.CommandClearInventoryAether;
+import net.aetherteam.aether.commands.CommandTeleport;
+import net.aetherteam.aether.creative_tabs.AetherAccessoryTab;
+import net.aetherteam.aether.creative_tabs.AetherArmourTab;
+import net.aetherteam.aether.creative_tabs.AetherBlockTab;
+import net.aetherteam.aether.creative_tabs.AetherCapeTab;
+import net.aetherteam.aether.creative_tabs.AetherFoodTab;
+import net.aetherteam.aether.creative_tabs.AetherMaterialsTab;
+import net.aetherteam.aether.creative_tabs.AetherMiscTab;
+import net.aetherteam.aether.creative_tabs.AetherToolsTab;
+import net.aetherteam.aether.creative_tabs.AetherWeaponsTab;
+import net.aetherteam.aether.data.SerialDataHandler;
+import net.aetherteam.aether.donator.Base58;
+import net.aetherteam.aether.donator.DonatorChoices;
+import net.aetherteam.aether.donator.SyncDonatorList;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.entities.AetherEntities;
+import net.aetherteam.aether.items.AetherItems;
+import net.aetherteam.aether.packets.AetherPacketHandler;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.recipes.AetherEnchantments;
+import net.aetherteam.aether.recipes.AetherFreezables;
+import net.aetherteam.aether.recipes.AetherRecipes;
+import net.aetherteam.aether.tile_entities.AetherTileEntities;
+import net.aetherteam.aether.worldgen.BiomeGenAether;
+import net.aetherteam.aether.worldgen.TeleporterAether;
+import net.aetherteam.aether.worldgen.WorldProviderAether;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.entity.EntityPlayerSP;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityList;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.profiler.Profiler;
+import net.minecraft.server.MinecraftServer;
+import net.minecraft.server.management.ServerConfigurationManager;
+import net.minecraft.stats.Achievement;
+import net.minecraft.stats.StatFileWriter;
+import net.minecraft.world.World;
+import net.minecraft.world.WorldServer;
+import net.minecraft.world.biome.BiomeGenBase;
+import net.minecraftforge.common.AchievementPage;
+import net.minecraftforge.common.Configuration;
+import net.minecraftforge.common.DimensionManager;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.event.EventBus;
+
+@Mod(modid = "Aether II", name = "Aether II", version = "Alpha v1.0.1")
+@NetworkMod(clientSideRequired = true, serverSideRequired = true, channels = {"Aether"}, packetHandler = AetherPacketHandler.class, connectionHandler = AetherConnectionHandler.class)
+public class Aether
+{
+
+ @Mod.Instance("Aether II")
+ public static Aether instance;
+ private static String version = "Alpha v1.0.1";
+ public static Configuration config;
+ public static BiomeGenBase biome = new BiomeGenAether();
+ public static final int DIMENSION_ID = 3;
+ public static AetherAchievements achievements = new AetherAchievements();
+ public static AchievementPage page;
+ public static AetherGuiHandler aetherGuiHandler = new AetherGuiHandler();
+ public static AetherCraftingHandler aetherCraftingHandler = new AetherCraftingHandler();
+
+ public static DonatorChoices donatorChoices = new DonatorChoices();
+
+ public static CreativeTabs blocks = new AetherBlockTab();
+ public static CreativeTabs tools = new AetherToolsTab();
+ public static CreativeTabs weapons = new AetherWeaponsTab();
+ public static CreativeTabs armour = new AetherArmourTab();
+ public static CreativeTabs capes = new AetherCapeTab();
+ public static CreativeTabs accessories = new AetherAccessoryTab();
+ public static CreativeTabs materials = new AetherMaterialsTab();
+ public static CreativeTabs food = new AetherFoodTab();
+ public static CreativeTabs misc = new AetherMiscTab();
+
+ public static int BerryBushRenderID = RenderBerryBush.renderID;
+ public static int TallAetherGrassRenderID = RenderAetherTallGrass.renderID;
+
+ public static String PubKey = "2TuPVgMCHJy5atawrsADEzjP7MCVbyyCA89UW6Wvjp9HrAMRqHBLXxCWbeqpaSUQqP1orskhtvckgmQLUCYNSoWouoBW6qgWVMExtsCKnsftqQQb2JGtk7NWQvt6p818d9NzwjP1N2Pvicmy8MpktG1HfwURcR4LQXAGBriu1Ti5XzbVRreoUj8DifbuwfcftgmCPzN8vqdEmTCardSsWNSNkkjKucy1CnvACewXESjp5vCXtjLpPm35kxWWjMvgf5tEjvFFrDMPzYtjM8St6FwNfeBv2GW4uayfxeGHdhQt2c5GTyusVK53wRo1eP2Zy5MALTZerCUoKJpJaLnxyQ5NautXGKKNVWVtdj5LE1uWAvvv3ySbEtyZrzT8DiX6Ng3K6TBXJzA36ZWaHN";
+ private static PublicKey publicKey;
+ public static SyncDonatorList syncDonatorList = new SyncDonatorList();
+
+ @SidedProxy(clientSide = "net.aetherteam.aether.client.ClientProxy", serverSide = "net.aetherteam.aether.CommonProxy")
+ public static CommonProxy proxy;
+ public static ArrayList developers = new ArrayList();
+ public static ArrayList helper = new ArrayList();
+
+ public static Configuration getConfig()
+ {
+ return config;
+ }
+
+ public static String getVersion()
+ {
+ return version;
+ }
+
+ public static Aether getInstance()
+ {
+ return instance;
+ }
+
+ @Mod.Init
+ public void load(FMLInitializationEvent event)
+ {
+ X509EncodedKeySpec publicKeySpec = new X509EncodedKeySpec(Base58.decode(PubKey));
+ try
+ {
+ KeyFactory keyFactory = KeyFactory.getInstance("RSA");
+ publicKey = keyFactory.generatePublic(publicKeySpec);
+ } catch (NoSuchAlgorithmException e)
+ {
+ e.printStackTrace();
+ } catch (InvalidKeySpecException e)
+ {
+ e.printStackTrace();
+ }
+
+ DimensionManager.registerProviderType(3, WorldProviderAether.class, true);
+ DimensionManager.registerDimension(3, 3);
+
+ proxy.loadSounds();
+ proxy.registerRenderers();
+ proxy.registerMainMenu();
+ proxy.registerPlayerAPI();
+
+ config.load();
+
+ AetherEntities.init(this);
+ AetherTileEntities.init();
+ AetherBlocks.init();
+ AetherItems.init();
+ AetherRecipes.init();
+ AetherFreezables.init();
+ AetherEnchantments.init();
+ AetherRecipes.init();
+ AetherAchievements.init();
+
+ NetworkRegistry.instance().registerGuiHandler(this, aetherGuiHandler);
+ GameRegistry.registerCraftingHandler(aetherCraftingHandler);
+ MinecraftForge.EVENT_BUS.register(new AetherHooks());
+ MinecraftForge.EVENT_BUS.register(new AetherEvents());
+
+ config.save();
+ }
+
+ @Mod.PreInit
+ public void preInit(FMLPreInitializationEvent event)
+ {
+ AetherRanks.addAllRanks();
+
+ proxy.registerRenderPAPI();
+ proxy.registerSounds();
+ config = new Configuration(event.getSuggestedConfigurationFile());
+ proxy.registerTickHandler();
+
+ GameRegistry.registerPlayerTracker(new AetherPlayerTracker());
+ }
+
+ @Mod.ServerStarting
+ public void serverStarting(FMLServerStartingEvent event)
+ {
+ event.registerServerCommand(new CommandClearInventoryAether());
+ event.registerServerCommand(new CommandTeleport());
+
+ TickRegistry.registerTickHandler(new ServerTickHandler(), Side.SERVER);
+ }
+
+ @Mod.ServerStarted
+ public void serverStarted(FMLServerStartedEvent event)
+ {
+ SerialDataHandler dungeonDataHandler = new SerialDataHandler("dungeons.dat");
+ ArrayList dungeonObjects = dungeonDataHandler.deserializeObjects();
+
+ MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
+ ServerConfigurationManager configManager = server.getConfigurationManager();
+
+ if (configManager.playerEntityList.size() <= 1)
+ {
+ SerialDataHandler partyDataHandler = new SerialDataHandler("parties.dat");
+ ArrayList partyObjects = partyDataHandler.deserializeObjects();
+
+ if (partyObjects != null)
+ {
+ PartyController.instance().setParties(partyObjects);
+ }
+ }
+
+ if (dungeonObjects != null)
+ {
+ DungeonHandler.instance().loadInstances(dungeonObjects);
+ }
+ }
+
+ @Mod.ServerStopping
+ public void serverStopping(FMLServerStoppingEvent event)
+ {
+ SerialDataHandler dungeonDataHandler = new SerialDataHandler("dungeons.dat");
+ ArrayList dungeonObjects = DungeonHandler.instance().getInstances();
+
+ MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
+ ServerConfigurationManager configManager = server.getConfigurationManager();
+
+ if (configManager.playerEntityList.size() <= 1)
+ {
+ SerialDataHandler partyDataHandler = new SerialDataHandler("parties.dat");
+ ArrayList partyObjects = PartyController.instance().getParties();
+
+ partyDataHandler.serializeObjects(partyObjects);
+ }
+
+ dungeonDataHandler.serializeObjects(dungeonObjects);
+ }
+
+ public static void teleportPlayerToAether(EntityPlayerMP player, boolean aboveWorld)
+ {
+ getServerPlayer(player);
+ PlayerBaseAetherServer.keepInventory = true;
+
+ if (player.dimension == 0)
+ {
+ TeleporterAether aetherTeleporter = new TeleporterAether(MinecraftServer.getServer().worldServerForDimension(3));
+ ServerConfigurationManager scm = MinecraftServer.getServer().getConfigurationManager();
+ scm.transferPlayerToDimension(player, 3, aetherTeleporter);
+ } else if (player.dimension == 3)
+ {
+ TeleporterAether aetherTeleporter = new TeleporterAether(MinecraftServer.getServer().worldServerForDimension(0));
+ ServerConfigurationManager scm = MinecraftServer.getServer().getConfigurationManager();
+ scm.transferPlayerToDimension(player, 0, aetherTeleporter);
+ if (aboveWorld)
+ {
+ player.setPositionAndUpdate(player.posX, 256.0D, player.posZ);
+ }
+ } else
+ {
+ TeleporterAether aetherTeleporter = new TeleporterAether(MinecraftServer.getServer().worldServerForDimension(3));
+ ServerConfigurationManager scm = MinecraftServer.getServer().getConfigurationManager();
+ scm.transferPlayerToDimension(player, 3, aetherTeleporter);
+ }
+ player.timeUntilPortal = player.getPortalCooldown();
+ }
+
+ public static void teleportEntityToAether(Entity entity)
+ {
+ if ((!entity.worldObj.isRemote) && (!entity.isDead))
+ {
+ int newDim = 0;
+ int j = entity.dimension;
+ if (j == 0) newDim = 3;
+ else if (j == 3) newDim = 0;
+ else newDim = 3;
+ entity.worldObj.theProfiler.startSection("changeDimension");
+ MinecraftServer minecraftserver = MinecraftServer.getServer();
+ WorldServer worldserver = minecraftserver.worldServerForDimension(j);
+ WorldServer worldserver1 = minecraftserver.worldServerForDimension(newDim);
+ TeleporterAether aetherTeleporter = new TeleporterAether(MinecraftServer.getServer().worldServerForDimension(newDim));
+ entity.dimension = newDim;
+ entity.worldObj.removeEntity(entity);
+ entity.isDead = false;
+ entity.worldObj.theProfiler.startSection("reposition");
+ minecraftserver.getConfigurationManager().transferEntityToWorld(entity, j, worldserver, worldserver1, aetherTeleporter);
+ entity.worldObj.theProfiler.endStartSection("reloading");
+ Entity entity1 = EntityList.createEntityByName(EntityList.getEntityString(entity), worldserver1);
+
+ if (entity1 != null)
+ {
+ entity1.copyDataFrom(entity, true);
+ entity1.timeUntilPortal = entity.getPortalCooldown();
+ worldserver1.spawnEntityInWorld(entity1);
+ }
+
+ entity.isDead = true;
+ entity.worldObj.theProfiler.endSection();
+ worldserver.resetUpdateEntityTick();
+ worldserver1.resetUpdateEntityTick();
+ entity.worldObj.theProfiler.endSection();
+ }
+ }
+
+ public static void giveAchievement(Achievement achievement, EntityPlayer player)
+ {
+ Minecraft mc = proxy.getClient();
+ boolean isRemote = player.worldObj.isRemote;
+
+ if ((isRemote) || (mc == null))
+ {
+ return;
+ }
+ if ((mc.statFileWriter.canUnlockAchievement(achievement)) && (!mc.statFileWriter.hasAchievementUnlocked(achievement)))
+ ;
+ }
+
+ public String getMyKey(String name)
+ {
+ Minecraft.getMinecraft();
+ File Me = new File(Minecraft.getMinecraftDir(), name.toLowerCase() + ".key");
+
+ if (Me.exists())
+ {
+ try
+ {
+ BufferedReader br = new BufferedReader(new FileReader(Me));
+
+ String key = br.readLine();
+ System.out.print("Key !! :" + key);
+ System.out.println("Reading name...");
+
+ if (!key.equalsIgnoreCase("false"))
+ {
+ if (isLegit(name.toLowerCase(), key))
+ {
+ System.out.println("Read name is correct.");
+
+ return key;
+ }
+ }
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ }
+
+ try
+ {
+ URL url = new URL("http://www.aethermod.net/signature.php?name=" + name.toLowerCase());
+
+ BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
+ String str;
+ if (((str = in.readLine()) != null) && (name != null))
+ {
+ in.close();
+
+ if (str.equalsIgnoreCase("false"))
+ {
+ return null;
+ }
+ if (isLegit(name.toLowerCase(), str))
+ {
+ System.out.println("Downloaded name is legit, should save now.");
+
+ return str;
+ }
+
+ System.out.println("Downloaded name is not legit, weird!");
+ }
+
+ in.close();
+ } catch (MalformedURLException e)
+ {
+ e.printStackTrace();
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ return null;
+ }
+
+ public String getKey(String name)
+ {
+ try
+ {
+ URL url = new URL("http://www.aethermod.net/signature.php?name=" + name.toLowerCase());
+
+ BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
+ String str;
+ if ((str = in.readLine()) != null)
+ {
+ in.close();
+
+ if (str.equalsIgnoreCase("false"))
+ {
+ return null;
+ }
+ if (isLegit(name.toLowerCase(), str))
+ {
+ System.out.println("Downloaded name is legit, should save now.");
+
+ return str;
+ }
+
+ System.out.println("Downloaded name is not legit, weird!");
+ }
+
+ in.close();
+ } catch (MalformedURLException e)
+ {
+ e.printStackTrace();
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ return null;
+ }
+
+ public boolean isLegit(String username, String proof)
+ {
+ if ((proof == null) || (username == null))
+ {
+ return false;
+ }
+ System.out.println(username + ": " + proof);
+ try
+ {
+ Signature sig = Signature.getInstance("MD5WithRSA");
+
+ sig.initVerify(publicKey);
+ sig.update(username.toLowerCase().getBytes("UTF8"));
+
+ return Base58.decode(proof) != null ? sig.verify(Base58.decode(proof)) : false;
+ } catch (NoSuchAlgorithmException e)
+ {
+ e.printStackTrace();
+ } catch (InvalidKeyException e)
+ {
+ e.printStackTrace();
+ } catch (SignatureException e)
+ {
+ e.printStackTrace();
+ } catch (UnsupportedEncodingException e)
+ {
+ e.printStackTrace();
+ }
+
+ return false;
+ }
+
+ public static AetherCommonPlayerHandler getPlayerBase(EntityPlayer entity)
+ {
+ return proxy.getPlayerHandler(entity);
+ }
+
+ public static PlayerBaseAetherServer getServerPlayer(EntityPlayer player)
+ {
+ if ((player instanceof EntityPlayerMP))
+ return (PlayerBaseAetherServer) ((EntityPlayerMP) player).getServerPlayerBase("Aether II");
+ return null;
+ }
+
+ public static PlayerBaseAetherClient getClientPlayer(EntityPlayer player)
+ {
+ if ((player instanceof EntityPlayerSP))
+ return (PlayerBaseAetherClient) ((EntityPlayerSP) player).getPlayerBase("Aether II");
+ return null;
+ }
+
+ @Mod.PostInit
+ public void postInit(FMLPostInitializationEvent event)
+ {
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.Aether
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/AetherCommonPlayerHandler.java b/src/main/java/net/aetherteam/aether/AetherCommonPlayerHandler.java
new file mode 100644
index 0000000..a61edfb
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/AetherCommonPlayerHandler.java
@@ -0,0 +1,213 @@
+package net.aetherteam.aether;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.network.PacketDispatcher;
+import cpw.mods.fml.common.network.Player;
+import cpw.mods.fml.relauncher.Side;
+
+import java.util.Random;
+
+import net.aetherteam.aether.client.PlayerBaseAetherClient;
+import net.aetherteam.aether.entities.mounts_old.RidingHandler;
+import net.aetherteam.aether.interfaces.IAetherBoss;
+import net.aetherteam.aether.packets.AetherPacketHandler;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.client.entity.EntityClientPlayerMP;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.potion.Potion;
+import net.minecraft.potion.PotionEffect;
+import net.minecraft.server.MinecraftServer;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+import net.minecraft.world.WorldServer;
+
+public class AetherCommonPlayerHandler
+{
+ public int timeUntilPortal = 0;
+ public boolean inPortal = false;
+ public float timeInPortal;
+ public float prevTimeInPortal;
+ public EntityPlayer player;
+ protected int field_82152_aq;
+ public Random rand = new Random();
+ public World worldObj;
+ public int jrem;
+ public static MinecraftServer mcServer = FMLCommonHandler.instance().getMinecraftServerInstance();
+ private IAetherBoss currentBoss;
+ public RidingHandler riddenBy;
+ public boolean verifiedOutOfPortal;
+ private int verifiedOutOfPortalTime;
+ private boolean beenInPortal;
+ private double dungeonPosX = 0.0D;
+ private double dungeonPosY = 0.0D;
+ private double dungeonPosZ = 0.0D;
+ private int frostBiteTimer;
+ private int frostBiteTime;
+
+ public AetherCommonPlayerHandler(EntityPlayer Player)
+ {
+ this.player = Player;
+ this.worldObj = this.player.worldObj;
+ }
+
+ public AetherCommonPlayerHandler(PlayerBaseAetherClient playerBaseAetherClient)
+ {
+ this(playerBaseAetherClient.getPlayer());
+ }
+
+ public AetherCommonPlayerHandler(PlayerBaseAetherServer playerBaseAether)
+ {
+ this(playerBaseAether.getPlayer());
+ }
+
+ public void afterOnUpdate()
+ {
+ this.timeUntilPortal = this.player.timeUntilPortal;
+ beforeOnLivingUpdate();
+
+ if ((!this.worldObj.isRemote) && ((this.worldObj instanceof WorldServer)))
+ {
+ MinecraftServer minecraftserver = ((WorldServer) this.worldObj).getMinecraftServer();
+ int i = this.player.getMaxInPortalTime();
+
+ if (this.inPortal)
+ {
+ if ((this.player.ridingEntity == null) && (this.timeInPortal++ >= i))
+ {
+ this.timeInPortal = i;
+ this.player.timeUntilPortal = this.player.getPortalCooldown();
+
+ Aether.teleportPlayerToAether((EntityPlayerMP) this.player, false);
+ }
+
+ this.inPortal = false;
+ } else
+ {
+ if (this.timeInPortal > 0.0F)
+ {
+ this.timeInPortal -= 4.0F;
+ }
+
+ if (this.timeInPortal < 0.0F)
+ {
+ this.timeInPortal = 0.0F;
+ }
+ }
+
+ if (this.timeUntilPortal > 0)
+ {
+ this.timeUntilPortal -= 1;
+ }
+ }
+
+ if ((this.currentBoss != null) && ((this.currentBoss.getBossEntity() instanceof EntityLiving)))
+ {
+ EntityLiving bossMob = (EntityLiving) this.currentBoss;
+
+ if ((bossMob.isDead) || (this.currentBoss.getBossHP() <= 0))
+ {
+ setCurrentBoss(null);
+ }
+ }
+ if (this.frostBiteTimer > 0)
+ {
+ if (this.rand.nextInt(8) == 1)
+ {
+ this.player.attackEntityFrom(new FrostDamageSource(), this.rand.nextInt(4));
+ this.frostBiteTime += 1;
+ }
+ this.player.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 3, 2));
+ this.frostBiteTimer -= 1;
+ }
+ if (this.player.isDead) this.frostBiteTimer = 0;
+ }
+
+ public void playPortalSFX()
+ {
+ if (this.timeInPortal == 0.0F)
+ {
+ this.player.worldObj.playSoundAtEntity(this.player, "portal.trigger", 1.0F, this.rand.nextFloat() * 0.4F + 0.8F);
+ }
+ }
+
+ public float getSpeedModifier()
+ {
+ return this.riddenBy != null ? this.riddenBy.getSpeedModifier() : -1.0F;
+ }
+
+ public void beforeOnLivingUpdate()
+ {
+ if (this.riddenBy != null)
+ {
+ this.riddenBy.update();
+ }
+
+ AetherPoison.poisonTick(this.player);
+ }
+
+ public boolean jump()
+ {
+ if (this.riddenBy != null)
+ {
+ return this.riddenBy.jump(this, this.player);
+ }
+
+ return true;
+ }
+
+ public void rideEntity(Entity animal, RidingHandler ridingHandler)
+ {
+ this.riddenBy = ridingHandler;
+
+ if (animal == null)
+ {
+ this.riddenBy = null;
+ }
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+ EntityClientPlayerMP playerr;
+ if (side.isServer())
+ {
+ EntityPlayerMP playerrs = (EntityPlayerMP) this.player;
+ PacketDispatcher.sendPacketToPlayer(AetherPacketHandler.sendRidingPacket(animal), (Player) playerrs);
+ } else if (side.isClient())
+ {
+ playerr = (EntityClientPlayerMP) this.player;
+ }
+ }
+
+ public void setCurrentBoss(IAetherBoss boss)
+ {
+ this.currentBoss = boss;
+
+ PartyMember member = PartyController.instance().getMember(this.player.username);
+ Party party = PartyController.instance().getParty(member);
+
+ if (party != null) ;
+ }
+
+ public int getFrostBiteTime()
+ {
+ return this.frostBiteTime;
+ }
+
+ public IAetherBoss getCurrentBoss()
+ {
+ return this.currentBoss;
+ }
+
+ public void setInIce()
+ {
+ int time = 100 + this.rand.nextInt(20 * MathHelper.clamp_int(this.rand.nextInt(13), 5, 13));
+ this.frostBiteTimer = time;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.AetherCommonPlayerHandler
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/AetherConnectionHandler.java b/src/main/java/net/aetherteam/aether/AetherConnectionHandler.java
new file mode 100644
index 0000000..860442d
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/AetherConnectionHandler.java
@@ -0,0 +1,49 @@
+package net.aetherteam.aether;
+
+import cpw.mods.fml.common.network.IConnectionHandler;
+import cpw.mods.fml.common.network.Player;
+
+import java.util.ArrayList;
+
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.notifications.NotificationHandler;
+import net.minecraft.network.INetworkManager;
+import net.minecraft.network.NetLoginHandler;
+import net.minecraft.network.packet.NetHandler;
+import net.minecraft.network.packet.Packet1Login;
+import net.minecraft.server.MinecraftServer;
+
+public class AetherConnectionHandler implements IConnectionHandler
+{
+ public void playerLoggedIn(Player player, NetHandler netHandler, INetworkManager manager)
+ {
+ }
+
+ public String connectionReceived(NetLoginHandler netHandler, INetworkManager manager)
+ {
+ return null;
+ }
+
+ public void connectionOpened(NetHandler netClientHandler, String server, int port, INetworkManager manager)
+ {
+ }
+
+ public void connectionClosed(INetworkManager manager)
+ {
+ }
+
+ public void clientLoggedIn(NetHandler clientHandler, INetworkManager manager, Packet1Login login)
+ {
+ NotificationHandler.instance().clearNotifications();
+ DungeonHandler.instance().loadInstances(new ArrayList());
+ }
+
+ public void connectionOpened(NetHandler netClientHandler, MinecraftServer server, INetworkManager manager)
+ {
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.AetherConnectionHandler
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/AetherCraftingHandler.java b/src/main/java/net/aetherteam/aether/AetherCraftingHandler.java
new file mode 100644
index 0000000..5b7feed
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/AetherCraftingHandler.java
@@ -0,0 +1,35 @@
+package net.aetherteam.aether;
+
+import cpw.mods.fml.common.ICraftingHandler;
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.inventory.IInventory;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+
+public class AetherCraftingHandler implements ICraftingHandler
+{
+ public void onCrafting(EntityPlayer player, ItemStack stack, IInventory craftMatrix)
+ {
+ if (stack.itemID != AetherBlocks.Altar.blockID)
+ {
+ if (!isGravititeTool(stack.itemID)) ;
+ }
+ }
+
+ public void onSmelting(EntityPlayer player, ItemStack stack)
+ {
+ }
+
+ public boolean isGravititeTool(int stackID)
+ {
+ return (stackID == AetherItems.GravititePickaxe.itemID) || (stackID == AetherItems.GravititeAxe.itemID) || (stackID == AetherItems.GravititeShovel.itemID);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.AetherCraftingHandler
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/AetherEnchantment.java b/src/main/java/net/aetherteam/aether/AetherEnchantment.java
new file mode 100644
index 0000000..d19a263
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/AetherEnchantment.java
@@ -0,0 +1,29 @@
+package net.aetherteam.aether;
+
+import net.minecraft.item.ItemStack;
+
+public class AetherEnchantment
+{
+ public ItemStack enchantFrom;
+ public ItemStack enchantTo;
+ public int enchantAmbrosiumNeeded;
+ public boolean limitStackToOne;
+
+ public AetherEnchantment(ItemStack from, ItemStack to, int i)
+ {
+ this(from, to, i, false);
+ }
+
+ public AetherEnchantment(ItemStack from, ItemStack to, int i, boolean limit)
+ {
+ this.enchantFrom = from;
+ this.enchantTo = to;
+ this.enchantAmbrosiumNeeded = i;
+ this.limitStackToOne = limit;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.AetherEnchantment
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/AetherEventReceiver.java b/src/main/java/net/aetherteam/aether/AetherEventReceiver.java
new file mode 100644
index 0000000..117b6f8
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/AetherEventReceiver.java
@@ -0,0 +1,18 @@
+package net.aetherteam.aether;
+
+import net.minecraftforge.client.event.RenderGameOverlayEvent;
+import net.minecraftforge.event.EventPriority;
+import net.minecraftforge.event.ForgeSubscribe;
+
+public class AetherEventReceiver
+{
+ @ForgeSubscribe(priority = EventPriority.NORMAL)
+ public void onRenderGui(RenderGameOverlayEvent event)
+ {
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.AetherEventReceiver
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/AetherEvents.java b/src/main/java/net/aetherteam/aether/AetherEvents.java
new file mode 100644
index 0000000..66840ae
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/AetherEvents.java
@@ -0,0 +1,106 @@
+package net.aetherteam.aether;
+
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.containers.InventoryAether;
+import net.aetherteam.aether.entities.EntityAetherCoin;
+import net.minecraft.block.Block;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.world.GameRules;
+import net.minecraft.world.World;
+import net.minecraftforge.event.Event;
+import net.minecraftforge.event.Event.Result;
+import net.minecraftforge.event.ForgeSubscribe;
+import net.minecraftforge.event.entity.living.LivingDeathEvent;
+import net.minecraftforge.event.entity.player.BonemealEvent;
+
+public class AetherEvents
+{
+ @ForgeSubscribe
+ public void bonemealEvent(BonemealEvent event)
+ {
+ World world = event.world;
+ int id = world.getBlockId(event.X, event.Y, event.Z);
+ if (id == AetherBlocks.AetherGrass.blockID)
+ {
+ if (!event.world.isRemote)
+ {
+ int iSpawned = 0;
+
+ label316:
+ for (int var9 = 0; var9 < 64; var9++)
+ {
+ int x = event.X;
+ int y = event.Y + 1;
+ int z = event.Z;
+
+ for (int var13 = 0; var13 < var9 / 16; var13++)
+ {
+ x += world.rand.nextInt(3) - 1;
+ y += (world.rand.nextInt(3) - 1) * world.rand.nextInt(3) / 2;
+ z += world.rand.nextInt(3) - 1;
+ if ((world.getBlockId(x, y - 1, z) != id) || (world.isBlockNormalCube(x, y, z)))
+ {
+ break label316;
+ }
+ }
+ if (world.getBlockId(x, y, z) == 0)
+ {
+ if (world.rand.nextInt(20 + 10 * iSpawned) == 0)
+ {
+ world.setBlock(x, y, z, AetherBlocks.WhiteFlower.blockID);
+ iSpawned++;
+ } else if (world.rand.nextInt(10 + 2 * iSpawned) <= 2)
+ {
+ world.setBlock(x, y, z, AetherBlocks.PurpleFlower.blockID);
+ iSpawned++;
+ } else if (world.rand.nextInt(10 + 2 * iSpawned) <= 8)
+ {
+ world.setBlock(x, y, z, AetherBlocks.TallAetherGrass.blockID);
+ iSpawned++;
+ }
+ }
+ }
+ }
+ event.setResult(Event.Result.ALLOW);
+ }
+ }
+
+ @ForgeSubscribe
+ public void playerDeathEvent(LivingDeathEvent event)
+ {
+ if ((event.entityLiving instanceof EntityPlayer))
+ {
+ EntityPlayer player = (EntityPlayer) event.entityLiving;
+ PlayerBaseAetherServer base = Aether.getServerPlayer(player);
+
+ if (!player.worldObj.getGameRules().getGameRuleBooleanValue("keepInventory"))
+ {
+ base.inv.dropAllItems();
+
+ if (!player.worldObj.isRemote)
+ {
+ double x = event.entityLiving.posX;
+ double y = event.entityLiving.posY;
+ double z = event.entityLiving.posZ;
+
+ World world = player.worldObj;
+
+ player.worldObj.spawnEntityInWorld(new EntityAetherCoin(world, x, y, z, base.getCoins()));
+ base.inv = new InventoryAether(player);
+
+ base.setCoinAmount(0);
+
+ event.setResult(Event.Result.ALLOW);
+ }
+ }
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.AetherEvents
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/AetherFrozen.java b/src/main/java/net/aetherteam/aether/AetherFrozen.java
new file mode 100644
index 0000000..66a8efb
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/AetherFrozen.java
@@ -0,0 +1,22 @@
+package net.aetherteam.aether;
+
+import net.minecraft.item.ItemStack;
+
+public class AetherFrozen
+{
+ public ItemStack frozenFrom;
+ public ItemStack frozenTo;
+ public int frozenPowerNeeded;
+
+ public AetherFrozen(ItemStack from, ItemStack to, int i)
+ {
+ this.frozenFrom = from;
+ this.frozenTo = to;
+ this.frozenPowerNeeded = i;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.AetherFrozen
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/AetherGuiHandler.java b/src/main/java/net/aetherteam/aether/AetherGuiHandler.java
new file mode 100644
index 0000000..8b1896a
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/AetherGuiHandler.java
@@ -0,0 +1,138 @@
+package net.aetherteam.aether;
+
+import cpw.mods.fml.common.network.IGuiHandler;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import net.aetherteam.aether.client.gui.GuiFreezer;
+import net.aetherteam.aether.client.gui.GuiIncubator;
+import net.aetherteam.aether.client.gui.GuiLore;
+import net.aetherteam.aether.client.gui.GuiSkyrootCrafting;
+import net.aetherteam.aether.client.gui.GuiTreasureChest;
+import net.aetherteam.aether.client.gui.dungeons.GuiDungeonEntrance;
+import net.aetherteam.aether.client.gui.social.GuiDungeonScreen;
+import net.aetherteam.aether.containers.ContainerFreezer;
+import net.aetherteam.aether.containers.ContainerIncubator;
+import net.aetherteam.aether.containers.ContainerLore;
+import net.aetherteam.aether.containers.ContainerSkyrootWorkbench;
+import net.aetherteam.aether.tile_entities.TileEntityEntranceController;
+import net.aetherteam.aether.tile_entities.TileEntityFreezer;
+import net.aetherteam.aether.tile_entities.TileEntityIncubator;
+import net.aetherteam.aether.tile_entities.TileEntityTreasureChest;
+import net.minecraft.client.Minecraft;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.inventory.ContainerChest;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.World;
+
+public class AetherGuiHandler implements IGuiHandler
+{
+ private static List guiContainers = new ArrayList();
+ private static List containers = new ArrayList();
+ private static List tile_entities = new ArrayList();
+ public static final int treasureChestID = guiContainers.size() + 1;
+ public static final int incubatorID = guiContainers.size() + 2;
+ public static final int freezerID = guiContainers.size() + 3;
+ public static final int realLoreID = guiContainers.size() + 4;
+ public static final int loreID = guiContainers.size() + 5;
+ public static final int craftingID = guiContainers.size() + 6;
+ public static final int entranceID = guiContainers.size() + 7;
+ public static final int loadingScreenID = guiContainers.size() + 8;
+
+ public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z)
+ {
+ TileEntity tile = world.getBlockTileEntity(x, y, z);
+
+ if (id == treasureChestID)
+ {
+ return new ContainerChest(player.inventory, (TileEntityTreasureChest) tile);
+ }
+ if (id == incubatorID)
+ {
+ return new ContainerIncubator(player.inventory, (TileEntityIncubator) tile);
+ }
+ if (id == freezerID)
+ {
+ return new ContainerFreezer(player.inventory, (TileEntityFreezer) tile);
+ }
+ if (id == loreID)
+ {
+ return new ContainerLore(player.inventory, true, player);
+ }
+ if (id == craftingID)
+ {
+ return new ContainerSkyrootWorkbench(player.inventory, player.worldObj, x, y, z);
+ }
+
+ return null;
+ }
+
+ @SideOnly(Side.CLIENT)
+ public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z)
+ {
+ TileEntity tile = world.getBlockTileEntity(x, y, z);
+
+ if (!player.worldObj.isRemote)
+ {
+ return null;
+ }
+
+ if (id == treasureChestID)
+ {
+ return new GuiTreasureChest(player.inventory, (TileEntityTreasureChest) tile, ((TileEntityTreasureChest) tile).getKind());
+ }
+ if (id == incubatorID)
+ {
+ return new GuiIncubator(player.inventory, (TileEntityIncubator) tile);
+ }
+ if (id == freezerID)
+ {
+ return new GuiFreezer(player.inventory, (TileEntityFreezer) tile);
+ }
+ if (id == loreID)
+ {
+ return new GuiLore(player.inventory, player, 0);
+ }
+ if (id == craftingID)
+ {
+ return new GuiSkyrootCrafting(player.inventory, player.worldObj, x, y, z);
+ }
+ if (id == entranceID)
+ {
+ return new GuiDungeonEntrance(player, null, (TileEntityEntranceController) tile);
+ }
+ if (id == loadingScreenID)
+ {
+ return new GuiDungeonScreen(Minecraft.getMinecraft());
+ }
+
+ return null;
+ }
+
+ public static void registerGui(Class guiContainer, Class container)
+ {
+ guiContainers.add(guiContainer);
+ containers.add(container);
+ tile_entities.add(TileEntity.class);
+ }
+
+ public static int getID(Class guiContainer, Class tile)
+ {
+ if (guiContainers.contains(guiContainer))
+ {
+ tile_entities.add(guiContainers.indexOf(guiContainer), tile);
+ return guiContainers.indexOf(guiContainer);
+ }
+
+ return 0;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.AetherGuiHandler
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/AetherHooks.java b/src/main/java/net/aetherteam/aether/AetherHooks.java
new file mode 100644
index 0000000..3a49250
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/AetherHooks.java
@@ -0,0 +1,349 @@
+package net.aetherteam.aether;
+
+import java.util.Iterator;
+import java.util.List;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.blocks.BlockAetherPortal;
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.entities.mounts_old.RidingHandler;
+import net.aetherteam.aether.items.AetherItems;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.entity.player.PlayerCapabilities;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemBlock;
+import net.minecraft.item.ItemInWorldManager;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.EnumMovingObjectType;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.MovingObjectPosition;
+import net.minecraft.util.Vec3;
+import net.minecraft.util.Vec3Pool;
+import net.minecraft.world.World;
+import net.minecraftforge.event.ForgeSubscribe;
+import net.minecraftforge.event.entity.player.PlayerInteractEvent;
+import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action;
+
+public class AetherHooks
+{
+ private static final int[] banItemIDs = new int[0];
+
+ @ForgeSubscribe
+ public void onPlayerInteract(PlayerInteractEvent e)
+ {
+ handlePortalActivation(e);
+ handleAerogelPlacement(e);
+ handleAetherBlockBans(e);
+ handleAetherMountInteraction(e);
+ addBlockToDungeonInstace(e);
+ }
+
+ private void handleAetherBlockBans(PlayerInteractEvent e)
+ {
+ if (e.action != PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK)
+ {
+ return;
+ }
+
+ if (e.entityPlayer.dimension != 3)
+ {
+ return;
+ }
+
+ ItemStack currentStack = e.entityPlayer.getCurrentEquippedItem();
+
+ if (currentStack == null)
+ {
+ return;
+ }
+
+ for (int banItemID : banItemIDs)
+ if (currentStack.itemID == banItemID)
+ {
+ e.setCanceled(true);
+ return;
+ }
+ }
+
+ private void handleAetherMountInteraction(PlayerInteractEvent e)
+ {
+ if (e.action != PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK)
+ {
+ return;
+ }
+
+ Vec3 look = e.entityPlayer.getLookVec();
+ double dist = 6.0D;
+ AxisAlignedBB aabb = e.entityPlayer.boundingBox.expand(dist, dist, dist);
+ List list = e.entityPlayer.worldObj.getEntitiesWithinAABB(Entity.class, aabb);
+ Entity found = null;
+ double foundLen = 0.0D;
+
+ for (Iterator i$ = list.iterator(); i$.hasNext(); )
+ {
+ Object o = i$.next();
+
+ if (o != e.entityPlayer)
+ {
+ Entity ent = (Entity) o;
+
+ Vec3 vec = Vec3.createVectorHelper(ent.posX - e.entityPlayer.posX, ent.boundingBox.minY + ent.height / 2.0F - e.entityPlayer.posY - e.entityPlayer.getEyeHeight(), ent.posZ - e.entityPlayer.posZ);
+
+ double len = vec.lengthVector();
+
+ if (len <= dist)
+ {
+ vec = vec.normalize();
+ double dot = look.dotProduct(vec);
+
+ if ((dot >= 1.0D - 0.125D / len) && (e.entityPlayer.canEntityBeSeen(ent)))
+ {
+ if ((foundLen == 0.0D) || (len < foundLen))
+ {
+ found = ent;
+ foundLen = len;
+ }
+ }
+ }
+ }
+ }
+ if (e.entityPlayer.worldObj.isRemote)
+ {
+ if (Aether.getPlayerBase(e.entityPlayer).riddenBy != null)
+ {
+ Aether.getPlayerBase(e.entityPlayer).riddenBy.onUnMount();
+ }
+ }
+
+ if (!e.entityPlayer.worldObj.isRemote)
+ {
+ if (Aether.getPlayerBase((EntityPlayerMP) e.entityPlayer).riddenBy != null)
+ {
+ Aether.getPlayerBase((EntityPlayerMP) e.entityPlayer).riddenBy.onUnMount();
+ }
+ }
+ }
+
+ private void addBlockToDungeonInstace(PlayerInteractEvent e)
+ {
+ Party party = PartyController.instance().getParty(e.entityPlayer);
+ Dungeon dungeon = DungeonHandler.instance().getDungeon(party);
+
+ int[][][] arrayOfInt = (int[][][]) null;
+
+ if ((PartyController.instance().getParty(e.entityPlayer) != null) && (DungeonHandler.instance().isInDungeon(party)) && (dungeon != null) && (dungeon.hasMember(PartyController.instance().getMember(e.entityPlayer))))
+ {
+ if (e.action != PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK)
+ {
+ return;
+ }
+
+ ItemStack currentStack = e.entityPlayer.getCurrentEquippedItem();
+ if ((currentStack != null) && ((currentStack.getItem() instanceof ItemBlock))) switch (e.face)
+ {
+ case 0:
+ if (e.entityPlayer.worldObj.getBlockId(e.x, e.y - 1, e.z) == 0)
+ dungeon.registerBlockPlacement(e.x, e.y - 1, e.z);
+ break;
+ case 1:
+ if (e.entityPlayer.worldObj.getBlockId(e.x, e.y + 1, e.z) == 0)
+ dungeon.registerBlockPlacement(e.x, e.y + 1, e.z);
+ break;
+ case 2:
+ if (e.entityPlayer.worldObj.getBlockId(e.x, e.y, e.z - 1) == 0)
+ dungeon.registerBlockPlacement(e.x, e.y, e.z - 1);
+ break;
+ case 3:
+ if (e.entityPlayer.worldObj.getBlockId(e.x, e.y, e.z + 1) == 0)
+ dungeon.registerBlockPlacement(e.x, e.y, e.z + 1);
+ break;
+ case 4:
+ if (e.entityPlayer.worldObj.getBlockId(e.x - 1, e.y, e.z) == 0)
+ dungeon.registerBlockPlacement(e.x - 1, e.y, e.z);
+ break;
+ case 5:
+ if (e.entityPlayer.worldObj.getBlockId(e.x + 1, e.y, e.z) == 0)
+ dungeon.registerBlockPlacement(e.x + 1, e.y, e.z);
+ break;
+ }
+ }
+ }
+
+ private void handleAerogelPlacement(PlayerInteractEvent e)
+ {
+ if (e.action != PlayerInteractEvent.Action.RIGHT_CLICK_AIR)
+ {
+ return;
+ }
+
+ if (e.entityPlayer.dimension != 3)
+ {
+ return;
+ }
+
+ ItemStack currentStack = e.entityPlayer.getCurrentEquippedItem();
+
+ if ((currentStack == null) || (currentStack.itemID != Item.bucketLava.itemID))
+ {
+ return;
+ }
+
+ if (e.entityPlayer.worldObj.isRemote) ;
+ float var4 = 1.0F;
+ double var5 = e.entityPlayer.prevPosX + (e.entityPlayer.posX - e.entityPlayer.prevPosX) * var4;
+ double var7 = e.entityPlayer.prevPosY + (e.entityPlayer.posY - e.entityPlayer.prevPosY) * var4 + 1.62D - e.entityPlayer.yOffset;
+ double var9 = e.entityPlayer.prevPosZ + (e.entityPlayer.posZ - e.entityPlayer.prevPosZ) * var4;
+ boolean var11 = false;
+ MovingObjectPosition var12 = getMovingObjectPositionFromPlayer(e.entityPlayer.worldObj, e.entityPlayer, var11);
+
+ if ((var12 == null) || (var12.typeOfHit != EnumMovingObjectType.TILE))
+ {
+ return;
+ }
+
+ int var13 = var12.blockX;
+ int var14 = var12.blockY;
+ int var15 = var12.blockZ;
+
+ if (!e.entityPlayer.worldObj.canMineBlock(e.entityPlayer, var13, var14, var15))
+ {
+ return;
+ }
+
+ if (var12.sideHit == 0) var14--;
+ else if (var12.sideHit == 1) var14++;
+ else if (var12.sideHit == 2) var15--;
+ else if (var12.sideHit == 3) var15++;
+ else if (var12.sideHit == 4) var13--;
+ else if (var12.sideHit == 5)
+ {
+ var13++;
+ }
+
+ if (!e.entityPlayer.canPlayerEdit(var13, var14, var15, var12.sideHit, currentStack))
+ {
+ return;
+ }
+
+ if ((!e.entityPlayer.worldObj.isAirBlock(var13, var14, var15)) && (e.entityPlayer.worldObj.getBlockMaterial(var13, var14, var15).isSolid()))
+ {
+ return;
+ }
+
+ if (!e.entityPlayer.capabilities.isCreativeMode) ;
+ }
+
+ private void handlePortalActivation(PlayerInteractEvent e)
+ {
+ if (e.action != PlayerInteractEvent.Action.RIGHT_CLICK_AIR)
+ {
+ return;
+ }
+
+ ItemStack currentStack = e.entityPlayer.getCurrentEquippedItem();
+
+ if ((currentStack == null) || ((currentStack.itemID != Item.bucketWater.itemID) && (currentStack.itemID != AetherItems.SkyrootBucket.itemID) && (currentStack.getItemDamage() != 8)))
+ {
+ return;
+ }
+
+ float var4 = 1.0F;
+ double var5 = e.entityPlayer.prevPosX + (e.entityPlayer.posX - e.entityPlayer.prevPosX) * var4;
+ double var7 = e.entityPlayer.prevPosY + (e.entityPlayer.posY - e.entityPlayer.prevPosY) * var4 + 1.62D - e.entityPlayer.yOffset;
+ double var9 = e.entityPlayer.prevPosZ + (e.entityPlayer.posZ - e.entityPlayer.prevPosZ) * var4;
+ boolean var11 = false;
+ MovingObjectPosition var12 = getMovingObjectPositionFromPlayer(e.entityPlayer.worldObj, e.entityPlayer, var11);
+
+ if ((var12 == null) || (var12.typeOfHit != EnumMovingObjectType.TILE))
+ {
+ return;
+ }
+
+ int var13 = var12.blockX;
+ int var14 = var12.blockY;
+ int var15 = var12.blockZ;
+
+ if (e.entityPlayer.worldObj.getBlockId(var13, var14, var15) != Block.glowStone.blockID)
+ {
+ return;
+ }
+
+ if (!e.entityPlayer.worldObj.canMineBlock(e.entityPlayer, var13, var14, var15))
+ {
+ return;
+ }
+
+ if (var12.sideHit == 0) var14--;
+ else if (var12.sideHit == 1) var14++;
+ else if (var12.sideHit == 2) var15--;
+ else if (var12.sideHit == 3) var15++;
+ else if (var12.sideHit == 4) var13--;
+ else if (var12.sideHit == 5)
+ {
+ var13++;
+ }
+
+ if (!e.entityPlayer.canPlayerEdit(var13, var14, var15, var12.sideHit, currentStack))
+ {
+ return;
+ }
+
+ if ((!e.entityPlayer.worldObj.isAirBlock(var13, var14, var15)) && (e.entityPlayer.worldObj.getBlockMaterial(var13, var14, var15).isSolid()))
+ {
+ return;
+ }
+
+ if ((!e.entityPlayer.worldObj.isRemote) && (AetherBlocks.AetherPortal.tryToCreatePortal(e.entityPlayer.worldObj, var13, var14, var15)))
+ {
+ e.setCanceled(true);
+
+ if (currentStack == new ItemStack(AetherItems.SkyrootBucket.itemID, 1, Block.waterMoving.blockID))
+ {
+ currentStack = new ItemStack(AetherItems.SkyrootBucket.itemID, 1, 0);
+ return;
+ }
+
+ if (!e.entityPlayer.capabilities.isCreativeMode)
+ {
+ currentStack.itemID = Item.bucketEmpty.itemID;
+ }
+ }
+ }
+
+ private MovingObjectPosition getMovingObjectPositionFromPlayer(World par1World, EntityPlayer par2EntityPlayer, boolean par3)
+ {
+ float var4 = 1.0F;
+ float var5 = par2EntityPlayer.prevRotationPitch + (par2EntityPlayer.rotationPitch - par2EntityPlayer.prevRotationPitch) * var4;
+ float var6 = par2EntityPlayer.prevRotationYaw + (par2EntityPlayer.rotationYaw - par2EntityPlayer.prevRotationYaw) * var4;
+ double var7 = par2EntityPlayer.prevPosX + (par2EntityPlayer.posX - par2EntityPlayer.prevPosX) * var4;
+ double var9 = par2EntityPlayer.prevPosY + (par2EntityPlayer.posY - par2EntityPlayer.prevPosY) * var4 + 1.62D - par2EntityPlayer.yOffset;
+ double var11 = par2EntityPlayer.prevPosZ + (par2EntityPlayer.posZ - par2EntityPlayer.prevPosZ) * var4;
+ Vec3 var13 = par1World.getWorldVec3Pool().getVecFromPool(var7, var9, var11);
+ float var14 = MathHelper.cos(-var6 * 0.01745329F - 3.141593F);
+ float var15 = MathHelper.sin(-var6 * 0.01745329F - 3.141593F);
+ float var16 = -MathHelper.cos(-var5 * 0.01745329F);
+ float var17 = MathHelper.sin(-var5 * 0.01745329F);
+ float var18 = var15 * var16;
+ float var20 = var14 * var16;
+ double var21 = 5.0D;
+ if ((par2EntityPlayer instanceof EntityPlayerMP))
+ {
+ var21 = ((EntityPlayerMP) par2EntityPlayer).theItemInWorldManager.getBlockReachDistance();
+ }
+ Vec3 var23 = var13.addVector(var18 * var21, var17 * var21, var20 * var21);
+ return par1World.rayTraceBlocks_do_do(var13, var23, par3, !par3);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.AetherHooks
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/AetherKeyHandler.java b/src/main/java/net/aetherteam/aether/AetherKeyHandler.java
new file mode 100644
index 0000000..0c195b3
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/AetherKeyHandler.java
@@ -0,0 +1,67 @@
+package net.aetherteam.aether;
+
+import cpw.mods.fml.client.registry.KeyBindingRegistry;
+import cpw.mods.fml.client.registry.KeyBindingRegistry.KeyHandler;
+import cpw.mods.fml.common.TickType;
+
+import java.util.EnumSet;
+
+import net.aetherteam.aether.client.gui.GuiInventoryAether;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.settings.KeyBinding;
+import net.minecraft.entity.player.EntityPlayer;
+
+public class AetherKeyHandler extends KeyBindingRegistry.KeyHandler
+{
+ private static KeyBinding aetherKeyBinding = new KeyBinding("Aether Inventory", 24);
+
+ public AetherKeyHandler()
+ {
+ super(new KeyBinding[]{aetherKeyBinding}, new boolean[]{false});
+ }
+
+ public String getLabel()
+ {
+ return "Aether Inventory";
+ }
+
+ public void keyDown(EnumSet types, KeyBinding kb, boolean tickEnd, boolean isRepeat)
+ {
+ EntityPlayer player = Minecraft.getMinecraft().thePlayer;
+
+ if ((kb.equals(aetherKeyBinding)) && (isRepeat))
+ {
+ if (Minecraft.getMinecraft().currentScreen != null)
+ {
+ Minecraft.getMinecraft().displayGuiScreen(null);
+ return;
+ }
+
+ Minecraft.getMinecraft().displayGuiScreen(new GuiInventoryAether(player));
+ return;
+ }
+ }
+
+ public void keyUp(EnumSet types, KeyBinding kb, boolean tickEnd)
+ {
+ EntityPlayer player = Minecraft.getMinecraft().thePlayer;
+
+ if (kb.equals(aetherKeyBinding))
+ {
+ if (Minecraft.getMinecraft().currentScreen != null)
+ {
+ if (!(Minecraft.getMinecraft().currentScreen instanceof GuiInventoryAether)) ;
+ }
+ }
+ }
+
+ public EnumSet ticks()
+ {
+ return EnumSet.of(TickType.CLIENT);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.AetherKeyHandler
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/AetherLoot.java b/src/main/java/net/aetherteam/aether/AetherLoot.java
new file mode 100644
index 0000000..13c9e28
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/AetherLoot.java
@@ -0,0 +1,88 @@
+package net.aetherteam.aether;
+
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.item.ItemStack;
+
+public enum AetherLoot
+{
+ NORMAL(new Choice[]{new Choice(new ItemStack(AetherItems.ZanitePickaxe), 10.0F), new Choice(new ItemStack(AetherItems.GummieSwet, getRandomStacksize(7) + 1, getRandomStacksize(2)), 10.0F), new Choice(new ItemStack(AetherItems.SkyrootBucket, 1, 2), 8.0F), new Choice(new ItemStack(AetherItems.DartShooter), 10.0F), new Choice(new ItemStack(AetherItems.MoaEgg, 1, 0), 7.0F), new Choice(new ItemStack(AetherItems.AmbrosiumShard, getRandomStacksize(10) + 1), 12.0F), new Choice(new ItemStack(AetherItems.Dart, getRandomStacksize(5) + 1, 0), 10.0F), new Choice(new ItemStack(AetherItems.Dart, getRandomStacksize(3) + 1, 1), 10.0F), new Choice(new ItemStack(AetherItems.Dart, getRandomStacksize(3) + 1, 2), 10.0F), new Choice(new ItemStack(AetherItems.AetherMusicDisk), 5.0F), new Choice(new ItemStack(AetherItems.SkyrootBucket), 12.0F), new Choice(new ItemStack(AetherItems.SkyrootBucket), 12.0F), new Choice(new ItemStack(net.minecraft.item.Item.itemsList[(net.minecraft.item.Item.record13.itemID + getRandomStacksize(2))]), 5.0F), new Choice(new ItemStack(AetherItems.ZaniteBoots), 8.0F), new Choice(new ItemStack(AetherItems.ZaniteHelmet), 8.0F), new Choice(new ItemStack(AetherItems.ZaniteLeggings), 8.0F), new Choice(new ItemStack(AetherItems.ZaniteChestplate), 8.0F), new Choice(new ItemStack(AetherItems.IronPendant), 10.0F), new Choice(new ItemStack(AetherItems.GoldenPendant), 9.0F), new Choice(new ItemStack(AetherItems.ZaniteRing), 8.0F), new Choice(new ItemStack(AetherBlocks.AmbrosiumTorch, getRandomStacksize(4) + 1), 10.0F), new Choice(new ItemStack(AetherItems.SwetCape), 6.0F)}),
+
+ BRONZE(new Choice[]{new Choice(new ItemStack(AetherItems.HammerOfNotch), 6.0F), new Choice(new ItemStack(AetherItems.LightningKnife, getRandomStacksize(15) + 1), 8.0F), new Choice(new ItemStack(AetherItems.LightningSword), 8.0F), new Choice(new ItemStack(AetherItems.AgilityCape), 6.0F), new Choice(new ItemStack(AetherItems.DexterityCape), 6.0F), new Choice(new ItemStack(AetherItems.SentryBoots), 6.0F), new Choice(new ItemStack(AetherItems.RegenerationStone), 8.0F), new Choice(new ItemStack(AetherItems.NeptuneGloves), 8.0F), new Choice(new ItemStack(AetherItems.NeptuneHelmet), 8.0F), new Choice(new ItemStack(AetherItems.NeptuneChestplate), 6.0F), new Choice(new ItemStack(AetherItems.NeptuneLeggings), 8.0F), new Choice(new ItemStack(AetherItems.NeptuneBoots), 8.0F)}),
+
+ SILVER(new Choice[]{new Choice(new ItemStack(AetherItems.ValkyrieAxe), 8.0F), new Choice(new ItemStack(AetherItems.ValkyrieShovel), 8.0F), new Choice(new ItemStack(AetherItems.ValkyriePickaxe), 8.0F), new Choice(new ItemStack(AetherItems.ValkyrieLance), 6.0F), new Choice(new ItemStack(AetherItems.HolySword), 10.0F), new Choice(new ItemStack(AetherItems.ValkyrieGloves), 8.0F), new Choice(new ItemStack(AetherItems.ValkyrieHelmet), 8.0F), new Choice(new ItemStack(AetherItems.ValkyrieChestplate), 6.0F), new Choice(new ItemStack(AetherItems.ValkyrieLeggings), 8.0F), new Choice(new ItemStack(AetherItems.ValkyrieBoots), 8.0F), new Choice(new ItemStack(AetherItems.ValkyrieMusicDisk), 6.0F), new Choice(new ItemStack(AetherItems.InvisibilityCloak), 4.0F)}),
+
+ GOLD(new Choice[]{new Choice(new ItemStack(AetherItems.VampireBlade), 8.0F), new Choice(new ItemStack(AetherItems.ShardOfLife), 8.0F), new Choice(new ItemStack(AetherItems.FlamingSword), 8.0F), new Choice(new ItemStack(AetherItems.PigSlayer), 6.0F), new Choice(new ItemStack(AetherItems.IronBubble), 6.0F), new Choice(new ItemStack(AetherItems.DartShooter, 1, 3), 10.0F), new Choice(new ItemStack(AetherItems.PhoenixGloves), 8.0F), new Choice(new ItemStack(AetherItems.PhoenixHelmet), 8.0F), new Choice(new ItemStack(AetherItems.PhoenixChestplate), 6.0F), new Choice(new ItemStack(AetherItems.PhoenixLeggings), 8.0F), new Choice(new ItemStack(AetherItems.PhoenixBoots), 8.0F)});
+
+ private final Choice[] choices;
+ private final float total;
+
+ private AetherLoot(Choice[] choices)
+ {
+ this.choices = choices;
+ this.total = getTotalWeight();
+ }
+
+ private float getTotalWeight()
+ {
+ float weight = 0.0F;
+ for (Choice c : this.choices)
+ {
+ weight += c.getWeight();
+ }
+ return weight;
+ }
+
+ private static int getRandomStacksize(int size)
+ {
+ Random random = new Random();
+ int randomStacksize = random.nextInt(size);
+ return randomStacksize;
+ }
+
+ public ItemStack getRandomItem(Random rand)
+ {
+ float randNum = rand.nextFloat() * this.total;
+
+ for (Choice c : this.choices)
+ {
+ randNum -= c.getWeight();
+
+ if (randNum < 0.0F)
+ {
+ return c.getStack();
+ }
+ }
+
+ return null;
+ }
+
+ public static class Choice
+ {
+ private ItemStack stack;
+ private float weight;
+
+ public Choice(ItemStack stack, float weight)
+ {
+ this.stack = stack;
+ this.weight = weight;
+ }
+
+ public ItemStack getStack()
+ {
+ return this.stack;
+ }
+
+ public float getWeight()
+ {
+ return this.weight;
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.AetherLoot
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/AetherLore.java b/src/main/java/net/aetherteam/aether/AetherLore.java
new file mode 100644
index 0000000..100f9fc
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/AetherLore.java
@@ -0,0 +1,61 @@
+package net.aetherteam.aether;
+
+import net.minecraft.block.Block;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+
+public class AetherLore
+{
+ public ItemStack stack;
+ public String name;
+ public String line1;
+ public String line2;
+ public String line3;
+ public String line4;
+ public String line5;
+ public String line6;
+ public int type;
+
+ public AetherLore(ItemStack item, String s, String s1, String s2, String s3, String s4, String s5, String s6, int i)
+ {
+ this.stack = item;
+ this.name = s;
+ this.line1 = s1;
+ this.line2 = s2;
+ this.line3 = s3;
+ this.line4 = s4;
+ this.line5 = s5;
+ this.line6 = s6;
+ this.type = i;
+ }
+
+ public AetherLore(int id, String s, String s1, String s2, String s3, String s4, String s5, String s6, int i)
+ {
+ this(new ItemStack(id, 1, -1), s, s1, s2, s3, s4, s5, s6, i);
+ }
+
+ public AetherLore(Block block, String s, String s1, String s2, String s3, String s4, String s5, String s6, int i)
+ {
+ this(new ItemStack(block, 1, -1), s, s1, s2, s3, s4, s5, s6, i);
+ }
+
+ public AetherLore(Item item, String s, String s1, String s2, String s3, String s4, String s5, String s6, int i)
+ {
+ this(new ItemStack(item, 1, -1), s, s1, s2, s3, s4, s5, s6, i);
+ }
+
+ public boolean equals(Object other)
+ {
+ if (other == null) return this.stack == null;
+ if ((other instanceof AetherLore))
+ return (((AetherLore) other).stack.itemID == this.stack.itemID) && ((((AetherLore) other).stack.getItemDamage() == this.stack.getItemDamage()) || (this.stack.getItemDamage() == -1));
+ if ((other instanceof ItemStack))
+ return (((ItemStack) other).itemID == this.stack.itemID) && ((((ItemStack) other).getItemDamage() == this.stack.getItemDamage()) || (this.stack.getItemDamage() == -1));
+ return false;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.AetherLore
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/AetherMoaColour.java b/src/main/java/net/aetherteam/aether/AetherMoaColour.java
new file mode 100644
index 0000000..a8fc8c1
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/AetherMoaColour.java
@@ -0,0 +1,109 @@
+package net.aetherteam.aether;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.donator.Donator;
+import net.aetherteam.aether.donator.DonatorChoice;
+import net.aetherteam.aether.donator.DonatorTexture;
+import net.aetherteam.aether.donator.EnumChoiceType;
+import net.aetherteam.aether.donator.SyncDonatorList;
+import net.aetherteam.aether.donator.choices.MoaChoice;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.potion.Potion;
+
+public class AetherMoaColour
+{
+ public int ID;
+ public int colour;
+ public int jumps;
+ public int chance;
+ public String name;
+ public static List names = new ArrayList();
+ private static int totalChance;
+ public static List colours = new ArrayList();
+ private static Random random = new Random();
+
+ public AetherMoaColour(int i, int j, int k, int l, String s)
+ {
+ this.ID = i;
+ this.colour = j;
+ this.jumps = k;
+ this.chance = l;
+ totalChance += l;
+ this.name = s;
+ colours.add(this);
+ names.add(this.name);
+ }
+
+ public String getTexture(boolean saddled)
+ {
+ return "/net/aetherteam/aether/client/sprites/moa/" + (saddled ? "saddle_" : "moa_") + this.name + ".png";
+ }
+
+ public String getTexture(boolean saddled, EntityPlayer player)
+ {
+ if ((Aether.syncDonatorList.isDonator(player.username)) && (saddled))
+ {
+ Aether.getInstance();
+ Donator donator = Aether.syncDonatorList.getDonator(player.username);
+ boolean hasChoice = donator.containsChoiceType(EnumChoiceType.MOA);
+ DonatorChoice choice = null;
+
+ if (hasChoice)
+ {
+ choice = (MoaChoice) donator.getChoiceFromType(EnumChoiceType.MOA);
+
+ return choice.textureFile.localURL;
+ }
+ }
+
+ return "/net/aetherteam/aether/client/sprites/moa/" + ((saddled) && (!player.isPotionActive(Potion.invisibility)) ? "saddle_" : "moa_") + this.name + ".png";
+ }
+
+ public static AetherMoaColour pickRandomMoa()
+ {
+ int i = random.nextInt(totalChance);
+ for (int j = 0; j < colours.size(); j++)
+ {
+ if (i < ((AetherMoaColour) colours.get(j)).chance)
+ {
+ return (AetherMoaColour) colours.get(j);
+ }
+ i -= ((AetherMoaColour) colours.get(j)).chance;
+ }
+ return (AetherMoaColour) colours.get(0);
+ }
+
+ public static AetherMoaColour getColour(int ID)
+ {
+ for (int i = 0; i < colours.size(); i++)
+ {
+ if (((AetherMoaColour) colours.get(i)).ID == ID)
+ {
+ return (AetherMoaColour) colours.get(i);
+ }
+ }
+ return (AetherMoaColour) colours.get(0);
+ }
+
+ public static String[] getNames()
+ {
+ String[] namesArray = new String[names.size()];
+ namesArray = (String[]) names.toArray(namesArray);
+ return namesArray;
+ }
+
+ static
+ {
+ new AetherMoaColour(0, 7829503, 3, 100, "Blue");
+ new AetherMoaColour(1, 16777215, 4, 20, "White");
+ new AetherMoaColour(2, 2236962, 8, 5, "Black");
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.AetherMoaColour
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/AetherNameGen.java b/src/main/java/net/aetherteam/aether/AetherNameGen.java
new file mode 100644
index 0000000..a22e4ea
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/AetherNameGen.java
@@ -0,0 +1,44 @@
+package net.aetherteam.aether;
+
+import java.util.Random;
+
+public class AetherNameGen
+{
+ public static String[] valkNamePrefix = {"Har", "Her", "Gon", "Sko", "Hil"};
+ public static String[] valkNameMiddix = {"fjo", "ska", "bri", "", ""};
+ public static String[] valkNameSuffix = {"tur", "pul", "dul", "gul", "or"};
+
+ public static String[] name1 = {"Del", "Ros", "Per", "Cyn", "Flar", "Ba", "Lab", "Az", "Ob", "Al", "Pas", "Nun", "Ur", "Ter", "Jar", "Est", "Car", "Houl", "In", "Kop", "Shot", "Vast", "Ael", "Skal", "Geld", "Er", "Sald", "Sar", "Binthe", "Haur", "Syn", "Kren", "Verd", "Pav", "Mart", "Yal", "Kor", "Lar", "Mel", "Claune", "For", "Rusk", "Pan", "Dir", "Chies", "Kil", "Odas", "Toc", "Plag", "Uld", "Yar", "Win", "Ry", "Harg", "Ty", "Druc", "Vald", "Keld", "Ar", "Das", "Klab", "Wearn", "Pes", "Art", "Na", "Harab", "Cal", "Ha", "Nev", "Wy", "Las", "Jes", "Kir", "Oc", "Brow", "Nist", "Var", "Lor", "Naut", "Hab", "Ard", "Vard", "Nor", "Tes", "Rol", "Ge", "Daf", "Tral", "Scaun", "Kol", "Star", "Ald", "Nap", "Loc", "Cor", "Chy", "Hy", "Har", "Char", "Bay", "Rald", "Yas", "Grave", "Dras", "Sep", "Shy", "Eth", "El", "Crac", "Hob", "Zol", "Bel", "Bar", "Zald", "Hal", "Ryle", "Obr", "Dain", "Jast", "Mold", "Bae", "As", "Ki", "Val", "Par", "Ash", "Ost", "Haith", "I", "Ca", "Vad", "Ro", "Dez", "Kuv", "Vab", "Dar", "Ral", "Mar", "Quarne", "Pulg", "Hor", "Ka", "Quer", "And", "Ny", "Ym", "Wal", "Tarl", "Vart"};
+
+ public static String[] name2 = {"cath", "yd", "rik", "nal", "y", "ro", "stead", "carn", "tak", "chean", "ain", "ak", "loc", "ras", "ien", "cuth", "alen", "is", "carad", "acy", "la", "asc", "arn", "ayn", "sene", "art", "lyn", "cam", "mel", "ly", "eas", "il", "oller", "bin", "a", "astar", "tuny", "iera", "aldy", "ene", "in", "yne", "id", "aur", "era", "fyn", "om", "sume", "ir", "que", "warty", "tan", "warne", "tar", "lene", "ron", "valer", "war", "ant", "iam", "ew", "am", "ime", "varn", "orn", "quent", "geth", "aver", "car", "lin", "luth", "as", "gant", "gine", "carth", "ayne", "asty", "arik", "lir", "on", "codd", "az", "tyne", "wat", "erry", "aryne", "ert", "quin", "rath", "ame", "tin", "ter", "quine", "arth", "arne", "eth", "zane", "gar", "an", "yn", "gayn", "ax", "ast", "azer", "ont", "or", "ian", "gur", "et", "er", "im", "dar", "end", "doth", "en", "aller", "reth", "juin", "arny", "un", "len", "ere", "ane", "aryn", "dy", "gary", "arry", "arty", "ydd", "ris", "ar", "ance", "hen", "el", "air"};
+
+ public static String[] name3 = {"cath", "carth", "ayne", "yd", "arik", "asty", "rik", "lir", "dor", "nal", "on", "codd", "y", "ber", "ro", "stead", "ta", "tyne", "wat", "carn", "erry", "chean", "ain", "aryne", "al", "ak", "ert", "ras", "ien", "alen", "is", "acy", "la", "ame", "ter", "arn", "quine", "ayn", "sene", "art", "arth", "lyn", "mel", "arne", "ern", "eth", "ly", "zane", "se", "gar", "eas", "ty", "an", "il", "yn", "oller", "gayn", "a", "bin", "iel", "azer", "astar", "tuny", "ont", "iera", "aldy", "ene", "ian", "or", "in", "sa", "yne", "era", "er", "fyn", "im", "dar", "sume", "doth", "en", "aller", "ir", "reth", "que", "arny", "ney", "warty", "un", "juin", "nik", "warne", "ere", "yr", "lene", "ane", "valer", "war", "ant", "iam", "ew", "dy", "aryn", "gary", "ime", "varn", "orn", "tha", "arty", "quent", "arry", "aver", "geth", "car", "lin", "ydd", "ris", "nyd", "ance", "luth", "ar", "dal", "gant", "el", "tyn", "air", "gine"};
+
+ public static String gen()
+ {
+ Random rand = new Random();
+ String name = name1[rand.nextInt(name1.length)];
+
+ int middle = 2 + rand.nextInt(2);
+ for (int i = 0; i < middle; i++)
+ {
+ name = name + name2[rand.nextInt(name2.length)];
+ }
+ return name + name3[rand.nextInt(name3.length)];
+ }
+
+ public static String valkGen()
+ {
+ Random rand = new Random();
+ String result = "";
+ result = result + valkNamePrefix[rand.nextInt(valkNamePrefix.length)];
+ result = result + valkNameMiddix[rand.nextInt(valkNameMiddix.length)];
+ result = result + valkNameSuffix[rand.nextInt(valkNameSuffix.length)];
+ return result;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.AetherNameGen
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/AetherPlayerTracker.java b/src/main/java/net/aetherteam/aether/AetherPlayerTracker.java
new file mode 100644
index 0000000..66cf4a8
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/AetherPlayerTracker.java
@@ -0,0 +1,228 @@
+package net.aetherteam.aether;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.IPlayerTracker;
+import cpw.mods.fml.common.network.PacketDispatcher;
+
+import java.util.*;
+import java.util.Map.Entry;
+
+import net.aetherteam.aether.containers.InventoryAether;
+import net.aetherteam.aether.data.PlayerClientInfo;
+import net.aetherteam.aether.donator.Donator;
+import net.aetherteam.aether.donator.DonatorChoice;
+import net.aetherteam.aether.donator.EnumChoiceType;
+import net.aetherteam.aether.donator.SyncDonatorList;
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.packets.AetherPacketHandler;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.nbt.NBTTagList;
+import net.minecraft.network.NetServerHandler;
+import net.minecraft.server.MinecraftServer;
+import net.minecraft.server.management.ServerConfigurationManager;
+import net.minecraft.util.FoodStats;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class AetherPlayerTracker implements IPlayerTracker
+{
+ private EntityPlayerMP entityPlayer;
+ private NBTTagList taglist;
+ private Set username;
+ private String cooldownName;
+ private int maxHealth;
+ private int cooldown;
+ private int cooldownMax;
+ private int coinAmount;
+
+ public void onPlayerLogin(EntityPlayer player)
+ {
+ MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
+ ServerConfigurationManager configManager = server.getConfigurationManager();
+
+ if (configManager.playerEntityList.size() == 1)
+ {
+ Aether.proxy.getClientInventories().clear();
+ Aether.proxy.getClientExtraHearts().clear();
+ Aether.proxy.getClientCooldown().clear();
+ Aether.proxy.getClientMaxCooldown().clear();
+ Aether.proxy.getPlayerClientInfo().clear();
+ }
+
+ PacketDispatcher.sendPacketToAllPlayers(AetherPacketHandler.sendAccessoryChange(Aether.getServerPlayer((EntityPlayerMP) player).inv.writeToNBT(new NBTTagList()), false, true, Collections.singleton(player.username), (byte) 1));
+ PacketDispatcher.sendPacketToAllPlayers(AetherPacketHandler.sendHeartChange(false, true, Aether.getServerPlayer(player).maxHealth, Collections.singleton(player.username)));
+
+ for (int playerAmount = 0; playerAmount < configManager.playerEntityList.size(); playerAmount++)
+ {
+ this.entityPlayer = ((EntityPlayerMP) configManager.playerEntityList.get(playerAmount));
+
+ this.taglist = Aether.getServerPlayer(this.entityPlayer).inv.writeToNBT(new NBTTagList());
+ this.maxHealth = Aether.getServerPlayer(this.entityPlayer).maxHealth;
+ this.username = Collections.singleton(this.entityPlayer.username);
+ this.cooldown = Aether.getServerPlayer(this.entityPlayer).generalcooldown;
+ this.cooldownMax = Aether.getServerPlayer(this.entityPlayer).generalcooldownmax;
+ this.cooldownName = Aether.getServerPlayer(this.entityPlayer).cooldownName;
+ this.coinAmount = Aether.getServerPlayer(this.entityPlayer).getCoins();
+
+ ((EntityPlayerMP) player).playerNetServerHandler.sendPacketToPlayer(AetherPacketHandler.sendAccessoryChange(this.taglist, false, true, this.username, (byte) 1));
+ ((EntityPlayerMP) player).playerNetServerHandler.sendPacketToPlayer(AetherPacketHandler.sendHeartChange(false, true, this.maxHealth, this.username));
+
+ String RSA = Aether.getInstance().getKey(this.entityPlayer.username);
+
+ if (RSA != null)
+ {
+ ((EntityPlayerMP) player).playerNetServerHandler.sendPacketToPlayer(AetherPacketHandler.sendDonatorChange(this.entityPlayer.username, new Donator(this.entityPlayer.username, RSA)));
+ }
+
+ if (Aether.syncDonatorList.getDonator(this.entityPlayer.username) != null)
+ {
+ HashMap choiceList = Aether.syncDonatorList.getDonator(this.entityPlayer.username).choices;
+
+ if (choiceList != null)
+ {
+ if (choiceList.get(EnumChoiceType.CAPE) != null)
+ {
+ ((EntityPlayerMP) player).playerNetServerHandler.sendPacketToPlayer(AetherPacketHandler.sendDonatorChoice(this.entityPlayer.username, (DonatorChoice) choiceList.get(EnumChoiceType.CAPE), true, (byte) 1));
+ }
+ if (choiceList.get(EnumChoiceType.MOA) != null)
+ {
+ ((EntityPlayerMP) player).playerNetServerHandler.sendPacketToPlayer(AetherPacketHandler.sendDonatorChoice(this.entityPlayer.username, (DonatorChoice) choiceList.get(EnumChoiceType.MOA), true, (byte) 1));
+ }
+ }
+ }
+ }
+ ((EntityPlayerMP) player).playerNetServerHandler.sendPacketToPlayer(AetherPacketHandler.sendCooldown(false, true, this.cooldown, this.cooldownMax, this.cooldownName, Collections.singleton(player.username)));
+ ((EntityPlayerMP) player).playerNetServerHandler.sendPacketToPlayer(AetherPacketHandler.sendCoinChange(false, true, this.coinAmount, Collections.singleton(player.username)));
+
+ ((EntityPlayerMP) player).playerNetServerHandler.sendPacketToPlayer(AetherPacketHandler.sendAllParties(PartyController.instance().getParties()));
+
+ String RSA = Aether.getInstance().getKey(player.username);
+
+ if (RSA != null)
+ {
+ Aether.getInstance();
+ Aether.syncDonatorList.sendDonatorToAll(player.username, new Donator(player.username, RSA));
+ }
+
+ if (Aether.syncDonatorList.getDonator(this.entityPlayer.username) != null)
+ {
+ HashMap choiceList = Aether.syncDonatorList.getDonator(this.entityPlayer.username).choices;
+
+ if (choiceList != null)
+ {
+ if (choiceList.get(EnumChoiceType.CAPE) != null)
+ {
+ Aether.getInstance();
+ Aether.syncDonatorList.sendChoiceToAll(this.entityPlayer.username, (DonatorChoice) choiceList.get(EnumChoiceType.CAPE), true);
+ }
+ if (choiceList.get(EnumChoiceType.MOA) != null)
+ {
+ Aether.getInstance();
+ Aether.syncDonatorList.sendChoiceToAll(this.entityPlayer.username, (DonatorChoice) choiceList.get(EnumChoiceType.MOA), true);
+ }
+ }
+ }
+ Iterator it = Aether.proxy.getPlayerClientInfo().entrySet().iterator();
+
+ while (it.hasNext())
+ {
+ Map.Entry pairs = (Map.Entry) it.next();
+
+ String username = (String) pairs.getKey();
+ PlayerClientInfo playerClientInfo = (PlayerClientInfo) pairs.getValue();
+
+ ((EntityPlayerMP) player).playerNetServerHandler.sendPacketToPlayer(AetherPacketHandler.sendPlayerClientInfo(false, true, username, playerClientInfo));
+ }
+
+ updatePlayerClientInfo((EntityPlayerMP) player, true);
+
+ for (Dungeon dungeon : DungeonHandler.instance().getInstances())
+ {
+ ((EntityPlayerMP) player).playerNetServerHandler.sendPacketToPlayer(AetherPacketHandler.sendDungeonChange(true, dungeon));
+ }
+ }
+
+ public void updatePlayerClientInfo(EntityPlayerMP player, boolean adding)
+ {
+ if (!player.worldObj.isRemote)
+ {
+ MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
+ ServerConfigurationManager configManager = server.getConfigurationManager();
+
+ PlayerClientInfo playerClientInfo = new PlayerClientInfo(player.getHealth(), player.getMaxHealth(), player.getFoodStats().getFoodLevel(), player.getTotalArmorValue(), Aether.getServerPlayer(player).getCoins());
+
+ Aether.proxy.getPlayerClientInfo().put(player.username, playerClientInfo);
+
+ PartyMember member = PartyController.instance().getMember(player.username);
+ Party party = PartyController.instance().getParty(member);
+
+ for (int playerAmount = 0; playerAmount < configManager.playerEntityList.size(); playerAmount++)
+ {
+ EntityPlayerMP entityPlayer = (EntityPlayerMP) configManager.playerEntityList.get(playerAmount);
+
+ entityPlayer.playerNetServerHandler.sendPacketToPlayer(AetherPacketHandler.sendPlayerClientInfo(false, adding, player.username, playerClientInfo));
+ }
+
+ player.playerNetServerHandler.sendPacketToPlayer(AetherPacketHandler.sendPlayerClientInfo(false, adding, player.username, playerClientInfo));
+ }
+ }
+
+ public void onPlayerLogout(EntityPlayer player)
+ {
+ PartyMember member = PartyController.instance().getMember(player);
+
+ int x = MathHelper.floor_double(player.posX);
+ int y = MathHelper.floor_double(player.posY);
+ int z = MathHelper.floor_double(player.posZ);
+
+ MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
+ ServerConfigurationManager configManager = server.getConfigurationManager();
+
+ Party party = PartyController.instance().getParty(member);
+
+ if ((member != null) && (configManager.playerEntityList.size() > 1))
+ {
+ if (party != null)
+ {
+ Dungeon dungeon = DungeonHandler.instance().getDungeon(party);
+
+ PartyController.instance().leaveParty(party, member, false);
+
+ PacketDispatcher.sendPacketToAllPlayers(AetherPacketHandler.sendPartyMemberChange(false, party.getName(), member.username, ""));
+
+ if ((dungeon != null) && (!dungeon.hasStarted()))
+ {
+ DungeonHandler.instance().checkForQueue(dungeon);
+
+ PacketDispatcher.sendPacketToAllPlayers(AetherPacketHandler.sendDungeonQueueCheck(dungeon));
+ }
+ }
+ }
+
+ PacketDispatcher.sendPacketToAllPlayers(AetherPacketHandler.sendAccessoryChange(Aether.getServerPlayer((EntityPlayerMP) player).inv.writeToNBT(new NBTTagList()), false, false, Collections.singleton(player.username), (byte) 1));
+ PacketDispatcher.sendPacketToAllPlayers(AetherPacketHandler.sendHeartChange(false, false, Aether.getServerPlayer(player).maxHealth, Collections.singleton(player.username)));
+ PacketDispatcher.sendPacketToAllPlayers(AetherPacketHandler.sendCooldown(false, false, Aether.getServerPlayer(player).generalcooldown, Aether.getServerPlayer(player).generalcooldownmax, Aether.getServerPlayer(player).cooldownName, Collections.singleton(player.username)));
+ PacketDispatcher.sendPacketToAllPlayers(AetherPacketHandler.sendCoinChange(false, false, Aether.getServerPlayer(player).getCoins(), Collections.singleton(player.username)));
+
+ updatePlayerClientInfo((EntityPlayerMP) player, false);
+ }
+
+ public void onPlayerChangedDimension(EntityPlayer player)
+ {
+ }
+
+ public void onPlayerRespawn(EntityPlayer player)
+ {
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.AetherPlayerTracker
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/AetherPoison.java b/src/main/java/net/aetherteam/aether/AetherPoison.java
new file mode 100644
index 0000000..7a974a4
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/AetherPoison.java
@@ -0,0 +1,181 @@
+package net.aetherteam.aether;
+
+import java.util.Random;
+
+import net.aetherteam.aether.entities.EntityAechorPlant;
+import net.aetherteam.aether.entities.EntityCockatrice;
+import net.aetherteam.aether.entities.EntitySentry;
+import net.aetherteam.aether.entities.bosses.EntitySlider;
+import net.aetherteam.aether.oldcode.EntityFireMonster;
+import net.aetherteam.aether.oldcode.EntityFiroBall;
+import net.aetherteam.aether.oldcode.EntityHomeShot;
+import net.aetherteam.aether.oldcode.EntityMiniCloud;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.DamageSource;
+import net.minecraft.world.World;
+import org.lwjgl.opengl.GL11;
+
+public class AetherPoison
+{
+ public static long clock;
+ public static final float poisonRed = 1.0F;
+ public static final float poisonBlue = 1.0F;
+ public static final float poisonGreen = 0.0F;
+ public static final float cureRed = 0.0F;
+ public static final float cureBlue = 0.1F;
+ public static final float cureGreen = 1.0F;
+ public static int poisonTime;
+ public static final int poisonInterval = 50;
+ public static final int poisonDmg = 1;
+ public static final int poisonHurts = 10;
+ public static final int maxPoisonTime = 500;
+ public static double rotDFac = 0.7853981633974483D;
+ public static double rotD;
+ public static double rotTaper = 0.125D;
+ public static double motTaper = 0.2D;
+ public static double motD;
+ public static double motDFac = 0.1D;
+ private static int mod;
+
+ public static boolean canPoison(Entity entity)
+ {
+ if (((entity instanceof EntitySlider)) || ((entity instanceof EntitySentry)) || ((entity instanceof EntityMiniCloud)) || ((entity instanceof EntityFireMonster)) || ((entity instanceof EntityAechorPlant)) || ((entity instanceof EntityFiroBall)) || ((entity instanceof EntityCockatrice)) || ((entity instanceof EntityHomeShot)))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ public static void distractEntity(Entity entity)
+ {
+ double gauss = entity.worldObj.rand.nextGaussian();
+ double newMotD = motDFac * gauss;
+ motD = motTaper * newMotD + (1.0D - motTaper) * motD;
+ entity.motionX += motD;
+ entity.motionZ += motD;
+ double newRotD = rotDFac * gauss;
+ rotD = rotTaper * newRotD + (1.0D - rotTaper) * rotD;
+ entity.rotationYaw = ((float) (entity.rotationYaw + rotD));
+ entity.rotationPitch = ((float) (entity.rotationPitch + rotD));
+ }
+
+ public static void poisonTick(EntityPlayer player)
+ {
+ if ((player != null) && ((player.isDead) || (player.getHealth() <= 0)))
+ {
+ poisonTime = 0;
+ return;
+ }
+
+ if (poisonTime < 0)
+ {
+ poisonTime += 1;
+ return;
+ }
+
+ if (poisonTime == 0)
+ {
+ return;
+ }
+ long time = player.worldObj.getWorldTime();
+ mod = poisonTime % 50;
+
+ if (clock != time)
+ {
+ distractEntity(player);
+
+ if (!player.worldObj.isRemote)
+ {
+ if (mod == 0)
+ {
+ player.attackEntityFrom(DamageSource.generic, 1);
+ }
+ }
+
+ poisonTime -= 1;
+ clock = time;
+ }
+ }
+
+ public static boolean afflictPoison()
+ {
+ if (poisonTime < 0)
+ {
+ return false;
+ }
+ poisonTime = 500;
+ return true;
+ }
+
+ public static boolean curePoison(int i)
+ {
+ if (poisonTime == -500)
+ {
+ return false;
+ }
+ poisonTime = -500 - i;
+ return true;
+ }
+
+ public static float getPoisonAlpha(float f)
+ {
+ return f * f / 5.0F + 0.4F;
+ }
+
+ public static float getCureAlpha(float f)
+ {
+ return f * f / 10.0F + 0.4F;
+ }
+
+ public static void displayCureEffect()
+ {
+ if (poisonTime < 0)
+ {
+ flashColor("%blur%/net/aetherteam/aether/client/sprites/poison/curevignette.png", getCureAlpha(-mod / 100.0F), Aether.proxy.getClient());
+ }
+ }
+
+ public static void displayPoisonEffect()
+ {
+ if (poisonTime > 0)
+ {
+ flashColor("%blur%/net/aetherteam/aether/client/sprites/poison/poisonvignette.png", getPoisonAlpha(mod / 50.0F), Aether.proxy.getClient());
+ }
+ }
+
+ public static void flashColor(String file, float a, Minecraft mc)
+ {
+ ScaledResolution scaledresolution = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+ GL11.glEnable(3042);
+ GL11.glDisable(2929);
+ GL11.glDepthMask(false);
+ GL11.glBlendFunc(770, 771);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, a);
+ GL11.glDisable(3008);
+ GL11.glBindTexture(3553, mc.renderEngine.getTexture(file));
+ Tessellator tessellator = Tessellator.instance;
+ tessellator.startDrawingQuads();
+ tessellator.addVertexWithUV(0.0D, height, -90.0D, 0.0D, 1.0D);
+ tessellator.addVertexWithUV(width, height, -90.0D, 1.0D, 1.0D);
+ tessellator.addVertexWithUV(width, 0.0D, -90.0D, 1.0D, 0.0D);
+ tessellator.addVertexWithUV(0.0D, 0.0D, -90.0D, 0.0D, 0.0D);
+ tessellator.draw();
+ GL11.glDepthMask(true);
+ GL11.glEnable(2929);
+ GL11.glEnable(3008);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, a);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.AetherPoison
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/AetherRanks.java b/src/main/java/net/aetherteam/aether/AetherRanks.java
new file mode 100644
index 0000000..db05f6e
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/AetherRanks.java
@@ -0,0 +1,53 @@
+package net.aetherteam.aether;
+
+import java.util.ArrayList;
+
+public enum AetherRanks
+{
+ DEVELOPER("Aether II Developer", Aether.developers, 2342342), HELPER("Aether II Helper", Aether.helper, 2344), DEFAULT("", new ArrayList(), 0);
+
+ private ArrayList members = new ArrayList();
+
+ public static void addAllRanks()
+ {
+ Aether.developers.add("ijaryt23");
+ Aether.developers.add("hemile");
+ Aether.developers.add("dark3304");
+ Aether.developers.add("kingbdogz");
+ Aether.developers.add("mike4560");
+ Aether.developers.add("libertyprimetf2");
+ Aether.developers.add("ozzar0th");
+ Aether.helper.add("ijevin");
+ Aether.helper.add("mr360games");
+ Aether.helper.add("clashjtm");
+ Aether.helper.add("chimneyswift");
+ }
+
+ private AetherRanks(String description, ArrayList members, int descriptionColor)
+ {
+ this.members = members;
+ }
+
+ public static AetherRanks getRankFromMember(String member)
+ {
+ for (int i = 0; i < values().length; i++)
+ {
+ if (values()[i].getMembers().contains(member.toLowerCase()))
+ {
+ return values()[i];
+ }
+ }
+
+ return DEFAULT;
+ }
+
+ public ArrayList getMembers()
+ {
+ return this.members;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.AetherRanks
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/AetherSoundLoader.java b/src/main/java/net/aetherteam/aether/AetherSoundLoader.java
new file mode 100644
index 0000000..316611e
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/AetherSoundLoader.java
@@ -0,0 +1,102 @@
+package net.aetherteam.aether;
+
+import java.io.FileNotFoundException;
+import java.io.PrintStream;
+import java.net.URL;
+
+import net.minecraft.client.audio.SoundManager;
+import net.minecraft.client.audio.SoundPool;
+import net.minecraftforge.client.event.sound.SoundLoadEvent;
+import net.minecraftforge.event.ForgeSubscribe;
+
+public class AetherSoundLoader
+{
+ @ForgeSubscribe
+ public void onSound(SoundLoadEvent event)
+ {
+ registerStreaming(event.manager, "streaming/Aether Tune.ogg", "/resources/streaming/Aether Tune.ogg");
+ registerStreaming(event.manager, "streaming/Ascending Dawn.ogg", "/resources/streaming/Ascending Dawn.ogg");
+
+ registerStreaming(event.manager, "streaming/Slider Battle.ogg", "/resources/streaming/Slider Battle.ogg");
+ registerStreaming(event.manager, "streaming/Slider Finish.ogg", "/resources/streaming/Slider Finish.ogg");
+
+ registerSound(event.manager, "streaming/Aether Tune.ogg", "/resources/streaming/Aether Tune.ogg");
+ registerSound(event.manager, "aeboss/slider/awake.ogg", "/resources/newsound/aeboss/slider/awake.ogg");
+ registerSound(event.manager, "aeboss/slider/collide.ogg", "/resources/newsound/aeboss/slider/collide.ogg");
+ registerSound(event.manager, "aeboss/slider/die.ogg", "/resources/newsound/aeboss/slider/die.ogg");
+ registerSound(event.manager, "aeboss/slider/move.ogg", "/resources/newsound/aeboss/slider/move.ogg");
+ registerSound(event.manager, "aeboss/slider/unlock.ogg", "/resources/newsound/aeboss/slider/unlock.ogg");
+
+ registerSound(event.manager, "aemob/aerbunny/die.ogg", "/resources/newsound/aemob/aerbunny/die.ogg");
+ registerSound(event.manager, "aemob/aerbunny/hurt1.ogg", "/resources/newsound/aemob/aerbunny/hurt1.ogg");
+ registerSound(event.manager, "aemob/aerbunny/hurt2.ogg", "/resources/newsound/aemob/aerbunny/hurt2.ogg");
+ registerSound(event.manager, "aemob/aerbunny/land.ogg", "/resources/newsound/aemob/aerbunny/land.ogg");
+ registerSound(event.manager, "aemob/aerbunny/lift.ogg", "/resources/newsound/aemob/aerbunny/lift.ogg");
+
+ registerSound(event.manager, "aemob/aerwhale/say.wav", "/resources/newsound/aemob/aerwhale/say.wav");
+ registerSound(event.manager, "aemob/aerwhale/die.wav", "/resources/newsound/aemob/aerwhale/die.wav");
+
+ registerSound(event.manager, "aemob/moa/say.wav", "/resources/newsound/aemob/moa/say.wav");
+
+ registerSound(event.manager, "aemob/zephyr/say1.wav", "/resources/newsound/aemob/zephyr/say1.wav");
+ registerSound(event.manager, "aemob/zephyr/say2.wav", "/resources/newsound/aemob/zephyr/say2.wav");
+ registerSound(event.manager, "aemob/zephyr/shoot.ogg", "/resources/newsound/aemob/zephyr/shoot.ogg");
+
+ registerSound(event.manager, "aemisc/achieveGen.ogg", "/resources/newsound/aemisc/achieveGen.ogg");
+ registerSound(event.manager, "aemisc/achieveBronze.ogg", "/resources/newsound/aemisc/achieveBronze.ogg");
+ registerSound(event.manager, "aemisc/achieveSilver.ogg", "/resources/newsound/aemisc/achieveSilver.ogg");
+ registerSound(event.manager, "aemisc/achieveBronzeNew.ogg", "/resources/newsound/aemisc/achieveBronzeNew.ogg");
+
+ registerSound(event.manager, "aemisc/activateTrap.ogg", "/resources/newsound/aemisc/activateTrap.ogg");
+
+ registerSound(event.manager, "aemisc/shootDart.ogg", "/resources/newsound/aemisc/shootDart.ogg");
+
+ registerSound(event.manager, "aemob/sentryGolem/seenEnemy.ogg", "/resources/newsound/aemob/sentryGolem/seenEnemy.ogg");
+ registerSound(event.manager, "aemob/sentryGolem/creepySeen.wav", "/resources/newsound/aemob/sentryGolem/creepySeen.wav");
+ registerSound(event.manager, "aemob/sentryGolem/say1.wav", "/resources/newsound/aemob/sentryGolem/say1.wav");
+ registerSound(event.manager, "aemob/sentryGolem/say2.wav", "/resources/newsound/aemob/sentryGolem/say2.wav");
+ registerSound(event.manager, "aemob/sentryGolem/death.wav", "/resources/newsound/aemob/sentryGolem/death.wav");
+ registerSound(event.manager, "aemob/sentryGolem/hit1.wav", "/resources/newsound/aemob/sentryGolem/hit1.wav");
+ registerSound(event.manager, "aemob/sentryGolem/hit2.wav", "/resources/newsound/aemob/sentryGolem/hit2.wav");
+
+ registerSound(event.manager, "aemob/hosteye/movement.ogg", "/resources/newsound/aemob/hosteye/movement.ogg");
+
+ registerSound(event.manager, "aemob/sentryGuardian/death.ogg", "/resources/newsound/aemob/sentryGuardian/death.ogg");
+ registerSound(event.manager, "aemob/sentryGuardian/hit.ogg", "/resources/newsound/aemob/sentryGuardian/hit.ogg");
+ registerSound(event.manager, "aemob/sentryGuardian/spawn.ogg", "/resources/newsound/aemob/sentryGuardian/spawn.ogg");
+ registerSound(event.manager, "aemob/sentryGuardian/living.ogg", "/resources/newsound/aemob/sentryGuardian/living.ogg");
+
+ registerSound(event.manager, "aemisc/coin.ogg", "/resources/newsound/aemisc/coin.ogg");
+
+ registerSound(event.manager, "aemob/cog/wall.wav", "/resources/newsound/aemob/cog/wall.wav");
+ registerSound(event.manager, "aemob/cog/wall1.wav", "/resources/newsound/aemob/cog/wall1.wav");
+ registerSound(event.manager, "aemob/cog/wall2.wav", "/resources/newsound/aemob/cog/wall2.wav");
+ registerSound(event.manager, "aemob/cog/wallFinal.ogg", "/resources/newsound/aemob/cog/wallFinal.ogg");
+
+ registerSound(event.manager, "aeportal/aeportal.wav", "/resources/newsound/aeportal/aeportal.wav");
+ registerSound(event.manager, "aeportal/aetravel.wav", "/resources/newsound/aeportal/aetravel.wav");
+ registerSound(event.manager, "aeportal/aetrigger.wav", "/resources/newsound/aeportal/aetrigger.wav");
+ }
+
+ private void registerSound(SoundManager manager, String name, String path)
+ {
+ try
+ {
+ URL filePath = AetherSoundLoader.class.getResource(path);
+ if (filePath != null) manager.soundPoolSounds.addSound(name, filePath);
+ else throw new FileNotFoundException();
+ } catch (Exception ex)
+ {
+ System.out.println(String.format("Warning: unable to load sound file %s", new Object[]{path}));
+ }
+ }
+
+ private void registerStreaming(SoundManager manager, String name, String path)
+ {
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.AetherSoundLoader
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/AetherTUGButton.java b/src/main/java/net/aetherteam/aether/AetherTUGButton.java
new file mode 100644
index 0000000..0f83551
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/AetherTUGButton.java
@@ -0,0 +1,78 @@
+package net.aetherteam.aether;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.renderer.RenderEngine;
+import org.lwjgl.opengl.GL11;
+
+public class AetherTUGButton extends GuiButton
+{
+ public AetherTUGButton(int par1, int par2, int par3, int par4, int par5)
+ {
+ super(par1, par2, par3, par4, par5, "");
+ }
+
+ public void drawButton(Minecraft par1Minecraft, int mouseX, int mouseY)
+ {
+ if (this.drawButton)
+ {
+ FontRenderer fontrenderer = par1Minecraft.fontRenderer;
+
+ GL11.glPushMatrix();
+
+ GL11.glEnable(3042);
+ GL11.glBlendFunc(770, 771);
+
+ Minecraft mc = Minecraft.getMinecraft();
+ ScaledResolution scaledresolution = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+
+ boolean flag = (mouseX >= this.xPosition) && (mouseY >= this.yPosition) && (mouseX < this.xPosition + this.width) && (mouseY < this.yPosition + this.height);
+ float R = 1.0F;
+ float G = 1.0F;
+ float B = 1.0F;
+ float scaling = 0.35F;
+
+ if (flag)
+ {
+ R = 1.0F;
+ G = 1.0F;
+ B = 0.65F;
+ scaling = 0.36F;
+ }
+
+ GL11.glColor4f(R, G, B, 1.0F);
+ GL11.glTranslatef(width - 55 - 195.0F * scaling / 2.0F, 40.0F, 1.0F);
+ GL11.glScalef(scaling, scaling, scaling);
+ par1Minecraft.renderEngine.bindTexture("/net/aetherteam/aether/client/sprites/menu/tug.png");
+ drawTexturedModalRect(0, 0, 0, 0, 195, 184);
+
+ GL11.glDisable(3042);
+
+ GL11.glPopMatrix();
+
+ this.field_82253_i = ((mouseX >= this.xPosition) && (mouseY >= this.yPosition) && (mouseX < this.xPosition + this.width) && (mouseY < this.yPosition + this.height));
+ int k = getHoverState(this.field_82253_i);
+ mouseDragged(par1Minecraft, mouseX, mouseY);
+ int l = 14737632;
+
+ if (!this.enabled)
+ {
+ l = -6250336;
+ } else if (this.field_82253_i)
+ {
+ l = 16777120;
+ }
+
+ drawCenteredString(fontrenderer, this.displayString, this.xPosition + this.width / 2, this.yPosition + (this.height - 8) / 2, l);
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.AetherTUGButton
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/CommonProxy.java b/src/main/java/net/aetherteam/aether/CommonProxy.java
new file mode 100644
index 0000000..2e2994a
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/CommonProxy.java
@@ -0,0 +1,182 @@
+package net.aetherteam.aether;
+
+import java.util.HashMap;
+import java.util.Random;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.particle.EffectRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.item.EnumArmorMaterial;
+import net.minecraft.src.ServerPlayerAPI;
+import net.minecraft.world.World;
+import net.minecraftforge.common.EnumHelper;
+
+public class CommonProxy
+{
+ private HashMap playerInventories = new HashMap();
+ private HashMap playerExtraHearts = new HashMap();
+ private HashMap playerCooldowns = new HashMap();
+ private HashMap playerMaxCooldowns = new HashMap();
+ private HashMap playerCooldownName = new HashMap();
+ private HashMap playerCoins = new HashMap();
+
+ private HashMap playerClientInfo = new HashMap();
+
+ public static EnumArmorMaterial OBSIDIAN = EnumHelper.addArmorMaterial("OBISIDAN", 33, new int[]{2, 6, 5, 2}, 8);
+
+ public AetherCommonPlayerHandler getPlayerHandler(EntityPlayer entity)
+ {
+ if ((entity instanceof EntityPlayerMP))
+ {
+ return ((PlayerBaseAetherServer) ((EntityPlayerMP) entity).getServerPlayerBase("Aether II")).getPlayerHandler();
+ }
+
+ return null;
+ }
+
+ public void registerPlayerAPI()
+ {
+ ServerPlayerAPI.register("Aether II", PlayerBaseAetherServer.class);
+ }
+
+ public void registerTickHandler()
+ {
+ }
+
+ public void displayMessage(EntityPlayer player, String message)
+ {
+ player.addChatMessage(message);
+ }
+
+ public HashMap getClientInventories()
+ {
+ return this.playerInventories;
+ }
+
+ public HashMap getClientExtraHearts()
+ {
+ return this.playerExtraHearts;
+ }
+
+ public HashMap getClientCooldown()
+ {
+ return this.playerCooldowns;
+ }
+
+ public HashMap getClientMaxCooldown()
+ {
+ return this.playerCooldownName;
+ }
+
+ public HashMap getClientCooldownName()
+ {
+ return this.playerMaxCooldowns;
+ }
+
+ public HashMap getClientCoins()
+ {
+ return this.playerCoins;
+ }
+
+ public HashMap getPlayerClientInfo()
+ {
+ return this.playerClientInfo;
+ }
+
+ public Minecraft getClient()
+ {
+ return null;
+ }
+
+ public World getClientWorld()
+ {
+ return null;
+ }
+
+ public EntityPlayer getClientPlayer()
+ {
+ return null;
+ }
+
+ public EffectRenderer getEffectRenderer()
+ {
+ return null;
+ }
+
+ public int addArmor(String type)
+ {
+ return 0;
+ }
+
+ public void registerKeyBindings()
+ {
+ }
+
+ public void registerRenderers()
+ {
+ }
+
+ public void registerMainMenu()
+ {
+ }
+
+ public void spawnSwettyParticles(World world, int x, int y, int z)
+ {
+ }
+
+ public void spawnAltarParticles(World world, int x, int y, int z, Random rand)
+ {
+ }
+
+ public void spawnCloudSmoke(World world, double x, double y, double z, Random rand, Double radius)
+ {
+ }
+
+ public void spawnDonatorMoaParticles(Entity rider, Random rand)
+ {
+ }
+
+ public void spawnPortalParticles(World world, int x, int y, int z, Random random, int blockID)
+ {
+ }
+
+ public void spawnRainParticles(World world, int x, int y, int z, Random random, int amount)
+ {
+ }
+
+ public void loadSounds()
+ {
+ }
+
+ public void registerSounds()
+ {
+ }
+
+ public void registerRenderPAPI()
+ {
+ }
+
+ public void renderGameOverlay(float zLevel, boolean flag, int x, int y)
+ {
+ }
+
+ public void playSoundFX(String path, float volume, float pitch)
+ {
+ }
+
+ public void openDungeonQueue()
+ {
+ }
+
+ static
+ {
+ new EnumHelper();
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.CommonProxy
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/CoreHooks.java b/src/main/java/net/aetherteam/aether/CoreHooks.java
new file mode 100644
index 0000000..bead042
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/CoreHooks.java
@@ -0,0 +1,14 @@
+package net.aetherteam.aether;
+
+public final class CoreHooks
+{
+ public static void renderGameOverlay(float f, boolean b, int i, int j)
+ {
+ Aether.proxy.renderGameOverlay(f, b, i, j);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.CoreHooks
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/FrostDamageSource.java b/src/main/java/net/aetherteam/aether/FrostDamageSource.java
new file mode 100644
index 0000000..5346605
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/FrostDamageSource.java
@@ -0,0 +1,32 @@
+package net.aetherteam.aether;
+
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.util.DamageSource;
+
+public class FrostDamageSource extends DamageSource
+{
+ protected FrostDamageSource()
+ {
+ super("Frost bite");
+ }
+
+ public String getDeathMessage(EntityLiving par1EntityLiving)
+ {
+ return par1EntityLiving.getEntityName() + " was frost bitten";
+ }
+
+ public boolean isUnblockable()
+ {
+ return true;
+ }
+
+ public boolean isFireDamage()
+ {
+ return true;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.FrostDamageSource
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/MenuBaseAetherII.java b/src/main/java/net/aetherteam/aether/MenuBaseAetherII.java
new file mode 100644
index 0000000..215fb51
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/MenuBaseAetherII.java
@@ -0,0 +1,861 @@
+package net.aetherteam.aether;
+
+import com.google.common.base.Strings;
+import com.google.common.collect.Lists;
+import cpw.mods.fml.client.GuiModList;
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.awt.Desktop;
+import java.awt.image.BufferedImage;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.URI;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.client.gui.menu.GuiAetherIIButton;
+import net.aetherteam.mainmenu_api.MenuBase;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiButtonLanguage;
+import net.minecraft.client.gui.GuiConfirmOpenLink;
+import net.minecraft.client.gui.GuiLanguage;
+import net.minecraft.client.gui.GuiMultiplayer;
+import net.minecraft.client.gui.GuiOptions;
+import net.minecraft.client.gui.GuiScreenOnlineServers;
+import net.minecraft.client.gui.GuiSelectWorld;
+import net.minecraft.client.gui.GuiYesNo;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.multiplayer.GuiConnecting;
+import net.minecraft.client.multiplayer.ServerData;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.StringTranslate;
+import net.minecraft.world.demo.DemoWorldServer;
+import net.minecraft.world.storage.ISaveFormat;
+import net.minecraft.world.storage.WorldInfo;
+import org.lwjgl.opengl.GL11;
+import org.lwjgl.util.glu.GLU;
+
+@SideOnly(Side.CLIENT)
+public class MenuBaseAetherII extends MenuBase
+{
+ private static final Random rand = new Random();
+ private static AetherTUGButton TUGbutton;
+ private float updateCounter = 0.0F;
+ private String splashText = "missingno";
+ private GuiAetherIIButton buttonResetDemo;
+ private GuiButton selectedButton = null;
+ private int panoramaTimer = 0;
+ private float scalingLol = 0.975F;
+ private int viewportTexture;
+ private boolean field_96141_q = true;
+ private static boolean field_96140_r = false;
+ private static boolean field_96139_s = false;
+ private String field_92025_p;
+ private static final String[] titlePanoramaPaths = new String[]{"/net/aetherteam/aether/client/sprites/menu/bg/panorama0.png", "/net/aetherteam/aether/client/sprites/menu/bg/panorama1.png", "/net/aetherteam/aether/client/sprites/menu/bg/panorama2.png", "/net/aetherteam/aether/client/sprites/menu/bg/panorama3.png", "/net/aetherteam/aether/client/sprites/menu/bg/panorama4.png", "/net/aetherteam/aether/client/sprites/menu/bg/panorama5.png"};
+ public static final String field_96138_a = "Please click " + EnumChatFormatting.UNDERLINE + "here" + EnumChatFormatting.RESET + " for more information.";
+ private int field_92024_r;
+ private int field_92023_s;
+ private int field_92022_t;
+ private int field_92021_u;
+ private int field_92020_v;
+ private int field_92019_w;
+ private GuiAetherIIButton fmlModButton = null;
+ private GuiAetherIIButton hideOptionsButton = null;
+ private GuiAetherIIButton optionsButton = null;
+ private GuiAetherIIButton quitButton = null;
+ private GuiButtonLanguage languageButton = null;
+ private GuiAetherIIButton singleplayerButton = null;
+ private GuiAetherIIButton multiplayerButton = null;
+ private GuiAetherIIButton officialServerButton = null;
+ private GuiAetherIIButton backButton = null;
+ private GuiButton exploreTUG = null;
+ private ArrayList serverdata = new ArrayList();
+ private ArrayList serverButtons = new ArrayList();
+ private boolean TUGopen = false;
+ private boolean SERVERlist = false;
+
+ public MenuBaseAetherII()
+ {
+ BufferedReader var1 = null;
+
+ try
+ {
+ ArrayList var2 = new ArrayList();
+ var1 = new BufferedReader(new InputStreamReader(MenuBaseAetherII.class.getResourceAsStream("/title/splashes.txt"), Charset.forName("UTF-8")));
+ String var3;
+
+ while ((var3 = var1.readLine()) != null)
+ {
+ var3 = var3.trim();
+
+ if (var3.length() > 0)
+ {
+ var2.add(var3);
+ }
+ }
+
+ do
+ {
+ this.splashText = (String) var2.get(rand.nextInt(var2.size()));
+ } while (this.splashText.hashCode() == 125780783);
+ } catch (IOException var12)
+ {
+ ;
+ } finally
+ {
+ if (var1 != null)
+ {
+ try
+ {
+ var1.close();
+ } catch (IOException var11)
+ {
+ ;
+ }
+ }
+ }
+
+ this.updateCounter = rand.nextFloat();
+ }
+
+ private void addServer(int var1)
+ {
+ int var2 = this.serverdata.size();
+ String var3 = "Aether Server " + (var2 + 1);
+ this.serverdata.add(new ServerData(var3, "109.72.82.220:" + var1));
+ this.serverButtons.add(new GuiAetherIIButton(15 + var2 + 1, 2 + (var2 >= 8 ? 140 : 0), 30 + 25 * (var2 - 1 - (var2 >= 8 ? 8 : 0)), 120, 20, var3));
+ this.buttonList.add(this.serverButtons.get(var2));
+ }
+
+ /**
+ * Called from the main game loop to update the screen.
+ */
+ public void updateScreen()
+ {
+ ++this.panoramaTimer;
+ }
+
+ /**
+ * Returns true if this GUI should pause the game when it is displayed in single-player
+ */
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ /**
+ * Fired when a key is typed. This is the equivalent of KeyListener.keyTyped(KeyEvent e).
+ */
+ protected void keyTyped(char var1, int var2)
+ {}
+
+ /**
+ * Adds the buttons (and other controls) to the screen in question.
+ */
+ public void initGui()
+ {
+ super.initGui();
+ this.viewportTexture = this.mc.renderEngine.allocateAndSetupTexture(new BufferedImage(256, 256, 2));
+ Calendar var1 = Calendar.getInstance();
+ var1.setTime(new Date());
+
+ if (var1.get(2) + 1 == 11 && var1.get(5) == 9)
+ {
+ this.splashText = "Happy birthday, ez!";
+ } else if (var1.get(2) + 1 == 6 && var1.get(5) == 1)
+ {
+ this.splashText = "Happy birthday, Notch!";
+ } else if (var1.get(2) + 1 == 12 && var1.get(5) == 24)
+ {
+ this.splashText = "Merry X-mas!";
+ } else if (var1.get(2) + 1 == 1 && var1.get(5) == 1)
+ {
+ this.splashText = "Happy new year!";
+ } else if (var1.get(2) + 1 == 10 && var1.get(5) == 31)
+ {
+ this.splashText = "OOoooOOOoooo! Spooky!";
+ }
+
+ StringTranslate var2 = StringTranslate.getInstance();
+ int var3 = this.height / 4 + 68;
+ this.serverdata.clear();
+ this.serverButtons.clear();
+ this.addServer(25587);
+ this.addServer(25598);
+ this.addServer(25609);
+ this.addServer(25620);
+ this.addServer(25631);
+ this.addServer(25642);
+ this.addServer(25653);
+ this.addServer(25664);
+ this.addServer(25675);
+ this.addServer(25686);
+ this.addServer(25697);
+ this.addServer(25708);
+ this.addServer(25719);
+ this.addServer(25730);
+ this.addServer(25741);
+ this.addServer(25752);
+ this.backButton = new GuiAetherIIButton(13, 3, this.height - 35, 180, 20, "Back To Menu");
+ this.buttonList.add(this.backButton);
+ Iterator var4 = this.serverdata.iterator();
+
+ while (var4.hasNext())
+ {
+ ServerData var5 = (ServerData) var4.next();
+ var5.setHideAddress(true);
+ }
+
+ if (this.mc.isDemo())
+ {
+ this.addDemoButtons(var3, 24, var2);
+ } else
+ {
+ this.addSingleplayerMultiplayerButtons(var3, 24, var2);
+ }
+
+ this.fmlModButton = new GuiAetherIIButton(6, 30, var3 + 48 - 45, "Mods");
+ this.buttonList.add(this.fmlModButton);
+ this.func_96137_a(var2, var3, 24);
+ this.hideOptionsButton = new GuiAetherIIButton(0, 30, var3 + 27 + 24, var2.translateKey("menu.options"));
+ this.optionsButton = new GuiAetherIIButton(0, 30, var3 + 27 + 24, 200, 20, var2.translateKey("menu.options"));
+ this.quitButton = new GuiAetherIIButton(4, 30, var3 + 27 + 48, 200, 20, var2.translateKey("menu.quit"));
+ this.languageButton = new GuiButtonLanguage(5, this.width - 48, 4);
+
+ if (this.mc.hideQuitButton)
+ {
+ this.buttonList.add(this.hideOptionsButton);
+ } else
+ {
+ this.buttonList.add(this.optionsButton);
+ this.buttonList.add(this.quitButton);
+ }
+
+ this.buttonList.add(this.languageButton);
+ this.field_92025_p = "";
+ String var7 = System.getProperty("os_architecture");
+ String var8 = System.getProperty("java_version");
+
+ if ("ppc".equalsIgnoreCase(var7))
+ {
+ this.field_92025_p = "" + EnumChatFormatting.BOLD + "Notice!" + EnumChatFormatting.RESET + " PowerPC compatibility will be dropped in Minecraft 1.6";
+ } else if (var8 != null && var8.startsWith("1.5"))
+ {
+ this.field_92025_p = "" + EnumChatFormatting.BOLD + "Notice!" + EnumChatFormatting.RESET + " Java 1.5 compatibility will be dropped in Minecraft 1.6";
+ }
+
+ this.field_92023_s = this.fontRenderer.getStringWidth(this.field_92025_p);
+ this.field_92024_r = this.fontRenderer.getStringWidth(field_96138_a);
+ int var6 = Math.max(this.field_92023_s, this.field_92024_r);
+ this.field_92022_t = (this.width - var6) / 2;
+ this.field_92021_u = ((GuiAetherIIButton) this.buttonList.get(0)).yPosition - 24;
+ this.field_92020_v = this.field_92022_t + var6;
+ this.field_92019_w = this.field_92021_u + 24;
+ TUGbutton = new AetherTUGButton(14, this.width - 95, 40, 64, 47);
+ this.buttonList.add(TUGbutton);
+ }
+
+ private void func_96137_a(StringTranslate var1, int var2, int var3)
+ {
+ if (this.field_96141_q)
+ {
+ if (!field_96140_r)
+ {
+ field_96140_r = true;
+ } else if (field_96139_s)
+ {
+ this.func_98060_b(var1, var2, var3);
+ }
+ }
+ }
+
+ private void func_98060_b(StringTranslate var1, int var2, int var3)
+ {
+ this.fmlModButton.xPosition = this.width / 2 + 2;
+ GuiAetherIIButton var4 = new GuiAetherIIButton(3, 30, var2 - 45 + var3 * 2, var1.translateKey("menu.online"));
+ var4.xPosition = this.width / 2 - 100;
+ this.buttonList.add(var4);
+ }
+
+ private void addSingleplayerMultiplayerButtons(int var1, int var2, StringTranslate var3)
+ {
+ this.singleplayerButton = new GuiAetherIIButton(1, 30, var1 - 45, var3.translateKey("menu.singleplayer"));
+ this.multiplayerButton = new GuiAetherIIButton(2, 30, var1 - 45 + var2 * 1, var3.translateKey("menu.multiplayer"));
+ this.officialServerButton = new GuiAetherIIButton(13, 30, var1 - 45 + var2 * 3, 7851212, 7851212);
+ this.exploreTUG = new GuiButton(15, this.width / 2 - 40, this.height / 2, 80, 20, "Explore TUG!");
+ this.buttonList.add(this.singleplayerButton);
+ this.buttonList.add(this.multiplayerButton);
+ this.buttonList.add(this.officialServerButton);
+ this.buttonList.add(this.exploreTUG);
+ }
+
+ private void addDemoButtons(int var1, int var2, StringTranslate var3)
+ {
+ this.buttonList.add(new GuiAetherIIButton(11, 30, var1, var3.translateKey("menu.playdemo")));
+ this.buttonList.add(this.buttonResetDemo = new GuiAetherIIButton(12, 30, var1 - 45 + var2 * 1, var3.translateKey("menu.resetdemo")));
+ ISaveFormat var4 = this.mc.getSaveLoader();
+ WorldInfo var5 = var4.getWorldInfo("Demo_World");
+
+ if (var5 == null)
+ {
+ this.buttonResetDemo.enabled = false;
+ }
+ }
+
+ /**
+ * Fired when a control is clicked. This is the equivalent of ActionListener.actionPerformed(ActionEvent e).
+ */
+ protected void actionPerformed(GuiButton var1)
+ {
+ if (var1.id == 0)
+ {
+ this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
+ }
+
+ if (var1.id == 5)
+ {
+ this.mc.displayGuiScreen(new GuiLanguage(this, this.mc.gameSettings));
+ }
+
+ if (var1.id == 1)
+ {
+ this.mc.displayGuiScreen(new GuiSelectWorld(this));
+ }
+
+ if (var1.id == 2)
+ {
+ this.mc.displayGuiScreen(new GuiMultiplayer(this));
+ }
+
+ if (var1.id == 3)
+ {
+ this.mc.displayGuiScreen(new GuiScreenOnlineServers(this));
+ }
+
+ if (var1.id == 4)
+ {
+ this.mc.shutdown();
+ }
+
+ if (var1.id == 6)
+ {
+ this.mc.displayGuiScreen(new GuiModList(this));
+ }
+
+ if (var1.id == 11)
+ {
+ this.mc.launchIntegratedServer("Demo_World", "Demo_World", DemoWorldServer.demoWorldSettings);
+ }
+
+ if (var1.id == 12)
+ {
+ ISaveFormat var2 = this.mc.getSaveLoader();
+ WorldInfo var3 = var2.getWorldInfo("Demo_World");
+
+ if (var3 != null)
+ {
+ GuiYesNo var4 = GuiSelectWorld.getDeleteWorldScreen(this, var3.getWorldName(), 12);
+ this.mc.displayGuiScreen(var4);
+ }
+ }
+
+ if (var1.id == 13)
+ {
+ this.SERVERlist = !this.SERVERlist;
+ }
+
+ if (var1.id == 14)
+ {
+ try
+ {
+ System.out.println("WOW");
+ this.TUGopen = !this.TUGopen;
+ this.mc.displayGuiScreen(this);
+ } catch (Exception var6)
+ {
+ var6.printStackTrace();
+ }
+ }
+
+ if (var1.id == 15)
+ {
+ try
+ {
+ Desktop.getDesktop().browse(URI.create("http://nerdkingdom.com/p/pledgepage.aspx"));
+ this.mc.displayGuiScreen(this);
+ } catch (Exception var5)
+ {
+ var5.printStackTrace();
+ }
+ }
+
+ if (var1.id > 15)
+ {
+ this.connectToServer((ServerData) this.serverdata.get(var1.id - 16));
+ }
+ }
+
+ private void connectToServer(ServerData var1)
+ {
+ this.mc.displayGuiScreen(new GuiConnecting(this, this.mc, var1));
+ }
+
+ public void confirmClicked(boolean var1, int var2)
+ {
+ if (var1 && var2 == 12)
+ {
+ ISaveFormat var6 = this.mc.getSaveLoader();
+ var6.flushCache();
+ var6.deleteWorldDirectory("Demo_World");
+ this.mc.displayGuiScreen(this);
+ } else if (var2 == 13)
+ {
+ if (var1)
+ {
+ try
+ {
+ Class var3 = Class.forName("java.awt.Desktop");
+ Object var4 = var3.getMethod("getDesktop", new Class[0]).invoke((Object) null, new Object[0]);
+ var3.getMethod("browse", new Class[]{URI.class}).invoke(var4, new Object[]{new URI("http://tinyurl.com/javappc")});
+ } catch (Throwable var5)
+ {
+ var5.printStackTrace();
+ }
+ }
+
+ this.mc.displayGuiScreen(this);
+ }
+ }
+
+ private void drawPanorama(int var1, int var2, float var3)
+ {
+ Tessellator var4 = Tessellator.instance;
+ GL11.glMatrixMode(GL11.GL_PROJECTION);
+ GL11.glPushMatrix();
+ GL11.glLoadIdentity();
+ GLU.gluPerspective(120.0F, 1.0F, 0.05F, 10.0F);
+ GL11.glMatrixMode(GL11.GL_MODELVIEW);
+ GL11.glPushMatrix();
+ GL11.glLoadIdentity();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glDisable(GL11.GL_ALPHA_TEST);
+ GL11.glDisable(GL11.GL_CULL_FACE);
+ GL11.glDepthMask(false);
+ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ byte var5 = 8;
+
+ for (int var6 = 0; var6 < var5 * var5; ++var6)
+ {
+ GL11.glPushMatrix();
+ float var7 = ((float) (var6 % var5) / (float) var5 - 0.5F) / 64.0F;
+ float var8 = ((float) (var6 / var5) / (float) var5 - 0.5F) / 64.0F;
+ float var9 = 0.0F;
+ GL11.glTranslatef(var7, var8, var9);
+ GL11.glRotatef(MathHelper.sin(((float) this.panoramaTimer + var3) / 400.0F) * 25.0F + 20.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glRotatef(-((float) this.panoramaTimer + var3) * 0.1F, 0.0F, 1.0F, 0.0F);
+
+ for (int var10 = 0; var10 < 6; ++var10)
+ {
+ GL11.glPushMatrix();
+
+ if (var10 == 1)
+ {
+ GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
+ }
+
+ if (var10 == 2)
+ {
+ GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
+ }
+
+ if (var10 == 3)
+ {
+ GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
+ }
+
+ if (var10 == 4)
+ {
+ GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
+ }
+
+ if (var10 == 5)
+ {
+ GL11.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F);
+ }
+
+ this.mc.renderEngine.bindTexture(titlePanoramaPaths[var10]);
+ var4.startDrawingQuads();
+ var4.setColorRGBA_I(16777215, 255 / (var6 + 1));
+ float var11 = 0.0F;
+ var4.addVertexWithUV(-1.0D, -1.0D, 1.0D, (double) (0.0F + var11), (double) (0.0F + var11));
+ var4.addVertexWithUV(1.0D, -1.0D, 1.0D, (double) (1.0F - var11), (double) (0.0F + var11));
+ var4.addVertexWithUV(1.0D, 1.0D, 1.0D, (double) (1.0F - var11), (double) (1.0F - var11));
+ var4.addVertexWithUV(-1.0D, 1.0D, 1.0D, (double) (0.0F + var11), (double) (1.0F - var11));
+ var4.draw();
+ GL11.glPopMatrix();
+ }
+
+ GL11.glPopMatrix();
+ GL11.glColorMask(true, true, true, false);
+ }
+
+ var4.setTranslation(0.0D, 0.0D, 0.0D);
+ GL11.glColorMask(true, true, true, true);
+ GL11.glMatrixMode(GL11.GL_PROJECTION);
+ GL11.glPopMatrix();
+ GL11.glMatrixMode(GL11.GL_MODELVIEW);
+ GL11.glPopMatrix();
+ GL11.glDepthMask(true);
+ GL11.glEnable(GL11.GL_CULL_FACE);
+ GL11.glEnable(GL11.GL_ALPHA_TEST);
+ GL11.glEnable(GL11.GL_DEPTH_TEST);
+ }
+
+ private void rotateAndBlurSkybox(float var1)
+ {
+ GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.viewportTexture);
+ this.mc.renderEngine.resetBoundTexture();
+ GL11.glCopyTexSubImage2D(GL11.GL_TEXTURE_2D, 0, 0, 0, 0, 0, 256, 256);
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ GL11.glColorMask(true, true, true, false);
+ Tessellator var2 = Tessellator.instance;
+ var2.startDrawingQuads();
+ byte var3 = 3;
+
+ for (int var4 = 0; var4 < var3; ++var4)
+ {
+ var2.setColorRGBA_F(1.0F, 1.0F, 1.0F, 1.0F / (float) (var4 + 1));
+ int var5 = this.width;
+ int var6 = this.height;
+ float var7 = (float) (var4 - var3 / 2) / 256.0F;
+ var2.addVertexWithUV((double) var5, (double) var6, (double) this.zLevel, (double) (0.0F + var7), 0.0D);
+ var2.addVertexWithUV((double) var5, 0.0D, (double) this.zLevel, (double) (1.0F + var7), 0.0D);
+ var2.addVertexWithUV(0.0D, 0.0D, (double) this.zLevel, (double) (1.0F + var7), 1.0D);
+ var2.addVertexWithUV(0.0D, (double) var6, (double) this.zLevel, (double) (0.0F + var7), 1.0D);
+ }
+
+ var2.draw();
+ GL11.glColorMask(true, true, true, true);
+ this.mc.renderEngine.resetBoundTexture();
+ }
+
+ private void renderSkybox(int var1, int var2, float var3)
+ {
+ GL11.glViewport(0, 0, 256, 256);
+ this.drawPanorama(var1, var2, var3);
+ GL11.glDisable(GL11.GL_TEXTURE_2D);
+ GL11.glEnable(GL11.GL_TEXTURE_2D);
+ this.rotateAndBlurSkybox(var3);
+ this.rotateAndBlurSkybox(var3);
+ this.rotateAndBlurSkybox(var3);
+ this.rotateAndBlurSkybox(var3);
+ this.rotateAndBlurSkybox(var3);
+ this.rotateAndBlurSkybox(var3);
+ this.rotateAndBlurSkybox(var3);
+ this.rotateAndBlurSkybox(var3);
+ GL11.glViewport(0, 0, this.mc.displayWidth, this.mc.displayHeight);
+ Tessellator var4 = Tessellator.instance;
+ var4.startDrawingQuads();
+ float var5 = this.width > this.height ? 120.0F / (float) this.width : 120.0F / (float) this.height;
+ float var6 = (float) this.height * var5 / 256.0F;
+ float var7 = (float) this.width * var5 / 256.0F;
+ GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR);
+ GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);
+ var4.setColorRGBA_F(1.0F, 1.0F, 1.0F, 1.0F);
+ int var8 = this.width;
+ int var9 = this.height;
+ var4.addVertexWithUV(0.0D, (double) var9, (double) this.zLevel, (double) (0.5F - var6), (double) (0.5F + var7));
+ var4.addVertexWithUV((double) var8, (double) var9, (double) this.zLevel, (double) (0.5F - var6), (double) (0.5F - var7));
+ var4.addVertexWithUV((double) var8, 0.0D, (double) this.zLevel, (double) (0.5F + var6), (double) (0.5F - var7));
+ var4.addVertexWithUV(0.0D, 0.0D, (double) this.zLevel, (double) (0.5F + var6), (double) (0.5F + var7));
+ var4.draw();
+ }
+
+ public void drawLogo(int var1, int var2)
+ {
+ GL11.glPushMatrix();
+ this.mc.renderEngine.bindTexture("/net/aetherteam/aether/client/sprites/menu/aether2logo.png");
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ this.scalingLol += this.scalingLol * 0.001F;
+
+ if (this.scalingLol > 1.0F)
+ {
+ this.scalingLol = 1.0F;
+ }
+
+ GL11.glTranslatef((float) (this.width / 2) - 195.0F * this.scalingLol / 2.0F, (float) (var2 - 20), 1.0F);
+ GL11.glScalef(this.scalingLol, this.scalingLol, this.scalingLol);
+ this.drawTexturedModalRect(0, 0, 0, 0, 195, 114);
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glPopMatrix();
+ this.mc.renderEngine.resetBoundTexture();
+ }
+
+ /**
+ * Draws the screen and all the components in it.
+ */
+ public void drawScreen(int var1, int var2, float var3)
+ {
+ this.renderSkybox(var1, var2, var3);
+ Tessellator var4 = Tessellator.instance;
+ short var5 = 274;
+ int var6 = this.width / 2 - var5 / 2;
+ byte var7 = 30;
+ this.drawGradientRect(0, 0, this.width, this.height, -2130706433, 16777215);
+ this.drawGradientRect(0, 0, this.width, this.height, 0, Integer.MIN_VALUE);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ int var11;
+
+ if (this.TUGopen)
+ {
+ GL11.glPushMatrix();
+ Minecraft var8 = Minecraft.getMinecraft();
+ ScaledResolution var9 = new ScaledResolution(var8.gameSettings, var8.displayWidth, var8.displayHeight);
+ int var10 = var9.getScaledWidth();
+ var11 = var9.getScaledHeight();
+ int var12 = var8.renderEngine.getTextureForDownloadableImage("/net/aetherteam/aether/client/sprites/menu/tug/menu_background.png", "/net/aetherteam/aether/client/sprites/menu/tug/menu_background.png");
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glEnable(GL11.GL_TEXTURE_2D);
+ GL11.glBindTexture(GL11.GL_TEXTURE_2D, var12);
+ boolean var13 = false;
+ byte var14 = 0;
+ float var15 = 0.0F;
+ float var16 = 0.0F;
+ float var17 = 1.0F;
+ float var18 = 1.0F;
+ GL11.glBegin(GL11.GL_QUADS);
+ GL11.glTexCoord2f(var15, var16);
+ GL11.glVertex2f(0.0F, 0.0F);
+ GL11.glTexCoord2f(var15, var18);
+ GL11.glVertex2f(0.0F, (float) var11);
+ GL11.glTexCoord2f(var17, var18);
+ GL11.glVertex2f((float) var10, (float) (var14 + var11));
+ GL11.glTexCoord2f(var17, var16);
+ GL11.glVertex2f((float) var10, 0.0F);
+ GL11.glEnd();
+ GL11.glPopMatrix();
+ }
+
+ var4.setColorOpaque_I(16777215);
+ GL11.glPushMatrix();
+ GL11.glTranslatef(215.0F, 50.0F, 0.0F);
+ GL11.glRotatef(-20.0F, 0.0F, 0.0F, 1.0F);
+ float var19 = 1.4F - MathHelper.abs(MathHelper.sin((float) (Minecraft.getSystemTime() % 1000L) / 1000.0F * (float) Math.PI * 2.0F) * 0.1F);
+ var19 = var19 * 100.0F / (float) (this.fontRenderer.getStringWidth(this.splashText) + 32);
+ GL11.glScalef(var19, var19, var19);
+ GL11.glPopMatrix();
+ String var20 = "Minecraft 1.5.1";
+
+ if (this.mc.isDemo())
+ {
+ var20 = var20 + " Demo";
+ }
+
+ List var21 = Lists.reverse(FMLCommonHandler.instance().getBrandings());
+ String var23;
+
+ for (var11 = 0; var11 < var21.size(); ++var11)
+ {
+ var23 = (String) var21.get(var11);
+
+ if (!Strings.isNullOrEmpty(var23) && !this.TUGopen)
+ {
+ this.drawString(this.fontRenderer, var23, this.width - 2 - this.fontRenderer.getStringWidth(var23), this.height - (10 + var11 * (this.fontRenderer.FONT_HEIGHT + 1)), 16777215);
+ }
+ }
+
+ if (!this.TUGopen)
+ {
+ String var22 = "Copyright Mojang AB. Do not distribute!";
+ this.drawString(this.fontRenderer, var22, 2, this.height - 10, 16777215);
+ }
+
+ if (this.field_92025_p != null && this.field_92025_p.length() > 0)
+ {
+ drawRect(this.field_92022_t - 2, this.field_92021_u - 2, this.field_92020_v + 2, this.field_92019_w - 1, 1428160512);
+ this.drawString(this.fontRenderer, this.field_92025_p, this.field_92022_t, this.field_92021_u, 16777215);
+ this.drawString(this.fontRenderer, field_96138_a, (this.width - this.field_92024_r) / 2, ((GuiAetherIIButton) this.buttonList.get(0)).yPosition - 12, 16777215);
+ }
+
+ super.drawScreen(var1, var2, var3);
+
+ if ((double) this.updateCounter < 1.0E-4D)
+ {
+ this.drawTexturedModalRect(var6 + 0, var7 + 0, 0, 0, 99, 44);
+ this.drawTexturedModalRect(var6 + 99, var7 + 0, 129, 0, 27, 44);
+ this.drawTexturedModalRect(var6 + 99 + 26, var7 + 0, 126, 0, 3, 44);
+ this.drawTexturedModalRect(var6 + 99 + 26 + 3, var7 + 0, 99, 0, 26, 44);
+ this.drawTexturedModalRect(var6 + 155, var7 + 0, 0, 45, 155, 44);
+ } else if (!this.isJukeboxOpen() && !this.TUGopen && !this.SERVERlist)
+ {
+ this.drawLogo(var6, var7);
+ TUGbutton.drawButton = true;
+ this.fmlModButton.drawButton = true;
+ this.hideOptionsButton.drawButton = true;
+ this.optionsButton.drawButton = true;
+ this.quitButton.drawButton = true;
+ this.languageButton.drawButton = true;
+ this.singleplayerButton.drawButton = true;
+ this.multiplayerButton.drawButton = true;
+ this.officialServerButton.drawButton = true;
+ this.exploreTUG.drawButton = false;
+ } else
+ {
+ this.fmlModButton.drawButton = false;
+ this.hideOptionsButton.drawButton = false;
+ this.optionsButton.drawButton = false;
+ this.quitButton.drawButton = false;
+ this.singleplayerButton.drawButton = false;
+ this.multiplayerButton.drawButton = false;
+ this.officialServerButton.drawButton = false;
+
+ if (this.TUGopen)
+ {
+ this.exploreTUG.drawButton = true;
+ } else
+ {
+ this.exploreTUG.drawButton = false;
+ }
+ }
+
+ GuiAetherIIButton var25;
+ Iterator var24;
+
+ if (!this.isJukeboxOpen() && this.SERVERlist)
+ {
+ for (var24 = this.serverButtons.iterator(); var24.hasNext(); var25.drawButton = true)
+ {
+ var25 = (GuiAetherIIButton) var24.next();
+ }
+
+ this.backButton.drawButton = true;
+ TUGbutton.drawButton = false;
+ } else
+ {
+ for (var24 = this.serverButtons.iterator(); var24.hasNext(); var25.drawButton = false)
+ {
+ var25 = (GuiAetherIIButton) var24.next();
+ }
+
+ this.backButton.drawButton = false;
+ }
+
+ if (this.TUGopen && !this.isJukeboxOpen())
+ {
+ GL11.glPushMatrix();
+ this.mc.renderEngine.bindTexture("/net/aetherteam/aether/client/sprites/menu/tug/seed_and_moa.jpg");
+ float var26 = 0.3F;
+ GL11.glTranslatef(15.0F, 10.0F, 1.0F);
+ GL11.glScalef(var26, var26, var26);
+ this.drawTexturedModalRect(0, 0, 0, 0, 255, 255);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ this.mc.renderEngine.bindTexture("/net/aetherteam/aether/client/sprites/menu/tug/screeny.png");
+ GL11.glTranslatef(15.0F, 105.0F, 1.0F);
+ GL11.glScalef(var26, var26, var26);
+ this.drawTexturedModalRect(0, 0, 0, 0, 255, 255);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ var26 = 0.55F;
+ this.mc.renderEngine.bindTexture("/net/aetherteam/aether/client/sprites/menu/tug/banner.png");
+ GL11.glTranslatef(110.0F, 10.0F, 1.0F);
+ GL11.glScalef(var26, var26 * 0.35F, var26);
+ this.drawTexturedModalRect(0, 0, 0, 0, 255, 255);
+ GL11.glPopMatrix();
+ var23 = "The Aether realm will be coming to the world of TUG!";
+ String var27 = "Please help us support this amazing game :)";
+ this.drawString(this.fontRenderer, var23, this.width / 2 - this.fontRenderer.getStringWidth(var23) / 2, this.height - 40, 16777215);
+ this.drawString(this.fontRenderer, var27, this.width / 2 - this.fontRenderer.getStringWidth(var27) / 2, this.height - 27, 16777215);
+ }
+ }
+
+ /**
+ * Called when the mouse is clicked.
+ */
+ protected void mouseClicked(int var1, int var2, int var3)
+ {
+ super.mouseClicked(var1, var2, var3);
+
+ if (this.field_92025_p.length() > 0 && var1 >= this.field_92022_t && var1 <= this.field_92020_v && var2 >= this.field_92021_u && var2 <= this.field_92019_w)
+ {
+ GuiConfirmOpenLink var4 = new GuiConfirmOpenLink(this, "http://tinyurl.com/javappc", 13);
+ var4.func_92026_h();
+ this.mc.displayGuiScreen(var4);
+ }
+ }
+
+ static Minecraft func_98058_a(MenuBaseAetherII var0)
+ {
+ return var0.mc;
+ }
+
+ static void func_98061_a(MenuBaseAetherII var0, StringTranslate var1, int var2, int var3)
+ {
+ var0.func_98060_b(var1, var2, var3);
+ }
+
+ static boolean func_98059_a(boolean var0)
+ {
+ field_96139_s = var0;
+ return var0;
+ }
+
+ public int getListButtonX()
+ {
+ return this.width - 110;
+ }
+
+ public int getListButtonY()
+ {
+ Minecraft var1 = Minecraft.getMinecraft();
+ ScaledResolution var2 = new ScaledResolution(var1.gameSettings, var1.displayWidth, var1.displayHeight);
+ int var3 = var2.getScaledWidth();
+ int var4 = var2.getScaledHeight();
+ return 4;
+ }
+
+ public int getJukeboxButtonX()
+ {
+ return this.width - 24;
+ }
+
+ public int getJukeboxButtonY()
+ {
+ return 4;
+ }
+
+ public String getName()
+ {
+ return "Aether II";
+ }
+
+ public String getVersion()
+ {
+ return "Genesis of the Void";
+ }
+
+ public String getMusicFileName()
+ {
+ return "Aether Menu Two";
+ }
+
+ public String getIconPath()
+ {
+ return "/net/aetherteam/aether/client/sprites/menu/MenuIcon.png";
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/PlayerBaseAetherServer.java b/src/main/java/net/aetherteam/aether/PlayerBaseAetherServer.java
new file mode 100644
index 0000000..79c9d38
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/PlayerBaseAetherServer.java
@@ -0,0 +1,968 @@
+package net.aetherteam.aether;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.network.PacketDispatcher;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.containers.ContainerPlayerAether;
+import net.aetherteam.aether.containers.InventoryAether;
+import net.aetherteam.aether.data.PlayerClientInfo;
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.entities.EntityAetherLightning;
+import net.aetherteam.aether.interfaces.IAetherAccessory;
+import net.aetherteam.aether.interfaces.IAetherBoss;
+import net.aetherteam.aether.items.AetherItems;
+import net.aetherteam.aether.items.ItemAccessory;
+import net.aetherteam.aether.packets.AetherPacketHandler;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.block.Block;
+import net.minecraft.enchantment.EnchantmentHelper;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.effect.EntityLightningBolt;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.inventory.Container;
+import net.minecraft.inventory.ContainerPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.CompressedStreamTools;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.NBTTagList;
+import net.minecraft.network.packet.Packet43Experience;
+import net.minecraft.potion.Potion;
+import net.minecraft.potion.PotionEffect;
+import net.minecraft.server.MinecraftServer;
+import net.minecraft.server.management.ServerConfigurationManager;
+import net.minecraft.src.ServerPlayerAPI;
+import net.minecraft.src.ServerPlayerBase;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.FoodStats;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.MovingObjectPosition;
+import net.minecraft.world.WorldServer;
+import net.minecraft.world.storage.SaveHandler;
+import net.minecraftforge.common.ForgeHooks;
+import net.minecraftforge.event.ForgeEventFactory;
+
+public class PlayerBaseAetherServer extends ServerPlayerBase
+{
+ public AetherCommonPlayerHandler playerHandler = new AetherCommonPlayerHandler(this);
+ public int maxHealth;
+ public int foodTimer;
+ public boolean hasDefeatedSunSpirit;
+ public int generalcooldown = 0;
+ public int generalcooldownmax = 0;
+ public String cooldownName = "Hammer of Notch";
+ public InventoryAether inv;
+ public float prevStepHeight = 0.5F;
+ private boolean jumpBoosted;
+ private int flightCount = 0;
+ private int maxFlightCount = 52;
+ private double flightMod = 1.0D;
+ private double maxFlightMod = 15.0D;
+ private boolean prevCreative;
+ public ArrayList mountInput = new ArrayList();
+ private float sinage;
+ private int coinAmount;
+ public static boolean keepInventory = false;
+ private float zLevel = -90.0F;
+ private double dungeonPosX;
+ private double dungeonPosY;
+ private double dungeonPosZ;
+ private double nondungeonPosX;
+ private double nondungeonPosY;
+ private double nondungeonPosZ;
+ private int timeInPortal;
+ private boolean idleInPortal;
+ public static int frostBiteTime;
+ public static int frostBiteTimer;
+ private Random rand = new Random();
+ public List extendedReachItems;
+ private int timeUntilPortal;
+ private boolean inPortal;
+
+ public PlayerBaseAetherServer(ServerPlayerAPI var1)
+ {
+ super(var1);
+ this.extendedReachItems = Arrays.asList(new Item[]{AetherItems.ValkyrieShovel, AetherItems.ValkyriePickaxe, AetherItems.ValkyrieAxe});
+ this.maxHealth = 20;
+ this.inv = new InventoryAether(this.player);
+ this.player.inventoryContainer = (Container) (!this.player.capabilities.isCreativeMode ? new ContainerPlayerAether(this.player.inventory, this.inv, !this.player.worldObj.isRemote, this.player, this.playerHandler) : new ContainerPlayer(this.player.inventory, false, this.player));
+ this.player.openContainer = this.player.inventoryContainer;
+ }
+
+ public boolean attackEntityFrom(DamageSource var1, int var2)
+ {
+ if (var1.getEntity() instanceof EntityPlayer)
+ {
+ EntityPlayer var3 = (EntityPlayer) var1.getEntity();
+ Party var4 = PartyController.instance().getParty(var3);
+ Party var5 = PartyController.instance().getParty(PartyController.instance().getMember(this.player.username));
+
+ if (var4 != null && var5 != null && var4.getName().toLowerCase().equalsIgnoreCase(var5.getName()))
+ {
+ return false;
+ }
+ }
+
+ return super.attackEntityFrom(var1, var2);
+ }
+
+ public EntityPlayer getPlayer()
+ {
+ return this.player;
+ }
+
+ public int getCoins()
+ {
+ return this.coinAmount;
+ }
+
+ public void addCoins(int var1)
+ {
+ this.coinAmount += var1;
+
+ if (!this.player.worldObj.isRemote)
+ {
+ this.player.playerNetServerHandler.sendPacketToPlayer(AetherPacketHandler.sendCoinChange(false, true, this.coinAmount, Collections.singleton(this.player.username)));
+ }
+ }
+
+ public void removeCoins(int var1)
+ {
+ this.coinAmount -= var1;
+
+ if (!this.player.worldObj.isRemote)
+ {
+ this.player.playerNetServerHandler.sendPacketToPlayer(AetherPacketHandler.sendCoinChange(false, true, this.coinAmount, Collections.singleton(this.player.username)));
+ }
+ }
+
+ public boolean isOnLadder()
+ {
+ return this.wearingAccessory(AetherItems.SwettyPendant.itemID) && this.isBesideClimbableBlock() ? true : super.isOnLadder();
+ }
+
+ public boolean isBesideClimbableBlock()
+ {
+ return this.player.isCollidedHorizontally;
+ }
+
+ public void onStruckByLightning(EntityLightningBolt var1)
+ {
+ if (!(var1 instanceof EntityAetherLightning) || ((EntityAetherLightning) var1).playerUsing != this.player)
+ {
+ super.onStruckByLightning(var1);
+ }
+ }
+
+ public void beforeOnLivingUpdate()
+ {
+ this.playerHandler.beforeOnLivingUpdate();
+
+ if (this.playerHandler.riddenBy != null && this.playerHandler.riddenBy.shouldBeSitting())
+ {
+ if (this.playerHandler.riddenBy.animateSitting())
+ {
+ this.player.superSetFlag(2, true);
+ this.player.shouldRiderSit();
+ }
+
+ if (this.playerHandler.riddenBy.sprinting())
+ {
+ this.player.superSetFlag(3, true);
+ }
+ }
+ }
+
+ public void afterAttackTargetEntityWithCurrentItem(Entity var1)
+ {
+ if (var1 instanceof EntityLiving && ((EntityLiving) var1).deathTime <= 0 && !var1.isEntityAlive() && this.player.getCurrentEquippedItem() != null && this.player.getCurrentEquippedItem().itemID == AetherItems.SkyrootSword.itemID && var1 instanceof EntityLiving)
+ {
+ ;
+ }
+ }
+
+ public void beforeOnUpdate()
+ {
+ if (this.isAboveBlock(AetherBlocks.Aercloud.blockID))
+ {
+ this.player.fallDistance = 0.0F;
+ }
+
+ int var2 = MathHelper.floor_double(this.player.posX);
+ int var3 = MathHelper.floor_double(this.player.posY);
+ int var4 = MathHelper.floor_double(this.player.posZ);
+
+ if (!this.player.worldObj.isRemote && this.player.worldObj instanceof WorldServer)
+ {
+ MinecraftServer var5 = ((WorldServer) this.player.worldObj).getMinecraftServer();
+ int var1 = this.player.getMaxInPortalTime() + 1;
+
+ if (this.inPortal)
+ {
+ if (this.player.ridingEntity == null && this.timeInPortal == var1 && this.timeInPortal <= var1)
+ {
+ this.inPortal = false;
+ this.timeInPortal = var1;
+ this.player.timeUntilPortal = this.player.getPortalCooldown();
+ Aether.teleportPlayerToAether(this.player, false);
+ this.timeInPortal = var1 + 5;
+ } else
+ {
+ ++this.timeInPortal;
+ }
+ } else
+ {
+ if (this.timeInPortal > 0 && this.timeInPortal <= var1)
+ {
+ this.timeInPortal -= 4;
+ }
+
+ if (this.timeInPortal < 0)
+ {
+ this.timeInPortal = 0;
+ }
+ }
+
+ if (!this.idleInPortal)
+ {
+ this.timeInPortal = 0;
+ }
+
+ if (this.timeUntilPortal > 0)
+ {
+ ;
+ }
+
+ this.idleInPortal = this.isInBlock(AetherBlocks.AetherPortal.blockID);
+ }
+
+ Party var7 = PartyController.instance().getParty((EntityPlayer) this.player);
+ Dungeon var6 = DungeonHandler.instance().getDungeon(var7);
+
+ if (var6 != null)
+ {
+ if ((DungeonHandler.instance().getInstanceAt(var2, var3, var4) != null && !DungeonHandler.instance().getInstanceAt(var2, var3, var4).equals(var6) || DungeonHandler.instance().getInstanceAt(var2, var3, var4) == null) && var6.getQueuedMembers().contains(PartyController.instance().getMember((EntityPlayer) this.player)) && var6.hasStarted() && this.player.worldObj.provider.dimensionId == 3)
+ {
+ this.player.setPositionAndUpdate(this.dungeonPosX, this.dungeonPosY, this.dungeonPosZ);
+ } else if (DungeonHandler.instance().getInstanceAt(var2, var3, var4) != null && DungeonHandler.instance().getInstanceAt(var2, var3, var4).equals(var6) && var6.hasStarted())
+ {
+ this.dungeonPosX = this.player.posX;
+ this.dungeonPosY = this.player.posY;
+ this.dungeonPosZ = this.player.posZ;
+ }
+ } else if (DungeonHandler.instance().getInstanceAt(var2, var3, var4) != null && this.player.worldObj.provider.dimensionId == 3)
+ {
+ this.player.setPositionAndUpdate(this.nondungeonPosX, this.nondungeonPosY, this.nondungeonPosZ);
+ } else
+ {
+ this.nondungeonPosX = this.player.posX;
+ this.nondungeonPosY = this.player.posY;
+ this.nondungeonPosZ = this.player.posZ;
+ }
+ }
+
+ public void onDeath(DamageSource var1)
+ {
+ float var2 = this.player.experience;
+ int var3 = this.player.experienceTotal;
+ int var4 = this.player.experienceLevel;
+ super.onDeath(var1);
+ PartyMember var5 = PartyController.instance().getMember((EntityPlayer) this.player);
+ int var6 = MathHelper.floor_double(this.player.posX);
+ int var7 = MathHelper.floor_double(this.player.posY);
+ int var8 = MathHelper.floor_double(this.player.posZ);
+ Dungeon var9 = DungeonHandler.instance().getInstanceAt(var6, var7, var8);
+ System.out.println("Hooking into player death!");
+
+ if (var5 != null && var9 != null)
+ {
+ System.out.println("Hooking into player death, preventing! ONE");
+ Party var10 = PartyController.instance().getParty(var5);
+
+ if (var10 != null && var9.isActive() && var9.isQueuedParty(var10))
+ {
+ System.out.println("Hooking into player death, preventing! TWO");
+ this.player.isDead = false;
+ this.player.setEntityHealth(this.maxHealth);
+ this.player.setFoodStatsField(new FoodStats());
+ this.player.playerNetServerHandler.sendPacketToPlayer(new Packet43Experience(var2, var3, var4));
+ this.player.setPositionAndUpdate((double) ((float) ((double) var9.getControllerX() + 0.5D)), (double) ((float) ((double) var9.getControllerY() + 1.0D)), (double) ((float) ((double) var9.getControllerZ() + 0.5D)));
+ this.player.playerNetServerHandler.sendPacketToPlayer(AetherPacketHandler.sendDungeonRespawn(var9, var10));
+ return;
+ }
+ }
+ }
+
+ public void knockBack(Entity var1, int var2, double var3, double var5)
+ {
+ if (!this.wearingObsidianArmour())
+ {
+ super.knockBack(var1, var2, var3, var5);
+ }
+ }
+
+ public boolean isAboveBlock(int var1)
+ {
+ int var2 = MathHelper.floor_double(this.player.posX);
+ int var3 = MathHelper.floor_double(this.player.boundingBox.minY);
+ int var4 = MathHelper.floor_double(this.player.posZ);
+ return this.player.worldObj.getBlockId(MathHelper.floor_double(this.player.boundingBox.minX), var3 - 1, MathHelper.floor_double(this.player.boundingBox.minZ)) == var1 || this.player.worldObj.getBlockId(MathHelper.floor_double(this.player.boundingBox.maxX), var3 - 1, MathHelper.floor_double(this.player.boundingBox.minZ)) == var1 || this.player.worldObj.getBlockId(MathHelper.floor_double(this.player.boundingBox.maxX), var3 - 1, MathHelper.floor_double(this.player.boundingBox.maxZ)) == var1 || this.player.worldObj.getBlockId(MathHelper.floor_double(this.player.boundingBox.minX), var3 - 1, MathHelper.floor_double(this.player.boundingBox.maxZ)) == var1;
+ }
+
+ public boolean isInBlock(int var1)
+ {
+ int var2 = MathHelper.floor_double(this.player.posX);
+ int var3 = MathHelper.floor_double(this.player.posY);
+ int var4 = MathHelper.floor_double(this.player.posZ);
+ return this.player.worldObj.getBlockId(MathHelper.floor_double(this.player.boundingBox.minX), var3, MathHelper.floor_double(this.player.boundingBox.minZ)) == var1 || this.player.worldObj.getBlockId(MathHelper.floor_double(this.player.boundingBox.maxX), var3 + 1, MathHelper.floor_double(this.player.boundingBox.minZ)) == var1;
+ }
+
+ public boolean setGeneralCooldown(int var1, String var2)
+ {
+ if (this.generalcooldown == 0)
+ {
+ this.generalcooldown = var1;
+ this.generalcooldownmax = var1;
+ this.cooldownName = var2;
+
+ if (!this.player.worldObj.isRemote)
+ {
+ this.player.playerNetServerHandler.sendPacketToPlayer(AetherPacketHandler.sendCooldown(false, true, this.generalcooldown, this.generalcooldownmax, this.cooldownName, Collections.singleton(this.player.username)));
+ }
+
+ return true;
+ } else
+ {
+ return false;
+ }
+ }
+
+ public void afterOnUpdate()
+ {
+ this.processAbilities();
+ int var1 = MathHelper.floor_double(this.player.posX);
+ int var2 = MathHelper.floor_double(this.player.posY);
+ int var3 = MathHelper.floor_double(this.player.posZ);
+ Dungeon var4 = DungeonHandler.instance().getInstanceAt(var1, var2, var3);
+
+ if (var4 != null && !var4.hasMember(PartyController.instance().getMember((EntityPlayer) this.player)))
+ {
+ ;
+ }
+
+ if (this.prevCreative != this.player.capabilities.isCreativeMode)
+ {
+ System.out.println("hey");
+
+ if (!this.player.capabilities.isCreativeMode)
+ {
+ ;
+ }
+
+ this.prevCreative = this.player.capabilities.isCreativeMode;
+ }
+
+ if (Aether.proxy.getClientExtraHearts().get(this.player.username) != null)
+ {
+ this.maxHealth = ((Integer) Aether.proxy.getClientExtraHearts().get(this.player.username)).intValue();
+ }
+
+ if (this.generalcooldown > 0)
+ {
+ --this.generalcooldown;
+ }
+
+ PotionEffect var5 = this.player.getActivePotionEffect(Potion.regeneration);
+
+ if (var5 != null && var5.getDuration() > 0 && Potion.potionTypes[var5.getPotionID()].isReady(var5.getDuration(), var5.getAmplifier()) && this.player.getHealth() >= 20 && this.player.getHealth() < this.maxHealth)
+ {
+ this.player.heal(1);
+ }
+
+ if (this.player.getFoodStats().getFoodLevel() >= 18 && this.player.getHealth() >= 20 && this.player.getHealth() < this.maxHealth)
+ {
+ ++this.foodTimer;
+
+ if (this.foodTimer >= 80)
+ {
+ this.foodTimer = 0;
+ this.player.heal(1);
+ }
+ } else
+ {
+ this.foodTimer = 0;
+ }
+
+ if (this.player.worldObj.difficultySetting == 0 && this.player.getHealth() >= 20 && this.player.getHealth() < this.maxHealth && this.player.ticksExisted % 20 == 0)
+ {
+ this.player.heal(1);
+ }
+
+ if (this.playerHandler.getCurrentBoss() != null)
+ {
+ Entity var6 = this.playerHandler.getCurrentBoss().getBossEntity();
+
+ if (Math.sqrt(Math.pow(var6.posX - this.player.posX, 2.0D) + Math.pow(var6.posY - this.player.posY, 2.0D) + Math.pow(var6.posZ - this.player.posZ, 2.0D)) > 50.0D)
+ {
+ this.playerHandler.setCurrentBoss((IAetherBoss) null);
+ }
+ }
+
+ ItemStack var9 = this.player.getCurrentEquippedItem();
+
+ if (var9 != null && var9.getItem() != null && this.extendedReachItems.contains(var9.getItem()))
+ {
+ this.player.theItemInWorldManager.setBlockReachDistance(10.0D);
+ } else
+ {
+ this.player.theItemInWorldManager.setBlockReachDistance(5.0D);
+ }
+
+ if (this.player.dimension == 3 && this.player.posY < -2.0D)
+ {
+ Aether.teleportPlayerToAether(this.player, true);
+ }
+
+ this.playerHandler.afterOnUpdate();
+ float var7 = this.player.getMoveForwardField();
+ float var8 = this.player.getMoveStrafingField();
+
+ if (this.player.ridingEntity != null && (var8 != 0.0F || var7 != 0.0F))
+ {
+ this.player.setMoveForwardField(0.0F);
+ this.player.setMoveStrafingField(0.0F);
+ }
+
+ if (this.clientInfoChanged())
+ {
+ this.updatePlayerClientInfo();
+ }
+ }
+
+ public boolean clientInfoChanged()
+ {
+ PlayerClientInfo var1 = (PlayerClientInfo) Aether.proxy.getPlayerClientInfo().get(this.player.username);
+ return var1 == null ? false : this.player.getTotalArmorValue() != var1.getArmourValue() || this.player.getFoodStats().getFoodLevel() != var1.getHunger() || this.player.getHealth() != var1.getHalfHearts() || this.maxHealth != var1.getMaxHealth() || this.getCoins() != var1.getAetherCoins();
+ }
+
+ public void processAbilities()
+ {
+ if (!this.player.onGround)
+ {
+ this.sinage += 0.75F;
+ } else
+ {
+ this.sinage += 0.15F;
+ }
+
+ if (this.sinage > ((float) Math.PI * 2F))
+ {
+ this.sinage -= ((float) Math.PI * 2F);
+ }
+
+ if (this.wearingAccessory(AetherItems.SwettyPendant.itemID) && this.isBesideClimbableBlock())
+ {
+ if (!this.player.onGround && this.player.motionY < 0.0D && !this.player.isInWater() && !this.player.isSneaking())
+ {
+ this.player.motionY *= 0.6D;
+ }
+
+ this.player.fallDistance = -1.0F;
+ }
+
+ if (this.player.ticksExisted % 400 == 0)
+ {
+ if (this.inv.slots[0] != null && this.inv.slots[0].itemID == AetherItems.ZanitePendant.itemID)
+ {
+ this.inv.slots[0].damageItem(1, this.player);
+
+ if (this.inv.slots[0].stackSize < 1)
+ {
+ this.inv.slots[0] = null;
+ }
+ }
+
+ if (this.inv.slots[4] != null && this.inv.slots[4].itemID == AetherItems.ZaniteRing.itemID)
+ {
+ this.inv.slots[4].damageItem(1, this.player);
+
+ if (this.inv.slots[4].stackSize < 1)
+ {
+ this.inv.slots[4] = null;
+ }
+ }
+
+ if (this.inv.slots[5] != null && this.inv.slots[5].itemID == AetherItems.ZaniteRing.itemID)
+ {
+ this.inv.slots[5].damageItem(1, this.player);
+
+ if (this.inv.slots[5].stackSize < 1)
+ {
+ this.inv.slots[5] = null;
+ }
+ }
+ }
+
+ if (this.wearingPhoenixArmour())
+ {
+ this.player.extinguish();
+ this.player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 10, 4));
+ }
+
+ if (this.wearingGravititeArmour())
+ {
+ if (this.player.isJumping && !this.jumpBoosted && this.player.isSneaking())
+ {
+ this.player.motionY = 1.0D;
+ this.jumpBoosted = true;
+ }
+
+ this.player.fallDistance = -1.0F;
+ }
+
+ if (this.wearingObsidianArmour())
+ {
+ this.player.addPotionEffect(new PotionEffect(Potion.resistance.id, 10, 3));
+ this.player.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 10, 1));
+ }
+
+ if (this.wearingValkyrieArmour())
+ {
+ if (this.player.isJumping)
+ {
+ if (this.flightMod >= this.maxFlightMod)
+ {
+ this.flightMod = this.maxFlightMod;
+ }
+
+ if (this.flightCount > 2)
+ {
+ if (this.flightCount < this.maxFlightCount)
+ {
+ this.flightMod += 0.25D;
+ this.player.motionY = 0.025D * this.flightMod;
+ ++this.flightCount;
+ }
+ } else
+ {
+ ++this.flightCount;
+ }
+ } else
+ {
+ this.flightMod = 1.0D;
+ }
+
+ this.player.fallDistance = -1.0F;
+ }
+
+ if (this.player.onGround)
+ {
+ this.flightCount = 0;
+ this.flightMod = 1.0D;
+ }
+
+ if (!this.player.isJumping && this.player.onGround)
+ {
+ this.jumpBoosted = false;
+ }
+
+ for (int var1 = 0; var1 < 8; ++var1)
+ {
+ if (this.inv.slots[var1] != null && this.inv.slots[var1].getItem() instanceof IAetherAccessory)
+ {
+ ((ItemAccessory) this.inv.slots[var1].getItem()).activateServerPassive(this.player, this);
+ }
+ }
+
+ if (!this.wearingAccessory(AetherItems.AgilityCape.itemID))
+ {
+ this.player.stepHeight = this.prevStepHeight;
+ }
+ }
+
+ public void jump()
+ {
+ if (this.playerHandler.jump())
+ {
+ super.jump();
+ }
+ }
+
+ public float getSpeedModifier()
+ {
+ float var1 = this.playerHandler.getSpeedModifier();
+ return var1 == -1.0F ? var1 : super.getSpeedModifier();
+ }
+
+ public AetherCommonPlayerHandler getPlayerHandler()
+ {
+ return this.playerHandler;
+ }
+
+ public void heal(int var1)
+ {
+ if (this.player.getHealth() > 0)
+ {
+ this.player.setEntityHealth(this.player.getHealth() + var1);
+
+ if (this.player.getHealth() > this.maxHealth)
+ {
+ this.player.setEntityHealth(this.maxHealth);
+ }
+
+ this.updatePlayerClientInfo();
+ }
+ }
+
+ public void updatePlayerClientInfo()
+ {
+ if (!this.player.worldObj.isRemote)
+ {
+ MinecraftServer var1 = FMLCommonHandler.instance().getMinecraftServerInstance();
+ ServerConfigurationManager var2 = var1.getConfigurationManager();
+ PlayerClientInfo var3 = new PlayerClientInfo(this.player.getHealth(), this.maxHealth, this.player.getFoodStats().getFoodLevel(), this.player.getTotalArmorValue(), this.getCoins());
+ Aether.proxy.getPlayerClientInfo().put(this.player.username, var3);
+ PartyMember var4 = PartyController.instance().getMember(this.player.username);
+ Party var5 = PartyController.instance().getParty(var4);
+
+ for (int var6 = 0; var6 < var2.playerEntityList.size(); ++var6)
+ {
+ EntityPlayerMP var7 = (EntityPlayerMP) var2.playerEntityList.get(var6);
+ PartyMember var8 = PartyController.instance().getMember((EntityPlayer) var7);
+ var7.playerNetServerHandler.sendPacketToPlayer(AetherPacketHandler.sendPlayerClientInfo(false, true, this.player.username, var3));
+ }
+
+ this.player.playerNetServerHandler.sendPacketToPlayer(AetherPacketHandler.sendPlayerClientInfo(false, true, this.player.username, var3));
+ }
+ }
+
+ public void increaseMaxHP(int var1)
+ {
+ if (this.maxHealth <= 40 - var1)
+ {
+ if (!this.player.worldObj.isRemote)
+ {
+ PacketDispatcher.sendPacketToAllPlayers(AetherPacketHandler.sendHeartChange(false, true, this.maxHealth + var1, Collections.singleton(this.player.username)));
+ }
+
+ this.maxHealth += var1;
+ this.player.setEntityHealth(this.player.getHealth() + var1);
+ }
+ }
+
+ public void beforeWriteEntityToNBT(NBTTagCompound var1)
+ {
+ var1.setInteger("MaxHealth", this.maxHealth);
+ var1.setTag("AetherInventory", this.inv.writeToNBT(new NBTTagList()));
+ var1.setBoolean("HasDefeatedSunSpirit", this.hasDefeatedSunSpirit);
+ var1.setBoolean("inAether", this.player.dimension == 3);
+ var1.setInteger("GeneralCooldown", this.generalcooldown);
+ var1.setInteger("GeneralCooldownMax", this.generalcooldownmax);
+ var1.setString("CooldownName", this.cooldownName);
+ var1.setInteger("Coins", this.coinAmount);
+ var1.setDouble("NondungeonPosX", this.nondungeonPosX);
+ var1.setDouble("NondungeonPosY", this.nondungeonPosY);
+ var1.setDouble("NondungeonPosZ", this.nondungeonPosZ);
+ var1.setDouble("DungeonPosX", this.dungeonPosX);
+ var1.setDouble("DungeonPosY", this.dungeonPosY);
+ var1.setDouble("DungeonPosZ", this.dungeonPosZ);
+ }
+
+ public void beforeReadEntityFromNBT(NBTTagCompound var1)
+ {
+ if (!this.player.worldObj.isRemote)
+ {
+ File var2 = new File(((SaveHandler) this.player.worldObj.getSaveHandler()).getWorldDirectoryName(), "aether.dat");
+
+ if (var2.exists())
+ {
+ new NBTTagCompound();
+
+ try
+ {
+ NBTTagCompound var3 = CompressedStreamTools.readCompressed(new FileInputStream(var2));
+ this.maxHealth = var3.getInteger("MaxHealth");
+ NBTTagList var4 = var3.getTagList("Inventory");
+
+ if (this.player.dimension == 3)
+ {
+ this.player.dimension = 3;
+ }
+
+ this.inv.readFromNBT(var4);
+ var2.delete();
+ } catch (IOException var5)
+ {
+ ;
+ }
+ } else
+ {
+ System.out.println("Failed to read player data. Making new");
+ this.maxHealth = var1.getInteger("MaxHealth");
+ NBTTagList var6 = var1.getTagList("AetherInventory");
+ this.hasDefeatedSunSpirit = var1.getBoolean("HasDefeatedSunSpirit");
+
+ if (var1.getBoolean("inAether"))
+ {
+ this.player.dimension = 3;
+ }
+
+ this.generalcooldown = var1.getInteger("GeneralCooldown");
+ this.generalcooldownmax = var1.getInteger("GeneralCooldownMax");
+ this.cooldownName = var1.getString("CooldownName");
+ this.coinAmount = var1.getInteger("Coins");
+ this.nondungeonPosX = var1.getDouble("NondungeonPosX");
+ this.nondungeonPosY = var1.getDouble("NondungeonPosY");
+ this.nondungeonPosZ = var1.getDouble("NondungeonPosZ");
+ this.dungeonPosX = var1.getDouble("DungeonPosX");
+ this.dungeonPosY = var1.getDouble("DungeonPosY");
+ this.dungeonPosZ = var1.getDouble("DungeonPosZ");
+ this.inv.readFromNBT(var6);
+ }
+ }
+ }
+
+ public void onDefeatSunSpirit()
+ {
+ this.setHasDefeatedSunSpirit(true);
+ }
+
+ public void setHasDefeatedSunSpirit(boolean var1)
+ {
+ this.hasDefeatedSunSpirit = var1;
+ }
+
+ public boolean getHasDefeatedSunSpirit()
+ {
+ return this.hasDefeatedSunSpirit;
+ }
+
+ public float getCurrentPlayerStrVsBlock(Block var1, boolean var2)
+ {
+ ItemStack var3 = this.player.inventory.getCurrentItem();
+ float var4 = var3 == null ? 1.0F : var3.getItem().getStrVsBlock(var3, var1, 0);
+
+ if (this.inv.slots[0] != null && this.inv.slots[0].itemID == AetherItems.ZanitePendant.itemID)
+ {
+ var4 *= 1.0F + (float) this.inv.slots[0].getItemDamage() / ((float) this.inv.slots[0].getMaxDamage() * 3.0F);
+ }
+
+ if (this.inv.slots[4] != null && this.inv.slots[4].itemID == AetherItems.ZaniteRing.itemID)
+ {
+ var4 *= 1.0F + (float) this.inv.slots[4].getItemDamage() / ((float) this.inv.slots[4].getMaxDamage() * 3.0F);
+ }
+
+ if (this.inv.slots[5] != null && this.inv.slots[5].itemID == AetherItems.ZaniteRing.itemID)
+ {
+ var4 *= 1.0F + (float) this.inv.slots[5].getItemDamage() / ((float) this.inv.slots[5].getMaxDamage() * 3.0F);
+ }
+
+ if (!this.wearingNeptuneArmour())
+ {
+ return var4 == -1.0F ? super.getCurrentPlayerStrVsBlock(var1, var2) : var4;
+ } else
+ {
+ if (var4 > 1.0F)
+ {
+ int var5 = EnchantmentHelper.getEfficiencyModifier(this.player);
+ ItemStack var6 = this.player.inventory.getCurrentItem();
+
+ if (var5 > 0 && var6 != null)
+ {
+ float var7 = (float) (var5 * var5 + 1);
+ boolean var8 = ForgeHooks.canToolHarvestBlock(var1, 0, var6);
+
+ if (!var8 && var4 <= 1.0F)
+ {
+ var4 += var7 * 0.08F;
+ } else
+ {
+ var4 += var7;
+ }
+ }
+ }
+
+ if (this.player.isPotionActive(Potion.digSpeed))
+ {
+ var4 *= 1.0F + (float) (this.player.getActivePotionEffect(Potion.digSpeed).getAmplifier() + 1) * 0.2F;
+ }
+
+ if (this.player.isPotionActive(Potion.digSlowdown))
+ {
+ var4 *= 1.0F - (float) (this.player.getActivePotionEffect(Potion.digSlowdown).getAmplifier() + 1) * 0.2F;
+ }
+
+ var4 = ForgeEventFactory.getBreakSpeed(this.player, var1, 0, var4);
+ return var4 < 0.0F ? 0.0F : var4;
+ }
+ }
+
+ public boolean isInWater()
+ {
+ return this.wearingNeptuneArmour() ? false : super.isInWater();
+ }
+
+ public MovingObjectPosition rayTrace(double var1, float var3)
+ {
+ ItemStack var4 = this.player.getCurrentEquippedItem();
+
+ if (var4 != null && var4.getItem() != null && this.extendedReachItems.contains(var4.getItem()))
+ {
+ var1 = 10.0D;
+ }
+
+ return this.player.superRayTrace(var1, var3);
+ }
+
+ public int getAccessoryCount(int var1)
+ {
+ int var2 = 0;
+
+ for (int var3 = 0; var3 < 8; ++var3)
+ {
+ if (this.inv.slots[var3] != null && this.inv.slots[var3].itemID == var1)
+ {
+ ++var2;
+ }
+ }
+
+ return var2;
+ }
+
+ public boolean wearingAccessory(int var1)
+ {
+ for (int var2 = 0; var2 < 8; ++var2)
+ {
+ if (this.inv.slots[var2] != null && this.inv.slots[var2].itemID == var1)
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public void setSlotStack(int var1, ItemStack var2)
+ {
+ this.inv.slots[var1] = var2;
+ }
+
+ public ItemStack getSlotStack(int var1)
+ {
+ ItemStack var2 = null;
+
+ for (int var3 = 0; var3 < 8; ++var3)
+ {
+ if (this.inv.slots[var3] != null && this.inv.slots[var3].itemID == var1)
+ {
+ var2 = this.inv.slots[var3];
+ return var2;
+ }
+ }
+
+ return var2;
+ }
+
+ public int getSlotIndex(int var1)
+ {
+ for (int var2 = 0; var2 < 8; ++var2)
+ {
+ if (this.inv.slots[var2] != null && this.inv.slots[var2].itemID == var1)
+ {
+ return var2;
+ }
+ }
+
+ return 0;
+ }
+
+ public boolean wearingArmour(int var1)
+ {
+ for (int var2 = 0; var2 < 4; ++var2)
+ {
+ if (this.player.inventory.armorInventory[var2] != null && this.player.inventory.armorInventory[var2].itemID == var1)
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public float getSinage()
+ {
+ return this.sinage;
+ }
+
+ public boolean wearingNeptuneArmour()
+ {
+ return this.wearingArmour(AetherItems.NeptuneHelmet.itemID) && this.wearingArmour(AetherItems.NeptuneChestplate.itemID) && this.wearingArmour(AetherItems.NeptuneLeggings.itemID) && this.wearingArmour(AetherItems.NeptuneBoots.itemID) && this.wearingAccessory(AetherItems.NeptuneGloves.itemID);
+ }
+
+ public boolean wearingValkyrieArmour()
+ {
+ return this.wearingArmour(AetherItems.ValkyrieHelmet.itemID) && this.wearingArmour(AetherItems.ValkyrieChestplate.itemID) && this.wearingArmour(AetherItems.ValkyrieLeggings.itemID) && this.wearingArmour(AetherItems.ValkyrieBoots.itemID) && this.wearingAccessory(AetherItems.ValkyrieGloves.itemID);
+ }
+
+ public boolean wearingObsidianArmour()
+ {
+ return this.wearingArmour(AetherItems.ObsidianHelmet.itemID) && this.wearingArmour(AetherItems.ObsidianChestplate.itemID) && this.wearingArmour(AetherItems.ObsidianLeggings.itemID) && this.wearingArmour(AetherItems.ObsidianBoots.itemID) && this.wearingAccessory(AetherItems.ObsidianGloves.itemID);
+ }
+
+ public boolean wearingPhoenixArmour()
+ {
+ return this.wearingArmour(AetherItems.PhoenixHelmet.itemID) && this.wearingArmour(AetherItems.PhoenixChestplate.itemID) && this.wearingArmour(AetherItems.PhoenixLeggings.itemID) && this.wearingArmour(AetherItems.PhoenixBoots.itemID) && this.wearingAccessory(AetherItems.PhoenixGloves.itemID);
+ }
+
+ public boolean wearingGravititeArmour()
+ {
+ return this.wearingArmour(AetherItems.GravititeHelmet.itemID) && this.wearingArmour(AetherItems.GravititeChestplate.itemID) && this.wearingArmour(AetherItems.GravititeLeggings.itemID) && this.wearingArmour(AetherItems.GravititeBoots.itemID) && this.wearingAccessory(AetherItems.GravititeGloves.itemID);
+ }
+
+ public void setCoinAmount(int var1)
+ {
+ this.coinAmount = var1;
+
+ if (!this.player.worldObj.isRemote)
+ {
+ this.player.playerNetServerHandler.sendPacketToPlayer(AetherPacketHandler.sendCoinChange(false, true, this.coinAmount, Collections.singleton(this.player.username)));
+ }
+ }
+
+ public void setInPortal()
+ {
+ int var1 = MathHelper.floor_double(this.player.posX);
+ int var2 = MathHelper.floor_double(this.player.posY);
+ int var3 = MathHelper.floor_double(this.player.posZ);
+
+ if (this.timeUntilPortal > 0)
+ {
+ this.timeUntilPortal = 900;
+ } else
+ {
+ double var10000 = this.player.prevPosX - this.player.posX;
+ var10000 = this.player.prevPosZ - this.player.posZ;
+ this.inPortal = true;
+ }
+ }
+
+ public boolean isInPortal()
+ {
+ return this.inPortal;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/ServerTickHandler.java b/src/main/java/net/aetherteam/aether/ServerTickHandler.java
new file mode 100644
index 0000000..3b347e9
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/ServerTickHandler.java
@@ -0,0 +1,94 @@
+package net.aetherteam.aether;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.ITickHandler;
+import cpw.mods.fml.common.TickType;
+import cpw.mods.fml.common.network.PacketDispatcher;
+
+import java.util.EnumSet;
+import java.util.Iterator;
+import java.util.List;
+
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.packets.AetherPacketHandler;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.aetherteam.aether.tile_entities.TileEntityEntranceController;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.server.MinecraftServer;
+import net.minecraft.server.management.ServerConfigurationManager;
+import net.minecraft.world.World;
+
+public class ServerTickHandler implements ITickHandler
+{
+ public World lastWorld = null;
+ public boolean needPreGen = true;
+
+ public String getLabel()
+ {
+ return null;
+ }
+
+ public void tickEnd(EnumSet type, Object[] tickData)
+ {
+ if (type.equals(EnumSet.of(TickType.SERVER)))
+ {
+ for (Dungeon dungeon : DungeonHandler.instance().getInstances())
+ {
+ if ((dungeon.timerStarted()) && (dungeon.timerFinished()))
+ {
+ MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
+ ServerConfigurationManager configManager = server.getConfigurationManager();
+
+ Party party = dungeon.getQueuedParty();
+
+ EntityPlayer partyLeader = null;
+
+ if (party != null)
+ {
+ for (Iterator i$ = configManager.playerEntityList.iterator(); i$.hasNext(); )
+ {
+ Object obj = i$.next();
+
+ if (((obj instanceof EntityPlayer)) && (party.hasMember(PartyController.instance().getMember((EntityPlayer) obj))))
+ {
+ if (((EntityPlayer) obj).username.equalsIgnoreCase(party.getLeader().username))
+ {
+ partyLeader = (EntityPlayer) obj;
+ }
+ }
+ }
+
+ if (partyLeader != null)
+ {
+ TileEntityEntranceController controller = (TileEntityEntranceController) partyLeader.worldObj.getBlockTileEntity(dungeon.getControllerX(), dungeon.getControllerY(), dungeon.getControllerZ());
+
+ DungeonHandler.instance().finishDungeon(dungeon, party, controller, false);
+
+ PacketDispatcher.sendPacketToAllPlayers(AetherPacketHandler.sendDungeonFinish(dungeon, controller, party));
+ }
+
+ return;
+ }
+ }
+ }
+ }
+ }
+
+ public EnumSet ticks()
+ {
+ return EnumSet.of(TickType.SERVER);
+ }
+
+ public void tickStart(EnumSet type, Object[] tickData)
+ {
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.ServerTickHandler
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/achievements/AetherACPage.java b/src/main/java/net/aetherteam/aether/achievements/AetherACPage.java
new file mode 100644
index 0000000..a505b0c
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/achievements/AetherACPage.java
@@ -0,0 +1,24 @@
+package net.aetherteam.aether.achievements;
+
+import java.util.Random;
+
+import net.minecraft.stats.Achievement;
+import net.minecraftforge.common.AchievementPage;
+
+public class AetherACPage extends AchievementPage
+{
+ public AetherACPage(Achievement[] pages)
+ {
+ super("Aether", pages);
+ }
+
+ public int bgGetSprite(Random random, int i, int j)
+ {
+ return 0;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.achievements.AetherACPage
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/achievements/AetherAchievements.java b/src/main/java/net/aetherteam/aether/achievements/AetherAchievements.java
new file mode 100644
index 0000000..daba3bb
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/achievements/AetherAchievements.java
@@ -0,0 +1,31 @@
+package net.aetherteam.aether.achievements;
+
+import cpw.mods.fml.common.registry.LanguageRegistry;
+
+public class AetherAchievements
+{
+ public static final int acOff = 800;
+
+ public static void init()
+ {
+ }
+
+ private static void addAchievementDetails(String achievement, String name, String desc)
+ {
+ }
+
+ private static void addAchievementName(String achievement, String name)
+ {
+ LanguageRegistry.instance().addStringLocalization("achievement." + achievement, "en_US", name);
+ }
+
+ private static void addAchievementDesc(String achievement, String desc)
+ {
+ LanguageRegistry.instance().addStringLocalization("achievement." + achievement + ".desc", "en_US", desc);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.achievements.AetherAchievements
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/blocks/AEBlock.java b/src/main/java/net/aetherteam/aether/blocks/AEBlock.java
new file mode 100644
index 0000000..1f4166a
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/AEBlock.java
@@ -0,0 +1,20 @@
+package net.aetherteam.aether.blocks;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import net.minecraft.item.ItemBlock;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.FIELD})
+public @interface AEBlock
+{
+
+ Class itemBlock() default ItemBlock.class;
+
+ String name() default "";
+
+ String[] names() default {};
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/AetherBlocks.java b/src/main/java/net/aetherteam/aether/blocks/AetherBlocks.java
new file mode 100644
index 0000000..94a1452
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/AetherBlocks.java
@@ -0,0 +1,518 @@
+package net.aetherteam.aether.blocks;
+
+import cpw.mods.fml.common.registry.GameRegistry;
+import cpw.mods.fml.common.registry.LanguageRegistry;
+
+import java.lang.reflect.Field;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.items.ItemBlockAercloud;
+import net.aetherteam.aether.items.ItemBlockAetherGrass;
+import net.aetherteam.aether.items.ItemBlockAetherLog;
+import net.aetherteam.aether.items.ItemBlockBronzeDoor;
+import net.aetherteam.aether.items.ItemBlockChristmasLeaves;
+import net.aetherteam.aether.items.ItemBlockCrystalLeaves;
+import net.aetherteam.aether.items.ItemBlockDungeon;
+import net.aetherteam.aether.items.ItemBlockDungeonHolystone;
+import net.aetherteam.aether.items.ItemBlockEntrance;
+import net.aetherteam.aether.items.ItemBlockHolystone;
+import net.aetherteam.aether.items.ItemBlockQuicksoil;
+import net.aetherteam.aether.items.ItemBlockTrap;
+import net.aetherteam.aether.worldgen.AetherGenLargeTree;
+import net.aetherteam.aether.worldgen.AetherGenMassiveTree;
+import net.aetherteam.aether.worldgen.AetherGenNormalTree;
+import net.aetherteam.aether.worldgen.AetherGenPurpleTree;
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.common.MinecraftForge;
+
+public class AetherBlocks
+{
+ @AEBlock(
+ name = "Aether Portal")
+ public static BlockAetherPortal AetherPortal;
+ public static int AetherPortalID = 165;
+ @AEBlock(
+ name = "Aether Dirt")
+ public static Block AetherDirt;
+ public static int AetherDirtID = 166;
+ @AEBlock(
+ names = {"Aether Grass", "\u00a7bEnchanted Aether Grass"},
+ itemBlock = ItemBlockAetherGrass.class)
+ public static Block AetherGrass;
+ public static int AetherGrassID = 167;
+ @AEBlock(
+ name = "Quicksoil",
+ itemBlock = ItemBlockQuicksoil.class)
+ public static Block Quicksoil;
+ public static int QuicksoilID = 168;
+ @AEBlock(
+ names = {"Holystone", "Mossy Holystone"},
+ itemBlock = ItemBlockHolystone.class)
+ public static Block Holystone;
+ public static int HolystoneID = 169;
+ @AEBlock(
+ name = "Icestone")
+ public static Block Icestone;
+ public static int IcestoneID = 170;
+ @AEBlock(
+ names = {"Cold Aercloud", "Blue Aercloud", "Golden Aercloud", "Green Aercloud", "Storm Aercloud", "Purple Aercloud"},
+ itemBlock = ItemBlockAercloud.class)
+ public static Block Aercloud;
+ public static int AercloudID = 171;
+ @AEBlock(
+ name = "Aerogel")
+ public static Block Aerogel;
+ public static int AerogelID = 172;
+ @AEBlock(
+ name = "Altar")
+ public static Block Altar;
+ public static int AltarID = 173;
+ @AEBlock(
+ name = "Incubator")
+ public static Block Incubator;
+ public static int IncubatorID = 174;
+ @AEBlock(
+ names = {"Skyroot Log", "Golden Oak Log"},
+ itemBlock = ItemBlockAetherLog.class)
+ public static Block AetherLog;
+ public static int AetherLogID = 175;
+ @AEBlock(
+ name = "Skyroot Plank")
+ public static Block SkyrootPlank;
+ public static int SkyrootPlankID = 176;
+ @AEBlock(
+ name = "Green Skyroot Leaves")
+ public static Block GreenSkyrootLeaves;
+ public static int GreenSkyrootLeavesID = 177;
+ @AEBlock(
+ name = "Golden Oak Leaves")
+ public static Block GoldenOakLeaves;
+ public static int GoldenOakLeavesID = 178;
+ @AEBlock(
+ name = "Green Skyroot Sapling")
+ public static Block GreenSkyrootSapling;
+ public static int GreenSkyrootSaplingID = 179;
+ @AEBlock(
+ name = "Golden Oak Sapling")
+ public static Block GoldenOakSapling;
+ public static int GoldenOakSaplingID = 180;
+ @AEBlock(
+ name = "Ambrosium Ore")
+ public static Block AmbrosiumOre;
+ public static int AmbrosiumOreID = 181;
+ @AEBlock(
+ name = "Ambrosium Torch")
+ public static Block AmbrosiumTorch;
+ public static int AmbrosiumTorchID = 182;
+ @AEBlock(
+ name = "Zanite Ore")
+ public static Block ZaniteOre;
+ public static int ZaniteOreID = 183;
+ @AEBlock(
+ name = "Gravitite Ore")
+ public static Block GravititeOre;
+ public static int GravititeOreID = 184;
+ @AEBlock(
+ name = "Enchanted Gravitite")
+ public static Block EnchantedGravitite;
+ public static int EnchantedGravititeID = 185;
+ @AEBlock(
+ names = {"Carved Trap", "Angelic Trap", "Hellfire Trap"},
+ itemBlock = ItemBlockTrap.class)
+ public static Block Trap;
+ public static int TrapID = 186;
+ @AEBlock(
+ name = "Chest Mimic")
+ public static Block SkyrootChestMimic;
+ public static int SkyrootChestMimicID = 187;
+ @AEBlock(
+ name = "Treasure Chest")
+ public static Block TreasureChest;
+ public static int TreasureChestID = 188;
+ @AEBlock(
+ names = {"Carved Stone", "Angelic Stone", "Hellfire Stone"},
+ itemBlock = ItemBlockDungeon.class)
+ public static Block DungeonStone;
+ public static int DungeonStoneID = 189;
+ @AEBlock(
+ names = {"Sentry Stone", "Light Angelic Stone", "Light Hellfire Stone"},
+ itemBlock = ItemBlockDungeon.class)
+ public static Block LightDungeonStone;
+ public static int LightDungeonStoneID = 190;
+ @AEBlock(
+ names = {"Locked Carved Stone", "Locked Angelic Stone", "Locked Hellfire Stone"},
+ itemBlock = ItemBlockDungeon.class)
+ public static Block LockedDungeonStone;
+ public static int LockedDungeonStoneID = 191;
+ @AEBlock(
+ names = {"Locked Sentry Stone", "Locked Light Angelic Stone", "Locked Light Hellfire Stone"},
+ itemBlock = ItemBlockDungeon.class)
+ public static Block LockedLightDungeonStone;
+ public static int LockedLightDungeonStoneID = 192;
+ @AEBlock(
+ names = {"Pillar", "Pillar Top", "Pillar Bottom"},
+ itemBlock = ItemBlockDungeon.class)
+ public static Block Pillar;
+ public static int PillarID = 193;
+ @AEBlock(
+ name = "Zanite Block")
+ public static Block ZaniteBlock;
+ public static int ZaniteBlockID = 194;
+ @AEBlock(
+ name = "Quicksoil Glass")
+ public static Block QuicksoilGlass;
+ public static int QuicksoilGlassID = 195;
+ @AEBlock(
+ name = "Freezer")
+ public static Block Freezer;
+ public static int FreezerID = 196;
+ @AEBlock(
+ name = "White Flower")
+ public static Block WhiteFlower;
+ public static int WhiteFlowerID = 197;
+ @AEBlock(
+ name = "Purple Flower")
+ public static Block PurpleFlower;
+ public static int PurpleFlowerID = 198;
+ @AEBlock(
+ names = {"Christmas Leaves", "Decorative Leaves"},
+ itemBlock = ItemBlockChristmasLeaves.class)
+ public static Block ChristmasLeaves;
+ public static int ChristmasLeavesID = 199;
+ @AEBlock(
+ name = "Present")
+ public static Block Present;
+ public static int PresentID = 200;
+ @AEBlock(
+ name = "Berry Bush")
+ public static Block BerryBush;
+ public static int BerryBushID = 201;
+ @AEBlock(
+ name = "Berry Bush Stem")
+ public static Block BerryBushStem;
+ public static int BerryBushStemID = 202;
+ @AEBlock(
+ names = {"Crystal Leaves", "Crystal Fruit Leaves"},
+ itemBlock = ItemBlockCrystalLeaves.class)
+ public static Block CrystalLeaves;
+ public static int CrystalLeavesID = 203;
+ @AEBlock(
+ name = "Mossy Holystone Stairs")
+ public static Block MossyHolystoneStairs;
+ public static int MossyHolystoneStairsID = 204;
+ @AEBlock(
+ name = "Icestone Stairs")
+ public static Block IcestoneStairs;
+ public static int IcestoneStairsID = 205;
+ @AEBlock(
+ name = "Skyroot Stairs")
+ public static Block SkyrootStairs;
+ public static int SkyrootStairsID = 206;
+ @AEBlock(
+ name = "Carved Stairs")
+ public static Block CarvedStairs;
+ public static int CarvedStairsID = 207;
+ @AEBlock(
+ name = "Angelic Stairs")
+ public static Block AngelicStairs;
+ public static int AngelicStairsID = 208;
+ @AEBlock(
+ name = "Hellfire Stairs")
+ public static Block HellfireStairs;
+ public static int HellfireStairsID = 209;
+ @AEBlock(
+ name = "Holystone Fence")
+ public static Block HolystoneWall;
+ public static int HolystoneWallID = 210;
+ @AEBlock(
+ name = "Mossy Holystone Wall")
+ public static Block MossyHolystoneWall;
+ public static int MossyHolystoneWallID = 211;
+ @AEBlock(
+ name = "Icestone Wall")
+ public static Block IcestoneWall;
+ public static int IcestoneWallID = 212;
+ @AEBlock(
+ name = "Skyroot Fence")
+ public static Block SkyrootFence;
+ public static int SkyrootFenceID = 213;
+ @AEBlock(
+ name = "Carved Wall")
+ public static Block CarvedWall;
+ public static int CarvedWallID = 214;
+ @AEBlock(
+ name = "Angelic Wall")
+ public static Block AngelicWall;
+ public static int AngelicWallID = 215;
+ @AEBlock(
+ name = "Hellfire Wall")
+ public static Block HellfireWall;
+ public static int HellfireWallID = 216;
+ @AEBlock(
+ name = "Holystone Brick")
+ public static Block HolystoneBrick;
+ public static int HolystoneBrickID = 217;
+ @AEBlock(
+ name = "Blue Skyroot Leaves")
+ public static Block BlueSkyrootLeaves;
+ public static int BlueSkyrootLeavesID = 218;
+ @AEBlock(
+ name = "Skyroot Log Wall")
+ public static Block SkyrootLogWall;
+ public static int SkyrootLogWallID = 219;
+ @AEBlock(
+ name = "Tall Aether Grass")
+ public static Block TallAetherGrass;
+ public static int TallAetherGrassID = 220;
+ @AEBlock(
+ name = "Dark Blue Skyroot Leaves")
+ public static Block DarkBlueSkyrootLeaves;
+ public static int DarkBlueSkyrootLeavesID = 221;
+ @AEBlock(
+ name = "Blue Skyroot Sapling")
+ public static Block BlueSkyrootSapling;
+ public static int BlueSkyrootSaplingID = 222;
+ @AEBlock(
+ name = "Skyroot Chest")
+ public static Block SkyrootChest;
+ public static int SkyrootChestID = 223;
+ @AEBlock(
+ name = "Bronze Door Controller")
+ public static Block BronzeDoorController;
+ public static int BronzeDoorControllerID = 224;
+ @AEBlock(
+ name = "Purple Skyroot Leaves")
+ public static Block PurpleSkyrootLeaves;
+ public static int PurpleSkyrootLeavesID = 225;
+ @AEBlock(
+ name = "Purple Skyroot Sapling")
+ public static Block PurpleSkyrootSapling;
+ public static int PurpleSkyrootSaplingID = 226;
+ @AEBlock(
+ name = "Orange Fruit Tree Sapling")
+ public static Block BlockOrangeTree;
+ public static int OrangeFruitTreeID = 227;
+ @AEBlock(
+ names = {"Bronze Door", "Bronze Door Lock"},
+ itemBlock = ItemBlockBronzeDoor.class)
+ public static Block BronzeDoor;
+ public static int BronzeDoorID = 228;
+ @AEBlock(
+ name = "Continuum Ore")
+ public static Block ContinuumOre;
+ public static int ContinuumOreID = 229;
+ @AEBlock(
+ name = "Dark Blue Skyroot Sapling")
+ public static Block DarkBlueSkyrootSapling;
+ public static int DarkBlueSkyrootSaplingID = 230;
+ @AEBlock(
+ name = "Skyroot Crafting Table")
+ public static Block SkyrootCraftingTable;
+ public static int SkyrootCraftingTableID = 231;
+ @AEBlock(
+ names = {"Dungeon Entrance", "Dungeon Entrance Lock"},
+ itemBlock = ItemBlockEntrance.class)
+ public static Block DungeonEntrance;
+ public static int DungeonEntranceID = 232;
+ @AEBlock(
+ name = "Dungeon Entrance Controller")
+ public static Block DungeonEntranceController;
+ public static int DungeonEntranceControllerID = 233;
+ @AEBlock(
+ names = {"Dungeon Holystone", "Dungeon Mossy Holystone"},
+ itemBlock = ItemBlockDungeonHolystone.class)
+ public static Block DungeonHolystone;
+ public static int DungeonHolystoneID = 234;
+ @AEBlock(
+ name = "Locked Carved Stone Stairs")
+ public static Block CarvedDungeonStairs;
+ public static int CarvedDungeonStairsID = 235;
+ @AEBlock(
+ name = "Locked Carved Stone Wall")
+ public static Block CarvedDungeonWall;
+ public static int CarvedDungeonWallID = 236;
+ @AEBlock(
+ name = "Holystone Stairs")
+ public static Block HolystoneStairs;
+ public static int HolystoneStairsID = 237;
+ @AEBlock(
+ name = "Cold Fire")
+ public static BlockColdFire ColdFire;
+ public static int ColdFireID = 238;
+ public static int altarRenderId;
+ public static int treasureChestRenderId;
+ public static int skyrootChestRenderId;
+ public static int entranceRenderId;
+ public static String terrainCat = "Aether Terrain";
+
+ public static void init()
+ {
+ AetherPortal = (BlockAetherPortal) (new BlockAetherPortal(makeTerrainID(terrainCat, "AetherPortal", AetherPortalID))).setUnlocalizedName("Aether:Aether Portal").setLightValue(0.75F).setCreativeTab(Aether.blocks);
+ AetherDirt = (new BlockAetherDirt(makeTerrainID(terrainCat, "Aether Dirt", AetherDirtID))).setIconName("Aether Dirt").setCreativeTab(Aether.blocks);
+ AetherGrass = (new BlockAetherGrass(makeTerrainID(terrainCat, "Aether Grass", AetherGrassID))).setIconName("Aether Grass").setCreativeTab(Aether.blocks);
+ Quicksoil = (new BlockQuicksoil(makeTerrainID(terrainCat, "Quicksoil", QuicksoilID))).setIconName("Quicksoil").setCreativeTab(Aether.blocks);
+ Holystone = (new BlockHolystone(makeTerrainID(terrainCat, "Holystone", HolystoneID))).setIconName("Holystone").setCreativeTab(Aether.blocks);
+ Icestone = (new BlockIcestone(makeID("Icestone", IcestoneID))).setIconName("Icestone").setCreativeTab(Aether.blocks);
+ Aercloud = (new BlockAercloud(makeID("Aercloud", AercloudID))).setIconName("Aercloud").setCreativeTab(Aether.blocks);
+ Aerogel = (new BlockAerogel(makeID("Aerogel", AerogelID))).setIconName("Aerogel").setCreativeTab(Aether.blocks);
+ Altar = (new BlockAltar(makeID("Altar", AltarID))).setIconName("Altar").setCreativeTab(Aether.blocks);
+ Incubator = (new BlockIncubator(makeID("Incubator", IncubatorID))).setIconName("Incubator").setCreativeTab(Aether.blocks);
+ AetherLog = (new BlockAetherLog(makeID("Skyroot Log", AetherLogID))).setIconName("Skyroot Log").setCreativeTab(Aether.blocks);
+ SkyrootPlank = (new BlockAetherPlank(makeID("Skyroot Plank", SkyrootPlankID), Material.wood)).setIconName("Skyroot Plank").setCreativeTab(Aether.blocks);
+ GreenSkyrootLeaves = (new BlockAetherLeaves(makeID("Green Skyroot Leaves", GreenSkyrootLeavesID), GreenSkyrootSaplingID)).setIconName("Green Skyroot Leaves").setCreativeTab(Aether.blocks);
+ GoldenOakLeaves = (new BlockAetherLeaves(makeID("Golden Oak Leaves", GoldenOakLeavesID), GoldenOakSaplingID)).setIconName("Golden Oak Leaves").setCreativeTab(Aether.blocks);
+ GreenSkyrootSapling = (new BlockAetherSapling(GreenSkyrootSaplingID, new AetherGenNormalTree(GreenSkyrootLeaves.blockID, AetherLog.blockID, 0))).setIconName("Green Skyroot Sapling").setCreativeTab(Aether.blocks);
+ GoldenOakSapling = (new BlockAetherSapling(GoldenOakSaplingID, new AetherGenLargeTree(GoldenOakLeaves.blockID, AetherLog.blockID, 2))).setIconName("Golden Oak Sapling").setCreativeTab(Aether.blocks);
+ AmbrosiumOre = (new BlockAmbrosiumOre(makeID("Ambrosium Ore", AmbrosiumOreID))).setIconName("Ambrosium Ore").setCreativeTab(Aether.blocks);
+ AmbrosiumTorch = (new BlockAmbrosiumTorch(makeID("Ambrosium Torch", AmbrosiumTorchID))).setIconName("Ambrosium Torch").setCreativeTab(Aether.blocks);
+ ZaniteOre = (new BlockZaniteOre(makeID("Zanite Ore", ZaniteOreID))).setIconName("Zanite Ore").setCreativeTab(Aether.blocks);
+ GravititeOre = (new BlockFloating(makeID("Gravitite Ore", GravititeOreID), false)).setIconName("Gravitite Ore").setCreativeTab(Aether.blocks);
+ EnchantedGravitite = (new BlockEnchantedGravitite(makeID("Enchanted Gravitite", EnchantedGravititeID), true)).setIconName("Enchanted Gravitite").setCreativeTab(Aether.blocks);
+ Trap = (new BlockTrap(makeID("Trap", TrapID))).setIconName("Trap");
+ SkyrootChestMimic = (new BlockChestMimic(makeID("Chest Mimic", SkyrootChestMimicID))).setIconName("Chest Mimic").setCreativeTab(Aether.blocks);
+ TreasureChest = (new BlockTreasureChest(makeID("Treasure Chest", TreasureChestID), 29)).setIconName("Treasure Chest").setCreativeTab(Aether.blocks);
+ DungeonStone = (new BlockDungeon(makeID("Dungeon Stone", DungeonStoneID), 0.5F, 0.0F)).setIconName("Dungeon Stone").setCreativeTab(Aether.blocks);
+ LightDungeonStone = (new BlockDungeon(makeID("Light Dungeon Stone", LightDungeonStoneID), 0.5F, 0.75F)).setIconName("Light Dungeon Stone").setCreativeTab(Aether.blocks);
+ LockedDungeonStone = (new BlockDungeon(makeID("Locked Dungeon Stone", LockedDungeonStoneID), -1.0F, 0.0F, 1000000.0F)).setIconName("Locked Dungeon Stone").setCreativeTab(Aether.blocks);
+ LockedLightDungeonStone = (new BlockDungeon(makeID("Locked Light Dungeon Stone", LockedLightDungeonStoneID), -1.0F, 0.5F, 1000000.0F)).setIconName("Locked Light Dungeon Stone").setCreativeTab(Aether.blocks);
+ Pillar = (new BlockPillar(makeID("Pillar", PillarID))).setIconName("Pillar").setCreativeTab(Aether.blocks);
+ ZaniteBlock = (new BlockZanite(makeID("Zanite Block", ZaniteBlockID))).setIconName("Zanite Block").setCreativeTab(Aether.blocks);
+ QuicksoilGlass = (new BlockQuicksoilGlass(makeID("Quicksoil Glass", QuicksoilGlassID))).setIconName("Quicksoil Glass").setCreativeTab(Aether.blocks);
+ Freezer = (new BlockFreezer(makeID("Freezer", FreezerID))).setIconName("Freezer").setCreativeTab(Aether.blocks);
+ WhiteFlower = (new BlockAetherFlower(makeID("White Flower", WhiteFlowerID))).setIconName("White Flower").setCreativeTab(Aether.blocks);
+ PurpleFlower = (new BlockAetherFlower(makeID("Purple Flower", PurpleFlowerID))).setIconName("Purple Flower").setCreativeTab(Aether.blocks);
+ ChristmasLeaves = (new BlockChristmasLeaves(makeID("Christmas Leaves", ChristmasLeavesID))).setIconName("Christmas Leaves").setCreativeTab(Aether.blocks);
+ Present = (new BlockPresent(makeID("Present", PresentID))).setIconName("Present").setCreativeTab(Aether.blocks);
+ BerryBush = (new BlockBerryBush(makeID("Berry Bush", BerryBushID))).setIconName("Berry Bush").setCreativeTab(Aether.blocks);
+ BerryBushStem = (new BlockBerryBushStem(makeID("Berry Bush Stem", BerryBushStemID))).setIconName("Berry Bush Stem").setCreativeTab(Aether.blocks);
+ CrystalLeaves = (new BlockCrystalLeaves(makeID("Crystal Leaves", CrystalLeavesID))).setIconName("Crystal Leaves").setCreativeTab(Aether.blocks);
+ HolystoneStairs = (new BlockAetherStairs(makeID("Holystone Stairs", HolystoneStairsID), Holystone, 0)).setIconName("Holystone Stairs").setCreativeTab(Aether.blocks);
+ MossyHolystoneStairs = (new BlockAetherStairs(makeID("Mossy Holystone Stairs", MossyHolystoneStairsID), Holystone, 2)).setIconName("Mossy Holystone Stairs").setCreativeTab(Aether.blocks);
+ IcestoneStairs = (new BlockAetherStairs(makeID("Icestone Stairs", IcestoneStairsID), Icestone, 0)).setIconName("Icestone Stairs").setCreativeTab(Aether.blocks);
+ SkyrootStairs = (new BlockAetherStairs(makeID("Skyroot Stairs", SkyrootStairsID), SkyrootPlank, 0)).setIconName("Skyroot Stairs").setCreativeTab(Aether.blocks);
+ CarvedStairs = (new BlockAetherStairs(makeID("Carved Stone Stairs", CarvedStairsID), DungeonStone, 0)).setIconName("Carved Stone Stairs").setCreativeTab(Aether.blocks);
+ AngelicStairs = (new BlockAetherStairs(makeID("Angelic Stone Stairs", AngelicStairsID), DungeonStone, 1)).setIconName("Angelic Stone Stairs").setCreativeTab(Aether.blocks);
+ HellfireStairs = (new BlockAetherStairs(makeID("Hellfire Stone Stairs", HellfireStairsID), DungeonStone, 2)).setIconName("Hellfire Stone Stairs").setCreativeTab(Aether.blocks);
+ HolystoneWall = (new BlockAetherWall(makeID("Holystone Wall", HolystoneWallID), Holystone, 0)).setIconName("Holystone Wall").setCreativeTab(Aether.blocks);
+ MossyHolystoneWall = (new BlockAetherWall(makeID("Mossy Holystone Wall", MossyHolystoneWallID), Holystone, 2)).setIconName("Mossy Holystone Wall").setCreativeTab(Aether.blocks);
+ IcestoneWall = (new BlockAetherWall(makeID("Icestone Wall", IcestoneWallID), Icestone, 0)).setIconName("Icestone Wall").setCreativeTab(Aether.blocks);
+ SkyrootFence = (new BlockAetherFence(makeID("Skyroot Fence", SkyrootFenceID), SkyrootPlank, 0, Material.wood)).setIconName("Skyroot Fence").setHardness(2.0F).setResistance(5.0F).setStepSound(Block.soundWoodFootstep).setCreativeTab(Aether.blocks);
+ CarvedWall = (new BlockAetherWall(makeID("Carved Stone Wall", CarvedWallID), DungeonStone, 0)).setIconName("Carved Stone").setCreativeTab(Aether.blocks);
+ AngelicWall = (new BlockAetherWall(makeID("Angelic Stone Wall", AngelicWallID), DungeonStone, 1)).setIconName("Angelic Stone").setCreativeTab(Aether.blocks);
+ HellfireWall = (new BlockAetherWall(makeID("Hellfire Stone Wall", HellfireWallID), DungeonStone, 2)).setIconName("Hellfire Stone").setCreativeTab(Aether.blocks);
+ HolystoneBrick = (new BlockAether(makeID("Holystone Brick", HolystoneBrickID), Material.rock)).setIconName("Holystone Brick").setHardness(0.5F).setStepSound(Block.soundStoneFootstep).setCreativeTab(Aether.blocks);
+ SkyrootLogWall = (new BlockAetherWall(makeID("Skyroot Log Wall", SkyrootLogWallID), AetherLog, 0)).setIconName("Skyroot Log Wall").setCreativeTab(Aether.blocks);
+ TallAetherGrass = (new BlockTallAetherGrass(makeID("Tall Aether Grass", TallAetherGrassID))).setIconName("Tall Aether Grass").setCreativeTab(Aether.blocks);
+ DarkBlueSkyrootLeaves = (new BlockAetherLeaves(DarkBlueSkyrootLeavesID, DarkBlueSkyrootSaplingID)).setIconName("Dark Blue Skyroot Leaves").setCreativeTab(Aether.blocks);
+ BlueSkyrootSapling = (new BlockAetherSapling(BlueSkyrootSaplingID, new AetherGenNormalTree(BlueSkyrootLeavesID, AetherLog.blockID, 0))).setIconName("Blue Skyroot Sapling").setCreativeTab(Aether.blocks);
+ BlueSkyrootLeaves = (new BlockAetherLeaves(BlueSkyrootLeavesID, BlueSkyrootSaplingID)).setIconName("Blue Skyroot Leaves").setCreativeTab(Aether.blocks);
+ SkyrootChest = (new BlockSkyrootChest(makeID("Skyroot Chest", SkyrootChestID), 0)).setIconName("Skyroot Chest").setCreativeTab(Aether.blocks).setHardness(2.5F).setStepSound(Block.soundWoodFootstep);
+ BronzeDoorController = (new BlockBronzeDoorController(makeID("Bronze Door Lock", BronzeDoorControllerID))).setIconName("Bronze Door Lock");
+ PurpleSkyrootSapling = (new BlockAetherSapling(PurpleSkyrootSaplingID, new AetherGenPurpleTree(PurpleSkyrootLeavesID, 5, true))).setIconName("Purple Skyroot Sapling").setCreativeTab(Aether.blocks);
+ PurpleSkyrootLeaves = (new BlockAetherLeaves(PurpleSkyrootLeavesID, PurpleSkyrootSaplingID)).setIconName("Purple Skyroot Leaves").setCreativeTab(Aether.blocks);
+ BlockOrangeTree = (new BlockOrangeTree(makeID("BlockOrangeTree", OrangeFruitTreeID))).setIconName("BlockOrangeTree").setCreativeTab(Aether.blocks);
+ BronzeDoor = (new BlockBronzeDoor(makeID("Bronze Door", BronzeDoorID))).setIconName("Bronze Door").setCreativeTab(Aether.blocks);
+ ContinuumOre = (new BlockContinuumOre(makeID("Continuum Ore", ContinuumOreID))).setIconName("Continuum Ore").setCreativeTab(Aether.blocks);
+ DarkBlueSkyrootSapling = (new BlockAetherSapling(DarkBlueSkyrootSaplingID, new AetherGenMassiveTree(DarkBlueSkyrootLeaves.blockID, 8, true))).setIconName("Dark Blue Skyroot Sapling").setCreativeTab(Aether.blocks);
+ SkyrootCraftingTable = (new BlockSkyrootWorkbench(makeID("Skyroot Workbench", SkyrootCraftingTableID))).setHardness(2.5F).setStepSound(Block.soundWoodFootstep).setUnlocalizedName("Skyroot Workbench").setCreativeTab(Aether.blocks);
+ DungeonEntrance = (new BlockEntranceDoor(makeID("Dungeon Entrance", DungeonEntranceID))).setIconName("Dungeon Entrance");
+ DungeonEntranceController = (new BlockEntranceController(makeID("Dungeon Entrance Controller", DungeonEntranceControllerID))).setIconName("Dungeon Entrance Controller");
+ DungeonHolystone = (new BlockDungeonHolystone(makeID("Dungeon Holystone", DungeonHolystoneID))).setIconName("Dungeon Holystone");
+ CarvedDungeonWall = (new BlockLockedAetherWall(makeID("Locked Carved Stone Wall", CarvedDungeonWallID), DungeonStone, 0)).setIconName("Locked Carved Stone Wall").setBlockUnbreakable();
+ CarvedDungeonStairs = (new BlockLockedAetherStairs(makeID("Locked Carved Stone Stairs", CarvedDungeonStairsID), DungeonStone, 0)).setIconName("Locked Carved Stone Stairs").setBlockUnbreakable();
+ ColdFire = (BlockColdFire) (new BlockColdFire(makeID("Cold Fire", ColdFireID))).setIconName("Cold Fire").setBlockUnbreakable();
+ Block.blocksList[Block.bed.blockID] = null;
+ Block.blocksList[Block.bed.blockID] = (new BlockAetherBed(26)).setHardness(0.2F).setUnlocalizedName("bed");
+ registerBlocks();
+ addHarvestLevel();
+ }
+
+ public static void addHarvestLevel()
+ {
+ MinecraftForge.setBlockHarvestLevel(Holystone, "pickaxe", 0);
+ MinecraftForge.setBlockHarvestLevel(Icestone, "pickaxe", 3);
+ MinecraftForge.setBlockHarvestLevel(ZaniteOre, "pickaxe", 2);
+ MinecraftForge.setBlockHarvestLevel(GravititeOre, "pickaxe", 3);
+ MinecraftForge.setBlockHarvestLevel(AmbrosiumOre, "pickaxe", 0);
+ MinecraftForge.setBlockHarvestLevel(Quicksoil, "shovel", 0);
+ MinecraftForge.setBlockHarvestLevel(AetherDirt, "shovel", 0);
+ MinecraftForge.setBlockHarvestLevel(AetherGrass, "shovel", 0);
+ MinecraftForge.setBlockHarvestLevel(SkyrootChest, "axe", 0);
+ MinecraftForge.setBlockHarvestLevel(SkyrootCraftingTable, "axe", 0);
+ MinecraftForge.setBlockHarvestLevel(SkyrootFence, "axe", 0);
+ MinecraftForge.setBlockHarvestLevel(SkyrootLogWall, "axe", 0);
+ MinecraftForge.setBlockHarvestLevel(SkyrootPlank, "axe", 0);
+ MinecraftForge.setBlockHarvestLevel(SkyrootStairs, "axe", 0);
+ MinecraftForge.setBlockHarvestLevel(AetherLog, "axe", 0);
+ MinecraftForge.setBlockHarvestLevel(AetherLog, 1, "axe", 1);
+ }
+
+ public static boolean isGood(int var0, int var1)
+ {
+ return var0 == 0;
+ }
+
+ public static int makeID(String var0, int var1)
+ {
+ return Aether.getConfig().getBlock(var0, var1).getInt(var1);
+ }
+
+ public static int makeTerrainID(String var0, String var1, int var2)
+ {
+ return Aether.getConfig().getTerrainBlock(var0, var1, var2, "An Aether Terrain Block").getInt(var2);
+ }
+
+ public static void registerBlocks()
+ {
+ Field[] var0 = AetherBlocks.class.getDeclaredFields();
+ int var1 = var0.length;
+
+ for (int var2 = 0; var2 < var1; ++var2)
+ {
+ Field var3 = var0[var2];
+ AEBlock var4 = (AEBlock) var3.getAnnotation(AEBlock.class);
+
+ if (var4 != null && Block.class.isAssignableFrom(var3.getType()))
+ {
+ Block var5;
+
+ try
+ {
+ var5 = (Block) var3.get((Object) null);
+ } catch (IllegalAccessException var8)
+ {
+ var8.printStackTrace();
+ continue;
+ }
+
+ GameRegistry.registerBlock(var5, var4.itemBlock());
+ String[] var6 = var4.names();
+
+ if (var6.length != 0)
+ {
+ for (int var7 = 0; var7 < var6.length; ++var7)
+ {
+ LanguageRegistry.addName(new ItemStack(var5, 1, var7), var6[var7]);
+ }
+ } else
+ {
+ LanguageRegistry.addName(var5, var4.name());
+ }
+ }
+ }
+
+ LanguageRegistry.addName(new ItemStack(Holystone, 1, 0), "Holystone");
+ LanguageRegistry.addName(new ItemStack(Holystone, 1, 1), "Holystone");
+ LanguageRegistry.addName(new ItemStack(Holystone, 1, 2), "Mossy Holystone");
+ LanguageRegistry.addName(new ItemStack(Holystone, 1, 3), "Mossy Holystone");
+ LanguageRegistry.addName(new ItemStack(DungeonHolystone, 1, 0), "Dungeon Holystone");
+ LanguageRegistry.addName(new ItemStack(DungeonHolystone, 1, 1), "Dungeon Holystone");
+ LanguageRegistry.addName(new ItemStack(DungeonHolystone, 1, 2), "Dungeon Mossy Holystone");
+ LanguageRegistry.addName(new ItemStack(DungeonHolystone, 1, 3), "Dungeon Mossy Holystone");
+ LanguageRegistry.addName(new ItemStack(AetherLog, 1, 0), "Skyroot Log");
+ LanguageRegistry.addName(new ItemStack(AetherLog, 1, 1), "Skyroot Log");
+ LanguageRegistry.addName(new ItemStack(AetherLog, 1, 2), "Golden Oak Log");
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockAercloud.java b/src/main/java/net/aetherteam/aether/blocks/BlockAercloud.java
new file mode 100644
index 0000000..e557438
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockAercloud.java
@@ -0,0 +1,489 @@
+package net.aetherteam.aether.blocks;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.Aether;
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.effect.EntityLightningBolt;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.Icon;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+
+public class BlockAercloud extends BlockAether implements IAetherBlock
+{
+ private Icon backTexture;
+ private Icon frontTexture;
+ private Icon leftArrow;
+ private Icon rightArrow;
+ private Icon upArrow;
+ private Icon downArrow;
+ private HashMap icons = new HashMap();
+ public static final String[] names = new String[]{"Cold Aercloud", "Blue Aercloud", "Golden Aercloud", "Green Aercloud", "Storm Aercloud"};
+ public static final int bouncingMeta = 1;
+ public static final int sinkingMeta = 2;
+ public static final int randomMeta = 3;
+ public static final int thunderMeta = 4;
+ private Random rand = new Random();
+ public static final int metaBeforePurple = 4;
+
+ protected BlockAercloud(int var1)
+ {
+ super(var1, Material.ice);
+ this.setHardness(0.2F);
+ this.setLightOpacity(0);
+ this.setStepSound(Block.soundClothFootstep);
+ this.setTickRandomly(true);
+ }
+
+ public void addCreativeItems(ArrayList var1)
+ {
+ for (int var2 = 0; var2 < 4; ++var2)
+ {
+ var1.add(new ItemStack(this, 1, var2));
+ }
+ }
+
+ /**
+ * Determines the damage on the item the block drops. Used in cloth and wood.
+ */
+ public int damageDropped(int var1)
+ {
+ return var1 <= 4 ? var1 : 5;
+ }
+
+ /**
+ * Ticks the block if it's been scheduled
+ */
+ public void updateTick(World var1, int var2, int var3, int var4, Random var5)
+ {
+ if (!var1.isRemote)
+ {
+ super.updateTick(var1, var2, var3, var4, var5);
+
+ if (var1.getBlockMetadata(var2, var3, var4) == 4 && var5.nextInt(155) == 0 && var1.getWorldInfo().isRaining())
+ {
+ var1.addWeatherEffect(new EntityLightningBolt(var1, (double) var2, (double) (var3 + 1), (double) var4));
+ }
+ }
+ }
+
+ /**
+ * Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been
+ * cleared to be reused)
+ */
+ public AxisAlignedBB getCollisionBoundingBoxFromPool(World var1, int var2, int var3, int var4)
+ {
+ return var1.getBlockMetadata(var2, var3, var4) != 1 && var1.getBlockMetadata(var2, var3, var4) != 2 && var1.getBlockMetadata(var2, var3, var4) < 5 ? AxisAlignedBB.getBoundingBox((double) var2, (double) var3, (double) var4, (double) (var2 + 1), (double) var3, (double) (var4 + 1)) : AxisAlignedBB.getBoundingBox((double) var2, (double) var3, (double) var4, (double) var2, (double) var3, (double) var4);
+ }
+
+ /**
+ * Returns which pass should this block be rendered on. 0 for solids and 1 for alpha
+ */
+ public int getRenderBlockPass()
+ {
+ return 1;
+ }
+
+ /**
+ * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
+ * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
+ */
+ public boolean isOpaqueCube()
+ {
+ return false;
+ }
+
+ /**
+ * Triggered whenever an entity collides with this block (enters into the block). Args: world, x, y, z, entity
+ */
+ public void onEntityCollidedWithBlock(World var1, int var2, int var3, int var4, Entity var5)
+ {
+ var5.fallDistance = 0.0F;
+ int var6 = var1.getBlockMetadata(var2, var3, var4);
+
+ if (!var5.isRiding())
+ {
+ EntityPlayer var7;
+
+ if (var5 instanceof EntityPlayer)
+ {
+ var7 = (EntityPlayer) var5;
+
+ if (var7.isSneaking())
+ {
+ if (var5.motionY < 0.0D)
+ {
+ var5.motionY *= 0.005D;
+ }
+
+ return;
+ }
+ }
+
+ if (var6 >= 5 && var5.posY <= (double) var3 + 1.6D && var5.posY >= (double) var3 - 0.2D)
+ {
+ var5.motionY = 0.1D;
+ }
+
+ if (var6 != 5 && var6 != 9)
+ {
+ if (var6 != 6 && var6 != 10)
+ {
+ if (var6 != 7 && var6 != 11)
+ {
+ if (var6 == 8 || var6 == 12)
+ {
+ var5.motionX = -2.5D;
+ }
+ } else
+ {
+ var5.motionZ = 2.5D;
+ }
+ } else
+ {
+ var5.motionX = 2.5D;
+ }
+ } else
+ {
+ var5.motionZ = -2.5D;
+ }
+
+ if (var6 == 1)
+ {
+ var5.motionY = 2.0D;
+
+ if (var5 instanceof EntityLiving)
+ {
+ Aether.proxy.spawnRainParticles(var1, var2, var3, var4, this.rand, 15);
+ }
+ } else if (var6 == 2)
+ {
+ var5.motionY = -1.5D;
+ } else if (var6 == 3)
+ {
+ var5.motionX *= 5.0E-10D;
+ var5.motionZ *= 5.0E-10D;
+
+ if (var5 instanceof EntityPlayer)
+ {
+ var7 = (EntityPlayer) var5;
+
+ if (!var7.isJumping)
+ {
+ var5.setPosition((double) var2 + 0.5D, (double) ((float) var3 + var5.height), (double) var4 + 0.5D);
+ }
+ } else
+ {
+ var5.setPosition((double) var2 + 0.5D, (double) var3, (double) var4 + 0.5D);
+ }
+
+ Random var9 = new Random();
+ int var8 = var9.nextInt(4);
+
+ if (var8 == 0)
+ {
+ var5.motionZ = -2.5D;
+ } else if (var8 == 1)
+ {
+ var5.motionX = 2.5D;
+ } else if (var8 == 2)
+ {
+ var5.motionZ = 2.5D;
+ } else if (var8 == 3)
+ {
+ var5.motionX = -2.5D;
+ }
+ } else if (var5.motionY < 0.0D)
+ {
+ var5.motionY *= 0.005D;
+ }
+
+ if (!(var5 instanceof EntityPlayer))
+ {
+ var5.fallDistance = -20.0F;
+ }
+ }
+ }
+
+ /**
+ * Returns true if the given side of this block type should be rendered, if the adjacent block is at the given
+ * coordinates. Args: blockAccess, x, y, z, side
+ */
+ public boolean shouldSideBeRendered(IBlockAccess var1, int var2, int var3, int var4, int var5)
+ {
+ return super.shouldSideBeRendered(var1, var2, var3, var4, 1 - var5);
+ }
+
+ /**
+ * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
+ */
+ public void getSubBlocks(int var1, CreativeTabs var2, List var3)
+ {
+ for (int var4 = 0; var4 < 6; ++var4)
+ {
+ var3.add(new ItemStack(var1, 1, var4));
+ }
+ }
+
+ /**
+ * Called whenever the block is added into the world. Args: world, x, y, z
+ */
+ public void onBlockAdded(World var1, int var2, int var3, int var4)
+ {
+ super.onBlockAdded(var1, var2, var3, var4);
+
+ if (!var1.isRemote && var1.getBlockMetadata(var2, var3, var4) >= 9)
+ {
+ int var5 = var1.getBlockId(var2 - 1, var3, var4);
+ int var6 = var1.getBlockId(var2 + 1, var3, var4);
+ int var7 = var1.getBlockId(var2, var3, var4 + 1);
+ int var8 = var1.getBlockId(var2, var3, var4 - 1);
+ byte var9 = 0;
+
+ if (Block.opaqueCubeLookup[var5] && !Block.opaqueCubeLookup[var6])
+ {
+ var9 = 9;
+ }
+
+ if (Block.opaqueCubeLookup[var6] && !Block.opaqueCubeLookup[var5])
+ {
+ var9 = 10;
+ }
+
+ if (Block.opaqueCubeLookup[var7] && !Block.opaqueCubeLookup[var8])
+ {
+ var9 = 11;
+ }
+
+ if (Block.opaqueCubeLookup[var8] && !Block.opaqueCubeLookup[var7])
+ {
+ var9 = 12;
+ }
+
+ if (var9 > 0)
+ {
+ var1.setBlockMetadataWithNotify(var2, var3, var4, var9, 16);
+ }
+ }
+ }
+
+ /**
+ * Called when the block is placed in the world.
+ */
+ public void onBlockPlacedBy(World var1, int var2, int var3, int var4, EntityLiving var5, ItemStack var6)
+ {
+ int var7 = MathHelper.floor_double((double) (var5.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
+
+ if (((EntityPlayer) var5).inventory.getCurrentItem().getItemDamage() >= 5)
+ {
+ switch (var7)
+ {
+ case 0:
+ var1.setBlockMetadataWithNotify(var2, var3, var4, 9, 16);
+ break;
+
+ case 1:
+ var1.setBlockMetadataWithNotify(var2, var3, var4, 10, 16);
+ break;
+
+ case 2:
+ var1.setBlockMetadataWithNotify(var2, var3, var4, 11, 16);
+ break;
+
+ case 3:
+ var1.setBlockMetadataWithNotify(var2, var3, var4, 12, 16);
+ }
+ }
+ }
+
+ @SideOnly(Side.CLIENT)
+
+ /**
+ * A randomly called display update to be able to add particles or other items for display
+ */
+ public void randomDisplayTick(World var1, int var2, int var3, int var4, Random var5)
+ {
+ float var6 = (float) var2 + 0.5F;
+ float var7 = (float) var3 + 0.0F + var5.nextFloat() * 10.0F / 16.0F;
+ float var8 = (float) var4 + 0.5F;
+ int var9 = var1.getBlockMetadata(var2, var3, var4);
+ float var10 = var5.nextFloat() * 0.9F;
+ float var11 = var5.nextFloat() * 0.2F;
+
+ if (var9 != 5 && var9 != 9)
+ {
+ if (var9 != 6 && var9 != 10)
+ {
+ if (var9 != 7 && var9 != 11)
+ {
+ if (var9 == 8 || var9 == 12)
+ {
+ var1.spawnParticle("reddust", (double) (var6 - var10), (double) var7, (double) (var8 + var11), 1.0D, 1.0D, 1.0D);
+ var1.spawnParticle("reddust", (double) (var6 - var10 * var5.nextFloat() / 0.4F), (double) var7, (double) (var8 + var11), 1.0D, 1.0D, 1.0D);
+ }
+ } else
+ {
+ var1.spawnParticle("reddust", (double) (var6 + var11), (double) var7, (double) (var8 + var10), 1.0D, 1.0D, 1.0D);
+ var1.spawnParticle("reddust", (double) (var6 + var11 * var5.nextFloat() / 0.4F), (double) var7, (double) (var8 + var10), 1.0D, 1.0D, 1.0D);
+ }
+ } else
+ {
+ var1.spawnParticle("reddust", (double) (var6 + var10), (double) var7, (double) (var8 + var11), 1.0D, 1.0D, 1.0D);
+ var1.spawnParticle("reddust", (double) (var6 + var10 * var5.nextFloat() / 0.4F), (double) var7, (double) (var8 + var11), 1.0D, 1.0D, 1.0D);
+ }
+ } else
+ {
+ var1.spawnParticle("reddust", (double) (var6 + var11), (double) var7, (double) (var8 - var10), 1.0D, 1.0D, 1.0D);
+ var1.spawnParticle("reddust", (double) (var6 + var11 * var5.nextFloat() / 0.4F), (double) var7, (double) (var8 - var10), 1.0D, 1.0D, 1.0D);
+ }
+ }
+
+ /**
+ * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
+ */
+ public Icon getIcon(int var1, int var2)
+ {
+ if (var2 == 5 || var2 == 9)
+ {
+ switch (var1)
+ {
+ case 0:
+ return this.upArrow;
+
+ case 1:
+ return this.upArrow;
+
+ case 2:
+ return this.frontTexture;
+
+ case 3:
+ return this.backTexture;
+
+ case 4:
+ return this.leftArrow;
+
+ case 5:
+ return this.rightArrow;
+ }
+ }
+
+ if (var2 == 6 || var2 == 10)
+ {
+ switch (var1)
+ {
+ case 0:
+ return this.rightArrow;
+
+ case 1:
+ return this.rightArrow;
+
+ case 2:
+ return this.leftArrow;
+
+ case 3:
+ return this.rightArrow;
+
+ case 4:
+ return this.backTexture;
+
+ case 5:
+ return this.frontTexture;
+ }
+ }
+
+ if (var2 == 7 || var2 == 11)
+ {
+ switch (var1)
+ {
+ case 0:
+ return this.downArrow;
+
+ case 1:
+ return this.downArrow;
+
+ case 2:
+ return this.backTexture;
+
+ case 3:
+ return this.frontTexture;
+
+ case 4:
+ return this.rightArrow;
+
+ case 5:
+ return this.leftArrow;
+ }
+ }
+
+ if (var2 == 8 || var2 == 12)
+ {
+ switch (var1)
+ {
+ case 0:
+ return this.leftArrow;
+
+ case 1:
+ return this.leftArrow;
+
+ case 2:
+ return this.rightArrow;
+
+ case 3:
+ return this.leftArrow;
+
+ case 4:
+ return this.frontTexture;
+
+ case 5:
+ return this.backTexture;
+ }
+ }
+
+ ItemStack var3 = new ItemStack(AetherBlocks.Aercloud, 1, var2);
+ String var4 = var3.getItem().getItemDisplayName(var3);
+ return (Icon) this.icons.get(var4);
+ }
+
+ /**
+ * Called upon block activation (right click on the block.)
+ */
+ public boolean onBlockActivated(World var1, int var2, int var3, int var4, EntityPlayer var5, int var6, float var7, float var8, float var9)
+ {
+ var1.getBlockMetadata(var2, var3, var4);
+ return false;
+ }
+
+ /**
+ * When this method is called, your block should register all the icons it needs with the given IconRegister. This
+ * is the only chance you get to register icons.
+ */
+ public void registerIcons(IconRegister var1)
+ {
+ this.frontTexture = var1.registerIcon("Aether:Purple Aercloud Front");
+ this.backTexture = var1.registerIcon("Aether:Purple Aercloud Back");
+ this.upArrow = var1.registerIcon("Aether:Purple Aercloud Up");
+ this.downArrow = var1.registerIcon("Aether:Purple Aercloud Down");
+ this.leftArrow = var1.registerIcon("Aether:Purple Aercloud Left");
+ this.rightArrow = var1.registerIcon("Aether:Purple Aercloud Right");
+
+ for (int var2 = 0; var2 < names.length; ++var2)
+ {
+ this.icons.put(names[var2], var1.registerIcon("Aether:" + names[var2]));
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockAerogel.java b/src/main/java/net/aetherteam/aether/blocks/BlockAerogel.java
new file mode 100644
index 0000000..aef58ff
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockAerogel.java
@@ -0,0 +1,43 @@
+package net.aetherteam.aether.blocks;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.world.IBlockAccess;
+
+public class BlockAerogel extends BlockAether implements IAetherBlock
+{
+ public BlockAerogel(int var1)
+ {
+ super(var1, Material.rock);
+ this.setHardness(1.0F);
+ this.setResistance(2000.0F);
+ this.setLightOpacity(3);
+ this.setStepSound(Block.soundStoneFootstep);
+ }
+
+ /**
+ * Returns which pass should this block be rendered on. 0 for solids and 1 for alpha
+ */
+ public int getRenderBlockPass()
+ {
+ return 1;
+ }
+
+ /**
+ * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
+ * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
+ */
+ public boolean isOpaqueCube()
+ {
+ return false;
+ }
+
+ /**
+ * Returns true if the given side of this block type should be rendered, if the adjacent block is at the given
+ * coordinates. Args: blockAccess, x, y, z, side
+ */
+ public boolean shouldSideBeRendered(IBlockAccess var1, int var2, int var3, int var4, int var5)
+ {
+ return super.shouldSideBeRendered(var1, var2, var3, var4, 1 - var5);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockAether.java b/src/main/java/net/aetherteam/aether/blocks/BlockAether.java
new file mode 100644
index 0000000..e02abbe
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockAether.java
@@ -0,0 +1,17 @@
+package net.aetherteam.aether.blocks;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+
+public class BlockAether extends Block implements IAetherBlock
+{
+ protected BlockAether(int var1, Material var2)
+ {
+ super(var1, var2);
+ }
+
+ public Block setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockAetherBed.java b/src/main/java/net/aetherteam/aether/blocks/BlockAetherBed.java
new file mode 100644
index 0000000..402c9f4
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockAetherBed.java
@@ -0,0 +1,108 @@
+package net.aetherteam.aether.blocks;
+
+import java.util.Iterator;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockBed;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EnumStatus;
+import net.minecraft.util.ChunkCoordinates;
+import net.minecraft.world.World;
+
+public class BlockAetherBed extends BlockBed implements IAetherBlock
+{
+ public static final int[][] footBlockToHeadBlockMap = new int[][]{{0, 1}, {-1, 0}, {0, -1}, {1, 0}};
+
+ public BlockAetherBed(int var1)
+ {
+ super(var1);
+ }
+
+ public Block setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Called upon block activation (right click on the block.)
+ */
+ public boolean onBlockActivated(World var1, int var2, int var3, int var4, EntityPlayer var5, int var6, float var7, float var8, float var9)
+ {
+ if (var1.isRemote)
+ {
+ return true;
+ } else
+ {
+ int var10 = var1.getBlockMetadata(var2, var3, var4);
+
+ if (!isBlockHeadOfBed(var10))
+ {
+ int var11 = getDirection(var10);
+ var2 += footBlockToHeadBlockMap[var11][0];
+ var4 += footBlockToHeadBlockMap[var11][1];
+
+ if (var1.getBlockId(var2, var3, var4) != this.blockID)
+ {
+ return true;
+ }
+
+ var10 = var1.getBlockMetadata(var2, var3, var4);
+ }
+
+ if (!var1.provider.canRespawnHere())
+ {
+ var5.addChatMessage("Cannot sleep in this dimension.");
+ return true;
+ } else
+ {
+ if (isBedOccupied(var10))
+ {
+ EntityPlayer var15 = null;
+ Iterator var12 = var1.playerEntities.iterator();
+
+ while (var12.hasNext())
+ {
+ EntityPlayer var13 = (EntityPlayer) var12.next();
+
+ if (var13.isPlayerSleeping())
+ {
+ ChunkCoordinates var14 = var13.playerLocation;
+
+ if (var14.posX == var2 && var14.posY == var3 && var14.posZ == var4)
+ {
+ var15 = var13;
+ }
+ }
+ }
+
+ if (var15 != null)
+ {
+ var5.addChatMessage("tile.bed.occupied");
+ return true;
+ }
+
+ setBedOccupied(var1, var2, var3, var4, false);
+ }
+
+ EnumStatus var16 = var5.sleepInBedAt(var2, var3, var4);
+
+ if (var16 == EnumStatus.OK)
+ {
+ setBedOccupied(var1, var2, var3, var4, true);
+ return true;
+ } else
+ {
+ if (var16 == EnumStatus.NOT_POSSIBLE_NOW)
+ {
+ var5.addChatMessage("tile.bed.noSleep");
+ } else if (var16 == EnumStatus.NOT_SAFE)
+ {
+ var5.addChatMessage("tile.bed.notSafe");
+ }
+
+ return true;
+ }
+ }
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockAetherDirt.java b/src/main/java/net/aetherteam/aether/blocks/BlockAetherDirt.java
new file mode 100644
index 0000000..ddefead
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockAetherDirt.java
@@ -0,0 +1,134 @@
+package net.aetherteam.aether.blocks;
+
+import java.util.List;
+
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.stats.StatList;
+import net.minecraft.world.World;
+
+public class BlockAetherDirt extends BlockAether implements IAetherBlock
+{
+ public BlockAetherDirt(int var1)
+ {
+ super(var1, Material.ground);
+ this.setHardness(0.5F);
+ this.setStepSound(Block.soundGravelFootstep);
+ }
+
+ /**
+ * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
+ */
+ public void getSubBlocks(int var1, CreativeTabs var2, List var3)
+ {
+ var3.add(new ItemStack(var1, 1, 1));
+ }
+
+ /**
+ * Called when the player destroys a block with an item that can harvest it. (i, j, k) are the coordinates of the
+ * block and l is the block's subtype/damage.
+ */
+ public void harvestBlock(World var1, EntityPlayer var2, int var3, int var4, int var5, int var6)
+ {
+ var2.addStat(StatList.mineBlockStatArray[this.blockID], 1);
+ var2.addExhaustion(0.025F);
+
+ if (!var1.isRemote)
+ {
+ ItemStack var7;
+
+ if (var6 == 0)
+ {
+ if (var2.getCurrentEquippedItem() != null && var2.getCurrentEquippedItem().itemID == AetherItems.SkyrootShovel.itemID)
+ {
+ var2.addStat(StatList.mineBlockStatArray[this.blockID], 1);
+ var7 = new ItemStack(AetherBlocks.AetherDirt.blockID, 2, 1);
+ this.dropBlockAsItem_do(var1, var3, var4, var5, var7);
+ } else
+ {
+ var7 = new ItemStack(AetherBlocks.AetherDirt.blockID, 1, 1);
+ this.dropBlockAsItem_do(var1, var3, var4, var5, var7);
+ }
+ } else
+ {
+ var7 = new ItemStack(AetherBlocks.AetherDirt.blockID, 1, var6);
+ this.dropBlockAsItem_do(var1, var3, var4, var5, var7);
+ }
+ }
+ }
+
+ /**
+ * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
+ * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
+ */
+ public boolean isOpaqueCube()
+ {
+ return true;
+ }
+
+ /**
+ * Called upon block activation (right click on the block.)
+ */
+ public boolean onBlockActivated(World var1, int var2, int var3, int var4, EntityPlayer var5, int var6, float var7, float var8, float var9)
+ {
+ ItemStack var10 = var5.getCurrentEquippedItem();
+
+ if (var10 == null)
+ {
+ return false;
+ } else
+ {
+ if (var10.itemID == AetherItems.SwettyBall.itemID)
+ {
+ int var11 = 0;
+
+ for (int var12 = var2 - 1; var12 <= var2 + 1; ++var12)
+ {
+ for (int var13 = var4 - 1; var13 <= var4 + 1; ++var13)
+ {
+ if (var1.getBlockId(var12, var3, var13) == this.blockID)
+ {
+ if (var1.getBlockId(var12, var3 + 1, var13) == this.blockID)
+ {
+ if (var1.getBlockId(var12, var3 + 2, var13) == 0 && !var1.isRemote)
+ {
+ var1.setBlock(var12, var3 + 1, var13, AetherBlocks.AetherGrass.blockID);
+ ++var11;
+ }
+ } else if (var1.getBlockId(var12, var3 + 1, var13) == 0 && !var1.isRemote)
+ {
+ var1.setBlock(var12, var3, var13, AetherBlocks.AetherGrass.blockID);
+ ++var11;
+ }
+ } else if (var1.getBlockId(var12, var3, var13) == 0 && var1.getBlockId(var12, var3 - 1, var13) == this.blockID && !var1.isRemote)
+ {
+ var1.setBlock(var12, var3 - 1, var13, AetherBlocks.AetherGrass.blockID);
+ ++var11;
+ }
+ }
+
+ if (var11 > 0)
+ {
+ --var10.stackSize;
+ }
+ }
+ }
+
+ return false;
+ }
+ }
+
+ /**
+ * Called when the block is placed in the world.
+ */
+ public void onBlockPlacedBy(World var1, int var2, int var3, int var4, EntityLiving var5, ItemStack var6)
+ {
+ var1.setBlock(var2, var3, var4, this.blockID);
+ var1.setBlockMetadataWithNotify(var2, var3, var4, 1, 16);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockAetherFence.java b/src/main/java/net/aetherteam/aether/blocks/BlockAetherFence.java
new file mode 100644
index 0000000..8802ca1
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockAetherFence.java
@@ -0,0 +1,47 @@
+package net.aetherteam.aether.blocks;
+
+import java.util.ArrayList;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockFence;
+import net.minecraft.block.material.Material;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.Icon;
+
+public class BlockAetherFence extends BlockFence implements IAetherBlock
+{
+ private Block modelBlock;
+ private int modelMeta;
+
+ public BlockAetherFence(int var1, Block var2, int var3)
+ {
+ super(var1, "Fence", Material.wood);
+ this.modelBlock = var2;
+ this.modelMeta = var3;
+ }
+
+ public BlockAetherFence(int var1, Block var2, int var3, Material var4)
+ {
+ super(var1, "Fence", var4);
+ this.modelBlock = var2;
+ this.modelMeta = var3;
+ }
+
+ public void addCreativeItems(ArrayList var1)
+ {
+ var1.add(new ItemStack(this));
+ }
+
+ /**
+ * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
+ */
+ public Icon getIcon(int var1, int var2)
+ {
+ return this.modelBlock.getIcon(var1, this.modelMeta);
+ }
+
+ public Block setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockAetherFlower.java b/src/main/java/net/aetherteam/aether/blocks/BlockAetherFlower.java
new file mode 100644
index 0000000..f955cf4
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockAetherFlower.java
@@ -0,0 +1,47 @@
+package net.aetherteam.aether.blocks;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockFlower;
+import net.minecraft.block.material.Material;
+import net.minecraft.world.World;
+
+public class BlockAetherFlower extends BlockFlower implements IAetherBlock
+{
+ public BlockAetherFlower(int var1)
+ {
+ this(var1, Material.plants);
+ }
+
+ public BlockAetherFlower(int var1, Material var2)
+ {
+ super(var1, var2);
+ this.setTickRandomly(true);
+ float var3 = 0.2F;
+ this.setHardness(0.0F);
+ this.setStepSound(Block.soundGrassFootstep);
+ this.setBlockBounds(0.5F - var3, 0.0F, 0.5F - var3, 0.5F + var3, var3 * 3.0F, 0.5F + var3);
+ }
+
+ /**
+ * Gets passed in the blockID of the block below and supposed to return true if its allowed to grow on the type of
+ * blockID passed in. Args: blockID
+ */
+ protected boolean canThisPlantGrowOnThisBlockID(int var1)
+ {
+ return var1 == AetherBlocks.AetherGrass.blockID || var1 == AetherBlocks.AetherDirt.blockID;
+ }
+
+ /**
+ * Can this block stay at this position. Similar to canPlaceBlockAt except gets checked often with plants.
+ */
+ public boolean canBlockStay(World var1, int var2, int var3, int var4)
+ {
+ Block var5 = blocksList[var1.getBlockId(var2, var3 - 1, var4)];
+ return (var1.getFullBlockLightValue(var2, var3, var4) >= 8 || var1.canBlockSeeTheSky(var2, var3, var4)) && var5 != null && (var5.blockID == AetherBlocks.AetherDirt.blockID || var5.blockID == AetherBlocks.AetherGrass.blockID);
+ }
+
+ public Block setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockAetherGrass.java b/src/main/java/net/aetherteam/aether/blocks/BlockAetherGrass.java
new file mode 100644
index 0000000..dab49b0
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockAetherGrass.java
@@ -0,0 +1,191 @@
+package net.aetherteam.aether.blocks;
+
+import cpw.mods.fml.client.FMLClientHandler;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.entities.EntityGoldenFX;
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockWall;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.stats.StatList;
+import net.minecraft.util.Icon;
+import net.minecraft.world.World;
+
+public class BlockAetherGrass extends BlockAether implements IAetherBlock
+{
+ public static Icon sprTop;
+ public static Icon sprSide;
+ public static Icon sprGoldTop;
+ public static Icon sprGoldSide;
+
+ protected BlockAetherGrass(int var1)
+ {
+ super(var1, Material.ground);
+ this.setTickRandomly(true);
+ this.setHardness(0.6F);
+ this.setStepSound(Block.soundGrassFootstep);
+ }
+
+ /**
+ * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
+ */
+ public void getSubBlocks(int var1, CreativeTabs var2, List var3)
+ {
+ for (int var4 = 0; var4 < 1; ++var4)
+ {
+ var3.add(new ItemStack(var1, 1, var4));
+ }
+ }
+
+ /**
+ * Called when the player destroys a block with an item that can harvest it. (i, j, k) are the coordinates of the
+ * block and l is the block's subtype/damage.
+ */
+ public void harvestBlock(World var1, EntityPlayer var2, int var3, int var4, int var5, int var6)
+ {
+ var2.addStat(StatList.mineBlockStatArray[this.blockID], 1);
+ var2.addExhaustion(0.025F);
+
+ if (!var1.isRemote)
+ {
+ ItemStack var7;
+
+ if (var2.getCurrentEquippedItem() != null && var2.getCurrentEquippedItem().itemID == AetherItems.SkyrootShovel.itemID)
+ {
+ var2.addStat(StatList.mineBlockStatArray[this.blockID], 1);
+ var7 = new ItemStack(AetherBlocks.AetherDirt.blockID, 2, 1);
+ this.dropBlockAsItem_do(var1, var3, var4, var5, var7);
+ } else
+ {
+ var7 = new ItemStack(AetherBlocks.AetherDirt.blockID, 1, 1);
+ this.dropBlockAsItem_do(var1, var3, var4, var5, var7);
+ }
+ }
+ }
+
+ /**
+ * Called upon block activation (right click on the block.)
+ */
+ public boolean onBlockActivated(World var1, int var2, int var3, int var4, EntityPlayer var5, int var6, float var7, float var8, float var9)
+ {
+ if (var5 == null)
+ {
+ return false;
+ } else
+ {
+ ItemStack var10 = var5.getCurrentEquippedItem();
+
+ if (var10 == null)
+ {
+ return false;
+ } else if (var10.itemID == AetherItems.AmbrosiumShard.itemID && var1.getBlockMetadata(var2, var3, var4) == 0 && !var1.isRemote)
+ {
+ var1.setBlockMetadataWithNotify(var2, var3, var4, 1, 2);
+ --var10.stackSize;
+ return true;
+ } else
+ {
+ return false;
+ }
+ }
+ }
+
+ /**
+ * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
+ */
+ public Icon getIcon(int var1, int var2)
+ {
+ if (var1 == 1)
+ {
+ if (var2 == 0)
+ {
+ return sprTop;
+ }
+
+ if (var2 == 1)
+ {
+ return sprGoldTop;
+ }
+ }
+
+ return var1 == 0 ? AetherBlocks.AetherDirt.getIcon(var1, var2) : (var2 == 1 ? sprGoldSide : sprSide);
+ }
+
+ /**
+ * Returns the ID of the items to drop on destruction.
+ */
+ public int idDropped(int var1, Random var2, int var3)
+ {
+ return AetherBlocks.AetherDirt.idDropped(0, var2, var3);
+ }
+
+ @SideOnly(Side.CLIENT)
+
+ /**
+ * A randomly called display update to be able to add particles or other items for display
+ */
+ public void randomDisplayTick(World var1, int var2, int var3, int var4, Random var5)
+ {
+ super.randomDisplayTick(var1, var2, var3, var4, var5);
+
+ if (var5.nextInt(4) == 0 && var1.getBlockMetadata(var2, var3, var4) == 1 && var1.isRemote)
+ {
+ for (int var6 = 0; var6 < 6; ++var6)
+ {
+ EntityGoldenFX var7 = new EntityGoldenFX(var1, (double) ((float) var2 + var5.nextFloat()), (double) ((float) var3 + 1.1F), (double) ((float) var4 + var5.nextFloat()), 0.0D, 0.0D, 0.0D, true);
+ FMLClientHandler.instance().getClient().effectRenderer.addEffect(var7);
+ }
+ }
+ }
+
+ /**
+ * Ticks the block if it's been scheduled
+ */
+ public void updateTick(World var1, int var2, int var3, int var4, Random var5)
+ {
+ if (!var1.isRemote)
+ {
+ if (var1.getBlockLightValue(var2, var3 + 1, var4) < 4 && var1.getBlockMaterial(var2, var3 + 1, var4).getCanBlockGrass())
+ {
+ if (var5.nextInt(4) != 0 || Block.blocksList[var1.getBlockId(var2, var3 + 1, var4)] instanceof BlockWall)
+ {
+ return;
+ }
+
+ var1.setBlock(var2, var3, var4, AetherBlocks.AetherDirt.blockID);
+ } else if (var1.getBlockLightValue(var2, var3 + 1, var4) >= 9)
+ {
+ int var6 = var2 + var5.nextInt(3) - 1;
+ int var7 = var3 + var5.nextInt(5) - 3;
+ int var8 = var4 + var5.nextInt(3) - 1;
+
+ if (var1.getBlockId(var6, var7, var8) == AetherBlocks.AetherDirt.blockID && var1.getBlockLightValue(var6, var7 + 1, var8) >= 4 && !var1.getBlockMaterial(var6, var7 + 1, var8).getCanBlockGrass())
+ {
+ var1.setBlock(var6, var7, var8, AetherBlocks.AetherGrass.blockID, 0, 2);
+ }
+ }
+ }
+ }
+
+ /**
+ * When this method is called, your block should register all the icons it needs with the given IconRegister. This
+ * is the only chance you get to register icons.
+ */
+ public void registerIcons(IconRegister var1)
+ {
+ sprTop = var1.registerIcon("Aether:Aether Grass Top");
+ sprSide = var1.registerIcon("Aether:Aether Grass Side");
+ sprGoldTop = var1.registerIcon("Aether:Enchanted Aether Grass Top");
+ sprGoldSide = var1.registerIcon("Aether:Enchanted Aether Grass Side");
+ super.registerIcons(var1);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockAetherLeaves.java b/src/main/java/net/aetherteam/aether/blocks/BlockAetherLeaves.java
new file mode 100644
index 0000000..a883785
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockAetherLeaves.java
@@ -0,0 +1,230 @@
+package net.aetherteam.aether.blocks;
+
+import cpw.mods.fml.client.FMLClientHandler;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.LinkedList;
+import java.util.Random;
+
+import net.aetherteam.aether.entities.EntityGoldenFX;
+import net.aetherteam.aether.util.Loc;
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.stats.StatList;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+
+public class BlockAetherLeaves extends BlockAether implements IAetherBlock
+{
+ public static int sprSkyroot = 39;
+ public static int sprGoldenOak = 12;
+ private int itemDropped;
+
+ protected BlockAetherLeaves(int var1, int var2)
+ {
+ super(var1, Material.leaves);
+ this.itemDropped = AetherBlocks.GreenSkyrootSaplingID;
+ this.setTickRandomly(true);
+ this.setHardness(0.2F);
+ this.setLightOpacity(1);
+ this.setStepSound(Block.soundGrassFootstep);
+
+ if (var2 != 0)
+ {
+ this.itemDropped = var2;
+ }
+ }
+
+ protected BlockAetherLeaves(int var1)
+ {
+ this(var1, 0);
+ }
+
+ /**
+ * Determines the damage on the item the block drops. Used in cloth and wood.
+ */
+ public int damageDropped(int var1)
+ {
+ return var1 & 3;
+ }
+
+ /**
+ * Returns the color this block should be rendered. Used by leaves.
+ */
+ public int getRenderColor(int var1)
+ {
+ return 16777215;
+ }
+
+ /**
+ * Called when the player destroys a block with an item that can harvest it. (i, j, k) are the coordinates of the
+ * block and l is the block's subtype/damage.
+ */
+ public void harvestBlock(World var1, EntityPlayer var2, int var3, int var4, int var5, int var6)
+ {
+ if (!var1.isRemote && var2.getCurrentEquippedItem() != null && var2.getCurrentEquippedItem().itemID == Item.shears.itemID)
+ {
+ var2.addStat(StatList.mineBlockStatArray[this.blockID], 1);
+ this.dropBlockAsItem_do(var1, var3, var4, var5, new ItemStack(this.blockID, 1, var6 & 3));
+ } else
+ {
+ super.harvestBlock(var1, var2, var3, var4, var5, var6);
+ }
+ }
+
+ /**
+ * Returns the ID of the items to drop on destruction.
+ */
+ public int idDropped(int var1, Random var2, int var3)
+ {
+ return this.blockID == AetherBlocks.GoldenOakLeaves.blockID ? (var2.nextInt(10) == 0 ? Item.appleGold.itemID : AetherBlocks.GoldenOakSapling.blockID) : (this.blockID == AetherBlocks.GreenSkyrootLeaves.blockID ? (var2.nextInt(6) == 0 ? AetherBlocks.BlockOrangeTree.blockID : AetherBlocks.GreenSkyrootSapling.blockID) : this.itemDropped);
+ }
+
+ private boolean isMyTrunkMeta(int var1)
+ {
+ return this.blockID == AetherBlocks.GoldenOakLeaves.blockID ? var1 >= 2 : var1 <= 1;
+ }
+
+ /**
+ * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
+ * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
+ */
+ public boolean isOpaqueCube()
+ {
+ return false;
+ }
+
+ private boolean nearTrunk(World var1, int var2, int var3, int var4)
+ {
+ Loc var5 = new Loc(var2, var3, var4);
+ LinkedList var6 = new LinkedList();
+ ArrayList var7 = new ArrayList();
+ var6.offer(new Loc(var2, var3, var4));
+ int var8 = this.blockID;
+
+ while (!var6.isEmpty())
+ {
+ Loc var9 = (Loc) var6.poll();
+
+ if (!var7.contains(var9))
+ {
+ if (var9.distSimple(var5) <= 6)
+ {
+ int var10 = var9.getBlock(var1);
+ var9.getMeta(var1);
+
+ if (var10 == AetherBlocks.AetherLog.blockID)
+ {
+ return true;
+ }
+
+ if (var10 == var8)
+ {
+ var6.addAll(Arrays.asList(var9.adjacent()));
+ }
+ }
+
+ var7.add(var9);
+ }
+ }
+
+ return false;
+ }
+
+ public void onBlockRemoval(World var1, int var2, int var3, int var4)
+ {
+ byte var5 = 1;
+ int var6 = var5 + 1;
+
+ if (var1.checkChunksExist(var2 - var6, var3 - var6, var4 - var6, var2 + var6, var3 + var6, var4 + var6))
+ {
+ for (int var7 = -var5; var7 <= var5; ++var7)
+ {
+ for (int var8 = -var5; var8 <= var5; ++var8)
+ {
+ for (int var9 = -var5; var9 <= var5; ++var9)
+ {
+ int var10 = var1.getBlockId(var2 + var7, var3 + var8, var4 + var9);
+
+ if (var10 == this.blockID)
+ {
+ int var11 = var1.getBlockMetadata(var2 + var7, var3 + var8, var4 + var9);
+ var1.setBlockMetadataWithNotify(var2 + var7, var3 + var8, var4 + var9, var11 | 8, 4);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Returns the quantity of items to drop on block destruction.
+ */
+ public int quantityDropped(Random var1)
+ {
+ return this.blockID == AetherBlocks.GoldenOakLeaves.blockID ? (var1.nextInt(10) == 0 ? 1 : 0) : (var1.nextInt(5) == 0 ? 1 : 0);
+ }
+
+ @SideOnly(Side.CLIENT)
+
+ /**
+ * A randomly called display update to be able to add particles or other items for display
+ */
+ public void randomDisplayTick(World var1, int var2, int var3, int var4, Random var5)
+ {
+ super.randomDisplayTick(var1, var2, var3, var4, var5);
+
+ if (this.blockID == AetherBlocks.GoldenOakLeaves.blockID && var1.isRemote)
+ {
+ for (int var6 = 0; var6 < 4; ++var6)
+ {
+ double var7 = (double) var2 + ((double) var5.nextFloat() - 0.5D) * 10.0D;
+ double var9 = (double) var3 + ((double) var5.nextFloat() - 0.5D) * 10.0D;
+ double var11 = (double) var4 + ((double) var5.nextFloat() - 0.5D) * 10.0D;
+ double var13 = 0.0D;
+ double var15 = 0.0D;
+ double var17 = 0.0D;
+ var13 = ((double) var5.nextFloat() - 0.5D) * 0.5D;
+ var15 = ((double) var5.nextFloat() - 0.5D) * 0.5D;
+ var17 = ((double) var5.nextFloat() - 0.5D) * 0.5D;
+ EntityGoldenFX var19 = new EntityGoldenFX(var1, var7, var9, var11, var13, var15, var17, false);
+ FMLClientHandler.instance().getClient().effectRenderer.addEffect(var19);
+ }
+ }
+ }
+
+ private void removeLeaves(World var1, int var2, int var3, int var4)
+ {
+ var1.setBlock(var2, var3, var4, 0);
+ }
+
+ /**
+ * Returns true if the given side of this block type should be rendered, if the adjacent block is at the given
+ * coordinates. Args: blockAccess, x, y, z, side
+ */
+ public boolean shouldSideBeRendered(IBlockAccess var1, int var2, int var3, int var4, int var5)
+ {
+ var1.getBlockId(var2, var3, var4);
+ return true;
+ }
+
+ /**
+ * Ticks the block if it's been scheduled
+ */
+ public void updateTick(World var1, int var2, int var3, int var4, Random var5)
+ {
+ if (!var1.isRemote && AetherBlocks.GoldenOakSaplingID != this.blockID)
+ {
+ if (!this.nearTrunk(var1, var2, var3, var4))
+ {
+ this.removeLeaves(var1, var2, var3, var4);
+ }
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockAetherLog.java b/src/main/java/net/aetherteam/aether/blocks/BlockAetherLog.java
new file mode 100644
index 0000000..7ca1914
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockAetherLog.java
@@ -0,0 +1,113 @@
+package net.aetherteam.aether.blocks;
+
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.stats.StatList;
+import net.minecraft.util.Icon;
+import net.minecraft.world.World;
+
+public class BlockAetherLog extends BlockAether implements IAetherBlock
+{
+ private static Random rand = new Random();
+ public static Icon sprTop;
+ public static Icon sprSide;
+ public static Icon sprGoldenSide;
+
+ protected BlockAetherLog(int var1)
+ {
+ super(var1, Material.wood);
+ this.setHardness(2.0F);
+ this.setStepSound(Block.soundWoodFootstep);
+ }
+
+ /**
+ * Determines the damage on the item the block drops. Used in cloth and wood.
+ */
+ public int damageDropped(int var1)
+ {
+ return var1;
+ }
+
+ /**
+ * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
+ */
+ public void getSubBlocks(int var1, CreativeTabs var2, List var3)
+ {
+ var3.add(new ItemStack(var1, 1, 1));
+ var3.add(new ItemStack(var1, 1, 2));
+ }
+
+ /**
+ * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
+ */
+ public Icon getIcon(int var1, int var2)
+ {
+ return var1 <= 1 && var2 <= 3 ? sprTop : (var2 <= 1 ? sprSide : sprGoldenSide);
+ }
+
+ /**
+ * Called when the player destroys a block with an item that can harvest it. (i, j, k) are the coordinates of the
+ * block and l is the block's subtype/damage.
+ */
+ public void harvestBlock(World var1, EntityPlayer var2, int var3, int var4, int var5, int var6)
+ {
+ var2.addStat(StatList.mineBlockStatArray[this.blockID], 1);
+ var2.addExhaustion(0.025F);
+
+ if (!var1.isRemote)
+ {
+ ItemStack var7;
+
+ if (var6 == 0)
+ {
+ if (var2.getCurrentEquippedItem() != null && var2.getCurrentEquippedItem().itemID == AetherItems.SkyrootAxe.itemID)
+ {
+ var2.addStat(StatList.mineBlockStatArray[this.blockID], 1);
+ var7 = new ItemStack(AetherBlocks.AetherLog.blockID, 2, 1);
+ this.dropBlockAsItem_do(var1, var3, var4, var5, var7);
+ } else
+ {
+ var7 = new ItemStack(AetherBlocks.AetherLog.blockID, 1, 1);
+ this.dropBlockAsItem_do(var1, var3, var4, var5, var7);
+ }
+ } else if (var6 > 1)
+ {
+ var7 = var2.inventory.getCurrentItem();
+
+ if (var7 == null || var7.itemID != AetherItems.ZaniteAxe.itemID && var7.itemID != AetherItems.GravititeAxe.itemID && var6 >= 2)
+ {
+ return;
+ }
+
+ ItemStack var8 = new ItemStack(AetherBlocks.AetherLog.blockID, 1, 1);
+ this.dropBlockAsItem_do(var1, var3, var4, var5, var8);
+ ItemStack var9 = new ItemStack(AetherItems.GoldenAmber.itemID, 1 + rand.nextInt(3), 0);
+ this.dropBlockAsItem_do(var1, var3, var4, var5, var9);
+ } else
+ {
+ var7 = new ItemStack(AetherBlocks.AetherLog.blockID, 1, var6);
+ this.dropBlockAsItem_do(var1, var3, var4, var5, var7);
+ }
+ }
+ }
+
+ /**
+ * When this method is called, your block should register all the icons it needs with the given IconRegister. This
+ * is the only chance you get to register icons.
+ */
+ public void registerIcons(IconRegister var1)
+ {
+ sprTop = var1.registerIcon("Aether:Skyroot Log Top");
+ sprSide = var1.registerIcon("Aether:Skyroot Log Side");
+ sprGoldenSide = var1.registerIcon("Aether:Golden Oak Log Side");
+ super.registerIcons(var1);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockAetherPlank.java b/src/main/java/net/aetherteam/aether/blocks/BlockAetherPlank.java
new file mode 100644
index 0000000..bb00c7a
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockAetherPlank.java
@@ -0,0 +1,15 @@
+package net.aetherteam.aether.blocks;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+
+public class BlockAetherPlank extends BlockAether implements IAetherBlock
+{
+ protected BlockAetherPlank(int var1, Material var2)
+ {
+ super(var1, var2);
+ this.setHardness(2.0F);
+ this.setResistance(5.0F);
+ this.setStepSound(Block.soundWoodFootstep);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockAetherPortal.java b/src/main/java/net/aetherteam/aether/blocks/BlockAetherPortal.java
new file mode 100644
index 0000000..6c211b2
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockAetherPortal.java
@@ -0,0 +1,210 @@
+package net.aetherteam.aether.blocks;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.Aether;
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockPortal;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
+public class BlockAetherPortal extends BlockPortal implements IAetherBlock
+{
+ public BlockAetherPortal(int var1)
+ {
+ super(var1);
+ this.setHardness(-1.0F);
+ this.setResistance(6000000.0F);
+ this.setUnlocalizedName("Aether:Aether Portal");
+ }
+
+ @SideOnly(Side.CLIENT)
+ public int getDimNumber(EntityPlayer var1)
+ {
+ return var1.dimension == 0 ? 3 : 0;
+ }
+
+ /**
+ * When this method is called, your block should register all the icons it needs with the given IconRegister. This
+ * is the only chance you get to register icons.
+ */
+ public void registerIcons(IconRegister var1)
+ {
+ this.blockIcon = var1.registerIcon("Aether:Aether Portal");
+ }
+
+ public Block setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
+ */
+ public void getSubBlocks(int var1, CreativeTabs var2, List var3)
+ {
+ var3.add(new ItemStack(this));
+ }
+
+ /**
+ * Triggered whenever an entity collides with this block (enters into the block). Args: world, x, y, z, entity
+ */
+ public void onEntityCollidedWithBlock(World var1, int var2, int var3, int var4, Entity var5)
+ {
+ if (var5.ridingEntity == null && var5.riddenByEntity == null)
+ {
+ if (var5 instanceof EntityPlayer)
+ {
+ if (var5.timeUntilPortal <= 0 && !var1.isRemote)
+ {
+ Aether.getServerPlayer((EntityPlayer) var5).setInPortal();
+ }
+ } else if (var5.timeUntilPortal <= 0)
+ {
+ Aether.teleportEntityToAether(var5);
+ }
+ }
+ }
+
+ /**
+ * Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are
+ * their own) Args: x, y, z, neighbor blockID
+ */
+ public void onNeighborBlockChange(World var1, int var2, int var3, int var4, int var5)
+ {
+ byte var6 = 0;
+ byte var7 = 1;
+
+ if (var1.getBlockId(var2 - 1, var3, var4) == this.blockID || var1.getBlockId(var2 + 1, var3, var4) == this.blockID)
+ {
+ var6 = 1;
+ var7 = 0;
+ }
+
+ int var8;
+
+ for (var8 = var3; var1.getBlockId(var2, var8 - 1, var4) == this.blockID; --var8)
+ {
+ ;
+ }
+
+ if (var1.getBlockId(var2, var8 - 1, var4) != Block.glowStone.blockID)
+ {
+ var1.setBlock(var2, var3, var4, 0);
+ } else
+ {
+ int var9;
+
+ for (var9 = 1; var9 < 4 && var1.getBlockId(var2, var8 + var9, var4) == this.blockID; ++var9)
+ {
+ ;
+ }
+
+ if (var9 == 3 && var1.getBlockId(var2, var8 + var9, var4) == Block.glowStone.blockID)
+ {
+ boolean var10 = var1.getBlockId(var2 - 1, var3, var4) == this.blockID || var1.getBlockId(var2 + 1, var3, var4) == this.blockID;
+ boolean var11 = var1.getBlockId(var2, var3, var4 - 1) == this.blockID || var1.getBlockId(var2, var3, var4 + 1) == this.blockID;
+
+ if (var10 && var11)
+ {
+ var1.setBlock(var2, var3, var4, 0);
+ } else if ((var1.getBlockId(var2 + var6, var3, var4 + var7) != Block.glowStone.blockID || var1.getBlockId(var2 - var6, var3, var4 - var7) != this.blockID) && (var1.getBlockId(var2 - var6, var3, var4 - var7) != Block.glowStone.blockID || var1.getBlockId(var2 + var6, var3, var4 + var7) != this.blockID))
+ {
+ var1.setBlock(var2, var3, var4, 0);
+ }
+ } else
+ {
+ var1.setBlock(var2, var3, var4, 0);
+ }
+ }
+ }
+
+ /**
+ * A randomly called display update to be able to add particles or other items for display
+ */
+ public void randomDisplayTick(World var1, int var2, int var3, int var4, Random var5)
+ {
+ if (var5.nextInt(250) == 0)
+ {
+ var1.playSound((double) var2 + 0.5D, (double) var3 + 0.5D, (double) var4 + 0.5D, "aeportal.aeportal", 0.5F, var5.nextFloat() * 0.4F + 0.8F, false);
+ }
+
+ Aether.proxy.spawnPortalParticles(var1, var2, var3, var4, var5, this.blockID);
+ }
+
+ /**
+ * Checks to see if this location is valid to create a portal and will return True if it does. Args: world, x, y, z
+ */
+ public boolean tryToCreatePortal(World var1, int var2, int var3, int var4)
+ {
+ byte var5 = 0;
+ byte var6 = 0;
+
+ if (var1.getBlockId(var2 - 1, var3, var4) == Block.glowStone.blockID || var1.getBlockId(var2 + 1, var3, var4) == Block.glowStone.blockID)
+ {
+ var5 = 1;
+ }
+
+ if (var1.getBlockId(var2, var3, var4 - 1) == Block.glowStone.blockID || var1.getBlockId(var2, var3, var4 + 1) == Block.glowStone.blockID)
+ {
+ var6 = 1;
+ }
+
+ if (var5 == var6)
+ {
+ return false;
+ } else
+ {
+ if (var1.getBlockId(var2 - var5, var3, var4 - var6) == 0)
+ {
+ var2 -= var5;
+ var4 -= var6;
+ }
+
+ int var7;
+ int var8;
+
+ for (var7 = -1; var7 <= 2; ++var7)
+ {
+ for (var8 = -1; var8 <= 3; ++var8)
+ {
+ boolean var9 = var7 == -1 || var7 == 2 || var8 == -1 || var8 == 3;
+
+ if (var7 != -1 && var7 != 2 || var8 != -1 && var8 != 3)
+ {
+ int var10 = var1.getBlockId(var2 + var5 * var7, var3 + var8, var4 + var6 * var7);
+
+ if (var9)
+ {
+ if (var10 != Block.glowStone.blockID)
+ {
+ return false;
+ }
+ } else if (var10 != 0 && var10 != Block.waterMoving.blockID)
+ {
+ return false;
+ }
+ }
+ }
+ }
+
+ for (var7 = 0; var7 < 2; ++var7)
+ {
+ for (var8 = 0; var8 < 3; ++var8)
+ {
+ var1.setBlock(var2 + var5 * var7, var3 + var8, var4 + var6 * var7, AetherBlocks.AetherPortal.blockID, 0, 2);
+ }
+ }
+
+ return true;
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockAetherSapling.java b/src/main/java/net/aetherteam/aether/blocks/BlockAetherSapling.java
new file mode 100644
index 0000000..a396889
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockAetherSapling.java
@@ -0,0 +1,103 @@
+package net.aetherteam.aether.blocks;
+
+import java.util.Random;
+
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.feature.WorldGenerator;
+
+public class BlockAetherSapling extends BlockAetherFlower implements IAetherBlock
+{
+ public static int sprSkyroot = 42;
+ public static int sprGoldenOak = 13;
+ private Object treeGenObject = null;
+
+ protected BlockAetherSapling(int var1, Object var2)
+ {
+ super(var1);
+ float var3 = 0.4F;
+ this.setBlockBounds(0.5F - var3, 0.0F, 0.5F - var3, 0.5F + var3, var3 * 2.0F, 0.5F + var3);
+ this.setHardness(0.0F);
+ this.setStepSound(Block.soundGrassFootstep);
+ this.treeGenObject = var2;
+ }
+
+ /**
+ * Called upon block activation (right click on the block.)
+ */
+ public boolean onBlockActivated(World var1, int var2, int var3, int var4, EntityPlayer var5, int var6, float var7, float var8, float var9)
+ {
+ if (var1.isRemote)
+ {
+ return false;
+ } else if (var5 == null)
+ {
+ return false;
+ } else
+ {
+ ItemStack var10 = var5.getCurrentEquippedItem();
+
+ if (var10 == null)
+ {
+ return false;
+ } else if (var10.itemID != Item.dyePowder.itemID)
+ {
+ return false;
+ } else if (var10.getItemDamage() != 15)
+ {
+ return false;
+ } else
+ {
+ this.growTree(var1, var2, var3, var4, var1.rand);
+ --var10.stackSize;
+ return true;
+ }
+ }
+ }
+
+ /**
+ * Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z
+ */
+ public boolean canPlaceBlockAt(World var1, int var2, int var3, int var4)
+ {
+ return super.canPlaceBlockAt(var1, var2, var3, var4) && this.canThisPlantGrowOnThisBlockID(var1.getBlockId(var2, var3 - 1, var4));
+ }
+
+ /**
+ * Gets passed in the blockID of the block below and supposed to return true if its allowed to grow on the type of
+ * blockID passed in. Args: blockID
+ */
+ protected boolean canThisPlantGrowOnThisBlockID(int var1)
+ {
+ return var1 == AetherBlocks.AetherGrass.blockID || var1 == AetherBlocks.AetherDirt.blockID;
+ }
+
+ public void growTree(World var1, int var2, int var3, int var4, Random var5)
+ {
+ var1.setBlock(var2, var3, var4, 0);
+
+ if (!((WorldGenerator) this.treeGenObject).generate(var1, var5, var2, var3, var4))
+ {
+ var1.setBlock(var2, var3, var4, this.blockID);
+ }
+ }
+
+ /**
+ * Ticks the block if it's been scheduled
+ */
+ public void updateTick(World var1, int var2, int var3, int var4, Random var5)
+ {
+ if (!var1.isRemote)
+ {
+ super.updateTick(var1, var2, var3, var4, var5);
+
+ if (var1.getBlockLightValue(var2, var3 + 1, var4) >= 9 && var5.nextInt(30) == 0)
+ {
+ this.growTree(var1, var2, var3, var4, var5);
+ }
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockAetherStairs.java b/src/main/java/net/aetherteam/aether/blocks/BlockAetherStairs.java
new file mode 100644
index 0000000..da6ecf5
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockAetherStairs.java
@@ -0,0 +1,35 @@
+package net.aetherteam.aether.blocks;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockStairs;
+import net.minecraft.util.Icon;
+
+public class BlockAetherStairs extends BlockStairs implements IAetherBlock
+{
+ private Block modelBlock;
+ private int modelMeta;
+
+ protected BlockAetherStairs(int var1, Block var2, int var3)
+ {
+ super(var1, var2, var3);
+ this.modelBlock = var2;
+ this.modelMeta = var3;
+ this.setHardness(var2.blockHardness);
+ this.setResistance(var2.blockResistance / 3.0F);
+ this.setStepSound(var2.stepSound);
+ this.setLightOpacity(0);
+ }
+
+ public Block setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
+ */
+ public Icon getIcon(int var1, int var2)
+ {
+ return this.modelBlock.getIcon(var1, this.modelMeta);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockAetherWall.java b/src/main/java/net/aetherteam/aether/blocks/BlockAetherWall.java
new file mode 100644
index 0000000..9d0da5c
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockAetherWall.java
@@ -0,0 +1,46 @@
+package net.aetherteam.aether.blocks;
+
+import java.util.List;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockWall;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.Icon;
+
+public class BlockAetherWall extends BlockWall implements IAetherBlock
+{
+ private Block modelBlock;
+ private int modelMeta;
+
+ public BlockAetherWall(int var1, Block var2, int var3)
+ {
+ super(var1, var2);
+ this.modelBlock = var2;
+ this.modelMeta = var3;
+ this.setHardness(var2.blockHardness);
+ this.setResistance(var2.blockResistance / 3.0F);
+ this.setStepSound(var2.stepSound);
+ }
+
+ public Block setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
+ */
+ public Icon getIcon(int var1, int var2)
+ {
+ return this.modelBlock.getIcon(var1, this.modelMeta);
+ }
+
+ /**
+ * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
+ */
+ public void getSubBlocks(int var1, CreativeTabs var2, List var3)
+ {
+ var3.add(new ItemStack(var1, 1, 0));
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockAltar.java b/src/main/java/net/aetherteam/aether/blocks/BlockAltar.java
new file mode 100644
index 0000000..a290fb3
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockAltar.java
@@ -0,0 +1,290 @@
+package net.aetherteam.aether.blocks;
+
+import cpw.mods.fml.client.FMLClientHandler;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.Random;
+
+import net.aetherteam.aether.items.AetherItems;
+import net.aetherteam.aether.tile_entities.TileEntityAltar;
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockContainer;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.Icon;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class BlockAltar extends BlockContainer implements IAetherBlock
+{
+ private Random EnchanterRand = new Random();
+ private Icon sideIcon;
+
+ public static void updateEnchanterBlockState(boolean var0, World var1, int var2, int var3, int var4)
+ {
+ int var5 = var1.getBlockMetadata(var2, var3, var4);
+ TileEntity var6 = var1.getBlockTileEntity(var2, var3, var4);
+ var1.setBlockMetadataWithNotify(var2, var3, var4, var5, 4);
+ var1.setBlockTileEntity(var2, var3, var4, var6);
+ }
+
+ protected BlockAltar(int var1)
+ {
+ super(var1, Material.rock);
+ this.setHardness(2.0F);
+ }
+
+ public Block setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Called upon block activation (right click on the block.)
+ */
+ public boolean onBlockActivated(World var1, int var2, int var3, int var4, EntityPlayer var5, int var6, float var7, float var8, float var9)
+ {
+ TileEntityAltar var10 = (TileEntityAltar) var1.getBlockTileEntity(var2, var3, var4);
+
+ if (var10 != null)
+ {
+ ItemStack var11 = var5.getCurrentEquippedItem();
+
+ if (!var10.canEnchant())
+ {
+ if (var1.isRemote)
+ {
+ FMLClientHandler.instance().getClient().ingameGUI.getChatGUI().printChatMessage("Altar is being blocked by something above!");
+ }
+
+ return true;
+ }
+
+ if (var11 != null)
+ {
+ if (var11.itemID == AetherItems.AmbrosiumShard.itemID)
+ {
+ var10.addAmbrosium(var11);
+ var10.onInventoryChanged();
+ } else if (var10.isEnchantable(var11))
+ {
+ if (var10.getEnchanterStacks(0) != null && var10.getEnchanterStacks(0).itemID != var11.itemID)
+ {
+ var10.dropNextStack();
+ } else
+ {
+ var10.addEnchantable(var11);
+ var10.onInventoryChanged();
+ }
+ } else
+ {
+ var10.dropNextStack();
+ }
+ } else
+ {
+ var10.dropNextStack();
+ }
+ }
+
+ return true;
+ }
+
+ public boolean hasTileEntity(int var1)
+ {
+ return true;
+ }
+
+ /**
+ * Returns a new instance of a block's tile entity class. Called on placing the block.
+ */
+ public TileEntity createNewTileEntity(World var1)
+ {
+ try
+ {
+ return new TileEntityAltar();
+ } catch (Exception var3)
+ {
+ throw new RuntimeException(var3);
+ }
+ }
+
+ /**
+ * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
+ */
+ public Icon getIcon(int var1, int var2)
+ {
+ return this.sideIcon;
+ }
+
+ /**
+ * Called whenever the block is added into the world. Args: world, x, y, z
+ */
+ public void onBlockAdded(World var1, int var2, int var3, int var4)
+ {
+ super.onBlockAdded(var1, var2, var3, var4);
+ this.setDefaultDirection(var1, var2, var3, var4);
+ }
+
+ /**
+ * Called when the block is placed in the world.
+ */
+ public void onBlockPlacedBy(World var1, int var2, int var3, int var4, EntityLiving var5, ItemStack var6)
+ {
+ int var7 = MathHelper.floor_double((double) (var5.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
+
+ if (var7 == 0)
+ {
+ var1.setBlockMetadataWithNotify(var2, var3, var4, 2, 4);
+ }
+
+ if (var7 == 1)
+ {
+ var1.setBlockMetadataWithNotify(var2, var3, var4, 5, 4);
+ }
+
+ if (var7 == 2)
+ {
+ var1.setBlockMetadataWithNotify(var2, var3, var4, 3, 4);
+ }
+
+ if (var7 == 3)
+ {
+ var1.setBlockMetadataWithNotify(var2, var3, var4, 4, 4);
+ }
+ }
+
+ /**
+ * ejects contained items into the world, and notifies neighbours of an update, as appropriate
+ */
+ public void breakBlock(World var1, int var2, int var3, int var4, int var5, int var6)
+ {
+ TileEntityAltar var7 = (TileEntityAltar) var1.getBlockTileEntity(var2, var3, var4);
+
+ if (var7 != null)
+ {
+ for (int var8 = 0; var8 < var7.getSizeInventory(); ++var8)
+ {
+ ItemStack var9 = var7.getStackInSlot(var8);
+
+ if (var9 != null)
+ {
+ float var10 = this.EnchanterRand.nextFloat() * 0.8F + 0.1F;
+ float var11 = this.EnchanterRand.nextFloat() * 0.8F + 0.1F;
+ float var12 = this.EnchanterRand.nextFloat() * 0.8F + 0.1F;
+
+ while (var9.stackSize > 0)
+ {
+ int var13 = this.EnchanterRand.nextInt(21) + 10;
+
+ if (var13 > var9.stackSize)
+ {
+ var13 = var9.stackSize;
+ }
+
+ var9.stackSize -= var13;
+ EntityItem var14 = new EntityItem(var1, (double) ((float) var2 + var10), (double) ((float) var3 + var11), (double) ((float) var4 + var12), new ItemStack(var9.itemID, var13, var9.getItemDamage()));
+
+ if (var9.hasTagCompound())
+ {
+ var14.getEntityItem().setTagCompound((NBTTagCompound) var9.getTagCompound().copy());
+ }
+
+ float var15 = 0.05F;
+ var14.motionX = (double) ((float) this.EnchanterRand.nextGaussian() * var15);
+ var14.motionY = (double) ((float) this.EnchanterRand.nextGaussian() * var15 + 0.2F);
+ var14.motionZ = (double) ((float) this.EnchanterRand.nextGaussian() * var15);
+ var1.spawnEntityInWorld(var14);
+ }
+ }
+ }
+ }
+
+ super.breakBlock(var1, var2, var3, var4, var5, var6);
+ }
+
+ @SideOnly(Side.CLIENT)
+
+ /**
+ * A randomly called display update to be able to add particles or other items for display
+ */
+ public void randomDisplayTick(World var1, int var2, int var3, int var4, Random var5)
+ {
+ TileEntityAltar var6 = (TileEntityAltar) var1.getBlockTileEntity(var2, var3, var4);
+ }
+
+ private void setDefaultDirection(World var1, int var2, int var3, int var4)
+ {
+ if (!var1.isRemote)
+ {
+ int var5 = var1.getBlockId(var2, var3, var4 - 1);
+ int var6 = var1.getBlockId(var2, var3, var4 + 1);
+ int var7 = var1.getBlockId(var2 - 1, var3, var4);
+ int var8 = var1.getBlockId(var2 + 1, var3, var4);
+ byte var9 = 3;
+
+ if (Block.opaqueCubeLookup[var5] && !Block.opaqueCubeLookup[var6])
+ {
+ var9 = 3;
+ }
+
+ if (Block.opaqueCubeLookup[var6] && !Block.opaqueCubeLookup[var5])
+ {
+ var9 = 2;
+ }
+
+ if (Block.opaqueCubeLookup[var7] && !Block.opaqueCubeLookup[var8])
+ {
+ var9 = 5;
+ }
+
+ if (Block.opaqueCubeLookup[var8] && !Block.opaqueCubeLookup[var7])
+ {
+ var9 = 4;
+ }
+
+ var1.setBlockMetadataWithNotify(var2, var3, var4, var9, 4);
+ }
+ }
+
+ /**
+ * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
+ * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
+ */
+ public boolean isOpaqueCube()
+ {
+ return false;
+ }
+
+ /**
+ * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
+ */
+ public boolean renderAsNormalBlock()
+ {
+ return false;
+ }
+
+ /**
+ * The type of render function that is called for this block
+ */
+ public int getRenderType()
+ {
+ return AetherBlocks.altarRenderId;
+ }
+
+ /**
+ * When this method is called, your block should register all the icons it needs with the given IconRegister. This
+ * is the only chance you get to register icons.
+ */
+ public void registerIcons(IconRegister var1)
+ {
+ this.sideIcon = var1.registerIcon("Aether:Holystone");
+ super.registerIcons(var1);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockAmbrosiumOre.java b/src/main/java/net/aetherteam/aether/blocks/BlockAmbrosiumOre.java
new file mode 100644
index 0000000..70f50bb
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockAmbrosiumOre.java
@@ -0,0 +1,69 @@
+package net.aetherteam.aether.blocks;
+
+import java.util.Random;
+
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.enchantment.EnchantmentHelper;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.stats.StatList;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class BlockAmbrosiumOre extends BlockAether implements IAetherBlock
+{
+ public BlockAmbrosiumOre(int var1)
+ {
+ super(var1, Material.rock);
+ this.setHardness(3.0F);
+ this.setResistance(5.0F);
+ this.setStepSound(Block.soundStoneFootstep);
+ }
+
+ /**
+ * Called when the player destroys a block with an item that can harvest it. (i, j, k) are the coordinates of the
+ * block and l is the block's subtype/damage.
+ */
+ public void harvestBlock(World var1, EntityPlayer var2, int var3, int var4, int var5, int var6)
+ {
+ var2.addStat(StatList.mineBlockStatArray[this.blockID], 1);
+ var2.addExhaustion(0.025F);
+ int var7 = EnchantmentHelper.getFortuneModifier(var2) != 0 ? EnchantmentHelper.getFortuneModifier(var2) : 1;
+
+ if (!var1.isRemote)
+ {
+ ItemStack var8;
+
+ if (this.canSilkHarvest(var1, var2, var3, var4, var5, var6) && EnchantmentHelper.getSilkTouchModifier(var2))
+ {
+ var8 = this.createStackedBlock(var6);
+
+ if (var8 != null)
+ {
+ this.dropBlockAsItem_do(var1, var3, var4, var5, var8);
+ }
+ } else if (var6 == 0 && var2.getCurrentEquippedItem() != null && var2.getCurrentEquippedItem().itemID == AetherItems.SkyrootPickaxe.itemID)
+ {
+ var8 = new ItemStack(AetherItems.AmbrosiumShard.itemID, MathHelper.clamp_int((new Random()).nextInt(var7 * 5), 1, var7 * 5 + 1), 0);
+ var2.addStat(StatList.mineBlockStatArray[this.blockID], 1);
+ this.dropBlockAsItem_do(var1, var3, var4, var5, var8);
+ } else
+ {
+ var8 = new ItemStack(AetherItems.AmbrosiumShard.itemID, MathHelper.clamp_int((new Random()).nextInt(var7), 1, var7 + 1), 0);
+ this.dropBlockAsItem_do(var1, var3, var4, var5, var8);
+ }
+
+ this.dropXpOnBlockBreak(var1, var3, var4, var5, 2);
+ }
+ }
+
+ /**
+ * Returns the ID of the items to drop on destruction.
+ */
+ public int idDropped(int var1, Random var2, int var3)
+ {
+ return AetherItems.AmbrosiumShard.itemID;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockAmbrosiumTorch.java b/src/main/java/net/aetherteam/aether/blocks/BlockAmbrosiumTorch.java
new file mode 100644
index 0000000..0badec8
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockAmbrosiumTorch.java
@@ -0,0 +1,295 @@
+package net.aetherteam.aether.blocks;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.Random;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.MovingObjectPosition;
+import net.minecraft.util.Vec3;
+import net.minecraft.world.World;
+import net.minecraftforge.common.ForgeDirection;
+
+public class BlockAmbrosiumTorch extends BlockAether implements IAetherBlock
+{
+ protected BlockAmbrosiumTorch(int var1)
+ {
+ super(var1, Material.circuits);
+ this.setTickRandomly(true);
+ this.setLightValue(0.9375F);
+ this.setStepSound(Block.soundWoodFootstep);
+ }
+
+ /**
+ * Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been
+ * cleared to be reused)
+ */
+ public AxisAlignedBB getCollisionBoundingBoxFromPool(World var1, int var2, int var3, int var4)
+ {
+ return null;
+ }
+
+ /**
+ * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
+ * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
+ */
+ public boolean isOpaqueCube()
+ {
+ return false;
+ }
+
+ /**
+ * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
+ */
+ public boolean renderAsNormalBlock()
+ {
+ return false;
+ }
+
+ /**
+ * The type of render function that is called for this block
+ */
+ public int getRenderType()
+ {
+ return 2;
+ }
+
+ private boolean canPlaceTorchOn(World var1, int var2, int var3, int var4)
+ {
+ if (var1.doesBlockHaveSolidTopSurface(var2, var3, var4))
+ {
+ return true;
+ } else
+ {
+ int var5 = var1.getBlockId(var2, var3, var4);
+ return Block.blocksList[var5] != null && Block.blocksList[var5].canPlaceTorchOnTop(var1, var2, var3, var4);
+ }
+ }
+
+ /**
+ * Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z
+ */
+ public boolean canPlaceBlockAt(World var1, int var2, int var3, int var4)
+ {
+ return var1.isBlockSolidOnSide(var2 - 1, var3, var4, ForgeDirection.EAST, true) || var1.isBlockSolidOnSide(var2 + 1, var3, var4, ForgeDirection.WEST, true) || var1.isBlockSolidOnSide(var2, var3, var4 - 1, ForgeDirection.SOUTH, true) || var1.isBlockSolidOnSide(var2, var3, var4 + 1, ForgeDirection.NORTH, true) || this.canPlaceTorchOn(var1, var2, var3 - 1, var4);
+ }
+
+ /**
+ * Called when a block is placed using its ItemBlock. Args: World, X, Y, Z, side, hitX, hitY, hitZ, block metadata
+ */
+ public int onBlockPlaced(World var1, int var2, int var3, int var4, int var5, float var6, float var7, float var8, int var9)
+ {
+ int var10 = var9;
+
+ if (var5 == 1 && this.canPlaceTorchOn(var1, var2, var3 - 1, var4))
+ {
+ var10 = 5;
+ }
+
+ if (var5 == 2 && var1.isBlockSolidOnSide(var2, var3, var4 + 1, ForgeDirection.NORTH, true))
+ {
+ var10 = 4;
+ }
+
+ if (var5 == 3 && var1.isBlockSolidOnSide(var2, var3, var4 - 1, ForgeDirection.SOUTH, true))
+ {
+ var10 = 3;
+ }
+
+ if (var5 == 4 && var1.isBlockSolidOnSide(var2 + 1, var3, var4, ForgeDirection.WEST, true))
+ {
+ var10 = 2;
+ }
+
+ if (var5 == 5 && var1.isBlockSolidOnSide(var2 - 1, var3, var4, ForgeDirection.EAST, true))
+ {
+ var10 = 1;
+ }
+
+ return var10;
+ }
+
+ /**
+ * Ticks the block if it's been scheduled
+ */
+ public void updateTick(World var1, int var2, int var3, int var4, Random var5)
+ {
+ super.updateTick(var1, var2, var3, var4, var5);
+
+ if (var1.getBlockMetadata(var2, var3, var4) == 0)
+ {
+ this.onBlockAdded(var1, var2, var3, var4);
+ }
+ }
+
+ /**
+ * Called whenever the block is added into the world. Args: world, x, y, z
+ */
+ public void onBlockAdded(World var1, int var2, int var3, int var4)
+ {
+ if (var1.getBlockMetadata(var2, var3, var4) == 0)
+ {
+ if (var1.isBlockSolidOnSide(var2 - 1, var3, var4, ForgeDirection.EAST, true))
+ {
+ var1.setBlockMetadataWithNotify(var2, var3, var4, 1, 2);
+ } else if (var1.isBlockSolidOnSide(var2 + 1, var3, var4, ForgeDirection.WEST, true))
+ {
+ var1.setBlockMetadataWithNotify(var2, var3, var4, 2, 2);
+ } else if (var1.isBlockSolidOnSide(var2, var3, var4 - 1, ForgeDirection.SOUTH, true))
+ {
+ var1.setBlockMetadataWithNotify(var2, var3, var4, 3, 2);
+ } else if (var1.isBlockSolidOnSide(var2, var3, var4 + 1, ForgeDirection.NORTH, true))
+ {
+ var1.setBlockMetadataWithNotify(var2, var3, var4, 4, 2);
+ } else if (this.canPlaceTorchOn(var1, var2, var3 - 1, var4))
+ {
+ var1.setBlockMetadataWithNotify(var2, var3, var4, 5, 2);
+ }
+ }
+
+ this.dropTorchIfCantStay(var1, var2, var3, var4);
+ }
+
+ /**
+ * Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are
+ * their own) Args: x, y, z, neighbor blockID
+ */
+ public void onNeighborBlockChange(World var1, int var2, int var3, int var4, int var5)
+ {
+ this.func_94397_d(var1, var2, var3, var4, var5);
+ }
+
+ protected boolean func_94397_d(World var1, int var2, int var3, int var4, int var5)
+ {
+ if (this.dropTorchIfCantStay(var1, var2, var3, var4))
+ {
+ int var6 = var1.getBlockMetadata(var2, var3, var4);
+ boolean var7 = false;
+
+ if (!var1.isBlockSolidOnSide(var2 - 1, var3, var4, ForgeDirection.EAST, true) && var6 == 1)
+ {
+ var7 = true;
+ }
+
+ if (!var1.isBlockSolidOnSide(var2 + 1, var3, var4, ForgeDirection.WEST, true) && var6 == 2)
+ {
+ var7 = true;
+ }
+
+ if (!var1.isBlockSolidOnSide(var2, var3, var4 - 1, ForgeDirection.SOUTH, true) && var6 == 3)
+ {
+ var7 = true;
+ }
+
+ if (!var1.isBlockSolidOnSide(var2, var3, var4 + 1, ForgeDirection.NORTH, true) && var6 == 4)
+ {
+ var7 = true;
+ }
+
+ if (!this.canPlaceTorchOn(var1, var2, var3 - 1, var4) && var6 == 5)
+ {
+ var7 = true;
+ }
+
+ if (var7)
+ {
+ this.dropBlockAsItem(var1, var2, var3, var4, var1.getBlockMetadata(var2, var3, var4), 0);
+ var1.setBlockToAir(var2, var3, var4);
+ return true;
+ } else
+ {
+ return false;
+ }
+ } else
+ {
+ return true;
+ }
+ }
+
+ protected boolean dropTorchIfCantStay(World var1, int var2, int var3, int var4)
+ {
+ if (!this.canPlaceBlockAt(var1, var2, var3, var4))
+ {
+ if (var1.getBlockId(var2, var3, var4) == this.blockID)
+ {
+ this.dropBlockAsItem(var1, var2, var3, var4, var1.getBlockMetadata(var2, var3, var4), 0);
+ var1.setBlockToAir(var2, var3, var4);
+ }
+
+ return false;
+ } else
+ {
+ return true;
+ }
+ }
+
+ /**
+ * Ray traces through the blocks collision from start vector to end vector returning a ray trace hit. Args: world,
+ * x, y, z, startVec, endVec
+ */
+ public MovingObjectPosition collisionRayTrace(World var1, int var2, int var3, int var4, Vec3 var5, Vec3 var6)
+ {
+ int var7 = var1.getBlockMetadata(var2, var3, var4) & 7;
+ float var8 = 0.15F;
+
+ if (var7 == 1)
+ {
+ this.setBlockBounds(0.0F, 0.2F, 0.5F - var8, var8 * 2.0F, 0.8F, 0.5F + var8);
+ } else if (var7 == 2)
+ {
+ this.setBlockBounds(1.0F - var8 * 2.0F, 0.2F, 0.5F - var8, 1.0F, 0.8F, 0.5F + var8);
+ } else if (var7 == 3)
+ {
+ this.setBlockBounds(0.5F - var8, 0.2F, 0.0F, 0.5F + var8, 0.8F, var8 * 2.0F);
+ } else if (var7 == 4)
+ {
+ this.setBlockBounds(0.5F - var8, 0.2F, 1.0F - var8 * 2.0F, 0.5F + var8, 0.8F, 1.0F);
+ } else
+ {
+ var8 = 0.1F;
+ this.setBlockBounds(0.5F - var8, 0.0F, 0.5F - var8, 0.5F + var8, 0.6F, 0.5F + var8);
+ }
+
+ return super.collisionRayTrace(var1, var2, var3, var4, var5, var6);
+ }
+
+ @SideOnly(Side.CLIENT)
+
+ /**
+ * A randomly called display update to be able to add particles or other items for display
+ */
+ public void randomDisplayTick(World var1, int var2, int var3, int var4, Random var5)
+ {
+ int var6 = var1.getBlockMetadata(var2, var3, var4);
+ double var7 = (double) ((float) var2 + 0.5F);
+ double var9 = (double) ((float) var3 + 0.7F);
+ double var11 = (double) ((float) var4 + 0.5F);
+ double var13 = 0.2199999988079071D;
+ double var15 = 0.27000001072883606D;
+
+ if (var6 == 1)
+ {
+ var1.spawnParticle("smoke", var7 - var15, var9 + var13, var11, 0.0D, 0.0D, 0.0D);
+ var1.spawnParticle("flame", var7 - var15, var9 + var13, var11, 0.0D, 0.0D, 0.0D);
+ } else if (var6 == 2)
+ {
+ var1.spawnParticle("smoke", var7 + var15, var9 + var13, var11, 0.0D, 0.0D, 0.0D);
+ var1.spawnParticle("flame", var7 + var15, var9 + var13, var11, 0.0D, 0.0D, 0.0D);
+ } else if (var6 == 3)
+ {
+ var1.spawnParticle("smoke", var7, var9 + var13, var11 - var15, 0.0D, 0.0D, 0.0D);
+ var1.spawnParticle("flame", var7, var9 + var13, var11 - var15, 0.0D, 0.0D, 0.0D);
+ } else if (var6 == 4)
+ {
+ var1.spawnParticle("smoke", var7, var9 + var13, var11 + var15, 0.0D, 0.0D, 0.0D);
+ var1.spawnParticle("flame", var7, var9 + var13, var11 + var15, 0.0D, 0.0D, 0.0D);
+ } else
+ {
+ var1.spawnParticle("smoke", var7, var9, var11, 0.0D, 0.0D, 0.0D);
+ var1.spawnParticle("flame", var7, var9, var11, 0.0D, 0.0D, 0.0D);
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockBerryBush.java b/src/main/java/net/aetherteam/aether/blocks/BlockBerryBush.java
new file mode 100644
index 0000000..b86b1a8
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockBerryBush.java
@@ -0,0 +1,125 @@
+package net.aetherteam.aether.blocks;
+
+import java.util.Random;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.stats.StatList;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.world.World;
+
+public class BlockBerryBush extends BlockAetherFlower implements IAetherBlock
+{
+ protected BlockBerryBush(int var1)
+ {
+ super(var1);
+ this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
+ this.setHardness(0.2F);
+ this.setStepSound(Block.soundGrassFootstep);
+ }
+
+ protected final void checkBushChange(World var1, int var2, int var3, int var4)
+ {
+ if (!this.canBlockStay(var1, var2, var3, var4))
+ {
+ var1.setBlock(var2, var3, var4, 0);
+ ItemStack var5 = new ItemStack(AetherBlocks.BerryBush.blockID, 1, 0);
+ this.dropBlockAsItem_do(var1, var2, var3, var4, var5);
+ var1.setBlock(var2, var3, var4, 0);
+ }
+ }
+
+ /**
+ * Returns the ID of the items to drop on destruction.
+ */
+ public int idDropped(int var1, Random var2, int var3)
+ {
+ return AetherBlocks.BerryBush.blockID;
+ }
+
+ /**
+ * Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been
+ * cleared to be reused)
+ */
+ public AxisAlignedBB getCollisionBoundingBoxFromPool(World var1, int var2, int var3, int var4)
+ {
+ return AxisAlignedBB.getBoundingBox((double) var2 + this.minX, (double) var3 + this.minY, (double) var4 + this.minZ, (double) var2 + this.maxX, (double) var3 + this.maxY, (double) var4 + this.maxZ);
+ }
+
+ /**
+ * The type of render function that is called for this block
+ */
+ public int getRenderType()
+ {
+ return Aether.BerryBushRenderID;
+ }
+
+ /**
+ * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
+ * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
+ */
+ public boolean isOpaqueCube()
+ {
+ return false;
+ }
+
+ /**
+ * Called when the player destroys a block with an item that can harvest it. (i, j, k) are the coordinates of the
+ * block and l is the block's subtype/damage.
+ */
+ public void harvestBlock(World var1, EntityPlayer var2, int var3, int var4, int var5, int var6)
+ {
+ byte var7;
+ byte var8;
+
+ if (var1.getBlockId(var3, var4 - 1, var5) == AetherBlocks.AetherGrass.blockID && var1.getBlockMetadata(var3, var4 - 1, var5) == 1)
+ {
+ var7 = 1;
+ var8 = 3;
+ } else
+ {
+ var7 = 0;
+ var8 = 2;
+ }
+
+ int var9 = var1.rand.nextInt(var8 - var7 + 1) + var7;
+ var2.addStat(StatList.mineBlockStatArray[this.blockID], 1);
+ var2.addExhaustion(0.025F);
+
+ if (var9 != 0)
+ {
+ ItemStack var10 = new ItemStack(AetherItems.BlueBerry.itemID, var9, 0);
+ this.dropBlockAsItem_do(var1, var3, var4, var5, var10);
+ }
+
+ var1.setBlock(var3, var4, var5, AetherBlocks.BerryBushStem.blockID);
+ }
+
+ /**
+ * Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are
+ * their own) Args: x, y, z, neighbor blockID
+ */
+ public void onNeighborBlockChange(World var1, int var2, int var3, int var4, int var5)
+ {
+ this.checkBushChange(var1, var2, var3, var4);
+ }
+
+ /**
+ * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
+ */
+ public boolean renderAsNormalBlock()
+ {
+ return false;
+ }
+
+ /**
+ * Ticks the block if it's been scheduled
+ */
+ public void updateTick(World var1, int var2, int var3, int var4, Random var5)
+ {
+ this.checkBushChange(var1, var2, var3, var4);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockBerryBushStem.java b/src/main/java/net/aetherteam/aether/blocks/BlockBerryBushStem.java
new file mode 100644
index 0000000..a2862d0
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockBerryBushStem.java
@@ -0,0 +1,92 @@
+package net.aetherteam.aether.blocks;
+
+import java.util.Random;
+
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.world.World;
+
+public class BlockBerryBushStem extends BlockAetherFlower implements IAetherBlock
+{
+ protected BlockBerryBushStem(int var1)
+ {
+ super(var1);
+ float var2 = 0.4F;
+ this.setBlockBounds(0.5F - var2, 0.0F, 0.5F - var2, 0.5F + var2, var2 * 2.0F, 0.5F + var2);
+ this.setHardness(0.2F);
+ this.setStepSound(Block.soundGrassFootstep);
+ }
+
+ public void onBlockPlaced(World var1, int var2, int var3, int var4, int var5)
+ {
+ this.checkFlowerChange(var1, var2, var3, var4);
+ }
+
+ /**
+ * Ticks the block if it's been scheduled
+ */
+ public void updateTick(World var1, int var2, int var3, int var4, Random var5)
+ {
+ if (!var1.isRemote)
+ {
+ super.updateTick(var1, var2, var3, var4, var5);
+
+ if (var1.getBlockLightValue(var2, var3 + 1, var4) >= 9 && var5.nextInt(30) == 0)
+ {
+ var1.setBlock(var2, var3, var4, AetherBlocks.BerryBush.blockID);
+ }
+ }
+ }
+
+ /**
+ * Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been
+ * cleared to be reused)
+ */
+ public AxisAlignedBB getCollisionBoundingBoxFromPool(World var1, int var2, int var3, int var4)
+ {
+ return AxisAlignedBB.getBoundingBox((double) var2 + this.minX, (double) var3 + this.minY, (double) var4 + this.minZ, (double) var2 + this.maxX, (double) var3 + this.maxY, (double) var4 + this.maxZ);
+ }
+
+ public boolean blockActivated(World var1, int var2, int var3, int var4, EntityPlayer var5)
+ {
+ if (var1.isRemote)
+ {
+ return false;
+ } else if (var5 == null)
+ {
+ return false;
+ } else
+ {
+ ItemStack var6 = var5.getCurrentEquippedItem();
+
+ if (var6 == null)
+ {
+ return false;
+ } else if (var6.itemID != Item.dyePowder.itemID)
+ {
+ return false;
+ } else if (var6.getItemDamage() != 15)
+ {
+ return false;
+ } else
+ {
+ --var6.stackSize;
+ var1.setBlock(var2, var3, var4, 0);
+ var1.setBlock(var2, var3, var4, AetherBlocks.BerryBush.blockID);
+ return true;
+ }
+ }
+ }
+
+ /**
+ * Gets passed in the blockID of the block below and supposed to return true if its allowed to grow on the type of
+ * blockID passed in. Args: blockID
+ */
+ protected boolean canThisPlantGrowOnThisBlockID(int var1)
+ {
+ return var1 == AetherBlocks.AetherGrass.blockID || var1 == AetherBlocks.AetherDirt.blockID;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockBlueSkyrootLeaves.java b/src/main/java/net/aetherteam/aether/blocks/BlockBlueSkyrootLeaves.java
new file mode 100644
index 0000000..f57f033
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockBlueSkyrootLeaves.java
@@ -0,0 +1,103 @@
+package net.aetherteam.aether.blocks;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.LinkedList;
+import java.util.Random;
+
+import net.aetherteam.aether.util.Loc;
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+
+public class BlockBlueSkyrootLeaves extends BlockAether implements IAetherBlock
+{
+ public BlockBlueSkyrootLeaves(int var1)
+ {
+ super(var1, Material.leaves);
+ this.setTickRandomly(true);
+ this.setHardness(0.2F);
+ this.setStepSound(Block.soundGrassFootstep);
+ }
+
+ /**
+ * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
+ * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
+ */
+ public boolean isOpaqueCube()
+ {
+ return false;
+ }
+
+ private boolean nearTrunk(World var1, int var2, int var3, int var4)
+ {
+ Loc var5 = new Loc(var2, var3, var4);
+ LinkedList var6 = new LinkedList();
+ ArrayList var7 = new ArrayList();
+ var6.offer(new Loc(var2, var3, var4));
+ int var8 = this.blockID;
+
+ while (!var6.isEmpty())
+ {
+ Loc var9 = (Loc) var6.poll();
+
+ if (!var7.contains(var9))
+ {
+ if (var9.distSimple(var5) <= 4)
+ {
+ int var10 = var9.getBlock(var1);
+ var9.getMeta(var1);
+
+ if (var10 == AetherBlocks.AetherLog.blockID)
+ {
+ return true;
+ }
+
+ if (var10 == var8)
+ {
+ var6.addAll(Arrays.asList(var9.adjacent()));
+ }
+ }
+
+ var7.add(var9);
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Returns the quantity of items to drop on block destruction.
+ */
+ public int quantityDropped(Random var1)
+ {
+ return 0;
+ }
+
+ private void removeLeaves(World var1, int var2, int var3, int var4)
+ {
+ var1.setBlock(var2, var3, var4, 0);
+ }
+
+ /**
+ * Returns true if the given side of this block type should be rendered, if the adjacent block is at the given
+ * coordinates. Args: blockAccess, x, y, z, side
+ */
+ public boolean shouldSideBeRendered(IBlockAccess var1, int var2, int var3, int var4, int var5)
+ {
+ var1.getBlockId(var2, var3, var4);
+ return true;
+ }
+
+ /**
+ * Ticks the block if it's been scheduled
+ */
+ public void updateTick(World var1, int var2, int var3, int var4, Random var5)
+ {
+ if (!this.nearTrunk(var1, var2, var3, var4))
+ {
+ this.removeLeaves(var1, var2, var3, var4);
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockBronzeDoor.java b/src/main/java/net/aetherteam/aether/blocks/BlockBronzeDoor.java
new file mode 100644
index 0000000..821546a
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockBronzeDoor.java
@@ -0,0 +1,147 @@
+package net.aetherteam.aether.blocks;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Random;
+
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.tile_entities.TileEntityBronzeDoorController;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.Icon;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class BlockBronzeDoor extends BlockAether implements IAetherBlock
+{
+ private Random rand = new Random();
+ private HashMap icons = new HashMap();
+ public static final String[] names = new String[]{"Bronze Door", "Bronze Door Lock"};
+
+ protected BlockBronzeDoor(int var1)
+ {
+ super(var1, Material.wood);
+ this.setHardness(-1.0F);
+ this.setResistance(1000000.0F);
+ }
+
+ public boolean removeBlockByPlayer(World var1, EntityPlayer var2, int var3, int var4, int var5)
+ {
+ return false;
+ }
+
+ /**
+ * Called whenever the block is added into the world. Args: world, x, y, z
+ */
+ public void onBlockAdded(World var1, int var2, int var3, int var4)
+ {
+ Dungeon var5 = DungeonHandler.instance().getInstanceAt(MathHelper.floor_double((double) var2), MathHelper.floor_double((double) var3), MathHelper.floor_double((double) var4));
+
+ if (var5 != null)
+ {
+ super.onBlockAdded(var1, var2, var3, var4);
+ } else
+ {
+ var1.setBlock(var2, var3, var4, 0);
+ }
+ }
+
+ /**
+ * Called when the block is placed in the world.
+ */
+ public void onBlockPlacedBy(World var1, int var2, int var3, int var4, EntityLiving var5, ItemStack var6)
+ {
+ var1.setBlock(var2, var3, var4, 0);
+ }
+
+ /**
+ * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
+ */
+ public Icon getIcon(int var1, int var2)
+ {
+ ItemStack var3 = new ItemStack(AetherBlocks.BronzeDoor, 1, var2);
+ String var4 = var3.getItem().getItemDisplayName(var3);
+ return (Icon) this.icons.get(var4);
+ }
+
+ @SideOnly(Side.CLIENT)
+
+ /**
+ * When this method is called, your block should register all the icons it needs with the given IconRegister. This
+ * is the only chance you get to register icons.
+ */
+ public void registerIcons(IconRegister var1)
+ {
+ for (int var2 = 0; var2 < names.length; ++var2)
+ {
+ this.icons.put(names[var2], var1.registerIcon("Aether:" + names[var2]));
+ }
+ }
+
+ /**
+ * Called upon block activation (right click on the block.)
+ */
+ public boolean onBlockActivated(World var1, int var2, int var3, int var4, EntityPlayer var5, int var6, float var7, float var8, float var9)
+ {
+ for (int var10 = var2 - 3; var10 <= var2 + 3; ++var10)
+ {
+ for (int var11 = var3 - 3; var11 <= var3 + 3; ++var11)
+ {
+ for (int var12 = var4 - 3; var12 <= var4 + 3; ++var12)
+ {
+ if (var1.getBlockId(var10, var11, var12) == AetherBlocks.BronzeDoorController.blockID)
+ {
+ TileEntityBronzeDoorController var13 = (TileEntityBronzeDoorController) var1.getBlockTileEntity(var10, var11, var12);
+
+ if (var13 != null)
+ {
+ Party var14 = PartyController.instance().getParty(PartyController.instance().getMember(var5));
+ Dungeon var15 = var13.getDungeon();
+
+ if (var14 != null && var15 != null && var15.isQueuedParty(var14))
+ {
+ int var16 = var15.getKeyAmount();
+ ArrayList var17 = var15.getKeys();
+ System.out.println(var16);
+
+ if (var1.isRemote)
+ {
+ if (var16 <= 0)
+ {
+ var13.chatItUp(var5, "This door seems to require " + (5 - var13.getKeyAmount()) + (5 - var16 < 5 ? " more " : " ") + (5 - var16 > 1 ? "keys" : "key") + ". Perhaps they are elsewhere in the dungeon?");
+ return true;
+ }
+
+ if (var13.getKeyAmount() < 5)
+ {
+ var13.chatItUp(var5, "You have just added " + var16 + " keys to this door. It seems to require " + (5 - var16) + (5 - var16 < 5 ? " more " : " ") + (5 - var16 > 1 ? "keys" : "key") + ".");
+ return true;
+ }
+ }
+
+ if (var16 > 0)
+ {
+ var13.addKeys(var17);
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+ }
+ }
+ }
+
+ return false;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockBronzeDoorController.java b/src/main/java/net/aetherteam/aether/blocks/BlockBronzeDoorController.java
new file mode 100644
index 0000000..d5d1a32
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockBronzeDoorController.java
@@ -0,0 +1,104 @@
+package net.aetherteam.aether.blocks;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.Random;
+
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.tile_entities.TileEntityBronzeDoorController;
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockContainer;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class BlockBronzeDoorController extends BlockContainer implements IAetherBlock
+{
+ private Random rand = new Random();
+
+ public static void updateEnchanterBlockState(boolean var0, World var1, int var2, int var3, int var4)
+ {
+ int var5 = var1.getBlockMetadata(var2, var3, var4);
+ TileEntity var6 = var1.getBlockTileEntity(var2, var3, var4);
+ var1.setBlockMetadataWithNotify(var2, var3, var4, var5, 4);
+ var1.setBlockTileEntity(var2, var3, var4, var6);
+ }
+
+ protected BlockBronzeDoorController(int var1)
+ {
+ super(var1, Material.wood);
+ this.setHardness(-1.0F);
+ this.setResistance(1000000.0F);
+ }
+
+ public boolean removeBlockByPlayer(World var1, EntityPlayer var2, int var3, int var4, int var5)
+ {
+ return false;
+ }
+
+ public Block setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ @SideOnly(Side.CLIENT)
+
+ /**
+ * When this method is called, your block should register all the icons it needs with the given IconRegister. This
+ * is the only chance you get to register icons.
+ */
+ public void registerIcons(IconRegister var1)
+ {
+ this.blockIcon = var1.registerIcon("Aether:Carved Stone");
+ }
+
+ public boolean hasTileEntity(int var1)
+ {
+ return true;
+ }
+
+ /**
+ * Returns a new instance of a block's tile entity class. Called on placing the block.
+ */
+ public TileEntity createNewTileEntity(World var1)
+ {
+ try
+ {
+ return new TileEntityBronzeDoorController();
+ } catch (Exception var3)
+ {
+ throw new RuntimeException(var3);
+ }
+ }
+
+ /**
+ * Called whenever the block is added into the world. Args: world, x, y, z
+ */
+ public void onBlockAdded(World var1, int var2, int var3, int var4)
+ {
+ Dungeon var5 = DungeonHandler.instance().getInstanceAt(MathHelper.floor_double((double) var2), MathHelper.floor_double((double) var3), MathHelper.floor_double((double) var4));
+
+ if (var5 != null)
+ {
+ super.onBlockAdded(var1, var2, var3, var4);
+ } else
+ {
+ var1.setBlock(var2, var3, var4, 0);
+ }
+ }
+
+ /**
+ * Called when the block is placed in the world.
+ */
+ public void onBlockPlacedBy(World var1, int var2, int var3, int var4, EntityLiving var5, ItemStack var6)
+ {
+ var1.setBlock(var2, var3, var4, 0);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockBronzeSpawner.java b/src/main/java/net/aetherteam/aether/blocks/BlockBronzeSpawner.java
new file mode 100644
index 0000000..0c2bfc8
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockBronzeSpawner.java
@@ -0,0 +1,79 @@
+package net.aetherteam.aether.blocks;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.Random;
+
+import net.aetherteam.aether.tile_entities.TileEntityBronzeSpawner;
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockContainer;
+import net.minecraft.block.material.Material;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.World;
+
+public class BlockBronzeSpawner extends BlockContainer
+{
+ protected BlockBronzeSpawner(int var1)
+ {
+ super(var1, Material.rock);
+ }
+
+ public Block setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Returns a new instance of a block's tile entity class. Called on placing the block.
+ */
+ public TileEntity createNewTileEntity(World var1)
+ {
+ return new TileEntityBronzeSpawner();
+ }
+
+ /**
+ * Returns the ID of the items to drop on destruction.
+ */
+ public int idDropped(int var1, Random var2, int var3)
+ {
+ return 0;
+ }
+
+ /**
+ * Returns the quantity of items to drop on block destruction.
+ */
+ public int quantityDropped(Random var1)
+ {
+ return 0;
+ }
+
+ /**
+ * Drops the block items with a specified chance of dropping the specified items
+ */
+ public void dropBlockAsItemWithChance(World var1, int var2, int var3, int var4, int var5, float var6, int var7)
+ {
+ super.dropBlockAsItemWithChance(var1, var2, var3, var4, var5, var6, var7);
+ int var8 = 15 + var1.rand.nextInt(15) + var1.rand.nextInt(15);
+ this.dropXpOnBlockBreak(var1, var2, var3, var4, var8);
+ }
+
+ /**
+ * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
+ * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
+ */
+ public boolean isOpaqueCube()
+ {
+ return false;
+ }
+
+ @SideOnly(Side.CLIENT)
+
+ /**
+ * only called by clickMiddleMouseButton , and passed to inventory.setCurrentItem (along with isCreative)
+ */
+ public int idPicked(World var1, int var2, int var3, int var4)
+ {
+ return 0;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockChestMimic.java b/src/main/java/net/aetherteam/aether/blocks/BlockChestMimic.java
new file mode 100644
index 0000000..42b9007
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockChestMimic.java
@@ -0,0 +1,111 @@
+package net.aetherteam.aether.blocks;
+
+import java.util.Random;
+
+import net.aetherteam.aether.entities.EntityMimic;
+import net.minecraft.block.Block;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.Icon;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+
+public class BlockChestMimic extends BlockSkyrootChest implements IAetherBlock
+{
+ protected BlockChestMimic(int var1)
+ {
+ super(var1, 0);
+ this.setHardness(2.0F);
+ this.setStepSound(Block.soundWoodFootstep);
+ }
+
+ /**
+ * Called upon block activation (right click on the block.)
+ */
+ public boolean onBlockActivated(World var1, int var2, int var3, int var4, EntityPlayer var5, int var6, float var7, float var8, float var9)
+ {
+ if (!var1.isRemote)
+ {
+ var1.setBlock(var2, var3, var4, 0);
+ EntityMimic var10 = new EntityMimic(var1);
+ var10.setPosition((double) var2 + 0.5D, (double) var3 + 1.5D, (double) var4 + 0.5D);
+ var1.spawnEntityInWorld(var10);
+ }
+
+ return true;
+ }
+
+ /**
+ * Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z
+ */
+ public boolean canPlaceBlockAt(World var1, int var2, int var3, int var4)
+ {
+ int var5 = 0;
+
+ if (var1.getBlockId(var2 - 1, var3, var4) == this.blockID)
+ {
+ ++var5;
+ }
+
+ if (var1.getBlockId(var2 + 1, var3, var4) == this.blockID)
+ {
+ ++var5;
+ }
+
+ if (var1.getBlockId(var2, var3, var4 - 1) == this.blockID)
+ {
+ ++var5;
+ }
+
+ if (var1.getBlockId(var2, var3, var4 + 1) == this.blockID)
+ {
+ ++var5;
+ }
+
+ return var5 > 1 ? false : (this.isThereANeighborChest(var1, var2 - 1, var3, var4) ? false : (this.isThereANeighborChest(var1, var2 + 1, var3, var4) ? false : (this.isThereANeighborChest(var1, var2, var3, var4 - 1) ? false : !this.isThereANeighborChest(var1, var2, var3, var4 + 1))));
+ }
+
+ /**
+ * When this method is called, your block should register all the icons it needs with the given IconRegister. This
+ * is the only chance you get to register icons.
+ */
+ public void registerIcons(IconRegister var1)
+ {
+ this.blockIcon = var1.registerIcon("Aether:Skyroot Plank");
+ }
+
+ /**
+ * Retrieves the block texture to use based on the display side. Args: iBlockAccess, x, y, z, side
+ */
+ public Icon getBlockTexture(IBlockAccess var1, int var2, int var3, int var4, int var5)
+ {
+ return this.blockIcon;
+ }
+
+ private boolean isThereANeighborChest(World var1, int var2, int var3, int var4)
+ {
+ return var1.getBlockId(var2, var3, var4) != this.blockID ? false : (var1.getBlockId(var2 - 1, var3, var4) == this.blockID ? true : (var1.getBlockId(var2 + 1, var3, var4) == this.blockID ? true : (var1.getBlockId(var2, var3, var4 - 1) == this.blockID ? true : var1.getBlockId(var2, var3, var4 + 1) == this.blockID)));
+ }
+
+ /**
+ * Called right before the block is destroyed by a player. Args: world, x, y, z, metaData
+ */
+ public void onBlockDestroyedByPlayer(World var1, int var2, int var3, int var4, int var5)
+ {
+ if (!var1.isRemote)
+ {
+ var1.setBlock(var2, var3, var4, 0);
+ EntityMimic var6 = new EntityMimic(var1);
+ var6.setPosition((double) var2 + 0.5D, (double) var3 + 1.5D, (double) var4 + 0.5D);
+ var1.spawnEntityInWorld(var6);
+ }
+ }
+
+ /**
+ * Returns the quantity of items to drop on block destruction.
+ */
+ public int quantityDropped(Random var1)
+ {
+ return 0;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockChristmasLeaves.java b/src/main/java/net/aetherteam/aether/blocks/BlockChristmasLeaves.java
new file mode 100644
index 0000000..f50a0f7
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockChristmasLeaves.java
@@ -0,0 +1,169 @@
+package net.aetherteam.aether.blocks;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.util.Loc;
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.Icon;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+
+public class BlockChristmasLeaves extends BlockAether implements IAetherBlock
+{
+ public static Icon leafIcon;
+ public static Icon decoratedLeafIcon;
+
+ public BlockChristmasLeaves(int var1)
+ {
+ super(var1, Material.leaves);
+ this.setTickRandomly(true);
+ this.setHardness(0.2F);
+ this.setStepSound(Block.soundGrassFootstep);
+ this.setLightOpacity(1);
+ }
+
+ /**
+ * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
+ */
+ public void getSubBlocks(int var1, CreativeTabs var2, List var3)
+ {
+ var3.add(new ItemStack(var1, 1, 0));
+ var3.add(new ItemStack(var1, 1, 1));
+ }
+
+ public Icon getBlockTextureFromSideAndMetadata(int var1, int var2)
+ {
+ return var2 == 0 ? leafIcon : decoratedLeafIcon;
+ }
+
+ /**
+ * Returns the ID of the items to drop on destruction.
+ */
+ public int idDropped(int var1, Random var2, int var3)
+ {
+ return 0;
+ }
+
+ private boolean isMyTrunkMeta(int var1)
+ {
+ return this.blockID == AetherBlocks.ChristmasLeaves.blockID ? var1 <= 1 : var1 >= 2;
+ }
+
+ /**
+ * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
+ * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
+ */
+ public boolean isOpaqueCube()
+ {
+ return false;
+ }
+
+ private boolean nearTrunk(World var1, int var2, int var3, int var4)
+ {
+ Loc var5 = new Loc(var2, var3, var4);
+ LinkedList var6 = new LinkedList();
+ ArrayList var7 = new ArrayList();
+ var6.offer(new Loc(var2, var3, var4));
+ int var8 = this.blockID;
+
+ while (!var6.isEmpty())
+ {
+ Loc var9 = (Loc) var6.poll();
+
+ if (!var7.contains(var9))
+ {
+ if (var9.distSimple(var5) <= 4)
+ {
+ int var10 = var9.getBlock(var1);
+ var9.getMeta(var1);
+
+ if (var10 == AetherBlocks.AetherLog.blockID)
+ {
+ return true;
+ }
+
+ if (var10 == var8)
+ {
+ var6.addAll(Arrays.asList(var9.adjacent()));
+ }
+ }
+
+ var7.add(var9);
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Returns the quantity of items to drop on block destruction.
+ */
+ public int quantityDropped(Random var1)
+ {
+ return 0;
+ }
+
+ /**
+ * A randomly called display update to be able to add particles or other items for display
+ */
+ public void randomDisplayTick(World var1, int var2, int var3, int var4, Random var5)
+ {
+ for (int var6 = 0; var6 < 4; ++var6)
+ {
+ double var7 = (double) var2 + ((double) var5.nextFloat() - 0.5D) * 10.0D;
+ double var9 = (double) var3 + ((double) var5.nextFloat() - 0.5D) * 10.0D;
+ double var11 = (double) var4 + ((double) var5.nextFloat() - 0.5D) * 10.0D;
+ double var13 = 0.0D;
+ double var15 = 0.0D;
+ double var17 = 0.0D;
+ var13 = ((double) var5.nextFloat() - 0.5D) * 0.5D;
+ var15 = ((double) var5.nextFloat() - 0.5D) * 0.5D;
+ var17 = ((double) var5.nextFloat() - 0.5D) * 0.5D;
+ }
+ }
+
+ private void removeLeaves(World var1, int var2, int var3, int var4)
+ {
+ var1.setBlock(var2, var3, var4, 0);
+ }
+
+ /**
+ * Returns true if the given side of this block type should be rendered, if the adjacent block is at the given
+ * coordinates. Args: blockAccess, x, y, z, side
+ */
+ public boolean shouldSideBeRendered(IBlockAccess var1, int var2, int var3, int var4, int var5)
+ {
+ var1.getBlockId(var2, var3, var4);
+ return true;
+ }
+
+ /**
+ * Ticks the block if it's been scheduled
+ */
+ public void updateTick(World var1, int var2, int var3, int var4, Random var5)
+ {
+ if (!this.nearTrunk(var1, var2, var3, var4))
+ {
+ this.removeLeaves(var1, var2, var3, var4);
+ }
+ }
+
+ /**
+ * When this method is called, your block should register all the icons it needs with the given IconRegister. This
+ * is the only chance you get to register icons.
+ */
+ public void registerIcons(IconRegister var1)
+ {
+ leafIcon = var1.registerIcon("Aether:Christmas Leaves");
+ decoratedLeafIcon = var1.registerIcon("Aether:Decorated Christmas Leaves");
+ super.registerIcons(var1);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockColdFire.java b/src/main/java/net/aetherteam/aether/blocks/BlockColdFire.java
new file mode 100644
index 0000000..d3a634f
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockColdFire.java
@@ -0,0 +1,486 @@
+package net.aetherteam.aether.blocks;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.Aether;
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockFire;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.Icon;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+import net.minecraftforge.common.ForgeDirection;
+
+public class BlockColdFire extends BlockFire
+{
+ private int[] chanceToEncourageFire = new int[256];
+ private int[] abilityToCatchFire = new int[256];
+ @SideOnly(Side.CLIENT)
+ private Icon[] iconArray;
+
+ protected BlockColdFire(int var1)
+ {
+ super(var1);
+ this.setTickRandomly(true);
+ }
+
+ public Block setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * This method is called on a block after all other blocks gets already created. You can use it to reference and
+ * configure something on the block that needs the others ones.
+ */
+ public void initializeBlock()
+ {
+ this.abilityToCatchFire = Block.blockFlammability;
+ this.chanceToEncourageFire = Block.blockFireSpreadSpeed;
+ this.setBurnRate(AetherBlocks.SkyrootPlank.blockID, 5, 20);
+ this.setBurnRate(AetherBlocks.SkyrootFence.blockID, 5, 20);
+ this.setBurnRate(AetherBlocks.SkyrootStairs.blockID, 5, 20);
+ this.setBurnRate(AetherBlocks.AetherLog.blockID, 5, 5);
+ }
+
+ private void setBurnRate(int var1, int var2, int var3)
+ {
+ Block.setBurnProperties(var1, var2, var3);
+ }
+
+ /**
+ * Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been
+ * cleared to be reused)
+ */
+ public AxisAlignedBB getCollisionBoundingBoxFromPool(World var1, int var2, int var3, int var4)
+ {
+ return null;
+ }
+
+ /**
+ * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
+ * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
+ */
+ public boolean isOpaqueCube()
+ {
+ return false;
+ }
+
+ /**
+ * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
+ */
+ public boolean renderAsNormalBlock()
+ {
+ return false;
+ }
+
+ /**
+ * The type of render function that is called for this block
+ */
+ public int getRenderType()
+ {
+ return 3;
+ }
+
+ /**
+ * Returns the quantity of items to drop on block destruction.
+ */
+ public int quantityDropped(Random var1)
+ {
+ return 0;
+ }
+
+ /**
+ * How many world ticks before ticking
+ */
+ public int tickRate(World var1)
+ {
+ return 30;
+ }
+
+ /**
+ * Ticks the block if it's been scheduled
+ */
+ public void updateTick(World var1, int var2, int var3, int var4, Random var5)
+ {
+ if (var1.getGameRules().getGameRuleBooleanValue("doFireTick"))
+ {
+ Block var6 = Block.blocksList[var1.getBlockId(var2, var3 - 1, var4)];
+ boolean var7 = var6 != null && var6.isFireSource(var1, var2, var3 - 1, var4, var1.getBlockMetadata(var2, var3 - 1, var4), ForgeDirection.UP);
+
+ if (!this.canPlaceBlockAt(var1, var2, var3, var4))
+ {
+ var1.setBlockToAir(var2, var3, var4);
+ }
+
+ if (!var7 && var1.isRaining() && (var1.canLightningStrikeAt(var2, var3, var4) || var1.canLightningStrikeAt(var2 - 1, var3, var4) || var1.canLightningStrikeAt(var2 + 1, var3, var4) || var1.canLightningStrikeAt(var2, var3, var4 - 1) || var1.canLightningStrikeAt(var2, var3, var4 + 1)))
+ {
+ var1.setBlockToAir(var2, var3, var4);
+ } else
+ {
+ int var8 = var1.getBlockMetadata(var2, var3, var4);
+
+ if (var8 < 15)
+ {
+ var1.setBlockMetadataWithNotify(var2, var3, var4, var8 + var5.nextInt(3) / 2, 4);
+ }
+
+ var1.scheduleBlockUpdate(var2, var3, var4, this.blockID, this.tickRate(var1) + var5.nextInt(10));
+
+ if (!var7 && !this.canNeighborBurn(var1, var2, var3, var4))
+ {
+ if (!var1.doesBlockHaveSolidTopSurface(var2, var3 - 1, var4) || var8 > 3)
+ {
+ var1.setBlockToAir(var2, var3, var4);
+ }
+ } else if (!var7 && !this.canBlockCatchFire(var1, var2, var3 - 1, var4, ForgeDirection.UP) && var8 == 15 && var5.nextInt(4) == 0)
+ {
+ var1.setBlockToAir(var2, var3, var4);
+ } else
+ {
+ boolean var9 = var1.isBlockHighHumidity(var2, var3, var4);
+ byte var10 = 0;
+
+ if (var9)
+ {
+ var10 = -50;
+ }
+
+ this.tryToCatchBlockOnFire(var1, var2 + 1, var3, var4, 300 + var10, var5, var8, ForgeDirection.WEST);
+ this.tryToCatchBlockOnFire(var1, var2 - 1, var3, var4, 300 + var10, var5, var8, ForgeDirection.EAST);
+ this.tryToCatchBlockOnFire(var1, var2, var3 - 1, var4, 250 + var10, var5, var8, ForgeDirection.UP);
+ this.tryToCatchBlockOnFire(var1, var2, var3 + 1, var4, 250 + var10, var5, var8, ForgeDirection.DOWN);
+ this.tryToCatchBlockOnFire(var1, var2, var3, var4 - 1, 300 + var10, var5, var8, ForgeDirection.SOUTH);
+ this.tryToCatchBlockOnFire(var1, var2, var3, var4 + 1, 300 + var10, var5, var8, ForgeDirection.NORTH);
+
+ for (int var11 = var2 - 1; var11 <= var2 + 1; ++var11)
+ {
+ for (int var12 = var4 - 1; var12 <= var4 + 1; ++var12)
+ {
+ for (int var13 = var3 - 1; var13 <= var3 + 4; ++var13)
+ {
+ if (var11 != var2 || var13 != var3 || var12 != var4)
+ {
+ int var14 = 100;
+
+ if (var13 > var3 + 1)
+ {
+ var14 += (var13 - (var3 + 1)) * 100;
+ }
+
+ int var15 = this.getChanceOfNeighborsEncouragingFire(var1, var11, var13, var12);
+
+ if (var15 > 0)
+ {
+ int var16 = (var15 + 40 + var1.difficultySetting * 7) / (var8 + 30);
+
+ if (var9)
+ {
+ var16 /= 2;
+ }
+
+ if (var16 > 0 && var5.nextInt(var14) <= var16 && (!var1.isRaining() || !var1.canLightningStrikeAt(var11, var13, var12)) && !var1.canLightningStrikeAt(var11 - 1, var13, var4) && !var1.canLightningStrikeAt(var11 + 1, var13, var12) && !var1.canLightningStrikeAt(var11, var13, var12 - 1) && !var1.canLightningStrikeAt(var11, var13, var12 + 1))
+ {
+ int var17 = var8 + var5.nextInt(5) / 4;
+
+ if (var17 > 15)
+ {
+ var17 = 15;
+ }
+
+ var1.setBlock(var11, var13, var12, this.blockID, var17, 3);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public boolean func_82506_l()
+ {
+ return false;
+ }
+
+ @Deprecated
+ private void tryToCatchBlockOnFire(World var1, int var2, int var3, int var4, int var5, Random var6, int var7)
+ {
+ this.tryToCatchBlockOnFire(var1, var2, var3, var4, var5, var6, var7, ForgeDirection.UP);
+ }
+
+ private void tryToCatchBlockOnFire(World var1, int var2, int var3, int var4, int var5, Random var6, int var7, ForgeDirection var8)
+ {
+ int var9 = 0;
+ Block var10 = Block.blocksList[var1.getBlockId(var2, var3, var4)];
+
+ if (var10 != null)
+ {
+ var9 = var10.getFlammability(var1, var2, var3, var4, var1.getBlockMetadata(var2, var3, var4), var8);
+ }
+
+ if (var6.nextInt(var5) < var9)
+ {
+ boolean var11 = var1.getBlockId(var2, var3, var4) == Block.tnt.blockID;
+
+ if (var6.nextInt(var7 + 10) < 5 && !var1.canLightningStrikeAt(var2, var3, var4))
+ {
+ int var12 = var7 + var6.nextInt(5) / 4;
+
+ if (var12 > 15)
+ {
+ var12 = 15;
+ }
+
+ var1.setBlock(var2, var3, var4, this.blockID, var12, 3);
+ } else
+ {
+ var1.setBlockToAir(var2, var3, var4);
+ }
+
+ if (var11)
+ {
+ Block.tnt.onBlockDestroyedByPlayer(var1, var2, var3, var4, 1);
+ }
+ }
+ }
+
+ private boolean canNeighborBurn(World var1, int var2, int var3, int var4)
+ {
+ return this.canBlockCatchFire(var1, var2 + 1, var3, var4, ForgeDirection.WEST) || this.canBlockCatchFire(var1, var2 - 1, var3, var4, ForgeDirection.EAST) || this.canBlockCatchFire(var1, var2, var3 - 1, var4, ForgeDirection.UP) || this.canBlockCatchFire(var1, var2, var3 + 1, var4, ForgeDirection.DOWN) || this.canBlockCatchFire(var1, var2, var3, var4 - 1, ForgeDirection.SOUTH) || this.canBlockCatchFire(var1, var2, var3, var4 + 1, ForgeDirection.NORTH);
+ }
+
+ private int getChanceOfNeighborsEncouragingFire(World var1, int var2, int var3, int var4)
+ {
+ byte var5 = 0;
+
+ if (!var1.isAirBlock(var2, var3, var4))
+ {
+ return 0;
+ } else
+ {
+ int var6 = this.getChanceToEncourageFire(var1, var2 + 1, var3, var4, var5, ForgeDirection.WEST);
+ var6 = this.getChanceToEncourageFire(var1, var2 - 1, var3, var4, var6, ForgeDirection.EAST);
+ var6 = this.getChanceToEncourageFire(var1, var2, var3 - 1, var4, var6, ForgeDirection.UP);
+ var6 = this.getChanceToEncourageFire(var1, var2, var3 + 1, var4, var6, ForgeDirection.DOWN);
+ var6 = this.getChanceToEncourageFire(var1, var2, var3, var4 - 1, var6, ForgeDirection.SOUTH);
+ var6 = this.getChanceToEncourageFire(var1, var2, var3, var4 + 1, var6, ForgeDirection.NORTH);
+ return var6;
+ }
+ }
+
+ /**
+ * Returns if this block is collidable (only used by Fire). Args: x, y, z
+ */
+ public boolean isCollidable()
+ {
+ return false;
+ }
+
+ @Deprecated
+
+ /**
+ * Checks the specified block coordinate to see if it can catch fire. Args: blockAccess, x, y, z
+ */
+ public boolean canBlockCatchFire(IBlockAccess var1, int var2, int var3, int var4)
+ {
+ return this.canBlockCatchFire(var1, var2, var3, var4, ForgeDirection.UP);
+ }
+
+ @Deprecated
+
+ /**
+ * Retrieves a specified block's chance to encourage their neighbors to burn and if the number is greater than the
+ * current number passed in it will return its number instead of the passed in one. Args: world, x, y, z,
+ * curChanceToEncourageFire
+ */
+ public int getChanceToEncourageFire(World var1, int var2, int var3, int var4, int var5)
+ {
+ return this.getChanceToEncourageFire(var1, var2, var3, var4, var5, ForgeDirection.UP);
+ }
+
+ /**
+ * Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z
+ */
+ public boolean canPlaceBlockAt(World var1, int var2, int var3, int var4)
+ {
+ return var1.doesBlockHaveSolidTopSurface(var2, var3 - 1, var4) || this.canNeighborBurn(var1, var2, var3, var4);
+ }
+
+ /**
+ * Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are
+ * their own) Args: x, y, z, neighbor blockID
+ */
+ public void onNeighborBlockChange(World var1, int var2, int var3, int var4, int var5)
+ {
+ if (!var1.doesBlockHaveSolidTopSurface(var2, var3 - 1, var4) && !this.canNeighborBurn(var1, var2, var3, var4))
+ {
+ var1.setBlockToAir(var2, var3, var4);
+ }
+ }
+
+ /**
+ * Called whenever the block is added into the world. Args: world, x, y, z
+ */
+ public void onBlockAdded(World var1, int var2, int var3, int var4)
+ {
+ if (var1.provider.dimensionId > 0 || var1.getBlockId(var2, var3 - 1, var4) != Block.obsidian.blockID || !Block.portal.tryToCreatePortal(var1, var2, var3, var4))
+ {
+ if (!var1.doesBlockHaveSolidTopSurface(var2, var3 - 1, var4) && !this.canNeighborBurn(var1, var2, var3, var4))
+ {
+ var1.setBlockToAir(var2, var3, var4);
+ } else
+ {
+ var1.scheduleBlockUpdate(var2, var3, var4, this.blockID, this.tickRate(var1) + var1.rand.nextInt(10));
+ }
+ }
+ }
+
+ @SideOnly(Side.CLIENT)
+
+ /**
+ * A randomly called display update to be able to add particles or other items for display
+ */
+ public void randomDisplayTick(World var1, int var2, int var3, int var4, Random var5)
+ {
+ List var6 = var1.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox((double) var2, (double) var3, (double) var4, (double) (var2 + 1), (double) (var3 + 2), (double) (var4 + 1)));
+ int var7;
+
+ if (var6.size() > 0)
+ {
+ for (var7 = 0; var7 < var6.size(); ++var7)
+ {
+ if (Aether.getPlayerBase((EntityPlayer) var6.get(var7)) != null)
+ {
+ Aether.getPlayerBase((EntityPlayer) var6.get(var7)).setInIce();
+ }
+ }
+ }
+
+ if (var5.nextInt(24) == 0)
+ {
+ var1.playSound((double) ((float) var2 + 0.5F), (double) ((float) var3 + 0.5F), (double) ((float) var4 + 0.5F), "fire.fire", 1.0F + var5.nextFloat(), var5.nextFloat() * 0.7F + 0.3F, false);
+ }
+
+ float var10;
+ float var8;
+ float var9;
+
+ if (!var1.doesBlockHaveSolidTopSurface(var2, var3 - 1, var4) && !AetherBlocks.ColdFire.canBlockCatchFire(var1, var2, var3 - 1, var4, ForgeDirection.UP))
+ {
+ if (AetherBlocks.ColdFire.canBlockCatchFire(var1, var2 - 1, var3, var4, ForgeDirection.EAST))
+ {
+ for (var7 = 0; var7 < 2; ++var7)
+ {
+ var8 = (float) var2 + var5.nextFloat() * 0.1F;
+ var9 = (float) var3 + var5.nextFloat();
+ var10 = (float) var4 + var5.nextFloat();
+ var1.spawnParticle("largesmoke", (double) var8, (double) var9, (double) var10, 0.0D, 0.0D, 0.0D);
+ }
+ }
+
+ if (AetherBlocks.ColdFire.canBlockCatchFire(var1, var2 + 1, var3, var4, ForgeDirection.WEST))
+ {
+ for (var7 = 0; var7 < 2; ++var7)
+ {
+ var8 = (float) (var2 + 1) - var5.nextFloat() * 0.1F;
+ var9 = (float) var3 + var5.nextFloat();
+ var10 = (float) var4 + var5.nextFloat();
+ var1.spawnParticle("largesmoke", (double) var8, (double) var9, (double) var10, 0.0D, 0.0D, 0.0D);
+ }
+ }
+
+ if (AetherBlocks.ColdFire.canBlockCatchFire(var1, var2, var3, var4 - 1, ForgeDirection.SOUTH))
+ {
+ for (var7 = 0; var7 < 2; ++var7)
+ {
+ var8 = (float) var2 + var5.nextFloat();
+ var9 = (float) var3 + var5.nextFloat();
+ var10 = (float) var4 + var5.nextFloat() * 0.1F;
+ var1.spawnParticle("largesmoke", (double) var8, (double) var9, (double) var10, 0.0D, 0.0D, 0.0D);
+ }
+ }
+
+ if (AetherBlocks.ColdFire.canBlockCatchFire(var1, var2, var3, var4 + 1, ForgeDirection.NORTH))
+ {
+ for (var7 = 0; var7 < 2; ++var7)
+ {
+ var8 = (float) var2 + var5.nextFloat();
+ var9 = (float) var3 + var5.nextFloat();
+ var10 = (float) (var4 + 1) - var5.nextFloat() * 0.1F;
+ var1.spawnParticle("largesmoke", (double) var8, (double) var9, (double) var10, 0.0D, 0.0D, 0.0D);
+ }
+ }
+
+ if (AetherBlocks.ColdFire.canBlockCatchFire(var1, var2, var3 + 1, var4, ForgeDirection.DOWN))
+ {
+ for (var7 = 0; var7 < 2; ++var7)
+ {
+ var8 = (float) var2 + var5.nextFloat();
+ var9 = (float) (var3 + 1) - var5.nextFloat() * 0.1F;
+ var10 = (float) var4 + var5.nextFloat();
+ var1.spawnParticle("largesmoke", (double) var8, (double) var9, (double) var10, 0.0D, 0.0D, 0.0D);
+ }
+ }
+ } else
+ {
+ for (var7 = 0; var7 < 3; ++var7)
+ {
+ var8 = (float) var2 + var5.nextFloat();
+ var9 = (float) var3 + var5.nextFloat() * 0.5F + 0.5F;
+ var10 = (float) var4 + var5.nextFloat();
+ var1.spawnParticle("largesmoke", (double) var8, (double) var9, (double) var10, 0.0D, 0.0D, 0.0D);
+ }
+ }
+ }
+
+ @SideOnly(Side.CLIENT)
+
+ /**
+ * When this method is called, your block should register all the icons it needs with the given IconRegister. This
+ * is the only chance you get to register icons.
+ */
+ public void registerIcons(IconRegister var1)
+ {
+ this.iconArray = new Icon[]{var1.registerIcon("Aether:coldfire_0"), var1.registerIcon("Aether:coldfire_1")};
+ }
+
+ @SideOnly(Side.CLIENT)
+ public Icon func_94438_c(int var1)
+ {
+ return this.iconArray[var1];
+ }
+
+ @SideOnly(Side.CLIENT)
+ public Icon getBlockTextureFromSideAndMetadata(int var1, int var2)
+ {
+ return this.iconArray[0];
+ }
+
+ public boolean canBlockCatchFire(IBlockAccess var1, int var2, int var3, int var4, ForgeDirection var5)
+ {
+ Block var6 = Block.blocksList[var1.getBlockId(var2, var3, var4)];
+ return var6 != null ? var6.isFlammable(var1, var2, var3, var4, var1.getBlockMetadata(var2, var3, var4), var5) : false;
+ }
+
+ public int getChanceToEncourageFire(World var1, int var2, int var3, int var4, int var5, ForgeDirection var6)
+ {
+ int var7 = 0;
+ Block var8 = Block.blocksList[var1.getBlockId(var2, var3, var4)];
+
+ if (var8 != null)
+ {
+ var7 = var8.getFireSpreadSpeed(var1, var2, var3, var4, var1.getBlockMetadata(var2, var3, var4), var6);
+ }
+
+ return var7 > var5 ? var7 : var5;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockContinuumOre.java b/src/main/java/net/aetherteam/aether/blocks/BlockContinuumOre.java
new file mode 100644
index 0000000..6e4b727
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockContinuumOre.java
@@ -0,0 +1,26 @@
+package net.aetherteam.aether.blocks;
+
+import java.util.Random;
+
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+
+public class BlockContinuumOre extends BlockAether implements IAetherBlock
+{
+ public BlockContinuumOre(int var1)
+ {
+ super(var1, Material.rock);
+ this.setHardness(3.0F);
+ this.setResistance(5.0F);
+ this.setStepSound(Block.soundStoneFootstep);
+ }
+
+ /**
+ * Returns the ID of the items to drop on destruction.
+ */
+ public int idDropped(int var1, Random var2, int var3)
+ {
+ return AetherItems.ContinuumOrb.itemID;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockCrystalLeaves.java b/src/main/java/net/aetherteam/aether/blocks/BlockCrystalLeaves.java
new file mode 100644
index 0000000..dd89a3c
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockCrystalLeaves.java
@@ -0,0 +1,194 @@
+package net.aetherteam.aether.blocks;
+
+import cpw.mods.fml.client.FMLClientHandler;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.entities.EntityBlueFX;
+import net.aetherteam.aether.items.AetherItems;
+import net.aetherteam.aether.util.Loc;
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.stats.StatList;
+import net.minecraft.util.Icon;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+
+public class BlockCrystalLeaves extends BlockAether implements IAetherBlock
+{
+ private HashMap icons = new HashMap();
+ public static final String[] names = new String[]{"Crystal Leaves", "Crystal Fruit Leaves"};
+
+ public BlockCrystalLeaves(int var1)
+ {
+ super(var1, Material.leaves);
+ this.setTickRandomly(true);
+ this.setHardness(0.2F);
+ this.setStepSound(Block.soundGrassFootstep);
+ }
+
+ /**
+ * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
+ */
+ public void getSubBlocks(int var1, CreativeTabs var2, List var3)
+ {
+ var3.add(new ItemStack(var1, 1, 0));
+ var3.add(new ItemStack(var1, 1, 1));
+ }
+
+ /**
+ * When this method is called, your block should register all the icons it needs with the given IconRegister. This
+ * is the only chance you get to register icons.
+ */
+ public void registerIcons(IconRegister var1)
+ {
+ for (int var2 = 0; var2 < names.length; ++var2)
+ {
+ this.icons.put(names[var2], var1.registerIcon("Aether:" + names[var2]));
+ }
+ }
+
+ /**
+ * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
+ */
+ public Icon getIcon(int var1, int var2)
+ {
+ ItemStack var3 = new ItemStack(AetherBlocks.CrystalLeaves, 1, var2);
+ String var4 = var3.getItem().getItemDisplayName(var3);
+ return (Icon) this.icons.get(var4);
+ }
+
+ /**
+ * Called when the player destroys a block with an item that can harvest it. (i, j, k) are the coordinates of the
+ * block and l is the block's subtype/damage.
+ */
+ public void harvestBlock(World var1, EntityPlayer var2, int var3, int var4, int var5, int var6)
+ {
+ var2.addStat(StatList.mineBlockStatArray[this.blockID], 1);
+
+ if (var6 >= 1)
+ {
+ ItemStack var7 = new ItemStack(AetherItems.WhiteApple.itemID, 1, 0);
+ this.dropBlockAsItem_do(var1, var3, var4, var5, var7);
+ }
+ }
+
+ /**
+ * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
+ * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
+ */
+ public boolean isOpaqueCube()
+ {
+ return false;
+ }
+
+ private boolean nearTrunk(World var1, int var2, int var3, int var4)
+ {
+ Loc var5 = new Loc(var2, var3, var4);
+ LinkedList var6 = new LinkedList();
+ ArrayList var7 = new ArrayList();
+ var6.offer(new Loc(var2, var3, var4));
+ int var8 = this.blockID;
+
+ while (!var6.isEmpty())
+ {
+ Loc var9 = (Loc) var6.poll();
+
+ if (!var7.contains(var9))
+ {
+ if (var9.distSimple(var5) <= 4)
+ {
+ int var10 = var9.getBlock(var1);
+ var9.getMeta(var1);
+
+ if (var10 == AetherBlocks.AetherLog.blockID)
+ {
+ return true;
+ }
+
+ if (var10 == var8)
+ {
+ var6.addAll(Arrays.asList(var9.adjacent()));
+ }
+ }
+
+ var7.add(var9);
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Returns the quantity of items to drop on block destruction.
+ */
+ public int quantityDropped(Random var1)
+ {
+ return 0;
+ }
+
+ @SideOnly(Side.CLIENT)
+
+ /**
+ * A randomly called display update to be able to add particles or other items for display
+ */
+ public void randomDisplayTick(World var1, int var2, int var3, int var4, Random var5)
+ {
+ super.randomDisplayTick(var1, var2, var3, var4, var5);
+
+ if (var5.nextInt(10) == 0 && var1.isRemote)
+ {
+ for (int var6 = 0; var6 < 15; ++var6)
+ {
+ double var7 = (double) var2 + ((double) var5.nextFloat() - 0.5D) * 6.0D;
+ double var9 = (double) var3 + ((double) var5.nextFloat() - 0.5D) * 6.0D;
+ double var11 = (double) var4 + ((double) var5.nextFloat() - 0.5D) * 6.0D;
+ double var13 = 0.0D;
+ double var15 = 0.0D;
+ double var17 = 0.0D;
+ var13 = ((double) var5.nextFloat() - 0.5D) * 0.5D;
+ var15 = ((double) var5.nextFloat() - 0.5D) * 0.5D;
+ var17 = ((double) var5.nextFloat() - 0.5D) * 0.5D;
+ EntityBlueFX var19 = new EntityBlueFX(var1, var7, var9, var11, var13, var15, var17);
+ FMLClientHandler.instance().getClient().effectRenderer.addEffect(var19);
+ }
+ }
+ }
+
+ private void removeLeaves(World var1, int var2, int var3, int var4)
+ {
+ var1.setBlock(var2, var3, var4, 0);
+ }
+
+ /**
+ * Returns true if the given side of this block type should be rendered, if the adjacent block is at the given
+ * coordinates. Args: blockAccess, x, y, z, side
+ */
+ public boolean shouldSideBeRendered(IBlockAccess var1, int var2, int var3, int var4, int var5)
+ {
+ var1.getBlockId(var2, var3, var4);
+ return true;
+ }
+
+ /**
+ * Ticks the block if it's been scheduled
+ */
+ public void updateTick(World var1, int var2, int var3, int var4, Random var5)
+ {
+ if (!this.nearTrunk(var1, var2, var3, var4))
+ {
+ this.removeLeaves(var1, var2, var3, var4);
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockDarkBlueSkyrootLeaves.java b/src/main/java/net/aetherteam/aether/blocks/BlockDarkBlueSkyrootLeaves.java
new file mode 100644
index 0000000..0532366
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockDarkBlueSkyrootLeaves.java
@@ -0,0 +1,103 @@
+package net.aetherteam.aether.blocks;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.LinkedList;
+import java.util.Random;
+
+import net.aetherteam.aether.util.Loc;
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+
+public class BlockDarkBlueSkyrootLeaves extends BlockAether implements IAetherBlock
+{
+ public BlockDarkBlueSkyrootLeaves(int var1)
+ {
+ super(var1, Material.leaves);
+ this.setTickRandomly(true);
+ this.setHardness(0.2F);
+ this.setStepSound(Block.soundGrassFootstep);
+ }
+
+ /**
+ * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
+ * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
+ */
+ public boolean isOpaqueCube()
+ {
+ return false;
+ }
+
+ private boolean nearTrunk(World var1, int var2, int var3, int var4)
+ {
+ Loc var5 = new Loc(var2, var3, var4);
+ LinkedList var6 = new LinkedList();
+ ArrayList var7 = new ArrayList();
+ var6.offer(new Loc(var2, var3, var4));
+ int var8 = this.blockID;
+
+ while (!var6.isEmpty())
+ {
+ Loc var9 = (Loc) var6.poll();
+
+ if (!var7.contains(var9))
+ {
+ if (var9.distSimple(var5) <= 4)
+ {
+ int var10 = var9.getBlock(var1);
+ var9.getMeta(var1);
+
+ if (var10 == AetherBlocks.AetherLog.blockID)
+ {
+ return true;
+ }
+
+ if (var10 == var8)
+ {
+ var6.addAll(Arrays.asList(var9.adjacent()));
+ }
+ }
+
+ var7.add(var9);
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Returns the quantity of items to drop on block destruction.
+ */
+ public int quantityDropped(Random var1)
+ {
+ return 0;
+ }
+
+ private void removeLeaves(World var1, int var2, int var3, int var4)
+ {
+ var1.setBlock(var2, var3, var4, 0);
+ }
+
+ /**
+ * Returns true if the given side of this block type should be rendered, if the adjacent block is at the given
+ * coordinates. Args: blockAccess, x, y, z, side
+ */
+ public boolean shouldSideBeRendered(IBlockAccess var1, int var2, int var3, int var4, int var5)
+ {
+ var1.getBlockId(var2, var3, var4);
+ return true;
+ }
+
+ /**
+ * Ticks the block if it's been scheduled
+ */
+ public void updateTick(World var1, int var2, int var3, int var4, Random var5)
+ {
+ if (!this.nearTrunk(var1, var2, var3, var4))
+ {
+ this.removeLeaves(var1, var2, var3, var4);
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockDungeon.java b/src/main/java/net/aetherteam/aether/blocks/BlockDungeon.java
new file mode 100644
index 0000000..8fa3aab
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockDungeon.java
@@ -0,0 +1,130 @@
+package net.aetherteam.aether.blocks;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.HashMap;
+import java.util.List;
+
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.Icon;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class BlockDungeon extends BlockAether implements IAetherBlock
+{
+ private HashMap icons;
+ public static final String[] names = new String[]{"Carved Stone", "Angelic Stone", "Hellfire Stone", "Sentry Stone", "Light Angelic Stone", "Light Hellfire Stone"};
+
+ public static int getBlockFromDye(int var0)
+ {
+ return ~var0 & 15;
+ }
+
+ public static int getDyeFromBlock(int var0)
+ {
+ return ~var0 & 15;
+ }
+
+ protected BlockDungeon(int var1, float var2, float var3)
+ {
+ super(var1, Material.rock);
+ this.icons = new HashMap();
+ this.setStepSound(Block.soundStoneFootstep);
+ this.setHardness(var2);
+ this.setLightValue(var3);
+ this.setLightOpacity(255);
+ }
+
+ protected BlockDungeon(int var1, float var2, float var3, float var4)
+ {
+ this(var1, var2, var3);
+ this.setResistance(var4);
+ }
+
+ /**
+ * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
+ */
+ public void getSubBlocks(int var1, CreativeTabs var2, List var3)
+ {
+ var3.add(new ItemStack(var1, 1, 0));
+ var3.add(new ItemStack(var1, 1, 1));
+ var3.add(new ItemStack(var1, 1, 2));
+ }
+
+ /**
+ * Determines the damage on the item the block drops. Used in cloth and wood.
+ */
+ public int damageDropped(int var1)
+ {
+ return var1;
+ }
+
+ /**
+ * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
+ */
+ public Icon getIcon(int var1, int var2)
+ {
+ ItemStack var3 = new ItemStack(this.isLit() ? AetherBlocks.LightDungeonStone : AetherBlocks.DungeonStone, 1, var2);
+ String var4 = var3.getItem().getItemDisplayName(var3);
+ return (Icon) this.icons.get(var4);
+ }
+
+ public boolean removeBlockByPlayer(World var1, EntityPlayer var2, int var3, int var4, int var5)
+ {
+ return this.isLocked() ? false : super.removeBlockByPlayer(var1, var2, var3, var4, var5);
+ }
+
+ /**
+ * Called whenever the block is added into the world. Args: world, x, y, z
+ */
+ public void onBlockAdded(World var1, int var2, int var3, int var4)
+ {
+ if (this.isLocked() && DungeonHandler.instance().getInstanceAt(MathHelper.floor_double((double) var2), MathHelper.floor_double((double) var3), MathHelper.floor_double((double) var4)) == null)
+ {
+ var1.setBlockToAir(var2, var3, var4);
+ }
+ }
+
+ /**
+ * Called when the block is placed in the world.
+ */
+ public void onBlockPlacedBy(World var1, int var2, int var3, int var4, EntityLiving var5, ItemStack var6)
+ {
+ if (this.isLocked())
+ {
+ var1.setBlockToAir(var2, var3, var4);
+ }
+ }
+
+ @SideOnly(Side.CLIENT)
+
+ /**
+ * When this method is called, your block should register all the icons it needs with the given IconRegister. This
+ * is the only chance you get to register icons.
+ */
+ public void registerIcons(IconRegister var1)
+ {
+ for (int var2 = 0; var2 < names.length; ++var2)
+ {
+ this.icons.put(names[var2], var1.registerIcon("Aether:" + names[var2]));
+ }
+ }
+
+ private boolean isLit()
+ {
+ return this.blockID == AetherBlocks.LightDungeonStone.blockID || this.blockID == AetherBlocks.LockedLightDungeonStone.blockID;
+ }
+
+ private boolean isLocked()
+ {
+ return this.blockID == AetherBlocks.LockedDungeonStone.blockID || this.blockID == AetherBlocks.LockedLightDungeonStone.blockID;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockDungeonHolystone.java b/src/main/java/net/aetherteam/aether/blocks/BlockDungeonHolystone.java
new file mode 100644
index 0000000..465589b
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockDungeonHolystone.java
@@ -0,0 +1,141 @@
+package net.aetherteam.aether.blocks;
+
+import java.util.HashMap;
+import java.util.List;
+
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.stats.StatList;
+import net.minecraft.util.Icon;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class BlockDungeonHolystone extends BlockAether implements IAetherBlock
+{
+ private HashMap icons = new HashMap();
+ public static final String[] names = new String[]{"Dungeon Holystone", "Dungeon Mossy Holystone"};
+
+ protected BlockDungeonHolystone(int var1)
+ {
+ super(var1, Material.rock);
+ this.setHardness(-1.0F);
+ this.setStepSound(Block.soundStoneFootstep);
+ this.setResistance(1000000.0F);
+ }
+
+ /**
+ * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
+ */
+ public void getSubBlocks(int var1, CreativeTabs var2, List var3)
+ {
+ var3.add(new ItemStack(var1, 1, 1));
+ var3.add(new ItemStack(var1, 1, 3));
+ }
+
+ /**
+ * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
+ */
+ public Icon getIcon(int var1, int var2)
+ {
+ ItemStack var3 = new ItemStack(AetherBlocks.DungeonHolystone, 1, var2);
+ String var4 = var3.getItem().getItemDisplayName(var3);
+ return (Icon) this.icons.get(var4);
+ }
+
+ /**
+ * When this method is called, your block should register all the icons it needs with the given IconRegister. This
+ * is the only chance you get to register icons.
+ */
+ public void registerIcons(IconRegister var1)
+ {
+ for (int var2 = 0; var2 < names.length; ++var2)
+ {
+ this.icons.put(names[var2], var1.registerIcon("Aether:" + names[var2]));
+ }
+ }
+
+ /**
+ * Called when the player destroys a block with an item that can harvest it. (i, j, k) are the coordinates of the
+ * block and l is the block's subtype/damage.
+ */
+ public void harvestBlock(World var1, EntityPlayer var2, int var3, int var4, int var5, int var6)
+ {
+ var2.addStat(StatList.mineBlockStatArray[this.blockID], 1);
+ var2.addExhaustion(0.025F);
+
+ if (!var1.isRemote)
+ {
+ ItemStack var7;
+
+ if (var6 == 0)
+ {
+ if (var2.getCurrentEquippedItem() != null && var2.getCurrentEquippedItem().itemID == AetherItems.SkyrootPickaxe.itemID)
+ {
+ var2.addStat(StatList.mineBlockStatArray[this.blockID], 1);
+ var7 = new ItemStack(AetherBlocks.Holystone.blockID, 2, 1);
+ this.dropBlockAsItem_do(var1, var3, var4, var5, var7);
+ } else
+ {
+ var7 = new ItemStack(AetherBlocks.Holystone.blockID, 1, 1);
+ this.dropBlockAsItem_do(var1, var3, var4, var5, var7);
+ }
+ } else if (var6 == 2)
+ {
+ if (var2.getCurrentEquippedItem() != null && var2.getCurrentEquippedItem().itemID == AetherItems.SkyrootPickaxe.itemID)
+ {
+ var2.addStat(StatList.mineBlockStatArray[this.blockID], 1);
+ var7 = new ItemStack(AetherBlocks.Holystone.blockID, 2, 3);
+ this.dropBlockAsItem_do(var1, var3, var4, var5, var7);
+ } else
+ {
+ var7 = new ItemStack(AetherBlocks.Holystone.blockID, 1, 3);
+ this.dropBlockAsItem_do(var1, var3, var4, var5, var7);
+ }
+ } else
+ {
+ var7 = new ItemStack(AetherBlocks.Holystone.blockID, 1, var6);
+ this.dropBlockAsItem_do(var1, var3, var4, var5, var7);
+ }
+ }
+ }
+
+ public boolean removeBlockByPlayer(World var1, EntityPlayer var2, int var3, int var4, int var5)
+ {
+ return false;
+ }
+
+ /**
+ * Called whenever the block is added into the world. Args: world, x, y, z
+ */
+ public void onBlockAdded(World var1, int var2, int var3, int var4)
+ {
+ if (DungeonHandler.instance().getInstanceAt(MathHelper.floor_double((double) var2), MathHelper.floor_double((double) var3), MathHelper.floor_double((double) var4)) == null)
+ {
+ var1.setBlockToAir(var2, var3, var4);
+ }
+ }
+
+ /**
+ * Called when the block is placed in the world.
+ */
+ public void onBlockPlacedBy(World var1, int var2, int var3, int var4, EntityLiving var5, ItemStack var6)
+ {
+ var1.setBlockToAir(var2, var3, var4);
+ }
+
+ /**
+ * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
+ * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
+ */
+ public boolean isOpaqueCube()
+ {
+ return true;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockEnchantedGravitite.java b/src/main/java/net/aetherteam/aether/blocks/BlockEnchantedGravitite.java
new file mode 100644
index 0000000..04919ac
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockEnchantedGravitite.java
@@ -0,0 +1,23 @@
+package net.aetherteam.aether.blocks;
+
+import net.minecraft.block.Block;
+import net.minecraft.world.IBlockAccess;
+
+public class BlockEnchantedGravitite extends BlockFloating implements IAetherBlock
+{
+ public BlockEnchantedGravitite(int var1, boolean var2)
+ {
+ super(var1, var2);
+ this.setHardness(5.0F);
+ this.setStepSound(Block.soundStoneFootstep);
+ }
+
+ /**
+ * Returns a integer with hex for 0xrrggbb with this color multiplied against the blocks color. Note only called
+ * when first determining what to render.
+ */
+ public int colorMultiplier(IBlockAccess var1, int var2, int var3, int var4)
+ {
+ return this.getRenderColor(var1.getBlockMetadata(var2, var3, var4));
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockEnchanter.java b/src/main/java/net/aetherteam/aether/blocks/BlockEnchanter.java
new file mode 100644
index 0000000..7773bac
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockEnchanter.java
@@ -0,0 +1,279 @@
+package net.aetherteam.aether.blocks;
+
+import cpw.mods.fml.client.FMLClientHandler;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.Random;
+
+import net.aetherteam.aether.items.AetherItems;
+import net.aetherteam.aether.tile_entities.TileEntityEnchanter;
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockContainer;
+import net.minecraft.block.material.Material;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.Icon;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class BlockEnchanter extends BlockContainer implements IAetherBlock
+{
+ private Random EnchanterRand = new Random();
+ private int sideTexture = 7;
+
+ public static void updateEnchanterBlockState(boolean var0, World var1, int var2, int var3, int var4)
+ {
+ int var5 = var1.getBlockMetadata(var2, var3, var4);
+ TileEntity var6 = var1.getBlockTileEntity(var2, var3, var4);
+ var1.setBlockMetadataWithNotify(var2, var3, var4, var5, 4);
+ var1.setBlockTileEntity(var2, var3, var4, var6);
+ }
+
+ protected BlockEnchanter(int var1)
+ {
+ super(var1, Material.rock);
+ this.setHardness(2.0F);
+ }
+
+ public Block setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Called upon block activation (right click on the block.)
+ */
+ public boolean onBlockActivated(World var1, int var2, int var3, int var4, EntityPlayer var5, int var6, float var7, float var8, float var9)
+ {
+ TileEntityEnchanter var10 = (TileEntityEnchanter) var1.getBlockTileEntity(var2, var3, var4);
+
+ if (var10 != null)
+ {
+ ItemStack var11 = var5.getCurrentEquippedItem();
+
+ if (!var10.canEnchant())
+ {
+ if (var1.isRemote)
+ {
+ FMLClientHandler.instance().getClient().ingameGUI.getChatGUI().printChatMessage("Altar is being blocked by something above!");
+ }
+
+ return true;
+ }
+
+ if (var11 != null)
+ {
+ if (var11.itemID == AetherItems.AmbrosiumShard.itemID)
+ {
+ var10.addAmbrosium(var11);
+ var10.onInventoryChanged();
+ } else if (var10.isEnchantable(var11))
+ {
+ if (var10.getEnchanterStacks(0) != null && var10.getEnchanterStacks(0).itemID != var11.itemID)
+ {
+ var10.dropNextStack();
+ } else
+ {
+ var10.addEnchantable(var11);
+ var10.onInventoryChanged();
+ }
+ } else
+ {
+ var10.dropNextStack();
+ }
+ } else
+ {
+ var10.dropNextStack();
+ }
+ }
+
+ return true;
+ }
+
+ public boolean hasTileEntity(int var1)
+ {
+ return true;
+ }
+
+ /**
+ * Returns a new instance of a block's tile entity class. Called on placing the block.
+ */
+ public TileEntity createNewTileEntity(World var1)
+ {
+ try
+ {
+ return new TileEntityEnchanter();
+ } catch (Exception var3)
+ {
+ throw new RuntimeException(var3);
+ }
+ }
+
+ /**
+ * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
+ */
+ public Icon getIcon(int var1, int var2)
+ {
+ return var1 == 1 ? this.blockIcon : (var1 == 0 ? this.blockIcon : this.blockIcon);
+ }
+
+ /**
+ * Called whenever the block is added into the world. Args: world, x, y, z
+ */
+ public void onBlockAdded(World var1, int var2, int var3, int var4)
+ {
+ super.onBlockAdded(var1, var2, var3, var4);
+ this.setDefaultDirection(var1, var2, var3, var4);
+ }
+
+ /**
+ * Called when the block is placed in the world.
+ */
+ public void onBlockPlacedBy(World var1, int var2, int var3, int var4, EntityLiving var5, ItemStack var6)
+ {
+ int var7 = MathHelper.floor_double((double) (var5.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
+
+ if (var7 == 0)
+ {
+ var1.setBlockMetadataWithNotify(var2, var3, var4, 2, 4);
+ }
+
+ if (var7 == 1)
+ {
+ var1.setBlockMetadataWithNotify(var2, var3, var4, 5, 4);
+ }
+
+ if (var7 == 2)
+ {
+ var1.setBlockMetadataWithNotify(var2, var3, var4, 3, 4);
+ }
+
+ if (var7 == 3)
+ {
+ var1.setBlockMetadataWithNotify(var2, var3, var4, 4, 4);
+ }
+ }
+
+ /**
+ * ejects contained items into the world, and notifies neighbours of an update, as appropriate
+ */
+ public void breakBlock(World var1, int var2, int var3, int var4, int var5, int var6)
+ {
+ TileEntityEnchanter var7 = (TileEntityEnchanter) var1.getBlockTileEntity(var2, var3, var4);
+
+ if (var7 != null)
+ {
+ for (int var8 = 0; var8 < var7.getSizeInventory(); ++var8)
+ {
+ ItemStack var9 = var7.getStackInSlot(var8);
+
+ if (var9 != null)
+ {
+ float var10 = this.EnchanterRand.nextFloat() * 0.8F + 0.1F;
+ float var11 = this.EnchanterRand.nextFloat() * 0.8F + 0.1F;
+ float var12 = this.EnchanterRand.nextFloat() * 0.8F + 0.1F;
+
+ while (var9.stackSize > 0)
+ {
+ int var13 = this.EnchanterRand.nextInt(21) + 10;
+
+ if (var13 > var9.stackSize)
+ {
+ var13 = var9.stackSize;
+ }
+
+ var9.stackSize -= var13;
+ EntityItem var14 = new EntityItem(var1, (double) ((float) var2 + var10), (double) ((float) var3 + var11), (double) ((float) var4 + var12), new ItemStack(var9.itemID, var13, var9.getItemDamage()));
+
+ if (var9.hasTagCompound())
+ {
+ var14.getEntityItem().setTagCompound((NBTTagCompound) var9.getTagCompound().copy());
+ }
+
+ float var15 = 0.05F;
+ var14.motionX = (double) ((float) this.EnchanterRand.nextGaussian() * var15);
+ var14.motionY = (double) ((float) this.EnchanterRand.nextGaussian() * var15 + 0.2F);
+ var14.motionZ = (double) ((float) this.EnchanterRand.nextGaussian() * var15);
+ var1.spawnEntityInWorld(var14);
+ }
+ }
+ }
+ }
+
+ super.breakBlock(var1, var2, var3, var4, var5, var6);
+ }
+
+ @SideOnly(Side.CLIENT)
+
+ /**
+ * A randomly called display update to be able to add particles or other items for display
+ */
+ public void randomDisplayTick(World var1, int var2, int var3, int var4, Random var5)
+ {
+ TileEntityEnchanter var6 = (TileEntityEnchanter) var1.getBlockTileEntity(var2, var3, var4);
+ }
+
+ private void setDefaultDirection(World var1, int var2, int var3, int var4)
+ {
+ if (!var1.isRemote)
+ {
+ int var5 = var1.getBlockId(var2, var3, var4 - 1);
+ int var6 = var1.getBlockId(var2, var3, var4 + 1);
+ int var7 = var1.getBlockId(var2 - 1, var3, var4);
+ int var8 = var1.getBlockId(var2 + 1, var3, var4);
+ byte var9 = 3;
+
+ if (Block.opaqueCubeLookup[var5] && !Block.opaqueCubeLookup[var6])
+ {
+ var9 = 3;
+ }
+
+ if (Block.opaqueCubeLookup[var6] && !Block.opaqueCubeLookup[var5])
+ {
+ var9 = 2;
+ }
+
+ if (Block.opaqueCubeLookup[var7] && !Block.opaqueCubeLookup[var8])
+ {
+ var9 = 5;
+ }
+
+ if (Block.opaqueCubeLookup[var8] && !Block.opaqueCubeLookup[var7])
+ {
+ var9 = 4;
+ }
+
+ var1.setBlockMetadataWithNotify(var2, var3, var4, var9, 4);
+ }
+ }
+
+ /**
+ * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
+ * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
+ */
+ public boolean isOpaqueCube()
+ {
+ return false;
+ }
+
+ /**
+ * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
+ */
+ public boolean renderAsNormalBlock()
+ {
+ return false;
+ }
+
+ /**
+ * The type of render function that is called for this block
+ */
+ public int getRenderType()
+ {
+ return AetherBlocks.altarRenderId;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockEntranceController.java b/src/main/java/net/aetherteam/aether/blocks/BlockEntranceController.java
new file mode 100644
index 0000000..40366c7
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockEntranceController.java
@@ -0,0 +1,130 @@
+package net.aetherteam.aether.blocks;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.Random;
+
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.tile_entities.TileEntityEntranceController;
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockContainer;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class BlockEntranceController extends BlockContainer implements IAetherBlock
+{
+ private Random rand = new Random();
+
+ public static void updateControllerBlockState(boolean var0, World var1, int var2, int var3, int var4)
+ {
+ int var5 = var1.getBlockMetadata(var2, var3, var4);
+ TileEntity var6 = var1.getBlockTileEntity(var2, var3, var4);
+ var1.setBlockMetadataWithNotify(var2, var3, var4, var5, 4);
+ var1.setBlockTileEntity(var2, var3, var4, var6);
+ }
+
+ protected BlockEntranceController(int var1)
+ {
+ super(var1, Material.rock);
+ this.setHardness(-1.0F);
+ this.setResistance(1000000.0F);
+ this.setBlockBounds(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F);
+ }
+
+ public boolean removeBlockByPlayer(World var1, EntityPlayer var2, int var3, int var4, int var5)
+ {
+ return false;
+ }
+
+ public Block setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * The type of render function that is called for this block
+ */
+ public int getRenderType()
+ {
+ return AetherBlocks.entranceRenderId;
+ }
+
+ /**
+ * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
+ */
+ public boolean renderAsNormalBlock()
+ {
+ return false;
+ }
+
+ /**
+ * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
+ * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
+ */
+ public boolean isOpaqueCube()
+ {
+ return false;
+ }
+
+ @SideOnly(Side.CLIENT)
+
+ /**
+ * When this method is called, your block should register all the icons it needs with the given IconRegister. This
+ * is the only chance you get to register icons.
+ */
+ public void registerIcons(IconRegister var1)
+ {
+ this.blockIcon = var1.registerIcon("Aether:Carved Stone");
+ }
+
+ public boolean hasTileEntity(int var1)
+ {
+ return true;
+ }
+
+ /**
+ * Returns a new instance of a block's tile entity class. Called on placing the block.
+ */
+ public TileEntity createNewTileEntity(World var1)
+ {
+ try
+ {
+ return new TileEntityEntranceController();
+ } catch (Exception var3)
+ {
+ throw new RuntimeException(var3);
+ }
+ }
+
+ /**
+ * Called whenever the block is added into the world. Args: world, x, y, z
+ */
+ public void onBlockAdded(World var1, int var2, int var3, int var4)
+ {
+ Dungeon var5 = DungeonHandler.instance().getInstanceAt(MathHelper.floor_double((double) var2), MathHelper.floor_double((double) var3), MathHelper.floor_double((double) var4));
+
+ if (var5 != null)
+ {
+ super.onBlockAdded(var1, var2, var3, var4);
+ } else
+ {
+ var1.setBlock(var2, var3, var4, 0);
+ }
+ }
+
+ /**
+ * Called when the block is placed in the world.
+ */
+ public void onBlockPlacedBy(World var1, int var2, int var3, int var4, EntityLiving var5, ItemStack var6)
+ {
+ var1.setBlock(var2, var3, var4, 0);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockEntranceDoor.java b/src/main/java/net/aetherteam/aether/blocks/BlockEntranceDoor.java
new file mode 100644
index 0000000..67aa9e7
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockEntranceDoor.java
@@ -0,0 +1,135 @@
+package net.aetherteam.aether.blocks;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.AetherGuiHandler;
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.tile_entities.TileEntityEntranceController;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.Icon;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class BlockEntranceDoor extends BlockAether implements IAetherBlock
+{
+ private Random rand = new Random();
+ private HashMap icons = new HashMap();
+ public static final String[] names = new String[]{"Dungeon Entrance", "Dungeon Entrance Lock"};
+
+ protected BlockEntranceDoor(int var1)
+ {
+ super(var1, Material.wood);
+ this.setHardness(-1.0F);
+ this.setResistance(1000000.0F);
+ }
+
+ public boolean removeBlockByPlayer(World var1, EntityPlayer var2, int var3, int var4, int var5)
+ {
+ return false;
+ }
+
+ /**
+ * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
+ */
+ public void getSubBlocks(int var1, CreativeTabs var2, List var3)
+ {}
+
+ /**
+ * Called whenever the block is added into the world. Args: world, x, y, z
+ */
+ public void onBlockAdded(World var1, int var2, int var3, int var4)
+ {
+ Dungeon var5 = DungeonHandler.instance().getInstanceAt(MathHelper.floor_double((double) var2), MathHelper.floor_double((double) var3), MathHelper.floor_double((double) var4));
+
+ if (var5 != null)
+ {
+ super.onBlockAdded(var1, var2, var3, var4);
+ } else
+ {
+ var1.setBlock(var2, var3, var4, 0);
+ }
+ }
+
+ /**
+ * Called when the block is placed in the world.
+ */
+ public void onBlockPlacedBy(World var1, int var2, int var3, int var4, EntityLiving var5, ItemStack var6)
+ {
+ var1.setBlock(var2, var3, var4, 0);
+ }
+
+ /**
+ * Determines the damage on the item the block drops. Used in cloth and wood.
+ */
+ public int damageDropped(int var1)
+ {
+ return var1;
+ }
+
+ /**
+ * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
+ */
+ public Icon getIcon(int var1, int var2)
+ {
+ ItemStack var3 = new ItemStack(AetherBlocks.DungeonEntrance, 1, var2);
+ String var4 = var3.getItem().getItemDisplayName(var3);
+ return (Icon) this.icons.get(var4);
+ }
+
+ @SideOnly(Side.CLIENT)
+
+ /**
+ * When this method is called, your block should register all the icons it needs with the given IconRegister. This
+ * is the only chance you get to register icons.
+ */
+ public void registerIcons(IconRegister var1)
+ {
+ for (int var2 = 0; var2 < names.length; ++var2)
+ {
+ this.icons.put(names[var2], var1.registerIcon("Aether:" + names[var2]));
+ }
+ }
+
+ /**
+ * Called upon block activation (right click on the block.)
+ */
+ public boolean onBlockActivated(World var1, int var2, int var3, int var4, EntityPlayer var5, int var6, float var7, float var8, float var9)
+ {
+ for (int var10 = var2 - 3; var10 <= var2 + 3; ++var10)
+ {
+ for (int var11 = var3 - 3; var11 <= var3 + 3; ++var11)
+ {
+ for (int var12 = var4 - 3; var12 <= var4 + 3; ++var12)
+ {
+ if (var1.getBlockId(var10, var11, var12) == AetherBlocks.DungeonEntranceController.blockID)
+ {
+ TileEntityEntranceController var13 = (TileEntityEntranceController) var1.getBlockTileEntity(var10, var11, var12);
+
+ if (var13 != null && var13.hasDungeon() && var13.getDungeon() != null)
+ {
+ int var14 = AetherGuiHandler.entranceID;
+ var5.openGui(Aether.instance, var14, var1, var13.xCoord, var13.yCoord, var13.zCoord);
+ return true;
+ }
+
+ return false;
+ }
+ }
+ }
+ }
+
+ return false;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockFloating.java b/src/main/java/net/aetherteam/aether/blocks/BlockFloating.java
new file mode 100644
index 0000000..10caabc
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockFloating.java
@@ -0,0 +1,123 @@
+package net.aetherteam.aether.blocks;
+
+import java.util.Random;
+
+import net.aetherteam.aether.entities.EntityFloatingBlock;
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class BlockFloating extends BlockAether implements IAetherBlock
+{
+ public static boolean fallInstantly = false;
+ private boolean enchanted;
+
+ public BlockFloating(int var1, boolean var2)
+ {
+ super(var1, Material.rock);
+ this.enchanted = var2;
+ this.setHardness(5.0F);
+ this.setStepSound(Block.soundStoneFootstep);
+ }
+
+ /**
+ * Called whenever the block is added into the world. Args: world, x, y, z
+ */
+ public void onBlockAdded(World var1, int var2, int var3, int var4)
+ {
+ var1.scheduleBlockUpdate(var2, var3, var4, this.blockID, this.tickRate());
+ }
+
+ /**
+ * Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are
+ * their own) Args: x, y, z, neighbor blockID
+ */
+ public void onNeighborBlockChange(World var1, int var2, int var3, int var4, int var5)
+ {
+ var1.scheduleBlockUpdate(var2, var3, var4, this.blockID, this.tickRate());
+ }
+
+ /**
+ * Ticks the block if it's been scheduled
+ */
+ public void updateTick(World var1, int var2, int var3, int var4, Random var5)
+ {
+ if (!this.enchanted || this.enchanted && var1.isBlockIndirectlyGettingPowered(var2, var3, var4))
+ {
+ this.tryToFall(var1, var2, var3, var4);
+ }
+ }
+
+ private void tryToFall(World var1, int var2, int var3, int var4)
+ {
+ int var8 = MathHelper.floor_double((double) var2);
+ int var9 = MathHelper.floor_double((double) var3);
+ int var10 = MathHelper.floor_double((double) var4);
+ int var11 = var1.getBlockId(var2, var3, var4);
+ int var12 = var1.getBlockMetadata(var2, var3, var4);
+
+ if (canFallAbove(var1, var2, var3 + 1, var4) && var3 < var1.getHeight())
+ {
+ byte var13 = 32;
+
+ if (!fallInstantly && var1.checkChunksExist(var2 - var13, var3 - var13, var4 - var13, var2 + var13, var3 + var13, var4 + var13))
+ {
+ var1.setBlockToAir(var2, var3, var4);
+ EntityFloatingBlock var14 = new EntityFloatingBlock(var1, (double) ((float) var8 + 0.5F), (double) ((float) var9 + 0.5F), (double) ((float) var10 + 0.5F), this.blockID, var12);
+
+ if (!var1.isRemote)
+ {
+ var1.spawnEntityInWorld(var14);
+ }
+ } else
+ {
+ var1.setBlockToAir(var2, var3, var4);
+
+ while (canFallAbove(var1, var2, var3 + 1, var4) && var3 < 128)
+ {
+ ++var3;
+ }
+
+ if (var3 > 0)
+ {
+ var1.setBlock(var2, var3, var4, var11, var12, 2);
+ }
+ }
+ }
+ }
+
+ /**
+ * Called when the falling block entity for this block is created
+ */
+ protected void onStartFalling(EntityFloatingBlock var1)
+ {}
+
+ /**
+ * Called when the falling block entity for this block hits the ground and turns back into a block
+ */
+ public void onFinishFalling(World var1, int var2, int var3, int var4, int var5)
+ {}
+
+ public int tickRate()
+ {
+ return 3;
+ }
+
+ public static boolean canFallAbove(World var0, int var1, int var2, int var3)
+ {
+ int var4 = var0.getBlockId(var1, var2, var3);
+
+ if (var4 == 0)
+ {
+ return true;
+ } else if (var4 == Block.fire.blockID)
+ {
+ return true;
+ } else
+ {
+ Material var5 = Block.blocksList[var4].blockMaterial;
+ return var5 == Material.water ? true : var5 == Material.lava;
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockFreezer.java b/src/main/java/net/aetherteam/aether/blocks/BlockFreezer.java
new file mode 100644
index 0000000..bc8113a
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockFreezer.java
@@ -0,0 +1,235 @@
+package net.aetherteam.aether.blocks;
+
+import java.util.Random;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.AetherGuiHandler;
+import net.aetherteam.aether.tile_entities.TileEntityFreezer;
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockContainer;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.Icon;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class BlockFreezer extends BlockContainer implements IAetherBlock
+{
+ private Random FrozenRand = new Random();
+ private Icon sideIcon;
+ private Icon topIcon;
+
+ public static void updateFreezerBlockState(boolean var0, World var1, int var2, int var3, int var4)
+ {
+ int var5 = var1.getBlockMetadata(var2, var3, var4);
+ TileEntity var6 = var1.getBlockTileEntity(var2, var3, var4);
+ var1.setBlockMetadataWithNotify(var2, var3, var4, var5, 4);
+ var1.setBlockTileEntity(var2, var3, var4, var6);
+ }
+
+ /**
+ * When this method is called, your block should register all the icons it needs with the given IconRegister. This
+ * is the only chance you get to register icons.
+ */
+ public void registerIcons(IconRegister var1)
+ {
+ this.topIcon = var1.registerIcon("Aether:Freezer Top");
+ this.sideIcon = var1.registerIcon("Aether:Freezer Side");
+ super.registerIcons(var1);
+ }
+
+ protected BlockFreezer(int var1)
+ {
+ super(var1, Material.rock);
+ this.setHardness(2.5F);
+ this.setStepSound(Block.soundStoneFootstep);
+ }
+
+ public Block setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Called upon block activation (right click on the block.)
+ */
+ public boolean onBlockActivated(World var1, int var2, int var3, int var4, EntityPlayer var5, int var6, float var7, float var8, float var9)
+ {
+ TileEntityFreezer var10 = (TileEntityFreezer) var1.getBlockTileEntity(var2, var3, var4);
+ int var11 = AetherGuiHandler.freezerID;
+ var5.openGui(Aether.instance, var11, var1, var2, var3, var4);
+ return true;
+ }
+
+ public boolean hasTileEntity(int var1)
+ {
+ return true;
+ }
+
+ /**
+ * Returns a new instance of a block's tile entity class. Called on placing the block.
+ */
+ public TileEntity createNewTileEntity(World var1)
+ {
+ try
+ {
+ return new TileEntityFreezer();
+ } catch (Exception var3)
+ {
+ throw new RuntimeException(var3);
+ }
+ }
+
+ /**
+ * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
+ */
+ public Icon getIcon(int var1, int var2)
+ {
+ return var1 == 1 ? this.topIcon : (var1 == 0 ? this.topIcon : this.sideIcon);
+ }
+
+ /**
+ * Called whenever the block is added into the world. Args: world, x, y, z
+ */
+ public void onBlockAdded(World var1, int var2, int var3, int var4)
+ {
+ super.onBlockAdded(var1, var2, var3, var4);
+ this.setDefaultDirection(var1, var2, var3, var4);
+ }
+
+ /**
+ * Called when the block is placed in the world.
+ */
+ public void onBlockPlacedBy(World var1, int var2, int var3, int var4, EntityLiving var5, ItemStack var6)
+ {
+ int var7 = MathHelper.floor_double((double) (var5.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
+
+ if (var7 == 0)
+ {
+ var1.setBlockMetadataWithNotify(var2, var3, var4, 2, 4);
+ }
+
+ if (var7 == 1)
+ {
+ var1.setBlockMetadataWithNotify(var2, var3, var4, 5, 4);
+ }
+
+ if (var7 == 2)
+ {
+ var1.setBlockMetadataWithNotify(var2, var3, var4, 3, 4);
+ }
+
+ if (var7 == 3)
+ {
+ var1.setBlockMetadataWithNotify(var2, var3, var4, 4, 4);
+ }
+ }
+
+ /**
+ * ejects contained items into the world, and notifies neighbours of an update, as appropriate
+ */
+ public void breakBlock(World var1, int var2, int var3, int var4, int var5, int var6)
+ {
+ TileEntityFreezer var7 = (TileEntityFreezer) var1.getBlockTileEntity(var2, var3, var4);
+
+ if (var7 != null)
+ {
+ for (int var8 = 0; var8 < var7.getSizeInventory(); ++var8)
+ {
+ ItemStack var9 = var7.getStackInSlot(var8);
+
+ if (var9 != null)
+ {
+ float var10 = this.FrozenRand.nextFloat() * 0.8F + 0.1F;
+ float var11 = this.FrozenRand.nextFloat() * 0.8F + 0.1F;
+ float var12 = this.FrozenRand.nextFloat() * 0.8F + 0.1F;
+
+ while (var9.stackSize > 0)
+ {
+ int var13 = this.FrozenRand.nextInt(21) + 10;
+
+ if (var13 > var9.stackSize)
+ {
+ var13 = var9.stackSize;
+ }
+
+ var9.stackSize -= var13;
+ EntityItem var14 = new EntityItem(var1, (double) ((float) var2 + var10), (double) ((float) var3 + var11), (double) ((float) var4 + var12), new ItemStack(var9.itemID, var13, var9.getItemDamage()));
+
+ if (var9.hasTagCompound())
+ {
+ var14.getEntityItem().setTagCompound((NBTTagCompound) var9.getTagCompound().copy());
+ }
+
+ float var15 = 0.05F;
+ var14.motionX = (double) ((float) this.FrozenRand.nextGaussian() * var15);
+ var14.motionY = (double) ((float) this.FrozenRand.nextGaussian() * var15 + 0.2F);
+ var14.motionZ = (double) ((float) this.FrozenRand.nextGaussian() * var15);
+ var1.spawnEntityInWorld(var14);
+ }
+ }
+ }
+ }
+
+ super.breakBlock(var1, var2, var3, var4, var5, var6);
+ }
+
+ /**
+ * A randomly called display update to be able to add particles or other items for display
+ */
+ public void randomDisplayTick(World var1, int var2, int var3, int var4, Random var5)
+ {
+ TileEntityFreezer var6 = (TileEntityFreezer) var1.getBlockTileEntity(var2, var3, var4);
+
+ if (var6.isBurning())
+ {
+ for (int var7 = 0; var7 < 5; ++var7)
+ {
+ double var8 = (double) var2 + var5.nextDouble();
+ double var10 = (double) var3 + 1.0D + var5.nextDouble() * 0.75D * 2.0D - 0.75D;
+ double var12 = (double) var4 + var5.nextDouble();
+ Aether.proxy.spawnCloudSmoke(var1, (double) var2 + 0.5D, (double) var3 + 1.0D, (double) var4 + 0.5D, var5, Double.valueOf(0.75D));
+ }
+ }
+ }
+
+ private void setDefaultDirection(World var1, int var2, int var3, int var4)
+ {
+ if (!var1.isRemote)
+ {
+ int var5 = var1.getBlockId(var2, var3, var4 - 1);
+ int var6 = var1.getBlockId(var2, var3, var4 + 1);
+ int var7 = var1.getBlockId(var2 - 1, var3, var4);
+ int var8 = var1.getBlockId(var2 + 1, var3, var4);
+ byte var9 = 3;
+
+ if (Block.opaqueCubeLookup[var5] && !Block.opaqueCubeLookup[var6])
+ {
+ var9 = 3;
+ }
+
+ if (Block.opaqueCubeLookup[var6] && !Block.opaqueCubeLookup[var5])
+ {
+ var9 = 2;
+ }
+
+ if (Block.opaqueCubeLookup[var7] && !Block.opaqueCubeLookup[var8])
+ {
+ var9 = 5;
+ }
+
+ if (Block.opaqueCubeLookup[var8] && !Block.opaqueCubeLookup[var7])
+ {
+ var9 = 4;
+ }
+
+ var1.setBlockMetadataWithNotify(var2, var3, var4, var9, 4);
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockHolystone.java b/src/main/java/net/aetherteam/aether/blocks/BlockHolystone.java
new file mode 100644
index 0000000..2a755aa
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockHolystone.java
@@ -0,0 +1,113 @@
+package net.aetherteam.aether.blocks;
+
+import java.util.HashMap;
+import java.util.List;
+
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.stats.StatList;
+import net.minecraft.util.Icon;
+import net.minecraft.world.World;
+
+public class BlockHolystone extends BlockAether implements IAetherBlock
+{
+ private HashMap icons = new HashMap();
+ public static final String[] names = new String[]{"Holystone", "Mossy Holystone"};
+
+ protected BlockHolystone(int var1)
+ {
+ super(var1, Material.rock);
+ this.setHardness(1.5F);
+ this.setStepSound(Block.soundStoneFootstep);
+ }
+
+ /**
+ * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
+ */
+ public void getSubBlocks(int var1, CreativeTabs var2, List var3)
+ {
+ var3.add(new ItemStack(var1, 1, 1));
+ var3.add(new ItemStack(var1, 1, 3));
+ }
+
+ /**
+ * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
+ */
+ public Icon getIcon(int var1, int var2)
+ {
+ ItemStack var3 = new ItemStack(AetherBlocks.Holystone, 1, var2);
+ String var4 = var3.getItem().getItemDisplayName(var3);
+ return (Icon) this.icons.get(var4);
+ }
+
+ /**
+ * When this method is called, your block should register all the icons it needs with the given IconRegister. This
+ * is the only chance you get to register icons.
+ */
+ public void registerIcons(IconRegister var1)
+ {
+ for (int var2 = 0; var2 < names.length; ++var2)
+ {
+ this.icons.put(names[var2], var1.registerIcon("Aether:" + names[var2]));
+ }
+ }
+
+ /**
+ * Called when the player destroys a block with an item that can harvest it. (i, j, k) are the coordinates of the
+ * block and l is the block's subtype/damage.
+ */
+ public void harvestBlock(World var1, EntityPlayer var2, int var3, int var4, int var5, int var6)
+ {
+ var2.addStat(StatList.mineBlockStatArray[this.blockID], 1);
+ var2.addExhaustion(0.025F);
+
+ if (!var1.isRemote)
+ {
+ ItemStack var7;
+
+ if (var6 == 0)
+ {
+ if (var2.getCurrentEquippedItem() != null && var2.getCurrentEquippedItem().itemID == AetherItems.SkyrootPickaxe.itemID)
+ {
+ var2.addStat(StatList.mineBlockStatArray[this.blockID], 1);
+ var7 = new ItemStack(AetherBlocks.Holystone.blockID, 2, 1);
+ this.dropBlockAsItem_do(var1, var3, var4, var5, var7);
+ } else
+ {
+ var7 = new ItemStack(AetherBlocks.Holystone.blockID, 1, 1);
+ this.dropBlockAsItem_do(var1, var3, var4, var5, var7);
+ }
+ } else if (var6 == 2)
+ {
+ if (var2.getCurrentEquippedItem() != null && var2.getCurrentEquippedItem().itemID == AetherItems.SkyrootPickaxe.itemID)
+ {
+ var2.addStat(StatList.mineBlockStatArray[this.blockID], 1);
+ var7 = new ItemStack(AetherBlocks.Holystone.blockID, 2, 3);
+ this.dropBlockAsItem_do(var1, var3, var4, var5, var7);
+ } else
+ {
+ var7 = new ItemStack(AetherBlocks.Holystone.blockID, 1, 3);
+ this.dropBlockAsItem_do(var1, var3, var4, var5, var7);
+ }
+ } else
+ {
+ var7 = new ItemStack(AetherBlocks.Holystone.blockID, 1, var6);
+ this.dropBlockAsItem_do(var1, var3, var4, var5, var7);
+ }
+ }
+ }
+
+ /**
+ * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
+ * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
+ */
+ public boolean isOpaqueCube()
+ {
+ return true;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockIcestone.java b/src/main/java/net/aetherteam/aether/blocks/BlockIcestone.java
new file mode 100644
index 0000000..f0022dd
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockIcestone.java
@@ -0,0 +1,62 @@
+package net.aetherteam.aether.blocks;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.stats.StatList;
+import net.minecraft.world.World;
+
+public class BlockIcestone extends BlockAether implements IAetherBlock
+{
+ protected BlockIcestone(int var1)
+ {
+ super(var1, Material.rock);
+ this.setHardness(3.0F);
+ this.setStepSound(Block.soundGlassFootstep);
+ }
+
+ /**
+ * Called when the player destroys a block with an item that can harvest it. (i, j, k) are the coordinates of the
+ * block and l is the block's subtype/damage.
+ */
+ public void harvestBlock(World var1, EntityPlayer var2, int var3, int var4, int var5, int var6)
+ {
+ var2.addStat(StatList.mineBlockStatArray[this.blockID], 1);
+ var2.addExhaustion(0.025F);
+ this.dropBlockAsItem(var1, var3, var4, var5, var6, 0);
+ }
+
+ /**
+ * Called when the block is placed in the world.
+ */
+ public void onBlockPlacedBy(World var1, int var2, int var3, int var4, EntityLiving var5, ItemStack var6)
+ {
+ var1.getBlockMaterial(var2, var3, var4);
+ var1.getBlockMaterial(var2, var3 - 1, var4);
+
+ for (int var9 = var2 - 3; var9 <= var2 + 3; ++var9)
+ {
+ for (int var10 = var3 - 3; var10 <= var3 + 3; ++var10)
+ {
+ for (int var11 = var4 - 3; var11 <= var4 + 3; ++var11)
+ {
+ if (var1.getBlockId(var9, var10, var11) == 8)
+ {
+ var1.setBlock(var9, var10, var11, 79);
+ } else if (var1.getBlockId(var9, var10, var11) == 9)
+ {
+ var1.setBlock(var9, var10, var11, 79);
+ } else if (var1.getBlockId(var9, var10, var11) == 10)
+ {
+ var1.setBlock(var9, var10, var11, 49);
+ } else if (var1.getBlockId(var9, var10, var11) == 11)
+ {
+ var1.setBlock(var9, var10, var11, 49);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockIncubator.java b/src/main/java/net/aetherteam/aether/blocks/BlockIncubator.java
new file mode 100644
index 0000000..f89a6f3
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockIncubator.java
@@ -0,0 +1,219 @@
+package net.aetherteam.aether.blocks;
+
+import java.util.ArrayList;
+import java.util.Random;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.AetherGuiHandler;
+import net.aetherteam.aether.tile_entities.TileEntityIncubator;
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockContainer;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.Icon;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class BlockIncubator extends BlockContainer implements IAetherBlock
+{
+ private Random IncubatorRand = new Random();
+ private Icon sideIcon;
+ private Icon topIcon;
+
+ public static void updateIncubatorBlockState(boolean var0, World var1, int var2, int var3, int var4)
+ {
+ int var5 = var1.getBlockMetadata(var2, var3, var4);
+ TileEntity var6 = var1.getBlockTileEntity(var2, var3, var4);
+ var1.setBlockMetadataWithNotify(var2, var3, var4, var5, 4);
+ var1.setBlockTileEntity(var2, var3, var4, var6);
+ }
+
+ /**
+ * When this method is called, your block should register all the icons it needs with the given IconRegister. This
+ * is the only chance you get to register icons.
+ */
+ public void registerIcons(IconRegister var1)
+ {
+ this.topIcon = var1.registerIcon("Aether:Incubator Top");
+ this.sideIcon = var1.registerIcon("Aether:Incubator Side");
+ super.registerIcons(var1);
+ }
+
+ protected BlockIncubator(int var1)
+ {
+ super(var1, Material.rock);
+ this.setHardness(2.0F);
+ }
+
+ public Block setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Called upon block activation (right click on the block.)
+ */
+ public boolean onBlockActivated(World var1, int var2, int var3, int var4, EntityPlayer var5, int var6, float var7, float var8, float var9)
+ {
+ TileEntityIncubator var10 = (TileEntityIncubator) var1.getBlockTileEntity(var2, var3, var4);
+ int var11 = AetherGuiHandler.incubatorID;
+ var5.openGui(Aether.instance, var11, var1, var2, var3, var4);
+ return true;
+ }
+
+ public boolean hasTileEntity(int var1)
+ {
+ return true;
+ }
+
+ /**
+ * Returns a new instance of a block's tile entity class. Called on placing the block.
+ */
+ public TileEntity createNewTileEntity(World var1)
+ {
+ try
+ {
+ return new TileEntityIncubator();
+ } catch (Exception var3)
+ {
+ throw new RuntimeException(var3);
+ }
+ }
+
+ /**
+ * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
+ */
+ public Icon getIcon(int var1, int var2)
+ {
+ return var1 == 1 ? this.topIcon : (var1 == 0 ? this.topIcon : this.sideIcon);
+ }
+
+ public void addCreativeBlocks(ArrayList var1)
+ {
+ var1.add(new ItemStack(this));
+ }
+
+ /**
+ * Called whenever the block is added into the world. Args: world, x, y, z
+ */
+ public void onBlockAdded(World var1, int var2, int var3, int var4)
+ {
+ super.onBlockAdded(var1, var2, var3, var4);
+ this.setDefaultDirection(var1, var2, var3, var4);
+ }
+
+ /**
+ * Called when the block is placed in the world.
+ */
+ public void onBlockPlacedBy(World var1, int var2, int var3, int var4, EntityLiving var5, ItemStack var6)
+ {
+ int var7 = MathHelper.floor_double((double) (var5.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
+
+ if (var7 == 0)
+ {
+ var1.setBlockMetadataWithNotify(var2, var3, var4, 2, 4);
+ }
+
+ if (var7 == 1)
+ {
+ var1.setBlockMetadataWithNotify(var2, var3, var4, 5, 4);
+ }
+
+ if (var7 == 2)
+ {
+ var1.setBlockMetadataWithNotify(var2, var3, var4, 3, 4);
+ }
+
+ if (var7 == 3)
+ {
+ var1.setBlockMetadataWithNotify(var2, var3, var4, 4, 4);
+ }
+ }
+
+ /**
+ * ejects contained items into the world, and notifies neighbours of an update, as appropriate
+ */
+ public void breakBlock(World var1, int var2, int var3, int var4, int var5, int var6)
+ {
+ TileEntityIncubator var7 = (TileEntityIncubator) var1.getBlockTileEntity(var2, var3, var4);
+
+ if (var7 != null)
+ {
+ for (int var8 = 0; var8 < var7.getSizeInventory(); ++var8)
+ {
+ ItemStack var9 = var7.getStackInSlot(var8);
+
+ if (var9 != null)
+ {
+ float var10 = this.IncubatorRand.nextFloat() * 0.8F + 0.1F;
+ float var11 = this.IncubatorRand.nextFloat() * 0.8F + 0.1F;
+ EntityItem var12;
+
+ for (float var13 = this.IncubatorRand.nextFloat() * 0.8F + 0.1F; var9.stackSize > 0; var1.spawnEntityInWorld(var12))
+ {
+ int var14 = this.IncubatorRand.nextInt(21) + 10;
+
+ if (var14 > var9.stackSize)
+ {
+ var14 = var9.stackSize;
+ }
+
+ var9.stackSize -= var14;
+ var12 = new EntityItem(var1, (double) ((float) var2 + var10), (double) ((float) var3 + var11), (double) ((float) var4 + var13), new ItemStack(var9.itemID, var14, var9.getItemDamage()));
+ float var15 = 0.05F;
+ var12.motionX = (double) ((float) this.IncubatorRand.nextGaussian() * var15);
+ var12.motionY = (double) ((float) this.IncubatorRand.nextGaussian() * var15 + 0.2F);
+ var12.motionZ = (double) ((float) this.IncubatorRand.nextGaussian() * var15);
+
+ if (var9.hasTagCompound())
+ {
+ var12.getEntityItem().setTagCompound((NBTTagCompound) var9.getTagCompound().copy());
+ }
+ }
+ }
+ }
+ }
+
+ super.breakBlock(var1, var2, var3, var4, var5, var6);
+ }
+
+ private void setDefaultDirection(World var1, int var2, int var3, int var4)
+ {
+ if (!var1.isRemote)
+ {
+ int var5 = var1.getBlockId(var2, var3, var4 - 1);
+ int var6 = var1.getBlockId(var2, var3, var4 + 1);
+ int var7 = var1.getBlockId(var2 - 1, var3, var4);
+ int var8 = var1.getBlockId(var2 + 1, var3, var4);
+ byte var9 = 3;
+
+ if (Block.opaqueCubeLookup[var5] && !Block.opaqueCubeLookup[var6])
+ {
+ var9 = 3;
+ }
+
+ if (Block.opaqueCubeLookup[var6] && !Block.opaqueCubeLookup[var5])
+ {
+ var9 = 2;
+ }
+
+ if (Block.opaqueCubeLookup[var7] && !Block.opaqueCubeLookup[var8])
+ {
+ var9 = 5;
+ }
+
+ if (Block.opaqueCubeLookup[var8] && !Block.opaqueCubeLookup[var7])
+ {
+ var9 = 4;
+ }
+
+ var1.setBlockMetadataWithNotify(var2, var3, var4, var9, 4);
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockLockedAetherStairs.java b/src/main/java/net/aetherteam/aether/blocks/BlockLockedAetherStairs.java
new file mode 100644
index 0000000..c544e31
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockLockedAetherStairs.java
@@ -0,0 +1,49 @@
+package net.aetherteam.aether.blocks;
+
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.minecraft.block.Block;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class BlockLockedAetherStairs extends BlockAetherStairs
+{
+ protected BlockLockedAetherStairs(int var1, Block var2, int var3)
+ {
+ super(var1, var2, var3);
+ }
+
+ private boolean isLocked()
+ {
+ return true;
+ }
+
+ public boolean removeBlockByPlayer(World var1, EntityPlayer var2, int var3, int var4, int var5)
+ {
+ return this.isLocked() ? false : super.removeBlockByPlayer(var1, var2, var3, var4, var5);
+ }
+
+ /**
+ * Called whenever the block is added into the world. Args: world, x, y, z
+ */
+ public void onBlockAdded(World var1, int var2, int var3, int var4)
+ {
+ if (this.isLocked() && DungeonHandler.instance().getInstanceAt(MathHelper.floor_double((double) var2), MathHelper.floor_double((double) var3), MathHelper.floor_double((double) var4)) == null)
+ {
+ var1.setBlockToAir(var2, var3, var4);
+ }
+ }
+
+ /**
+ * Called when the block is placed in the world.
+ */
+ public void onBlockPlacedBy(World var1, int var2, int var3, int var4, EntityLiving var5, ItemStack var6)
+ {
+ if (this.isLocked())
+ {
+ var1.setBlockToAir(var2, var3, var4);
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockLockedAetherWall.java b/src/main/java/net/aetherteam/aether/blocks/BlockLockedAetherWall.java
new file mode 100644
index 0000000..7455611
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockLockedAetherWall.java
@@ -0,0 +1,49 @@
+package net.aetherteam.aether.blocks;
+
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.minecraft.block.Block;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class BlockLockedAetherWall extends BlockAetherWall
+{
+ public BlockLockedAetherWall(int var1, Block var2, int var3)
+ {
+ super(var1, var2, var3);
+ }
+
+ private boolean isLocked()
+ {
+ return true;
+ }
+
+ public boolean removeBlockByPlayer(World var1, EntityPlayer var2, int var3, int var4, int var5)
+ {
+ return this.isLocked() ? false : super.removeBlockByPlayer(var1, var2, var3, var4, var5);
+ }
+
+ /**
+ * Called whenever the block is added into the world. Args: world, x, y, z
+ */
+ public void onBlockAdded(World var1, int var2, int var3, int var4)
+ {
+ if (this.isLocked() && DungeonHandler.instance().getInstanceAt(MathHelper.floor_double((double) var2), MathHelper.floor_double((double) var3), MathHelper.floor_double((double) var4)) == null)
+ {
+ var1.setBlockToAir(var2, var3, var4);
+ }
+ }
+
+ /**
+ * Called when the block is placed in the world.
+ */
+ public void onBlockPlacedBy(World var1, int var2, int var3, int var4, EntityLiving var5, ItemStack var6)
+ {
+ if (this.isLocked())
+ {
+ var1.setBlockToAir(var2, var3, var4);
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockOrangeTree.java b/src/main/java/net/aetherteam/aether/blocks/BlockOrangeTree.java
new file mode 100644
index 0000000..67d889a
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockOrangeTree.java
@@ -0,0 +1,304 @@
+package net.aetherteam.aether.blocks;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.Random;
+
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.block.Block;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.stats.StatList;
+import net.minecraft.util.Icon;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class BlockOrangeTree extends BlockAetherFlower implements IAetherBlock
+{
+ private Icon stageOne;
+ private Icon stageTwo;
+ private Icon stageThree;
+ private Icon bottomNaked;
+ private Icon topNaked;
+ private Icon bottomIcon;
+ private Icon topIcon;
+
+ public BlockOrangeTree(int var1)
+ {
+ super(var1);
+ this.setHardness(0.2F);
+ }
+
+ /**
+ * Ticks the block if it's been scheduled
+ */
+ public void updateTick(World var1, int var2, int var3, int var4, Random var5)
+ {
+ super.updateTick(var1, var2, var3, var4, var5);
+ this.checkTreeChange(var1, var2, var3, var4);
+ int var6 = this.randomGrowthInt(var1, var2, var3, var4, var5, 5);
+ int var7 = var1.getBlockMetadata(var2, var3, var4);
+
+ if (var6 == 0)
+ {
+ switch (var7)
+ {
+ case 0:
+ var1.setBlock(var2, var3, var4, this.blockID, 1, 2);
+ break;
+
+ case 1:
+ var1.setBlock(var2, var3, var4, this.blockID, 3, 2);
+ var1.setBlock(var2, var3 + 1, var4, this.blockID, 2, 2);
+ break;
+
+ case 2:
+ var1.setBlock(var2, var3 - 1, var4, this.blockID, 3, 2);
+ var1.setBlock(var2, var3, var4, this.blockID, 4, 2);
+ break;
+
+ case 3:
+ if (var1.getBlockMetadata(var2, var3 + 1, var4) == 4)
+ {
+ var1.setBlock(var2, var3, var4, this.blockID, 5, 2);
+ var1.setBlock(var2, var3 + 1, var4, this.blockID, 6, 2);
+ } else
+ {
+ var1.setBlock(var2, var3, var4, this.blockID, 3, 2);
+ var1.setBlock(var2, var3 + 1, var4, this.blockID, 4, 2);
+ }
+
+ case 4:
+ }
+ }
+ }
+
+ @SideOnly(Side.CLIENT)
+
+ /**
+ * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
+ */
+ public Icon getIcon(int var1, int var2)
+ {
+ switch (var2)
+ {
+ case 0:
+ return this.stageOne;
+
+ case 1:
+ return this.stageTwo;
+
+ case 2:
+ return this.stageThree;
+
+ case 3:
+ return this.bottomNaked;
+
+ case 4:
+ return this.topNaked;
+
+ case 5:
+ return this.bottomIcon;
+
+ case 6:
+ return this.topIcon;
+
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Returns the ID of the items to drop on destruction.
+ */
+ public int idDropped(int var1, Random var2, int var3)
+ {
+ return 0;
+ }
+
+ /**
+ * Can this block stay at this position. Similar to canPlaceBlockAt except gets checked often with plants.
+ */
+ public boolean canBlockStay(World var1, int var2, int var3, int var4)
+ {
+ int var5 = var1.getBlockMetadata(var2, var3, var4);
+ Block var6 = blocksList[var1.getBlockId(var2, var3 - 1, var4)];
+
+ if (var1.getFullBlockLightValue(var2, var3, var4) >= 8 || var1.canBlockSeeTheSky(var2, var3, var4) && var6 != null)
+ {
+ if ((var5 <= 1 || var5 == 3 || var5 == 5) && (var6 == AetherBlocks.AetherDirt || var6 == AetherBlocks.AetherGrass))
+ {
+ return true;
+ }
+
+ if ((var5 == 2 || var5 == 4 || var5 == 6) && var1.getBlockId(var2, var3 - 1, var4) == this.blockID)
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Called when the player destroys a block with an item that can harvest it. (i, j, k) are the coordinates of the
+ * block and l is the block's subtype/damage.
+ */
+ public void harvestBlock(World var1, EntityPlayer var2, int var3, int var4, int var5, int var6)
+ {
+ if (var6 == 6 && var1.getBlockId(var3, var4 - 1, var5) == this.blockID)
+ {
+ var1.setBlock(var3, var4, var5, this.blockID, 4, 2);
+ var1.setBlock(var3, var4 - 1, var5, this.blockID, 3, 2);
+ }
+
+ if (var6 == 5 && var1.getBlockId(var3, var4 + 1, var5) == this.blockID)
+ {
+ var1.setBlock(var3, var4 + 1, var5, this.blockID, 4, 2);
+ var1.setBlock(var3, var4, var5, this.blockID, 3, 2);
+ }
+
+ if (var6 == 4 && var1.getBlockId(var3, var4 - 1, var5) == this.blockID)
+ {
+ var1.setBlock(var3, var4, var5, 0);
+ var1.setBlock(var3, var4 - 1, var5, 0);
+ }
+
+ if (var6 == 3 && var1.getBlockId(var3, var4 + 1, var5) == this.blockID)
+ {
+ var1.setBlock(var3, var4 + 1, var5, 0);
+ var1.setBlock(var3, var4, var5, 0);
+ }
+
+ byte var7;
+ byte var8;
+
+ if ((var1.getBlockId(var3, var4 - 1, var5) != AetherBlocks.AetherGrass.blockID || var1.getBlockMetadata(var3, var4 - 1, var5) != 1) && (var1.getBlockId(var3, var4 - 2, var5) != AetherBlocks.AetherGrass.blockID || var1.getBlockMetadata(var3, var4 - 2, var5) != 1))
+ {
+ if ((var1.getBlockId(var3, var4 - 1, var5) != AetherBlocks.AetherGrass.blockID || var1.getBlockMetadata(var3, var4 - 1, var5) != 2) && (var1.getBlockId(var3, var4 - 2, var5) != AetherBlocks.AetherGrass.blockID || var1.getBlockMetadata(var3, var4 - 2, var5) != 2))
+ {
+ var7 = 0;
+ var8 = 2;
+ } else
+ {
+ var7 = 3;
+ var8 = 6;
+ }
+ } else
+ {
+ var7 = 1;
+ var8 = 3;
+ }
+
+ int var9 = MathHelper.clamp_int(var1.rand.nextInt(), var8, var7) + 1;
+ var2.addStat(StatList.mineBlockStatArray[this.blockID], 1);
+ var2.addExhaustion(0.025F);
+ ItemStack var10;
+
+ if (var9 != 0 && var6 >= 5)
+ {
+ var10 = new ItemStack(AetherItems.Orange.itemID, var9, 0);
+ this.dropBlockAsItem_do(var1, var3, var4, var5, var10);
+ } else if (var6 < 5)
+ {
+ var10 = new ItemStack(this, 1, 0);
+ this.dropBlockAsItem_do(var1, var3, var4, var5, var10);
+ }
+ }
+
+ /**
+ * Called right before the block is destroyed by a player. Args: world, x, y, z, metaData
+ */
+ public void onBlockDestroyedByPlayer(World var1, int var2, int var3, int var4, int var5)
+ {
+ if (var5 == 6 && var1.getBlockId(var2, var3 - 1, var4) == this.blockID)
+ {
+ var1.setBlock(var2, var3, var4, this.blockID, 4, 2);
+ var1.setBlock(var2, var3 - 1, var4, this.blockID, 3, 2);
+ }
+
+ if (var5 == 5 && var1.getBlockId(var2, var3 + 1, var4) == this.blockID)
+ {
+ var1.setBlock(var2, var3 + 1, var4, this.blockID, 4, 2);
+ var1.setBlock(var2, var3, var4, this.blockID, 3, 2);
+ }
+
+ if (var5 == 4 && var1.getBlockId(var2, var3 - 1, var4) == this.blockID)
+ {
+ var1.setBlock(var2, var3, var4, 0);
+ var1.setBlock(var2, var3 - 1, var4, 0);
+ }
+
+ if (var5 == 3 && var1.getBlockId(var2, var3 + 1, var4) == this.blockID)
+ {
+ var1.setBlock(var2, var3 + 1, var4, 0);
+ var1.setBlock(var2, var3, var4, 0);
+ }
+
+ super.onBlockDestroyedByPlayer(var1, var2, var3, var4, var5);
+ }
+
+ @SideOnly(Side.CLIENT)
+
+ /**
+ * When this method is called, your block should register all the icons it needs with the given IconRegister. This
+ * is the only chance you get to register icons.
+ */
+ public void registerIcons(IconRegister var1)
+ {
+ this.bottomIcon = var1.registerIcon("Aether:Orange Fruit Tree Bottom");
+ this.topIcon = var1.registerIcon("Aether:Orange Fruit Tree Top");
+ this.bottomNaked = var1.registerIcon("Aether:Orange Fruit Tree Bottom Naked");
+ this.topNaked = var1.registerIcon("Aether:Orange Fruit Tree Top Naked");
+ this.stageOne = var1.registerIcon("Aether:Orange Tree Stage One");
+ this.stageTwo = var1.registerIcon("Aether:Orange Tree Stage Two");
+ this.stageThree = var1.registerIcon("Aether:Orange Tree Top Stage Three");
+ super.registerIcons(var1);
+ }
+
+ public int randomGrowthInt(World var1, int var2, int var3, int var4, Random var5, int var6)
+ {
+ return (var1.getBlockId(var2, var3 - 2, var4) != AetherBlocks.AetherGrass.blockID || var1.getBlockMetadata(var2, var3 - 2, var4) != 2) && (var1.getBlockId(var2, var3 - 1, var4) != AetherBlocks.AetherGrass.blockID || var1.getBlockMetadata(var2, var3 - 1, var4) != 2) ? var5.nextInt(var6) : var5.nextInt(var6 / 2);
+ }
+
+ protected final void checkTreeChange(World var1, int var2, int var3, int var4)
+ {
+ if (!this.canBlockStay(var1, var2, var3, var4))
+ {
+ int var5 = var1.getBlockMetadata(var2, var3, var4);
+ var1.setBlock(var2, var3, var4, 0);
+
+ if (var5 == 0)
+ {
+ ItemStack var6 = new ItemStack(AetherBlocks.BlockOrangeTree.blockID, 1, 0);
+ this.dropBlockAsItem_do(var1, var2, var3, var4, var6);
+ } else
+ {
+ byte var10;
+ byte var7;
+
+ if (var1.getBlockId(var2, var3 - 1, var4) == AetherBlocks.AetherGrass.blockID && var1.getBlockMetadata(var2, var3 - 1, var4) == 1)
+ {
+ var10 = 1;
+ var7 = 3;
+ } else
+ {
+ var10 = 0;
+ var7 = 2;
+ }
+
+ int var8 = MathHelper.clamp_int(var1.rand.nextInt(), var7, var10) + 1;
+
+ if (var8 != 0)
+ {
+ ItemStack var9 = new ItemStack(AetherItems.Orange.itemID, var8, 0);
+ this.dropBlockAsItem_do(var1, var2, var3, var4, var9);
+ }
+ }
+
+ var1.setBlock(var2, var3, var4, 0);
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockPillar.java b/src/main/java/net/aetherteam/aether/blocks/BlockPillar.java
new file mode 100644
index 0000000..43eb466
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockPillar.java
@@ -0,0 +1,67 @@
+package net.aetherteam.aether.blocks;
+
+import java.util.List;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.Icon;
+
+public class BlockPillar extends BlockAether implements IAetherBlock
+{
+ public static Icon sprTop;
+ public static Icon sprSide;
+ public static Icon sprTopSide;
+
+ protected BlockPillar(int var1)
+ {
+ super(var1, Material.rock);
+ this.setHardness(0.5F);
+ this.setStepSound(Block.soundStoneFootstep);
+ }
+
+ /**
+ * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
+ */
+ public Icon getIcon(int var1, int var2)
+ {
+ return var1 != 0 && var1 != 1 ? (var2 == 0 ? sprSide : sprTopSide) : sprTop;
+ }
+
+ /**
+ * Determines the damage on the item the block drops. Used in cloth and wood.
+ */
+ public int damageDropped(int var1)
+ {
+ return var1;
+ }
+
+ public Block setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
+ */
+ public void getSubBlocks(int var1, CreativeTabs var2, List var3)
+ {
+ var3.add(new ItemStack(this, 1, 0));
+ var3.add(new ItemStack(this, 1, 1));
+ var3.add(new ItemStack(this, 1, 2));
+ }
+
+ /**
+ * When this method is called, your block should register all the icons it needs with the given IconRegister. This
+ * is the only chance you get to register icons.
+ */
+ public void registerIcons(IconRegister var1)
+ {
+ sprTop = var1.registerIcon("Aether:Pillar Top");
+ sprSide = var1.registerIcon("Aether:Pillar Side");
+ sprTopSide = var1.registerIcon("Aether:Pillar Top Side");
+ super.registerIcons(var1);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockPresent.java b/src/main/java/net/aetherteam/aether/blocks/BlockPresent.java
new file mode 100644
index 0000000..13fcd7e
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockPresent.java
@@ -0,0 +1,129 @@
+package net.aetherteam.aether.blocks;
+
+import java.util.Random;
+
+import net.aetherteam.aether.entities.EntityTNTPresent;
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.entity.item.EntityXPOrb;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.Icon;
+import net.minecraft.world.World;
+
+public class BlockPresent extends BlockAether implements IAetherBlock
+{
+ public static Icon sprTop;
+ public static Icon sprSide;
+ int rarity;
+ int randStart = 6;
+ int randEnd = 9;
+ long range;
+ long fraction;
+ int randomNumber;
+ int crateType;
+
+ public BlockPresent(int var1)
+ {
+ super(var1, Material.wood);
+ this.range = (long) this.randEnd - (long) this.randStart + 1L;
+ this.setHardness(0.1F);
+ this.setStepSound(Block.soundGrassFootstep);
+ }
+
+ /**
+ * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
+ */
+ public Icon getIcon(int var1, int var2)
+ {
+ return var1 == 0 ? sprTop : (var1 == 1 ? sprTop : sprSide);
+ }
+
+ /**
+ * Called when the player destroys a block with an item that can harvest it. (i, j, k) are the coordinates of the
+ * block and l is the block's subtype/damage.
+ */
+ public void harvestBlock(World var1, EntityPlayer var2, int var3, int var4, int var5, int var6)
+ {
+ Random var7 = new Random();
+ byte var8 = 6;
+ byte var9 = 9;
+ long var10 = (long) var9 - (long) var8 + 1L;
+ long var12 = (long) ((double) var10 * var7.nextDouble());
+ int var14 = (int) (var12 + (long) var8);
+ int var15 = var7.nextInt(4);
+ int var16;
+
+ if (var15 == 0)
+ {
+ for (var16 = 1; var16 <= var14; ++var16)
+ {
+ var1.spawnEntityInWorld(new EntityXPOrb(var1, (double) var3, (double) var4, (double) var5, 1));
+ }
+ } else if (var15 == 1)
+ {
+ if (var7.nextInt(9) == 0)
+ {
+ this.dropBlockAsItem_do(var1, var3, var4, var5, new ItemStack(AetherItems.CandyCaneSword, 1));
+ } else
+ {
+ for (var16 = 1; var16 <= var14; ++var16)
+ {
+ this.dropBlockAsItem_do(var1, var3, var4, var5, new ItemStack(AetherItems.GingerBreadMan, 1));
+ }
+ }
+ } else if (!var1.isRemote)
+ {
+ EntityTNTPresent var17 = new EntityTNTPresent(var1, (double) ((float) var3 + 0.5F), (double) ((float) var4 + 0.5F), (double) ((float) var5 + 0.5F));
+ var17.fuse = var1.rand.nextInt(var17.fuse / 4) + var17.fuse / 8;
+ var1.spawnEntityInWorld(var17);
+ var1.playSoundAtEntity(var17, "random.fuse", 1.0F, 1.0F);
+ }
+ }
+
+ /**
+ * Returns the ID of the items to drop on destruction.
+ */
+ public int idDropped(int var1, Random var2, int var3)
+ {
+ return 0;
+ }
+
+ public void onBlockPlaced(World var1, int var2, int var3, int var4, int var5)
+ {
+ Random var6 = new Random();
+ this.fraction = (long) ((double) this.range * var6.nextDouble());
+ this.randomNumber = (int) (this.fraction + (long) this.randStart);
+ this.crateType = var6.nextInt(4);
+ this.rarity = var6.nextInt(9);
+ }
+
+ /**
+ * Returns the quantity of items to drop on block destruction.
+ */
+ public int quantityDropped(Random var1)
+ {
+ return 0;
+ }
+
+ /**
+ * Returns the usual quantity dropped by the block plus a bonus of 1 to 'i' (inclusive).
+ */
+ public int quantityDroppedWithBonus(int var1, Random var2)
+ {
+ return this.quantityDropped(var2);
+ }
+
+ /**
+ * When this method is called, your block should register all the icons it needs with the given IconRegister. This
+ * is the only chance you get to register icons.
+ */
+ public void registerIcons(IconRegister var1)
+ {
+ sprTop = var1.registerIcon("Aether:Present Top");
+ sprSide = var1.registerIcon("Aether:Present Side");
+ super.registerIcons(var1);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockQuicksoil.java b/src/main/java/net/aetherteam/aether/blocks/BlockQuicksoil.java
new file mode 100644
index 0000000..c932788
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockQuicksoil.java
@@ -0,0 +1,47 @@
+package net.aetherteam.aether.blocks;
+
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.stats.StatList;
+import net.minecraft.world.World;
+
+public class BlockQuicksoil extends BlockAether implements IAetherBlock
+{
+ public BlockQuicksoil(int var1)
+ {
+ super(var1, Material.sand);
+ this.slipperiness = 1.23F;
+ this.setHardness(0.5F);
+ this.setStepSound(Block.soundSandFootstep);
+ }
+
+ /**
+ * Called whenever an entity is walking on top of this block. Args: world, x, y, z, entity
+ */
+ public void onEntityWalking(World var1, int var2, int var3, int var4, Entity var5)
+ {
+ var5.motionX *= 1.1D;
+ var5.motionZ *= 1.1D;
+ }
+
+ /**
+ * Called when the player destroys a block with an item that can harvest it. (i, j, k) are the coordinates of the
+ * block and l is the block's subtype/damage.
+ */
+ public void harvestBlock(World var1, EntityPlayer var2, int var3, int var4, int var5, int var6)
+ {
+ var2.addStat(StatList.mineBlockStatArray[this.blockID], 1);
+ var2.addExhaustion(0.025F);
+
+ if (var6 == 0 && var2.getCurrentEquippedItem() != null && var2.getCurrentEquippedItem().itemID == AetherItems.SkyrootShovel.itemID)
+ {
+ var2.addStat(StatList.mineBlockStatArray[this.blockID], 1);
+ this.dropBlockAsItem(var1, var3, var4, var5, var6, 0);
+ }
+
+ this.dropBlockAsItem(var1, var3, var4, var5, var6, 0);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockQuicksoilGlass.java b/src/main/java/net/aetherteam/aether/blocks/BlockQuicksoilGlass.java
new file mode 100644
index 0000000..9ea61f0
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockQuicksoilGlass.java
@@ -0,0 +1,69 @@
+package net.aetherteam.aether.blocks;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.Random;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockBreakable;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.world.IBlockAccess;
+
+public class BlockQuicksoilGlass extends BlockBreakable implements IAetherBlock
+{
+ private String iconName;
+
+ public BlockQuicksoilGlass(int var1)
+ {
+ super(var1, "sup", Material.glass, false);
+ this.slipperiness = 1.1F;
+ this.setLightValue(0.7375F);
+ this.setHardness(0.2F);
+ this.setLightOpacity(0);
+ this.setStepSound(Block.soundGlassFootstep);
+ }
+
+ /**
+ * Returns which pass should this block be rendered on. 0 for solids and 1 for alpha
+ */
+ public int getRenderBlockPass()
+ {
+ return 1;
+ }
+
+ /**
+ * Returns the quantity of items to drop on block destruction.
+ */
+ public int quantityDropped(Random var1)
+ {
+ return 0;
+ }
+
+ /**
+ * Returns true if the given side of this block type should be rendered, if the adjacent block is at the given
+ * coordinates. Args: blockAccess, x, y, z, side
+ */
+ public boolean shouldSideBeRendered(IBlockAccess var1, int var2, int var3, int var4, int var5)
+ {
+ return super.shouldSideBeRendered(var1, var2, var3, var4, 1 - var5);
+ }
+
+ public Block setIconName(String var1)
+ {
+ this.iconName = "Aether:" + var1;
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ @SideOnly(Side.CLIENT)
+
+ /**
+ * When this method is called, your block should register all the icons it needs with the given IconRegister. This
+ * is the only chance you get to register icons.
+ */
+ public void registerIcons(IconRegister var1)
+ {
+ this.blockIcon = var1.registerIcon(this.iconName);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockSkyrootChest.java b/src/main/java/net/aetherteam/aether/blocks/BlockSkyrootChest.java
new file mode 100644
index 0000000..44b059f
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockSkyrootChest.java
@@ -0,0 +1,548 @@
+package net.aetherteam.aether.blocks;
+
+import java.util.Iterator;
+import java.util.Random;
+
+import net.aetherteam.aether.tile_entities.TileEntitySkyrootChest;
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockContainer;
+import net.minecraft.block.material.Material;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.passive.EntityOcelot;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.inventory.Container;
+import net.minecraft.inventory.IInventory;
+import net.minecraft.inventory.InventoryLargeChest;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+import net.minecraftforge.common.ForgeDirection;
+
+public class BlockSkyrootChest extends BlockContainer
+{
+ private final Random random = new Random();
+ public final int field_94443_a;
+
+ protected BlockSkyrootChest(int var1, int var2)
+ {
+ super(var1, Material.wood);
+ this.field_94443_a = var2;
+ this.setCreativeTab(CreativeTabs.tabDecorations);
+ this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F);
+ }
+
+ public Block setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
+ * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
+ */
+ public boolean isOpaqueCube()
+ {
+ return false;
+ }
+
+ /**
+ * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
+ */
+ public boolean renderAsNormalBlock()
+ {
+ return false;
+ }
+
+ /**
+ * The type of render function that is called for this block
+ */
+ public int getRenderType()
+ {
+ return AetherBlocks.skyrootChestRenderId;
+ }
+
+ /**
+ * Updates the blocks bounds based on its current state. Args: world, x, y, z
+ */
+ public void setBlockBoundsBasedOnState(IBlockAccess var1, int var2, int var3, int var4)
+ {
+ if (var1.getBlockId(var2, var3, var4 - 1) == this.blockID)
+ {
+ this.setBlockBounds(0.0625F, 0.0F, 0.0F, 0.9375F, 0.875F, 0.9375F);
+ } else if (var1.getBlockId(var2, var3, var4 + 1) == this.blockID)
+ {
+ this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 1.0F);
+ } else if (var1.getBlockId(var2 - 1, var3, var4) == this.blockID)
+ {
+ this.setBlockBounds(0.0F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F);
+ } else if (var1.getBlockId(var2 + 1, var3, var4) == this.blockID)
+ {
+ this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 1.0F, 0.875F, 0.9375F);
+ } else
+ {
+ this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F);
+ }
+ }
+
+ /**
+ * Called whenever the block is added into the world. Args: world, x, y, z
+ */
+ public void onBlockAdded(World var1, int var2, int var3, int var4)
+ {
+ super.onBlockAdded(var1, var2, var3, var4);
+ this.unifyAdjacentChests(var1, var2, var3, var4);
+ int var5 = var1.getBlockId(var2, var3, var4 - 1);
+ int var6 = var1.getBlockId(var2, var3, var4 + 1);
+ int var7 = var1.getBlockId(var2 - 1, var3, var4);
+ int var8 = var1.getBlockId(var2 + 1, var3, var4);
+
+ if (var5 == this.blockID)
+ {
+ this.unifyAdjacentChests(var1, var2, var3, var4 - 1);
+ }
+
+ if (var6 == this.blockID)
+ {
+ this.unifyAdjacentChests(var1, var2, var3, var4 + 1);
+ }
+
+ if (var7 == this.blockID)
+ {
+ this.unifyAdjacentChests(var1, var2 - 1, var3, var4);
+ }
+
+ if (var8 == this.blockID)
+ {
+ this.unifyAdjacentChests(var1, var2 + 1, var3, var4);
+ }
+ }
+
+ /**
+ * Called when the block is placed in the world.
+ */
+ public void onBlockPlacedBy(World var1, int var2, int var3, int var4, EntityLiving var5, ItemStack var6)
+ {
+ int var7 = var1.getBlockId(var2, var3, var4 - 1);
+ int var8 = var1.getBlockId(var2, var3, var4 + 1);
+ int var9 = var1.getBlockId(var2 - 1, var3, var4);
+ int var10 = var1.getBlockId(var2 + 1, var3, var4);
+ byte var11 = 0;
+ int var12 = MathHelper.floor_double((double) (var5.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
+
+ if (var12 == 0)
+ {
+ var11 = 2;
+ }
+
+ if (var12 == 1)
+ {
+ var11 = 5;
+ }
+
+ if (var12 == 2)
+ {
+ var11 = 3;
+ }
+
+ if (var12 == 3)
+ {
+ var11 = 4;
+ }
+
+ if (var7 != this.blockID && var8 != this.blockID && var9 != this.blockID && var10 != this.blockID)
+ {
+ var1.setBlockMetadataWithNotify(var2, var3, var4, var11, 3);
+ } else
+ {
+ if ((var7 == this.blockID || var8 == this.blockID) && (var11 == 4 || var11 == 5))
+ {
+ if (var7 == this.blockID)
+ {
+ var1.setBlockMetadataWithNotify(var2, var3, var4 - 1, var11, 3);
+ } else
+ {
+ var1.setBlockMetadataWithNotify(var2, var3, var4 + 1, var11, 3);
+ }
+
+ var1.setBlockMetadataWithNotify(var2, var3, var4, var11, 3);
+ }
+
+ if ((var9 == this.blockID || var10 == this.blockID) && (var11 == 2 || var11 == 3))
+ {
+ if (var9 == this.blockID)
+ {
+ var1.setBlockMetadataWithNotify(var2 - 1, var3, var4, var11, 3);
+ } else
+ {
+ var1.setBlockMetadataWithNotify(var2 + 1, var3, var4, var11, 3);
+ }
+
+ var1.setBlockMetadataWithNotify(var2, var3, var4, var11, 3);
+ }
+ }
+ }
+
+ public void unifyAdjacentChests(World var1, int var2, int var3, int var4)
+ {
+ if (!var1.isRemote)
+ {
+ int var5 = var1.getBlockId(var2, var3, var4 - 1);
+ int var6 = var1.getBlockId(var2, var3, var4 + 1);
+ int var7 = var1.getBlockId(var2 - 1, var3, var4);
+ int var8 = var1.getBlockId(var2 + 1, var3, var4);
+ boolean var9 = true;
+ int var10;
+ int var11;
+ int var14;
+ boolean var12;
+ byte var13;
+
+ if (var5 != this.blockID && var6 != this.blockID)
+ {
+ if (var7 != this.blockID && var8 != this.blockID)
+ {
+ var13 = 3;
+
+ if (Block.opaqueCubeLookup[var5] && !Block.opaqueCubeLookup[var6])
+ {
+ var13 = 3;
+ }
+
+ if (Block.opaqueCubeLookup[var6] && !Block.opaqueCubeLookup[var5])
+ {
+ var13 = 2;
+ }
+
+ if (Block.opaqueCubeLookup[var7] && !Block.opaqueCubeLookup[var8])
+ {
+ var13 = 5;
+ }
+
+ if (Block.opaqueCubeLookup[var8] && !Block.opaqueCubeLookup[var7])
+ {
+ var13 = 4;
+ }
+ } else
+ {
+ var10 = var1.getBlockId(var7 == this.blockID ? var2 - 1 : var2 + 1, var3, var4 - 1);
+ var11 = var1.getBlockId(var7 == this.blockID ? var2 - 1 : var2 + 1, var3, var4 + 1);
+ var13 = 3;
+ var12 = true;
+
+ if (var7 == this.blockID)
+ {
+ var14 = var1.getBlockMetadata(var2 - 1, var3, var4);
+ } else
+ {
+ var14 = var1.getBlockMetadata(var2 + 1, var3, var4);
+ }
+
+ if (var14 == 2)
+ {
+ var13 = 2;
+ }
+
+ if ((Block.opaqueCubeLookup[var5] || Block.opaqueCubeLookup[var10]) && !Block.opaqueCubeLookup[var6] && !Block.opaqueCubeLookup[var11])
+ {
+ var13 = 3;
+ }
+
+ if ((Block.opaqueCubeLookup[var6] || Block.opaqueCubeLookup[var11]) && !Block.opaqueCubeLookup[var5] && !Block.opaqueCubeLookup[var10])
+ {
+ var13 = 2;
+ }
+ }
+ } else
+ {
+ var10 = var1.getBlockId(var2 - 1, var3, var5 == this.blockID ? var4 - 1 : var4 + 1);
+ var11 = var1.getBlockId(var2 + 1, var3, var5 == this.blockID ? var4 - 1 : var4 + 1);
+ var13 = 5;
+ var12 = true;
+
+ if (var5 == this.blockID)
+ {
+ var14 = var1.getBlockMetadata(var2, var3, var4 - 1);
+ } else
+ {
+ var14 = var1.getBlockMetadata(var2, var3, var4 + 1);
+ }
+
+ if (var14 == 4)
+ {
+ var13 = 4;
+ }
+
+ if ((Block.opaqueCubeLookup[var7] || Block.opaqueCubeLookup[var10]) && !Block.opaqueCubeLookup[var8] && !Block.opaqueCubeLookup[var11])
+ {
+ var13 = 5;
+ }
+
+ if ((Block.opaqueCubeLookup[var8] || Block.opaqueCubeLookup[var11]) && !Block.opaqueCubeLookup[var7] && !Block.opaqueCubeLookup[var10])
+ {
+ var13 = 4;
+ }
+ }
+
+ var1.setBlockMetadataWithNotify(var2, var3, var4, var13, 3);
+ }
+ }
+
+ /**
+ * Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z
+ */
+ public boolean canPlaceBlockAt(World var1, int var2, int var3, int var4)
+ {
+ int var5 = 0;
+
+ if (var1.getBlockId(var2 - 1, var3, var4) == this.blockID)
+ {
+ ++var5;
+ }
+
+ if (var1.getBlockId(var2 + 1, var3, var4) == this.blockID)
+ {
+ ++var5;
+ }
+
+ if (var1.getBlockId(var2, var3, var4 - 1) == this.blockID)
+ {
+ ++var5;
+ }
+
+ if (var1.getBlockId(var2, var3, var4 + 1) == this.blockID)
+ {
+ ++var5;
+ }
+
+ return var5 > 1 ? false : (this.isThereANeighborChest(var1, var2 - 1, var3, var4) ? false : (this.isThereANeighborChest(var1, var2 + 1, var3, var4) ? false : (this.isThereANeighborChest(var1, var2, var3, var4 - 1) ? false : !this.isThereANeighborChest(var1, var2, var3, var4 + 1))));
+ }
+
+ private boolean isThereANeighborChest(World var1, int var2, int var3, int var4)
+ {
+ return var1.getBlockId(var2, var3, var4) != this.blockID ? false : (var1.getBlockId(var2 - 1, var3, var4) == this.blockID ? true : (var1.getBlockId(var2 + 1, var3, var4) == this.blockID ? true : (var1.getBlockId(var2, var3, var4 - 1) == this.blockID ? true : var1.getBlockId(var2, var3, var4 + 1) == this.blockID)));
+ }
+
+ /**
+ * Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are
+ * their own) Args: x, y, z, neighbor blockID
+ */
+ public void onNeighborBlockChange(World var1, int var2, int var3, int var4, int var5)
+ {
+ super.onNeighborBlockChange(var1, var2, var3, var4, var5);
+ TileEntitySkyrootChest var6 = (TileEntitySkyrootChest) var1.getBlockTileEntity(var2, var3, var4);
+
+ if (var6 != null)
+ {
+ var6.updateContainingBlockInfo();
+ }
+ }
+
+ /**
+ * ejects contained items into the world, and notifies neighbours of an update, as appropriate
+ */
+ public void breakBlock(World var1, int var2, int var3, int var4, int var5, int var6)
+ {
+ TileEntitySkyrootChest var7 = (TileEntitySkyrootChest) var1.getBlockTileEntity(var2, var3, var4);
+
+ if (var7 != null)
+ {
+ for (int var8 = 0; var8 < var7.getSizeInventory(); ++var8)
+ {
+ ItemStack var9 = var7.getStackInSlot(var8);
+
+ if (var9 != null)
+ {
+ float var10 = this.random.nextFloat() * 0.8F + 0.1F;
+ float var11 = this.random.nextFloat() * 0.8F + 0.1F;
+ EntityItem var12;
+
+ for (float var13 = this.random.nextFloat() * 0.8F + 0.1F; var9.stackSize > 0; var1.spawnEntityInWorld(var12))
+ {
+ int var14 = this.random.nextInt(21) + 10;
+
+ if (var14 > var9.stackSize)
+ {
+ var14 = var9.stackSize;
+ }
+
+ var9.stackSize -= var14;
+ var12 = new EntityItem(var1, (double) ((float) var2 + var10), (double) ((float) var3 + var11), (double) ((float) var4 + var13), new ItemStack(var9.itemID, var14, var9.getItemDamage()));
+ float var15 = 0.05F;
+ var12.motionX = (double) ((float) this.random.nextGaussian() * var15);
+ var12.motionY = (double) ((float) this.random.nextGaussian() * var15 + 0.2F);
+ var12.motionZ = (double) ((float) this.random.nextGaussian() * var15);
+
+ if (var9.hasTagCompound())
+ {
+ var12.getEntityItem().setTagCompound((NBTTagCompound) var9.getTagCompound().copy());
+ }
+ }
+ }
+ }
+
+ var1.func_96440_m(var2, var3, var4, var5);
+ }
+
+ super.breakBlock(var1, var2, var3, var4, var5, var6);
+ }
+
+ /**
+ * Called upon block activation (right click on the block.)
+ */
+ public boolean onBlockActivated(World var1, int var2, int var3, int var4, EntityPlayer var5, int var6, float var7, float var8, float var9)
+ {
+ if (var1.isRemote)
+ {
+ return true;
+ } else
+ {
+ IInventory var10 = this.getInventory(var1, var2, var3, var4);
+
+ if (var10 != null)
+ {
+ var5.displayGUIChest(var10);
+ }
+
+ return true;
+ }
+ }
+
+ /**
+ * Gets the inventory of the chest at the specified coords, accounting for blocks or ocelots on top of the chest,
+ * and double chests.
+ */
+ public IInventory getInventory(World var1, int var2, int var3, int var4)
+ {
+ Object var5 = (TileEntitySkyrootChest) var1.getBlockTileEntity(var2, var3, var4);
+
+ if (var5 == null)
+ {
+ return null;
+ } else if (var1.isBlockSolidOnSide(var2, var3 + 1, var4, ForgeDirection.DOWN))
+ {
+ return null;
+ } else if (isOcelotBlockingChest(var1, var2, var3, var4))
+ {
+ return null;
+ } else if (var1.getBlockId(var2 - 1, var3, var4) == this.blockID && (var1.isBlockSolidOnSide(var2 - 1, var3 + 1, var4, ForgeDirection.DOWN) || isOcelotBlockingChest(var1, var2 - 1, var3, var4)))
+ {
+ return null;
+ } else if (var1.getBlockId(var2 + 1, var3, var4) == this.blockID && (var1.isBlockSolidOnSide(var2 + 1, var3 + 1, var4, ForgeDirection.DOWN) || isOcelotBlockingChest(var1, var2 + 1, var3, var4)))
+ {
+ return null;
+ } else if (var1.getBlockId(var2, var3, var4 - 1) == this.blockID && (var1.isBlockSolidOnSide(var2, var3 + 1, var4 - 1, ForgeDirection.DOWN) || isOcelotBlockingChest(var1, var2, var3, var4 - 1)))
+ {
+ return null;
+ } else if (var1.getBlockId(var2, var3, var4 + 1) == this.blockID && (var1.isBlockSolidOnSide(var2, var3 + 1, var4 + 1, ForgeDirection.DOWN) || isOcelotBlockingChest(var1, var2, var3, var4 + 1)))
+ {
+ return null;
+ } else
+ {
+ if (var1.getBlockId(var2 - 1, var3, var4) == this.blockID)
+ {
+ var5 = new InventoryLargeChest("container.chestDouble", (TileEntitySkyrootChest) var1.getBlockTileEntity(var2 - 1, var3, var4), (IInventory) var5);
+ }
+
+ if (var1.getBlockId(var2 + 1, var3, var4) == this.blockID)
+ {
+ var5 = new InventoryLargeChest("container.chestDouble", (IInventory) var5, (TileEntitySkyrootChest) var1.getBlockTileEntity(var2 + 1, var3, var4));
+ }
+
+ if (var1.getBlockId(var2, var3, var4 - 1) == this.blockID)
+ {
+ var5 = new InventoryLargeChest("container.chestDouble", (TileEntitySkyrootChest) var1.getBlockTileEntity(var2, var3, var4 - 1), (IInventory) var5);
+ }
+
+ if (var1.getBlockId(var2, var3, var4 + 1) == this.blockID)
+ {
+ var5 = new InventoryLargeChest("container.chestDouble", (IInventory) var5, (TileEntitySkyrootChest) var1.getBlockTileEntity(var2, var3, var4 + 1));
+ }
+
+ return (IInventory) var5;
+ }
+ }
+
+ /**
+ * Returns a new instance of a block's tile entity class. Called on placing the block.
+ */
+ public TileEntity createNewTileEntity(World var1)
+ {
+ TileEntitySkyrootChest var2 = new TileEntitySkyrootChest();
+ return var2;
+ }
+
+ /**
+ * Can this block provide power. Only wire currently seems to have this change based on its state.
+ */
+ public boolean canProvidePower()
+ {
+ return this.field_94443_a == 1;
+ }
+
+ /**
+ * Returns true if the block is emitting indirect/weak redstone power on the specified side. If isBlockNormalCube
+ * returns true, standard redstone propagation rules will apply instead and this will not be called. Args: World, X,
+ * Y, Z, side. Note that the side is reversed - eg it is 1 (up) when checking the bottom of the block.
+ */
+ public int isProvidingWeakPower(IBlockAccess var1, int var2, int var3, int var4, int var5)
+ {
+ if (!this.canProvidePower())
+ {
+ return 0;
+ } else
+ {
+ int var6 = ((TileEntitySkyrootChest) var1.getBlockTileEntity(var2, var3, var4)).numUsingPlayers;
+ return MathHelper.clamp_int(var6, 0, 15);
+ }
+ }
+
+ /**
+ * Returns true if the block is emitting direct/strong redstone power on the specified side. Args: World, X, Y, Z,
+ * side. Note that the side is reversed - eg it is 1 (up) when checking the bottom of the block.
+ */
+ public int isProvidingStrongPower(IBlockAccess var1, int var2, int var3, int var4, int var5)
+ {
+ return var5 == 1 ? this.isProvidingWeakPower(var1, var2, var3, var4, var5) : 0;
+ }
+
+ public static boolean isOcelotBlockingChest(World var0, int var1, int var2, int var3)
+ {
+ Iterator var4 = var0.getEntitiesWithinAABB(EntityOcelot.class, AxisAlignedBB.getAABBPool().getAABB((double) var1, (double) (var2 + 1), (double) var3, (double) (var1 + 1), (double) (var2 + 2), (double) (var3 + 1))).iterator();
+
+ while (var4.hasNext())
+ {
+ EntityOcelot var6 = (EntityOcelot) var4.next();
+
+ if (var6.isSitting())
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * If this returns true, then comparators facing away from this block will use the value from
+ * getComparatorInputOverride instead of the actual redstone signal strength.
+ */
+ public boolean hasComparatorInputOverride()
+ {
+ return true;
+ }
+
+ /**
+ * If hasComparatorInputOverride returns true, the return value from this is used instead of the redstone signal
+ * strength when this block inputs to a comparator.
+ */
+ public int getComparatorInputOverride(World var1, int var2, int var3, int var4, int var5)
+ {
+ return Container.func_94526_b(this.getInventory(var1, var2, var3, var4));
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockSkyrootWorkbench.java b/src/main/java/net/aetherteam/aether/blocks/BlockSkyrootWorkbench.java
new file mode 100644
index 0000000..d039a7a
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockSkyrootWorkbench.java
@@ -0,0 +1,63 @@
+package net.aetherteam.aether.blocks;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.AetherGuiHandler;
+import net.minecraft.block.BlockWorkbench;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.Icon;
+import net.minecraft.world.World;
+
+public class BlockSkyrootWorkbench extends BlockWorkbench
+{
+ @SideOnly(Side.CLIENT)
+ private Icon field_94385_a;
+ @SideOnly(Side.CLIENT)
+ private Icon field_94384_b;
+
+ protected BlockSkyrootWorkbench(int var1)
+ {
+ super(var1);
+ }
+
+ @SideOnly(Side.CLIENT)
+
+ /**
+ * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
+ */
+ public Icon getIcon(int var1, int var2)
+ {
+ return var1 == 1 ? this.field_94385_a : (var1 == 0 ? AetherBlocks.SkyrootPlank.getBlockTextureFromSide(var1) : (var1 != 2 && var1 != 4 ? this.blockIcon : this.field_94384_b));
+ }
+
+ @SideOnly(Side.CLIENT)
+
+ /**
+ * When this method is called, your block should register all the icons it needs with the given IconRegister. This
+ * is the only chance you get to register icons.
+ */
+ public void registerIcons(IconRegister var1)
+ {
+ this.blockIcon = var1.registerIcon("Aether:Skyroot Workbench Side");
+ this.field_94385_a = var1.registerIcon("Aether:Skyroot Workbench Top");
+ this.field_94384_b = var1.registerIcon("Aether:Skyroot Workbench Front");
+ }
+
+ /**
+ * Called upon block activation (right click on the block.)
+ */
+ public boolean onBlockActivated(World var1, int var2, int var3, int var4, EntityPlayer var5, int var6, float var7, float var8, float var9)
+ {
+ if (var1.isRemote)
+ {
+ return true;
+ } else
+ {
+ int var10 = AetherGuiHandler.craftingID;
+ var5.openGui(Aether.instance, var10, var1, var2, var3, var4);
+ return true;
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockTallAetherGrass.java b/src/main/java/net/aetherteam/aether/blocks/BlockTallAetherGrass.java
new file mode 100644
index 0000000..1c3ee34
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockTallAetherGrass.java
@@ -0,0 +1,88 @@
+package net.aetherteam.aether.blocks;
+
+import java.util.ArrayList;
+import java.util.Random;
+
+import net.aetherteam.aether.Aether;
+import net.minecraft.block.material.Material;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.Icon;
+import net.minecraft.world.World;
+import net.minecraftforge.common.IShearable;
+
+public class BlockTallAetherGrass extends BlockAetherFlower implements IShearable, IAetherBlock
+{
+ protected BlockTallAetherGrass(int var1)
+ {
+ super(var1, Material.vine);
+ float var2 = 0.4F;
+ this.setBlockBounds(0.5F - var2, 0.0F, 0.5F - var2, 0.5F + var2, 0.8F, 0.5F + var2);
+ }
+
+ /**
+ * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
+ */
+ public Icon getIcon(int var1, int var2)
+ {
+ return this.blockIcon;
+ }
+
+ /**
+ * Returns the ID of the items to drop on destruction.
+ */
+ public int idDropped(int var1, Random var2, int var3)
+ {
+ return -1;
+ }
+
+ /**
+ * Returns the usual quantity dropped by the block plus a bonus of 1 to 'i' (inclusive).
+ */
+ public int quantityDroppedWithBonus(int var1, Random var2)
+ {
+ return 1 + var2.nextInt(var1 * 2 + 1);
+ }
+
+ /**
+ * Called when the player destroys a block with an item that can harvest it. (i, j, k) are the coordinates of the
+ * block and l is the block's subtype/damage.
+ */
+ public void harvestBlock(World var1, EntityPlayer var2, int var3, int var4, int var5, int var6)
+ {
+ super.harvestBlock(var1, var2, var3, var4, var5, var6);
+ }
+
+ /**
+ * The type of render function that is called for this block
+ */
+ public int getRenderType()
+ {
+ return Aether.TallAetherGrassRenderID;
+ }
+
+ /**
+ * Get the block's damage value (for use with pick block).
+ */
+ public int getDamageValue(World var1, int var2, int var3, int var4)
+ {
+ return var1.getBlockMetadata(var2, var3, var4);
+ }
+
+ public boolean isShearable(ItemStack var1, World var2, int var3, int var4, int var5)
+ {
+ return true;
+ }
+
+ public boolean isBlockReplaceable(World var1, int var2, int var3, int var4)
+ {
+ return true;
+ }
+
+ public ArrayList onSheared(ItemStack var1, World var2, int var3, int var4, int var5, int var6)
+ {
+ ArrayList var7 = new ArrayList();
+ var7.add(new ItemStack(this, 1, var2.getBlockMetadata(var3, var4, var5)));
+ return var7;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockTrap.java b/src/main/java/net/aetherteam/aether/blocks/BlockTrap.java
new file mode 100644
index 0000000..88c988c
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockTrap.java
@@ -0,0 +1,145 @@
+package net.aetherteam.aether.blocks;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.entities.EntitySentry;
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockBreakable;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.Icon;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class BlockTrap extends BlockBreakable implements IAetherBlock
+{
+ private HashMap icons = new HashMap();
+ public static final String[] names = new String[]{"Carved Stone", "Angelic Stone", "Hellfire Stone"};
+
+ public BlockTrap(int var1)
+ {
+ super(var1, "sup", Material.rock, false);
+ this.setTickRandomly(true);
+ this.setHardness(-1.0F);
+ this.setResistance(1000000.0F);
+ this.setStepSound(Block.soundStoneFootstep);
+ }
+
+ /**
+ * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
+ * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
+ */
+ public boolean isOpaqueCube()
+ {
+ return true;
+ }
+
+ public Block setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Returns which pass should this block be rendered on. 0 for solids and 1 for alpha
+ */
+ public int getRenderBlockPass()
+ {
+ return 1;
+ }
+
+ /**
+ * Returns the quantity of items to drop on block destruction.
+ */
+ public int quantityDropped(Random var1)
+ {
+ return 1;
+ }
+
+ /**
+ * Called right before the block is destroyed by a player. Args: world, x, y, z, metaData
+ */
+ public void onBlockDestroyedByPlayer(World var1, int var2, int var3, int var4, int var5)
+ {
+ var1.setBlock(var2, var3, var4, this.blockID, var5, 2);
+ }
+
+ /**
+ * Called whenever an entity is walking on top of this block. Args: world, x, y, z, entity
+ */
+ public void onEntityWalking(World var1, int var2, int var3, int var4, Entity var5)
+ {
+ if (var5 instanceof EntityPlayer)
+ {
+ var1.playSoundEffect((double) ((float) var2 + 0.5F), (double) ((float) var3 + 0.5F), (double) ((float) var4 + 0.5F), "aemisc.activateTrap", 1.0F, 1.0F);
+ int var6 = MathHelper.floor_double((double) var2);
+ int var7 = MathHelper.floor_double((double) var3);
+ int var8 = MathHelper.floor_double((double) var4);
+
+ if (!var1.isRemote)
+ {
+ switch (var1.getBlockMetadata(var2, var3, var4))
+ {
+ case 0:
+ EntitySentry var9 = new EntitySentry(var1);
+ var9.setPosition((double) var6 + 0.5D, (double) var7 + 1.5D, (double) var8 + 0.5D);
+ var1.spawnEntityInWorld(var9);
+
+ case 1:
+ }
+ }
+
+ var1.setBlock(var2, var3, var4, AetherBlocks.LockedDungeonStone.blockID, var1.getBlockMetadata(var2, var3, var4), 2);
+ }
+ }
+
+ /**
+ * Determines the damage on the item the block drops. Used in cloth and wood.
+ */
+ public int damageDropped(int var1)
+ {
+ return var1;
+ }
+
+ /**
+ * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
+ */
+ public void getSubBlocks(int var1, CreativeTabs var2, List var3)
+ {
+ var3.add(new ItemStack(var1, 1, 0));
+ var3.add(new ItemStack(var1, 1, 1));
+ var3.add(new ItemStack(var1, 1, 2));
+ }
+
+ /**
+ * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
+ */
+ public Icon getIcon(int var1, int var2)
+ {
+ ItemStack var3 = new ItemStack(AetherBlocks.DungeonStone, 1, var2);
+ String var4 = var3.getItem().getItemDisplayName(var3);
+ return (Icon) this.icons.get(var4);
+ }
+
+ @SideOnly(Side.CLIENT)
+
+ /**
+ * When this method is called, your block should register all the icons it needs with the given IconRegister. This
+ * is the only chance you get to register icons.
+ */
+ public void registerIcons(IconRegister var1)
+ {
+ for (int var2 = 0; var2 < names.length; ++var2)
+ {
+ this.icons.put(names[var2], var1.registerIcon("Aether:" + names[var2]));
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockTreasureChest.java b/src/main/java/net/aetherteam/aether/blocks/BlockTreasureChest.java
new file mode 100644
index 0000000..ba5f479
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockTreasureChest.java
@@ -0,0 +1,126 @@
+package net.aetherteam.aether.blocks;
+
+import java.util.Random;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.AetherGuiHandler;
+import net.aetherteam.aether.items.AetherItems;
+import net.aetherteam.aether.tile_entities.TileEntityTreasureChest;
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockChest;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.Icon;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+
+public class BlockTreasureChest extends BlockChest implements IAetherBlock
+{
+ private Random random = new Random();
+ private int sideTexture;
+
+ protected BlockTreasureChest(int var1, int var2)
+ {
+ super(var1, var2);
+ this.setHardness(-1.0F);
+ this.setStepSound(Block.soundStoneFootstep);
+ }
+
+ public Block setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Called upon block activation (right click on the block.)
+ */
+ public boolean onBlockActivated(World var1, int var2, int var3, int var4, EntityPlayer var5, int var6, float var7, float var8, float var9)
+ {
+ TileEntityTreasureChest var10 = (TileEntityTreasureChest) var1.getBlockTileEntity(var2, var3, var4);
+
+ if (var10.isLocked())
+ {
+ ItemStack var11 = var5.inventory.getCurrentItem();
+
+ if (var11 == null || var11.itemID != AetherItems.Key.itemID)
+ {
+ return false;
+ }
+
+ if (!var1.isRemote)
+ {
+ var10.unlock(var11.getItemDamage());
+ }
+
+ --var11.stackSize;
+ }
+
+ int var12 = AetherGuiHandler.treasureChestID;
+ var5.openGui(Aether.instance, var12, var1, var2, var3, var4);
+ return true;
+ }
+
+ public void checkForAdjacentChests() {}
+
+ public boolean hasTileEntity(int var1)
+ {
+ return true;
+ }
+
+ /**
+ * Returns a new instance of a block's tile entity class. Called on placing the block.
+ */
+ public TileEntity createNewTileEntity(World var1)
+ {
+ try
+ {
+ return new TileEntityTreasureChest();
+ } catch (Exception var3)
+ {
+ throw new RuntimeException(var3);
+ }
+ }
+
+ /**
+ * Returns the quantity of items to drop on block destruction.
+ */
+ public int quantityDropped(Random var1)
+ {
+ return 0;
+ }
+
+ /**
+ * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
+ */
+ public boolean renderAsNormalBlock()
+ {
+ return false;
+ }
+
+ /**
+ * The type of render function that is called for this block
+ */
+ public int getRenderType()
+ {
+ return AetherBlocks.treasureChestRenderId;
+ }
+
+ /**
+ * When this method is called, your block should register all the icons it needs with the given IconRegister. This
+ * is the only chance you get to register icons.
+ */
+ public void registerIcons(IconRegister var1)
+ {
+ this.blockIcon = var1.registerIcon("Aether:Carved Stone");
+ }
+
+ /**
+ * Retrieves the block texture to use based on the display side. Args: iBlockAccess, x, y, z, side
+ */
+ public Icon getBlockTexture(IBlockAccess var1, int var2, int var3, int var4, int var5)
+ {
+ return this.blockIcon;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockZanite.java b/src/main/java/net/aetherteam/aether/blocks/BlockZanite.java
new file mode 100644
index 0000000..9c0e502
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockZanite.java
@@ -0,0 +1,32 @@
+package net.aetherteam.aether.blocks;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.world.IBlockAccess;
+
+public class BlockZanite extends BlockAether implements IAetherBlock
+{
+ protected BlockZanite(int var1)
+ {
+ super(var1, Material.rock);
+ this.setHardness(3.0F);
+ this.setStepSound(Block.soundStoneFootstep);
+ }
+
+ /**
+ * Returns a integer with hex for 0xrrggbb with this color multiplied against the blocks color. Note only called
+ * when first determining what to render.
+ */
+ public int colorMultiplier(IBlockAccess var1, int var2, int var3, int var4)
+ {
+ return this.getRenderColor(var1.getBlockMetadata(var2, var3, var4));
+ }
+
+ /**
+ * Returns the color this block should be rendered. Used by leaves.
+ */
+ public int getRenderColor(int var1)
+ {
+ return 10066431;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/BlockZaniteOre.java b/src/main/java/net/aetherteam/aether/blocks/BlockZaniteOre.java
new file mode 100644
index 0000000..eb6059c
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/BlockZaniteOre.java
@@ -0,0 +1,61 @@
+package net.aetherteam.aether.blocks;
+
+import java.util.Random;
+
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.enchantment.EnchantmentHelper;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.stats.StatList;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class BlockZaniteOre extends BlockAether implements IAetherBlock
+{
+ protected BlockZaniteOre(int var1)
+ {
+ super(var1, Material.rock);
+ this.setHardness(3.0F);
+ this.setStepSound(Block.soundStoneFootstep);
+ }
+
+ public boolean canSilkHarvest(World var1, EntityPlayer var2, int var3, int var4, int var5, int var6)
+ {
+ return true;
+ }
+
+ /**
+ * Called when the player destroys a block with an item that can harvest it. (i, j, k) are the coordinates of the
+ * block and l is the block's subtype/damage.
+ */
+ public void harvestBlock(World var1, EntityPlayer var2, int var3, int var4, int var5, int var6)
+ {
+ var2.addStat(StatList.mineBlockStatArray[this.blockID], 1);
+ var2.addExhaustion(0.025F);
+ ItemStack var7 = null;
+ int var8 = EnchantmentHelper.getFortuneModifier(var2) != 0 ? EnchantmentHelper.getFortuneModifier(var2) : 1;
+
+ if (EnchantmentHelper.getSilkTouchModifier(var2))
+ {
+ var7 = this.createStackedBlock(var6);
+ } else
+ {
+ var7 = new ItemStack(AetherItems.ZaniteGemstone.itemID, MathHelper.clamp_int((new Random()).nextInt(var8 * 2), 1, var8 * 2 + 1), 0);
+ }
+
+ if (var7 != null)
+ {
+ this.dropBlockAsItem_do(var1, var3, var4, var5, var7);
+ }
+ }
+
+ /**
+ * Returns the ID of the items to drop on destruction.
+ */
+ public int idDropped(int var1, Random var2, int var3)
+ {
+ return AetherItems.ZaniteGemstone.itemID;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/blocks/IAetherBlock.java b/src/main/java/net/aetherteam/aether/blocks/IAetherBlock.java
new file mode 100644
index 0000000..0b74c68
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/blocks/IAetherBlock.java
@@ -0,0 +1,8 @@
+package net.aetherteam.aether.blocks;
+
+import net.minecraft.block.Block;
+
+public interface IAetherBlock
+{
+ Block setIconName(String var1);
+}
diff --git a/src/main/java/net/aetherteam/aether/client/ClientProxy.java b/src/main/java/net/aetherteam/aether/client/ClientProxy.java
new file mode 100644
index 0000000..ddb8282
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/ClientProxy.java
@@ -0,0 +1,467 @@
+package net.aetherteam.aether.client;
+
+import cpw.mods.fml.client.FMLClientHandler;
+import cpw.mods.fml.client.registry.ClientRegistry;
+import cpw.mods.fml.client.registry.KeyBindingRegistry;
+import cpw.mods.fml.client.registry.RenderingRegistry;
+import cpw.mods.fml.common.registry.TickRegistry;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintStream;
+import java.util.HashMap;
+import java.util.Random;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.AetherCommonPlayerHandler;
+import net.aetherteam.aether.AetherEventReceiver;
+import net.aetherteam.aether.AetherKeyHandler;
+import net.aetherteam.aether.AetherPoison;
+import net.aetherteam.aether.AetherSoundLoader;
+import net.aetherteam.aether.CommonProxy;
+import net.aetherteam.aether.MenuBaseAetherII;
+import net.aetherteam.aether.PlayerBaseAetherServer;
+import net.aetherteam.aether.client.gui.AetherGuis;
+import net.aetherteam.aether.client.gui.GuiAetherIngame;
+import net.aetherteam.aether.client.gui.social.GuiDungeonScreen;
+import net.aetherteam.aether.client.renders.AetherEntityRenderers;
+import net.aetherteam.aether.client.renders.RenderAetherTallGrass;
+import net.aetherteam.aether.client.renders.RenderBerryBush;
+import net.aetherteam.aether.client.renders.RenderHandlerAltar;
+import net.aetherteam.aether.client.renders.RenderHandlerSkyrootChest;
+import net.aetherteam.aether.client.renders.RenderHandlerTreasureChest;
+import net.aetherteam.aether.donator.SyncDonatorList;
+import net.aetherteam.aether.entities.EntityAetherBreakingFX;
+import net.aetherteam.aether.entities.EntityAetherPortalFX;
+import net.aetherteam.aether.entities.EntityCloudSmokeFX;
+import net.aetherteam.aether.entities.EntityGoldenFX;
+import net.aetherteam.aether.items.AetherItems;
+import net.aetherteam.aether.notifications.client.ClientNotificationHandler;
+import net.aetherteam.aether.tile_entities.TileEntityAltar;
+import net.aetherteam.aether.tile_entities.TileEntityAltarRenderer;
+import net.aetherteam.aether.tile_entities.TileEntityEntranceController;
+import net.aetherteam.aether.tile_entities.TileEntityEntranceRenderer;
+import net.aetherteam.aether.tile_entities.TileEntitySkyrootChest;
+import net.aetherteam.aether.tile_entities.TileEntitySkyrootChestRenderer;
+import net.aetherteam.aether.tile_entities.TileEntityTreasureChest;
+import net.aetherteam.aether.tile_entities.TileEntityTreasureChestRenderer;
+import net.aetherteam.mainmenu_api.MainMenuAPI;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.audio.SoundManager;
+import net.minecraft.client.entity.EntityPlayerSP;
+import net.minecraft.client.particle.EffectRenderer;
+import net.minecraft.client.particle.EntityFX;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.src.PlayerAPI;
+import net.minecraft.src.RenderPlayerAPI;
+import net.minecraft.src.ServerPlayerAPI;
+import net.minecraft.world.World;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.event.EventBus;
+
+public class ClientProxy extends CommonProxy
+{
+ private HashMap playerInventories = new HashMap();
+ private HashMap playerExtraHearts = new HashMap();
+ private HashMap playerCooldowns = new HashMap();
+ private HashMap playerMaxCooldowns = new HashMap();
+ private HashMap playerCooldownName = new HashMap();
+ private HashMap playerCoins = new HashMap();
+
+ private HashMap playerClientInfo = new HashMap();
+
+ private static String soundZipPath = "/resources/";
+ private Minecraft mc = Minecraft.getMinecraft();
+ public Random rand = new Random();
+
+ public AetherCommonPlayerHandler getPlayerHandler(EntityPlayer entity)
+ {
+ if ((entity instanceof EntityPlayerSP))
+ {
+ return ((PlayerBaseAetherClient) ((EntityPlayerSP) entity).getPlayerBase("Aether II")).getPlayerHandler();
+ }
+
+ return super.getPlayerHandler(entity);
+ }
+
+ public void registerRenderers()
+ {
+ Aether.syncDonatorList.initialVerification(this.mc);
+
+ AetherGuis.init();
+ AetherEntityRenderers.registerEntityRenderers();
+
+ RenderingRegistry.registerBlockHandler(new RenderBerryBush());
+ RenderingRegistry.registerBlockHandler(new RenderAetherTallGrass());
+
+ ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAltar.class, new TileEntityAltarRenderer());
+ ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTreasureChest.class, new TileEntityTreasureChestRenderer());
+ ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySkyrootChest.class, new TileEntitySkyrootChestRenderer());
+ ClientRegistry.bindTileEntitySpecialRenderer(TileEntityEntranceController.class, new TileEntityEntranceRenderer());
+
+ net.aetherteam.aether.blocks.AetherBlocks.altarRenderId = RenderingRegistry.getNextAvailableRenderId();
+ net.aetherteam.aether.blocks.AetherBlocks.treasureChestRenderId = RenderingRegistry.getNextAvailableRenderId();
+ net.aetherteam.aether.blocks.AetherBlocks.skyrootChestRenderId = RenderingRegistry.getNextAvailableRenderId();
+ net.aetherteam.aether.blocks.AetherBlocks.entranceRenderId = RenderingRegistry.getNextAvailableRenderId();
+
+ RenderingRegistry.registerBlockHandler(new RenderHandlerAltar());
+ RenderingRegistry.registerBlockHandler(new RenderHandlerTreasureChest());
+ RenderingRegistry.registerBlockHandler(new RenderHandlerSkyrootChest());
+
+ MinecraftForge.EVENT_BUS.register(new AetherEventReceiver());
+
+ MainMenuAPI.registerMenu("Aether II", MenuBaseAetherII.class);
+ }
+
+ public void registerPlayerAPI()
+ {
+ PlayerAPI.register("Aether II", PlayerBaseAetherClient.class);
+ ServerPlayerAPI.register("Aether II", PlayerBaseAetherServer.class);
+ }
+
+ public void registerMainMenu()
+ {
+ }
+
+ public void registerTickHandler()
+ {
+ MinecraftForge.EVENT_BUS.register(new GuiAetherIngame(Minecraft.getMinecraft()));
+ TickRegistry.registerTickHandler(new ClientTickHandler(), Side.CLIENT);
+ }
+
+ public void playSoundFX(String path, float volume, float pitch)
+ {
+ this.mc.sndManager.playSoundFX(path, volume, pitch);
+ }
+
+ public int addArmor(String type)
+ {
+ return RenderingRegistry.addNewArmourRendererPrefix(type);
+ }
+
+ public void registerKeyBindings()
+ {
+ KeyBindingRegistry.registerKeyBinding(new AetherKeyHandler());
+ }
+
+ public Minecraft getClient()
+ {
+ return FMLClientHandler.instance().getClient();
+ }
+
+ public World getClientWorld()
+ {
+ return FMLClientHandler.instance().getClient().theWorld;
+ }
+
+ public EntityPlayer getClientPlayer()
+ {
+ return FMLClientHandler.instance().getClient().thePlayer;
+ }
+
+ public void loadSounds()
+ {
+ if (this.mc.sndManager == null)
+ {
+ return;
+ }
+
+ installSound("music/aether1.ogg");
+ installSound("music/aether2.ogg");
+ installSound("music/aether3.ogg");
+ installSound("music/aether4.ogg");
+ installSound("music/aether5.ogg");
+ installSound("music/Approaches.ogg");
+
+ installSound("streaming/Aether Menu.ogg");
+ installSound("streaming/Aether Menu Two.wav");
+ installSound("streaming/Spectrum.ogg");
+ installSound("streaming/Aether Day 1.ogg");
+ installSound("streaming/Aether Night 1.ogg");
+ installSound("streaming/Aether Night 2.ogg");
+ installSound("streaming/Dungeon Background.ogg");
+ installSound("streaming/Approaches.ogg");
+ installSound("streaming/Demise.ogg");
+
+ installSound("streaming/Aether Tune.ogg");
+ installSound("streaming/Ascending Dawn.ogg");
+
+ installSound("streaming/Slider Battle.ogg");
+ installSound("streaming/Slider Finish.ogg");
+
+ installSound("newsound/aeboss/slider/awake.ogg");
+ installSound("newsound/aeboss/slider/collide.ogg");
+ installSound("newsound/aeboss/slider/die.ogg");
+ installSound("newsound/aeboss/slider/move.ogg");
+ installSound("newsound/aeboss/slider/unlock.ogg");
+
+ installSound("newsound/aemob/aerbunny/die.ogg");
+ installSound("newsound/aemob/aerbunny/hurt1.ogg");
+ installSound("newsound/aemob/aerbunny/hurt2.ogg");
+ installSound("newsound/aemob/aerbunny/land.ogg");
+ installSound("newsound/aemob/aerbunny/lift.ogg");
+
+ installSound("newsound/aemob/aerwhale/say.wav");
+ installSound("newsound/aemob/aerwhale/die.wav");
+
+ installSound("newsound/aemob/moa/say.wav");
+
+ installSound("newsound/aemob/zephyr/say1.wav");
+ installSound("newsound/aemob/zephyr/say2.wav");
+ installSound("newsound/aemob/zephyr/shoot.ogg");
+
+ installSound("newsound/aemisc/achieveGen.ogg");
+ installSound("newsound/aemisc/achieveBronze.ogg");
+ installSound("newsound/aemisc/achieveSilver.ogg");
+ installSound("newsound/aemisc/achieveBronzeNew.ogg");
+
+ installSound("newsound/aemisc/activateTrap.ogg");
+
+ installSound("newsound/aemisc/shootDart.ogg");
+
+ installSound("newsound/aemob/sentryGolem/seenEnemy.ogg");
+ installSound("newsound/aemob/sentryGolem/creepySeen.wav");
+ installSound("newsound/aemob/sentryGolem/say1.wav");
+ installSound("newsound/aemob/sentryGolem/say2.wav");
+ installSound("newsound/aemob/sentryGolem/death.wav");
+ installSound("newsound/aemob/sentryGolem/hit1.wav");
+ installSound("newsound/aemob/sentryGolem/hit2.wav");
+
+ installSound("newsound/aemob/sentryGuardian/death.wav");
+ installSound("newsound/aemob/sentryGuardian/spawn.ogg");
+ installSound("newsound/aemob/sentryGuardian/hit.ogg");
+ installSound("newsound/aemob/sentryGuardian/living.ogg");
+
+ installSound("newsound/aemisc/coin.ogg");
+
+ installSound("newsound/aemob/cog/wall.wav");
+ installSound("newsound/aemob/cog/wall1.wav");
+ installSound("newsound/aemob/cog/wall2.wav");
+ installSound("newsound/aemob/cog/wallFinal.ogg");
+
+ installSound("newsound/aeportal/aeportal.wav");
+ installSound("newsound/aeportal/aetravel.wav");
+ installSound("newsound/aeportal/aetrigger.wav");
+ }
+
+ public void registerSounds()
+ {
+ MinecraftForge.EVENT_BUS.register(new AetherSoundLoader());
+ }
+
+ private void installSound(String filename)
+ {
+ File soundFile = new File(this.mc.mcDataDir, "resources/" + filename);
+
+ if (!soundFile.exists()) try
+ {
+ String srcPath = soundZipPath + filename;
+ InputStream inStream = Aether.class.getResourceAsStream(srcPath);
+
+ if (inStream == null)
+ {
+ throw new IOException();
+ }
+
+ if (!soundFile.getParentFile().exists())
+ {
+ soundFile.getParentFile().mkdirs();
+ }
+
+ BufferedInputStream fileIn = new BufferedInputStream(inStream);
+ BufferedOutputStream fileOut = new BufferedOutputStream(new FileOutputStream(soundFile));
+
+ byte[] buffer = new byte[1024];
+
+ int n = 0;
+
+ while (-1 != (n = fileIn.read(buffer)))
+ {
+ fileOut.write(buffer, 0, n);
+ }
+
+ fileIn.close();
+ fileOut.close();
+ } catch (IOException ex)
+ {
+ }
+ if ((soundFile.canRead()) && (soundFile.isFile())) this.mc.installResource(filename, soundFile);
+ else System.err.println("Could not load file: " + soundFile);
+ }
+
+ public void openDungeonQueue()
+ {
+ this.mc.displayGuiScreen(new GuiDungeonScreen(this.mc));
+ }
+
+ @SideOnly(Side.CLIENT)
+ public void renderGameOverlay(float zLevel, boolean flag, int x, int y)
+ {
+ if (Aether.getClientPlayer(getClientPlayer()) == null)
+ {
+ return;
+ }
+ ClientNotificationHandler.updateNotifications();
+
+ AetherPoison.displayCureEffect();
+ AetherPoison.displayPoisonEffect();
+ }
+
+ public void displayMessage(EntityPlayer player, String message)
+ {
+ player.addChatMessage(message);
+ }
+
+ public void registerRenderPAPI()
+ {
+ RenderPlayerAPI.register("Aether II", RenderPlayerBaseAether.class);
+ }
+
+ public void spawnSwettyParticles(World world, int x, int y, int z)
+ {
+ for (int count = 0; count < 5; count++)
+ {
+ EntityFX particles = new EntityAetherBreakingFX(world, x + this.rand.nextDouble(), y + this.rand.nextDouble(), z + this.rand.nextDouble(), AetherItems.SwettyBall);
+
+ particles.renderDistanceWeight = 10.0D;
+ particles.setParticleTextureIndex(143);
+
+ FMLClientHandler.instance().getClient().effectRenderer.addEffect(particles);
+ }
+ }
+
+ public void spawnAltarParticles(World world, int x, int y, int z, Random rand)
+ {
+ int particleAmount = 50;
+
+ for (int count = 0; count < particleAmount; count++)
+ {
+ EntityFX particles = new EntityGoldenFX(world, x + rand.nextFloat(), y + (count > particleAmount / 2 ? 0.3F : 0.5F), z + rand.nextFloat(), 0.0D, 1.0D, 0.0D, true);
+
+ FMLClientHandler.instance().getClient().effectRenderer.addEffect(particles);
+ }
+ }
+
+ public void spawnCloudSmoke(World world, double x, double y, double z, Random rand, Double radius)
+ {
+ double xOffset = x + rand.nextDouble() * radius.doubleValue() * 2.0D - radius.doubleValue();
+ double yOffset = y + rand.nextDouble() * radius.doubleValue() * 2.0D - radius.doubleValue();
+ double zOffset = z + rand.nextDouble() * radius.doubleValue() * 2.0D - radius.doubleValue();
+
+ FMLClientHandler.instance().getClient().effectRenderer.addEffect(new EntityCloudSmokeFX(world, xOffset, yOffset, zOffset, 0.0D, 0.0D, 0.0D, 2.5F, 1.0F, 1.0F, 1.0F));
+ }
+
+ public void spawnDonatorMoaParticles(Entity rider, Random rand)
+ {
+ for (int count = 0; count < 4; count++)
+ {
+ double xOffset = rider.posX + (rand.nextFloat() - 0.5D) * 4.0D;
+ double yOffset = rider.posY + (rand.nextFloat() - 0.5D) * 4.0D;
+ double zOffset = rider.posZ + (rand.nextFloat() - 0.5D) * 4.0D;
+
+ double motionX = 0.0D;
+ double motionY = 0.0D;
+ double motionZ = 0.0D;
+
+ motionX = (rand.nextFloat() - 0.5D) * 0.5D;
+ motionY = (rand.nextFloat() - 0.5D) * 0.5D;
+ motionZ = (rand.nextFloat() - 0.5D) * 0.5D;
+
+ EntityFX particles = new EntityGoldenFX(rider.worldObj, xOffset, yOffset, zOffset, motionX, motionY, motionZ, false);
+
+ FMLClientHandler.instance().getClient().effectRenderer.addEffect(particles);
+ }
+ }
+
+ public void spawnPortalParticles(World world, int x, int y, int z, Random random, int blockID)
+ {
+ for (int l = 0; l < 4; l++)
+ {
+ double xOffset = x + random.nextFloat();
+ double yOffset = y + random.nextFloat();
+ double zOffset = z + random.nextFloat();
+
+ double motionX = 0.0D;
+ double motionY = 0.0D;
+ double motionZ = 0.0D;
+
+ int randMotionFactor = random.nextInt(2) * 2 - 1;
+
+ motionX = (random.nextFloat() - 0.5D) * 0.5D;
+ motionY = (random.nextFloat() - 0.5D) * 0.5D;
+ motionZ = (random.nextFloat() - 0.5D) * 0.5D;
+
+ if ((world.getBlockId(x - 1, y, z) == blockID) || (world.getBlockId(x + 1, y, z) == blockID))
+ {
+ zOffset = z + 0.5D + 0.25D * randMotionFactor;
+ motionZ = random.nextFloat() * 2.0F * randMotionFactor;
+ } else
+ {
+ xOffset = x + 0.5D + 0.25D * randMotionFactor;
+ motionX = random.nextFloat() * 2.0F * randMotionFactor;
+ }
+
+ EntityFX obj = new EntityAetherPortalFX(world, xOffset, yOffset, zOffset, motionX, motionY, motionZ);
+ FMLClientHandler.instance().getClient().effectRenderer.addEffect(obj);
+ }
+ }
+
+ public void spawnRainParticles(World world, int x, int y, int z, Random rand, int amount)
+ {
+ for (int count = 0; count < amount; count++)
+ {
+ double xOffset = x + rand.nextDouble();
+ double yOffset = y + rand.nextDouble();
+ double zOffset = z + rand.nextDouble();
+
+ world.spawnParticle("splash", xOffset, yOffset, zOffset, 0.0D, 0.0D, 0.0D);
+ }
+ }
+
+ public HashMap getClientInventories()
+ {
+ return this.playerInventories;
+ }
+
+ public HashMap getClientExtraHearts()
+ {
+ return this.playerExtraHearts;
+ }
+
+ public HashMap getClientCooldown()
+ {
+ return this.playerCooldowns;
+ }
+
+ public HashMap getClientMaxCooldown()
+ {
+ return this.playerMaxCooldowns;
+ }
+
+ public HashMap getClientCooldownName()
+ {
+ return this.playerCooldownName;
+ }
+
+ public HashMap getClientCoins()
+ {
+ return this.playerCoins;
+ }
+
+ public HashMap getPlayerClientInfo()
+ {
+ return this.playerClientInfo;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.ClientProxy
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/ClientTickHandler.java b/src/main/java/net/aetherteam/aether/client/ClientTickHandler.java
new file mode 100644
index 0000000..e426bd0
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/ClientTickHandler.java
@@ -0,0 +1,68 @@
+package net.aetherteam.aether.client;
+
+import cpw.mods.fml.common.ITickHandler;
+import cpw.mods.fml.common.TickType;
+
+import java.util.ArrayList;
+import java.util.EnumSet;
+import java.util.Iterator;
+
+import net.aetherteam.aether.client.gui.GuiAetherContainerCreative;
+import net.aetherteam.aether.client.gui.GuiInventoryAether;
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.entities.mounts.MountSystem;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.inventory.GuiContainerCreative;
+import net.minecraft.client.gui.inventory.GuiInventory;
+
+public class ClientTickHandler implements ITickHandler
+{
+ public String getLabel()
+ {
+ return null;
+ }
+
+ public void tickEnd(EnumSet type, Object[] tickData)
+ {
+ Dungeon dungeon;
+ if (type.equals(EnumSet.of(TickType.CLIENT)))
+ {
+ Minecraft mc = Minecraft.getMinecraft();
+
+ if (Minecraft.getMinecraft().getIntegratedServer() != null) ;
+ GuiScreen guiscreen = mc.currentScreen;
+
+ if ((guiscreen instanceof GuiInventory))
+ {
+ Minecraft.getMinecraft().displayGuiScreen(new GuiInventoryAether(mc.thePlayer));
+ }
+
+ if ((guiscreen instanceof GuiContainerCreative))
+ {
+ Minecraft.getMinecraft().displayGuiScreen(new GuiAetherContainerCreative(mc.thePlayer));
+ }
+
+ MountSystem.processDirections();
+
+ for (Iterator i$ = DungeonHandler.instance().getInstances().iterator(); i$.hasNext(); dungeon = (Dungeon) i$.next())
+ ;
+ }
+ }
+
+ public EnumSet ticks()
+ {
+ return EnumSet.of(TickType.CLIENT);
+ }
+
+ public void tickStart(EnumSet type, Object[] tickData)
+ {
+ if (type.equals(EnumSet.of(TickType.CLIENT))) ;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.ClientTickHandler
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/ImageBufferDownloadAether.java b/src/main/java/net/aetherteam/aether/client/ImageBufferDownloadAether.java
new file mode 100644
index 0000000..b90bd3c
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/ImageBufferDownloadAether.java
@@ -0,0 +1,123 @@
+package net.aetherteam.aether.client;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.awt.Graphics;
+import java.awt.image.BufferedImage;
+import java.awt.image.DataBufferInt;
+import java.awt.image.ImageObserver;
+
+import net.minecraft.client.renderer.IImageBuffer;
+import net.minecraft.client.renderer.ImageBufferDownload;
+
+@SideOnly(Side.CLIENT)
+public class ImageBufferDownloadAether extends ImageBufferDownload implements IImageBuffer
+{
+ private int[] imageData;
+ private int imageWidth;
+ private int imageHeight;
+
+ public ImageBufferDownloadAether setResolution(int var1, int var2)
+ {
+ this.imageWidth = var1;
+ this.imageHeight = var2;
+ return this;
+ }
+
+ public BufferedImage parseUserSkin(BufferedImage var1)
+ {
+ if (var1 == null)
+ {
+ return null;
+ } else
+ {
+ BufferedImage var2 = new BufferedImage(this.imageWidth, this.imageHeight, 2);
+ Graphics var3 = var2.getGraphics();
+ var3.drawImage(var1, 0, 0, (ImageObserver) null);
+ var3.dispose();
+ this.imageData = ((DataBufferInt) var2.getRaster().getDataBuffer()).getData();
+ this.setAreaOpaque(0, 0, this.imageWidth, this.imageWidth / 2);
+ this.setAreaTransparent(this.imageWidth, 0, this.imageHeight, this.imageWidth);
+ this.setAreaOpaque(0, this.imageWidth / 2, this.imageHeight, this.imageWidth);
+ boolean var4 = false;
+ int var7;
+ int var6;
+ int var5;
+
+ for (var5 = 32; var5 < 64; ++var5)
+ {
+ for (var6 = 0; var6 < 16; ++var6)
+ {
+ var7 = this.imageData[var5 + var6 * 64];
+
+ if ((var7 >> 24 & 255) < 128)
+ {
+ var4 = true;
+ }
+ }
+ }
+
+ if (!var4)
+ {
+ for (var5 = 32; var5 < 64; ++var5)
+ {
+ for (var6 = 0; var6 < 16; ++var6)
+ {
+ var7 = this.imageData[var5 + var6 * 64];
+
+ if ((var7 >> 24 & 255) < 128)
+ {
+ var4 = true;
+ }
+ }
+ }
+ }
+
+ return var2;
+ }
+ }
+
+ private void setAreaTransparent(int var1, int var2, int var3, int var4)
+ {
+ if (!this.hasTransparency(var1, var2, var3, var4))
+ {
+ for (int var5 = var1; var5 < var3; ++var5)
+ {
+ for (int var6 = var2; var6 < var4; ++var6)
+ {
+ this.imageData[var5 + var6 * this.imageWidth] &= 16777215;
+ }
+ }
+ }
+ }
+
+ private void setAreaOpaque(int var1, int var2, int var3, int var4)
+ {
+ for (int var5 = var1; var5 < var3; ++var5)
+ {
+ for (int var6 = var2; var6 < var4; ++var6)
+ {
+ this.imageData[var5 + var6 * this.imageWidth] |= -16777216;
+ }
+ }
+ }
+
+ private boolean hasTransparency(int var1, int var2, int var3, int var4)
+ {
+ for (int var5 = var1; var5 < var3; ++var5)
+ {
+ for (int var6 = var2; var6 < var4; ++var6)
+ {
+ int var7 = this.imageData[var5 + var6 * this.imageWidth];
+
+ if ((var7 >> 24 & 255) < 128)
+ {
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/PlayerBaseAetherClient.java b/src/main/java/net/aetherteam/aether/client/PlayerBaseAetherClient.java
new file mode 100644
index 0000000..905df62
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/PlayerBaseAetherClient.java
@@ -0,0 +1,693 @@
+package net.aetherteam.aether.client;
+
+import cpw.mods.fml.client.FMLClientHandler;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.AetherCommonPlayerHandler;
+import net.aetherteam.aether.CommonProxy;
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.client.gui.social.GuiScreenNotificationOverlay;
+import net.aetherteam.aether.containers.ContainerPlayerAether;
+import net.aetherteam.aether.containers.InventoryAether;
+import net.aetherteam.aether.entities.EntityAetherLightning;
+import net.aetherteam.aether.entities.mounts_old.RidingHandler;
+import net.aetherteam.aether.interfaces.IAetherAccessory;
+import net.aetherteam.aether.interfaces.IAetherBoss;
+import net.aetherteam.aether.items.AetherItems;
+import net.aetherteam.aether.items.ItemAccessory;
+import net.aetherteam.aether.overlays.AetherOverlays;
+import net.aetherteam.aether.party.Party;
+import net.minecraft.block.Block;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.entity.EntityPlayerSP;
+import net.minecraft.client.multiplayer.WorldClient;
+import net.minecraft.enchantment.EnchantmentHelper;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.effect.EntityLightningBolt;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.entity.player.PlayerCapabilities;
+import net.minecraft.inventory.ContainerPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.CompressedStreamTools;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.NBTTagList;
+import net.minecraft.potion.Potion;
+import net.minecraft.potion.PotionEffect;
+import net.minecraft.src.PlayerAPI;
+import net.minecraft.src.PlayerBase;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.FoodStats;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.MovingObjectPosition;
+import net.minecraft.world.World;
+import net.minecraft.world.storage.SaveHandler;
+import net.minecraftforge.common.ForgeHooks;
+import net.minecraftforge.event.ForgeEventFactory;
+
+public class PlayerBaseAetherClient extends PlayerBase
+{
+ public AetherCommonPlayerHandler playerHandler = new AetherCommonPlayerHandler(this);
+ public int maxHealth;
+ public int foodTimer;
+ public boolean hasDefeatedSunSpirit;
+ public int generalcooldown = 0;
+ public int generalcooldownmax = 0;
+ public String cooldownName = "Hammer of Notch";
+ public InventoryAether inv;
+ public float prevStepHeight = 0.5F;
+ private boolean jumpBoosted;
+ private int flightCount = 0;
+ private int maxFlightCount = 52;
+ private double flightMod = 1.0D;
+ private double maxFlightMod = 15.0D;
+ public int updateCounter;
+ private float sinage;
+ private boolean prevCreative;
+ private int coinAmount = 0;
+
+ public static boolean keepInventory = false;
+
+ public Random rand = new Random();
+
+ public float zLevel = -90.0F;
+
+ private Minecraft mc = Minecraft.getMinecraft();
+
+ public List extendedReachItems = Arrays.asList(new Item[]{AetherItems.ValkyrieShovel, AetherItems.ValkyriePickaxe, AetherItems.ValkyrieAxe});
+
+ public PlayerBaseAetherClient(PlayerAPI var1)
+ {
+ super(var1);
+
+ this.maxHealth = 20;
+
+ this.inv = new InventoryAether(this.player);
+
+ this.player.inventoryContainer = (!this.player.capabilities.isCreativeMode ? new ContainerPlayerAether(this.player.inventory, this.inv, this.player.worldObj.isRemote, this.player, this.playerHandler) : new ContainerPlayer(this.player.inventory, true, this.player));
+ this.player.openContainer = this.player.inventoryContainer;
+ }
+
+ public EntityPlayer getPlayer()
+ {
+ return this.player;
+ }
+
+ public int getCoins()
+ {
+ return this.coinAmount;
+ }
+
+ public void addCoins(int amount)
+ {
+ this.coinAmount += amount;
+ }
+
+ public void removeCoins(int amount)
+ {
+ this.coinAmount -= amount;
+ }
+
+ public void updateGeneralCooldown()
+ {
+ if (this.generalcooldown == 0)
+ {
+ if ((Aether.proxy.getClientCooldown().get(this.player.username) != null) && (Aether.proxy.getClientMaxCooldown().get(this.player.username) != null))
+ {
+ this.generalcooldown = ((Integer) Aether.proxy.getClientCooldown().get(this.player.username)).intValue();
+ this.generalcooldownmax = ((Integer) Aether.proxy.getClientMaxCooldown().get(this.player.username)).intValue();
+ }
+ }
+ }
+
+ public void updateCoinAmount()
+ {
+ if (Aether.proxy.getClientCoins().get(this.player.username) != null)
+ {
+ this.coinAmount = ((Integer) Aether.proxy.getClientCoins().get(this.player.username)).intValue();
+ AetherOverlays.queueCoinbarSlide();
+ }
+ }
+
+ public boolean isOnLadder()
+ {
+ if ((wearingAccessory(AetherItems.SwettyPendant.itemID)) && (isBesideClimbableBlock()))
+ {
+ return true;
+ }
+
+ return super.isOnLadder();
+ }
+
+ public void onStruckByLightning(EntityLightningBolt var1)
+ {
+ if ((var1 instanceof EntityAetherLightning))
+ {
+ if (((EntityAetherLightning) var1).playerUsing == this.player)
+ {
+ return;
+ }
+ }
+
+ super.onStruckByLightning(var1);
+ }
+
+ public void knockBack(Entity var1, int var2, double var3, double var5)
+ {
+ if (!wearingObsidianArmour())
+ {
+ super.knockBack(var1, var2, var3, var5);
+ }
+ }
+
+ public boolean isBesideClimbableBlock()
+ {
+ return this.player.isCollidedHorizontally;
+ }
+
+ public void jump()
+ {
+ if (this.playerHandler.jump()) super.jump();
+ }
+
+ public void beforeOnLivingUpdate()
+ {
+ this.playerHandler.beforeOnLivingUpdate();
+ if ((this.playerHandler.riddenBy != null) && (this.playerHandler.riddenBy.shouldBeSitting()))
+ {
+ if (this.playerHandler.riddenBy.animateSitting())
+ {
+ this.player.superSetFlag(2, true);
+ this.player.shouldRiderSit();
+ }
+
+ if (this.playerHandler.riddenBy.sprinting())
+ {
+ this.player.superSetFlag(3, true);
+ }
+ }
+ }
+
+ public void beforeOnUpdate()
+ {
+ if (isAboveBlock(AetherBlocks.Aercloud.blockID)) this.player.fallDistance = 0.0F;
+ }
+
+ public boolean isAboveBlock(int blockID)
+ {
+ int x = MathHelper.floor_double(this.player.posX);
+ int y = MathHelper.floor_double(this.player.boundingBox.minY);
+ int z = MathHelper.floor_double(this.player.posZ);
+ return (this.player.worldObj.getBlockId(MathHelper.floor_double(this.player.boundingBox.minX), y - 1, MathHelper.floor_double(this.player.boundingBox.minZ)) == blockID) || (this.player.worldObj.getBlockId(MathHelper.floor_double(this.player.boundingBox.maxX), y - 1, MathHelper.floor_double(this.player.boundingBox.minZ)) == blockID) || (this.player.worldObj.getBlockId(MathHelper.floor_double(this.player.boundingBox.maxX), y - 1, MathHelper.floor_double(this.player.boundingBox.maxZ)) == blockID) || (this.player.worldObj.getBlockId(MathHelper.floor_double(this.player.boundingBox.minX), y - 1, MathHelper.floor_double(this.player.boundingBox.maxZ)) == blockID);
+ }
+
+ public void afterOnUpdate()
+ {
+ processAbilities();
+
+ if (this.prevCreative != this.player.capabilities.isCreativeMode)
+ {
+ if (!this.player.capabilities.isCreativeMode) ;
+ this.prevCreative = this.player.capabilities.isCreativeMode;
+ }
+
+ if (Aether.proxy.getClientExtraHearts().get(this.player.username) != null)
+ {
+ this.maxHealth = ((Integer) Aether.proxy.getClientExtraHearts().get(this.player.username)).intValue();
+ }
+
+ PotionEffect effect = this.player.getActivePotionEffect(Potion.regeneration);
+ if ((effect != null) && (effect.getDuration() > 0) && (Potion.potionTypes[effect.getPotionID()].isReady(effect.getDuration(), effect.getAmplifier())) && (this.player.getHealth() >= 20) && (this.player.getHealth() < this.maxHealth))
+ {
+ this.player.heal(1);
+ }
+ if ((this.player.getFoodStats().getFoodLevel() >= 18) && (this.player.getHealth() >= 20) && (this.player.getHealth() < this.maxHealth))
+ {
+ this.foodTimer += 1;
+ if (this.foodTimer >= 80)
+ {
+ this.foodTimer = 0;
+ this.player.heal(1);
+ }
+ } else
+ {
+ this.foodTimer = 0;
+ }
+
+ if (this.generalcooldown > 0)
+ {
+ this.generalcooldown -= 1;
+ }
+
+ if ((this.player.worldObj.difficultySetting == 0) && (this.player.getHealth() >= 20) && (this.player.getHealth() < this.maxHealth) && (this.player.ticksExisted % 20 == 0))
+ {
+ this.player.heal(1);
+ }
+
+ if (this.playerHandler.getCurrentBoss() != null)
+ {
+ Entity boss = this.playerHandler.getCurrentBoss().getBossEntity();
+ if (Math.sqrt(Math.pow(boss.posX - this.player.posX, 2.0D) + Math.pow(boss.posY - this.player.posY, 2.0D) + Math.pow(boss.posZ - this.player.posZ, 2.0D)) > 50.0D)
+ {
+ this.playerHandler.setCurrentBoss(null);
+ }
+ }
+
+ if (Aether.proxy.getClientExtraHearts().get(this.player.username) != null)
+ {
+ this.maxHealth = ((Integer) Aether.proxy.getClientExtraHearts().get(this.player.username)).intValue();
+ }
+
+ this.updateCounter += 1;
+
+ this.playerHandler.afterOnUpdate();
+ }
+
+ public void processAbilities()
+ {
+ if (!this.player.onGround) this.sinage += 0.75F;
+ else
+ {
+ this.sinage += 0.15F;
+ }
+
+ if (this.sinage > 6.283186F)
+ {
+ this.sinage -= 6.283186F;
+ }
+
+ if ((wearingAccessory(AetherItems.SwettyPendant.itemID)) && (isBesideClimbableBlock()))
+ {
+ if ((!this.player.onGround) && (this.player.motionY < 0.0D) && (!this.player.isInWater()) && (!this.player.isSneaking()))
+ {
+ this.player.motionY *= 0.6D;
+ }
+
+ this.player.fallDistance = -1.0F;
+ }
+
+ if (this.player.ticksExisted % 400 == 0)
+ {
+ if ((this.inv.slots[0] != null) && (this.inv.slots[0].itemID == AetherItems.ZanitePendant.itemID))
+ {
+ this.inv.slots[0].damageItem(1, this.player);
+ if (this.inv.slots[0].stackSize < 1) this.inv.slots[0] = null;
+ }
+ if ((this.inv.slots[4] != null) && (this.inv.slots[4].itemID == AetherItems.ZaniteRing.itemID))
+ {
+ this.inv.slots[4].damageItem(1, this.player);
+ if (this.inv.slots[4].stackSize < 1) this.inv.slots[4] = null;
+ }
+ if ((this.inv.slots[5] != null) && (this.inv.slots[5].itemID == AetherItems.ZaniteRing.itemID))
+ {
+ this.inv.slots[5].damageItem(1, this.player);
+ if (this.inv.slots[5].stackSize < 1)
+ {
+ this.inv.slots[5] = null;
+ }
+
+ }
+
+ }
+
+ if (wearingPhoenixArmour())
+ {
+ this.player.extinguish();
+ this.player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 10, 4));
+
+ if (this.player.worldObj.isRemote)
+ {
+ FMLClientHandler.instance().getClient().theWorld.spawnParticle("flame", this.player.posX + this.playerHandler.rand.nextGaussian() / 5.0D, this.player.posY - 0.5D + this.playerHandler.rand.nextGaussian() / 5.0D, this.player.posZ + this.playerHandler.rand.nextGaussian() / 3.0D, 0.0D, 0.0D, 0.0D);
+ }
+ }
+
+ if (wearingGravititeArmour())
+ {
+ if ((this.player.isJumping) && (!this.jumpBoosted) && (this.player.isSneaking()))
+ {
+ this.player.motionY = 1.0D;
+ this.jumpBoosted = true;
+ }
+
+ this.player.fallDistance = -1.0F;
+ }
+
+ if (wearingObsidianArmour())
+ {
+ this.player.addPotionEffect(new PotionEffect(Potion.resistance.id, 10, 3));
+ this.player.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 10, 1));
+ }
+
+ if (wearingValkyrieArmour())
+ {
+ if (this.player.isJumping)
+ {
+ if (this.flightMod >= this.maxFlightMod)
+ {
+ this.flightMod = this.maxFlightMod;
+ }
+
+ if (this.flightCount > 2)
+ {
+ if (this.flightCount < this.maxFlightCount)
+ {
+ this.flightMod += 0.25D;
+ this.player.motionY = (0.025D * this.flightMod);
+ this.flightCount += 1;
+ }
+ } else this.flightCount += 1;
+ } else
+ {
+ this.flightMod = 1.0D;
+ }
+
+ this.player.fallDistance = -1.0F;
+ }
+
+ if (this.player.onGround)
+ {
+ this.flightCount = 0;
+ this.flightMod = 1.0D;
+ }
+
+ if ((!this.player.isJumping) && (this.player.onGround))
+ {
+ this.jumpBoosted = false;
+ }
+
+ for (int index = 0; index < 8; index++)
+ {
+ if ((this.inv.slots[index] != null) && ((this.inv.slots[index].getItem() instanceof IAetherAccessory)))
+ {
+ ((ItemAccessory) this.inv.slots[index].getItem()).activateClientPassive(this.player, this);
+ }
+ }
+
+ if (!wearingAccessory(AetherItems.AgilityCape.itemID))
+ {
+ this.player.stepHeight = this.prevStepHeight;
+ }
+ }
+
+ public float getSpeedModifier()
+ {
+ float speed = this.playerHandler.getSpeedModifier();
+ return speed == -1.0F ? super.getSpeedModifier() : speed;
+ }
+
+ public AetherCommonPlayerHandler getPlayerHandler()
+ {
+ return this.playerHandler;
+ }
+
+ public void heal(int i)
+ {
+ if (this.player.getHealth() <= 0)
+ {
+ return;
+ }
+
+ this.player.setEntityHealth(this.player.getHealth() + i);
+
+ if (this.player.getHealth() > this.maxHealth)
+ {
+ this.player.setEntityHealth(this.maxHealth);
+ }
+ }
+
+ public void beforeWriteEntityToNBT(NBTTagCompound tag)
+ {
+ tag.setInteger("MaxHealth", this.maxHealth);
+ tag.setTag("AetherInventory", this.inv.writeToNBT(new NBTTagList()));
+ tag.setBoolean("HasDefeatedSunSpirit", this.hasDefeatedSunSpirit);
+ tag.setBoolean("inAether", this.player.dimension == 3);
+ tag.setInteger("GeneralCooldown", this.generalcooldown);
+ tag.setInteger("GeneralCooldownMax", this.generalcooldownmax);
+ tag.setString("CooldownName", this.cooldownName);
+ tag.setInteger("Coins", this.coinAmount);
+ }
+
+ public void beforeReadEntityFromNBT(NBTTagCompound tag)
+ {
+ if (this.player.worldObj.isRemote)
+ {
+ File file = new File(((SaveHandler) this.player.worldObj.getSaveHandler()).getWorldDirectoryName(), "aether.dat");
+
+ if (file.exists())
+ {
+ NBTTagCompound customData = new NBTTagCompound();
+ try
+ {
+ customData = CompressedStreamTools.readCompressed(new FileInputStream(file));
+
+ this.maxHealth = customData.getInteger("MaxHealth");
+ if (this.maxHealth < 20) this.maxHealth = 20;
+ NBTTagList nbttaglist = customData.getTagList("Inventory");
+
+ if (this.player.dimension == 3)
+ {
+ this.player.dimension = 3;
+ }
+ this.inv.readFromNBT(nbttaglist);
+ file.delete();
+ } catch (IOException ioexception)
+ {
+ }
+
+ } else
+ {
+ System.out.println("Failed to read player data. Making new");
+
+ this.maxHealth = tag.getInteger("MaxHealth");
+ if (this.maxHealth < 20) this.maxHealth = 20;
+ NBTTagList nbttaglist = tag.getTagList("AetherInventory");
+ this.hasDefeatedSunSpirit = tag.getBoolean("HasDefeatedSunSpirit");
+
+ if (tag.getBoolean("inAether")) this.player.dimension = 3;
+ this.generalcooldown = tag.getInteger("GeneralCooldown");
+ this.generalcooldownmax = tag.getInteger("GeneralCooldownMax");
+ this.cooldownName = tag.getString("CooldownName");
+ this.coinAmount = tag.getInteger("Coins");
+
+ this.inv.readFromNBT(nbttaglist);
+ }
+ }
+ }
+
+ public void onDefeatSunSpirit()
+ {
+ setHasDefeatedSunSpirit(true);
+ }
+
+ public void setHasDefeatedSunSpirit(boolean defeatedSunSpirit)
+ {
+ this.hasDefeatedSunSpirit = defeatedSunSpirit;
+ }
+
+ public boolean getHasDefeatedSunSpirit()
+ {
+ return this.hasDefeatedSunSpirit;
+ }
+
+ public float getCurrentPlayerStrVsBlock(Block block, boolean flag)
+ {
+ ItemStack stack = this.player.inventory.getCurrentItem();
+ float f = stack == null ? 1.0F : stack.getItem().getStrVsBlock(stack, block, 0);
+
+ if ((this.inv.slots[0] != null) && (this.inv.slots[0].itemID == AetherItems.ZanitePendant.itemID))
+ {
+ f *= (1.0F + this.inv.slots[0].getItemDamage() / (this.inv.slots[0].getMaxDamage() * 3.0F));
+ }
+ if ((this.inv.slots[4] != null) && (this.inv.slots[4].itemID == AetherItems.ZaniteRing.itemID))
+ {
+ f *= (1.0F + this.inv.slots[4].getItemDamage() / (this.inv.slots[4].getMaxDamage() * 3.0F));
+ }
+ if ((this.inv.slots[5] != null) && (this.inv.slots[5].itemID == AetherItems.ZaniteRing.itemID))
+ {
+ f *= (1.0F + this.inv.slots[5].getItemDamage() / (this.inv.slots[5].getMaxDamage() * 3.0F));
+ }
+
+ if (wearingNeptuneArmour())
+ {
+ if (f > 1.0F)
+ {
+ int i = EnchantmentHelper.getEfficiencyModifier(this.player);
+ ItemStack itemstack = this.player.inventory.getCurrentItem();
+
+ if ((i > 0) && (itemstack != null))
+ {
+ float f1 = i * i + 1;
+
+ boolean canHarvest = ForgeHooks.canToolHarvestBlock(block, 0, itemstack);
+
+ if ((!canHarvest) && (f <= 1.0F))
+ {
+ f += f1 * 0.08F;
+ } else
+ {
+ f += f1;
+ }
+ }
+ }
+
+ if (this.player.isPotionActive(Potion.digSpeed))
+ {
+ f *= (1.0F + (this.player.getActivePotionEffect(Potion.digSpeed).getAmplifier() + 1) * 0.2F);
+ }
+
+ if (this.player.isPotionActive(Potion.digSlowdown))
+ {
+ f *= (1.0F - (this.player.getActivePotionEffect(Potion.digSlowdown).getAmplifier() + 1) * 0.2F);
+ }
+
+ f = ForgeEventFactory.getBreakSpeed(this.player, block, 0, f);
+
+ return f < 0.0F ? 0.0F : f;
+ }
+
+ return f == -1.0F ? super.getCurrentPlayerStrVsBlock(block, flag) : f;
+ }
+
+ public boolean isInWater()
+ {
+ if (wearingNeptuneArmour())
+ {
+ return false;
+ }
+ return super.isInWater();
+ }
+
+ public MovingObjectPosition rayTrace(double var1, float var3)
+ {
+ ItemStack stack = this.player.getCurrentEquippedItem();
+ if ((stack != null) && (stack.getItem() != null) && (this.extendedReachItems.contains(stack.getItem())))
+ var1 = 10.0D;
+ return this.player.superRayTrace(var1, var3);
+ }
+
+ public int getAccessoryCount(int itemID)
+ {
+ int count = 0;
+
+ for (int index = 0; index < 8; index++)
+ {
+ if ((this.inv.slots[index] != null) && (this.inv.slots[index].itemID == itemID))
+ {
+ count++;
+ }
+ }
+
+ return count;
+ }
+
+ public boolean wearingAccessory(int itemID)
+ {
+ for (int index = 0; index < 8; index++)
+ {
+ if ((this.inv.slots[index] != null) && (this.inv.slots[index].itemID == itemID))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public void setSlotStack(int slotIndex, ItemStack stack)
+ {
+ this.inv.slots[slotIndex] = stack;
+ }
+
+ public ItemStack getSlotStack(int itemID)
+ {
+ ItemStack slot = null;
+
+ for (int index = 0; index < 8; index++)
+ {
+ if ((this.inv.slots[index] != null) && (this.inv.slots[index].itemID == itemID))
+ {
+ slot = this.inv.slots[index];
+ return slot;
+ }
+ }
+
+ return slot;
+ }
+
+ public int getSlotIndex(int itemID)
+ {
+ for (int index = 0; index < 8; index++)
+ {
+ if ((this.inv.slots[index] != null) && (this.inv.slots[index].itemID == itemID))
+ {
+ return index;
+ }
+ }
+
+ return 0;
+ }
+
+ public boolean wearingArmour(int itemID)
+ {
+ for (int index = 0; index < 4; index++)
+ {
+ if ((this.player.inventory.armorInventory[index] != null) && (this.player.inventory.armorInventory[index].itemID == itemID))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public float getSinage()
+ {
+ return this.sinage;
+ }
+
+ public boolean wearingNeptuneArmour()
+ {
+ return (wearingArmour(AetherItems.NeptuneHelmet.itemID)) && (wearingArmour(AetherItems.NeptuneChestplate.itemID)) && (wearingArmour(AetherItems.NeptuneLeggings.itemID)) && (wearingArmour(AetherItems.NeptuneBoots.itemID)) && (wearingAccessory(AetherItems.NeptuneGloves.itemID));
+ }
+
+ public boolean wearingValkyrieArmour()
+ {
+ return (wearingArmour(AetherItems.ValkyrieHelmet.itemID)) && (wearingArmour(AetherItems.ValkyrieChestplate.itemID)) && (wearingArmour(AetherItems.ValkyrieLeggings.itemID)) && (wearingArmour(AetherItems.ValkyrieBoots.itemID)) && (wearingAccessory(AetherItems.ValkyrieGloves.itemID));
+ }
+
+ public boolean wearingObsidianArmour()
+ {
+ return (wearingArmour(AetherItems.ObsidianHelmet.itemID)) && (wearingArmour(AetherItems.ObsidianChestplate.itemID)) && (wearingArmour(AetherItems.ObsidianLeggings.itemID)) && (wearingArmour(AetherItems.ObsidianBoots.itemID)) && (wearingAccessory(AetherItems.ObsidianGloves.itemID));
+ }
+
+ public boolean wearingPhoenixArmour()
+ {
+ return (wearingArmour(AetherItems.PhoenixHelmet.itemID)) && (wearingArmour(AetherItems.PhoenixChestplate.itemID)) && (wearingArmour(AetherItems.PhoenixLeggings.itemID)) && (wearingArmour(AetherItems.PhoenixBoots.itemID)) && (wearingAccessory(AetherItems.PhoenixGloves.itemID));
+ }
+
+ public boolean wearingGravititeArmour()
+ {
+ return (wearingArmour(AetherItems.GravititeHelmet.itemID)) && (wearingArmour(AetherItems.GravititeChestplate.itemID)) && (wearingArmour(AetherItems.GravititeLeggings.itemID)) && (wearingArmour(AetherItems.GravititeBoots.itemID)) && (wearingAccessory(AetherItems.GravititeGloves.itemID));
+ }
+
+ public void updateNotificationOverlay(Party party, byte guiType)
+ {
+ this.mc.displayGuiScreen(new GuiScreenNotificationOverlay(party, guiType));
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.PlayerBaseAetherClient
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/RenderPlayerBaseAether.java b/src/main/java/net/aetherteam/aether/client/RenderPlayerBaseAether.java
new file mode 100644
index 0000000..6e6c789
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/RenderPlayerBaseAether.java
@@ -0,0 +1,450 @@
+package net.aetherteam.aether.client;
+
+import java.nio.FloatBuffer;
+import java.util.HashMap;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.AetherRanks;
+import net.aetherteam.aether.CommonProxy;
+import net.aetherteam.aether.client.models.ModelAetherWings;
+import net.aetherteam.aether.containers.InventoryAether;
+import net.aetherteam.aether.donator.Donator;
+import net.aetherteam.aether.donator.DonatorChoice;
+import net.aetherteam.aether.donator.DonatorTexture;
+import net.aetherteam.aether.donator.EnumChoiceType;
+import net.aetherteam.aether.donator.SyncDonatorList;
+import net.aetherteam.aether.items.AetherItems;
+import net.aetherteam.aether.items.ItemAccessory;
+import net.minecraft.client.entity.EntityPlayerSP;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.client.renderer.GLAllocation;
+import net.minecraft.client.renderer.OpenGlHelper;
+import net.minecraft.client.renderer.entity.RenderManager;
+import net.minecraft.client.renderer.entity.RenderPlayer;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.potion.Potion;
+import net.minecraft.src.RenderPlayerAPI;
+import net.minecraft.src.RenderPlayerBase;
+import net.minecraft.util.MathHelper;
+import org.lwjgl.opengl.GL11;
+
+public class RenderPlayerBaseAether extends RenderPlayerBase
+{
+ private ModelBiped modelCape;
+ private ModelBiped modelMisc;
+ private ModelAetherWings modelWings;
+ FloatBuffer field_76908_a = GLAllocation.createDirectFloatBuffer(16);
+
+ public RenderPlayerBaseAether(RenderPlayerAPI var1)
+ {
+ super(var1);
+ this.modelCape = new ModelBiped(0.0F);
+ this.modelMisc = new ModelBiped(0.6F);
+ this.modelWings = new ModelAetherWings(0.0F);
+ }
+
+ public void afterRenderSpecials(EntityPlayer entityplayer, float f)
+ {
+ renderCape(entityplayer, f);
+ if ((AetherRanks.getRankFromMember(entityplayer.username).equals(AetherRanks.DEVELOPER)) || (AetherRanks.getRankFromMember(entityplayer.username).equals(AetherRanks.HELPER)))
+ {
+ GL11.glPushMatrix();
+ GL11.glDisable(2896);
+ GL11.glScalef(1.02171F, 1.0271F, 1.0271F);
+ GL11.glEnable(3042);
+ GL11.glDepthMask(true);
+ float var4 = 1.0F;
+ GL11.glDisable(3042);
+ GL11.glBlendFunc(1, 1);
+ renderCape(entityplayer, f);
+ GL11.glEnable(2896);
+ GL11.glDepthMask(false);
+ GL11.glPopMatrix();
+ }
+ }
+
+ public void renderPlayer(EntityPlayer player, double d, double d1, double d2, float f, float f1)
+ {
+ super.renderPlayer(player, d, d1, d2, -90.0F, f1);
+
+ renderMisc(player, d, d1, d2, f, f1);
+ }
+
+ public void renderMount(Entity entity, double x, double y, double z, float rotationYaw, float partialTickTime)
+ {
+ GL11.glEnable(2903);
+ GL11.glPushMatrix();
+
+ RenderManager.instance.renderEntityWithPosYaw(entity, x, y, z, rotationYaw, partialTickTime);
+
+ GL11.glPopMatrix();
+ GL11.glDisable(32826);
+ OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit);
+ GL11.glDisable(3553);
+ OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);
+ }
+
+ public void afterRenderFirstPersonArm(EntityPlayer player)
+ {
+ if (this.renderPlayer.getRenderManagerField().renderEngine != null)
+ {
+ renderFirstPersonGlow(player);
+ renderFirstPersonGloves(player);
+ }
+ }
+
+ public void renderFirstPersonGlow(EntityPlayer player)
+ {
+ if (AetherRanks.getRankFromMember(player.username).equals(AetherRanks.DEVELOPER))
+ {
+ GL11.glPushMatrix();
+ GL11.glDisable(2896);
+ GL11.glScalef(0.921F, 0.921F, 0.921F);
+ GL11.glEnable(3042);
+ GL11.glDepthMask(true);
+ float var4 = 1.0F;
+ GL11.glEnable(3042);
+ GL11.glBlendFunc(1, 1);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+
+ this.renderPlayer.localLoadDownloadableImageTexture("http://skins.minecraft.net/MinecraftSkins/" + player.username + ".png", "/mob/char.png");
+ this.modelMisc.onGround = 0.0F;
+ this.modelMisc.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, player);
+ GL11.glTranslatef(-0.01F, 0.05F, 0.01F);
+ this.modelMisc.bipedRightArm.render(0.0625F);
+ char var5 = 61680;
+ int var6 = var5 % 65536;
+ int var7 = var5 / 65536;
+ OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, var6 / 1.0F, var7 / 1.0F);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, var4);
+ GL11.glDepthMask(false);
+ GL11.glDisable(3042);
+ GL11.glEnable(2896);
+ GL11.glPopMatrix();
+ }
+ }
+
+ public void renderFirstPersonGloves(EntityPlayer player)
+ {
+ InventoryAether inv = (InventoryAether) Aether.proxy.getClientInventories().get(player.username);
+
+ if (inv == null)
+ {
+ return;
+ }
+ if (inv.slots[6] != null)
+ {
+ float brightness = player.getBrightness(1.0F);
+ this.modelMisc.onGround = 0.0F;
+ this.modelMisc.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, player);
+ this.modelMisc.bipedRightArm.render(0.0625F);
+ ItemAccessory glove = (ItemAccessory) inv.slots[6].getItem();
+ this.renderPlayer.localLoadTexture(glove.texture);
+ int colour = glove.getColorFromItemStack(new ItemStack(glove, 1, 0), 1);
+ float red = (colour >> 16 & 0xFF) / 255.0F;
+ float green = (colour >> 8 & 0xFF) / 255.0F;
+ float blue = (colour & 0xFF) / 255.0F;
+ if (glove.colouriseRender)
+ {
+ GL11.glColor3f(red, green, blue);
+ }
+ this.modelMisc.bipedRightArm.render(0.0625F);
+ GL11.glColor3f(1.0F, 1.0F, 1.0F);
+ }
+ }
+
+ public void renderSpecialHeadEars(EntityPlayer player, float var2)
+ {
+ InventoryAether inv = (InventoryAether) Aether.proxy.getClientInventories().get(player.username);
+
+ if (inv == null)
+ {
+ return;
+ }
+ if ((wearingAccessory(AetherItems.Deadmau5Ears.itemID, inv)) && (!player.isPotionActive(Potion.invisibility)))
+ {
+ for (int var3 = 0; var3 < 2; var3++)
+ {
+ this.renderPlayer.localLoadTexture("/net/aetherteam/aether/client/sprites/capes/deadmau5.png");
+ float var4 = player.prevRotationYaw + (player.rotationYaw - player.prevRotationYaw) * var2 - (player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * var2);
+ float var5 = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * var2;
+ GL11.glPushMatrix();
+ GL11.glRotatef(var4, 0.0F, 1.0F, 0.0F);
+ GL11.glRotatef(var5, 1.0F, 0.0F, 0.0F);
+ GL11.glTranslatef(0.375F * (var3 * 2 - 1), 0.0F, 0.0F);
+ GL11.glTranslatef(0.0F, -0.375F, 0.0F);
+ GL11.glRotatef(-var5, 1.0F, 0.0F, 0.0F);
+ GL11.glRotatef(-var4, 0.0F, 1.0F, 0.0F);
+ float var6 = 1.333333F;
+ GL11.glScalef(var6, var6, var6);
+ this.renderPlayer.getModelBipedMainField().renderEars(0.0625F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+
+ public void renderCape(EntityPlayer entityplayer, float f)
+ {
+ InventoryAether inv = (InventoryAether) Aether.proxy.getClientInventories().get(entityplayer.username);
+
+ if (inv == null)
+ {
+ return;
+ }
+ if ((inv.slots[1] != null) && (inv.slots[1].getItem() != AetherItems.InvisibilityCloak))
+ {
+ ItemStack cape = inv.slots[1];
+ if ((Aether.syncDonatorList.isDonator(entityplayer.username)) && (Aether.syncDonatorList.getDonator(entityplayer.username).containsChoiceType(EnumChoiceType.CAPE)))
+ {
+ DonatorTexture textureFile = Aether.syncDonatorList.getDonator(entityplayer.username).getChoiceFromType(EnumChoiceType.CAPE).textureFile;
+ String localTexture = textureFile.localURL;
+ String onlineTexture = textureFile.onlineURL;
+
+ this.renderPlayer.localLoadTexture(localTexture);
+ } else
+ {
+ this.renderPlayer.localLoadTexture(((ItemAccessory) cape.getItem()).texture);
+ }
+ GL11.glPushMatrix();
+ GL11.glTranslatef(0.0F, 0.0F, 0.125F);
+ double d = entityplayer.field_71091_bM + (entityplayer.field_71094_bP - entityplayer.field_71091_bM) * f - (entityplayer.prevPosX + (entityplayer.posX - entityplayer.prevPosX) * f);
+ double d1 = entityplayer.field_71096_bN + (entityplayer.field_71095_bQ - entityplayer.field_71096_bN) * f - (entityplayer.prevPosY + (entityplayer.posY - entityplayer.prevPosY) * f);
+ double d2 = entityplayer.field_71097_bO + (entityplayer.field_71085_bR - entityplayer.field_71097_bO) * f - (entityplayer.prevPosZ + (entityplayer.posZ - entityplayer.prevPosZ) * f);
+ float f8 = entityplayer.prevRenderYawOffset + (entityplayer.renderYawOffset - entityplayer.prevRenderYawOffset) * f;
+ double d3 = MathHelper.sin(f8 * 3.141593F / 180.0F);
+ double d4 = -MathHelper.cos(f8 * 3.141593F / 180.0F);
+ float f9 = (float) d1 * 10.0F;
+ if (f9 < -6.0F)
+ {
+ f9 = -6.0F;
+ }
+ if (f9 > 32.0F)
+ {
+ f9 = 32.0F;
+ }
+ float f10 = (float) (d * d3 + d2 * d4) * 100.0F;
+ float f11 = (float) (d * d4 - d2 * d3) * 100.0F;
+ if (f10 < 0.0F)
+ {
+ f10 = 0.0F;
+ }
+ float f12 = entityplayer.prevCameraYaw + (entityplayer.cameraYaw - entityplayer.prevCameraYaw) * f;
+ f9 += MathHelper.sin((entityplayer.prevDistanceWalkedModified + (entityplayer.distanceWalkedModified - entityplayer.prevDistanceWalkedModified) * f) * 6.0F) * 32.0F * f12;
+ if (entityplayer.isSneaking())
+ {
+ f9 += 25.0F;
+ }
+ GL11.glRotatef(6.0F + f10 / 2.0F + f9, 1.0F, 0.0F, 0.0F);
+ GL11.glRotatef(f11 / 2.0F, 0.0F, 0.0F, 1.0F);
+ GL11.glRotatef(-f11 / 2.0F, 0.0F, 1.0F, 0.0F);
+ GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
+ this.modelCape.renderCloak(0.0625F);
+ GL11.glPopMatrix();
+ }
+ }
+
+ private FloatBuffer func_76907_a(float par1, float par2, float par3, float par4)
+ {
+ this.field_76908_a.clear();
+ this.field_76908_a.put(par1).put(par2).put(par3).put(par4);
+ this.field_76908_a.flip();
+ return this.field_76908_a;
+ }
+
+ public void renderMisc(EntityPlayer entityplayer, double d, double d1, double d2, float f, float f1)
+ {
+ ItemStack itemstack = entityplayer.inventory.getCurrentItem();
+ this.modelMisc.heldItemRight = (itemstack != null ? 1 : 0);
+ this.modelMisc.isSneak = entityplayer.isSneaking();
+ this.modelWings.heldItemRight = (itemstack != null ? 1 : 0);
+ this.modelWings.isSneak = entityplayer.isSneaking();
+ double d3 = d1 - entityplayer.yOffset;
+ if ((entityplayer.isSneaking()) && (!(entityplayer instanceof EntityPlayerSP)))
+ {
+ d3 -= 0.125D;
+ }
+
+ doRenderMisc(entityplayer, d, d3, d2, f, f1);
+ this.modelMisc.isSneak = false;
+ this.modelMisc.heldItemRight = 0;
+ this.modelWings.isSneak = false;
+ this.modelWings.heldItemRight = 0;
+ }
+
+ public void doRenderMisc(EntityPlayer player, double d, double d1, double d2, float f, float f1)
+ {
+ InventoryAether inv = (InventoryAether) Aether.proxy.getClientInventories().get(player.username);
+
+ if (inv == null)
+ {
+ return;
+ }
+ GL11.glPushMatrix();
+ GL11.glEnable(2884);
+ this.modelMisc.onGround = this.renderPlayer.localRenderSwingProgress(player, f1);
+ this.modelMisc.isRiding = player.isRiding();
+ this.modelWings.onGround = this.renderPlayer.localRenderSwingProgress(player, f1);
+ this.modelWings.isRiding = player.isRiding();
+ try
+ {
+ float f2 = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * f1;
+ float f3 = player.prevRotationYaw + (player.rotationYaw - player.prevRotationYaw) * f1;
+ float f4 = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * f1;
+ this.renderPlayer.realRenderLivingAt(player, d, d1, d2);
+ float f5 = this.renderPlayer.realHandleRotationFloat(player, f1);
+ this.renderPlayer.realRotateCorpse(player, f5, f2, f1);
+ float f6 = 0.0625F;
+ GL11.glEnable(32826);
+ GL11.glScalef(-1.0F, -1.0F, 1.0F);
+ this.renderPlayer.realPreRenderCallback(player, f1);
+ GL11.glTranslatef(0.0F, -24.0F * f6 - 0.007813F, 0.0F);
+ float f7 = player.prevLimbYaw + (player.limbYaw - player.prevLimbYaw) * f1;
+ float f8 = player.limbSwing - player.limbYaw * (1.0F - f1);
+ if (f7 > 1.0F)
+ {
+ f7 = 1.0F;
+ }
+
+ GL11.glEnable(3008);
+
+ this.modelMisc.setRotationAngles(f8, f7, f5, f3 - f2, f4, f6, player);
+ this.modelWings.setRotationAngles(f8, f7, f5, f3 - f2, f4, f6, player);
+
+ float brightness = player.getBrightness(f);
+
+ if (inv.slots[0] != null)
+ {
+ ItemAccessory pendant = (ItemAccessory) inv.slots[0].getItem();
+ this.renderPlayer.localLoadTexture(pendant.texture);
+ int colour = pendant.getColorFromItemStack(new ItemStack(pendant, 1, 0), 1);
+ float red = (colour >> 16 & 0xFF) / 255.0F;
+ float green = (colour >> 8 & 0xFF) / 255.0F;
+ float blue = (colour & 0xFF) / 255.0F;
+ if (pendant.colouriseRender) GL11.glColor3f(red, green, blue);
+ this.modelMisc.bipedBody.render(f6);
+ }
+ if (inv.slots[6] != null)
+ {
+ ItemAccessory pendant = (ItemAccessory) inv.slots[6].getItem();
+ this.renderPlayer.localLoadTexture(pendant.texture);
+ int colour = pendant.getColorFromItemStack(new ItemStack(pendant, 1, 0), 1);
+ float red = (colour >> 16 & 0xFF) / 255.0F;
+ float green = (colour >> 8 & 0xFF) / 255.0F;
+ float blue = (colour & 0xFF) / 255.0F;
+ if (pendant.colouriseRender) GL11.glColor3f(red, green, blue);
+ this.modelMisc.bipedLeftArm.render(f6);
+ this.modelMisc.bipedRightArm.render(f6);
+ }
+ if ((wearingValkyrieArmour(player, inv)) && (Aether.getClientPlayer(player) != null))
+ {
+ this.modelWings.sinage = Aether.getClientPlayer(player).getSinage();
+ this.modelWings.gonRound = player.onGround;
+
+ this.renderPlayer.localLoadTexture("/net/aetherteam/aether/client/sprites/mobs/valkyrie/valkyrie.png");
+
+ this.modelWings.wingLeft.render(f6);
+ this.modelWings.wingRight.render(f6);
+ }
+ if ((AetherRanks.getRankFromMember(player.username).equals(AetherRanks.DEVELOPER)) || (AetherRanks.getRankFromMember(player.username).equals(AetherRanks.HELPER)))
+ {
+ GL11.glPushMatrix();
+ GL11.glDisable(2896);
+ GL11.glScalef(0.951F, 0.951F, 0.951F);
+ GL11.glEnable(3042);
+ GL11.glDepthMask(true);
+ float var4 = 1.0F;
+ GL11.glEnable(3042);
+ GL11.glBlendFunc(1, 1);
+
+ this.renderPlayer.localLoadDownloadableImageTexture("http://skins.minecraft.net/MinecraftSkins/" + player.username + ".png", "/mob/char.png");
+ this.modelMisc.bipedBody.render(f6);
+ GL11.glTranslatef(0.0F, 0.05F, 0.0F);
+ this.modelMisc.bipedRightLeg.render(f6);
+ this.modelMisc.bipedLeftLeg.render(f6);
+ GL11.glTranslatef(0.0F, -0.04F, 0.0F);
+ this.modelMisc.bipedRightArm.render(f6);
+ this.modelMisc.bipedLeftArm.render(f6);
+ GL11.glTranslatef(0.0F, -0.02F, 0.0F);
+ this.modelMisc.bipedHead.render(f6);
+ char var5 = 61680;
+ int var6 = var5 % 65536;
+ int var7 = var5 / 65536;
+ OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, var6 / 1.0F, var7 / 1.0F);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, var4);
+ GL11.glPopMatrix();
+ }
+
+ GL11.glDisable(3042);
+ GL11.glDisable(32826);
+ } catch (Exception exception)
+ {
+ exception.printStackTrace();
+ }
+
+ GL11.glPopMatrix();
+ }
+
+ public boolean wearingAccessory(int itemID, InventoryAether inv)
+ {
+ for (int index = 0; index < 8; index++)
+ {
+ if ((inv.slots[index] != null) && (inv.slots[index].itemID == itemID))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public boolean wearingArmour(int itemID, EntityPlayer player)
+ {
+ for (int index = 0; index < 4; index++)
+ {
+ if ((player.inventory.armorInventory[index] != null) && (player.inventory.armorInventory[index].itemID == itemID))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public boolean wearingNeptuneArmour(EntityPlayer player, InventoryAether inv)
+ {
+ return (wearingArmour(AetherItems.NeptuneHelmet.itemID, player)) && (wearingArmour(AetherItems.NeptuneChestplate.itemID, player)) && (wearingArmour(AetherItems.NeptuneLeggings.itemID, player)) && (wearingArmour(AetherItems.NeptuneBoots.itemID, player)) && (wearingAccessory(AetherItems.NeptuneGloves.itemID, inv));
+ }
+
+ public boolean wearingValkyrieArmour(EntityPlayer player, InventoryAether inv)
+ {
+ return (wearingArmour(AetherItems.ValkyrieHelmet.itemID, player)) && (wearingArmour(AetherItems.ValkyrieChestplate.itemID, player)) && (wearingArmour(AetherItems.ValkyrieLeggings.itemID, player)) && (wearingArmour(AetherItems.ValkyrieBoots.itemID, player)) && (wearingAccessory(AetherItems.ValkyrieGloves.itemID, inv));
+ }
+
+ public boolean wearingObsidianArmour(EntityPlayer player, InventoryAether inv)
+ {
+ return (wearingArmour(AetherItems.ObsidianHelmet.itemID, player)) && (wearingArmour(AetherItems.ObsidianChestplate.itemID, player)) && (wearingArmour(AetherItems.ObsidianLeggings.itemID, player)) && (wearingArmour(AetherItems.ObsidianBoots.itemID, player)) && (wearingAccessory(AetherItems.ObsidianGloves.itemID, inv));
+ }
+
+ public boolean wearingPhoenixArmour(EntityPlayer player, InventoryAether inv)
+ {
+ return (wearingArmour(AetherItems.PhoenixHelmet.itemID, player)) && (wearingArmour(AetherItems.PhoenixChestplate.itemID, player)) && (wearingArmour(AetherItems.PhoenixLeggings.itemID, player)) && (wearingArmour(AetherItems.PhoenixBoots.itemID, player)) && (wearingAccessory(AetherItems.PhoenixGloves.itemID, inv));
+ }
+
+ public boolean wearingGravititeArmour(EntityPlayer player, InventoryAether inv)
+ {
+ return (wearingArmour(AetherItems.GravititeHelmet.itemID, player)) && (wearingArmour(AetherItems.GravititeChestplate.itemID, player)) && (wearingArmour(AetherItems.GravititeLeggings.itemID, player)) && (wearingArmour(AetherItems.GravititeBoots.itemID, player)) && (wearingAccessory(AetherItems.GravititeGloves.itemID, inv));
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.RenderPlayerBaseAether
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/AetherGuis.java b/src/main/java/net/aetherteam/aether/client/gui/AetherGuis.java
new file mode 100644
index 0000000..2e93080
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/AetherGuis.java
@@ -0,0 +1,23 @@
+package net.aetherteam.aether.client.gui;
+
+import net.aetherteam.aether.AetherGuiHandler;
+import net.aetherteam.aether.containers.ContainerAltar;
+import net.aetherteam.aether.containers.ContainerFreezer;
+import net.aetherteam.aether.containers.ContainerIncubator;
+import net.aetherteam.aether.containers.ContainerSkyrootWorkbench;
+
+public class AetherGuis
+{
+ public static void init()
+ {
+ AetherGuiHandler.registerGui(GuiFreezer.class, ContainerFreezer.class);
+ AetherGuiHandler.registerGui(GuiIncubator.class, ContainerIncubator.class);
+ AetherGuiHandler.registerGui(GuiAltar.class, ContainerAltar.class);
+ AetherGuiHandler.registerGui(GuiSkyrootCrafting.class, ContainerSkyrootWorkbench.class);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.AetherGuis
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/AetherInventoryEffectRenderer.java b/src/main/java/net/aetherteam/aether/client/gui/AetherInventoryEffectRenderer.java
new file mode 100644
index 0000000..7d0ef87
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/AetherInventoryEffectRenderer.java
@@ -0,0 +1,106 @@
+package net.aetherteam.aether.client.gui;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.entity.EntityClientPlayerMP;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.inventory.Container;
+import net.minecraft.potion.Potion;
+import net.minecraft.potion.PotionEffect;
+import net.minecraft.util.StatCollector;
+import org.lwjgl.opengl.GL11;
+
+@SideOnly(Side.CLIENT)
+public abstract class AetherInventoryEffectRenderer extends GuiContainerAether
+{
+ private boolean field_74222_o;
+
+ public AetherInventoryEffectRenderer(Container par1Container)
+ {
+ super(par1Container);
+ }
+
+ public void initGui()
+ {
+ super.initGui();
+
+ if (!this.mc.thePlayer.getActivePotionEffects().isEmpty())
+ {
+ this.guiLeft = (160 + (this.width - this.xSize - 200) / 2);
+ this.field_74222_o = true;
+ }
+ }
+
+ public void drawScreen(int par1, int par2, float par3)
+ {
+ super.drawScreen(par1, par2, par3);
+
+ if (this.field_74222_o)
+ {
+ displayDebuffEffects();
+ }
+ }
+
+ private void displayDebuffEffects()
+ {
+ int var1 = this.guiLeft - 124;
+ int var2 = this.guiTop;
+ Collection var4 = this.mc.thePlayer.getActivePotionEffects();
+
+ if (!var4.isEmpty())
+ {
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glDisable(2896);
+ int var6 = 33;
+
+ if (var4.size() > 5)
+ {
+ var6 = 132 / (var4.size() - 1);
+ }
+
+ for (Iterator var7 = this.mc.thePlayer.getActivePotionEffects().iterator(); var7.hasNext(); var2 += var6)
+ {
+ PotionEffect var8 = (PotionEffect) var7.next();
+ Potion var9 = Potion.potionTypes[var8.getPotionID()];
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.renderEngine.bindTexture("/gui/inventory.png");
+ drawTexturedModalRect(var1, var2, 0, 166, 140, 32);
+
+ if (var9.hasStatusIcon())
+ {
+ int var10 = var9.getStatusIconIndex();
+ drawTexturedModalRect(var1 + 6, var2 + 7, 0 + var10 % 8 * 18, 198 + var10 / 8 * 18, 18, 18);
+ }
+
+ String var12 = StatCollector.translateToLocal(var9.getName());
+
+ if (var8.getAmplifier() == 1)
+ {
+ var12 = var12 + " II";
+ } else if (var8.getAmplifier() == 2)
+ {
+ var12 = var12 + " III";
+ } else if (var8.getAmplifier() == 3)
+ {
+ var12 = var12 + " IV";
+ }
+
+ this.fontRenderer.drawStringWithShadow(var12, var1 + 10 + 18, var2 + 6, 16777215);
+ String var11 = Potion.getDurationString(var8);
+ this.fontRenderer.drawStringWithShadow(var11, var1 + 10 + 18, var2 + 6 + 10, 8355711);
+ }
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.AetherInventoryEffectRenderer
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/GuiAetherContainerCreative.java b/src/main/java/net/aetherteam/aether/client/gui/GuiAetherContainerCreative.java
new file mode 100644
index 0000000..0eb9bcf
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/GuiAetherContainerCreative.java
@@ -0,0 +1,932 @@
+package net.aetherteam.aether.client.gui;
+
+import cpw.mods.fml.common.network.PacketDispatcher;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.AetherGuiHandler;
+import net.aetherteam.aether.client.gui.donator.GuiDonatorMenu;
+import net.aetherteam.aether.client.gui.social.GuiMenu;
+import net.aetherteam.aether.containers.ContainerAetherCreative;
+import net.aetherteam.aether.containers.SlotAetherCreativeInventory;
+import net.aetherteam.aether.packets.AetherPacketHandler;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiTextField;
+import net.minecraft.client.gui.achievement.GuiAchievements;
+import net.minecraft.client.gui.achievement.GuiStats;
+import net.minecraft.client.gui.inventory.CreativeCrafting;
+import net.minecraft.client.gui.inventory.GuiInventory;
+import net.minecraft.client.renderer.RenderHelper;
+import net.minecraft.client.settings.GameSettings;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.enchantment.Enchantment;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.inventory.Container;
+import net.minecraft.inventory.InventoryBasic;
+import net.minecraft.inventory.Slot;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagList;
+import net.minecraft.stats.AchievementList;
+import net.minecraft.util.StringTranslate;
+import org.lwjgl.input.Keyboard;
+import org.lwjgl.input.Mouse;
+import org.lwjgl.opengl.GL11;
+import org.lwjgl.opengl.GL12;
+
+@SideOnly(Side.CLIENT)
+public class GuiAetherContainerCreative extends AetherInventoryEffectRenderer
+{
+ private static InventoryBasic inventory = new InventoryBasic("tmp", true, 45);
+ private static int selectedTabIndex = CreativeTabs.tabBlock.getTabIndex();
+ private float currentScroll = 0.0F;
+ private boolean isScrolling = false;
+ private boolean wasClicking;
+ private GuiTextField searchField;
+ private List backupContainerSlots;
+ private Slot field_74235_v = null;
+ private boolean field_74234_w = false;
+ private CreativeCrafting field_82324_x;
+ private static int tabPage = 0;
+ private int maxPages = 0;
+ private EntityPlayer player;
+
+ public GuiAetherContainerCreative(EntityPlayer var1)
+ {
+ super(new ContainerAetherCreative(var1));
+ this.player = var1;
+ var1.openContainer = this.inventorySlots;
+ this.allowUserInput = true;
+ var1.addStat(AchievementList.openInventory, 1);
+ this.ySize = 158;
+ this.xSize = 195;
+ }
+
+ /**
+ * Called from the main game loop to update the screen.
+ */
+ public void updateScreen()
+ {
+ if (!this.mc.playerController.isInCreativeMode())
+ {
+ this.mc.displayGuiScreen(new GuiInventory(this.mc.thePlayer));
+ }
+ }
+
+ protected void handleMouseClick(Slot var1, int var2, int var3, int var4)
+ {
+ this.field_74234_w = true;
+ boolean var5 = var4 == 1;
+ var4 = var2 == -999 && var4 == 0 ? 4 : var4;
+ InventoryPlayer var7;
+ ItemStack var6;
+
+ if (var1 == null && selectedTabIndex != CreativeTabs.tabInventory.getTabIndex() && var4 != 5)
+ {
+ var7 = this.mc.thePlayer.inventory;
+
+ if (var7.getItemStack() != null)
+ {
+ if (var3 == 0)
+ {
+ this.mc.thePlayer.dropPlayerItem(var7.getItemStack());
+ this.mc.playerController.func_78752_a(var7.getItemStack());
+ var7.setItemStack((ItemStack) null);
+ }
+
+ if (var3 == 1)
+ {
+ var6 = var7.getItemStack().splitStack(1);
+ this.mc.thePlayer.dropPlayerItem(var6);
+ this.mc.playerController.func_78752_a(var6);
+
+ if (var7.getItemStack().stackSize == 0)
+ {
+ var7.setItemStack((ItemStack) null);
+ }
+ }
+ }
+ } else
+ {
+ int var8;
+
+ if (var1 == this.field_74235_v && var5)
+ {
+ for (var8 = 0; var8 < this.mc.thePlayer.inventoryContainer.getInventory().size(); ++var8)
+ {
+ this.mc.playerController.sendSlotPacket((ItemStack) null, var8);
+ }
+ } else
+ {
+ ItemStack var9;
+
+ if (selectedTabIndex == CreativeTabs.tabInventory.getTabIndex())
+ {
+ if (var1 == this.field_74235_v)
+ {
+ this.mc.thePlayer.inventory.setItemStack((ItemStack) null);
+ } else if (var4 == 4 && var1 != null && var1.getHasStack())
+ {
+ var9 = var1.decrStackSize(var3 == 0 ? 1 : var1.getStack().getMaxStackSize());
+ this.mc.thePlayer.dropPlayerItem(var9);
+ this.mc.playerController.func_78752_a(var9);
+ } else if (var4 == 4 && this.mc.thePlayer.inventory.getItemStack() != null)
+ {
+ this.mc.thePlayer.dropPlayerItem(this.mc.thePlayer.inventory.getItemStack());
+ this.mc.playerController.func_78752_a(this.mc.thePlayer.inventory.getItemStack());
+ this.mc.thePlayer.inventory.setItemStack((ItemStack) null);
+ } else
+ {
+ this.mc.thePlayer.inventoryContainer.slotClick(var1 == null ? var2 : SlotAetherCreativeInventory.func_75240_a((SlotAetherCreativeInventory) var1).slotNumber, var3, var4, this.mc.thePlayer);
+ this.mc.thePlayer.inventoryContainer.detectAndSendChanges();
+ }
+
+ PacketDispatcher.sendPacketToServer(AetherPacketHandler.sendAccessoryChange(Aether.getClientPlayer(this.player).inv.writeToNBT(new NBTTagList()), false, true, Collections.singleton(this.player.username), (byte) 0));
+ } else if (var4 != 5 && var1.inventory == inventory)
+ {
+ var7 = this.mc.thePlayer.inventory;
+ var6 = var7.getItemStack();
+ ItemStack var10 = var1.getStack();
+ ItemStack var11;
+
+ if (var4 == 2)
+ {
+ if (var10 != null && var3 >= 0 && var3 < 9)
+ {
+ var11 = var10.copy();
+ var11.stackSize = var11.getMaxStackSize();
+ this.mc.thePlayer.inventory.setInventorySlotContents(var3, var11);
+ this.mc.thePlayer.inventoryContainer.detectAndSendChanges();
+ }
+
+ return;
+ }
+
+ if (var4 == 3)
+ {
+ if (var7.getItemStack() == null && var1.getHasStack())
+ {
+ var11 = var1.getStack().copy();
+ var11.stackSize = var11.getMaxStackSize();
+ var7.setItemStack(var11);
+ }
+
+ return;
+ }
+
+ if (var4 == 4)
+ {
+ if (var10 != null)
+ {
+ var11 = var10.copy();
+ var11.stackSize = var3 == 0 ? 1 : var11.getMaxStackSize();
+ this.mc.thePlayer.dropPlayerItem(var11);
+ this.mc.playerController.func_78752_a(var11);
+ }
+
+ return;
+ }
+
+ if (var6 != null && var10 != null && var6.isItemEqual(var10))
+ {
+ if (var3 == 0)
+ {
+ if (var5)
+ {
+ var6.stackSize = var6.getMaxStackSize();
+ } else if (var6.stackSize < var6.getMaxStackSize())
+ {
+ ++var6.stackSize;
+ }
+ } else if (var6.stackSize <= 1)
+ {
+ var7.setItemStack((ItemStack) null);
+ } else
+ {
+ --var6.stackSize;
+ }
+ } else if (var10 != null && var6 == null)
+ {
+ var7.setItemStack(ItemStack.copyItemStack(var10));
+ var6 = var7.getItemStack();
+
+ if (var5)
+ {
+ var6.stackSize = var6.getMaxStackSize();
+ }
+ } else
+ {
+ var7.setItemStack((ItemStack) null);
+ }
+ } else
+ {
+ this.inventorySlots.slotClick(var1 == null ? var2 : var1.slotNumber, var3, var4, this.mc.thePlayer);
+
+ if (Container.func_94532_c(var3) == 2)
+ {
+ for (var8 = 0; var8 < 9; ++var8)
+ {
+ this.mc.playerController.sendSlotPacket(this.inventorySlots.getSlot(45 + var8).getStack(), 36 + var8);
+ }
+ } else if (var1 != null)
+ {
+ var9 = this.inventorySlots.getSlot(var1.slotNumber).getStack();
+ this.mc.playerController.sendSlotPacket(var9, var1.slotNumber - this.inventorySlots.inventorySlots.size() + 9 + 36);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Adds the buttons (and other controls) to the screen in question.
+ */
+ public void initGui()
+ {
+ if (this.mc.playerController.isInCreativeMode())
+ {
+ super.initGui();
+ this.buttonList.clear();
+ Keyboard.enableRepeatEvents(true);
+ this.searchField = new GuiTextField(this.fontRenderer, this.guiLeft + 82, this.guiTop + 6, 89, this.fontRenderer.FONT_HEIGHT);
+ this.searchField.setMaxStringLength(15);
+ this.searchField.setEnableBackgroundDrawing(false);
+ this.searchField.setVisible(false);
+ this.searchField.setTextColor(16777215);
+ int var1 = selectedTabIndex;
+ selectedTabIndex = -1;
+ this.setCurrentCreativeTab(CreativeTabs.creativeTabArray[var1]);
+ this.field_82324_x = new CreativeCrafting(this.mc);
+ this.mc.thePlayer.inventoryContainer.addCraftingToCrafters(this.field_82324_x);
+ int var2 = CreativeTabs.creativeTabArray.length;
+
+ if (var2 > 12)
+ {
+ this.buttonList.add(new GuiButton(101, this.guiLeft - 25, this.guiTop - 23, 20, 20, "<"));
+ this.buttonList.add(new GuiButton(102, this.guiLeft + this.xSize + 5, this.guiTop - 23, 20, 20, ">"));
+ this.maxPages = (var2 - 12) / 10 + 1;
+ }
+
+ GuiButton var3 = new GuiButton(5, this.guiLeft + 8, this.guiTop + 132, 72, 20, StringTranslate.getInstance().translateKey("Book of Lore"));
+ var3.enabled = false;
+ this.buttonList.add(var3);
+ this.buttonList.add(new GuiButton(6, this.guiLeft + 85, this.guiTop + 132, 48, 20, "Social"));
+ this.buttonList.add(new GuiButton(7, this.guiLeft + 138, this.guiTop + 132, 50, 20, "Donator"));
+ } else
+ {
+ this.mc.displayGuiScreen(new GuiInventory(this.mc.thePlayer));
+ }
+ }
+
+ /**
+ * Called when the screen is unloaded. Used to disable keyboard repeat events
+ */
+ public void onGuiClosed()
+ {
+ super.onGuiClosed();
+
+ if (this.mc.thePlayer != null && this.mc.thePlayer.inventory != null)
+ {
+ this.mc.thePlayer.inventoryContainer.removeCraftingFromCrafters(this.field_82324_x);
+ }
+
+ Keyboard.enableRepeatEvents(false);
+ }
+
+ /**
+ * Fired when a key is typed. This is the equivalent of KeyListener.keyTyped(KeyEvent e).
+ */
+ protected void keyTyped(char var1, int var2)
+ {
+ if (selectedTabIndex != CreativeTabs.tabAllSearch.getTabIndex())
+ {
+ if (GameSettings.isKeyDown(this.mc.gameSettings.keyBindChat))
+ {
+ this.setCurrentCreativeTab(CreativeTabs.tabAllSearch);
+ } else
+ {
+ super.keyTyped(var1, var2);
+ }
+ } else
+ {
+ if (this.field_74234_w)
+ {
+ this.field_74234_w = false;
+ this.searchField.setText("");
+ }
+
+ if (!this.checkHotbarKeys(var2))
+ {
+ if (this.searchField.textboxKeyTyped(var1, var2))
+ {
+ this.updateCreativeSearch();
+ } else
+ {
+ super.keyTyped(var1, var2);
+ }
+ }
+ }
+ }
+
+ private void updateCreativeSearch()
+ {
+ ContainerAetherCreative var1 = (ContainerAetherCreative) this.inventorySlots;
+ var1.itemList.clear();
+ Item[] var2 = Item.itemsList;
+ int var3 = var2.length;
+ int var4;
+
+ for (var4 = 0; var4 < var3; ++var4)
+ {
+ Item var5 = var2[var4];
+
+ if (var5 != null && var5.getCreativeTab() != null)
+ {
+ var5.getSubItems(var5.itemID, (CreativeTabs) null, var1.itemList);
+ }
+ }
+
+ Enchantment[] var12 = Enchantment.enchantmentsList;
+ var3 = var12.length;
+
+ for (var4 = 0; var4 < var3; ++var4)
+ {
+ Enchantment var6 = var12[var4];
+
+ if (var6 != null && var6.type != null)
+ {
+ Item.enchantedBook.func_92113_a(var6, var1.itemList);
+ }
+ }
+
+ Iterator var13 = var1.itemList.iterator();
+ String var7 = this.searchField.getText().toLowerCase();
+
+ while (var13.hasNext())
+ {
+ ItemStack var8 = (ItemStack) var13.next();
+ boolean var9 = false;
+ Iterator var10 = var8.getTooltip(this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips).iterator();
+
+ while (true)
+ {
+ if (var10.hasNext())
+ {
+ String var11 = (String) var10.next();
+
+ if (!var11.toLowerCase().contains(var7))
+ {
+ continue;
+ }
+
+ var9 = true;
+ }
+
+ if (!var9)
+ {
+ var13.remove();
+ }
+
+ break;
+ }
+ }
+
+ this.currentScroll = 0.0F;
+ var1.scrollTo(0.0F);
+ }
+
+ protected void drawGuiContainerForegroundLayer(int var1, int var2)
+ {
+ CreativeTabs var3 = CreativeTabs.creativeTabArray[selectedTabIndex];
+
+ if (var3 != null && var3.drawInForegroundOfTab())
+ {
+ this.fontRenderer.drawString(var3.getTranslatedTabLabel(), 8, 6, 4210752);
+ }
+ }
+
+ /**
+ * Called when the mouse is clicked.
+ */
+ protected void mouseClicked(int var1, int var2, int var3)
+ {
+ if (var3 == 0)
+ {
+ int var4 = var1 - this.guiLeft;
+ int var5 = var2 - this.guiTop;
+ CreativeTabs[] var6 = CreativeTabs.creativeTabArray;
+ int var7 = var6.length;
+
+ for (int var8 = 0; var8 < var7; ++var8)
+ {
+ CreativeTabs var9 = var6[var8];
+
+ if (this.func_74232_a(var9, var4, var5))
+ {
+ return;
+ }
+ }
+ }
+
+ super.mouseClicked(var1, var2, var3);
+ }
+
+ /**
+ * Called when the mouse is moved or a mouse button is released. Signature: (mouseX, mouseY, which) which==-1 is
+ * mouseMove, which==0 or which==1 is mouseUp
+ */
+ protected void mouseMovedOrUp(int var1, int var2, int var3)
+ {
+ if (var3 == 0)
+ {
+ int var4 = var1 - this.guiLeft;
+ int var5 = var2 - this.guiTop;
+ CreativeTabs[] var6 = CreativeTabs.creativeTabArray;
+ int var7 = var6.length;
+
+ for (int var8 = 0; var8 < var7; ++var8)
+ {
+ CreativeTabs var9 = var6[var8];
+
+ if (var9 != null && this.func_74232_a(var9, var4, var5))
+ {
+ this.setCurrentCreativeTab(var9);
+ return;
+ }
+ }
+ }
+
+ super.mouseMovedOrUp(var1, var2, var3);
+ }
+
+ private boolean needsScrollBars()
+ {
+ return CreativeTabs.creativeTabArray[selectedTabIndex] == null ? false : selectedTabIndex != CreativeTabs.tabInventory.getTabIndex() && CreativeTabs.creativeTabArray[selectedTabIndex].shouldHidePlayerInventory() && ((ContainerAetherCreative) this.inventorySlots).hasMoreThan1PageOfItemsInList();
+ }
+
+ private void setCurrentCreativeTab(CreativeTabs var1)
+ {
+ if (var1 != null)
+ {
+ int var2 = selectedTabIndex;
+ selectedTabIndex = var1.getTabIndex();
+ ContainerAetherCreative var3 = (ContainerAetherCreative) this.inventorySlots;
+ this.field_94077_p.clear();
+ var3.itemList.clear();
+ var1.displayAllReleventItems(var3.itemList);
+
+ if (var1 == CreativeTabs.tabInventory)
+ {
+ Container var4 = this.player.inventoryContainer;
+
+ if (this.backupContainerSlots == null)
+ {
+ this.backupContainerSlots = var3.inventorySlots;
+ }
+
+ var3.inventorySlots = new ArrayList();
+
+ for (int var5 = 0; var5 < var4.inventorySlots.size() - 8; ++var5)
+ {
+ SlotAetherCreativeInventory var6 = new SlotAetherCreativeInventory(this, (Slot) var4.inventorySlots.get(var5), var5);
+ var3.inventorySlots.add(var6);
+ int var7;
+ int var9;
+ int var8;
+
+ if (var5 >= 5 && var5 < 9)
+ {
+ var7 = var5 - 5;
+ var8 = var7 / 2;
+ var9 = var7 % 2;
+ var6.xDisplayPosition = 45 + var8 * 18;
+ var6.yDisplayPosition = 6 + var9 * 27;
+ } else if (var5 >= 0 && var5 < 5)
+ {
+ var6.yDisplayPosition = -2000;
+ var6.xDisplayPosition = -2000;
+ } else if (var5 < var4.inventorySlots.size())
+ {
+ var7 = var5 - 9;
+ var8 = var7 % 9;
+ var9 = var7 / 9;
+ var6.xDisplayPosition = 9 + var8 * 18;
+
+ if (var5 >= 36 && var5 <= 44)
+ {
+ var6.yDisplayPosition = 112;
+ } else if (var5 > 44 && var5 <= 48)
+ {
+ var6.xDisplayPosition = 81 + var8 * 18;
+ var6.yDisplayPosition = 6;
+ } else if (var5 > 48)
+ {
+ var6.xDisplayPosition = 81 + (var8 - 4) * 18;
+ var6.yDisplayPosition = 33;
+ } else
+ {
+ var6.yDisplayPosition = 54 + var9 * 18;
+ }
+ }
+ }
+
+ this.field_74235_v = new Slot(inventory, 0, 173, 112);
+ var3.inventorySlots.add(this.field_74235_v);
+ } else if (var2 == CreativeTabs.tabInventory.getTabIndex())
+ {
+ var3.inventorySlots = this.backupContainerSlots;
+ this.backupContainerSlots = null;
+ }
+
+ if (this.searchField != null)
+ {
+ if (var1 == CreativeTabs.tabAllSearch)
+ {
+ this.searchField.setVisible(true);
+ this.searchField.setCanLoseFocus(false);
+ this.searchField.setFocused(true);
+ this.searchField.setText("");
+ this.updateCreativeSearch();
+ } else
+ {
+ this.searchField.setVisible(false);
+ this.searchField.setCanLoseFocus(true);
+ this.searchField.setFocused(false);
+ }
+ }
+
+ this.currentScroll = 0.0F;
+ var3.scrollTo(0.0F);
+ }
+ }
+
+ /**
+ * Handles mouse input.
+ */
+ public void handleMouseInput()
+ {
+ super.handleMouseInput();
+ int var1 = Mouse.getEventDWheel();
+
+ if (var1 != 0 && this.needsScrollBars())
+ {
+ int var2 = ((ContainerAetherCreative) this.inventorySlots).itemList.size() / 9 - 5 + 1;
+
+ if (var1 > 0)
+ {
+ var1 = 1;
+ }
+
+ if (var1 < 0)
+ {
+ var1 = -1;
+ }
+
+ this.currentScroll = (float) ((double) this.currentScroll - (double) var1 / (double) var2);
+
+ if (this.currentScroll < 0.0F)
+ {
+ this.currentScroll = 0.0F;
+ }
+
+ if (this.currentScroll > 1.0F)
+ {
+ this.currentScroll = 1.0F;
+ }
+
+ ((ContainerAetherCreative) this.inventorySlots).scrollTo(this.currentScroll);
+ }
+ }
+
+ /**
+ * Draws the screen and all the components in it.
+ */
+ public void drawScreen(int var1, int var2, float var3)
+ {
+ boolean var4 = Mouse.isButtonDown(0);
+ int var5 = this.guiLeft;
+ int var6 = this.guiTop;
+ int var7 = var5 + 175;
+ int var8 = var6 + 18;
+ int var9 = var7 + 14;
+ int var10 = var8 + 112;
+
+ if (!this.wasClicking && var4 && var1 >= var7 && var2 >= var8 && var1 < var9 && var2 < var10)
+ {
+ this.isScrolling = this.needsScrollBars();
+ }
+
+ if (!var4)
+ {
+ this.isScrolling = false;
+ }
+
+ this.wasClicking = var4;
+
+ if (this.isScrolling)
+ {
+ this.currentScroll = ((float) (var2 - var8) - 7.5F) / ((float) (var10 - var8) - 15.0F);
+
+ if (this.currentScroll < 0.0F)
+ {
+ this.currentScroll = 0.0F;
+ }
+
+ if (this.currentScroll > 1.0F)
+ {
+ this.currentScroll = 1.0F;
+ }
+
+ ((ContainerAetherCreative) this.inventorySlots).scrollTo(this.currentScroll);
+ }
+
+ super.drawScreen(var1, var2, var3);
+ CreativeTabs[] var11 = CreativeTabs.creativeTabArray;
+ int var12 = tabPage * 10;
+ int var13 = Math.min(var11.length, (tabPage + 1) * 10 + 2);
+
+ if (tabPage != 0)
+ {
+ var12 += 2;
+ }
+
+ boolean var14 = false;
+
+ for (int var15 = var12; var15 < var13; ++var15)
+ {
+ CreativeTabs var16 = var11[var15];
+
+ if (var16 != null && this.renderCreativeInventoryHoveringText(var16, var1, var2))
+ {
+ var14 = true;
+ break;
+ }
+ }
+
+ if (!var14 && !this.renderCreativeInventoryHoveringText(CreativeTabs.tabAllSearch, var1, var2))
+ {
+ this.renderCreativeInventoryHoveringText(CreativeTabs.tabInventory, var1, var2);
+ }
+
+ if (this.field_74235_v != null && selectedTabIndex == CreativeTabs.tabInventory.getTabIndex() && this.isPointInRegion(this.field_74235_v.xDisplayPosition, this.field_74235_v.yDisplayPosition, 16, 16, var1, var2))
+ {
+ this.drawCreativeTabHoveringText(StringTranslate.getInstance().translateKey("inventory.binSlot"), var1, var2);
+ }
+
+ if (this.maxPages != 0)
+ {
+ String var18 = String.format("%d / %d", new Object[]{Integer.valueOf(tabPage + 1), Integer.valueOf(this.maxPages + 1)});
+ int var17 = this.fontRenderer.getStringWidth(var18);
+ GL11.glDisable(GL11.GL_LIGHTING);
+ this.zLevel = 300.0F;
+ itemRenderer.zLevel = 300.0F;
+ this.fontRenderer.drawString(var18, this.guiLeft + this.xSize / 2 - var17 / 2, this.guiTop - 38, -1);
+ this.zLevel = 0.0F;
+ itemRenderer.zLevel = 0.0F;
+ }
+
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glDisable(GL11.GL_LIGHTING);
+ }
+
+ protected void drawGuiContainerBackgroundLayer(float var1, int var2, int var3)
+ {
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ RenderHelper.enableGUIStandardItemLighting();
+ CreativeTabs var4 = CreativeTabs.creativeTabArray[selectedTabIndex];
+ CreativeTabs[] var5 = CreativeTabs.creativeTabArray;
+ int var6 = var5.length;
+ int var8 = tabPage * 10;
+ var6 = Math.min(var5.length, (tabPage + 1) * 10 + 2);
+
+ if (tabPage != 0)
+ {
+ var8 += 2;
+ }
+
+ int var7;
+
+ for (var7 = var8; var7 < var6; ++var7)
+ {
+ CreativeTabs var9 = var5[var7];
+ this.mc.renderEngine.bindTexture("/gui/allitems.png");
+
+ if (var9 != null && var9.getTabIndex() != selectedTabIndex)
+ {
+ this.renderCreativeTab(var9);
+ }
+ }
+
+ if (tabPage != 0)
+ {
+ if (var4 != CreativeTabs.tabAllSearch)
+ {
+ this.mc.renderEngine.bindTexture("/gui/allitems.png");
+ this.renderCreativeTab(CreativeTabs.tabAllSearch);
+ }
+
+ if (var4 != CreativeTabs.tabInventory)
+ {
+ this.mc.renderEngine.bindTexture("/gui/allitems.png");
+ this.renderCreativeTab(CreativeTabs.tabInventory);
+ }
+ }
+
+ this.mc.renderEngine.bindTexture("/net/aetherteam/aether/client/sprites/gui/creative/" + var4.getBackgroundImageName());
+ this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
+ this.searchField.drawTextBox();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ int var10 = this.guiLeft + 175;
+ var6 = this.guiTop + 18;
+ var7 = var6 + 112;
+ this.mc.renderEngine.bindTexture("/gui/allitems.png");
+
+ if (var4.shouldHidePlayerInventory())
+ {
+ this.drawTexturedModalRect(var10, var6 + (int) ((float) (var7 - var6 - 17) * this.currentScroll), 232 + (this.needsScrollBars() ? 0 : 12), 0, 12, 15);
+ }
+
+ if (var4 != null && var4.getTabPage() == tabPage || var4 == CreativeTabs.tabAllSearch || var4 == CreativeTabs.tabInventory)
+ {
+ this.renderCreativeTab(var4);
+
+ if (var4 == CreativeTabs.tabInventory)
+ {
+ GuiInventory.drawPlayerOnGui(this.mc, this.guiLeft + 25, this.guiTop + 46, 20, (float) (this.guiLeft + 43 - var2), (float) (this.guiTop + 45 - 30 - var3));
+ }
+ }
+ }
+
+ protected boolean func_74232_a(CreativeTabs var1, int var2, int var3)
+ {
+ if (var1.getTabPage() != tabPage && var1 != CreativeTabs.tabAllSearch && var1 != CreativeTabs.tabInventory)
+ {
+ return false;
+ } else
+ {
+ int var4 = var1.getTabColumn();
+ int var5 = 28 * var4;
+ byte var6 = 0;
+
+ if (var4 == 5)
+ {
+ var5 = this.xSize - 28 + 2;
+ } else if (var4 > 0)
+ {
+ var5 += var4;
+ }
+
+ int var7;
+
+ if (var1.isTabInFirstRow())
+ {
+ var7 = var6 - 32;
+ } else
+ {
+ var7 = var6 + this.ySize;
+ }
+
+ return var2 >= var5 && var2 <= var5 + 28 && var3 >= var7 && var3 <= var7 + 32;
+ }
+ }
+
+ protected boolean renderCreativeInventoryHoveringText(CreativeTabs var1, int var2, int var3)
+ {
+ int var4 = var1.getTabColumn();
+ int var5 = 28 * var4;
+ byte var6 = 0;
+
+ if (var4 == 5)
+ {
+ var5 = this.xSize - 28 + 2;
+ } else if (var4 > 0)
+ {
+ var5 += var4;
+ }
+
+ int var7;
+
+ if (var1.isTabInFirstRow())
+ {
+ var7 = var6 - 32;
+ } else
+ {
+ var7 = var6 + this.ySize;
+ }
+
+ if (this.isPointInRegion(var5 + 3, var7 + 3, 23, 27, var2, var3))
+ {
+ this.drawCreativeTabHoveringText(var1.getTranslatedTabLabel(), var2, var3);
+ return true;
+ } else
+ {
+ return false;
+ }
+ }
+
+ protected void renderCreativeTab(CreativeTabs var1)
+ {
+ boolean var2 = var1.getTabIndex() == selectedTabIndex;
+ boolean var3 = var1.isTabInFirstRow();
+ int var4 = var1.getTabColumn();
+ int var5 = var4 * 28;
+ int var6 = 0;
+ int var7 = this.guiLeft + 28 * var4;
+ int var8 = this.guiTop;
+ byte var9 = 32;
+
+ if (var2)
+ {
+ var6 += 32;
+ }
+
+ if (var4 == 5)
+ {
+ var7 = this.guiLeft + this.xSize - 28;
+ } else if (var4 > 0)
+ {
+ var7 += var4;
+ }
+
+ if (var3)
+ {
+ var8 -= 28;
+ } else
+ {
+ var6 += 64;
+ var8 += this.ySize - 4;
+ }
+
+ GL11.glDisable(GL11.GL_LIGHTING);
+ this.drawTexturedModalRect(var7, var8, var5, var6, 28, var9);
+ this.zLevel = 100.0F;
+ itemRenderer.zLevel = 100.0F;
+ var7 += 6;
+ var8 += 8 + (var3 ? 1 : -1);
+ GL11.glEnable(GL11.GL_LIGHTING);
+ GL11.glEnable(GL12.GL_RESCALE_NORMAL);
+ ItemStack var10 = var1.getIconItemStack();
+ itemRenderer.renderItemAndEffectIntoGUI(this.fontRenderer, this.mc.renderEngine, var10, var7, var8);
+ itemRenderer.renderItemOverlayIntoGUI(this.fontRenderer, this.mc.renderEngine, var10, var7, var8);
+ GL11.glDisable(GL11.GL_LIGHTING);
+ itemRenderer.zLevel = 0.0F;
+ this.zLevel = 0.0F;
+ }
+
+ /**
+ * Fired when a control is clicked. This is the equivalent of ActionListener.actionPerformed(ActionEvent e).
+ */
+ protected void actionPerformed(GuiButton var1)
+ {
+ if (var1.id == 0)
+ {
+ this.mc.displayGuiScreen(new GuiAchievements(this.mc.statFileWriter));
+ }
+
+ if (var1.id == 1)
+ {
+ this.mc.displayGuiScreen(new GuiStats(this, this.mc.statFileWriter));
+ }
+
+ if (var1.id == 101)
+ {
+ tabPage = Math.max(tabPage - 1, 0);
+ } else if (var1.id == 102)
+ {
+ tabPage = Math.min(tabPage + 1, this.maxPages);
+ }
+
+ if (var1.id == 5)
+ {
+ int var2 = AetherGuiHandler.realLoreID;
+ this.mc.displayGuiScreen(new GuiLore(this.mc.thePlayer.inventory, this.mc.thePlayer, 0));
+ }
+
+ if (var1.id == 6)
+ {
+ this.mc.displayGuiScreen(new GuiMenu(this.player, this));
+ }
+
+ if (var1.id == 7)
+ {
+ this.mc.displayGuiScreen(new GuiDonatorMenu(this.player, this));
+ }
+ }
+
+ public int func_74230_h()
+ {
+ return selectedTabIndex;
+ }
+
+ public static InventoryBasic getInventory()
+ {
+ return inventory;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/gui/GuiAetherIngame.java b/src/main/java/net/aetherteam/aether/client/gui/GuiAetherIngame.java
new file mode 100644
index 0000000..8192f07
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/GuiAetherIngame.java
@@ -0,0 +1,50 @@
+package net.aetherteam.aether.client.gui;
+
+import java.util.Random;
+
+import net.aetherteam.aether.notifications.client.ClientNotificationHandler;
+import net.aetherteam.aether.overlays.AetherOverlays;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.Gui;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraftforge.client.event.RenderGameOverlayEvent;
+import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
+import net.minecraftforge.event.EventPriority;
+import net.minecraftforge.event.ForgeSubscribe;
+
+public class GuiAetherIngame extends Gui
+{
+ private Minecraft mc;
+ private Random rand = new Random();
+
+ public GuiAetherIngame(Minecraft mc)
+ {
+ this.mc = mc;
+ }
+
+ @ForgeSubscribe(priority = EventPriority.NORMAL)
+ public void onRenderGui(RenderGameOverlayEvent event)
+ {
+ if ((event.isCancelable()) || (event.type != RenderGameOverlayEvent.ElementType.TEXT))
+ {
+ return;
+ }
+ ClientNotificationHandler.updateNotifications();
+ AetherOverlays.renderDungeonQueue(this.mc);
+ AetherOverlays.renderDungeonTimer(this.mc);
+ AetherOverlays.renderMountHealth(this.mc);
+ AetherOverlays.renderBossHP(this.mc);
+ AetherOverlays.renderCooldown(this.mc);
+ AetherOverlays.renderHearts(this.mc, this.rand);
+ AetherOverlays.renderJumps(this.mc);
+ AetherOverlays.renderIronBubbles(this.mc, this.rand);
+ AetherOverlays.renderCoinbar(this.mc);
+ AetherOverlays.renderPartyHUD(this.mc);
+ this.mc.renderEngine.resetBoundTexture();
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.GuiAetherIngame
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/GuiAltar.java b/src/main/java/net/aetherteam/aether/client/gui/GuiAltar.java
new file mode 100644
index 0000000..23a3f0d
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/GuiAltar.java
@@ -0,0 +1,50 @@
+package net.aetherteam.aether.client.gui;
+
+import net.aetherteam.aether.containers.ContainerAltar;
+import net.aetherteam.aether.tile_entities.TileEntityAltar;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.inventory.GuiContainer;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.entity.player.InventoryPlayer;
+import org.lwjgl.opengl.GL11;
+
+public class GuiAltar extends GuiContainer
+{
+ private TileEntityAltar altarInventory;
+
+ public GuiAltar(InventoryPlayer inventoryplayer, TileEntityAltar tileentityaltar)
+ {
+ super(new ContainerAltar(inventoryplayer, tileentityaltar));
+ this.altarInventory = tileentityaltar;
+ }
+
+ protected void drawGuiContainerForegroundLayer()
+ {
+ this.fontRenderer.drawString("Altar", 60, 6, 4210752);
+ this.fontRenderer.drawString("Inventory", 8, this.ySize - 96 + 2, 4210752);
+ }
+
+ protected void drawGuiContainerBackgroundLayer(float f, int ia, int ib)
+ {
+ int i = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/enchanter.png");
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+
+ int j = (this.width - this.xSize) / 2;
+ int k = (this.height - this.ySize) / 2;
+ drawTexturedModalRect(j, k, 0, 0, this.xSize, this.ySize);
+ if (this.altarInventory.isBurning())
+ {
+ int l = this.altarInventory.getBurnTimeRemainingScaled(12);
+ drawTexturedModalRect(j + 57, k + 47 - l, 176, 12 - l, 14, l + 2);
+ }
+ int i1 = this.altarInventory.getCookProgressScaled(24);
+ drawTexturedModalRect(j + 79, k + 35, 176, 14, i1 + 1, 16);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.GuiAltar
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/GuiContainerAether.java b/src/main/java/net/aetherteam/aether/client/gui/GuiContainerAether.java
new file mode 100644
index 0000000..6c514c4
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/GuiContainerAether.java
@@ -0,0 +1,788 @@
+package net.aetherteam.aether.client.gui;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.entity.EntityClientPlayerMP;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.multiplayer.PlayerControllerMP;
+import net.minecraft.client.renderer.OpenGlHelper;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.renderer.RenderHelper;
+import net.minecraft.client.renderer.entity.RenderItem;
+import net.minecraft.client.settings.GameSettings;
+import net.minecraft.client.settings.KeyBinding;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.inventory.Container;
+import net.minecraft.inventory.Slot;
+import net.minecraft.item.EnumRarity;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.Icon;
+import net.minecraft.util.MathHelper;
+import org.lwjgl.input.Keyboard;
+import org.lwjgl.opengl.GL11;
+
+@SideOnly(Side.CLIENT)
+public abstract class GuiContainerAether extends GuiScreen
+{
+ protected static RenderItem itemRenderer = new RenderItem();
+
+ protected int xSize = 176;
+
+ protected int ySize = 166;
+ public Container inventorySlots;
+ protected int guiLeft;
+ protected int guiTop;
+ private Slot theSlot;
+ private Slot clickedSlot = null;
+
+ private boolean isRightMouseClick = false;
+
+ private ItemStack draggedStack = null;
+ private int field_85049_r = 0;
+ private int field_85048_s = 0;
+ private Slot returningStackDestSlot = null;
+ private long returningStackTime = 0L;
+
+ private ItemStack returningStack = null;
+ private Slot field_92033_y = null;
+ private long field_92032_z = 0L;
+ protected final Set field_94077_p = new HashSet();
+ protected boolean field_94076_q;
+ private int field_94071_C = 0;
+ private int field_94067_D = 0;
+ private boolean field_94068_E = false;
+ private int field_94069_F;
+ private long field_94070_G = 0L;
+ private Slot field_94072_H = null;
+ private int field_94073_I = 0;
+ private boolean field_94074_J;
+ private ItemStack field_94075_K = null;
+
+ public GuiContainerAether(Container par1Container)
+ {
+ this.inventorySlots = par1Container;
+ this.field_94068_E = true;
+ }
+
+ public void initGui()
+ {
+ super.initGui();
+ this.mc.thePlayer.openContainer = this.inventorySlots;
+ this.guiLeft = ((this.width - this.xSize) / 2);
+ this.guiTop = ((this.height - this.ySize) / 2);
+ }
+
+ public void drawScreen(int par1, int par2, float par3)
+ {
+ drawDefaultBackground();
+ int k = this.guiLeft;
+ int l = this.guiTop;
+ drawGuiContainerBackgroundLayer(par3, par1, par2);
+ GL11.glDisable(32826);
+ RenderHelper.disableStandardItemLighting();
+ GL11.glDisable(2896);
+ GL11.glDisable(2929);
+ super.drawScreen(par1, par2, par3);
+ RenderHelper.enableGUIStandardItemLighting();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(k, l, 0.0F);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glEnable(32826);
+ this.theSlot = null;
+ short short1 = 240;
+ short short2 = 240;
+ OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, short1 / 1.0F, short2 / 1.0F);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+
+ for (int j1 = 0; j1 < this.inventorySlots.inventorySlots.size(); j1++)
+ {
+ Slot slot = (Slot) this.inventorySlots.inventorySlots.get(j1);
+ drawSlotInventory(slot);
+
+ if (isMouseOverSlot(slot, par1, par2))
+ {
+ this.theSlot = slot;
+ GL11.glDisable(2896);
+ GL11.glDisable(2929);
+ int k1 = slot.xDisplayPosition;
+ int i1 = slot.yDisplayPosition;
+ drawGradientRect(k1, i1, k1 + 16, i1 + 16, -2130706433, -2130706433);
+ GL11.glEnable(2896);
+ GL11.glEnable(2929);
+ }
+ }
+
+ drawGuiContainerForegroundLayer(par1, par2);
+ InventoryPlayer inventoryplayer = this.mc.thePlayer.inventory;
+ ItemStack itemstack = this.draggedStack == null ? inventoryplayer.getItemStack() : this.draggedStack;
+
+ if (itemstack != null)
+ {
+ byte b0 = 8;
+ int i1 = this.draggedStack == null ? 8 : 16;
+ String s = null;
+
+ if ((this.draggedStack != null) && (this.isRightMouseClick))
+ {
+ itemstack = itemstack.copy();
+ itemstack.stackSize = MathHelper.ceiling_float_int(itemstack.stackSize / 2.0F);
+ } else if ((this.field_94076_q) && (this.field_94077_p.size() > 1))
+ {
+ itemstack = itemstack.copy();
+ itemstack.stackSize = this.field_94069_F;
+
+ if (itemstack.stackSize == 0)
+ {
+ s = "" + EnumChatFormatting.YELLOW + "0";
+ }
+ }
+
+ drawItemStack(itemstack, par1 - k - b0, par2 - l - i1, s);
+ }
+
+ if (this.returningStack != null)
+ {
+ float f1 = (float) (Minecraft.getSystemTime() - this.returningStackTime) / 100.0F;
+
+ if (f1 >= 1.0F)
+ {
+ f1 = 1.0F;
+ this.returningStack = null;
+ }
+
+ int i1 = this.returningStackDestSlot.xDisplayPosition - this.field_85049_r;
+ int l1 = this.returningStackDestSlot.yDisplayPosition - this.field_85048_s;
+ int i2 = this.field_85049_r + (int) (i1 * f1);
+ int j2 = this.field_85048_s + (int) (l1 * f1);
+ drawItemStack(this.returningStack, i2, j2, (String) null);
+ }
+
+ GL11.glPopMatrix();
+
+ if ((inventoryplayer.getItemStack() == null) && (this.theSlot != null) && (this.theSlot.getHasStack()))
+ {
+ ItemStack itemstack1 = this.theSlot.getStack();
+ drawItemStackTooltip(itemstack1, par1, par2);
+ }
+
+ GL11.glEnable(2896);
+ GL11.glEnable(2929);
+ RenderHelper.enableStandardItemLighting();
+ }
+
+ private void drawItemStack(ItemStack par1ItemStack, int par2, int par3, String par4Str)
+ {
+ GL11.glTranslatef(0.0F, 0.0F, 32.0F);
+ this.zLevel = 200.0F;
+ itemRenderer.zLevel = 200.0F;
+ itemRenderer.renderItemOverlayIntoGUI(this.fontRenderer, this.mc.renderEngine, par1ItemStack, par2, par3, par4Str);
+ itemRenderer.renderItemIntoGUI(this.fontRenderer, this.mc.renderEngine, par1ItemStack, par2, par3 - (this.draggedStack == null ? 0 : 8));
+ this.zLevel = 0.0F;
+ itemRenderer.zLevel = 0.0F;
+ }
+
+ protected void drawItemStackTooltip(ItemStack par1ItemStack, int par2, int par3)
+ {
+ List list = par1ItemStack.getTooltip(this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips);
+
+ for (int k = 0; k < list.size(); k++)
+ {
+ if (k == 0)
+ {
+ list.set(k, "§" + Integer.toHexString(par1ItemStack.getRarity().rarityColor) + (String) list.get(k));
+ } else
+ {
+ list.set(k, EnumChatFormatting.GRAY + (String) list.get(k));
+ }
+ }
+
+ func_102021_a(list, par2, par3);
+ }
+
+ protected void drawCreativeTabHoveringText(String par1Str, int par2, int par3)
+ {
+ func_102021_a(Arrays.asList(new String[]{par1Str}), par2, par3);
+ }
+
+ protected void func_102021_a(List par1List, int par2, int par3)
+ {
+ if (!par1List.isEmpty())
+ {
+ GL11.glDisable(32826);
+ RenderHelper.disableStandardItemLighting();
+ GL11.glDisable(2896);
+ GL11.glDisable(2929);
+ int k = 0;
+ Iterator iterator = par1List.iterator();
+
+ while (iterator.hasNext())
+ {
+ String s = (String) iterator.next();
+ int l = this.fontRenderer.getStringWidth(s);
+
+ if (l > k)
+ {
+ k = l;
+ }
+ }
+
+ int i1 = par2 + 12;
+ int j1 = par3 - 12;
+ int k1 = 8;
+
+ if (par1List.size() > 1)
+ {
+ k1 += 2 + (par1List.size() - 1) * 10;
+ }
+
+ if (i1 + k > this.width)
+ {
+ i1 -= 28 + k;
+ }
+
+ if (j1 + k1 + 6 > this.height)
+ {
+ j1 = this.height - k1 - 6;
+ }
+
+ this.zLevel = 300.0F;
+ itemRenderer.zLevel = 300.0F;
+ int l1 = -267386864;
+ drawGradientRect(i1 - 3, j1 - 4, i1 + k + 3, j1 - 3, l1, l1);
+ drawGradientRect(i1 - 3, j1 + k1 + 3, i1 + k + 3, j1 + k1 + 4, l1, l1);
+ drawGradientRect(i1 - 3, j1 - 3, i1 + k + 3, j1 + k1 + 3, l1, l1);
+ drawGradientRect(i1 - 4, j1 - 3, i1 - 3, j1 + k1 + 3, l1, l1);
+ drawGradientRect(i1 + k + 3, j1 - 3, i1 + k + 4, j1 + k1 + 3, l1, l1);
+ int i2 = 1347420415;
+ int j2 = (i2 & 0xFEFEFE) >> 1 | i2 & 0xFF000000;
+ drawGradientRect(i1 - 3, j1 - 3 + 1, i1 - 3 + 1, j1 + k1 + 3 - 1, i2, j2);
+ drawGradientRect(i1 + k + 2, j1 - 3 + 1, i1 + k + 3, j1 + k1 + 3 - 1, i2, j2);
+ drawGradientRect(i1 - 3, j1 - 3, i1 + k + 3, j1 - 3 + 1, i2, i2);
+ drawGradientRect(i1 - 3, j1 + k1 + 2, i1 + k + 3, j1 + k1 + 3, j2, j2);
+
+ for (int k2 = 0; k2 < par1List.size(); k2++)
+ {
+ String s1 = (String) par1List.get(k2);
+ this.fontRenderer.drawStringWithShadow(s1, i1, j1, -1);
+
+ if (k2 == 0)
+ {
+ j1 += 2;
+ }
+
+ j1 += 10;
+ }
+
+ this.zLevel = 0.0F;
+ itemRenderer.zLevel = 0.0F;
+ GL11.glEnable(2896);
+ GL11.glEnable(2929);
+ RenderHelper.enableStandardItemLighting();
+ GL11.glEnable(32826);
+ }
+ }
+
+ protected void drawGuiContainerForegroundLayer(int par1, int par2)
+ {
+ }
+
+ protected abstract void drawGuiContainerBackgroundLayer(float paramFloat, int paramInt1, int paramInt2);
+
+ protected void drawSlotInventory(Slot par1Slot)
+ {
+ int i = par1Slot.xDisplayPosition;
+ int j = par1Slot.yDisplayPosition;
+ ItemStack itemstack = par1Slot.getStack();
+ boolean flag = false;
+ boolean flag1 = (par1Slot == this.clickedSlot) && (this.draggedStack != null) && (!this.isRightMouseClick);
+ ItemStack itemstack1 = this.mc.thePlayer.inventory.getItemStack();
+ String s = null;
+
+ if ((par1Slot == this.clickedSlot) && (this.draggedStack != null) && (this.isRightMouseClick) && (itemstack != null))
+ {
+ itemstack = itemstack.copy();
+ itemstack.stackSize /= 2;
+ } else if ((this.field_94076_q) && (this.field_94077_p.contains(par1Slot)) && (itemstack1 != null))
+ {
+ if (this.field_94077_p.size() == 1)
+ {
+ return;
+ }
+
+ if ((Container.func_94527_a(par1Slot, itemstack1, true)) && (this.inventorySlots.func_94531_b(par1Slot)))
+ {
+ itemstack = itemstack1.copy();
+ flag = true;
+ Container.func_94525_a(this.field_94077_p, this.field_94071_C, itemstack, par1Slot.getStack() == null ? 0 : par1Slot.getStack().stackSize);
+
+ if (itemstack.stackSize > itemstack.getMaxStackSize())
+ {
+ s = EnumChatFormatting.YELLOW + "" + itemstack.getMaxStackSize();
+ itemstack.stackSize = itemstack.getMaxStackSize();
+ }
+
+ if (itemstack.stackSize > par1Slot.getSlotStackLimit())
+ {
+ s = EnumChatFormatting.YELLOW + "" + par1Slot.getSlotStackLimit();
+ itemstack.stackSize = par1Slot.getSlotStackLimit();
+ }
+ } else
+ {
+ this.field_94077_p.remove(par1Slot);
+ func_94066_g();
+ }
+ }
+
+ this.zLevel = 100.0F;
+ itemRenderer.zLevel = 100.0F;
+
+ if (itemstack == null)
+ {
+ Icon icon = par1Slot.getBackgroundIconIndex();
+
+ if (icon != null)
+ {
+ GL11.glDisable(2896);
+ this.mc.renderEngine.bindTexture("/gui/items.png");
+ drawTexturedModelRectFromIcon(i, j, icon, 16, 16);
+ GL11.glEnable(2896);
+ flag1 = true;
+ }
+ }
+
+ if (!flag1)
+ {
+ if (flag)
+ {
+ drawRect(i, j, i + 16, j + 16, -2130706433);
+ }
+
+ GL11.glEnable(2929);
+ itemRenderer.renderItemAndEffectIntoGUI(this.fontRenderer, this.mc.renderEngine, itemstack, i, j);
+ itemRenderer.renderItemOverlayIntoGUI(this.fontRenderer, this.mc.renderEngine, itemstack, i, j, s);
+ }
+
+ itemRenderer.zLevel = 0.0F;
+ this.zLevel = 0.0F;
+ }
+
+ private void func_94066_g()
+ {
+ ItemStack itemstack = this.mc.thePlayer.inventory.getItemStack();
+
+ if ((itemstack != null) && (this.field_94076_q))
+ {
+ this.field_94069_F = itemstack.stackSize;
+ ItemStack itemstack1;
+ int i;
+ for (Iterator iterator = this.field_94077_p.iterator(); iterator.hasNext(); this.field_94069_F -= itemstack1.stackSize - i)
+ {
+ Slot slot = (Slot) iterator.next();
+ itemstack1 = itemstack.copy();
+ i = slot.getStack() == null ? 0 : slot.getStack().stackSize;
+ Container.func_94525_a(this.field_94077_p, this.field_94071_C, itemstack1, i);
+
+ if (itemstack1.stackSize > itemstack1.getMaxStackSize())
+ {
+ itemstack1.stackSize = itemstack1.getMaxStackSize();
+ }
+
+ if (itemstack1.stackSize > slot.getSlotStackLimit())
+ {
+ itemstack1.stackSize = slot.getSlotStackLimit();
+ }
+ }
+ }
+ }
+
+ private Slot getSlotAtPosition(int par1, int par2)
+ {
+ for (int k = 0; k < this.inventorySlots.inventorySlots.size(); k++)
+ {
+ Slot slot = (Slot) this.inventorySlots.inventorySlots.get(k);
+
+ if (isMouseOverSlot(slot, par1, par2))
+ {
+ return slot;
+ }
+ }
+
+ return null;
+ }
+
+ protected void mouseClicked(int par1, int par2, int par3)
+ {
+ super.mouseClicked(par1, par2, par3);
+ boolean flag = par3 == this.mc.gameSettings.keyBindPickBlock.keyCode + 100;
+ Slot slot = getSlotAtPosition(par1, par2);
+ long l = Minecraft.getSystemTime();
+ this.field_94074_J = ((this.field_94072_H == slot) && (l - this.field_94070_G < 250L) && (this.field_94073_I == par3));
+ this.field_94068_E = false;
+
+ if ((par3 == 0) || (par3 == 1) || (flag))
+ {
+ int i1 = this.guiLeft;
+ int j1 = this.guiTop;
+ boolean flag1 = (par1 < i1) || (par2 < j1) || (par1 >= i1 + this.xSize) || (par2 >= j1 + this.ySize);
+ int k1 = -1;
+
+ if (slot != null)
+ {
+ k1 = slot.slotNumber;
+ }
+
+ if (flag1)
+ {
+ k1 = -999;
+ }
+
+ if ((this.mc.gameSettings.touchscreen) && (flag1) && (this.mc.thePlayer.inventory.getItemStack() == null))
+ {
+ this.mc.displayGuiScreen((GuiScreen) null);
+ return;
+ }
+
+ if (k1 != -1)
+ {
+ if (this.mc.gameSettings.touchscreen)
+ {
+ if ((slot != null) && (slot.getHasStack()))
+ {
+ this.clickedSlot = slot;
+ this.draggedStack = null;
+ this.isRightMouseClick = (par3 == 1);
+ } else
+ {
+ this.clickedSlot = null;
+ }
+ } else if (!this.field_94076_q)
+ {
+ if (this.mc.thePlayer.inventory.getItemStack() == null)
+ {
+ if (par3 == this.mc.gameSettings.keyBindPickBlock.keyCode + 100)
+ {
+ handleMouseClick(slot, k1, par3, 3);
+ } else
+ {
+ boolean flag2 = (k1 != -999) && ((Keyboard.isKeyDown(42)) || (Keyboard.isKeyDown(54)));
+ byte b0 = 0;
+
+ if (flag2)
+ {
+ this.field_94075_K = ((slot != null) && (slot.getHasStack()) ? slot.getStack() : null);
+ b0 = 1;
+ } else if (k1 == -999)
+ {
+ b0 = 4;
+ }
+
+ handleMouseClick(slot, k1, par3, b0);
+ }
+
+ this.field_94068_E = true;
+ } else
+ {
+ this.field_94076_q = true;
+ this.field_94067_D = par3;
+ this.field_94077_p.clear();
+
+ if (par3 == 0)
+ {
+ this.field_94071_C = 0;
+ } else if (par3 == 1)
+ {
+ this.field_94071_C = 1;
+ }
+ }
+ }
+ }
+ }
+
+ this.field_94072_H = slot;
+ this.field_94070_G = l;
+ this.field_94073_I = par3;
+ }
+
+ protected void func_85041_a(int par1, int par2, int par3, long par4)
+ {
+ Slot slot = getSlotAtPosition(par1, par2);
+ ItemStack itemstack = this.mc.thePlayer.inventory.getItemStack();
+
+ if ((this.clickedSlot != null) && (this.mc.gameSettings.touchscreen))
+ {
+ if ((par3 == 0) || (par3 == 1))
+ {
+ if (this.draggedStack == null)
+ {
+ if (slot != this.clickedSlot)
+ {
+ this.draggedStack = this.clickedSlot.getStack().copy();
+ }
+ } else if ((this.draggedStack.stackSize > 1) && (slot != null) && (Container.func_94527_a(slot, this.draggedStack, false)))
+ {
+ long i1 = Minecraft.getSystemTime();
+
+ if (this.field_92033_y == slot)
+ {
+ if (i1 - this.field_92032_z > 500L)
+ {
+ handleMouseClick(this.clickedSlot, this.clickedSlot.slotNumber, 0, 0);
+ handleMouseClick(slot, slot.slotNumber, 1, 0);
+ handleMouseClick(this.clickedSlot, this.clickedSlot.slotNumber, 0, 0);
+ this.field_92032_z = (i1 + 750L);
+ this.draggedStack.stackSize -= 1;
+ }
+ } else
+ {
+ this.field_92033_y = slot;
+ this.field_92032_z = i1;
+ }
+ }
+ }
+ } else if ((this.field_94076_q) && (slot != null) && (itemstack != null) && (itemstack.stackSize > this.field_94077_p.size()) && (Container.func_94527_a(slot, itemstack, true)) && (slot.isItemValid(itemstack)) && (this.inventorySlots.func_94531_b(slot)))
+ {
+ this.field_94077_p.add(slot);
+ func_94066_g();
+ }
+ }
+
+ protected void mouseMovedOrUp(int par1, int par2, int par3)
+ {
+ Slot slot = getSlotAtPosition(par1, par2);
+ int l = this.guiLeft;
+ int i1 = this.guiTop;
+ boolean flag = (par1 < l) || (par2 < i1) || (par1 >= l + this.xSize) || (par2 >= i1 + this.ySize);
+ int j1 = -1;
+
+ if (slot != null)
+ {
+ j1 = slot.slotNumber;
+ }
+
+ if (flag)
+ {
+ j1 = -999;
+ }
+
+ if ((this.field_94074_J) && (slot != null) && (par3 == 0) && (this.inventorySlots.func_94530_a((ItemStack) null, slot)))
+ {
+ if (isShiftKeyDown())
+ {
+ if ((slot != null) && (slot.inventory != null) && (this.field_94075_K != null))
+ {
+ Iterator iterator = this.inventorySlots.inventorySlots.iterator();
+
+ while (iterator.hasNext())
+ {
+ Slot slot1 = (Slot) iterator.next();
+
+ if ((slot1 != null) && (slot1.canTakeStack(this.mc.thePlayer)) && (slot1.getHasStack()) && (slot1.inventory == slot.inventory) && (Container.func_94527_a(slot1, this.field_94075_K, true)))
+ {
+ handleMouseClick(slot1, slot1.slotNumber, par3, 1);
+ }
+ }
+ }
+ } else
+ {
+ handleMouseClick(slot, j1, par3, 6);
+ }
+
+ this.field_94074_J = false;
+ this.field_94070_G = 0L;
+ } else
+ {
+ if ((this.field_94076_q) && (this.field_94067_D != par3))
+ {
+ this.field_94076_q = false;
+ this.field_94077_p.clear();
+ this.field_94068_E = true;
+ return;
+ }
+
+ if (this.field_94068_E)
+ {
+ this.field_94068_E = false;
+ return;
+ }
+
+ if ((this.clickedSlot != null) && (this.mc.gameSettings.touchscreen))
+ {
+ if ((par3 == 0) || (par3 == 1))
+ {
+ if ((this.draggedStack == null) && (slot != this.clickedSlot))
+ {
+ this.draggedStack = this.clickedSlot.getStack();
+ }
+
+ boolean flag1 = Container.func_94527_a(slot, this.draggedStack, false);
+
+ if ((j1 != -1) && (this.draggedStack != null) && (flag1))
+ {
+ handleMouseClick(this.clickedSlot, this.clickedSlot.slotNumber, par3, 0);
+ handleMouseClick(slot, j1, 0, 0);
+
+ if (this.mc.thePlayer.inventory.getItemStack() != null)
+ {
+ handleMouseClick(this.clickedSlot, this.clickedSlot.slotNumber, par3, 0);
+ this.field_85049_r = (par1 - l);
+ this.field_85048_s = (par2 - i1);
+ this.returningStackDestSlot = this.clickedSlot;
+ this.returningStack = this.draggedStack;
+ this.returningStackTime = Minecraft.getSystemTime();
+ } else
+ {
+ this.returningStack = null;
+ }
+ } else if (this.draggedStack != null)
+ {
+ this.field_85049_r = (par1 - l);
+ this.field_85048_s = (par2 - i1);
+ this.returningStackDestSlot = this.clickedSlot;
+ this.returningStack = this.draggedStack;
+ this.returningStackTime = Minecraft.getSystemTime();
+ }
+
+ this.draggedStack = null;
+ this.clickedSlot = null;
+ }
+ } else if ((this.field_94076_q) && (!this.field_94077_p.isEmpty()))
+ {
+ handleMouseClick((Slot) null, -999, Container.func_94534_d(0, this.field_94071_C), 5);
+ Iterator iterator = this.field_94077_p.iterator();
+
+ while (iterator.hasNext())
+ {
+ Slot slot1 = (Slot) iterator.next();
+ handleMouseClick(slot1, slot1.slotNumber, Container.func_94534_d(1, this.field_94071_C), 5);
+ }
+
+ handleMouseClick((Slot) null, -999, Container.func_94534_d(2, this.field_94071_C), 5);
+ } else if (this.mc.thePlayer.inventory.getItemStack() != null)
+ {
+ if (par3 == this.mc.gameSettings.keyBindPickBlock.keyCode + 100)
+ {
+ handleMouseClick(slot, j1, par3, 3);
+ } else
+ {
+ boolean flag1 = (j1 != -999) && ((Keyboard.isKeyDown(42)) || (Keyboard.isKeyDown(54)));
+
+ if (flag1)
+ {
+ this.field_94075_K = ((slot != null) && (slot.getHasStack()) ? slot.getStack() : null);
+ }
+
+ handleMouseClick(slot, j1, par3, flag1 ? 1 : 0);
+ }
+ }
+ }
+
+ if (this.mc.thePlayer.inventory.getItemStack() == null)
+ {
+ this.field_94070_G = 0L;
+ }
+
+ this.field_94076_q = false;
+ }
+
+ private boolean isMouseOverSlot(Slot par1Slot, int par2, int par3)
+ {
+ return isPointInRegion(par1Slot.xDisplayPosition, par1Slot.yDisplayPosition, 16, 16, par2, par3);
+ }
+
+ protected boolean isPointInRegion(int par1, int par2, int par3, int par4, int par5, int par6)
+ {
+ int k1 = this.guiLeft;
+ int l1 = this.guiTop;
+ par5 -= k1;
+ par6 -= l1;
+ return (par5 >= par1 - 1) && (par5 < par1 + par3 + 1) && (par6 >= par2 - 1) && (par6 < par2 + par4 + 1);
+ }
+
+ protected void handleMouseClick(Slot par1Slot, int par2, int par3, int par4)
+ {
+ if (par1Slot != null)
+ {
+ par2 = par1Slot.slotNumber;
+ }
+
+ this.mc.playerController.windowClick(this.inventorySlots.windowId, par2, par3, par4, this.mc.thePlayer);
+ }
+
+ protected void keyTyped(char par1, int par2)
+ {
+ if ((par2 == 1) || (par2 == this.mc.gameSettings.keyBindInventory.keyCode))
+ {
+ this.mc.thePlayer.closeScreen();
+ }
+
+ checkHotbarKeys(par2);
+
+ if ((this.theSlot != null) && (this.theSlot.getHasStack()))
+ {
+ if (par2 == this.mc.gameSettings.keyBindPickBlock.keyCode)
+ {
+ handleMouseClick(this.theSlot, this.theSlot.slotNumber, 0, 3);
+ } else if (par2 == this.mc.gameSettings.keyBindDrop.keyCode)
+ {
+ handleMouseClick(this.theSlot, this.theSlot.slotNumber, isCtrlKeyDown() ? 1 : 0, 4);
+ }
+ }
+ }
+
+ protected boolean checkHotbarKeys(int par1)
+ {
+ if ((this.mc.thePlayer.inventory.getItemStack() == null) && (this.theSlot != null))
+ {
+ for (int j = 0; j < 9; j++)
+ {
+ if (par1 == 2 + j)
+ {
+ handleMouseClick(this.theSlot, this.theSlot.slotNumber, j, 2);
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+
+ public void onGuiClosed()
+ {
+ if (this.mc.thePlayer != null)
+ {
+ this.inventorySlots.onCraftGuiClosed(this.mc.thePlayer);
+ }
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ public void updateScreen()
+ {
+ super.updateScreen();
+
+ if ((!this.mc.thePlayer.isEntityAlive()) || (this.mc.thePlayer.isDead))
+ {
+ this.mc.thePlayer.closeScreen();
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.GuiContainerAether
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/GuiEnchanter.java b/src/main/java/net/aetherteam/aether/client/gui/GuiEnchanter.java
new file mode 100644
index 0000000..704b93c
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/GuiEnchanter.java
@@ -0,0 +1,49 @@
+package net.aetherteam.aether.client.gui;
+
+import net.aetherteam.aether.containers.ContainerEnchanter;
+import net.aetherteam.aether.tile_entities.TileEntityEnchanter;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.inventory.GuiContainer;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.entity.player.InventoryPlayer;
+import org.lwjgl.opengl.GL11;
+
+public class GuiEnchanter extends GuiContainer
+{
+ private TileEntityEnchanter enchanterInventory;
+
+ public GuiEnchanter(InventoryPlayer inventoryplayer, TileEntityEnchanter tileentityEnchanter)
+ {
+ super(new ContainerEnchanter(inventoryplayer, tileentityEnchanter));
+ this.enchanterInventory = tileentityEnchanter;
+ }
+
+ protected void drawGuiContainerForegroundLayer()
+ {
+ this.fontRenderer.drawString("Altar", 60, 6, 4210752);
+ this.fontRenderer.drawString("Inventory", 8, this.ySize - 96 + 2, 4210752);
+ }
+
+ protected void drawGuiContainerBackgroundLayer(float f, int ia, int ib)
+ {
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.renderEngine.bindTexture("/net/aetherteam/aether/client/sprites/gui/enchanter.png");
+ int j = (this.width - this.xSize) / 2;
+ int k = (this.height - this.ySize) / 2;
+ drawTexturedModalRect(j, k, 0, 0, this.xSize, this.ySize);
+ if (this.enchanterInventory.isBurning())
+ {
+ int l = this.enchanterInventory.getBurnTimeRemainingScaled(12);
+ drawTexturedModalRect(j + 57, k + 47 - l, 176, 12 - l, 14, l + 2);
+ }
+ int i1 = this.enchanterInventory.getCookProgressScaled(24);
+ drawTexturedModalRect(j + 79, k + 35, 176, 14, i1 + 1, 16);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.GuiEnchanter
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/GuiFreezer.java b/src/main/java/net/aetherteam/aether/client/gui/GuiFreezer.java
new file mode 100644
index 0000000..c406111
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/GuiFreezer.java
@@ -0,0 +1,49 @@
+package net.aetherteam.aether.client.gui;
+
+import net.aetherteam.aether.containers.ContainerFreezer;
+import net.aetherteam.aether.tile_entities.TileEntityFreezer;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.inventory.GuiContainer;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.entity.player.InventoryPlayer;
+import org.lwjgl.opengl.GL11;
+
+public class GuiFreezer extends GuiContainer
+{
+ private TileEntityFreezer freezerInventory;
+
+ public GuiFreezer(InventoryPlayer inventoryplayer, TileEntityFreezer tileentityFreezer)
+ {
+ super(new ContainerFreezer(inventoryplayer, tileentityFreezer));
+ this.freezerInventory = tileentityFreezer;
+ }
+
+ protected void drawGuiContainerForegroundLayer()
+ {
+ this.fontRenderer.drawString("Freezer", 60, 6, 4210752);
+ this.fontRenderer.drawString("Inventory", 8, this.ySize - 96 + 2, 4210752);
+ }
+
+ protected void drawGuiContainerBackgroundLayer(float f, int ia, int ib)
+ {
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.renderEngine.bindTexture("/net/aetherteam/aether/client/sprites/gui/enchanter.png");
+ int j = (this.width - this.xSize) / 2;
+ int k = (this.height - this.ySize) / 2;
+ drawTexturedModalRect(j, k, 0, 0, this.xSize, this.ySize);
+ if (this.freezerInventory.isBurning())
+ {
+ int l = this.freezerInventory.getBurnTimeRemainingScaled(12);
+ drawTexturedModalRect(j + 57, k + 47 - l, 176, 12 - l, 14, l + 2);
+ }
+ int i1 = this.freezerInventory.getCookProgressScaled(24);
+ drawTexturedModalRect(j + 79, k + 35, 176, 14, i1 + 1, 16);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.GuiFreezer
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/GuiIncubator.java b/src/main/java/net/aetherteam/aether/client/gui/GuiIncubator.java
new file mode 100644
index 0000000..42eada3
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/GuiIncubator.java
@@ -0,0 +1,49 @@
+package net.aetherteam.aether.client.gui;
+
+import net.aetherteam.aether.containers.ContainerIncubator;
+import net.aetherteam.aether.tile_entities.TileEntityIncubator;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.inventory.GuiContainer;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.entity.player.InventoryPlayer;
+import org.lwjgl.opengl.GL11;
+
+public class GuiIncubator extends GuiContainer
+{
+ private TileEntityIncubator IncubatorInventory;
+
+ public GuiIncubator(InventoryPlayer inventoryplayer, TileEntityIncubator tileentityIncubator)
+ {
+ super(new ContainerIncubator(inventoryplayer, tileentityIncubator));
+ this.IncubatorInventory = tileentityIncubator;
+ }
+
+ protected void drawGuiContainerForegroundLayer()
+ {
+ this.fontRenderer.drawString("Incubator", 60, 6, 4210752);
+ this.fontRenderer.drawString("Inventory", 8, this.ySize - 96 + 2, 4210752);
+ }
+
+ protected void drawGuiContainerBackgroundLayer(float f, int ia, int ib)
+ {
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.renderEngine.bindTexture("/net/aetherteam/aether/client/sprites/gui/incubator.png");
+ int j = (this.width - this.xSize) / 2;
+ int k = (this.height - this.ySize) / 2;
+ drawTexturedModalRect(j, k, 0, 0, this.xSize, this.ySize);
+ if (this.IncubatorInventory.isBurning())
+ {
+ int l = this.IncubatorInventory.getBurnTimeRemainingScaled(12);
+ drawTexturedModalRect(j + 74, k + 47 - l, 176, 12 - l, 14, l + 2);
+ }
+ int i1 = this.IncubatorInventory.getCookProgressScaled(54);
+ drawTexturedModalRect(j + 103, k + 70 - i1, 179, 70 - i1, 10, i1);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.GuiIncubator
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/GuiInventoryAether.java b/src/main/java/net/aetherteam/aether/client/gui/GuiInventoryAether.java
new file mode 100644
index 0000000..fb218e3
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/GuiInventoryAether.java
@@ -0,0 +1,153 @@
+package net.aetherteam.aether.client.gui;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.List;
+
+import net.aetherteam.aether.AetherGuiHandler;
+import net.aetherteam.aether.client.gui.donator.GuiDonatorMenu;
+import net.aetherteam.aether.client.gui.social.GuiMenu;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.achievement.GuiAchievements;
+import net.minecraft.client.gui.achievement.GuiStats;
+import net.minecraft.client.renderer.OpenGlHelper;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.renderer.RenderHelper;
+import net.minecraft.client.renderer.entity.RenderManager;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.stats.AchievementList;
+import net.minecraft.util.StringTranslate;
+import org.lwjgl.opengl.GL11;
+
+@SideOnly(Side.CLIENT)
+public class GuiInventoryAether extends AetherInventoryEffectRenderer
+{
+ private float xSize_lo;
+ private float ySize_lo;
+ private static EntityPlayer player;
+
+ public GuiInventoryAether(EntityPlayer par1EntityPlayer)
+ {
+ super(par1EntityPlayer.inventoryContainer);
+ player = par1EntityPlayer;
+ this.allowUserInput = true;
+ par1EntityPlayer.addStat(AchievementList.openInventory, 1);
+ }
+
+ protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
+ {
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.renderEngine.bindTexture("/net/aetherteam/aether/client/sprites/gui/inventory.png");
+
+ int var5 = this.guiLeft;
+ int var6 = this.guiTop;
+ drawTexturedModalRect(var5, var6, 0, 0, this.xSize, this.ySize + 21);
+
+ func_74223_a(this.mc, var5 + 34, var6 + 75, 30, var5 + 51 - this.xSize_lo, var6 + 75 - 50 - this.ySize_lo);
+
+ StringTranslate string = StringTranslate.getInstance();
+ this.buttonList.clear();
+
+ GuiButton bookOfLore = new GuiButton(2, this.guiLeft + 7, this.guiTop + 162, 72, 20, string.translateKey("Book of Lore"));
+
+ bookOfLore.enabled = false;
+
+ this.buttonList.add(bookOfLore);
+ this.buttonList.add(new GuiButton(3, this.guiLeft + 84, this.guiTop + 162, 34, 20, string.translateKey("Social")));
+
+ this.buttonList.add(new GuiButton(4, this.guiLeft + 123, this.guiTop + 162, 46, 20, string.translateKey("Donator")));
+ }
+
+ protected void drawGuiContainerForegroundLayer(int par1, int par2)
+ {
+ }
+
+ public void drawScreen(int par1, int par2, float par3)
+ {
+ super.drawScreen(par1, par2, par3);
+ this.xSize_lo = par1;
+ this.ySize_lo = par2;
+ }
+
+ public void func_74223_a(Minecraft par0Minecraft, int par1, int par2, int par3, float par4, float par5)
+ {
+ GL11.glEnable(2903);
+ GL11.glPushMatrix();
+ GL11.glTranslatef(par1, par2, 50.0F);
+ GL11.glScalef(-par3, par3, par3);
+ GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);
+ float var6 = par0Minecraft.thePlayer.renderYawOffset;
+ float var7 = par0Minecraft.thePlayer.rotationYaw;
+ float var8 = par0Minecraft.thePlayer.rotationPitch;
+ GL11.glRotatef(135.0F, 0.0F, 1.0F, 0.0F);
+ RenderHelper.enableStandardItemLighting();
+ GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F);
+ GL11.glRotatef(-(float) Math.atan(par5 / 40.0F) * 20.0F, 1.0F, 0.0F, 0.0F);
+
+ par0Minecraft.thePlayer.renderYawOffset = ((float) Math.atan(par4 / 40.0F) * 20.0F);
+
+ par0Minecraft.thePlayer.rotationYaw = ((float) Math.atan(par4 / 40.0F) * 40.0F);
+ par0Minecraft.thePlayer.rotationPitch = (-(float) Math.atan(par5 / 40.0F) * 20.0F);
+
+ par0Minecraft.thePlayer.rotationYawHead = par0Minecraft.thePlayer.rotationYaw;
+ GL11.glTranslatef(0.0F, par0Minecraft.thePlayer.yOffset, 0.0F);
+ RenderManager.instance.playerViewY = 180.0F;
+ RenderManager.instance.renderEntityWithPosYaw(par0Minecraft.thePlayer, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F);
+
+ par0Minecraft.thePlayer.renderYawOffset = var6;
+ par0Minecraft.thePlayer.rotationYaw = var7;
+ par0Minecraft.thePlayer.rotationPitch = var8;
+ GL11.glPopMatrix();
+ RenderHelper.disableStandardItemLighting();
+ GL11.glDisable(32826);
+ OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit);
+ GL11.glDisable(3553);
+ OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);
+ }
+
+ public void initGui()
+ {
+ this.buttonList.clear();
+ super.initGui();
+ }
+
+ protected void actionPerformed(GuiButton var1)
+ {
+ if (var1.id == 0)
+ {
+ this.mc.displayGuiScreen(new GuiAchievements(this.mc.statFileWriter));
+ }
+
+ if (var1.id == 1)
+ {
+ this.mc.displayGuiScreen(new GuiStats(this, this.mc.statFileWriter));
+ }
+
+ if (var1.id == 2)
+ {
+ int guiID = AetherGuiHandler.realLoreID;
+ this.mc.displayGuiScreen(new GuiLore(this.mc.thePlayer.inventory, this.mc.thePlayer, 0));
+ }
+
+ if (var1.id == 3)
+ {
+ this.mc.displayGuiScreen(new GuiMenu(player, this));
+ }
+
+ if (var1.id == 4) this.mc.displayGuiScreen(new GuiDonatorMenu(player, this));
+ }
+
+ public void updateScreen()
+ {
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.GuiInventoryAether
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/GuiInventoryMoreSlots.java b/src/main/java/net/aetherteam/aether/client/gui/GuiInventoryMoreSlots.java
new file mode 100644
index 0000000..d20f547
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/GuiInventoryMoreSlots.java
@@ -0,0 +1,168 @@
+package net.aetherteam.aether.client.gui;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.entity.EntityClientPlayerMP;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.achievement.GuiAchievements;
+import net.minecraft.client.gui.achievement.GuiStats;
+import net.minecraft.client.gui.inventory.GuiContainer;
+import net.minecraft.client.gui.inventory.GuiContainerCreative;
+import net.minecraft.client.multiplayer.PlayerControllerMP;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.renderer.RenderHelper;
+import net.minecraft.client.renderer.entity.RenderManager;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.potion.Potion;
+import net.minecraft.potion.PotionEffect;
+import net.minecraft.stats.AchievementList;
+import net.minecraft.util.StatCollector;
+import net.minecraft.util.StringTranslate;
+import org.lwjgl.opengl.GL11;
+
+public class GuiInventoryMoreSlots extends GuiContainer
+{
+ private float xSize_lo;
+ private float ySize_lo;
+
+ public GuiInventoryMoreSlots(EntityPlayer var1)
+ {
+ super(var1.inventoryContainer);
+ this.allowUserInput = true;
+ var1.addStat(AchievementList.openInventory, 1);
+ }
+
+ public void updateScreen()
+ {
+ if (this.mc.playerController.isInCreativeMode())
+ this.mc.displayGuiScreen(new GuiContainerCreative(this.mc.thePlayer));
+ }
+
+ public void initGui()
+ {
+ if (this.mc.playerController.isInCreativeMode())
+ {
+ this.mc.displayGuiScreen(new GuiContainerCreative(this.mc.thePlayer));
+ } else
+ {
+ super.initGui();
+ if (!this.mc.thePlayer.getActivePotionEffects().isEmpty())
+ this.guiLeft = (160 + (this.width - this.xSize - 200) / 2);
+ }
+ }
+
+ public void drawScreen(int var1, int var2, float var3)
+ {
+ super.drawScreen(var1, var2, var3);
+ this.xSize_lo = var1;
+ this.ySize_lo = var2;
+ }
+
+ protected void drawGuiContainerBackgroundLayer(float var1, int var2, int var3)
+ {
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.renderEngine.bindTexture("/net/aetherteam/aether/client/sprites/gui/inventory.png");
+ int var5 = this.guiLeft;
+ int var6 = this.guiTop;
+ drawTexturedModalRect(var5, var6, 0, 0, this.xSize, this.ySize);
+ StringTranslate string = StringTranslate.getInstance();
+ this.buttonList.clear();
+ this.buttonList.add(new GuiButton(2, var5 - 20, var6, 20, 20, string.translateKey("?")));
+ displayDebuffEffects();
+ GL11.glEnable(32826);
+ GL11.glEnable(2903);
+ GL11.glPushMatrix();
+ GL11.glTranslatef(var5 + 33, var6 + 75, 50.0F);
+ float var7 = 30.0F;
+ GL11.glScalef(-var7, var7, var7);
+ GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);
+ float var8 = this.mc.thePlayer.renderYawOffset;
+ float var9 = this.mc.thePlayer.rotationYaw;
+ float var10 = this.mc.thePlayer.rotationPitch;
+ float var11 = var5 + 51 - this.xSize_lo;
+ float var12 = var6 + 75 - 50 - this.ySize_lo;
+ GL11.glRotatef(135.0F, 0.0F, 1.0F, 0.0F);
+ RenderHelper.enableStandardItemLighting();
+ GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F);
+ GL11.glRotatef(-(float) Math.atan(var12 / 40.0F) * 20.0F, 1.0F, 0.0F, 0.0F);
+ this.mc.thePlayer.renderYawOffset = ((float) Math.atan(var11 / 40.0F) * 20.0F);
+ this.mc.thePlayer.rotationYaw = ((float) Math.atan(var11 / 40.0F) * 40.0F);
+ this.mc.thePlayer.rotationPitch = (-(float) Math.atan(var12 / 40.0F) * 20.0F);
+ this.mc.thePlayer.rotationYawHead = this.mc.thePlayer.rotationYaw;
+ GL11.glTranslatef(0.0F, this.mc.thePlayer.yOffset, 0.0F);
+ RenderManager.instance.playerViewY = 180.0F;
+ RenderManager.instance.renderEntityWithPosYaw(this.mc.thePlayer, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F);
+ this.mc.thePlayer.renderYawOffset = var8;
+ this.mc.thePlayer.rotationYaw = var9;
+ this.mc.thePlayer.rotationPitch = var10;
+ GL11.glPopMatrix();
+ RenderHelper.disableStandardItemLighting();
+ GL11.glDisable(32826);
+ }
+
+ protected void actionPerformed(GuiButton var1)
+ {
+ if (var1.id == 0)
+ {
+ this.mc.displayGuiScreen(new GuiAchievements(this.mc.statFileWriter));
+ }
+
+ if (var1.id == 1)
+ {
+ this.mc.displayGuiScreen(new GuiStats(this, this.mc.statFileWriter));
+ }
+
+ if (var1.id == 2) this.mc.displayGuiScreen(new GuiLore(this.mc.thePlayer.inventory, this.mc.thePlayer, 0));
+ }
+
+ private void displayDebuffEffects()
+ {
+ int var1 = this.guiLeft - 124;
+ int var2 = this.guiTop;
+ Collection var4 = this.mc.thePlayer.getActivePotionEffects();
+ if (!var4.isEmpty())
+ {
+ int var5 = 33;
+ if (var4.size() > 5)
+ {
+ var5 = 132 / (var4.size() - 1);
+ }
+
+ for (Iterator var6 = this.mc.thePlayer.getActivePotionEffects().iterator(); var6.hasNext(); var2 += var5)
+ {
+ PotionEffect var7 = (PotionEffect) var6.next();
+ Potion var8 = Potion.potionTypes[var7.getPotionID()];
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.renderEngine.bindTexture("/aether/gui/inventory.png");
+ drawTexturedModalRect(var1, var2, 0, this.ySize, 140, 32);
+ if (var8.hasStatusIcon())
+ {
+ int var9 = var8.getStatusIconIndex();
+ drawTexturedModalRect(var1 + 6, var2 + 7, 0 + var9 % 8 * 18, this.ySize + 32 + var9 / 8 * 18, 18, 18);
+ }
+
+ String var11 = StatCollector.translateToLocal(var8.getName());
+ if (var7.getAmplifier() > 0)
+ {
+ var11 = var11 + " " + StatCollector.translateToLocal(new StringBuilder().append("potion.potency.").append(var7.getAmplifier()).toString());
+ }
+
+ this.fontRenderer.drawStringWithShadow(var11, var1 + 10 + 18, var2 + 6, 16777215);
+ String var10 = Potion.getDurationString(var7);
+ this.fontRenderer.drawStringWithShadow(var10, var1 + 10 + 18, var2 + 6 + 10, 8355711);
+ }
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.GuiInventoryMoreSlots
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/GuiLore.java b/src/main/java/net/aetherteam/aether/client/gui/GuiLore.java
new file mode 100644
index 0000000..28c94ef
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/GuiLore.java
@@ -0,0 +1,489 @@
+package net.aetherteam.aether.client.gui;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.AetherLore;
+import net.aetherteam.aether.CommonProxy;
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.containers.ContainerLore;
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.block.Block;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.inventory.GuiContainerCreative;
+import net.minecraft.client.gui.inventory.GuiInventory;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.entity.player.PlayerCapabilities;
+import net.minecraft.inventory.IInventory;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.StringTranslate;
+import net.minecraft.world.World;
+import net.minecraft.world.WorldProvider;
+import net.minecraft.world.WorldType;
+import org.lwjgl.opengl.GL11;
+
+public class GuiLore extends AetherInventoryEffectRenderer
+{
+ public static ArrayList lores = new ArrayList();
+ private int type;
+
+ public GuiLore(InventoryPlayer inventoryplayer, EntityPlayer player, int i)
+ {
+ super(new ContainerLore(inventoryplayer, true, player));
+ this.xSize = 256;
+ this.ySize = 195;
+ this.type = i;
+ }
+
+ protected void actionPerformed(GuiButton var1)
+ {
+ if (var1.id == 0) if (Aether.proxy.getClientPlayer().capabilities.isCreativeMode)
+ {
+ this.mc.displayGuiScreen(new GuiContainerCreative(Aether.proxy.getClientPlayer()));
+ } else this.mc.displayGuiScreen(new GuiInventory(Aether.proxy.getClientPlayer()));
+ }
+
+ protected void drawGuiContainerForegroundLayer(int par1, int par2)
+ {
+ this.fontRenderer.drawString("Book Of Lore:", 37, 18, 4210752);
+
+ switch (this.type)
+ {
+ case 0:
+ this.fontRenderer.drawString("Add Object", 37, 38, 4210752);
+ break;
+ case 1:
+ this.fontRenderer.drawString("The Nether", 37, 38, 4210752);
+ break;
+ case 2:
+ this.fontRenderer.drawString("The Aether", 37, 38, 4210752);
+ }
+
+ this.fontRenderer.drawString("Item : ", 46, 72, 4210752);
+ ItemStack item = ((ContainerLore) this.inventorySlots).loreSlot.getStackInSlot(0);
+ if (item != null)
+ {
+ for (AetherLore lore : lores)
+ {
+ if ((lore.equals(item)) && (lore.type == this.type))
+ {
+ this.fontRenderer.drawString(lore.name, 134, 14, 4210752);
+ this.fontRenderer.drawString(lore.line1, 134, 28, 4210752);
+ this.fontRenderer.drawString(lore.line2, 134, 38, 4210752);
+ this.fontRenderer.drawString(lore.line3, 134, 48, 4210752);
+ this.fontRenderer.drawString(lore.line4, 134, 58, 4210752);
+ this.fontRenderer.drawString(lore.line5, 134, 68, 4210752);
+ this.fontRenderer.drawString(lore.line6, 134, 78, 4210752);
+ if (this.mc.theWorld.provider.terrainType.getWorldTypeID() != 2)
+ {
+ break;
+ }
+
+ }
+
+ }
+
+ }
+
+ StringTranslate var1 = StringTranslate.getInstance();
+ this.buttonList.clear();
+ this.buttonList.add(new GuiButton(0, this.guiLeft - 20, this.guiTop, 20, 20, var1.translateKey("X")));
+ }
+
+ public void onGuiClosed()
+ {
+ super.onGuiClosed();
+ }
+
+ protected void drawGuiContainerBackgroundLayer(float f, int i1, int i2)
+ {
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.renderEngine.bindTexture("/net/aetherteam/aether/client/sprites/gui/lore.png");
+ int j = (this.width - this.xSize) / 2;
+ int k = (this.height - this.ySize) / 2;
+ drawTexturedModalRect(j, k, 0, 0, this.xSize, this.ySize);
+ }
+
+ static
+ {
+ lores.add(new AetherLore(Block.stone, "Stone", "Found everywhere.", "Makes steps", "", "", "", "", 0));
+ lores.add(new AetherLore(Block.grass, "Grass", "Found in light.", "Spreads to dirt.", "Flowers and trees", "will grow on it.", "Click with a hoe", "to make farmland", 0));
+ lores.add(new AetherLore(Block.dirt, "Dirt", "Found everywhere.", "Grass, trees and", "flowers will grow", "on it.", "Click with a hoe", "to make farmland", 0));
+ lores.add(new AetherLore(Block.cobblestone, "Cobblestone", "Found when mining", "stone and when", "water meets lava.", "Makes stone tools,", "cobble steps and", "furnaces", 0));
+ lores.add(new AetherLore(Block.planks, "Wooden Planks", "Crafted from wood.", "Useful building", "material.", "Makes sticks, tools,", "boats, doors, chests", "and crafting tables", 0));
+ lores.add(new AetherLore(Block.sapling, "Sapling", "Dropped by leaves.", "Grows a tree.", "", "", "", "", 0));
+ lores.add(new AetherLore(Block.bedrock, "Bedrock / Adminium", "Not obtainable...", "The hardest known", "material; completely", "indestructible.", "", "", 0));
+ lores.add(new AetherLore(Block.sand, "Sand", "Found by water.", "Falls when ", "unsupported.", "Smeltable into glass", "", "", 0));
+ lores.add(new AetherLore(Block.gravel, "Gravel", "Found in rock.", "Falls when ", "unsupported.", "Chance to drop flint", "", "", 0));
+ lores.add(new AetherLore(Block.oreGold, "Gold Ore", "Found in rock.", "Smeltable into", "gold ingots.", "Medium rarity", "", "", 0));
+ lores.add(new AetherLore(Block.oreIron, "Iron Ore", "Found in rock.", "Smeltable into", "iron ingots.", "Common", "", "", 0));
+ lores.add(new AetherLore(Block.wood, "Wood", "Found in trees.", "Craftable into", "planks.", "", "", "", 0));
+ lores.add(new AetherLore(Block.sponge, "Sponge", "Not obtainable...", "Has no purpose", "", "", "", "", 0));
+ lores.add(new AetherLore(Block.glass, "Glass", "Smelted from sand.", "Decorative block", "", "", "", "", 0));
+ lores.add(new AetherLore(Block.blockLapis, "Lapis Lazuli", "Made from 9 lapis", "lazuli.", "Decorative block", "", "", "", 0));
+ lores.add(new AetherLore(Block.dispenser, "Dispenser", "Ejects items when ", "powered. Also", "shoots arrows", "", "", "", 0));
+ lores.add(new AetherLore(Block.sandStone, "Sandstone", "Made from 4 sand.", "Also found below", "sand naturally.", "Decorative block", "", "", 0));
+ lores.add(new AetherLore(Block.music, "Note Block", "Plays a note when", "powered. The", "block underneath", "defines the sound.", "Right click to", "change the note", 0));
+ lores.add(new AetherLore(Block.railPowered, "Powered Rail", "Quickens minecarts", "when powered.", "Brakes minecarts", "when unpowered", "", "", 0));
+ lores.add(new AetherLore(Block.railDetector, "Detector Rail", "Gives out power", "when a minecart is", "on it.", "", "", "", 0));
+ lores.add(new AetherLore(Block.web, "Web", "Slows down", "anything that", "enters it", "", "", "", 0));
+ lores.add(new AetherLore(Block.cloth, "Wool", "Found on sheep.", "Can be dyed.", "Decorative Block", "", "", "", 0));
+ lores.add(new AetherLore(Block.plantYellow, "Dandelion", "Found on grass.", "Can make", "dandelion yellow", "dye", "", "", 0));
+ lores.add(new AetherLore(Block.plantRed, "Rose", "Found on grass.", "Can make", "rose red dye", "", "", "", 0));
+ lores.add(new AetherLore(Block.mushroomBrown, "Mushroom", "Found on grass", "and in caves.", "Used to make", "mushroom soup", "", "", 0));
+ lores.add(new AetherLore(Block.mushroomRed, "Mushroom", "Found on grass", "and in caves.", "Used to make", "mushroom soup", "", "", 0));
+ lores.add(new AetherLore(Block.blockGold, "Gold", "Crafted from 9", "gold ingots.", "Decorative block", "", "", "", 0));
+ lores.add(new AetherLore(Block.blockIron, "Iron", "Crafted from 9", "iron ingots.", "Decorative block", "", "", "", 0));
+ lores.add(new AetherLore(Block.stoneSingleSlab, "Half-Step", "Used for making", "stairs and such.", "Decorative block", "", "", "", 0));
+ lores.add(new AetherLore(Block.brick, "Bricks", "Decorative block", "", "", "", "", "", 0));
+ lores.add(new AetherLore(Block.tnt, "TNT", "Made from sand", "and gunpowder.", "Will detonate when", "hit or powered.", "Handle with care", "", 0));
+ lores.add(new AetherLore(Block.bookShelf, "Bookshelf", "A pleasant array", "of books.", "Decorative Block", "", "", "", 0));
+ lores.add(new AetherLore(Block.cobblestoneMossy, "Mossy Cobblestone", "Found in dungeons.", "Deorative Block", "", "", "", "", 0));
+ lores.add(new AetherLore(Block.obsidian, "Obsidian", "Formed from water", "and lava.", "Very hard block", "that is useful in", "making fortifications", "and nether portals", 0));
+ lores.add(new AetherLore(Block.torchWood, "Torch", "Made from coal and", "sticks.", "Most common light", "source used for", "mining and lighting", "homes.", 0));
+ lores.add(new AetherLore(Block.stairsWoodOak, "Wooden Stairs", "Made from wood.", "Useful for making", "staircases, but ", "more compact than", "half steps.", "", 0));
+ lores.add(new AetherLore(Block.chest, "Chest", "Made from planks.", "Holds 27 slots.", "Can be joined to", "another chest to", "make a double", "chest.", 0));
+ lores.add(new AetherLore(Block.blockDiamond, "Diamond", "Crafted from 9", "diamonds.", "Decorative block", "", "", "", 0));
+ lores.add(new AetherLore(Block.workbench, "Workbench", "Used to create all", "complex items.", "", "", "", "", 0));
+ lores.add(new AetherLore(Block.furnaceIdle, "Furnace", "Takes coal, wood", "or lava as fuel and", "smelts sand, cobble", "iron, gold, clay", "and lots more", "", 0));
+ lores.add(new AetherLore(Block.ladder, "Ladder", "Used to climb", "vertically", "upwards or", "downwards", "", "", 0));
+ lores.add(new AetherLore(Block.rail, "Rail", "Allows minecarts", "to be placed and", "to move.", "You will need a lot", "of rails to make", "a minecart track", 0));
+ lores.add(new AetherLore(Block.stairsCobblestone, "Cobblestone Stairs", "Made from cobble.", "Useful for making", "staircases, but ", "more compact than", "half steps.", "", 0));
+ lores.add(new AetherLore(Block.lever, "Lever", "Gives a redstone", "current when on.", "Used as an input", "device for", "redstone circuits", "", 0));
+ lores.add(new AetherLore(Block.pressurePlateStone, "Pressure Plate", "Gives a redstone", "current when", "stepped on by", "a living thing.", "", "", 0));
+ lores.add(new AetherLore(Block.pressurePlatePlanks, "Pressure Plate", "Gives a redstone", "current when", "anything is on it", "", "", "", 0));
+ lores.add(new AetherLore(Block.torchRedstoneActive, "Redstone Torch", "Gives a redstone", "current when", "unpowered, but", "does not when", "powered (NOT gate)", "", 0));
+ lores.add(new AetherLore(Block.stoneButton, "Button", "Gives a redstone", "pulse for about", "a second when", "pushed", "", "", 0));
+ lores.add(new AetherLore(Block.blockSnow, "Snow", "Melts when near", "light.", "Could be used as", "camouflage in a", "snowy biome", "", 0));
+ lores.add(new AetherLore(Block.cactus, "Cactus", "Found in deserts.", "Hurts living things", "that touch it.", "Can be used as", "defenses and can", "be farmed", 0));
+ lores.add(new AetherLore(Block.blockClay, "Clay", "Found in sand.", "Can be split into", "clay lumps and then", "smelted to make", "bricks", "", 0));
+ lores.add(new AetherLore(Block.jukebox, "Jukebox", "Plays records", "found in dungeons.", "", "", "", "", 0));
+ lores.add(new AetherLore(Block.fence, "Fence", "Stops anything", "from jumping over.", "Also used for poles.", "Start from the top", "and work down", "", 0));
+ lores.add(new AetherLore(Block.pumpkin, "Pumpkin", "Found in small", "patches.", "Can be made into", "Jack-o-Lanterns", "", "", 0));
+ lores.add(new AetherLore(Block.pumpkinLantern, "Jack-o-Lantern", "Made from pumpkins", "and torches.", "Useful lightsource", "and rather scary", "", "", 0));
+ lores.add(new AetherLore(Block.trapdoor, "Trapdoor", "Opens upwards to", "allow access to", "space below", "", "", "", 0));
+ lores.add(new AetherLore(Block.pistonBase, "Piston", "Extends when", "powered. Useful", "for traps, doors", "and machines.", "", "", 0));
+ lores.add(new AetherLore(Block.pistonStickyBase, "Sticky Piston", "Extends when", "powered and pulls", "blocks when", "retracted. Useful", "in making doors", "and hidden blocks", 0));
+ lores.add(new AetherLore(Block.leaves, "Leaves", "Grows on trees.", "Obtainable by", "using shears.", "Decorative block", "", "", 0));
+
+ lores.add(new AetherLore(Item.shovelIron, "Iron Shovel", "Digs grass, dirt,", "sand and gravel.", "Normal Speed", "Many Uses", "", "", 0));
+ lores.add(new AetherLore(Item.pickaxeIron, "Iron Pickaxe", "Digs stone, cobble,", "and other rocks.", "Normal Speed", "Many Uses", "", "", 0));
+ lores.add(new AetherLore(Item.axeIron, "Iron Axe", "Chops wood and ", "planks.", "Normal Speed", "Many Uses", "", "", 0));
+ lores.add(new AetherLore(Item.swordIron, "Iron Sword", "For attacking", "mobs and animals.", "Normal Damage", "Many Uses", "", "", 0));
+ lores.add(new AetherLore(Item.hoeIron, "Iron Hoe", "Turns grass or", "dirt into farmland.", "Normal Speed", "Many Uses", "", "", 0));
+
+ lores.add(new AetherLore(Item.shovelWood, "Wooden Shovel", "Digs grass, dirt,", "sand and gravel.", "Very Slow Speed", "Few Uses", "", "", 0));
+ lores.add(new AetherLore(Item.pickaxeWood, "Wooden Pickaxe", "Digs stone, cobble,", "and other rocks.", "Very Slow Speed", "Few Uses", "", "", 0));
+ lores.add(new AetherLore(Item.axeWood, "Wooden Axe", "Chops wood and ", "planks.", "Very Slow Speed", "Few Uses", "", "", 0));
+ lores.add(new AetherLore(Item.swordWood, "Wooden Sword", "For attacking", "mobs and animals.", "Very Low Damage", "Few Uses", "", "", 0));
+ lores.add(new AetherLore(Item.hoeWood, "Wooden Hoe", "Turns grass or", "dirt into farmland.", "Very Slow Speed", "Few Uses", "", "", 0));
+
+ lores.add(new AetherLore(Item.shovelStone, "Stone Shovel", "Digs grass, dirt,", "sand and gravel.", "Slow Speed", "Average Uses", "", "", 0));
+ lores.add(new AetherLore(Item.pickaxeStone, "Stone Pickaxe", "Digs stone, cobble,", "and other rocks.", "Slow Speed", "Average Uses", "", "", 0));
+ lores.add(new AetherLore(Item.axeStone, "Stone Axe", "Chops wood and ", "planks.", "Slow Speed", "Average Uses", "", "", 0));
+ lores.add(new AetherLore(Item.swordStone, "Stone Sword", "For attacking", "mobs and animals.", "Low Damage", "Average Uses", "", "", 0));
+ lores.add(new AetherLore(Item.hoeStone, "Stone Hoe", "Turns grass or", "dirt into farmland.", "Slow Speed", "Average Uses", "", "", 0));
+
+ lores.add(new AetherLore(Item.shovelGold, "Gold Shovel", "Digs grass, dirt,", "sand and gravel.", "Very Fast Speed", "Very Few Uses", "", "", 0));
+ lores.add(new AetherLore(Item.pickaxeGold, "Gold Pickaxe", "Digs stone, cobble,", "and other rocks.", "Very Fast Speed", "Very Few Uses", "", "", 0));
+ lores.add(new AetherLore(Item.axeGold, "Gold Axe", "Chops wood and ", "planks.", "Very Fast Speed", "Very Few Uses", "", "", 0));
+ lores.add(new AetherLore(Item.swordGold, "Gold Sword", "For attacking", "mobs and animals.", "Very High Damage", "Very Few Uses", "", "", 0));
+ lores.add(new AetherLore(Item.hoeGold, "Gold Hoe", "Turns grass or", "dirt into farmland.", "Very Fast Speed", "Very Few Uses", "", "", 0));
+
+ lores.add(new AetherLore(Item.shovelDiamond, "Diamond Shovel", "Digs grass, dirt,", "sand and gravel.", "Fast Speed", "Very Many Uses", "", "", 0));
+ lores.add(new AetherLore(Item.pickaxeDiamond, "Diamond Pickaxe", "Digs stone, cobble,", "and other rocks.", "Fast Speed", "Very Many Uses", "", "", 0));
+ lores.add(new AetherLore(Item.axeDiamond, "Diamond Axe", "Chops wood and ", "planks.", "Fast Speed", "Very Many Uses", "", "", 0));
+ lores.add(new AetherLore(Item.swordDiamond, "Diamond Sword", "For attacking", "mobs and animals.", "High Damage", "Very Many Uses", "", "", 0));
+ lores.add(new AetherLore(Item.hoeDiamond, "Diamond Hoe", "Turns grass or", "dirt into farmland.", "Fast Speed", "Very Many Uses", "", "", 0));
+
+ lores.add(new AetherLore(Item.flintAndSteel, "Steel and Flint", "Makes fires", "and activates", "Nether portals.", "", "", "", 0));
+ lores.add(new AetherLore(Item.appleRed, "Red Apple", "Heals the user", "a small amount.", "Found in dungeons", "and from Notch", "", "", 0));
+ lores.add(new AetherLore(Item.bow, "Bow", "Shoots arrows", "and can be used", "to make dispensers.", "Skeletons use", "bows too", "", 0));
+ lores.add(new AetherLore(Item.arrow, "Arrow", "Ammo for the bow.", "Made from feathers,", "sticks and flints", "", "", "", 0));
+ lores.add(new AetherLore(Item.coal, "Coal", "Found in rock.", "Very common.", "Makes torches", "and is used as", "fuel in the furnace", "", 0));
+ lores.add(new AetherLore(Item.diamond, "Diamond", "Found deep under-", "ground. Very rare.", "Used for diamond", "tools, armour and", "jukeboxes", "", 0));
+ lores.add(new AetherLore(Item.ingotIron, "Iron Ingot", "Refined Iron.", "Makes iron tools,", "armour, rails,", "minecarts, doors,", "buckets and", "compasses", 0));
+ lores.add(new AetherLore(Item.ingotGold, "Gold Ingot", "Refined Gold.", "Makes gold tools,", "armour and ", "watches", "", "", 0));
+ lores.add(new AetherLore(Item.stick, "Stick", "Made from 2 planks.", "Very important", "crafting material", "", "", "", 0));
+ lores.add(new AetherLore(Item.bowlEmpty, "Bowl", "For holding soup", "", "", "", "", "", 0));
+ lores.add(new AetherLore(Item.bowlSoup, "Mushroom Soup", "Tasty soup that", "heals a few hearts", "", "", "", "", 0));
+ lores.add(new AetherLore(Item.silk, "String", "Dropped by", "spiders.", "Used for bows and", "fishing rods", "", "", 0));
+ lores.add(new AetherLore(Item.feather, "Feather", "Dropped by", "chickens", "and zombies.", "Makes arrows", "", "", 0));
+ lores.add(new AetherLore(Item.gunpowder, "Gunpowder", "Dropped by ghasts", "and creepers.", "Makes TNT", "", "", "", 0));
+ lores.add(new AetherLore(Item.seeds, "Seeds", "Gained by cutting", "wild grass.", "Placeable in", "farmland to grow", "crops", "", 0));
+ lores.add(new AetherLore(Item.wheat, "Wheat", "Produced when", "harvesting crops.", "Used to make bread", "and cake", "", "", 0));
+ lores.add(new AetherLore(Item.bread, "Bread", "Delicious,", "nutritious", "bread.", "Heals a few hearts", "", "", 0));
+
+ lores.add(new AetherLore(Item.helmetLeather, "Leather Helmet", "Wear it on your", "head.", "Awful Protection", "", "", "", 0));
+ lores.add(new AetherLore(Item.plateLeather, "Leather Chestplate", "Wear it on your", "chest.", "Awful Protection", "", "", "", 0));
+ lores.add(new AetherLore(Item.legsLeather, "Leather Greaves", "Wear it on your", "legs.", "Awful Protection", "", "", "", 0));
+ lores.add(new AetherLore(Item.bootsLeather, "Leather Boots", "Wear it on your", "feet.", "Awful Protection", "", "", "", 0));
+
+ lores.add(new AetherLore(Item.helmetGold, "Gold Helmet", "Wear it on your", "head.", "Bad Protection", "", "", "", 0));
+ lores.add(new AetherLore(Item.plateGold, "Gold Chestplate", "Wear it on your", "chest.", "Bad Protection", "", "", "", 0));
+ lores.add(new AetherLore(Item.legsGold, "Gold Greaves", "Wear it on your", "legs.", "Bad Protection", "", "", "", 0));
+ lores.add(new AetherLore(Item.bootsGold, "Gold Boots", "Wear it on your", "feet.", "Bad Protection", "", "", "", 0));
+
+ lores.add(new AetherLore(Item.helmetChain, "Chain Helmet", "Wear it on your", "head.", "Bad Protection", "", "", "", 0));
+ lores.add(new AetherLore(Item.plateChain, "Chain Chestplate", "Wear it on your", "chest.", "Bad Protection", "", "", "", 0));
+ lores.add(new AetherLore(Item.legsChain, "Chain Greaves", "Wear it on your", "legs.", "Bad Protection", "", "", "", 0));
+ lores.add(new AetherLore(Item.bootsChain, "Chain Boots", "Wear it on your", "feet.", "Bad Protection", "", "", "", 0));
+
+ lores.add(new AetherLore(Item.helmetIron, "Iron Helmet", "Wear it on your", "head.", "Good Protection", "", "", "", 0));
+ lores.add(new AetherLore(Item.plateIron, "Iron Chestplate", "Wear it on your", "chest.", "Good Protection", "", "", "", 0));
+ lores.add(new AetherLore(Item.legsIron, "Iron Greaves", "Wear it on your", "legs.", "Good Protection", "", "", "", 0));
+ lores.add(new AetherLore(Item.bootsIron, "Iron Boots", "Wear it on your", "feet.", "Good Protection", "", "", "", 0));
+
+ lores.add(new AetherLore(Item.helmetDiamond, "Diamond Helmet", "Wear it on your", "head.", "Great Protection", "", "", "", 0));
+ lores.add(new AetherLore(Item.plateDiamond, "Diamond Chestplate", "Wear it on your", "chest.", "Great Protection", "", "", "", 0));
+ lores.add(new AetherLore(Item.legsDiamond, "Diamond Greaves", "Wear it on your", "legs.", "Great Protection", "", "", "", 0));
+ lores.add(new AetherLore(Item.bootsDiamond, "Diamond Boots", "Wear it on your", "feet.", "Great Protection", "", "", "", 0));
+
+ lores.add(new AetherLore(Item.flint, "Flint", "Found in gravel.", "Used in arrows", "and firelighters", "", "", "", 0));
+ lores.add(new AetherLore(Item.porkRaw, "Raw Pork", "Dropped by pigs.", "Can be cooked", "or eaten raw", "", "", "", 0));
+ lores.add(new AetherLore(Item.porkCooked, "Cooked Pork", "Dropped by pig", "zombies. Also", "obtainable from", "cooking pork.", "Heals a few hearts", "", 0));
+ lores.add(new AetherLore(Item.painting, "Painting", "Made from sticks", "and cloth.", "Puts a random", "painting where", "you click", "", 0));
+ lores.add(new AetherLore(Item.appleGold, "Golden Apple", "A ridiculously", "expensive apple", "which, despite being", "coated in gold,", "heals all hearts", "", 0));
+ lores.add(new AetherLore(Item.sign, "Sign", "Made from sticks", "and planks.", "Can be placed on", "walls or the floor", "with your message", "", 0));
+ lores.add(new AetherLore(Item.doorWood, "Wooden Door", "Made from planks.", "Allows you to shut", "out the creepers", "before they boom", "in your house", "", 0));
+ lores.add(new AetherLore(Item.bucketEmpty, "Bucket", "Made from iron.", "Can pick up water", "and lava.", "If used on a cow,", "milk may be", "obtained", 0));
+ lores.add(new AetherLore(Item.bucketWater, "Water Bucket", "Can be used to", "place a water", "source", "", "", "", 0));
+ lores.add(new AetherLore(Item.bucketLava, "Lava Bucket", "Can be used to", "place a lava", "source", "", "", "", 0));
+ lores.add(new AetherLore(Item.minecartEmpty, "Minecart", "Can be ridden in,", "but make sure the", "animals can't get", "to your cart", "", "", 0));
+ lores.add(new AetherLore(Item.saddle, "Saddle", "Found in dungeons.", "Can be used to", "saddle a pig", "", "", "", 0));
+ lores.add(new AetherLore(Item.doorIron, "Iron Door", "Made from iron.", "Behaves like a door", "but can only be", "opened by redstone", "", "", 0));
+ lores.add(new AetherLore(Item.redstone, "Redstone", "Used to carry", "redstone currents", "in redstone circuits", "", "", "", 0));
+ lores.add(new AetherLore(Item.snowball, "Snowball", "Found by digging", "snow with a spade.", "Can be thrown", "", "", "", 0));
+ lores.add(new AetherLore(Item.boat, "Boat", "Can be ridden in", "to cross lakes", "and oceans", "", "", "", 0));
+ lores.add(new AetherLore(Item.leather, "Leather", "Dropped by cows.", "Used in making", "leather armour", "", "", "", 0));
+ lores.add(new AetherLore(Item.bucketMilk, "Milk Bucket", "Gained by using", "a bucket on a cow.", "Used in making cake.", "Heals a few hearts", "", "", 0));
+ lores.add(new AetherLore(Item.brick, "Brick", "Smelted from clay.", "Used to make brick", "blocks", "", "", "", 0));
+ lores.add(new AetherLore(Item.clay, "Clay", "Found in clay", "blocks.", "Can be smelted", "into bricks", "", "", 0));
+ lores.add(new AetherLore(Item.reed, "Sugarcanes", "Found on dirt or", "grass by water.", "Makes paper for", "books and sugar ", "for cakes.", "Can be farmed", 0));
+
+ lores.add(new AetherLore(Item.paper, "Paper", "Made from", "sugarcane.", "Used in books and", "maps", "", "", 0));
+ lores.add(new AetherLore(Item.book, "Book", "Made from paper.", "Used to make", "bookcases", "", "", "", 0));
+ lores.add(new AetherLore(Item.slimeBall, "Slime Ball", "Dropped by slimes.", "Used to make", "sticky pistons", "", "", "", 0));
+ lores.add(new AetherLore(Item.minecartCrate, "Storage Minecart", "A minecart that", "carries a chest", "", "", "", "", 0));
+ lores.add(new AetherLore(Item.minecartPowered, "Powered Minecart", "A minecart that", "pushes other carts", "when given coal", "", "", "", 0));
+ lores.add(new AetherLore(Item.egg, "Egg", "Laid by chickens.", "Throw it to hatch", "a new chicken.", "Also used in", "making cake.", "", 0));
+ lores.add(new AetherLore(Item.compass, "Compass", "Made from iron", "and redstone.", "Points to your", "spawnpoint", "", "", 0));
+ lores.add(new AetherLore(Item.fishingRod, "Fishing Rod", "Made from sticks", "and string.", "Can be used for", "fishing or ", "pulling mobs around", "", 0));
+ lores.add(new AetherLore(Item.pocketSundial, "Watch", "Made from gold", "and redstone.", "Tells the time", "", "", "", 0));
+ lores.add(new AetherLore(Item.lightStoneDust, "Lightstone Dust", "Dropped by", "lightstone.", "Can be crafted", "into lightstone", "", "", 0));
+ lores.add(new AetherLore(Item.fishRaw, "Raw Fish", "Gained by fishing.", "Can be cooked or", "eaten raw", "", "", "", 0));
+ lores.add(new AetherLore(Item.fishCooked, "Cooked Fish", "Gained by cooking", "raw fish.", "Heals a few hearts", "", "", "", 0));
+ lores.add(new AetherLore(Item.dyePowder, "Dye", "Obtained from many", "places.", "Dyes can be mixed,", "added to wool", "and used on sheep", "", 0));
+ lores.add(new AetherLore(Item.bone, "Bone", "Dropped by", "skeletons.", "Used to make", "bonemeal and to", "tame wolves", "", 0));
+ lores.add(new AetherLore(Item.sugar, "Sugar", "Made from", "sugarcane.", "Used to make cake", "", "", "", 0));
+ lores.add(new AetherLore(Item.cake, "Cake", "The cake is a lie.", "", "", "", "", "", 0));
+ lores.add(new AetherLore(Item.bed, "Bed", "Made from planks", "and wool.", "Allows you to", "sleep until", "morning and set", "your spawnpoint", 0));
+ lores.add(new AetherLore(Item.redstoneRepeater, "Repeater", "Made from stone", "and redstone.", "Repeats a signal", "with a delay, set", "by the toggle", "", 0));
+ lores.add(new AetherLore(Item.cookie, "Cookie", "Made from cocoa", "beans and wheat.", "Heals a few hearts", "", "", "", 0));
+ lores.add(new AetherLore(Item.map, "Map", "Made from paper", "and a compass.", "Makes a map of the", "area you are in", "", "", 0));
+ lores.add(new AetherLore(Item.record13, "13", "Found in dungeons.", "Playable in jukebox.", "A rather odd tune", "", "", "", 0));
+ lores.add(new AetherLore(Item.recordCat, "Cat", "Found in dungeons.", "Playable in jukebox.", "A very jolly tune", "", "", "", 0));
+ lores.add(new AetherLore(Item.shears, "Shears", "Made from iron.", "Used to shear", "sheep and to get", "leaf blocks from", "trees.", "", 0));
+
+ lores.add(new AetherLore(Block.netherrack, "Netherrack", "Main nether", " material.", "Burns forever", "", "", "", 0));
+ lores.add(new AetherLore(Block.slowSand, "Slow Sand", "Found in patches", "Slows anything on it", "", "", "", "", 0));
+ lores.add(new AetherLore(Block.glowStone, "Glowstone", "Found on the roof", "of the Nether.", "Drops 4 Glowstone", "dust.", "Used in Aether ", "portals", 0));
+ lores.add(new AetherLore(Item.lightStoneDust, "Glowstone Dust", "Obtained when mining", "a block of Glowstone.", "", "", "", "", 0));
+
+ lores.add(new AetherLore(AetherItems.IronRing, "Iron Ring", "Made from iron.", "Wear it in your", "ring slot.", "Purely decorative", "item", "", 0));
+ lores.add(new AetherLore(AetherItems.GoldenRing, "Gold Ring", "Made from gold.", "Wear it in your", "ring slot.", "Purely decorative", "item", "", 0));
+ lores.add(new AetherLore(AetherItems.IronPendant, "Iron Pendant", "Made from iron.", "Wear it in your", "pendant slot.", "Purely decorative", "item", "", 0));
+ lores.add(new AetherLore(AetherItems.GoldenPendant, "Gold Pendant", "Made from gold.", "Wear it in your", "pendant slot.", "Purely decorative", "item", "", 0));
+
+ lores.add(new AetherLore(AetherItems.LeatherGloves, "Leather Glove", "Wear them on your", "hands.", "Awful Protection", "", "", "", 0));
+ lores.add(new AetherLore(AetherItems.IronGloves, "Iron Glove", "Wear them on your", "hands.", "Good Protection", "", "", "", 0));
+ lores.add(new AetherLore(AetherItems.GoldenGloves, "Gold Glove", "Wear them on your", "hands.", "Bad Protection", "", "", "", 0));
+ lores.add(new AetherLore(AetherItems.DiamondGloves, "Diamond Glove", "Wear them on your", "hands.", "Great Protection", "", "", "", 0));
+
+ lores.add(new AetherLore(AetherBlocks.AetherDirt, "Aether Dirt", "A paler dirt.", "Aether grass", "and skyroot trees", "will grow on it", "", "", 0));
+ lores.add(new AetherLore(new ItemStack(AetherBlocks.AetherGrass, 1, 0), "Aether Grass", "A paler grass.", "Skyroot trees will", "grow on it.", "Allows Aether mobs", "to spawn", "", 0));
+ lores.add(new AetherLore(new ItemStack(AetherBlocks.AetherGrass, 1, 1), "Enchanted Grass", "This grass will", "increase the amount", "of drops from Berry", "Bushes which grow", "on it.", "", 0));
+ lores.add(new AetherLore(new ItemStack(AetherBlocks.Holystone, 1, 0), "Holystone", "Main material of", "the Aether.", "Makes holystone", "tools and", "enchanters", "", 0));
+ lores.add(new AetherLore(AetherBlocks.SkyrootPlank, "Skyroot Plank", "Made from skyroot.", "Used to make", "skyroot sticks and", "tools", "", "", 0));
+ lores.add(new AetherLore(AetherBlocks.GreenSkyrootSapling, "Skyroot Sapling", "Dropped by ", "skyroot leaves.", "Plants a skyroot", "tree", "", "", 0));
+ lores.add(new AetherLore(AetherBlocks.GoldenOakSapling, "Golden Oak Sapling", "Dropped by golden", "oak leaves.", "Plants a golden", "oak", "", "", 0));
+ lores.add(new AetherLore(AetherBlocks.Quicksoil, "Quicksoil", "Found at the edge", "of islands.", "Speeds up anything", "on it.", "Use it with blue", "clouds for epicness", 0));
+ lores.add(new AetherLore(AetherBlocks.AetherLog, "Skyroot Wood", "Wood from skyroot", "trees.", "Makes skyroot", "planks", "", "", 0));
+ lores.add(new AetherLore(AetherBlocks.Icestone, "Icestone", "Found in Holystone.", "Freezes water", "around it on", "placement", "", "", 0));
+ lores.add(new AetherLore(AetherBlocks.GravititeOre, "Gravitite Ore", "Found under big", "islands.", "Floats upwards,", "and can be made", "into tools.", "Can be enchanted", 0));
+ lores.add(new AetherLore(AetherBlocks.EnchantedGravitite, "Enchanted Gravitite", "Floats upwards", "when powered by", "redstone", "", "", "", 0));
+ lores.add(new AetherLore(new ItemStack(AetherBlocks.Holystone, 1, 2), "Mossy Holystone", "Found in dungeons.", "Decorative block", "", "", "", "", 0));
+ lores.add(new AetherLore(new ItemStack(AetherBlocks.Aercloud, 1, 1), "Blue Aercloud", "Found in clouds.", "When landed on,", "it will bounce you", "sky-high", "", "", 0));
+ lores.add(new AetherLore(new ItemStack(AetherBlocks.Aercloud, 1, 0), "Cold Aercloud", "Found in clouds.", "Stops fall damage", "when landed on", "", "", "", 0));
+ lores.add(new AetherLore(new ItemStack(AetherBlocks.Aercloud, 1, 2), "Gold Aercloud", "Found in clouds.", "Stops fall damage", "when landed on.", "Quite rare", "", "", 0));
+ lores.add(new AetherLore(AetherBlocks.AmbrosiumTorch, "Ambrosium Torch", "Made from skyroot", "sticks and", "ambrosium.", "Can be placed in", "the Aether", "", 0));
+ lores.add(new AetherLore(AetherBlocks.DungeonStone, "Dungeon Stone", "Found in dungeons.", "Decorative block", "", "", "", "", 0));
+ lores.add(new AetherLore(AetherBlocks.LightDungeonStone, "Lit Dungeon Stone", "Found in dungeons.", "Emits a faint light.", "Decorative block", "", "", "", 0));
+ lores.add(new AetherLore(AetherBlocks.Pillar, "Pillar", "Found in silver", "dungeons.", "Decorative block", "", "", "", 0));
+ lores.add(new AetherLore(AetherBlocks.Altar, "Altar", "Made from Zanite", "and Holystone.", "Enchants items", "and repairs tools", "", "", 0));
+ lores.add(new AetherLore(AetherBlocks.Incubator, "Incubator", "Made from skyroot", "planks and", "Holystone.", "Incubates Moa", "eggs until they ", "hatch", 0));
+ lores.add(new AetherLore(AetherBlocks.ZaniteBlock, "Zanite Block", "Crafted with four", "Zanite Gemstones.", "Decorative block", "", "", "", 0));
+ lores.add(new AetherLore(AetherBlocks.PurpleFlower, "Purple Flower", "Common plant in", "the Aether.", "Can be crafted", "into dye.", "", "", 0));
+ lores.add(new AetherLore(AetherBlocks.WhiteFlower, "White Flower", "Common plant in", "the Aether.", "Can be crafted", "into dye.", "", "", 0));
+ lores.add(new AetherLore(AetherBlocks.Freezer, "Freezer", "Allows you to", "freeze certain items.", "Uses Icestone as", "a fuel source.", "", "", 0));
+ lores.add(new AetherLore(AetherBlocks.QuicksoilGlass, "Quicksoil Glass", "Gained by enchanting", "Quicksoil blocks.", "Translucent, gives", "off small amount", "of light.", "", 0));
+ lores.add(new AetherLore(AetherBlocks.HolystoneBrick, "Holystone Bricks", "Two can be crafted", "with four blocks of", "Holystone. Is purely", "decorative.", "Great for castles.", "", 0));
+
+ lores.add(new AetherLore(AetherBlocks.HellfireWall, "Hellfire Fence", "Six can be crafted", "with six blocks of", "Hellfire Stone. Is", "purely decorative.", "Great for containing", "animals.", 0));
+ lores.add(new AetherLore(AetherBlocks.AngelicWall, "Angelic Fence", "Six can be crafted", "with six blocks of", "Hellfire Stone. Is", "purely decorative.", "Great for containing", "animals.", 0));
+ lores.add(new AetherLore(AetherBlocks.CarvedWall, "Carved Fence", "Six can be crafted", "with six blocks of", "Hellfire Stone. Is", "purely decorative.", "Great for containing", "animals.", 0));
+ lores.add(new AetherLore(AetherBlocks.SkyrootFence, "Skyroot Fence", "Six can be crafted", "with six blocks of", "Hellfire Stone. Is", "purely decorative.", "Great for containing", "animals.", 0));
+ lores.add(new AetherLore(AetherBlocks.IcestoneWall, "Icestone Fence", "Six can be crafted", "with six blocks of", "Hellfire Stone. Is", "purely decorative.", "Great for containing", "animals.", 0));
+ lores.add(new AetherLore(AetherBlocks.MossyHolystoneWall, "Holystone Fence", "Six can be crafted", "with six blocks of", "Hellfire Stone. Is", "purely decorative.", "Great for containing", "animals.", 0));
+ lores.add(new AetherLore(AetherBlocks.HolystoneWall, "Holystone Fence", "Six can be crafted", "with six blocks of", "Hellfire Stone. Is", "purely decorative.", "Great for containing", "animals.", 0));
+
+ lores.add(new AetherLore(AetherBlocks.HellfireStairs, "Hellfire Stairs", "Used to walk up", "elevated surfaces.", "Greatly functional", "and decorative", "blocks.", "", 0));
+ lores.add(new AetherLore(AetherBlocks.AngelicStairs, "Angelic Stairs", "Used to walk up", "elevated surfaces.", "Greatly functional", "and decorative", "blocks.", "", 0));
+ lores.add(new AetherLore(AetherBlocks.CarvedStairs, "Carved Stairs", "Used to walk up", "elevated surfaces.", "Greatly functional", "and decorative", "blocks.", "", 0));
+ lores.add(new AetherLore(AetherBlocks.SkyrootStairs, "Skyroot Stairs", "Used to walk up", "elevated surfaces.", "Greatly functional", "and decorative", "blocks.", "", 0));
+ lores.add(new AetherLore(AetherBlocks.IcestoneStairs, "Icestone Stairs", "Used to walk up", "elevated surfaces.", "Greatly functional", "and decorative", "blocks.", "", 0));
+ lores.add(new AetherLore(AetherBlocks.MossyHolystoneStairs, "Holystone Stairs", "Used to walk up", "elevated surfaces.", "Greatly functional", "and decorative", "blocks.", "", 0));
+ lores.add(new AetherLore(AetherBlocks.HolystoneStairs, "Holystone Stairs", "Used to walk up", "elevated surfaces.", "Greatly functional", "and decorative", "blocks.", "", 0));
+
+ lores.add(new AetherLore(new ItemStack(AetherBlocks.CrystalLeaves, 1, 0), "Crystal Leaves", "Found on Crystal", "Trees. Some say", "these leaves hold", "hidden, untapped", "powers...", "", 0));
+ lores.add(new AetherLore(new ItemStack(AetherBlocks.CrystalLeaves, 1, 1), "Crystal Fruit Leaves", "Found on Crystal", "Trees. These leaves", "grow White Apples", "on them.", "", "", 0));
+
+ lores.add(new AetherLore(AetherBlocks.BerryBushStem, "Berry Bush Stem", "Left over when", "harvesting a Berry", "Bush. These stems", "can regrow into", "full bushes again.", "", 0));
+ lores.add(new AetherLore(AetherBlocks.BerryBush, "Berry Bush", "These bushes are", "found in clusters", "among the floating", "islands of the", "Aether realm.", "", 0));
+
+ lores.add(new AetherLore(AetherBlocks.Present, "Present", "Found around the", "base of Christmas", "Trees. When opened,", "it will either", "spawn a nasty or", " nice surprise.", 0));
+ lores.add(new AetherLore(new ItemStack(AetherBlocks.ChristmasLeaves, 1, 0), "Christmas Leaves", "Found on Christmas", "Trees. Adventurers", "have observed these", "leaves producing", "an array of snow", "flakes around them.", 0));
+ lores.add(new AetherLore(new ItemStack(AetherBlocks.ChristmasLeaves, 1, 1), "Decorative Leaves", "Found on Christmas", "Trees. These leaves", "can be found with", "many decorations", "in them.", "", 0));
+
+ lores.add(new AetherLore(AetherBlocks.Aerogel, "Aerogel", "Found in dungeons.", "Incredibly high", "TNT resistance", "", "", "", 0));
+ lores.add(new AetherLore(new ItemStack(AetherItems.DartShooter, 1, 3), "Phoenix Dart Shooter", "Found in dungeons.", "Shoots flaming", "darts that", "burn mobs", "", "", 0));
+ lores.add(new AetherLore(AetherItems.GummieSwet, "Gummy Swet", "Found in dungeons.", "Tasty swet", "flavoured", "gummy swets", "(May contain swet)", "", 0));
+ lores.add(new AetherLore(AetherItems.FlamingSword, "Fire Sword", "Found in dungeons.", "A sword imbued", "with the power of", "fire", "", "", 0));
+ lores.add(new AetherLore(AetherItems.LightningSword, "Lightning Sword", "Found in dungeons.", "A sword imbued", "with the power of", "lightning", "", "", 0));
+ lores.add(new AetherLore(AetherItems.HolySword, "Holy Sword", "Found in dungeons.", "A holy sword that", "will deal extra", "damage to undead", "", "", 0));
+ lores.add(new AetherLore(AetherItems.HammerOfNotch, "Hammer of Notch", "Found in dungeons.", "A hammer that", "has a special", "attack which hits", "lots of mobs", "", 0));
+ lores.add(new AetherLore(AetherItems.LightningKnife, "Lightning Knife", "Found in dungeons.", "Throwable.", "Creates lightning", "on hit.", "", "", 0));
+ lores.add(new AetherLore(AetherItems.PigSlayer, "Pig Slayer", "Found in Dungeons.", "Very good dagger.", "Kills pigs and", "pig zombies in", "1 hit", "", 0));
+ lores.add(new AetherLore(AetherItems.VictoryMedal, "Medallion", "Dropped by ", "Valkyries.", "A sign of victory", "from the Valkyries", "that you need to ", "fight the boss", 0));
+
+ lores.add(new AetherLore(AetherItems.HolystonePickaxe, "Holystone Pickaxe", "Digs holystone", "and Aether ores.", "Randomly gives", "extra ambrosium.", "Slow Speed", "Average Uses", 0));
+ lores.add(new AetherLore(AetherItems.HolystoneAxe, "Holystone Axe", "Chops Skyroot", "and Gilded Oak.", "Randomly gives", "extra ambrosium.", "Slow Speed", "Average Uses", 0));
+ lores.add(new AetherLore(AetherItems.HolystoneShovel, "Holystone Shovel", "Digs Aether dirt,", "and quicksoil.", "Randomly gives", "extra ambrosium.", "Slow Speed", "Average Uses", 0));
+ lores.add(new AetherLore(AetherItems.HolystoneSword, "Holystone Sword", "For attacking", "mobs and animals.", "Randomly gives", "extra ambrosium.", "Slow Speed", "Average Uses", 0));
+
+ lores.add(new AetherLore(AetherItems.SkyrootPickaxe, "Skyroot Pickaxe", "Digs Holystone", "and Aether ores.", "Randomly gives", "double drops.", "Very Slow Speed", "Few Uses", 0));
+ lores.add(new AetherLore(AetherItems.SkyrootAxe, "Skyroot Axe", "Chops Skyroot", "and Gilded Oak.", "Randomly gives", "double drops.", "Very Slow Speed", "Few Uses", 0));
+ lores.add(new AetherLore(AetherItems.SkyrootShovel, "Skyroot Shovel", "Digs Aether dirt,", "and quicksoil.", "Randomly gives", "double drops.", "Very Slow Speed", "Few Uses", 0));
+ lores.add(new AetherLore(AetherItems.SkyrootSword, "Skyroot Sword", "For attacking", "mobs and animals.", "Randomly gives", "double drops.", "Very Slow Speed", "Few Uses", 0));
+
+ lores.add(new AetherLore(AetherItems.ZanitePickaxe, "Zanite Pickaxe", "Digs Holystone", "and Aether ores.", "Power increases", "with damage.", "Normal Speed", "Many Uses", 0));
+ lores.add(new AetherLore(AetherItems.ZaniteAxe, "Zanite Axe", "Chops Skyroot", "and Gilded Oak.", "Power increases", "with damage.", "Normal Speed", "Many Uses", 0));
+ lores.add(new AetherLore(AetherItems.ZaniteShovel, "Zanite Shovel", "Digs Aether dirt,", "and quicksoil.", "Power increases", "with damage.", "Normal Speed", "Many Uses", 0));
+ lores.add(new AetherLore(AetherItems.ZaniteSword, "Zanite Sword", "For attacking", "mobs and animals.", "Power increases", "with damage.", "Normal Speed", "Many Uses", 0));
+
+ lores.add(new AetherLore(AetherItems.GravititePickaxe, "Gravitite Pickaxe", "Digs Holystone", "and Aether ores.", "Right click will", "lift mobs.", "Fast Speed", "Very Many Uses", 0));
+ lores.add(new AetherLore(AetherItems.GravititeAxe, "Gravitite Axe", "Chops Skyroot", "and Gilded Oak.", "Right click will", "lift mobs.", "Fast Speed", "Very Many Uses", 0));
+ lores.add(new AetherLore(AetherItems.GravititeShovel, "Gravitite Shovel", "Digs Aether dirt,", "and quicksoil.", "Right click will", "lift mobs.", "Fast Speed", "Very Many Uses", 0));
+ lores.add(new AetherLore(AetherItems.GravititeSword, "Gravitite Sword", "For attacking", "mobs and animals.", "Right click will", "lift mobs.", "Fast Speed", "Very Many Uses", 0));
+
+ lores.add(new AetherLore(AetherItems.AmbrosiumShard, "Ambrosium Shard", "Found in Holystone.", "Makes Ambrosium", "Torches and is", "the fuel of the", "Altar.", "Can enchant grass.", 0));
+ lores.add(new AetherLore(AetherItems.ZaniteGemstone, "Zanite Gemstone", "Found in Holystone.", "Makes Zanite tools", "and enchanters", "", "", "", 0));
+ lores.add(new AetherLore(AetherItems.SkyrootStick, "Skyroot Stick", "Made from skyroot", "planks.", "Vital crafting", "item for Aether", "tools", "", 0));
+ lores.add(new AetherLore(new ItemStack(AetherItems.SkyrootBucket, 1, 0), "Skyroot Bucket", "Made from skyroot.", "Can pick up water,", "milk and poison", "", "", "", 0));
+ lores.add(new AetherLore(new ItemStack(AetherItems.SkyrootBucket, 1, Block.waterMoving.blockID), "Skyroot Water Bucket", "A skyroot bucket", "full of water", "", "", "", "", 0));
+ lores.add(new AetherLore(new ItemStack(AetherItems.SkyrootBucket, 1, 1), "Skyroot Milk Bucket", "A skyroot bucket", "full of milk", "", "", "", "", 0));
+ lores.add(new AetherLore(AetherItems.GoldenAmber, "Golden Amber", "Dropped by golden", "oaks.", "Used to make", "golden darts", "", "", 0));
+ lores.add(new AetherLore(AetherItems.MoaEgg, "Moa Egg", "Laid by Moas.", "Place in an", "incubator to", "hatch it", "", "", 0));
+ lores.add(new AetherLore(new ItemStack(AetherItems.Key, 1, 0), "Bronze Key", "Dropped by the", "Slider.", "Use it to gain", "access to the", "bronze treasure", "chest", 0));
+ lores.add(new AetherLore(new ItemStack(AetherItems.Key, 1, 1), "Silver Key", "Dropped by the", "Grand Valkyrie.", "Use it to gain", "access to the silver", "treasure chest", "", 0));
+ lores.add(new AetherLore(new ItemStack(AetherItems.Key, 1, 2), "Gold Key", "Dropped by the", "Sun Spririt", "Use it to gain", "access to the gold", "treasure chest", "", 0));
+ lores.add(new AetherLore(AetherItems.AechorPetal, "Aechor Petal", "Dropped by Aechor", "Plants.", "Used to tame and", "feed Moas", "", "", 0));
+ lores.add(new AetherLore(new ItemStack(AetherItems.DartShooter, 1, 0), "Dart Shooter", "Found in Dungeons.", "Shoots gold darts", "", "", "", "", 0));
+ lores.add(new AetherLore(new ItemStack(AetherItems.DartShooter, 1, 1), "Enchanted Shooter", "Shoots enchanted", "darts", "", "", "", "", 0));
+ lores.add(new AetherLore(new ItemStack(AetherItems.DartShooter, 1, 2), "Poison Shooter", "Shoots poison", "darts", "", "", "", "", 2));
+ lores.add(new AetherLore(new ItemStack(AetherItems.Dart, 1, 0), "Golden Dart", "Found in Dungeons", "and crafted from", "golden orbs and", "skyroot sticks.", "Simplest ammo", "for the dart shooter", 0));
+ lores.add(new AetherLore(new ItemStack(AetherItems.Dart, 1, 1), "Enchanted Dart", "Found in Dungeons.", "Enchantable from", "Golden Darts.", "Has more attack", "than a golden dart", "", 0));
+ lores.add(new AetherLore(new ItemStack(AetherItems.Dart, 1, 2), "Poison Dart", "Found in Dungeons.", "Craftable from", "Golden Darts and", "poison buckets.", "Ammo for the dart", "shooter that poisons", 0));
+ lores.add(new AetherLore(AetherItems.AetherMusicDisk, "Blue Music Disk", "Found in Dungeons.", "Can be played", "in jukeboxes.", "Plays the Aether", "tune", "", 0));
+ lores.add(new AetherLore(new ItemStack(AetherItems.SkyrootBucket, 1, 3), "Bucket of Remedy", "Enchantable from", "bucket of poison.", "Cures poison", "", "", "", 0));
+ lores.add(new AetherLore(new ItemStack(AetherItems.SkyrootBucket, 1, 2), "Bucket of Posion", "Found in Dungeons.", "Obtainable from", "Aechor Plants.", "Used to make poison", "darts", "", 0));
+ lores.add(new AetherLore(AetherItems.CloudParachute, "Cloud Parachute", "Made from clouds.", "Will float the player", "gently down.", "Activates on click", "or when falling", "from the Aether", 0));
+ lores.add(new AetherLore(AetherItems.GoldenCloudParachute, "Gold Cloud Parachute", "Made from gold", "clouds.", "Similar to Cloud", "Parachute, but", "has 4 uses.", "", 0));
+ lores.add(new AetherLore(AetherItems.IronBubble, "Iron Bubble", "Found in dungeons.", "Allows you to", "breathe", "underwater forever", "", "", 0));
+ lores.add(new AetherLore(AetherItems.VampireBlade, "Vampire Blade", "Found in dungeons.", "Powerful sword", "that drains the", "health of anything", "hit", "", 0));
+
+ lores.add(new AetherLore(AetherItems.ShardOfLife, "Life Shard", "Found in Dungeons.", "Increases your", "maximum health by", "one heart", "", "", 0));
+ lores.add(new AetherLore(AetherItems.ValkyrieCape, "Valkyrie Cape", "Found in Dungeons.", "While wearing this", "you will float", "gently to the ground", "and take no fall", "damage", 0));
+
+ lores.add(new AetherLore(AetherItems.ValkyrieLance, "Valkyrie Lance", "Found in Dungeons.", "Powerful weapon", "with extended", "reach", "", "", 0));
+ lores.add(new AetherLore(AetherItems.SwetCape, "Swet Cape", "Found in Dungeons.", "Wear it as a cape.", "Purely aesthetic", "item", "", "", 0));
+ lores.add(new AetherLore(AetherItems.ZanitePendant, "Zanite Pendant", "Made from zanite.", "Wear it in your", "pendant slot.", "As it wears away", "it increases your", "mining speed", 0));
+ lores.add(new AetherLore(AetherItems.ZaniteRing, "Zanite Ring", "Made from zanite.", "Wear it in your", "ring slot.", "As it wears away", "it increases your", "mining speed", 0));
+
+ lores.add(new AetherLore(AetherItems.PhoenixHelmet, "Phoenix Helmet", "Found in dungeons.", "Protects the ", "wearer from any", "fire or lava damage.", "Weak to water, but", "it holds a secret", 0));
+ lores.add(new AetherLore(AetherItems.PhoenixChestplate, "Phoenix Chestplate", "Found in dungeons.", "Protects the ", "wearer from any", "fire or lava damage.", "Weak to water, but", "it holds a secret", 0));
+ lores.add(new AetherLore(AetherItems.PhoenixLeggings, "Phoenix Leggings", "Found in dungeons.", "Protects the ", "wearer from any", "fire or lava damage.", "Weak to water, but", "it holds a secret", 0));
+ lores.add(new AetherLore(AetherItems.PhoenixBoots, "Phoenix Boots", "Found in dungeons.", "Protects the ", "wearer from any", "fire or lava damage.", "Weak to water, but", "it holds a secret", 0));
+ lores.add(new AetherLore(AetherItems.HealingStone, "Healing Stone", "Gained by enchanting", "Holystone blocks.", "Heals four hearts", "of health.", "", "", 0));
+ lores.add(new AetherLore(AetherItems.RedCape, "Red Cape", "Worn in cape", "slot.", "Purely decorative.", "", "", "", 0));
+ lores.add(new AetherLore(AetherItems.BlueCape, "Blue Cape", "Worn in cape", "slot.", "Purely decorative.", "", "", "", 0));
+ lores.add(new AetherLore(AetherItems.WhiteCape, "White Cape", "Worn in cape", "slot.", "Purely decorative.", "", "", "", 0));
+ lores.add(new AetherLore(AetherItems.YellowCape, "Yellow Cape", "Worn in cape", "slot.", "Purely decorative.", "", "", "", 0));
+ lores.add(new AetherLore(AetherItems.IcePendant, "Ice Pendant", "Worn in pendant", "slot.", "Freezes all water", "and lava sources", "around the player.", "", 0));
+ lores.add(new AetherLore(AetherItems.IceRing, "Ice Ring", "Worn in ring", "slots.", "Freezes all water", "and lava sources", "around the player.", "", 0));
+ lores.add(new AetherLore(AetherItems.AgilityCape, "Agility Cape", "Worn in cape", "slot.", "Gives the player", "the ability to", "walk up blocks", "without jumping.", 0));
+ lores.add(new AetherLore(AetherItems.ValkyriePickaxe, "Valkyrie Pickaxe", "A powerful pickaxe", "which once belonged", "to a Valkyrie.", "Has extended reach.", "", "", 0));
+ lores.add(new AetherLore(AetherItems.ValkyrieAxe, "Valkyrie Axe", "A powerful axe", "which once belonged", "to a Valkyrie.", "Has extended reach.", "", "", 0));
+ lores.add(new AetherLore(AetherItems.ValkyrieShovel, "Valkyrie Shovel", "A powerful shovel", "which once belonged", "to a Valkyrie.", "Has extended reach.", "", "", 0));
+
+ lores.add(new AetherLore(AetherItems.ObsidianHelmet, "Obsidian Helmet", "A cooled version of", "the Phoenix", "Helmet.", "Incredibly strong", "head armour", "", 0));
+ lores.add(new AetherLore(AetherItems.ObsidianChestplate, "Obsidian Chestplate", "A cooled version of", "the Phoenix", "Chestplate.", "Incredibly strong", "chest armour", "", 0));
+ lores.add(new AetherLore(AetherItems.ObsidianLeggings, "Obsidian Leggings", "A cooled version of", "the Phoenix", "Leggings.", "Incredibly strong", "leg armour", "", 0));
+ lores.add(new AetherLore(AetherItems.ObsidianBoots, "Obsidian Boots", "A cooled version of", "the Phoenix", "Boots.", "Incredibly strong", "foot armour", "", 0));
+
+ lores.add(new AetherLore(AetherItems.ZaniteHelmet, "Zanite Helmet", "Wear it on your", "head.", "Good Protection.", "Provides better", "protection when", "more damaged", 0));
+ lores.add(new AetherLore(AetherItems.ZaniteChestplate, "Zanite Chestplate", "Wear it on your", "chest.", "Good Protection.", "Provides better", "protection when", "more damaged", 0));
+ lores.add(new AetherLore(AetherItems.ZaniteLeggings, "Zanite Greaves", "Wear it on your", "legs.", "Good Protection.", "Provides better", "protection when", "more damaged", 0));
+ lores.add(new AetherLore(AetherItems.ZaniteBoots, "Zanite Boots", "Wear it on your", "feet.", "Good Protection.", "Provides better", "protection when", "more damaged", 0));
+
+ lores.add(new AetherLore(AetherItems.GravititeHelmet, "Gravitite Helmet", "Wear it on your", "head.", "Great Protection.", "Full set stops", "fall damage and", "jumps higher", 0));
+ lores.add(new AetherLore(AetherItems.GravititeChestplate, "Gravitite Chestplate", "Wear it on your", "chest.", "Great Protection.", "Full set stops", "fall damage and", "jumps higher", 0));
+ lores.add(new AetherLore(AetherItems.GravititeLeggings, "Gravitite Leggings", "Wear it on your", "legs.", "Great Protection.", "Full set stops", "fall damage and", "jumps higher", 0));
+ lores.add(new AetherLore(AetherItems.GravititeBoots, "Gravitite Boots", "Wear it on your", "feet.", "Great Protection.", "Full set stops", "fall damage and", "jumps higher", 0));
+
+ lores.add(new AetherLore(AetherItems.NeptuneHelmet, "Neptune Helmet", "Found in dungeons.", "Wear it on your", "head.", "Great Protection.", "Full set speeds", "up water movement", 0));
+ lores.add(new AetherLore(AetherItems.NeptuneChestplate, "Neptune Chestplate", "Found in dungeons.", "Wear it on your", "chest.", "Great Protection.", "Full set speeds", "up water movement", 0));
+ lores.add(new AetherLore(AetherItems.NeptuneLeggings, "Neptune Greaves", "Found in dungeons.", "Wear it on your", "legs.", "Great Protection.", "Full set speeds", "up water movement", 0));
+ lores.add(new AetherLore(AetherItems.NeptuneBoots, "Neptune Boots", "Found in dungeons.", "Wear it on your", "feet.", "Great Protection.", "Full set speeds", "up water movement", 0));
+
+ lores.add(new AetherLore(AetherItems.ZaniteGloves, "Zanite Gloves", "Wear them on your", "hands.", "Good Protection", "", "", "", 0));
+ lores.add(new AetherLore(AetherItems.GravititeGloves, "Gravitite Gloves", "Wear them on your", "hands.", "Great Protection.", "Full set stops", "fall damage and", "jumps higher", 0));
+ lores.add(new AetherLore(AetherItems.ObsidianGloves, "Obsidian Gloves", "A cooled version of", "the Phoenix", "Glove.", "Incredibly strong", "hand armour", "", 0));
+ lores.add(new AetherLore(AetherItems.PhoenixGloves, "Phoenix Gloves", "Found in dungeons.", "Protects the ", "wearer from any", "fire or lava damage.", "Weak to water, but", "it holds a secret", 0));
+ lores.add(new AetherLore(AetherItems.NeptuneGloves, "Neptune Gloves", "Found in dungeons.", "Wear them on your", "hands.", "Great Protection", "", "", 0));
+
+ lores.add(new AetherLore(AetherItems.RegenerationStone, "Regeneration Stone", "Use it in your", "accessory slots.", "Regenerates health", "over time", "", "", 0));
+ lores.add(new AetherLore(AetherItems.InvisibilityCloak, "Invisibility Cloak", "Use it in your", "cloak slot.", "Makes you invisible", "", "", "", 0));
+
+ lores.add(new AetherLore(AetherItems.CandyCaneSword, "Candy Cane Sword", "Found in Presents", "underneath many", "Christmas Trees.", "Generates Candy", "Canes when used.", "", 0));
+ lores.add(new AetherLore(AetherItems.CandyCane, "Candy Cane", "Generated when", "you are using", "a Candy Sword.", "Replenishes", "hunger.", "", 0));
+ lores.add(new AetherLore(AetherItems.GingerBreadMan, "Ginger Bread Man", "Found in Presents", "underneath many", "Christmas Trees.", "Replenishes", "hunger.", "", 0));
+ lores.add(new AetherLore(AetherItems.BlueBerry, "Blue Berry", "Found in Berry", "Bushes around", "the Aether realm.", "Replenishes", "hunger.", "", 0));
+ lores.add(new AetherLore(AetherItems.WhiteApple, "White Apple", "Found in Crystal", "Fruit Leaves in", "the Aether realm.", "Cures poison.", "", "", 0));
+ lores.add(new AetherLore(AetherItems.SwettyBall, "Swetty Ball", "Dropped by the", "gelatine-like", "Swets. Right click", "dirt to grow", "grass.", "", 0));
+ lores.add(new AetherLore(AetherItems.SentryBoots, "Sentry Boots", "Found in Bronze", "Dungeon chests.", "Negates the", "effect of Zephyr", "snowballs.", "", 0));
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.GuiLore
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/GuiSkyrootCrafting.java b/src/main/java/net/aetherteam/aether/client/gui/GuiSkyrootCrafting.java
new file mode 100644
index 0000000..c4087e0
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/GuiSkyrootCrafting.java
@@ -0,0 +1,43 @@
+package net.aetherteam.aether.client.gui;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.aetherteam.aether.containers.ContainerSkyrootWorkbench;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.inventory.GuiContainer;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.util.StatCollector;
+import net.minecraft.world.World;
+import org.lwjgl.opengl.GL11;
+
+@SideOnly(Side.CLIENT)
+public class GuiSkyrootCrafting extends GuiContainer
+{
+ public GuiSkyrootCrafting(InventoryPlayer par1InventoryPlayer, World par2World, int par3, int par4, int par5)
+ {
+ super(new ContainerSkyrootWorkbench(par1InventoryPlayer, par2World, par3, par4, par5));
+ }
+
+ protected void drawGuiContainerForegroundLayer(int par1, int par2)
+ {
+ this.fontRenderer.drawString(StatCollector.translateToLocal("container.crafting"), 28, 6, 4210752);
+ this.fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
+ }
+
+ protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
+ {
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.renderEngine.bindTexture("/gui/crafting.png");
+ int k = (this.width - this.xSize) / 2;
+ int l = (this.height - this.ySize) / 2;
+ drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.GuiSkyrootCrafting
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/GuiTreasureChest.java b/src/main/java/net/aetherteam/aether/client/gui/GuiTreasureChest.java
new file mode 100644
index 0000000..e613a0c
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/GuiTreasureChest.java
@@ -0,0 +1,65 @@
+package net.aetherteam.aether.client.gui;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.inventory.GuiContainer;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.inventory.ContainerChest;
+import net.minecraft.inventory.IInventory;
+import org.lwjgl.opengl.GL11;
+
+public class GuiTreasureChest extends GuiContainer
+{
+ private IInventory upperChestInventory;
+ private IInventory lowerChestInventory;
+ private int inventoryRows;
+ private String name;
+
+ public GuiTreasureChest(IInventory iinventory, IInventory iinventory1, int meta)
+ {
+ super(new ContainerChest(iinventory, iinventory1));
+ this.inventoryRows = 0;
+ this.upperChestInventory = iinventory;
+ this.lowerChestInventory = iinventory1;
+ this.allowUserInput = false;
+ char c = 'Þ';
+ int i = c - 'l';
+ this.inventoryRows = (iinventory1.getSizeInventory() / 9);
+ this.ySize = (i + this.inventoryRows * 18);
+ switch (meta)
+ {
+ case 1:
+ this.name = "Bronze Treasure Chest";
+ break;
+ case 3:
+ this.name = "Silver Treasure Chest";
+ break;
+ case 5:
+ this.name = "Gold Treasure Chest";
+ case 2:
+ case 4:
+ }
+ }
+
+ protected void drawGuiContainerForegroundLayer()
+ {
+ this.fontRenderer.drawString(this.name, 8, 6, 4210752);
+ this.fontRenderer.drawString(this.upperChestInventory.getInvName(), 8, this.ySize - 96 + 2, 4210752);
+ }
+
+ protected void drawGuiContainerBackgroundLayer(float f, int i1, int i2)
+ {
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.renderEngine.bindTexture("/gui/container.png");
+ int j = (this.width - this.xSize) / 2;
+ int k = (this.height - this.ySize) / 2;
+ drawTexturedModalRect(j, k, 0, 0, this.xSize, this.inventoryRows * 18 + 17);
+ drawTexturedModalRect(j, k + this.inventoryRows * 18 + 17, 0, 126, this.xSize, 96);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.GuiTreasureChest
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/donator/GuiDonatorCape.java b/src/main/java/net/aetherteam/aether/client/gui/donator/GuiDonatorCape.java
new file mode 100644
index 0000000..5cb453d
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/donator/GuiDonatorCape.java
@@ -0,0 +1,268 @@
+package net.aetherteam.aether.client.gui.donator;
+
+import cpw.mods.fml.client.FMLClientHandler;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.client.gui.social.PartyData;
+import net.aetherteam.aether.donator.Donator;
+import net.aetherteam.aether.donator.DonatorChoice;
+import net.aetherteam.aether.donator.DonatorChoices;
+import net.aetherteam.aether.donator.EnumChoiceType;
+import net.aetherteam.aether.donator.SyncDonatorList;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.renderer.OpenGlHelper;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.renderer.RenderHelper;
+import net.minecraft.client.renderer.entity.RenderManager;
+import net.minecraft.client.settings.GameSettings;
+import net.minecraft.client.settings.KeyBinding;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import org.lwjgl.opengl.GL11;
+
+public class GuiDonatorCape extends GuiScreen
+{
+ private final PartyData pm;
+ private int backgroundTexture;
+ private int xParty;
+ private int yParty;
+ private int wParty;
+ private int hParty;
+ Minecraft f;
+ private EntityPlayer player;
+ private GuiScreen parent;
+ private float rotationY;
+ public float dif = 0.0025F;
+ Donator donator;
+ static int capeIndex = 0;
+
+ public GuiDonatorCape(EntityPlayer player, GuiScreen parent)
+ {
+ this(new PartyData(), player, parent);
+ }
+
+ protected void keyTyped(char charTyped, int keyTyped)
+ {
+ super.keyTyped(charTyped, keyTyped);
+
+ if (keyTyped == Minecraft.getMinecraft().gameSettings.keyBindInventory.keyCode)
+ {
+ this.mc.displayGuiScreen((GuiScreen) null);
+ this.mc.setIngameFocus();
+ }
+ }
+
+ public GuiDonatorCape(PartyData pm, EntityPlayer player, GuiScreen parent)
+ {
+ this.parent = parent;
+ this.player = player;
+ Aether.getInstance();
+ this.donator = Aether.syncDonatorList.getDonator(player.username);
+ this.mc = FMLClientHandler.instance().getClient();
+ this.pm = pm;
+ this.backgroundTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/choiceMenu.png");
+ this.wParty = 256;
+ this.hParty = 256;
+ updateScreen();
+ }
+
+ public void initGui()
+ {
+ updateScreen();
+ }
+
+ protected void actionPerformed(GuiButton btn)
+ {
+ switch (btn.id)
+ {
+ case 0:
+ this.mc.displayGuiScreen(this.parent);
+ break;
+ case 1:
+ if (this.donator != null)
+ {
+ if (capeIndex >= Aether.donatorChoices.capeChoices.size())
+ {
+ Aether.syncDonatorList.sendTypeRemoveToAll(this.player.username, EnumChoiceType.CAPE);
+ this.donator.removeChoiceType(EnumChoiceType.CAPE);
+ capeIndex = 0;
+ return;
+ }
+ this.donator.addChoice((DonatorChoice) Aether.donatorChoices.capeChoices.get(capeIndex));
+ Aether.syncDonatorList.sendChoiceToAll(this.player.username, (DonatorChoice) Aether.donatorChoices.capeChoices.get(capeIndex), true);
+
+ capeIndex += 1;
+ }
+ break;
+ }
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ public void drawScreen(int x, int y, float partialTick)
+ {
+ this.buttonList.clear();
+
+ drawDefaultBackground();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+ int centerX = this.xParty - 97;
+ int centerY = this.yParty - 56;
+
+ ScaledResolution sr = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ drawTexturedModalRect(centerX, centerY, 0, 0, 194, this.hParty);
+
+ this.buttonList.add(new GuiButton(0, this.xParty + 10, this.yParty + 27, 80, 20, "Back"));
+
+ GuiButton typeButton = null;
+ GuiButton overrideButton = null;
+
+ boolean hasChoice = this.donator.containsChoiceType(EnumChoiceType.CAPE);
+
+ if (this.donator != null)
+ {
+ DonatorChoice choice = null;
+
+ if (hasChoice)
+ {
+ this.backgroundTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/choiceMenu.png");
+ choice = this.donator.getChoiceFromType(EnumChoiceType.CAPE);
+ } else
+ {
+ this.backgroundTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/choiceMenu2.png");
+ }
+
+ typeButton = new GuiButton(1, this.xParty + 10, this.yParty - 35, 80, 20, choice != null ? choice.name : "Off");
+ }
+
+ if (this.donator == null)
+ {
+ typeButton.enabled = false;
+ }
+
+ this.buttonList.add(typeButton);
+
+ super.drawScreen(x, y, partialTick);
+
+ this.mc.renderEngine.resetBoundTexture();
+
+ String header = "Donator Cape";
+
+ drawString(this.fontRenderer, header, sr.getScaledWidth() / 2 - this.fontRenderer.getStringWidth(header) / 2 + 49, centerY + 10, 15658734);
+
+ drawPlayerOnGui(this.mc, this.xParty - 40, this.yParty + 35, 30, 1.0F, 1.0F, (this.donator != null) && (this.donator.containsChoiceType(EnumChoiceType.CAPE)));
+ }
+
+ public void drawPlayerOnGui(Minecraft par0Minecraft, int par1, int par2, int par3, float par4, float par5, boolean lighting)
+ {
+ if (this.rotationY > 2.5D)
+ {
+ this.dif = -0.0025F;
+ } else if (this.rotationY < -2.5D)
+ {
+ this.dif = 0.0025F;
+ }
+
+ this.rotationY += this.dif;
+
+ GL11.glEnable(2903);
+ GL11.glPushMatrix();
+ GL11.glTranslatef(par1, par2, 50.0F);
+ GL11.glScalef(-par3, par3, 50.5F);
+ GL11.glRotatef(180.0F, this.rotationY, 0.0F, 1.0F);
+ float f2 = par0Minecraft.thePlayer.renderYawOffset;
+ float f3 = par0Minecraft.thePlayer.rotationYaw;
+ float f4 = par0Minecraft.thePlayer.rotationPitch;
+ GL11.glRotatef(135.0F, 0.0F, 1.0F, 0.0F);
+ RenderHelper.enableStandardItemLighting();
+ GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F);
+ GL11.glRotatef(-(float) Math.atan(par5 / 40.0F) * 20.0F, 1.0F, 0.0F, 0.0F);
+ par0Minecraft.thePlayer.renderYawOffset = ((float) Math.atan(par4 / 40.0F) * 20.0F);
+ par0Minecraft.thePlayer.rotationYaw = ((float) Math.atan(par4 / 40.0F) * 40.0F);
+ par0Minecraft.thePlayer.rotationPitch = (-(float) Math.atan(par5 / 40.0F) * 20.0F);
+ par0Minecraft.thePlayer.rotationYawHead = par0Minecraft.thePlayer.rotationYaw;
+ GL11.glTranslatef(0.0F, par0Minecraft.thePlayer.yOffset, 0.0F);
+ RenderManager.instance.playerViewY = 180.0F;
+
+ if (!lighting)
+ {
+ GL11.glColor4f(0.35F, 0.35F, 0.35F, 1.0F);
+ }
+
+ RenderManager.instance.renderEntityWithPosYaw(par0Minecraft.thePlayer, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F);
+
+ par0Minecraft.thePlayer.renderYawOffset = f2;
+ par0Minecraft.thePlayer.rotationYaw = f3;
+ par0Minecraft.thePlayer.rotationPitch = f4;
+ GL11.glPopMatrix();
+ RenderHelper.disableStandardItemLighting();
+ GL11.glDisable(32826);
+ OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit);
+ GL11.glDisable(3553);
+ OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);
+ }
+
+ public void renderMoa(Entity entity, Minecraft mc, int x, int y, int scale, float par4, float par5, boolean lighting)
+ {
+ if (this.rotationY > 2.5D)
+ {
+ this.dif = -0.0025F;
+ } else if (this.rotationY < -2.5D)
+ {
+ this.dif = 0.0025F;
+ }
+
+ this.rotationY += this.dif;
+
+ GL11.glEnable(2903);
+ GL11.glPushMatrix();
+ GL11.glTranslatef(x, y, 100.0F);
+ GL11.glScalef(-scale, scale, scale);
+
+ GL11.glRotatef(180.0F, this.rotationY, 0.0F, 1.0F);
+
+ RenderHelper.enableStandardItemLighting();
+
+ if ((entity instanceof EntityLiving))
+ {
+ ((EntityLiving) entity).rotationYawHead = 0.0F;
+ }
+ RenderManager.instance.playerViewY = 180.0F;
+
+ if (!lighting) ;
+ RenderManager.instance.renderEntityWithPosYaw(entity, 0.0D, 0.0D, 0.0D, 0.0F, 660.0F);
+
+ GL11.glPopMatrix();
+ RenderHelper.disableStandardItemLighting();
+ GL11.glDisable(32826);
+ OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit);
+ GL11.glDisable(3553);
+ OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);
+ }
+
+ public void updateScreen()
+ {
+ super.updateScreen();
+ ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+ this.xParty = (width / 2);
+ this.yParty = (height / 2);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.donator.GuiDonatorCape
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/donator/GuiDonatorMenu.java b/src/main/java/net/aetherteam/aether/client/gui/donator/GuiDonatorMenu.java
new file mode 100644
index 0000000..9205023
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/donator/GuiDonatorMenu.java
@@ -0,0 +1,260 @@
+package net.aetherteam.aether.client.gui.donator;
+
+import cpw.mods.fml.client.FMLClientHandler;
+
+import java.util.List;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.AetherMoaColour;
+import net.aetherteam.aether.CommonProxy;
+import net.aetherteam.aether.client.gui.social.PartyData;
+import net.aetherteam.aether.donator.Donator;
+import net.aetherteam.aether.donator.DonatorChoice;
+import net.aetherteam.aether.donator.DonatorTexture;
+import net.aetherteam.aether.donator.EnumChoiceType;
+import net.aetherteam.aether.donator.SyncDonatorList;
+import net.aetherteam.aether.entities.mounts.EntityMoa;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.GuiTextField;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.renderer.OpenGlHelper;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.renderer.RenderHelper;
+import net.minecraft.client.renderer.entity.RenderManager;
+import net.minecraft.client.settings.GameSettings;
+import net.minecraft.client.settings.KeyBinding;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import org.lwjgl.opengl.GL11;
+
+public class GuiDonatorMenu extends GuiScreen
+{
+ private final PartyData pm;
+ private int backgroundTexture;
+ private int easterTexture;
+ private int xParty;
+ private int yParty;
+ private int wParty;
+ private int hParty;
+ Minecraft f;
+ private GuiTextField partyNameField;
+ private EntityPlayer player;
+ private GuiScreen parent;
+ private float rotationY;
+ public float dif = 0.0025F;
+ Donator donator;
+ EntityMoa moaEntity = new EntityMoa(Aether.proxy.getClientWorld(), true, false, false, AetherMoaColour.pickRandomMoa(), Aether.proxy.getClientPlayer(), (this.donator != null) && (this.donator.containsChoiceType(EnumChoiceType.MOA)) ? this.donator.getChoiceFromType(EnumChoiceType.MOA).textureFile.localURL : null);
+
+ public GuiDonatorMenu(EntityPlayer player, GuiScreen parent)
+ {
+ this(new PartyData(), player, parent);
+ }
+
+ protected void keyTyped(char charTyped, int keyTyped)
+ {
+ super.keyTyped(charTyped, keyTyped);
+
+ if (keyTyped == Minecraft.getMinecraft().gameSettings.keyBindInventory.keyCode)
+ {
+ this.mc.displayGuiScreen((GuiScreen) null);
+ this.mc.setIngameFocus();
+ }
+ }
+
+ public GuiDonatorMenu(PartyData pm, EntityPlayer player, GuiScreen parent)
+ {
+ this.parent = parent;
+ this.player = player;
+ Aether.getInstance();
+ this.donator = Aether.syncDonatorList.getDonator(player.username);
+ this.mc = FMLClientHandler.instance().getClient();
+ this.pm = pm;
+ this.backgroundTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/donatorMenu.png");
+ this.easterTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/donatorMenu.png");
+ this.wParty = 256;
+ this.hParty = 256;
+ updateScreen();
+ }
+
+ public void initGui()
+ {
+ updateScreen();
+ }
+
+ protected void actionPerformed(GuiButton btn)
+ {
+ switch (btn.id)
+ {
+ case 0:
+ this.mc.displayGuiScreen(this.parent);
+ break;
+ case 1:
+ this.mc.displayGuiScreen(new GuiDonatorMoa(this.player, this));
+ break;
+ case 2:
+ this.mc.displayGuiScreen(new GuiDonatorCape(this.player, this));
+ }
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ public void drawScreen(int x, int y, float partialTick)
+ {
+ this.buttonList.clear();
+
+ drawDefaultBackground();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+ int centerX = this.xParty - 97;
+ int centerY = this.yParty - 84;
+
+ this.partyNameField = new GuiTextField(this.fontRenderer, this.xParty - 80, this.yParty - 64, 160, 50);
+ this.partyNameField.setFocused(false);
+ this.partyNameField.setMaxStringLength(5000);
+
+ ScaledResolution sr = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ drawTexturedModalRect(centerX, centerY, 0, 0, 194, this.hParty);
+
+ this.buttonList.add(new GuiButton(0, this.xParty - 80, this.yParty - 4, 160, 20, "Back"));
+
+ this.buttonList.add(new GuiButton(1, this.xParty - 30, this.yParty + 27, 60, 20, this.donator != null ? "Moa" : "Moa: Off"));
+ this.buttonList.add(new GuiButton(2, this.xParty - 30, this.yParty + 52, 60, 20, this.donator != null ? "Cape" : "Cape: Off"));
+
+ String[] text = new String[4];
+
+ if (!Aether.syncDonatorList.isDonator(this.player.username))
+ {
+ this.moaEntity = new EntityMoa(Aether.proxy.getClientWorld(), true, false, false, AetherMoaColour.pickRandomMoa(), Aether.proxy.getClientPlayer(), (this.donator != null) && (this.donator.containsChoiceType(EnumChoiceType.MOA)) ? this.donator.getChoiceFromType(EnumChoiceType.MOA).textureFile.localURL : null);
+
+ ((GuiButton) this.buttonList.get(1)).enabled = false;
+ ((GuiButton) this.buttonList.get(2)).enabled = false;
+
+ text[0] = "You are not a donator.";
+ text[1] = "This menu is for donators to";
+ text[2] = "activate unique visuals that";
+ text[3] = "do not affect gameplay.";
+ } else
+ {
+ ((GuiButton) this.buttonList.get(1)).enabled = true;
+ ((GuiButton) this.buttonList.get(2)).enabled = true;
+
+ text[0] = ("Dear " + this.player.username + ",");
+ text[1] = "We cannot thank you enough";
+ text[2] = "for your contribution. Here,";
+ text[3] = "have some fancy visuals!";
+ }
+
+ super.drawScreen(x, y, partialTick);
+
+ this.partyNameField.drawTextBox();
+
+ this.mc.renderEngine.resetBoundTexture();
+
+ drawString(this.fontRenderer, text[0], sr.getScaledWidth() / 2 - this.fontRenderer.getStringWidth(text[0]) / 2, centerY + 24, 15658734);
+ drawString(this.fontRenderer, text[1], sr.getScaledWidth() / 2 - this.fontRenderer.getStringWidth(text[1]) / 2, centerY + 37, 15658734);
+ drawString(this.fontRenderer, text[2], sr.getScaledWidth() / 2 - this.fontRenderer.getStringWidth(text[2]) / 2, centerY + 47, 15658734);
+ drawString(this.fontRenderer, text[3], sr.getScaledWidth() / 2 - this.fontRenderer.getStringWidth(text[3]) / 2, centerY + 57, 15658734);
+
+ renderMoa(this.moaEntity, Minecraft.getMinecraft(), this.xParty + 62, this.yParty + 68, 16, 1.0F, 1.0F, (this.donator != null) && (this.donator.containsChoiceType(EnumChoiceType.MOA)));
+ drawPlayerOnGui(this.mc, this.xParty - 60, this.yParty + 69, 30, 0.0F, 0.0F, (this.donator != null) && (this.donator.containsChoiceType(EnumChoiceType.CAPE)));
+ }
+
+ public void drawPlayerOnGui(Minecraft par0Minecraft, int par1, int par2, int par3, float par4, float par5, boolean lighting)
+ {
+ GL11.glEnable(2903);
+ GL11.glPushMatrix();
+ GL11.glTranslatef(par1, par2, 50.0F);
+ GL11.glScalef(20.5F, 20.5F, 50.5F);
+ GL11.glRotatef(180.0F, this.rotationY, 0.0F, 1.0F);
+ float f2 = par0Minecraft.thePlayer.renderYawOffset;
+ float f3 = par0Minecraft.thePlayer.rotationYaw;
+ float f4 = par0Minecraft.thePlayer.rotationPitch;
+ GL11.glRotatef(135.0F, 0.0F, 1.0F, 0.0F);
+ RenderHelper.enableStandardItemLighting();
+ GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F);
+ GL11.glRotatef(-(float) Math.atan(par5 / 40.0F) * 20.0F, 1.0F, 0.0F, 0.0F);
+ par0Minecraft.thePlayer.renderYawOffset = ((float) Math.atan(par4 / 40.0F) * 20.0F);
+ par0Minecraft.thePlayer.rotationYaw = ((float) Math.atan(par4 / 40.0F) * 40.0F);
+ par0Minecraft.thePlayer.rotationPitch = (-(float) Math.atan(par5 / 40.0F) * 20.0F);
+ par0Minecraft.thePlayer.rotationYawHead = par0Minecraft.thePlayer.rotationYaw;
+ GL11.glTranslatef(0.0F, par0Minecraft.thePlayer.yOffset, 0.0F);
+ RenderManager.instance.playerViewY = 180.0F;
+
+ if (!lighting)
+ {
+ GL11.glColor4f(0.35F, 0.35F, 0.35F, 1.0F);
+ }
+
+ RenderManager.instance.renderEntityWithPosYaw(par0Minecraft.thePlayer, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F);
+
+ par0Minecraft.thePlayer.renderYawOffset = f2;
+ par0Minecraft.thePlayer.rotationYaw = f3;
+ par0Minecraft.thePlayer.rotationPitch = f4;
+ GL11.glPopMatrix();
+ RenderHelper.disableStandardItemLighting();
+ GL11.glDisable(32826);
+ OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit);
+ GL11.glDisable(3553);
+ OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);
+ }
+
+ public void renderMoa(Entity entity, Minecraft mc, int x, int y, int scale, float par4, float par5, boolean lighting)
+ {
+ if (this.rotationY > 2.5D)
+ {
+ this.dif = -0.0025F;
+ } else if (this.rotationY < -2.5D)
+ {
+ this.dif = 0.0025F;
+ }
+
+ this.rotationY += this.dif;
+
+ GL11.glEnable(2903);
+ GL11.glPushMatrix();
+ GL11.glTranslatef(x, y, 100.0F);
+ GL11.glScalef(-scale, scale, scale);
+
+ GL11.glRotatef(180.0F, this.rotationY, 0.0F, 1.0F);
+
+ RenderHelper.enableStandardItemLighting();
+
+ if ((entity instanceof EntityLiving))
+ {
+ ((EntityLiving) entity).rotationYawHead = 0.0F;
+ }
+ RenderManager.instance.playerViewY = 180.0F;
+
+ if (!lighting) ;
+ RenderManager.instance.renderEntityWithPosYaw(entity, 0.0D, 0.0D, 0.0D, 0.0F, 660.0F);
+
+ GL11.glPopMatrix();
+ RenderHelper.disableStandardItemLighting();
+ GL11.glDisable(32826);
+ OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit);
+ GL11.glDisable(3553);
+ OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);
+ }
+
+ public void updateScreen()
+ {
+ super.updateScreen();
+ ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+ this.xParty = (width / 2);
+ this.yParty = (height / 2);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.donator.GuiDonatorMenu
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/donator/GuiDonatorMoa.java b/src/main/java/net/aetherteam/aether/client/gui/donator/GuiDonatorMoa.java
new file mode 100644
index 0000000..dcbadda
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/donator/GuiDonatorMoa.java
@@ -0,0 +1,296 @@
+package net.aetherteam.aether.client.gui.donator;
+
+import cpw.mods.fml.client.FMLClientHandler;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.AetherMoaColour;
+import net.aetherteam.aether.CommonProxy;
+import net.aetherteam.aether.client.gui.social.PartyData;
+import net.aetherteam.aether.donator.Donator;
+import net.aetherteam.aether.donator.DonatorChoice;
+import net.aetherteam.aether.donator.DonatorChoices;
+import net.aetherteam.aether.donator.DonatorTexture;
+import net.aetherteam.aether.donator.EnumChoiceType;
+import net.aetherteam.aether.donator.SyncDonatorList;
+import net.aetherteam.aether.donator.choices.MoaChoice;
+import net.aetherteam.aether.entities.mounts.EntityMoa;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.renderer.OpenGlHelper;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.renderer.RenderHelper;
+import net.minecraft.client.renderer.entity.RenderManager;
+import net.minecraft.client.settings.GameSettings;
+import net.minecraft.client.settings.KeyBinding;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import org.lwjgl.opengl.GL11;
+
+public class GuiDonatorMoa extends GuiScreen
+{
+ private final PartyData pm;
+ private int backgroundTexture;
+ private int xParty;
+ private int yParty;
+ private int wParty;
+ private int hParty;
+ Minecraft f;
+ private EntityPlayer player;
+ private GuiScreen parent;
+ private float rotationY;
+ public float dif = 0.0025F;
+ EntityMoa moaEntity;
+ Donator donator;
+ static int moaIndex = 0;
+ static int colourIndex = 0;
+ MoaChoice choice;
+
+ public GuiDonatorMoa(EntityPlayer player, GuiScreen parent)
+ {
+ this(new PartyData(), player, parent);
+ }
+
+ protected void keyTyped(char charTyped, int keyTyped)
+ {
+ super.keyTyped(charTyped, keyTyped);
+
+ if (keyTyped == Minecraft.getMinecraft().gameSettings.keyBindInventory.keyCode)
+ {
+ this.mc.displayGuiScreen((GuiScreen) null);
+ this.mc.setIngameFocus();
+ }
+ }
+
+ public GuiDonatorMoa(PartyData pm, EntityPlayer player, GuiScreen parent)
+ {
+ this.parent = parent;
+ this.player = player;
+ Aether.getInstance();
+ this.donator = Aether.syncDonatorList.getDonator(player.username);
+ this.mc = FMLClientHandler.instance().getClient();
+ this.pm = pm;
+ this.backgroundTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/choiceMenu.png");
+ this.wParty = 256;
+ this.hParty = 256;
+ updateScreen();
+ }
+
+ public void initGui()
+ {
+ updateScreen();
+ }
+
+ protected void actionPerformed(GuiButton btn)
+ {
+ switch (btn.id)
+ {
+ case 0:
+ this.mc.displayGuiScreen(this.parent);
+ break;
+ case 1:
+ if (this.donator != null)
+ {
+ if (moaIndex >= Aether.donatorChoices.moaChoices.size())
+ {
+ Aether.syncDonatorList.sendTypeRemoveToAll(this.player.username, EnumChoiceType.MOA);
+ this.donator.removeChoiceType(EnumChoiceType.MOA);
+ moaIndex = 0;
+ return;
+ }
+ this.donator.addChoice((DonatorChoice) Aether.donatorChoices.moaChoices.get(moaIndex));
+ Aether.syncDonatorList.sendChoiceToAll(this.player.username, (DonatorChoice) Aether.donatorChoices.moaChoices.get(moaIndex), true);
+
+ moaIndex += 1;
+ }
+ break;
+ case 2:
+ if (this.donator != null)
+ {
+ if (colourIndex >= AetherMoaColour.colours.size())
+ {
+ ((MoaChoice) this.donator.getChoiceFromType(EnumChoiceType.MOA)).setOverrideAll(true);
+ colourIndex = 0;
+ return;
+ }
+ ((MoaChoice) this.donator.getChoiceFromType(EnumChoiceType.MOA)).setOverrideAll(false);
+ ((MoaChoice) this.donator.getChoiceFromType(EnumChoiceType.MOA)).setOverridingColour((AetherMoaColour) AetherMoaColour.colours.get(colourIndex));
+
+ colourIndex += 1;
+ }
+ break;
+ }
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ public void drawScreen(int x, int y, float partialTick)
+ {
+ this.buttonList.clear();
+
+ drawDefaultBackground();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+ int centerX = this.xParty - 97;
+ int centerY = this.yParty - 56;
+
+ ScaledResolution sr = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ drawTexturedModalRect(centerX, centerY, 0, 0, 194, this.hParty);
+
+ this.buttonList.add(new GuiButton(0, this.xParty + 10, this.yParty + 27, 80, 20, "Back"));
+
+ GuiButton typeButton = null;
+ GuiButton overrideButton = null;
+
+ boolean hasChoice = this.donator.containsChoiceType(EnumChoiceType.MOA);
+
+ if (this.donator != null)
+ {
+ this.choice = null;
+
+ if (hasChoice)
+ {
+ this.backgroundTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/choiceMenu.png");
+ this.choice = ((MoaChoice) this.donator.getChoiceFromType(EnumChoiceType.MOA));
+ } else
+ {
+ this.backgroundTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/choiceMenu2.png");
+ }
+
+ this.moaEntity = new EntityMoa(Aether.proxy.getClientWorld(), true, false, false, AetherMoaColour.pickRandomMoa(), Aether.proxy.getClientPlayer(), hasChoice ? this.choice.textureFile.localURL : null);
+
+ typeButton = new GuiButton(1, this.xParty + 10, this.yParty - 35, 80, 20, this.choice != null ? this.choice.name : "Off");
+ overrideButton = new GuiButton(2, this.xParty + 10, this.yParty, 80, 20, this.choice != null ? "None" : this.choice.getOverridingColour() != null ? this.choice.getOverridingColour().name + " Moa" : this.choice.getOverrideAll() ? "All" : "None");
+ }
+
+ if (this.donator == null)
+ {
+ typeButton.enabled = false;
+ overrideButton.enabled = false;
+ }
+
+ if ((this.donator != null) && (!this.donator.containsChoiceType(EnumChoiceType.MOA)))
+ {
+ overrideButton.enabled = false;
+ }
+
+ this.buttonList.add(typeButton);
+ this.buttonList.add(overrideButton);
+
+ super.drawScreen(x, y, partialTick);
+
+ this.mc.renderEngine.resetBoundTexture();
+
+ String header = "Donator Moa";
+ String override = "Override";
+
+ drawString(this.fontRenderer, header, sr.getScaledWidth() / 2 - this.fontRenderer.getStringWidth(header) / 2 + 49, centerY + 10, 15658734);
+ drawString(this.fontRenderer, override, sr.getScaledWidth() / 2 - this.fontRenderer.getStringWidth(override) / 2 + 49, centerY + 45, 15658734);
+
+ if (this.choice != null)
+ {
+ renderMoa(this.moaEntity, Minecraft.getMinecraft(), this.xParty - 40, this.yParty + 35, 30, 1.0F, 1.0F, (this.donator != null) && (this.donator.containsChoiceType(EnumChoiceType.MOA)));
+ }
+ }
+
+ public void drawPlayerOnGui(Minecraft par0Minecraft, int par1, int par2, int par3, float par4, float par5, boolean lighting)
+ {
+ GL11.glEnable(2903);
+ GL11.glPushMatrix();
+ GL11.glTranslatef(par1, par2, 50.0F);
+ GL11.glScalef(20.5F, 20.5F, 50.5F);
+ GL11.glRotatef(180.0F, this.rotationY, 0.0F, 1.0F);
+ float f2 = par0Minecraft.thePlayer.renderYawOffset;
+ float f3 = par0Minecraft.thePlayer.rotationYaw;
+ float f4 = par0Minecraft.thePlayer.rotationPitch;
+ GL11.glRotatef(135.0F, 0.0F, 1.0F, 0.0F);
+ RenderHelper.enableStandardItemLighting();
+ GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F);
+ GL11.glRotatef(-(float) Math.atan(par5 / 40.0F) * 20.0F, 1.0F, 0.0F, 0.0F);
+ par0Minecraft.thePlayer.renderYawOffset = ((float) Math.atan(par4 / 40.0F) * 20.0F);
+ par0Minecraft.thePlayer.rotationYaw = ((float) Math.atan(par4 / 40.0F) * 40.0F);
+ par0Minecraft.thePlayer.rotationPitch = (-(float) Math.atan(par5 / 40.0F) * 20.0F);
+ par0Minecraft.thePlayer.rotationYawHead = par0Minecraft.thePlayer.rotationYaw;
+ GL11.glTranslatef(0.0F, par0Minecraft.thePlayer.yOffset, 0.0F);
+ RenderManager.instance.playerViewY = 180.0F;
+
+ if (!lighting)
+ {
+ GL11.glColor4f(0.35F, 0.35F, 0.35F, 1.0F);
+ }
+
+ RenderManager.instance.renderEntityWithPosYaw(par0Minecraft.thePlayer, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F);
+
+ par0Minecraft.thePlayer.renderYawOffset = f2;
+ par0Minecraft.thePlayer.rotationYaw = f3;
+ par0Minecraft.thePlayer.rotationPitch = f4;
+ GL11.glPopMatrix();
+ RenderHelper.disableStandardItemLighting();
+ GL11.glDisable(32826);
+ OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit);
+ GL11.glDisable(3553);
+ OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);
+ }
+
+ public void renderMoa(Entity entity, Minecraft mc, int x, int y, int scale, float par4, float par5, boolean lighting)
+ {
+ if (this.rotationY > 2.5D)
+ {
+ this.dif = -0.0025F;
+ } else if (this.rotationY < -2.5D)
+ {
+ this.dif = 0.0025F;
+ }
+
+ this.rotationY += this.dif;
+
+ GL11.glEnable(2903);
+ GL11.glPushMatrix();
+ GL11.glTranslatef(x, y, 100.0F);
+ GL11.glScalef(-scale, scale, scale);
+
+ GL11.glRotatef(180.0F, this.rotationY, 0.0F, 1.0F);
+
+ RenderHelper.enableStandardItemLighting();
+
+ if ((entity instanceof EntityLiving))
+ {
+ ((EntityLiving) entity).rotationYawHead = 0.0F;
+ }
+ RenderManager.instance.playerViewY = 180.0F;
+
+ if (!lighting) ;
+ RenderManager.instance.renderEntityWithPosYaw(entity, 0.0D, 0.0D, 0.0D, 0.0F, 660.0F);
+
+ GL11.glPopMatrix();
+ RenderHelper.disableStandardItemLighting();
+ GL11.glDisable(32826);
+ OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit);
+ GL11.glDisable(3553);
+ OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);
+ }
+
+ public void updateScreen()
+ {
+ super.updateScreen();
+ ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+ this.xParty = (width / 2);
+ this.yParty = (height / 2);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.donator.GuiDonatorMoa
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/dungeons/GuiCreateDungeonParty.java b/src/main/java/net/aetherteam/aether/client/gui/dungeons/GuiCreateDungeonParty.java
new file mode 100644
index 0000000..7569792
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/dungeons/GuiCreateDungeonParty.java
@@ -0,0 +1,217 @@
+package net.aetherteam.aether.client.gui.dungeons;
+
+import cpw.mods.fml.client.FMLClientHandler;
+import cpw.mods.fml.common.network.PacketDispatcher;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import net.aetherteam.aether.client.gui.social.PartyData;
+import net.aetherteam.aether.client.gui.social.dialogue.GuiDialogueBox;
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.packets.AetherPacketHandler;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.PartyType;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.aetherteam.aether.tile_entities.TileEntityEntranceController;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.GuiTextField;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.settings.GameSettings;
+import net.minecraft.client.settings.KeyBinding;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.MathHelper;
+import org.lwjgl.opengl.GL11;
+
+public class GuiCreateDungeonParty extends GuiScreen
+{
+ private final PartyData pm;
+ private int backgroundTexture;
+ private int partyCreatedTexture;
+ private int partyX;
+ private int partyY;
+ private int partyW;
+ private int partyH;
+ Minecraft f;
+ private ArrayList partyType = new ArrayList();
+ private int typeIndex = 0;
+ private GuiButton typeButton;
+ private GuiButton finishButton;
+ private GuiButton backButton;
+ private GuiTextField partyNameField;
+ private String partyName = "";
+ private EntityPlayer player;
+ private GuiScreen parent;
+ private TileEntityEntranceController controller;
+
+ public GuiCreateDungeonParty(EntityPlayer player, GuiScreen parent, TileEntityEntranceController controller)
+ {
+ this(new PartyData(), player, parent);
+
+ this.controller = controller;
+ }
+
+ public GuiCreateDungeonParty(PartyData pm, EntityPlayer player, GuiScreen parent)
+ {
+ this.parent = parent;
+
+ this.partyType.add("Open");
+ this.partyType.add("Closed");
+ this.partyType.add("Private");
+
+ this.player = player;
+ this.mc = FMLClientHandler.instance().getClient();
+ this.pm = pm;
+ this.backgroundTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/createParty.png");
+ this.partyCreatedTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/partyCreated.png");
+ this.partyW = 256;
+ this.partyH = 256;
+ updateScreen();
+ }
+
+ public void initGui()
+ {
+ updateScreen();
+ this.buttonList.clear();
+
+ this.typeButton = new GuiButton(1, this.partyX - 60, this.partyY - 16 - 28, 120, 20, "Type: " + (String) this.partyType.get(this.typeIndex));
+ this.finishButton = new GuiButton(2, this.partyX - 60, this.partyY + 6 - 28, 120, 20, "Start Dungeon");
+ this.backButton = new GuiButton(0, this.partyX - 60, this.partyY + 81 - 28, 120, 20, "Back");
+
+ this.buttonList.add(this.typeButton);
+ this.buttonList.add(this.finishButton);
+
+ this.buttonList.add(this.backButton);
+
+ this.partyNameField = new GuiTextField(this.fontRenderer, this.partyX - 55, this.partyY - 64, 107, 16);
+ this.partyNameField.setFocused(true);
+ this.partyNameField.setMaxStringLength(22);
+ this.partyNameField.setText(this.partyName);
+ this.partyNameField.setEnableBackgroundDrawing(false);
+ }
+
+ protected void actionPerformed(GuiButton button)
+ {
+ switch (button.id)
+ {
+ case 0:
+ this.mc.displayGuiScreen(this.parent);
+ break;
+ case 1:
+ this.typeIndex += 1;
+ break;
+ case 2:
+ Party party = new Party(this.partyName, new PartyMember(this.player)).setType(PartyType.getTypeFromString((String) this.partyType.get(this.typeIndex)));
+ boolean created = PartyController.instance().addParty(party, true);
+
+ PacketDispatcher.sendPacketToServer(AetherPacketHandler.sendPartyChange(true, this.partyName, this.player.username, this.player.skinUrl));
+ PacketDispatcher.sendPacketToServer(AetherPacketHandler.sendPartyTypeChange(this.partyName, PartyType.getTypeFromString((String) this.partyType.get(this.typeIndex))));
+
+ if (!created)
+ {
+ this.mc.displayGuiScreen(new GuiDialogueBox(this, "Your party was successfully created!", "Your party name is already taken. Try again.", created));
+ } else if ((this.controller != null) && (this.controller.getDungeon() != null) && (!this.controller.getDungeon().hasQueuedParty()))
+ {
+ int x = MathHelper.floor_double(this.controller.xCoord);
+ int y = MathHelper.floor_double(this.controller.yCoord);
+ int z = MathHelper.floor_double(this.controller.zCoord);
+
+ DungeonHandler.instance().queueParty(this.controller.getDungeon(), party, x, y, z, true);
+ this.mc.displayGuiScreen(null);
+ }
+ break;
+ }
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ public void drawScreen(int x, int y, float partialTick)
+ {
+ this.buttonList.clear();
+
+ if (this.typeIndex > this.partyType.size() - 1)
+ {
+ this.typeIndex = 0;
+ }
+ this.typeButton = new GuiButton(1, this.partyX - 60, this.partyY - 16 - 28, 120, 20, "Type: " + (String) this.partyType.get(this.typeIndex));
+ this.finishButton = new GuiButton(2, this.partyX - 60, this.partyY + 6 - 28, 120, 20, "Start Dungeon");
+
+ if (this.partyName.isEmpty())
+ {
+ this.finishButton.enabled = false;
+ }
+ this.buttonList.add(this.typeButton);
+ this.buttonList.add(this.finishButton);
+ this.buttonList.add(this.backButton);
+
+ drawDefaultBackground();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+ int centerX = this.partyX - 70;
+ int centerY = this.partyY - 84;
+
+ ScaledResolution sr = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ drawTexturedModalRect(centerX, centerY, 0, 0, 141, this.partyH);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+
+ this.mc.renderEngine.resetBoundTexture();
+
+ String headerName = "Dungeon Raid Name";
+
+ drawString(this.fontRenderer, headerName, centerX + 68 - this.fontRenderer.getStringWidth(headerName) / 2, centerY + 5, 16777215);
+
+ this.partyNameField.drawTextBox();
+
+ super.drawScreen(x, y, partialTick);
+ }
+
+ protected void keyTyped(char charTyped, int keyTyped)
+ {
+ if (this.partyNameField.isFocused())
+ {
+ this.partyNameField.textboxKeyTyped(charTyped, keyTyped);
+ this.partyName = this.partyNameField.getText();
+ } else if (keyTyped == Minecraft.getMinecraft().gameSettings.keyBindInventory.keyCode)
+ {
+ this.mc.displayGuiScreen((GuiScreen) null);
+ this.mc.setIngameFocus();
+ }
+
+ super.keyTyped(charTyped, keyTyped);
+ }
+
+ protected void mouseClicked(int par1, int par2, int par3)
+ {
+ this.partyNameField.mouseClicked(par1, par2, par3);
+
+ super.mouseClicked(par1, par2, par3);
+ }
+
+ public void updateScreen()
+ {
+ super.updateScreen();
+ ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+ this.partyX = (width / 2);
+ this.partyY = (height / 2);
+
+ if (this.partyNameField != null) this.partyNameField.updateCursorCounter();
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.dungeons.GuiCreateDungeonParty
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/dungeons/GuiDungeonEntrance.java b/src/main/java/net/aetherteam/aether/client/gui/dungeons/GuiDungeonEntrance.java
new file mode 100644
index 0000000..b8e982d
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/dungeons/GuiDungeonEntrance.java
@@ -0,0 +1,326 @@
+package net.aetherteam.aether.client.gui.dungeons;
+
+import cpw.mods.fml.client.FMLClientHandler;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.tile_entities.TileEntityEntranceController;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.entity.EntityClientPlayerMP;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.GuiTextField;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.multiplayer.NetClientHandler;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.settings.GameSettings;
+import net.minecraft.client.settings.KeyBinding;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.MathHelper;
+import org.lwjgl.opengl.GL11;
+
+public class GuiDungeonEntrance extends GuiScreen
+{
+ private int backgroundTexture;
+ private int easterTexture;
+ private int xParty;
+ private int yParty;
+ private int wParty;
+ private int hParty;
+ Minecraft f;
+ public String[] description;
+ private GuiTextField partyNameField;
+ private EntityPlayer player;
+ private GuiScreen parent;
+ private TileEntityEntranceController controller;
+
+ public GuiDungeonEntrance(EntityPlayer player, GuiScreen parent, TileEntityEntranceController controller)
+ {
+ this.parent = parent;
+ this.player = player;
+ this.mc = FMLClientHandler.instance().getClient();
+ this.backgroundTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/partyMain.png");
+ this.easterTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/partyMain.png");
+ this.wParty = 256;
+ this.hParty = 256;
+ updateScreen();
+
+ this.controller = controller;
+ }
+
+ public void initGui()
+ {
+ updateScreen();
+ this.buttonList.clear();
+
+ List playerList = this.mc.thePlayer.sendQueue.playerInfoList;
+
+ if ((playerList.size() > 1) || (playerList.size() == 0))
+ {
+ this.buttonList.add(new GuiButton(0, this.xParty - 60, this.yParty + 8 - 28, 120, 20, "Enter"));
+ this.buttonList.add(new GuiButton(1, this.xParty - 60, this.yParty + 8 - 28, 120, 20, "Leave"));
+ }
+ }
+
+ protected void actionPerformed(GuiButton button)
+ {
+ Party party = PartyController.instance().getParty(this.player);
+
+ switch (button.id)
+ {
+ case 0:
+ if ((this.controller != null) && (this.controller.getDungeon() != null) && (!this.controller.getDungeon().hasQueuedParty()))
+ {
+ if (party != null)
+ {
+ int x = MathHelper.floor_double(this.controller.xCoord);
+ int y = MathHelper.floor_double(this.controller.yCoord);
+ int z = MathHelper.floor_double(this.controller.zCoord);
+
+ DungeonHandler.instance().queueParty(this.controller.getDungeon(), party, x, y, z, true);
+ this.mc.displayGuiScreen((GuiScreen) null);
+ } else
+ {
+ this.mc.displayGuiScreen(new GuiCreateDungeonParty(this.player, this, this.controller));
+ }
+ }
+ break;
+ case 1:
+ if ((party != null) && (this.controller != null) && (this.controller.getDungeon() != null) && (this.controller.getDungeon().hasMember(PartyController.instance().getMember(this.player))))
+ {
+ DungeonHandler.instance().disbandMember(this.controller.getDungeon(), PartyController.instance().getMember(this.player), true);
+ }
+
+ this.mc.displayGuiScreen((GuiScreen) null);
+ }
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ private boolean isQueuedParty(Party party)
+ {
+ if ((party != null) && (this.controller != null) && (this.controller.getDungeon() != null) && (this.controller.getDungeon().isActive()) && (this.controller.getDungeon().isQueuedParty(party)))
+ {
+ return true;
+ }
+
+ return false;
+ }
+
+ private boolean hasQueuedParty()
+ {
+ if ((this.controller != null) && (this.controller.getDungeon() != null) && (this.controller.getDungeon().isActive()) && (this.controller.getDungeon().hasQueuedParty()))
+ {
+ return true;
+ }
+
+ return false;
+ }
+
+ protected void keyTyped(char charTyped, int keyTyped)
+ {
+ super.keyTyped(charTyped, keyTyped);
+
+ if (keyTyped == Minecraft.getMinecraft().gameSettings.keyBindInventory.keyCode)
+ {
+ this.mc.displayGuiScreen((GuiScreen) null);
+ this.mc.setIngameFocus();
+ }
+ }
+
+ public void drawScreen(int x, int y, float partialTick)
+ {
+ this.buttonList.clear();
+
+ drawDefaultBackground();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+ int centerX = this.xParty - 70;
+ int centerY = this.yParty - 84;
+
+ ScaledResolution sr = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ drawTexturedModalRect(centerX, centerY, 0, 0, 141, this.hParty);
+
+ Party party = PartyController.instance().getParty(this.player);
+ boolean isLeader = PartyController.instance().isLeader(this.player);
+
+ GuiButton sendButton = new GuiButton(0, this.xParty - 59, this.yParty + 55, 55, 20, (party == null) || (party.getSize() <= 1) ? "Enter" : "Send");
+ GuiButton leaveButton = new GuiButton(1, this.xParty + 6 - (hasQueuedParty() ? 32 : 0), this.yParty + 55, 55, 20, "Leave");
+
+ if ((this.controller.getDungeon() != null) && (!this.controller.getDungeon().isActive()) && (this.controller != null))
+ {
+ this.buttonList.add(sendButton);
+
+ if ((party != null) && ((this.controller.getDungeon().isQueuedParty(party)) || (this.controller.getDungeon().hasAnyConqueredDungeon(party.getMembers())) || (!isLeader)))
+ {
+ sendButton.enabled = false;
+ }
+ }
+
+ this.buttonList.add(leaveButton);
+
+ this.mc.renderEngine.resetBoundTexture();
+
+ this.partyNameField = new GuiTextField(this.fontRenderer, this.xParty - 63, this.yParty - 58, 125, 107);
+ this.partyNameField.setFocused(false);
+ this.partyNameField.setMaxStringLength(5000);
+
+ this.partyNameField.drawTextBox();
+
+ drawString(this.fontRenderer, "§f§n§lWARNING!", centerX + 46, centerY + 10, 15658734);
+
+ if ((this.controller != null) && (this.controller.hasDungeon()))
+ {
+ if (((party == null) && (!isLeader)) || ((isLeader) && (party.getSize() <= 1) && (party != null) && (!this.controller.getDungeon().hasAnyConqueredDungeon(party.getMembers())) && (!this.controller.getDungeon().hasQueuedParty())))
+ {
+ GL11.glBindTexture(3553, this.backgroundTexture);
+
+ this.mc.renderEngine.resetBoundTexture();
+
+ this.description = new String[10];
+
+ this.description[0] = "You are attempting the";
+ this.description[1] = "Slider's Labyrinth on";
+ this.description[2] = "your own. This dungeon";
+ this.description[3] = "is a very dangerous";
+ this.description[4] = "place, and you could";
+ this.description[5] = "lose all your items as";
+ this.description[6] = "a result.";
+ this.description[7] = "";
+ this.description[8] = "Are you prepared to";
+ this.description[9] = "enter these depths?";
+
+ int count = 0;
+
+ for (String string : this.description)
+ {
+ drawString(this.fontRenderer, string, centerX + 70 - this.fontRenderer.getStringWidth(string) / 2, centerY + 30 + count * 10, 15658734);
+ count++;
+ }
+ } else
+ {
+ this.mc.renderEngine.resetBoundTexture();
+
+ ArrayList members = new ArrayList();
+
+ if (party != null)
+ {
+ members = party.getMembers();
+ }
+
+ if ((this.controller.getDungeon().hasQueuedParty()) && ((!this.controller.getDungeon().isQueuedParty(party)) || ((this.controller.getDungeon().isQueuedParty(party)) && (!this.controller.getDungeon().hasMember(PartyController.instance().getMember(this.player))))))
+ {
+ this.description = new String[6];
+
+ this.description[0] = "Sorry, but at this time";
+ this.description[1] = "the dungeon is occupied";
+
+ if ((this.controller.getDungeon().isQueuedParty(party)) && (!this.controller.getDungeon().hasMember(PartyController.instance().getMember(this.player))))
+ {
+ this.description[2] = "by your party.";
+ } else this.description[2] = "by another party.";
+
+ this.description[3] = "";
+ this.description[4] = "Please come back at";
+ this.description[5] = "a later time.";
+ } else if ((this.controller.getDungeon().isQueuedParty(party)) && (this.controller.getDungeon().hasMember(PartyController.instance().getMember(this.player))))
+ {
+ if (this.controller.getDungeon().isActive())
+ {
+ this.description = new String[8];
+
+ this.description[0] = "Would you like to";
+ this.description[1] = "leave this dungeon?";
+ this.description[2] = "";
+ this.description[3] = (3 - this.controller.getDungeon().getMemberLeaves(PartyController.instance().getMember(this.player)) + "/3 Quits Left");
+ this.description[4] = "";
+ this.description[5] = "Each dungeon can only";
+ this.description[6] = "be left 3 times before";
+ this.description[7] = "it becomes unusable.";
+ } else
+ {
+ this.description = new String[7];
+
+ this.description[0] = "Your party has been";
+ this.description[1] = "queued into this";
+ this.description[2] = "dungeon.";
+ this.description[3] = "";
+ this.description[4] = "Please wait for others";
+ this.description[5] = "to accept the dungeon";
+ this.description[6] = "queue.";
+ }
+ } else if (this.controller.getDungeon().hasAnyConqueredDungeon(members))
+ {
+ this.description = new String[8];
+
+ this.description[0] = "Sorry, but this";
+ this.description[1] = "dungeon has already";
+ this.description[2] = "been conquered by";
+ this.description[3] = "someone in your";
+ this.description[4] = "party.";
+ this.description[5] = "";
+ this.description[6] = "Please search for";
+ this.description[7] = "another one.";
+ } else if (isLeader)
+ {
+ this.description = new String[7];
+
+ this.description[0] = "Would you like to";
+ this.description[1] = "attempt the Slider's";
+ this.description[2] = "Labyrinth with your";
+ this.description[3] = "party? If so:";
+ this.description[4] = "";
+ this.description[5] = "Send requests to";
+ this.description[6] = "your members?";
+ } else
+ {
+ this.description = new String[8];
+
+ this.description[0] = "Would you like to";
+ this.description[1] = "attempt the Slider's";
+ this.description[2] = "Labyrinth with your";
+ this.description[3] = "party? If so:";
+ this.description[4] = "";
+ this.description[5] = "Ask your leader";
+ this.description[6] = "to start a dungeon";
+ this.description[7] = "queue at this door.";
+ }
+
+ int count = 0;
+
+ for (String string : this.description)
+ {
+ drawString(this.fontRenderer, string, centerX + 70 - this.fontRenderer.getStringWidth(string) / 2, centerY + (isLeader ? 30 : 40) + count * 10, 15658734);
+ count++;
+ }
+ }
+ }
+
+ super.drawScreen(x, y, partialTick);
+ }
+
+ public void updateScreen()
+ {
+ super.updateScreen();
+ ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+ this.xParty = (width / 2);
+ this.yParty = (height / 2);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.dungeons.GuiDungeonEntrance
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/menu/GuiAetherIIButton.java b/src/main/java/net/aetherteam/aether/client/gui/menu/GuiAetherIIButton.java
new file mode 100644
index 0000000..f30b342
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/menu/GuiAetherIIButton.java
@@ -0,0 +1,136 @@
+package net.aetherteam.aether.client.gui.menu;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.renderer.RenderEngine;
+import org.lwjgl.opengl.GL11;
+
+@SideOnly(Side.CLIENT)
+public class GuiAetherIIButton extends GuiButton
+{
+ private int color;
+ private int color2;
+ public int scrollMax = 100;
+ public int scrollHeight = this.scrollMax;
+ public int scrollMin = 115;
+ public int scrollCrop = 20;
+ public int scrollCropMax = 90;
+ public boolean retracting = false;
+
+ public GuiAetherIIButton(int i, int j, int k, String s)
+ {
+ super(i, j, k, s);
+ this.color = 0;
+ this.color2 = 0;
+ }
+
+ public GuiAetherIIButton(int i, int j, int k, int color, int color2)
+ {
+ super(i, j, k, "Official Aether Servers");
+ this.color = color;
+ this.color2 = color;
+ }
+
+ public GuiAetherIIButton(int i, int j, int k, int l, int i1, String s)
+ {
+ super(i, j, k, l, i1, s);
+ this.color = 0;
+ this.color2 = this.color;
+ this.enabled = true;
+ this.drawButton = true;
+ }
+
+ protected int getHoverState(boolean flag)
+ {
+ byte byte0 = 1;
+
+ if (!this.enabled)
+ {
+ byte0 = 0;
+ } else if (flag)
+ {
+ if (byte0 < 2)
+ {
+ byte0 = (byte) (byte0 + 1);
+ }
+ if (this.scrollCrop < this.scrollCropMax)
+ {
+ this.scrollCrop += 1;
+ }
+ if (this.scrollHeight < this.scrollMin) this.scrollHeight += 1;
+ } else
+ {
+ if (this.scrollCrop > this.scrollCropMax)
+ {
+ this.scrollCrop -= 1;
+ }
+ if (this.scrollHeight > this.scrollMax) this.scrollHeight -= 1;
+ if (this.scrollHeight == this.scrollMax)
+ {
+ this.retracting = false;
+ }
+ }
+ return byte0;
+ }
+
+ public void drawButton(Minecraft minecraft, int i, int j)
+ {
+ if (!this.drawButton)
+ {
+ return;
+ }
+
+ GL11.glEnable(3042);
+ GL11.glBlendFunc(770, 771);
+
+ FontRenderer fontrenderer = minecraft.fontRenderer;
+ GL11.glBindTexture(3553, minecraft.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/menu/aether2_buttons.png"));
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ boolean flag = (i >= this.xPosition) && (j >= this.yPosition) && (i < this.xPosition + this.width) && (j < this.yPosition + this.height);
+ int k = getHoverState(flag);
+ drawTexturedModalRect(this.xPosition + this.scrollHeight - 90, this.yPosition, 0, 46 + k * 20, this.width / 2, this.height);
+ drawTexturedModalRect(this.xPosition + this.scrollHeight + this.width / 2 - 90, this.yPosition, 200 - this.width / 2, 46 + k * 20, this.width / 2, this.height);
+ mouseDragged(minecraft, i, j);
+
+ GL11.glDisable(3042);
+
+ minecraft.renderEngine.resetBoundTexture();
+
+ if (!this.enabled)
+ {
+ drawString(fontrenderer, this.displayString, this.xPosition + this.width / 10 + this.scrollHeight - 80, this.yPosition + (this.height - 8) / 2, -6250336);
+ } else if (flag)
+ {
+ drawString(fontrenderer, this.displayString, this.xPosition + this.width / 10 + this.scrollHeight - 80, this.yPosition + (this.height - 8) / 2, 7851212);
+ } else
+ {
+ drawString(fontrenderer, this.displayString, this.xPosition + this.width / 10 + this.scrollHeight - 80, this.yPosition + (this.height - 8) / 2, 14737632);
+ }
+ if ((this.color != 0) || (this.color2 != 0)) if (flag)
+ {
+ drawString(fontrenderer, this.displayString, this.xPosition + this.width / 10 + this.scrollHeight - 80, this.yPosition + (this.height - 8) / 2, this.color);
+ } else
+ drawString(fontrenderer, this.displayString, this.xPosition + this.width / 10 + this.scrollHeight - 80, this.yPosition + (this.height - 8) / 2, this.color2);
+ }
+
+ protected void mouseDragged(Minecraft var1, int var2, int var3)
+ {
+ }
+
+ public void mouseReleased(int var1, int var2)
+ {
+ }
+
+ public boolean mousePressed(Minecraft var1, int var2, int var3)
+ {
+ return (this.enabled) && (this.drawButton) && (var2 >= this.xPosition) && (var3 >= this.yPosition) && (var2 < this.xPosition + this.width) && (var3 < this.yPosition + this.height);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.menu.GuiAetherIIButton
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/social/GuiCreateParty.java b/src/main/java/net/aetherteam/aether/client/gui/social/GuiCreateParty.java
new file mode 100644
index 0000000..4bdf219
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/social/GuiCreateParty.java
@@ -0,0 +1,193 @@
+package net.aetherteam.aether.client.gui.social;
+
+import cpw.mods.fml.client.FMLClientHandler;
+import cpw.mods.fml.common.network.PacketDispatcher;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import net.aetherteam.aether.client.gui.social.dialogue.GuiDialogueBox;
+import net.aetherteam.aether.packets.AetherPacketHandler;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.PartyType;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.GuiTextField;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.settings.GameSettings;
+import net.minecraft.client.settings.KeyBinding;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import org.lwjgl.opengl.GL11;
+
+public class GuiCreateParty extends GuiScreen
+{
+ private final PartyData pm;
+ private int backgroundTexture;
+ private int partyCreatedTexture;
+ private int partyX;
+ private int partyY;
+ private int partyW;
+ private int partyH;
+ Minecraft f;
+ private ArrayList partyType = new ArrayList();
+ private int typeIndex = 0;
+ private GuiButton typeButton;
+ private GuiButton finishButton;
+ private GuiButton backButton;
+ private GuiTextField partyNameField;
+ private String partyName = "";
+ private EntityPlayer player;
+ private GuiScreen parent;
+
+ public GuiCreateParty(EntityPlayer player, GuiScreen parent)
+ {
+ this(new PartyData(), player, parent);
+ }
+
+ public GuiCreateParty(PartyData pm, EntityPlayer player, GuiScreen parent)
+ {
+ this.parent = parent;
+
+ this.partyType.add("Open");
+ this.partyType.add("Closed");
+ this.partyType.add("Private");
+
+ this.player = player;
+ this.mc = FMLClientHandler.instance().getClient();
+ this.pm = pm;
+ this.backgroundTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/createParty.png");
+ this.partyCreatedTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/partyCreated.png");
+ this.partyW = 256;
+ this.partyH = 256;
+ updateScreen();
+ }
+
+ public void initGui()
+ {
+ updateScreen();
+ this.buttonList.clear();
+
+ this.typeButton = new GuiButton(1, this.partyX - 60, this.partyY - 16 - 28, 120, 20, "Type: " + (String) this.partyType.get(this.typeIndex));
+ this.finishButton = new GuiButton(2, this.partyX - 60, this.partyY + 6 - 28, 120, 20, "Finish Party");
+ this.backButton = new GuiButton(0, this.partyX - 60, this.partyY + 81 - 28, 120, 20, "Back");
+
+ this.buttonList.add(this.typeButton);
+ this.buttonList.add(this.finishButton);
+
+ this.buttonList.add(this.backButton);
+
+ this.partyNameField = new GuiTextField(this.fontRenderer, this.partyX - 55, this.partyY - 64, 107, 16);
+ this.partyNameField.setFocused(true);
+ this.partyNameField.setMaxStringLength(22);
+ this.partyNameField.setText(this.partyName);
+ this.partyNameField.setEnableBackgroundDrawing(false);
+ }
+
+ protected void actionPerformed(GuiButton button)
+ {
+ switch (button.id)
+ {
+ case 0:
+ this.mc.displayGuiScreen(this.parent);
+ break;
+ case 1:
+ this.typeIndex += 1;
+ break;
+ case 2:
+ Party party = new Party(this.partyName, new PartyMember(this.player)).setType(PartyType.getTypeFromString((String) this.partyType.get(this.typeIndex)));
+ boolean created = PartyController.instance().addParty(party, true);
+
+ PacketDispatcher.sendPacketToServer(AetherPacketHandler.sendPartyChange(true, this.partyName, this.player.username, this.player.skinUrl));
+ PacketDispatcher.sendPacketToServer(AetherPacketHandler.sendPartyTypeChange(this.partyName, PartyType.getTypeFromString((String) this.partyType.get(this.typeIndex))));
+
+ this.mc.displayGuiScreen(new GuiDialogueBox(this.parent, "Your party was successfully created!", "Your party name is already taken. Sorry :(", created));
+ }
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ public void drawScreen(int x, int y, float partialTick)
+ {
+ this.buttonList.clear();
+
+ if (this.typeIndex > this.partyType.size() - 1)
+ {
+ this.typeIndex = 0;
+ }
+ this.typeButton = new GuiButton(1, this.partyX - 60, this.partyY - 16 - 28, 120, 20, "Type: " + (String) this.partyType.get(this.typeIndex));
+ this.finishButton = new GuiButton(2, this.partyX - 60, this.partyY + 6 - 28, 120, 20, "Finish Party");
+
+ if (this.partyName.isEmpty())
+ {
+ this.finishButton.enabled = false;
+ }
+ this.buttonList.add(this.typeButton);
+ this.buttonList.add(this.finishButton);
+ this.buttonList.add(this.backButton);
+
+ drawDefaultBackground();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+ int centerX = this.partyX - 70;
+ int centerY = this.partyY - 84;
+
+ ScaledResolution sr = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ drawTexturedModalRect(centerX, centerY, 0, 0, 141, this.partyH);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+
+ this.mc.renderEngine.resetBoundTexture();
+ drawString(this.fontRenderer, "Insert Party Name", centerX + 68 - this.fontRenderer.getStringWidth("Insert Party Name") / 2, centerY + 5, 16777215);
+
+ this.partyNameField.drawTextBox();
+
+ super.drawScreen(x, y, partialTick);
+ }
+
+ protected void keyTyped(char charTyped, int keyTyped)
+ {
+ if (this.partyNameField.isFocused())
+ {
+ this.partyNameField.textboxKeyTyped(charTyped, keyTyped);
+ this.partyName = this.partyNameField.getText();
+ } else if (keyTyped == Minecraft.getMinecraft().gameSettings.keyBindInventory.keyCode)
+ {
+ this.mc.displayGuiScreen((GuiScreen) null);
+ this.mc.setIngameFocus();
+ }
+
+ super.keyTyped(charTyped, keyTyped);
+ }
+
+ protected void mouseClicked(int par1, int par2, int par3)
+ {
+ this.partyNameField.mouseClicked(par1, par2, par3);
+
+ super.mouseClicked(par1, par2, par3);
+ }
+
+ public void updateScreen()
+ {
+ super.updateScreen();
+ ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+ this.partyX = (width / 2);
+ this.partyY = (height / 2);
+
+ if (this.partyNameField != null) this.partyNameField.updateCursorCounter();
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.social.GuiCreateParty
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/social/GuiDungeonScreen.java b/src/main/java/net/aetherteam/aether/client/gui/social/GuiDungeonScreen.java
new file mode 100644
index 0000000..654984d
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/social/GuiDungeonScreen.java
@@ -0,0 +1,160 @@
+package net.aetherteam.aether.client.gui.social;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.settings.GameSettings;
+import net.minecraft.client.settings.KeyBinding;
+import net.minecraft.util.StringUtils;
+import org.lwjgl.opengl.GL11;
+
+public class GuiDungeonScreen extends GuiScreen
+{
+ private int background;
+ private Minecraft f;
+ private GuiButton readyUpButton;
+ private boolean isPlayerReady;
+ private String readyString;
+ private String notReadyString;
+ private int difficulty;
+
+ public GuiDungeonScreen(Minecraft mc)
+ {
+ this.mc = mc;
+ this.isPlayerReady = false;
+ this.notReadyString = "CANCEL READY";
+ this.readyString = "READY UP";
+ this.background = mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/loadingScreen.png");
+ }
+
+ public void drawScreen(int par1, int par2, float par3)
+ {
+ drawBackground(0);
+ GL11.glBindTexture(3553, this.background);
+ drawTexturedModalRect(14, 14, 7, 7, 162, 152);
+ drawParty();
+ this.mc.renderEngine.resetBoundTexture();
+ super.drawScreen(par1, par2, par3);
+ }
+
+ protected void keyTyped(char charTyped, int keyTyped)
+ {
+ super.keyTyped(charTyped, keyTyped);
+
+ if (keyTyped == Minecraft.getMinecraft().gameSettings.keyBindInventory.keyCode)
+ {
+ this.mc.displayGuiScreen((GuiScreen) null);
+ this.mc.setIngameFocus();
+ }
+ }
+
+ public void drawParty()
+ {
+ GL11.glBindTexture(3553, this.background);
+ Party party = PartyController.instance().getParty(this.mc.thePlayer);
+ ArrayList members = party != null ? party.getMembers() : null;
+ int count = 0;
+ int xcount = 0;
+ if (members != null)
+ {
+ for (int i1 = 0; i1 < members.size(); i1++)
+ {
+ if (i1 == 4) xcount = 2;
+ else if ((i1 > 4) && (i1 < 8)) xcount = 3;
+ else if ((i1 > 8) && (i1 < 12)) xcount = 4;
+ else xcount = 1;
+ }
+ for (int i = 0; i < members.size(); i++)
+ {
+ drawTexturedModalRect(85 + xcount * 10, 21 + i * 16, 7, 160, 6, 6);
+ }
+ for (PartyMember member : members)
+ {
+ drawPlayerHead(85 + xcount * 10, 16 + count * 20, member.username);
+ this.mc.renderEngine.resetBoundTexture();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(0.5F, 0.5F, 0.0F);
+ GL11.glScalef(0.5F, 0.5F, 0.0F);
+ this.fontRenderer.drawString(member.username, 169, 30 + count * 32, 16777062);
+ GL11.glPopMatrix();
+ count++;
+ }
+ }
+ }
+
+ public void drawPlayerHead(int x, int y, String playername)
+ {
+ int icon = this.mc.renderEngine.getTextureForDownloadableImage("http://skins.minecraft.net/MinecraftSkins/" + StringUtils.stripControlCodes(playername) + ".png", "/mob/char.png");
+
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, icon);
+ GL11.glEnable(3553);
+
+ GL11.glPushMatrix();
+ float u = 0.125F;
+ float v = 0.25F;
+ float u1 = 0.25F;
+ float v1 = 0.5F;
+ GL11.glScalef(0.8F, 0.8F, 1.0F);
+ GL11.glBegin(7);
+ GL11.glTexCoord2f(u, v);
+ GL11.glVertex2f(x + 2, y + 2);
+ GL11.glTexCoord2f(u, v1);
+ GL11.glVertex2f(x + 2, y + 18);
+ GL11.glTexCoord2f(u1, v1);
+ GL11.glVertex2f(x + 18, y + 18);
+ GL11.glTexCoord2f(u1, v);
+ GL11.glVertex2f(x + 18, y + 2);
+ GL11.glEnd();
+ GL11.glPopMatrix();
+ }
+
+ public void drawBackground(int par1)
+ {
+ GL11.glDisable(2896);
+ GL11.glDisable(2912);
+ Tessellator tessellator = Tessellator.instance;
+ this.mc.renderEngine.bindTexture("/net/aetherteam/aether/client/sprites/gui/loadingScreenBackground.png");
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ float f = 32.0F;
+ tessellator.startDrawingQuads();
+ tessellator.setColorOpaque_F(0.7F, 0.7F, 0.7F);
+ tessellator.addVertexWithUV(0.0D, this.height, 0.0D, 0.0D, this.height / f + par1);
+ tessellator.addVertexWithUV(this.width, this.height, 0.0D, this.width / f, this.height / f + par1);
+ tessellator.addVertexWithUV(this.width, 0.0D, 0.0D, this.width / f, par1);
+ tessellator.addVertexWithUV(0.0D, 0.0D, 0.0D, 0.0D, par1);
+ tessellator.draw();
+ }
+
+ public void updateScreen()
+ {
+ super.updateScreen();
+ this.buttonList.clear();
+ this.readyUpButton = new GuiButton(0, 14, 170, 200, 20, this.isPlayerReady ? this.notReadyString : this.readyString);
+ this.buttonList.add(this.readyUpButton);
+ }
+
+ protected void actionPerformed(GuiButton par1GuiButton)
+ {
+ int id = par1GuiButton.id;
+ switch (id)
+ {
+ case 0:
+ this.isPlayerReady = (!this.isPlayerReady);
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.social.GuiDungeonScreen
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/social/GuiEditPartyName.java b/src/main/java/net/aetherteam/aether/client/gui/social/GuiEditPartyName.java
new file mode 100644
index 0000000..68b3133
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/social/GuiEditPartyName.java
@@ -0,0 +1,161 @@
+package net.aetherteam.aether.client.gui.social;
+
+import cpw.mods.fml.client.FMLClientHandler;
+
+import java.util.List;
+
+import net.aetherteam.aether.client.gui.social.dialogue.GuiDialogueBox;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.GuiTextField;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.settings.GameSettings;
+import net.minecraft.client.settings.KeyBinding;
+import net.minecraft.entity.player.EntityPlayer;
+import org.lwjgl.input.Keyboard;
+import org.lwjgl.opengl.GL11;
+
+public class GuiEditPartyName extends GuiScreen
+{
+ private GuiTextField dialogueInput;
+ private String name = "Aether Party";
+ private int dialogueTexture;
+ private int xParty;
+ private int yParty;
+ private int wParty;
+ private int hParty;
+ Minecraft f;
+ private GuiScreen parent;
+ private EntityPlayer player;
+
+ public GuiEditPartyName(EntityPlayer player, GuiScreen parent)
+ {
+ this(new PartyData(), player, parent);
+ }
+
+ public GuiEditPartyName(PartyData pm, EntityPlayer player, GuiScreen parent)
+ {
+ this.parent = parent;
+ this.player = player;
+ this.mc = FMLClientHandler.instance().getClient();
+ this.dialogueTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/dialogue.png");
+ this.wParty = 256;
+ this.hParty = 256;
+ updateScreen();
+ }
+
+ public void initGui()
+ {
+ Keyboard.enableRepeatEvents(true);
+ updateScreen();
+ this.buttonList.clear();
+ this.dialogueInput = new GuiTextField(this.fontRenderer, this.xParty - 88 + this.fontRenderer.getStringWidth(this.name), this.yParty - 7, 193 - this.fontRenderer.getStringWidth(this.name) - 10, 16);
+ this.dialogueInput.setFocused(true);
+ this.dialogueInput.setMaxStringLength(22);
+ this.dialogueInput.setCanLoseFocus(false);
+ this.buttonList.add(new GuiButton(0, this.xParty - 1, this.yParty + 14, 50, 20, "Confirm"));
+ this.buttonList.add(new GuiButton(1, this.xParty + 52, this.yParty + 14, 45, 20, "Cancel"));
+ }
+
+ protected void keyTyped(char charTyped, int keyTyped)
+ {
+ if (this.dialogueInput.isFocused())
+ {
+ this.dialogueInput.textboxKeyTyped(charTyped, keyTyped);
+ } else if (keyTyped == Minecraft.getMinecraft().gameSettings.keyBindInventory.keyCode)
+ {
+ this.mc.displayGuiScreen((GuiScreen) null);
+ this.mc.setIngameFocus();
+ }
+
+ super.keyTyped(charTyped, keyTyped);
+ }
+
+ protected void mouseClicked(int par1, int par2, int par3)
+ {
+ this.dialogueInput.mouseClicked(par1, par2, par3);
+ super.mouseClicked(par1, par2, par3);
+ }
+
+ protected void actionPerformed(GuiButton button)
+ {
+ switch (button.id)
+ {
+ case 0:
+ Party party = PartyController.instance().getParty(this.player);
+ boolean isLeader = PartyController.instance().isLeader(this.player);
+
+ if (isLeader)
+ {
+ if (party != null)
+ {
+ String partyName = party.getName();
+
+ boolean nameChanged = PartyController.instance().changePartyName(party, this.dialogueInput.getText(), true);
+
+ this.mc.displayGuiScreen(new GuiDialogueBox(this.parent, "Party name was changed to '" + this.dialogueInput.getText() + "'!", "That party name is already taken. Sorry :(", nameChanged));
+ }
+ }
+ break;
+ case 1:
+ this.mc.displayGuiScreen(this.parent);
+ }
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ public void drawScreen(int x, int y, float partialTick)
+ {
+ drawDefaultBackground();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ int centerX = this.xParty - 70;
+ int centerY = this.yParty - 84;
+
+ ScaledResolution sr = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ int totalHeight = 0;
+ int slotW = 100;
+ int slotH = 20;
+ int gutter = 2;
+ GL11.glEnable(3089);
+ GL11.glScissor((centerX + 14) * sr.getScaleFactor(), (centerY + 35) * sr.getScaleFactor(), slotW * sr.getScaleFactor(), 103 * sr.getScaleFactor());
+ GL11.glPushMatrix();
+
+ totalHeight = 0;
+ GL11.glPopMatrix();
+ GL11.glDisable(3089);
+ drawGradientRect(0, 0, this.width, this.height, -1728053248, -1728053248);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, this.dialogueTexture);
+ drawTexturedModalRect(centerX - 30, centerY + 71, 0, 0, 201, this.hParty - 201);
+ this.dialogueInput.drawTextBox();
+ this.fontRenderer.drawString("Change Party Name", (int) ((centerX + this.height) / 0.75F), (int) ((centerY + 12.0F) / 0.75F), -10066330);
+ super.drawScreen(x, y, partialTick);
+ }
+
+ public void updateScreen()
+ {
+ super.updateScreen();
+ if (this.dialogueInput != null)
+ {
+ this.dialogueInput.updateCursorCounter();
+ }
+ ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+ this.xParty = (width / 2);
+ this.yParty = (height / 2);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.social.GuiEditPartyName
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/social/GuiJoinParty.java b/src/main/java/net/aetherteam/aether/client/gui/social/GuiJoinParty.java
new file mode 100644
index 0000000..5f97bca
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/social/GuiJoinParty.java
@@ -0,0 +1,293 @@
+package net.aetherteam.aether.client.gui.social;
+
+import cpw.mods.fml.client.FMLClientHandler;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.PartyType;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.audio.SoundManager;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.settings.GameSettings;
+import net.minecraft.client.settings.KeyBinding;
+import net.minecraft.entity.player.EntityPlayer;
+import org.lwjgl.input.Keyboard;
+import org.lwjgl.input.Mouse;
+import org.lwjgl.opengl.GL11;
+
+public class GuiJoinParty extends GuiScreen
+{
+ private GuiYSlider sbar;
+ private float sbarVal = 0.0F;
+ private int backgroundTexture;
+ private int dialogueTexture;
+ private int xParty;
+ private int yParty;
+ private int wParty;
+ private int hParty;
+ private GuiScreen parent;
+ private ArrayList partySlots = new ArrayList();
+ Minecraft f;
+ private int totalHeight;
+ private GuiPartySlot selectedPartySlot;
+ private boolean slotsCreated = false;
+ private boolean slotIsSelected = false;
+ private GuiButton joinButton;
+ private EntityPlayer player;
+
+ public GuiJoinParty(EntityPlayer player, GuiScreen parent)
+ {
+ this.player = player;
+ this.mc = FMLClientHandler.instance().getClient();
+ this.backgroundTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/party.png");
+ this.dialogueTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/dialogue.png");
+ this.wParty = 256;
+ this.hParty = 256;
+ this.parent = parent;
+ updateScreen();
+ }
+
+ protected void keyTyped(char charTyped, int keyTyped)
+ {
+ super.keyTyped(charTyped, keyTyped);
+
+ if (keyTyped == Minecraft.getMinecraft().gameSettings.keyBindInventory.keyCode)
+ {
+ this.mc.displayGuiScreen((GuiScreen) null);
+ this.mc.setIngameFocus();
+ }
+ }
+
+ public void initGui()
+ {
+ Keyboard.enableRepeatEvents(true);
+ updateScreen();
+ if (this.sbar != null) this.sbarVal = this.sbar.sliderValue;
+ this.sbar = new GuiYSlider(-1, this.xParty + 46, this.yParty - 54, 10, 103);
+ this.sbar.sliderValue = this.sbarVal;
+ }
+
+ protected void mouseClicked(int par1, int par2, int par3)
+ {
+ if (par3 == 0)
+ {
+ if (this.totalHeight > 103)
+ {
+ this.sbar.mousePressed(this.mc, par1, par2);
+ }
+ for (int l = 0; l < this.partySlots.size(); l++)
+ {
+ int y = (int) (par2 + this.sbar.sliderValue * (this.totalHeight - 103));
+
+ GuiPartySlot partySlot = (GuiPartySlot) this.partySlots.get(l);
+
+ if ((partySlot.mousePressed(this.mc, par1, y)) && (par2 < this.yParty + 50))
+ {
+ if (partySlot.party.getType() != PartyType.OPEN)
+ {
+ this.mc.sndManager.playSoundFX("random.click", 1.0F, 1.5F);
+ return;
+ }
+ partySlot.selected = true;
+ this.slotIsSelected = true;
+ this.selectedPartySlot = partySlot;
+ this.mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
+
+ for (int rr = 0; rr < this.partySlots.size(); rr++)
+ {
+ GuiPartySlot partySlot2 = (GuiPartySlot) this.partySlots.get(rr);
+
+ if (partySlot2 != partySlot)
+ {
+ partySlot2.selected = false;
+ }
+ }
+
+ return;
+ }
+ partySlot.selected = false;
+ this.slotIsSelected = false;
+ }
+
+ }
+
+ super.mouseClicked(par1, par2, par3);
+ }
+
+ protected void mouseMovedOrUp(int par1, int par2, int par3)
+ {
+ if (par3 == 0) this.sbar.mouseReleased(par1, par2);
+ super.mouseMovedOrUp(par1, par2, par3);
+ }
+
+ protected void actionPerformed(GuiButton button)
+ {
+ switch (button.id)
+ {
+ case 0:
+ this.mc.displayGuiScreen(this.parent);
+ break;
+ case 1:
+ PartyController.instance().joinParty(this.selectedPartySlot.party, new PartyMember(this.player), true);
+
+ this.mc.displayGuiScreen(this.parent);
+ }
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ public void drawScreen(int x, int y, float partialTick)
+ {
+ this.buttonList.clear();
+
+ ArrayList properList = (ArrayList) PartyController.instance().getParties().clone();
+ ArrayList partyList = new ArrayList();
+
+ for (Party party : properList)
+ {
+ if (party.getType() != PartyType.PRIVATE)
+ {
+ partyList.add(party);
+ }
+ }
+
+ if (partyList.size() != this.partySlots.size())
+ {
+ this.partySlots.clear();
+ this.slotsCreated = false;
+ }
+
+ if ((this.selectedPartySlot != null) && (this.selectedPartySlot.party.getType() != PartyType.OPEN))
+ {
+ this.selectedPartySlot.selected = false;
+ this.slotIsSelected = false;
+ this.selectedPartySlot = null;
+ }
+
+ drawDefaultBackground();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+ int dmsy = Mouse.getDWheel();
+ this.sbar.sliderValue -= dmsy / 1000.0F;
+ if (this.sbar.sliderValue > 1.0F) this.sbar.sliderValue = 1.0F;
+ if (this.sbar.sliderValue < 0.0F) this.sbar.sliderValue = 0.0F;
+ int centerX = this.xParty - 70;
+ int centerY = this.yParty - 84;
+
+ ScaledResolution sr = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ drawTexturedModalRect(centerX, centerY, 0, 0, 141, this.hParty);
+ this.totalHeight = 0;
+ int slotW = 100;
+ int slotH = 20;
+ int gutter = 2;
+ GL11.glEnable(3089);
+ GL11.glScissor((centerX + 14) * sr.getScaleFactor(), (centerY + 35) * sr.getScaleFactor(), slotW * sr.getScaleFactor(), 103 * sr.getScaleFactor());
+ GL11.glPushMatrix();
+ this.totalHeight = (partyList.size() * (slotH + gutter));
+ float sVal = -this.sbar.sliderValue * (this.totalHeight - 105);
+ if (this.totalHeight > 103)
+ {
+ GL11.glTranslatef(0.0F, sVal, 0.0F);
+ }
+ this.totalHeight = 0;
+
+ if (!this.slotsCreated)
+ {
+ for (int i = 0; i < partyList.size(); i++)
+ {
+ if (((Party) partyList.get(i)).getType() != PartyType.PRIVATE)
+ {
+ this.partySlots.add(new GuiPartySlot((Party) partyList.get(i), this.partySlots.size(), centerX + 15, centerY + this.totalHeight + 30, slotW, slotH));
+
+ this.totalHeight += slotH + gutter;
+ }
+ }
+
+ this.slotsCreated = true;
+ }
+
+ boolean showNoParties = true;
+
+ for (int i = 0; i < this.partySlots.size(); i++)
+ {
+ if (((GuiPartySlot) this.partySlots.get(i)).party.getType() != PartyType.PRIVATE)
+ {
+ showNoParties = false;
+
+ ((GuiPartySlot) this.partySlots.get(i)).drawPartySlot(centerX + 15, centerY + this.totalHeight + 30, slotW, slotH);
+
+ this.totalHeight += slotH + gutter;
+ }
+ }
+
+ GL11.glPopMatrix();
+ GL11.glDisable(3089);
+
+ if (this.totalHeight > 103)
+ {
+ this.sbar.drawButton(this.mc, x, y);
+ }
+
+ this.mc.renderEngine.resetBoundTexture();
+ drawString(this.fontRenderer, "Party List", centerX + 70 - this.fontRenderer.getStringWidth("Party List") / 2, centerY + 10, 16777215);
+
+ if ((partyList.size() == 0) || (showNoParties))
+ {
+ GL11.glPushMatrix();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, this.dialogueTexture);
+
+ float scaleFactor = 1.3F;
+
+ GL11.glTranslatef(this.xParty - 100.0F * scaleFactor, this.yParty - (this.hParty - 201) / 2 * scaleFactor, 0.0F);
+
+ GL11.glScalef(scaleFactor, scaleFactor, scaleFactor);
+
+ drawTexturedModalRect(0, 0, 0, 0, 201, this.hParty - 201);
+ GL11.glPopMatrix();
+ this.mc.renderEngine.resetBoundTexture();
+
+ String warningLabel = "There are no parties to display at this time.";
+
+ drawString(this.fontRenderer, warningLabel, centerX + 70 - this.fontRenderer.getStringWidth(warningLabel) / 2, centerY + 75, 16777215);
+ }
+
+ this.joinButton = new GuiButton(1, this.xParty + 3, this.yParty + 85 - 28, 58, 20, "Join");
+
+ if ((this.selectedPartySlot != null) && (this.slotIsSelected))
+ {
+ this.joinButton.enabled = true;
+ } else this.joinButton.enabled = false;
+
+ this.buttonList.add(new GuiButton(0, this.xParty - 60, this.yParty + 85 - 28, 58, 20, "Back"));
+ this.buttonList.add(this.joinButton);
+
+ super.drawScreen(x, y, partialTick);
+ }
+
+ public void updateScreen()
+ {
+ super.updateScreen();
+ ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+ this.xParty = (width / 2);
+ this.yParty = (height / 2);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.social.GuiJoinParty
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/social/GuiManageMembers.java b/src/main/java/net/aetherteam/aether/client/gui/social/GuiManageMembers.java
new file mode 100644
index 0000000..91a8cd6
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/social/GuiManageMembers.java
@@ -0,0 +1,270 @@
+package net.aetherteam.aether.client.gui.social;
+
+import cpw.mods.fml.client.FMLClientHandler;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.audio.SoundManager;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.settings.GameSettings;
+import net.minecraft.client.settings.KeyBinding;
+import net.minecraft.entity.player.EntityPlayer;
+import org.lwjgl.input.Keyboard;
+import org.lwjgl.input.Mouse;
+import org.lwjgl.opengl.GL11;
+
+public class GuiManageMembers extends GuiScreen
+{
+ protected static final String ONLINE_TEXT = "ONLINE";
+ protected static final String OFFLINE_TEXT = "OFFLINE";
+ private static final int ONLINE_TEXT_COLOR = 6750054;
+ private static final int OFFLINE_TEXT_COLOR = 16711680;
+ private GuiYSlider sbar;
+ private float sbarVal = 0.0F;
+ private int backgroundTexture;
+ private int dialogueTexture;
+ private int xMember;
+ private int yMember;
+ private int wMember;
+ private int hMember;
+ Minecraft f;
+ private int totalHeight;
+ private ArrayList playerSlots = new ArrayList();
+ private GuiPlayerSlot selectedPlayerSlot;
+ private boolean slotsCreated = false;
+ private boolean slotIsSelected = false;
+ private GuiScreen parent;
+ private EntityPlayer player;
+ private GuiButton kickButton;
+
+ public GuiManageMembers(EntityPlayer player, GuiScreen parent)
+ {
+ this.player = player;
+ this.parent = parent;
+ this.mc = FMLClientHandler.instance().getClient();
+ this.backgroundTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/party.png");
+ this.dialogueTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/dialogue.png");
+ this.wMember = 256;
+ this.hMember = 256;
+ updateScreen();
+ }
+
+ protected void keyTyped(char charTyped, int keyTyped)
+ {
+ super.keyTyped(charTyped, keyTyped);
+
+ if (keyTyped == Minecraft.getMinecraft().gameSettings.keyBindInventory.keyCode)
+ {
+ this.mc.displayGuiScreen((GuiScreen) null);
+ this.mc.setIngameFocus();
+ }
+ }
+
+ public void initGui()
+ {
+ Keyboard.enableRepeatEvents(true);
+ updateScreen();
+ this.buttonList.clear();
+ if (this.sbar != null) this.sbarVal = this.sbar.sliderValue;
+ this.sbar = new GuiYSlider(-1, this.xMember + 46, this.yMember - 54, 10, 103);
+ this.sbar.sliderValue = this.sbarVal;
+
+ this.buttonList.add(new GuiButton(0, this.xMember - 58, this.yMember + 85 - 28, 120, 20, "Back"));
+ this.buttonList.add(new GuiButton(0, this.xMember - 58, this.yMember + 85 - 28, 120, 20, "Back"));
+ }
+
+ protected void mouseClicked(int par1, int par2, int par3)
+ {
+ if (par3 == 0)
+ {
+ if (this.totalHeight > 103)
+ {
+ this.sbar.mousePressed(this.mc, par1, par2);
+ }
+ for (int l = 0; l < this.playerSlots.size(); l++)
+ {
+ int y = (int) (par2 + this.sbar.sliderValue * (this.totalHeight - 103));
+
+ GuiPlayerSlot playerSlot = (GuiPlayerSlot) this.playerSlots.get(l);
+
+ if ((playerSlot.mousePressed(this.mc, par1, y)) && (par2 < this.yMember + 50))
+ {
+ playerSlot.selected = true;
+ this.slotIsSelected = true;
+
+ this.selectedPlayerSlot = playerSlot;
+ this.mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
+
+ for (int rr = 0; rr < this.playerSlots.size(); rr++)
+ {
+ GuiPlayerSlot playerSlot2 = (GuiPlayerSlot) this.playerSlots.get(rr);
+
+ if (playerSlot2 != playerSlot)
+ {
+ playerSlot2.selected = false;
+ }
+ }
+
+ return;
+ }
+ playerSlot.selected = false;
+ this.slotIsSelected = false;
+ }
+
+ }
+
+ super.mouseClicked(par1, par2, par3);
+ }
+
+ protected void mouseMovedOrUp(int par1, int par2, int par3)
+ {
+ if (par3 == 0) this.sbar.mouseReleased(par1, par2);
+ super.mouseMovedOrUp(par1, par2, par3);
+ }
+
+ protected void actionPerformed(GuiButton btn)
+ {
+ switch (btn.id)
+ {
+ case 0:
+ this.mc.displayGuiScreen(this.parent);
+ break;
+ case 1:
+ Party party = PartyController.instance().getParty(this.player);
+ PartyMember potentialLeader = PartyController.instance().getMember(this.player);
+ boolean isLeader = party.isLeader(potentialLeader);
+
+ if ((isLeader) && (this.playerSlots.size() == 1))
+ {
+ PartyController.instance().removeParty(party, true);
+
+ this.mc.displayGuiScreen((GuiScreen) null);
+ } else
+ {
+ this.mc.displayGuiScreen(new GuiManagePartyMember(this.player, this.selectedPlayerSlot.username, this.selectedPlayerSlot.skinURL, this));
+ }
+ break;
+ }
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ public void drawScreen(int x, int y, float partialTick)
+ {
+ this.buttonList.clear();
+
+ Party party = PartyController.instance().getParty(this.player);
+
+ List playerList = new ArrayList();
+
+ if (party != null)
+ {
+ playerList = PartyController.instance().getParty(this.player).getMembers();
+ }
+
+ if (playerList.size() != this.playerSlots.size())
+ {
+ this.playerSlots.clear();
+ this.slotsCreated = false;
+ }
+
+ drawDefaultBackground();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+ int dmsy = Mouse.getDWheel();
+ this.sbar.sliderValue -= dmsy / 1000.0F;
+ if (this.sbar.sliderValue > 1.0F) this.sbar.sliderValue = 1.0F;
+ if (this.sbar.sliderValue < 0.0F) this.sbar.sliderValue = 0.0F;
+ int centerX = this.xMember - 70;
+ int centerY = this.yMember - 84;
+
+ ScaledResolution sr = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ drawTexturedModalRect(centerX, centerY, 0, 0, 141, this.hMember);
+ this.totalHeight = 0;
+ int slotW = 100;
+ int slotH = 20;
+ int gutter = 2;
+ GL11.glEnable(3089);
+ GL11.glScissor((centerX + 14) * sr.getScaleFactor(), (centerY + 35) * sr.getScaleFactor(), slotW * sr.getScaleFactor(), 103 * sr.getScaleFactor());
+ GL11.glPushMatrix();
+ this.totalHeight = (playerList.size() * (slotH + gutter));
+ float sVal = -this.sbar.sliderValue * (this.totalHeight - 105);
+
+ if (this.totalHeight > 103)
+ {
+ GL11.glTranslatef(0.0F, sVal, 0.0F);
+ }
+
+ this.totalHeight = 0;
+
+ if (!this.slotsCreated)
+ {
+ for (int i = 0; i < playerList.size(); i++)
+ {
+ String name = ((PartyMember) playerList.get(i)).username;
+ String skinUrl = ((PartyMember) playerList.get(i)).skinUrl;
+
+ this.playerSlots.add(new GuiPlayerSlot(name, skinUrl, this.playerSlots.size(), centerX + 15, centerY + this.totalHeight + 30, slotW, slotH));
+
+ this.totalHeight += slotH + gutter;
+ }
+
+ this.slotsCreated = true;
+ }
+
+ for (int i = 0; i < this.playerSlots.size(); i++)
+ {
+ ((GuiPlayerSlot) this.playerSlots.get(i)).drawPlayerSlot(centerX + 15, centerY + this.totalHeight + 30, slotW, slotH);
+
+ this.totalHeight += slotH + gutter;
+ }
+
+ GL11.glPopMatrix();
+ GL11.glDisable(3089);
+
+ if (this.totalHeight > 103)
+ {
+ this.sbar.drawButton(this.mc, x, y);
+ }
+
+ drawString(this.fontRenderer, "Player List", centerX + 40, centerY + 10, 16777215);
+ String kickName;
+ if ((this.selectedPlayerSlot != null) && (!PartyController.instance().isLeader(this.selectedPlayerSlot.username)))
+ {
+ kickName = "Manage";
+ } else kickName = "Disband";
+
+ this.kickButton = new GuiButton(1, this.xMember + 3, this.yMember + 85 - 28, 58, 20, kickName);
+
+ if ((this.selectedPlayerSlot != null) && (this.slotIsSelected) && ((!PartyController.instance().isLeader(this.selectedPlayerSlot.username)) || (this.playerSlots.size() == 1)))
+ {
+ this.kickButton.enabled = true;
+ } else this.kickButton.enabled = false;
+
+ this.buttonList.add(new GuiButton(0, this.xMember - 60, this.yMember + 85 - 28, 58, 20, "Back"));
+ this.buttonList.add(this.kickButton);
+
+ super.drawScreen(x, y, partialTick);
+ }
+
+ public void updateScreen()
+ {
+ super.updateScreen();
+ ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+ this.xMember = (width / 2);
+ this.yMember = (height / 2);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/gui/social/GuiManagePartyMember.java b/src/main/java/net/aetherteam/aether/client/gui/social/GuiManagePartyMember.java
new file mode 100644
index 0000000..d21545d
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/social/GuiManagePartyMember.java
@@ -0,0 +1,152 @@
+package net.aetherteam.aether.client.gui.social;
+
+import cpw.mods.fml.client.FMLClientHandler;
+import cpw.mods.fml.common.network.PacketDispatcher;
+
+import java.util.List;
+
+import net.aetherteam.aether.packets.AetherPacketHandler;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.settings.GameSettings;
+import net.minecraft.client.settings.KeyBinding;
+import net.minecraft.entity.player.EntityPlayer;
+import org.lwjgl.opengl.GL11;
+
+public class GuiManagePartyMember extends GuiScreen
+{
+ private final PartyData pm;
+ private int backgroundTexture;
+ private int easterTexture;
+ private int xParty;
+ private int yParty;
+ private int wParty;
+ private int hParty;
+ Minecraft f;
+ private String username;
+ private GuiScreen parent;
+ private String skinUrl;
+ private EntityPlayer player;
+ private GuiButton transferButton;
+ private GuiButton moderatorButton;
+ private GuiButton kickButton;
+ private GuiButton banButton;
+
+ public GuiManagePartyMember(EntityPlayer player, String username, String skinUrl, GuiScreen parent)
+ {
+ this(new PartyData(), player, username, skinUrl, parent);
+ }
+
+ public GuiManagePartyMember(PartyData pm, EntityPlayer player, String username, String skinUrl, GuiScreen parent)
+ {
+ this.parent = parent;
+ this.username = username;
+ this.skinUrl = skinUrl;
+ this.player = player;
+ this.mc = FMLClientHandler.instance().getClient();
+ this.pm = pm;
+ this.backgroundTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/partyMain.png");
+ this.easterTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/partyMain.png");
+ this.wParty = 256;
+ this.hParty = 256;
+ updateScreen();
+ }
+
+ protected void keyTyped(char charTyped, int keyTyped)
+ {
+ super.keyTyped(charTyped, keyTyped);
+
+ if (keyTyped == Minecraft.getMinecraft().gameSettings.keyBindInventory.keyCode)
+ {
+ this.mc.displayGuiScreen((GuiScreen) null);
+ this.mc.setIngameFocus();
+ }
+ }
+
+ public void initGui()
+ {
+ updateScreen();
+ this.buttonList.clear();
+
+ this.transferButton = new GuiButton(5, this.xParty - 60, this.yParty - 36 - 28, 120, 20, "Transfer Ownership");
+ this.moderatorButton = new GuiButton(4, this.xParty - 60, this.yParty - 14 - 28, 120, 20, "Make Moderator");
+ this.kickButton = new GuiButton(5, this.xParty - 60, this.yParty + 8 - 28, 120, 20, "Kick");
+ this.banButton = new GuiButton(6, this.xParty - 60, this.yParty + 30 - 28, 120, 20, "Ban");
+
+ this.transferButton.enabled = false;
+ this.moderatorButton.enabled = false;
+
+ this.buttonList.add(this.transferButton);
+ this.buttonList.add(this.moderatorButton);
+ this.buttonList.add(this.kickButton);
+ this.buttonList.add(this.banButton);
+
+ this.buttonList.add(new GuiButton(0, this.xParty - 60, this.yParty + 81 - 28, 120, 20, "Back"));
+ }
+
+ protected void actionPerformed(GuiButton button)
+ {
+ switch (button.id)
+ {
+ case 0:
+ this.mc.displayGuiScreen(this.parent);
+ break;
+ case 5:
+ Party party = PartyController.instance().getParty(this.player);
+ PartyMember kickedMember = PartyController.instance().getMember(this.username);
+
+ if ((party != null) && (kickedMember != null))
+ {
+ PartyController.instance().leaveParty(party, kickedMember, true);
+ PacketDispatcher.sendPacketToServer(AetherPacketHandler.sendPartyMemberChange(false, party.getName(), this.username, this.skinUrl));
+ this.mc.displayGuiScreen(this.parent);
+ }
+ break;
+ }
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ public void drawScreen(int x, int y, float partialTick)
+ {
+ drawDefaultBackground();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+ int centerX = this.xParty - 70;
+ int centerY = this.yParty - 84;
+
+ ScaledResolution sr = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ drawTexturedModalRect(centerX, centerY, 0, 0, 141, this.hParty);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+
+ String name = "Manage Permissions";
+
+ drawString(this.fontRenderer, name, centerX + 69 - this.fontRenderer.getStringWidth(name) / 2, centerY + 5, 16777215);
+ super.drawScreen(x, y, partialTick);
+ }
+
+ public void updateScreen()
+ {
+ super.updateScreen();
+ ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+ this.xParty = (width / 2);
+ this.yParty = (height / 2);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.social.GuiManagePartyMember
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/social/GuiMemberList.java b/src/main/java/net/aetherteam/aether/client/gui/social/GuiMemberList.java
new file mode 100644
index 0000000..268a88f
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/social/GuiMemberList.java
@@ -0,0 +1,225 @@
+package net.aetherteam.aether.client.gui.social;
+
+import cpw.mods.fml.client.FMLClientHandler;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.settings.GameSettings;
+import net.minecraft.client.settings.KeyBinding;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.StringUtils;
+import org.lwjgl.input.Keyboard;
+import org.lwjgl.input.Mouse;
+import org.lwjgl.opengl.GL11;
+
+public class GuiMemberList extends GuiScreen
+{
+ protected static final String ONLINE_TEXT = "ONLINE";
+ protected static final String OFFLINE_TEXT = "OFFLINE";
+ private static final int ONLINE_TEXT_COLOR = 6750054;
+ private static final int OFFLINE_TEXT_COLOR = 16711680;
+ private GuiYSlider sbar;
+ private float sbarVal = 0.0F;
+ private int backgroundTexture;
+ private int dialogueTexture;
+ private int xParty;
+ private int yParty;
+ private int wParty;
+ private int hParty;
+ Minecraft f;
+ private GuiScreen parent;
+ private EntityPlayer player;
+
+ public GuiMemberList(EntityPlayer player, GuiScreen parent)
+ {
+ this.player = player;
+ this.parent = parent;
+ this.mc = FMLClientHandler.instance().getClient();
+ this.backgroundTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/party.png");
+ this.dialogueTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/dialogue.png");
+ this.wParty = 256;
+ this.hParty = 256;
+ updateScreen();
+ }
+
+ public void initGui()
+ {
+ Keyboard.enableRepeatEvents(true);
+ updateScreen();
+ this.buttonList.clear();
+ if (this.sbar != null) this.sbarVal = this.sbar.sliderValue;
+ this.sbar = new GuiYSlider(-1, this.xParty + 46, this.yParty - 54, 10, 103);
+ this.sbar.sliderValue = this.sbarVal;
+ this.buttonList.add(new GuiButton(0, this.xParty - 58, this.yParty + 85 - 28, 120, 20, "Back"));
+ }
+
+ protected void keyTyped(char charTyped, int keyTyped)
+ {
+ super.keyTyped(charTyped, keyTyped);
+
+ if (keyTyped == Minecraft.getMinecraft().gameSettings.keyBindInventory.keyCode)
+ {
+ this.mc.displayGuiScreen((GuiScreen) null);
+ this.mc.setIngameFocus();
+ }
+ }
+
+ protected void mouseClicked(int par1, int par2, int par3)
+ {
+ this.sbar.mousePressed(this.mc, par1, par2);
+ super.mouseClicked(par1, par2, par3);
+ }
+
+ protected void mouseMovedOrUp(int par1, int par2, int par3)
+ {
+ if (par3 == 0) this.sbar.mouseReleased(par1, par2);
+ super.mouseMovedOrUp(par1, par2, par3);
+ }
+
+ protected void actionPerformed(GuiButton btn)
+ {
+ switch (btn.id)
+ {
+ case 0:
+ this.mc.displayGuiScreen(this.parent);
+ }
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ public void drawScreen(int x, int y, float partialTick)
+ {
+ if (PartyController.instance().getParty(this.player) == null)
+ {
+ this.mc.displayGuiScreen((GuiScreen) null);
+ }
+
+ List playerList = new ArrayList();
+
+ if (PartyController.instance().getParty(this.player) != null)
+ {
+ playerList = PartyController.instance().getParty(this.player).getMembers();
+ }
+
+ drawDefaultBackground();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+ int dmsy = Mouse.getDWheel();
+ this.sbar.sliderValue -= dmsy / 1000.0F;
+ if (this.sbar.sliderValue > 1.0F) this.sbar.sliderValue = 1.0F;
+ if (this.sbar.sliderValue < 0.0F) this.sbar.sliderValue = 0.0F;
+ int centerX = this.xParty - 70;
+ int centerY = this.yParty - 84;
+
+ ScaledResolution sr = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ drawTexturedModalRect(centerX, centerY, 0, 0, 141, this.hParty);
+ int totalHeight = 0;
+ int slotW = 100;
+ int slotH = 20;
+ int gutter = 2;
+ GL11.glEnable(3089);
+ GL11.glScissor((centerX + 14) * sr.getScaleFactor(), (centerY + 35) * sr.getScaleFactor(), slotW * sr.getScaleFactor(), 103 * sr.getScaleFactor());
+ GL11.glPushMatrix();
+ totalHeight = playerList.size() * (slotH + gutter);
+ float sVal = -this.sbar.sliderValue * (totalHeight - 105);
+
+ if (totalHeight > 103)
+ {
+ GL11.glTranslatef(0.0F, sVal, 0.0F);
+ }
+
+ totalHeight = 0;
+ for (int i = 0; i < playerList.size(); i++)
+ {
+ String name = ((PartyMember) playerList.get(i)).username;
+ drawPlayerSlot(name, centerX + 15, centerY + totalHeight + 30, slotW, slotH, true);
+ totalHeight += slotH + gutter;
+ }
+ GL11.glPopMatrix();
+ GL11.glDisable(3089);
+
+ if (totalHeight > 103)
+ {
+ this.sbar.drawButton(this.mc, x, y);
+ }
+ drawString(this.fontRenderer, "Player List", centerX + 40, centerY + 10, 16777215);
+ super.drawScreen(x, y, partialTick);
+ }
+
+ public void updateScreen()
+ {
+ super.updateScreen();
+ ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+ this.xParty = (width / 2);
+ this.yParty = (height / 2);
+ }
+
+ public void drawPlayerSlot(String playername, int x, int y, int width, int height, boolean online)
+ {
+ ArrayList partyList = PartyController.instance().getParties();
+ ArrayList playerStringList = new ArrayList();
+
+ for (int i = 0; i < partyList.size(); i++)
+ {
+ PartyMember member = PartyController.instance().getMember(playername);
+
+ if (((Party) partyList.get(i)).hasMember(member))
+ {
+ playerStringList.add(playername);
+ }
+ }
+ drawGradientRect(x, y, x + width, y + height, -11184811, -10066330);
+
+ int icon = this.mc.renderEngine.getTextureForDownloadableImage("http://skins.minecraft.net/MinecraftSkins/" + StringUtils.stripControlCodes(playername) + ".png", "/mob/char.png");
+
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, icon);
+ GL11.glEnable(3553);
+
+ float u = 0.125F;
+ float v = 0.25F;
+ float u1 = 0.25F;
+ float v1 = 0.5F;
+ GL11.glBegin(7);
+ GL11.glTexCoord2f(u, v);
+ GL11.glVertex2f(x + 2, y + 2);
+ GL11.glTexCoord2f(u, v1);
+ GL11.glVertex2f(x + 2, y + 18);
+ GL11.glTexCoord2f(u1, v1);
+ GL11.glVertex2f(x + 18, y + 18);
+ GL11.glTexCoord2f(u1, v);
+ GL11.glVertex2f(x + 18, y + 2);
+ GL11.glEnd();
+
+ this.mc.renderEngine.resetBoundTexture();
+
+ this.fontRenderer.drawStringWithShadow(playername, x + height, y + 2, 15066597);
+ GL11.glPushMatrix();
+ GL11.glScalef(0.75F, 0.75F, 1.0F);
+ if (playerStringList.contains(playername))
+ this.fontRenderer.drawString("ONLINE", (int) ((x + height) / 0.75F), (int) ((y + 12.0F) / 0.75F), 6750054);
+ else
+ this.fontRenderer.drawString("OFFLINE", (int) ((x + height) / 0.75F), (int) ((y + 12.0F) / 0.75F), 16711680);
+ GL11.glPopMatrix();
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.social.GuiMemberList
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/social/GuiMenu.java b/src/main/java/net/aetherteam/aether/client/gui/social/GuiMenu.java
new file mode 100644
index 0000000..2b65a80
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/social/GuiMenu.java
@@ -0,0 +1,159 @@
+package net.aetherteam.aether.client.gui.social;
+
+import cpw.mods.fml.client.FMLClientHandler;
+
+import java.util.List;
+
+import net.aetherteam.aether.client.gui.social.options.GuiOptions;
+import net.aetherteam.aether.notifications.client.GuiNotificationList;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.entity.EntityClientPlayerMP;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.multiplayer.NetClientHandler;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.settings.GameSettings;
+import net.minecraft.client.settings.KeyBinding;
+import net.minecraft.entity.player.EntityPlayer;
+import org.lwjgl.opengl.GL11;
+
+public class GuiMenu extends GuiScreen
+{
+ private final PartyData pm;
+ private int backgroundTexture;
+ private int easterTexture;
+ private int xParty;
+ private int yParty;
+ private int wParty;
+ private int hParty;
+ Minecraft f;
+ private EntityPlayer player;
+ private GuiScreen parent;
+
+ public GuiMenu(EntityPlayer player, GuiScreen parent)
+ {
+ this(new PartyData(), player, parent);
+ }
+
+ public GuiMenu(PartyData pm, EntityPlayer player, GuiScreen parent)
+ {
+ this.parent = parent;
+ this.player = player;
+ this.mc = FMLClientHandler.instance().getClient();
+ this.pm = pm;
+ this.backgroundTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/partyMain.png");
+ this.easterTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/partyMain.png");
+ this.wParty = 256;
+ this.hParty = 256;
+ updateScreen();
+ }
+
+ protected void keyTyped(char charTyped, int keyTyped)
+ {
+ super.keyTyped(charTyped, keyTyped);
+
+ if (keyTyped == Minecraft.getMinecraft().gameSettings.keyBindInventory.keyCode)
+ {
+ this.mc.displayGuiScreen((GuiScreen) null);
+ this.mc.setIngameFocus();
+ }
+ }
+
+ public void initGui()
+ {
+ updateScreen();
+ this.buttonList.clear();
+
+ this.buttonList.add(new GuiButton(0, this.xParty - 60, this.yParty + 81 - 28, 120, 20, "Back"));
+ }
+
+ protected void actionPerformed(GuiButton button)
+ {
+ switch (button.id)
+ {
+ case 0:
+ this.mc.displayGuiScreen(this.parent);
+ break;
+ case 1:
+ this.mc.displayGuiScreen(new GuiNotificationList(this.player, this));
+ break;
+ case 3:
+ this.mc.displayGuiScreen(new GuiPlayerList(this.player, this));
+ break;
+ case 2:
+ this.mc.displayGuiScreen(new GuiOptions(this.player, this));
+ break;
+ case 5:
+ this.mc.displayGuiScreen(new GuiPartyMenu(this.player, this));
+ case 4:
+ }
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ public void drawScreen(int x, int y, float partialTick)
+ {
+ this.buttonList.clear();
+
+ drawDefaultBackground();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+ int centerX = this.xParty - 70;
+ int centerY = this.yParty - 84;
+
+ ScaledResolution sr = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ drawTexturedModalRect(centerX, centerY, 0, 0, 141, this.hParty);
+
+ List playerList = this.mc.thePlayer.sendQueue.playerInfoList;
+
+ if ((playerList.size() > 1) || (playerList.size() == 0))
+ {
+ this.buttonList.add(new GuiButton(5, this.xParty - 60, this.yParty - 36 - 28, 120, 20, "Party"));
+ this.buttonList.add(new GuiButton(1, this.xParty - 60, this.yParty - 14 - 28, 120, 20, "Notifications"));
+ this.buttonList.add(new GuiButton(3, this.xParty - 60, this.yParty + 8 - 28, 120, 20, "Player List"));
+ this.buttonList.add(new GuiButton(2, this.xParty - 60, this.yParty + 30 - 28, 120, 20, "Options"));
+ this.buttonList.add(new GuiButton(4, this.xParty - 60, this.yParty + 52 - 28, 120, 20, "Friend List"));
+
+ ((GuiButton) this.buttonList.get(4)).enabled = false;
+ }
+
+ this.buttonList.add(new GuiButton(0, this.xParty - 60, this.yParty + 81 - 28, 120, 20, "Back"));
+
+ this.mc.renderEngine.resetBoundTexture();
+
+ if ((playerList.size() <= 1) && (playerList.size() != 0))
+ {
+ GL11.glBindTexture(3553, this.backgroundTexture);
+ drawTexturedModalRect(centerX + 13, centerY + 40, 141, 131, 115, 125);
+
+ this.mc.renderEngine.resetBoundTexture();
+ drawString(this.fontRenderer, "Forever Alone :(", centerX + 26, centerY + 10, 15658734);
+ drawString(this.fontRenderer, "(Single Player)", centerX + 31, centerY + 22, 15658734);
+ } else
+ {
+ this.mc.renderEngine.resetBoundTexture();
+ drawString(this.fontRenderer, "Social Menu", centerX + 40, centerY + 5, 16777215);
+ }
+
+ super.drawScreen(x, y, partialTick);
+ }
+
+ public void updateScreen()
+ {
+ super.updateScreen();
+ ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+ this.xParty = (width / 2);
+ this.yParty = (height / 2);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.social.GuiMenu
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/social/GuiParty.java b/src/main/java/net/aetherteam/aether/client/gui/social/GuiParty.java
new file mode 100644
index 0000000..d774e37
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/social/GuiParty.java
@@ -0,0 +1,316 @@
+package net.aetherteam.aether.client.gui.social;
+
+import cpw.mods.fml.client.FMLClientHandler;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.GuiTextField;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.multiplayer.WorldClient;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.settings.GameSettings;
+import net.minecraft.client.settings.KeyBinding;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import org.lwjgl.input.Keyboard;
+import org.lwjgl.input.Mouse;
+import org.lwjgl.opengl.GL11;
+
+public class GuiParty extends GuiScreen
+{
+ private static final String ONLINE_TEXT = "Online";
+ private static final String OFFLINE_TEXT = "Offline";
+ private static final String BUTTON_INVITE_TEXT = "Invite";
+ private static final String BUTTON_REMOVE_TEXT = "Remove";
+ private static final String BUTTON_CONFIRM_TEXT = "Confirm";
+ private static final String BUTTON_CANCEL_TEXT = "Cancel";
+ private static final int ONLINE_FONT_COLOR = 7859831;
+ private static final int OFFLINE_FONT_COLOR = 15628151;
+ private static final int BUTTON_INVITE = 0;
+ private static final int BUTTON_REMOVE = 1;
+ private static final int BUTTON_CONFIRM = 2;
+ private static final int BUTTON_CANCEL = 3;
+ private static final int DIALOGUE_NONE = 4;
+ private static final int DIALOGUE_INVITE = 5;
+ private static final int DIALOGUE_REMOVE = 6;
+ private int dialogueState = 4;
+ private boolean dialogue = false;
+ private final PartyData pm;
+ private GuiTextField partyNameField;
+ private GuiTextField dialogueInput;
+ private GuiYSlider sbar;
+ private float sbarVal = 0.0F;
+ private String name = "Aether Party";
+ private int backgroundTexture;
+ private int dialogueTexture;
+ private int xParty;
+ private int yParty;
+ private int wParty;
+ private int hParty;
+ Minecraft f;
+
+ public GuiParty()
+ {
+ this(new PartyData());
+ }
+
+ public GuiParty(PartyData pm)
+ {
+ this.mc = FMLClientHandler.instance().getClient();
+ this.pm = pm;
+ this.backgroundTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/party.png");
+ this.dialogueTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/dialogue.png");
+ this.wParty = 256;
+ this.hParty = 256;
+ updateScreen();
+ pm.pList_online.add(this.mc.thePlayer);
+ pm.pList_online.add(this.mc.thePlayer);
+ pm.pList_offline.add(this.mc.thePlayer);
+ pm.pList_offline.add(this.mc.thePlayer);
+ pm.pList_offline.add(this.mc.thePlayer);
+ }
+
+ public void initGui()
+ {
+ Keyboard.enableRepeatEvents(true);
+ updateScreen();
+ this.buttonList.clear();
+ if (this.sbar != null) this.sbarVal = this.sbar.sliderValue;
+ this.sbar = new GuiYSlider(-1, this.xParty + 46, this.yParty - 54, 10, 103);
+ this.sbar.sliderValue = this.sbarVal;
+ this.buttonList.add(new GuiButton(0, this.xParty - 58, this.yParty + 85 - 28, 52, 20, "Invite"));
+ this.buttonList.add(new GuiButton(1, this.xParty - 1, this.yParty + 85 - 28, 60, 20, "Remove"));
+ this.partyNameField = new GuiTextField(this.fontRenderer, this.xParty - 55, this.yParty - 73, 107, 16);
+ this.partyNameField.setFocused(true);
+ this.partyNameField.setMaxStringLength(16);
+ this.partyNameField.setText(this.name);
+ this.partyNameField.setEnableBackgroundDrawing(false);
+ if (this.dialogue) openDialogue();
+ }
+
+ protected void keyTyped(char charTyped, int keyTyped)
+ {
+ if (this.partyNameField.isFocused())
+ {
+ this.partyNameField.textboxKeyTyped(charTyped, keyTyped);
+ this.name = this.partyNameField.getText();
+ }
+ if (this.dialogue)
+ {
+ this.dialogueInput.textboxKeyTyped(charTyped, keyTyped);
+ }
+ super.keyTyped(charTyped, keyTyped);
+
+ if (keyTyped == Minecraft.getMinecraft().gameSettings.keyBindInventory.keyCode)
+ {
+ this.mc.displayGuiScreen((GuiScreen) null);
+ this.mc.setIngameFocus();
+ }
+ }
+
+ protected void mouseClicked(int par1, int par2, int par3)
+ {
+ this.partyNameField.mouseClicked(par1, par2, par3);
+ if (!this.dialogue) this.sbar.mousePressed(this.mc, par1, par2);
+ super.mouseClicked(par1, par2, par3);
+ }
+
+ protected void mouseMovedOrUp(int par1, int par2, int par3)
+ {
+ if (par3 == 0) this.sbar.mouseReleased(par1, par2);
+ super.mouseMovedOrUp(par1, par2, par3);
+ }
+
+ protected void actionPerformed(GuiButton btn)
+ {
+ switch (btn.id)
+ {
+ case 0:
+ if (!this.dialogue)
+ {
+ this.dialogue = true;
+ this.dialogueState = 5;
+ openDialogue();
+ }
+ break;
+ case 1:
+ if (!this.dialogue)
+ {
+ this.dialogue = true;
+ this.dialogueState = 6;
+ openDialogue();
+ }
+ break;
+ case 2:
+ switch (this.dialogueState)
+ {
+ case 5:
+ Minecraft.getMinecraft().theWorld.getPlayerEntityByName(this.dialogueInput.getText());
+ break;
+ case 6:
+ }
+
+ this.dialogue = false;
+ this.dialogueState = 4;
+ initGui();
+ break;
+ case 3:
+ this.dialogue = false;
+ this.dialogueState = 4;
+ initGui();
+ }
+ }
+
+ private String getDialogueOption()
+ {
+ switch (this.dialogueState)
+ {
+ case 5:
+ return "Invite";
+ case 6:
+ return "Remove";
+ }
+ return "";
+ }
+
+ private void openDialogue()
+ {
+ this.partyNameField.setFocused(false);
+ this.dialogueInput = new GuiTextField(this.fontRenderer, this.xParty - 88 + this.fontRenderer.getStringWidth(getDialogueOption()), this.yParty - 7, 193 - this.fontRenderer.getStringWidth(getDialogueOption()) - 10, 16);
+ this.dialogueInput.setFocused(true);
+ this.dialogueInput.setCanLoseFocus(false);
+ this.buttonList.add(new GuiButton(2, this.xParty - 1, this.yParty + 14, 50, 20, "Confirm"));
+ this.buttonList.add(new GuiButton(3, this.xParty + 52, this.yParty + 14, 45, 20, "Cancel"));
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ public void drawScreen(int x, int y, float partialTick)
+ {
+ drawDefaultBackground();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+ int dmsy = Mouse.getDWheel();
+ this.sbar.sliderValue -= dmsy / 1000.0F;
+ if (this.sbar.sliderValue > 1.0F) this.sbar.sliderValue = 1.0F;
+ if (this.sbar.sliderValue < 0.0F) this.sbar.sliderValue = 0.0F;
+ int centerX = this.xParty - 70;
+ int centerY = this.yParty - 84;
+
+ ScaledResolution sr = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ drawTexturedModalRect(centerX, centerY, 0, 0, 141, this.hParty);
+ int totalHeight = 0;
+ int slotW = 100;
+ int slotH = 20;
+ int gutter = 2;
+ GL11.glEnable(3089);
+ GL11.glScissor((centerX + 14) * sr.getScaleFactor(), (centerY + 35) * sr.getScaleFactor(), slotW * sr.getScaleFactor(), 103 * sr.getScaleFactor());
+ GL11.glPushMatrix();
+ totalHeight = (this.pm.pList_offline.size() + this.pm.pList_online.size()) * (slotH + gutter);
+ float sVal = -this.sbar.sliderValue * (totalHeight - 105);
+
+ if (totalHeight > 103)
+ {
+ GL11.glTranslatef(0.0F, sVal, 0.0F);
+ }
+ totalHeight = 0;
+ for (int i = 0; i < this.pm.pList_online.size(); i++)
+ {
+ EntityPlayer p = (EntityPlayer) this.pm.pList_online.get(i);
+ drawPlayerSlot(p, centerX + 15, centerY + totalHeight + 30, slotW, slotH, true);
+ totalHeight += slotH + gutter;
+ }
+ for (int i = 0; i < this.pm.pList_offline.size(); i++)
+ {
+ EntityPlayer p = (EntityPlayer) this.pm.pList_offline.get(i);
+ drawPlayerSlot(p, centerX + 15, centerY + totalHeight + 30, slotW, slotH, false);
+ totalHeight += slotH + gutter;
+ }
+ GL11.glPopMatrix();
+ GL11.glDisable(3089);
+
+ this.partyNameField.drawTextBox();
+
+ if (totalHeight > 103)
+ {
+ this.sbar.drawButton(this.mc, x, y);
+ }
+
+ if (this.dialogue)
+ {
+ drawGradientRect(0, 0, this.width, this.height, -1728053248, -1728053248);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, this.dialogueTexture);
+ drawTexturedModalRect(centerX - 30, centerY + 71, 0, 0, 201, this.hParty - 201);
+ this.dialogueInput.drawTextBox();
+ this.fontRenderer.drawStringWithShadow(getDialogueOption() + ":", centerX - 24, centerY + 80, 16777215);
+ }
+
+ super.drawScreen(x, y, partialTick);
+ }
+
+ public void updateScreen()
+ {
+ super.updateScreen();
+ if (this.partyNameField != null)
+ {
+ this.partyNameField.updateCursorCounter();
+ }
+ if (this.dialogue)
+ {
+ this.dialogueInput.updateCursorCounter();
+ }
+ ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+ this.xParty = (width / 2);
+ this.yParty = (height / 2);
+ }
+
+ public void drawPlayerSlot(EntityPlayer p, int x, int y, int width, int height, boolean online)
+ {
+ drawGradientRect(x, y, x + width, y + height, -11184811, -10066330);
+
+ int icon = this.mc.renderEngine.getTextureForDownloadableImage(p.skinUrl, "/mob/char.png");
+
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, icon);
+ GL11.glEnable(3553);
+
+ float u = 0.125F;
+ float v = 0.25F;
+ float u1 = 0.25F;
+ float v1 = 0.5F;
+ GL11.glBegin(7);
+ GL11.glTexCoord2f(u, v);
+ GL11.glVertex2f(x + 2, y + 2);
+ GL11.glTexCoord2f(u, v1);
+ GL11.glVertex2f(x + 2, y + 18);
+ GL11.glTexCoord2f(u1, v1);
+ GL11.glVertex2f(x + 18, y + 18);
+ GL11.glTexCoord2f(u1, v);
+ GL11.glVertex2f(x + 18, y + 2);
+ GL11.glEnd();
+
+ this.mc.renderEngine.resetBoundTexture();
+
+ this.fontRenderer.drawStringWithShadow(p.username, x + height, y + 2, 15066597);
+ GL11.glPushMatrix();
+ GL11.glScalef(0.75F, 0.75F, 1.0F);
+ this.fontRenderer.drawString(online ? "Online" : "Offline", (int) ((x + height) / 0.75F), (int) ((y + 12.0F) / 0.75F), online ? 7859831 : 15628151);
+ GL11.glPopMatrix();
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.social.GuiParty
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/social/GuiPartyEdit.java b/src/main/java/net/aetherteam/aether/client/gui/social/GuiPartyEdit.java
new file mode 100644
index 0000000..43839fa
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/social/GuiPartyEdit.java
@@ -0,0 +1,210 @@
+package net.aetherteam.aether.client.gui.social;
+
+import cpw.mods.fml.client.FMLClientHandler;
+import cpw.mods.fml.common.network.PacketDispatcher;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import net.aetherteam.aether.packets.AetherPacketHandler;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.PartyType;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.settings.GameSettings;
+import net.minecraft.client.settings.KeyBinding;
+import net.minecraft.entity.player.EntityPlayer;
+import org.lwjgl.opengl.GL11;
+
+public class GuiPartyEdit extends GuiScreen
+{
+ private final PartyData pm;
+ private int backgroundTexture;
+ private int easterTexture;
+ private int xParty;
+ private int yParty;
+ private int wParty;
+ private int hParty;
+ Minecraft f;
+ private ArrayList partyType = new ArrayList();
+ private int typeIndex = 0;
+ private EntityPlayer player;
+ private GuiButton typeButton;
+ private String newPartyName;
+ private GuiScreen parent;
+
+ public GuiPartyEdit(EntityPlayer player, GuiScreen parent)
+ {
+ this(new PartyData(), player, parent);
+ }
+
+ protected void keyTyped(char charTyped, int keyTyped)
+ {
+ super.keyTyped(charTyped, keyTyped);
+
+ if (keyTyped == Minecraft.getMinecraft().gameSettings.keyBindInventory.keyCode)
+ {
+ this.mc.displayGuiScreen((GuiScreen) null);
+ this.mc.setIngameFocus();
+ }
+ }
+
+ public GuiPartyEdit(PartyData pm, EntityPlayer player, GuiScreen parent)
+ {
+ this.parent = parent;
+
+ String name = PartyController.instance().getParty(player).getType().name();
+
+ if (name == "Open")
+ {
+ this.typeIndex = 0;
+ }
+ if (name == "Closed")
+ {
+ this.typeIndex = 1;
+ }
+ if (name == "Private")
+ {
+ this.typeIndex = 2;
+ }
+ this.partyType.add("Open");
+ this.partyType.add("Closed");
+ this.partyType.add("Private");
+
+ this.player = player;
+ this.mc = FMLClientHandler.instance().getClient();
+ this.pm = pm;
+ this.backgroundTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/partyMain.png");
+ this.easterTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/partyMain.png");
+ this.wParty = 256;
+ this.hParty = 256;
+ ArrayList partyList = PartyController.instance().getParties();
+
+ for (int i = 0; i < partyList.size(); i++)
+ {
+ if (((Party) partyList.get(i)).getLeader().username.equals(player.username))
+ this.newPartyName = ((Party) partyList.get(i)).getName();
+ }
+ updateScreen();
+ }
+
+ public void initGui()
+ {
+ updateScreen();
+ this.buttonList.clear();
+
+ Party party = PartyController.instance().getParty(this.player);
+
+ if (party != null)
+ {
+ this.typeButton = new GuiButton(4, this.xParty - 60, this.yParty + 30 - 28, 120, 20, "Type: " + PartyController.instance().getParty(this.player).getType().name());
+ }
+
+ this.buttonList.add(this.typeButton);
+ this.buttonList.add(new GuiButton(5, this.xParty - 60, this.yParty + 12 - 28, 120, 20, "Save"));
+ this.buttonList.add(new GuiButton(3, this.xParty - 60, this.yParty - 36 - 28, 120, 20, "Change Name"));
+ this.buttonList.add(new GuiButton(2, this.xParty - 60, this.yParty - 14 - 28, 120, 20, "Manage Permissions"));
+ this.buttonList.add(new GuiButton(1, this.xParty - 60, this.yParty + 8 - 28, 120, 20, "Manage Members"));
+ this.buttonList.add(new GuiButton(0, this.xParty - 60, this.yParty + 81 - 28, 120, 20, "Back"));
+
+ ArrayList partyList = new ArrayList();
+
+ for (int i = 0; i < partyList.size(); i++)
+ if (((Party) partyList.get(i)).getLeader().username == this.player.username)
+ ((GuiButton) this.buttonList.get(1)).enabled = false;
+ }
+
+ protected void actionPerformed(GuiButton btn)
+ {
+ switch (btn.id)
+ {
+ case 0:
+ this.mc.displayGuiScreen(this.parent);
+ break;
+ case 1:
+ this.mc.displayGuiScreen(new GuiManageMembers(this.player, this));
+ break;
+ case 3:
+ this.mc.displayGuiScreen(new GuiEditPartyName(this.player, this));
+ break;
+ case 4:
+ this.typeIndex += 1;
+
+ if (this.typeIndex > this.partyType.size() - 1)
+ {
+ this.typeIndex = 0;
+ }
+
+ PartyController.instance().getParty(this.player).setType(PartyType.getTypeFromString((String) this.partyType.get(this.typeIndex)));
+
+ PacketDispatcher.sendPacketToServer(AetherPacketHandler.sendPartyTypeChange(PartyController.instance().getParty(this.player).getName(), PartyType.getTypeFromString((String) this.partyType.get(this.typeIndex))));
+ case 2:
+ }
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ public void drawScreen(int x, int y, float partialTick)
+ {
+ drawDefaultBackground();
+
+ this.buttonList.clear();
+
+ this.typeButton = new GuiButton(4, this.xParty - 60, this.yParty + 30 - 28, 120, 20, "Type: " + PartyController.instance().getParty(this.player).getType().name());
+
+ this.buttonList.add(this.typeButton);
+
+ this.buttonList.add(new GuiButton(3, this.xParty - 60, this.yParty - 36 - 28, 120, 20, "Change Name"));
+ this.buttonList.add(new GuiButton(1, this.xParty - 60, this.yParty - 14 - 28, 120, 20, "Manage Members"));
+ this.buttonList.add(new GuiButton(0, this.xParty - 60, this.yParty + 81 - 28, 120, 20, "Back"));
+
+ ArrayList partyList = PartyController.instance().getParties();
+
+ for (int i = 0; i < partyList.size(); i++)
+ {
+ if ((!((Party) partyList.get(i)).getLeader().username.equals(this.player.username)) ||
+ (((Party) partyList.get(i)).getType().name() == this.partyType.get(this.typeIndex)) || (((Party) partyList.get(i)).getName() != this.newPartyName))
+ ;
+ }
+
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+ int centerX = this.xParty - 70;
+ int centerY = this.yParty - 84;
+
+ ScaledResolution sr = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ drawTexturedModalRect(centerX, centerY, 0, 0, 141, this.hParty);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+
+ this.mc.renderEngine.resetBoundTexture();
+
+ String name = "Manage Party";
+
+ drawString(this.fontRenderer, name, centerX + 69 - this.fontRenderer.getStringWidth(name) / 2, centerY + 5, 16777215);
+ super.drawScreen(x, y, partialTick);
+ }
+
+ public void updateScreen()
+ {
+ super.updateScreen();
+ ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+ this.xParty = (width / 2);
+ this.yParty = (height / 2);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.social.GuiPartyEdit
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/social/GuiPartyList.java b/src/main/java/net/aetherteam/aether/client/gui/social/GuiPartyList.java
new file mode 100644
index 0000000..fef8fef
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/social/GuiPartyList.java
@@ -0,0 +1,207 @@
+package net.aetherteam.aether.client.gui.social;
+
+import cpw.mods.fml.client.FMLClientHandler;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.PartyType;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.settings.GameSettings;
+import net.minecraft.client.settings.KeyBinding;
+import org.lwjgl.input.Keyboard;
+import org.lwjgl.input.Mouse;
+import org.lwjgl.opengl.GL11;
+
+public class GuiPartyList extends GuiScreen
+{
+ private static final int LEADER_TEXT_COLOR = 26367;
+ private GuiYSlider sbar;
+ private float sbarVal = 0.0F;
+ private int backgroundTexture;
+ private int dialogueTexture;
+ private int xParty;
+ private int yParty;
+ private int wParty;
+ private int hParty;
+ private GuiScreen parent;
+ Minecraft f;
+
+ public GuiPartyList(GuiScreen parent)
+ {
+ this.mc = FMLClientHandler.instance().getClient();
+ this.backgroundTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/party.png");
+ this.dialogueTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/dialogue.png");
+ this.wParty = 256;
+ this.hParty = 256;
+ this.parent = parent;
+ updateScreen();
+ }
+
+ public void initGui()
+ {
+ Keyboard.enableRepeatEvents(true);
+ updateScreen();
+ this.buttonList.clear();
+ if (this.sbar != null) this.sbarVal = this.sbar.sliderValue;
+ this.sbar = new GuiYSlider(-1, this.xParty + 46, this.yParty - 54, 10, 103);
+ this.sbar.sliderValue = this.sbarVal;
+ this.buttonList.add(new GuiButton(0, this.xParty - 58, this.yParty + 85 - 28, 120, 20, "Back"));
+ }
+
+ protected void keyTyped(char charTyped, int keyTyped)
+ {
+ super.keyTyped(charTyped, keyTyped);
+
+ if (keyTyped == Minecraft.getMinecraft().gameSettings.keyBindInventory.keyCode)
+ {
+ this.mc.displayGuiScreen((GuiScreen) null);
+ this.mc.setIngameFocus();
+ }
+ }
+
+ protected void mouseClicked(int par1, int par2, int par3)
+ {
+ this.sbar.mousePressed(this.mc, par1, par2);
+ super.mouseClicked(par1, par2, par3);
+ }
+
+ protected void mouseMovedOrUp(int par1, int par2, int par3)
+ {
+ if (par3 == 0) this.sbar.mouseReleased(par1, par2);
+ super.mouseMovedOrUp(par1, par2, par3);
+ }
+
+ protected void actionPerformed(GuiButton btn)
+ {
+ switch (btn.id)
+ {
+ case 0:
+ this.mc.displayGuiScreen(this.parent);
+ }
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ public void drawScreen(int x, int y, float partialTick)
+ {
+ ArrayList partyList = PartyController.instance().getParties();
+ drawDefaultBackground();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+ int dmsy = Mouse.getDWheel();
+ this.sbar.sliderValue -= dmsy / 1000.0F;
+ if (this.sbar.sliderValue > 1.0F) this.sbar.sliderValue = 1.0F;
+ if (this.sbar.sliderValue < 0.0F) this.sbar.sliderValue = 0.0F;
+
+ int centerX = this.xParty - 70;
+ int centerY = this.yParty - 84;
+
+ ScaledResolution sr = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ drawTexturedModalRect(centerX, centerY, 0, 0, 141, this.hParty);
+ int totalHeight = 0;
+ int slotW = 100;
+ int slotH = 20;
+ int gutter = 2;
+ GL11.glEnable(3089);
+ GL11.glScissor((centerX + 14) * sr.getScaleFactor(), (centerY + 35) * sr.getScaleFactor(), slotW * sr.getScaleFactor(), 103 * sr.getScaleFactor());
+ GL11.glPushMatrix();
+ totalHeight = partyList.size() * (slotH + gutter);
+
+ float sVal = -this.sbar.sliderValue * (totalHeight - 105);
+
+ if (totalHeight > 103)
+ {
+ GL11.glTranslatef(0.0F, sVal, 0.0F);
+ }
+
+ totalHeight = 0;
+
+ boolean showNoParties = true;
+
+ for (int i = 0; i < partyList.size(); i++)
+ {
+ if (((Party) partyList.get(i)).getType() != PartyType.PRIVATE)
+ {
+ showNoParties = false;
+
+ drawPartySlot((Party) partyList.get(i), centerX + 15, centerY + totalHeight + 30, slotW, slotH, true);
+ totalHeight += slotH + gutter;
+ }
+ }
+
+ GL11.glPopMatrix();
+ GL11.glDisable(3089);
+
+ if (totalHeight > 103)
+ {
+ this.sbar.drawButton(this.mc, x, y);
+ }
+
+ this.mc.renderEngine.resetBoundTexture();
+ drawString(this.fontRenderer, "Party List", centerX + 70 - this.fontRenderer.getStringWidth("Party List") / 2, centerY + 10, 16777215);
+
+ if ((partyList.size() == 0) || (showNoParties))
+ {
+ GL11.glPushMatrix();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, this.dialogueTexture);
+
+ float scaleFactor = 1.3F;
+
+ GL11.glTranslatef(this.xParty - 100.0F * scaleFactor, this.yParty - (this.hParty - 201) / 2 * scaleFactor, 0.0F);
+
+ GL11.glScalef(scaleFactor, scaleFactor, scaleFactor);
+
+ drawTexturedModalRect(0, 0, 0, 0, 201, this.hParty - 201);
+ GL11.glPopMatrix();
+ this.mc.renderEngine.resetBoundTexture();
+
+ String warningLabel = "There are no parties to display at this time.";
+
+ drawString(this.fontRenderer, warningLabel, centerX + 70 - this.fontRenderer.getStringWidth(warningLabel) / 2, centerY + 75, 16777215);
+ }
+
+ super.drawScreen(x, y, partialTick);
+ }
+
+ public void updateScreen()
+ {
+ super.updateScreen();
+ ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+ this.xParty = (width / 2);
+ this.yParty = (height / 2);
+ }
+
+ public void drawPartySlot(Party party, int x, int y, int width, int height, boolean online)
+ {
+ drawGradientRect(x, y, x + width, y + height, -11184811, -10066330);
+
+ this.mc.renderEngine.resetBoundTexture();
+
+ this.fontRenderer.drawStringWithShadow(party.getName(), x + height - 19, y + 2, 15066597);
+ GL11.glPushMatrix();
+ GL11.glScalef(0.75F, 0.75F, 1.0F);
+ this.fontRenderer.drawString(party.getLeader().username, (int) ((x + height) / 0.75F - 22.0F + party.getType().name().length() * 6), (int) ((y + 12.0F) / 0.75F), 26367);
+ this.fontRenderer.drawString(party.getType().name(), (int) ((x + height) / 0.75F) - 25, (int) ((y + 12.0F) / 0.75F), party.getType().getDisplayColor());
+ GL11.glPopMatrix();
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.social.GuiPartyList
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/social/GuiPartyMenu.java b/src/main/java/net/aetherteam/aether/client/gui/social/GuiPartyMenu.java
new file mode 100644
index 0000000..64b11c3
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/social/GuiPartyMenu.java
@@ -0,0 +1,229 @@
+package net.aetherteam.aether.client.gui.social;
+
+import cpw.mods.fml.client.FMLClientHandler;
+
+import java.util.List;
+
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.notifications.client.GuiRequestPlayer;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.settings.GameSettings;
+import net.minecraft.client.settings.KeyBinding;
+import net.minecraft.entity.player.EntityPlayer;
+import org.lwjgl.opengl.GL11;
+
+public class GuiPartyMenu extends GuiScreen
+{
+ private final PartyData pm;
+ private int backgroundTexture;
+ private int partyCreatedTexture;
+ private int xMenu;
+ private int yMenu;
+ private int wMenu;
+ private int hMenu;
+ Minecraft f;
+ private EntityPlayer player;
+ private GuiButton createPartyButton;
+ private GuiButton leavePartyButton;
+ private GuiButton editPartyButton;
+ private GuiButton joinPartyButton;
+ private GuiButton membersButton;
+ private GuiButton addMemberButton;
+ private GuiScreen parent;
+
+ public GuiPartyMenu(EntityPlayer player, GuiScreen parent)
+ {
+ this(new PartyData(), player, parent);
+ }
+
+ protected void keyTyped(char charTyped, int keyTyped)
+ {
+ super.keyTyped(charTyped, keyTyped);
+
+ if (keyTyped == Minecraft.getMinecraft().gameSettings.keyBindInventory.keyCode)
+ {
+ this.mc.displayGuiScreen((GuiScreen) null);
+ this.mc.setIngameFocus();
+ }
+ }
+
+ public GuiPartyMenu(PartyData pm, EntityPlayer player, GuiScreen parent)
+ {
+ this.parent = parent;
+ this.player = player;
+ this.mc = FMLClientHandler.instance().getClient();
+ this.pm = pm;
+ this.backgroundTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/partyMain.png");
+ this.partyCreatedTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/partyCreated.png");
+ this.wMenu = 256;
+ this.hMenu = 256;
+ updateScreen();
+ }
+
+ protected void actionPerformed(GuiButton btn)
+ {
+ switch (btn.id)
+ {
+ case 0:
+ this.mc.displayGuiScreen(this.parent);
+ break;
+ case 2:
+ this.mc.displayGuiScreen(new GuiPartyList(this));
+ break;
+ case 3:
+ this.mc.displayGuiScreen(new GuiPartyEdit(this.player, this));
+ break;
+ case 4:
+ this.mc.displayGuiScreen(new GuiJoinParty(this.player, this));
+ break;
+ case 5:
+ this.mc.displayGuiScreen(new GuiCreateParty(this.player, this));
+ break;
+ case 6:
+ Party party = PartyController.instance().getParty(this.player);
+ PartyMember potentialLeader = PartyController.instance().getMember(this.player);
+
+ boolean isLeader = party.isLeader(potentialLeader);
+
+ if (isLeader)
+ {
+ PartyController.instance().removeParty(party, true);
+ } else PartyController.instance().leaveParty(party, potentialLeader, true);
+
+ break;
+ case 7:
+ this.mc.displayGuiScreen(new GuiMemberList(this.player, this));
+ break;
+ case 8:
+ this.mc.displayGuiScreen(new GuiRequestPlayer(this.player, this));
+ case 1:
+ }
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ public void drawScreen(int x, int y, float partialTick)
+ {
+ this.buttonList.clear();
+
+ boolean isLeader = PartyController.instance().isLeader(this.player);
+ boolean inParty = PartyController.instance().inParty(this.player);
+
+ this.createPartyButton = new GuiButton(5, this.xMenu - 60, this.yMenu - 36 - 28, 120, 20, "Create Party");
+ this.joinPartyButton = new GuiButton(4, this.xMenu - 60, this.yMenu - 14 - 28, 120, 20, "Join Existing Party");
+ this.membersButton = new GuiButton(7, this.xMenu - 60, this.yMenu + 30 - (inParty ? 53 : 28), 120, 20, "Members");
+
+ this.editPartyButton = new GuiButton(3, this.xMenu - 60, this.yMenu + 30 - (inParty ? 53 : 28), 120, 20, "Manage Party");
+ this.leavePartyButton = new GuiButton(6, this.xMenu - 60, this.yMenu + 74 - (inParty ? 53 : 28), 120, 20, (isLeader ? "Disband" : "Leave") + " Party");
+ this.addMemberButton = new GuiButton(8, this.xMenu - 60, this.yMenu + 52 - (inParty ? 53 : 28), 120, 20, isLeader ? "Add Member" : "Make Request");
+
+ if (!inParty)
+ {
+ this.leavePartyButton.enabled = false;
+ this.createPartyButton.enabled = true;
+ this.joinPartyButton.enabled = true;
+
+ this.buttonList.add(this.createPartyButton);
+ this.buttonList.add(this.joinPartyButton);
+ } else
+ {
+ this.createPartyButton.enabled = false;
+ this.leavePartyButton.enabled = true;
+ this.joinPartyButton.enabled = false;
+ this.addMemberButton.enabled = true;
+
+ this.buttonList.add(this.leavePartyButton);
+ this.buttonList.add(this.membersButton);
+ this.buttonList.add(this.addMemberButton);
+ }
+
+ Party party = PartyController.instance().getParty(PartyController.instance().getMember(this.player));
+
+ if ((party != null) && (DungeonHandler.instance().isInDungeon(party)))
+ {
+ this.addMemberButton.enabled = false;
+ } else if (isLeader)
+ {
+ this.editPartyButton.enabled = true;
+ this.addMemberButton.enabled = true;
+ } else
+ {
+ this.editPartyButton.enabled = false;
+ this.addMemberButton.enabled = false;
+ }
+
+ this.buttonList.add(new GuiButton(2, this.xMenu - 60, this.yMenu + 8 - (inParty ? 53 : 28), 120, 20, "Party List"));
+
+ if (isLeader)
+ {
+ this.buttonList.add(this.editPartyButton);
+ }
+
+ this.buttonList.add(new GuiButton(0, this.xMenu - 60, this.yMenu + 81 - 28, 120, 20, "Back"));
+
+ drawDefaultBackground();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, inParty ? this.partyCreatedTexture : this.backgroundTexture);
+ int centerX = this.xMenu - 70;
+ int centerY = this.yMenu - 84;
+
+ ScaledResolution sr = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ drawTexturedModalRect(centerX, centerY, 0, 0, 141, this.hMenu);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+
+ this.mc.renderEngine.resetBoundTexture();
+
+ String name = "";
+
+ if (inParty)
+ {
+ name = "Your Party:";
+ } else name = "Party Menu";
+
+ if (!isLeader)
+ {
+ name = "Joined Party:";
+ }
+
+ drawString(this.fontRenderer, name, centerX + 69 - this.fontRenderer.getStringWidth(name) / 2, centerY + 5, 16777215);
+
+ if (inParty)
+ {
+ if (party != null)
+ {
+ String partyName = party.getName();
+
+ drawString(this.fontRenderer, partyName, centerX + 70 - this.fontRenderer.getStringWidth(partyName) / 2, centerY + 20, 16777215);
+ }
+
+ }
+
+ super.drawScreen(x, y, partialTick);
+ }
+
+ public void updateScreen()
+ {
+ super.updateScreen();
+ ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+ this.xMenu = (width / 2);
+ this.yMenu = (height / 2);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.social.GuiPartyMenu
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/social/GuiPartyRequest.java b/src/main/java/net/aetherteam/aether/client/gui/social/GuiPartyRequest.java
new file mode 100644
index 0000000..cf3614b
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/social/GuiPartyRequest.java
@@ -0,0 +1,122 @@
+package net.aetherteam.aether.client.gui.social;
+
+import cpw.mods.fml.client.FMLClientHandler;
+
+import java.util.List;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.settings.GameSettings;
+import net.minecraft.client.settings.KeyBinding;
+import net.minecraft.entity.player.EntityPlayer;
+import org.lwjgl.opengl.GL11;
+
+public class GuiPartyRequest extends GuiScreen
+{
+ private final PartyData pm;
+ private int backgroundTexture;
+ private int easterTexture;
+ private int xParty;
+ private int yParty;
+ private int wParty;
+ private int hParty;
+ Minecraft f;
+ private EntityPlayer player;
+ private GuiScreen parent;
+
+ public GuiPartyRequest(EntityPlayer player, GuiScreen parent)
+ {
+ this(new PartyData(), player, parent);
+ }
+
+ public GuiPartyRequest(PartyData pm, EntityPlayer player, GuiScreen parent)
+ {
+ this.parent = parent;
+ this.player = player;
+ this.mc = FMLClientHandler.instance().getClient();
+ this.pm = pm;
+ this.backgroundTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/partyMain.png");
+ this.easterTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/partyMain.png");
+ this.wParty = 256;
+ this.hParty = 256;
+ updateScreen();
+ }
+
+ protected void keyTyped(char charTyped, int keyTyped)
+ {
+ super.keyTyped(charTyped, keyTyped);
+
+ if (keyTyped == Minecraft.getMinecraft().gameSettings.keyBindInventory.keyCode)
+ {
+ this.mc.displayGuiScreen((GuiScreen) null);
+ this.mc.setIngameFocus();
+ }
+ }
+
+ public void initGui()
+ {
+ updateScreen();
+ this.buttonList.clear();
+ this.buttonList.add(new GuiButton(5, this.xParty - 60, this.yParty - 36 - 28, 120, 20, "Ownership"));
+ this.buttonList.add(new GuiButton(4, this.xParty - 60, this.yParty - 14 - 28, 120, 20, "Operator"));
+ this.buttonList.add(new GuiButton(3, this.xParty - 60, this.yParty + 8 - 28, 120, 20, "Leave"));
+ this.buttonList.add(new GuiButton(2, this.xParty - 60, this.yParty + 30 - 28, 120, 20, "Disband"));
+ this.buttonList.add(new GuiButton(0, this.xParty - 60, this.yParty + 81 - 28, 120, 20, "Back"));
+ }
+
+ protected void actionPerformed(GuiButton btn)
+ {
+ switch (btn.id)
+ {
+ case 0:
+ this.mc.displayGuiScreen(this.parent);
+ break;
+ case 3:
+ this.mc.displayGuiScreen(new GuiPlayerList(this.player, this));
+ }
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ public void drawScreen(int x, int y, float partialTick)
+ {
+ drawDefaultBackground();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+ int centerX = this.xParty - 70;
+ int centerY = this.yParty - 84;
+
+ ScaledResolution sr = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ drawTexturedModalRect(centerX, centerY, 0, 0, 141, this.hParty);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+
+ this.mc.renderEngine.resetBoundTexture();
+
+ String name = "Request Party Position";
+
+ drawString(this.fontRenderer, name, centerX + 69 - this.fontRenderer.getStringWidth(name) / 2, centerY + 5, 16777215);
+ super.drawScreen(x, y, partialTick);
+ }
+
+ public void updateScreen()
+ {
+ super.updateScreen();
+ ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+ this.xParty = (width / 2);
+ this.yParty = (height / 2);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.social.GuiPartyRequest
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/social/GuiPartySlot.java b/src/main/java/net/aetherteam/aether/client/gui/social/GuiPartySlot.java
new file mode 100644
index 0000000..7b8ba7e
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/social/GuiPartySlot.java
@@ -0,0 +1,69 @@
+package net.aetherteam.aether.client.gui.social;
+
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyType;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.Gui;
+import net.minecraft.client.renderer.RenderEngine;
+import org.lwjgl.opengl.GL11;
+
+public class GuiPartySlot extends Gui
+{
+ protected int width;
+ protected int height;
+ public int xPosition;
+ public int yPosition;
+ public String displayString;
+ public int id;
+ public boolean enabled;
+ public boolean drawButton;
+ protected boolean field_82253_i;
+ public boolean selected;
+ private static final int LEADER_TEXT_COLOR = 26367;
+ public Party party;
+
+ public GuiPartySlot(Party party, int id, int x, int y, int width, int height)
+ {
+ this.selected = false;
+ this.width = width;
+ this.height = height;
+ this.enabled = true;
+ this.drawButton = true;
+ this.id = id;
+ this.xPosition = x;
+ this.yPosition = y;
+ this.party = party;
+ }
+
+ public void drawPartySlot(int x, int y, int width, int height)
+ {
+ this.xPosition = x;
+ this.yPosition = y;
+
+ drawGradientRect(this.xPosition, this.yPosition, this.xPosition + width, this.yPosition + height, this.selected ? -10439830 : -13421773, this.selected ? -11563178 : -11184811);
+
+ Minecraft mc = Minecraft.getMinecraft();
+ FontRenderer fontRenderer = mc.fontRenderer;
+
+ mc.renderEngine.resetBoundTexture();
+
+ fontRenderer.drawStringWithShadow(this.party.getName(), x + height - 19, y + 2, 15066597);
+ GL11.glPushMatrix();
+ GL11.glScalef(0.75F, 0.75F, 1.0F);
+ fontRenderer.drawString(this.party.getLeader().username, (int) ((x + height) / 0.75F - 22.0F + this.party.getType().name().length() * 6), (int) ((y + 12.0F) / 0.75F), 26367);
+ fontRenderer.drawString(this.party.getType().name(), (int) ((x + height) / 0.75F) - 25, (int) ((y + 12.0F) / 0.75F), this.party.getType().getDisplayColor());
+ GL11.glPopMatrix();
+ }
+
+ public boolean mousePressed(Minecraft par1Minecraft, int par2, int par3)
+ {
+ return (this.enabled) && (this.drawButton) && (par2 >= this.xPosition) && (par3 >= this.yPosition) && (par2 < this.xPosition + this.width) && (par3 < this.yPosition + this.height);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.social.GuiPartySlot
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/social/GuiPlayerList.java b/src/main/java/net/aetherteam/aether/client/gui/social/GuiPlayerList.java
new file mode 100644
index 0000000..ef2bb8a
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/social/GuiPlayerList.java
@@ -0,0 +1,207 @@
+package net.aetherteam.aether.client.gui.social;
+
+import cpw.mods.fml.client.FMLClientHandler;
+
+import java.util.List;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.entity.EntityClientPlayerMP;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiPlayerInfo;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.multiplayer.NetClientHandler;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.settings.GameSettings;
+import net.minecraft.client.settings.KeyBinding;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.StringUtils;
+import org.lwjgl.input.Keyboard;
+import org.lwjgl.input.Mouse;
+import org.lwjgl.opengl.GL11;
+
+public class GuiPlayerList extends GuiScreen
+{
+ protected static final String DEV_TEXT = "Aether II Developer";
+ protected static final String DOUBLE_TEXT = "Smelly Person :3";
+ protected static final String BETA_TEXT = "Aether II Beta Tester";
+ private static final int DEV_TEXT_COLOR = 16105765;
+ private GuiYSlider sbar;
+ private float sbarVal = 0.0F;
+ private int backgroundTexture;
+ private int dialogueTexture;
+ private int xParty;
+ private int yParty;
+ private int wParty;
+ private int hParty;
+ Minecraft f;
+ private EntityPlayer player;
+ private GuiScreen parent;
+
+ public GuiPlayerList(EntityPlayer player, GuiScreen parent)
+ {
+ this.player = player;
+ this.parent = parent;
+ this.mc = FMLClientHandler.instance().getClient();
+ this.backgroundTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/party.png");
+ this.dialogueTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/dialogue.png");
+ this.wParty = 256;
+ this.hParty = 256;
+ updateScreen();
+ }
+
+ protected void keyTyped(char charTyped, int keyTyped)
+ {
+ super.keyTyped(charTyped, keyTyped);
+
+ if (keyTyped == Minecraft.getMinecraft().gameSettings.keyBindInventory.keyCode)
+ {
+ this.mc.displayGuiScreen((GuiScreen) null);
+ this.mc.setIngameFocus();
+ }
+ }
+
+ public void initGui()
+ {
+ Keyboard.enableRepeatEvents(true);
+ updateScreen();
+ this.buttonList.clear();
+ if (this.sbar != null) this.sbarVal = this.sbar.sliderValue;
+ this.sbar = new GuiYSlider(-1, this.xParty + 46, this.yParty - 54, 10, 103);
+ this.sbar.sliderValue = this.sbarVal;
+ this.buttonList.add(new GuiButton(0, this.xParty - 58, this.yParty + 85 - 28, 120, 20, "Back"));
+ }
+
+ protected void mouseClicked(int par1, int par2, int par3)
+ {
+ this.sbar.mousePressed(this.mc, par1, par2);
+ super.mouseClicked(par1, par2, par3);
+ }
+
+ protected void mouseMovedOrUp(int par1, int par2, int par3)
+ {
+ if (par3 == 0) this.sbar.mouseReleased(par1, par2);
+ super.mouseMovedOrUp(par1, par2, par3);
+ }
+
+ protected void actionPerformed(GuiButton btn)
+ {
+ switch (btn.id)
+ {
+ case 0:
+ this.mc.displayGuiScreen(this.parent);
+ }
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ public void drawScreen(int x, int y, float partialTick)
+ {
+ List playerList = this.mc.thePlayer.sendQueue.playerInfoList;
+ drawDefaultBackground();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+ int dmsy = Mouse.getDWheel();
+ this.sbar.sliderValue -= dmsy / 1000.0F;
+ if (this.sbar.sliderValue > 1.0F) this.sbar.sliderValue = 1.0F;
+ if (this.sbar.sliderValue < 0.0F) this.sbar.sliderValue = 0.0F;
+ int centerX = this.xParty - 70;
+ int centerY = this.yParty - 84;
+
+ ScaledResolution sr = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ drawTexturedModalRect(centerX, centerY, 0, 0, 141, this.hParty);
+ int totalHeight = 0;
+ int slotW = 100;
+ int slotH = 20;
+ int gutter = 2;
+ GL11.glEnable(3089);
+ GL11.glScissor((centerX + 14) * sr.getScaleFactor(), (centerY + 35) * sr.getScaleFactor(), slotW * sr.getScaleFactor(), 103 * sr.getScaleFactor());
+ GL11.glPushMatrix();
+ totalHeight = playerList.size() * (slotH + gutter);
+ float sVal = -this.sbar.sliderValue * (totalHeight - 105);
+
+ if (totalHeight > 103)
+ {
+ GL11.glTranslatef(0.0F, sVal, 0.0F);
+ }
+
+ List list = this.mc.thePlayer.sendQueue.playerInfoList;
+ totalHeight = 0;
+
+ for (int i = 0; i < playerList.size(); i++)
+ {
+ GuiPlayerInfo guiplayerinfo = (GuiPlayerInfo) playerList.get(i);
+ drawPlayerSlot(guiplayerinfo.name, centerX + 15, centerY + totalHeight + 30, slotW, slotH, true);
+ totalHeight += slotH + gutter;
+ }
+
+ GL11.glPopMatrix();
+ GL11.glDisable(3089);
+
+ if (totalHeight > 103)
+ {
+ this.sbar.drawButton(this.mc, x, y);
+ }
+
+ drawString(this.fontRenderer, "Player List", centerX + 40, centerY + 10, 16777215);
+ super.drawScreen(x, y, partialTick);
+ }
+
+ public void updateScreen()
+ {
+ super.updateScreen();
+ ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+ this.xParty = (width / 2);
+ this.yParty = (height / 2);
+ }
+
+ public void drawPlayerSlot(String playername, int x, int y, int width, int height, boolean online)
+ {
+ drawGradientRect(x, y, x + width, y + height, -11184811, -10066330);
+
+ int icon = this.mc.renderEngine.getTextureForDownloadableImage("http://skins.minecraft.net/MinecraftSkins/" + StringUtils.stripControlCodes(playername) + ".png", "/mob/char.png");
+
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, icon);
+ GL11.glEnable(3553);
+
+ float u = 0.125F;
+ float v = 0.25F;
+ float u1 = 0.25F;
+ float v1 = 0.5F;
+ GL11.glBegin(7);
+ GL11.glTexCoord2f(u, v);
+ GL11.glVertex2f(x + 2, y + 2);
+ GL11.glTexCoord2f(u, v1);
+ GL11.glVertex2f(x + 2, y + 18);
+ GL11.glTexCoord2f(u1, v1);
+ GL11.glVertex2f(x + 18, y + 18);
+ GL11.glTexCoord2f(u1, v);
+ GL11.glVertex2f(x + 18, y + 2);
+ GL11.glEnd();
+
+ this.mc.renderEngine.resetBoundTexture();
+
+ this.fontRenderer.drawStringWithShadow(playername, x + height, y + 2, 15066597);
+ GL11.glPushMatrix();
+ GL11.glScalef(0.75F, 0.75F, 1.0F);
+ if ((playername.toLowerCase().equals("ijaryt23")) || (playername.toLowerCase().equals("kingbdogz")) || (playername.toLowerCase().equals("saspiron")))
+ this.fontRenderer.drawString("Aether II Developer", (int) ((x + height) / 0.75F), (int) ((y + 12.0F) / 0.75F), 16105765);
+ else if (playername.toLowerCase().equals("mr360games"))
+ this.fontRenderer.drawString("Smelly Person :3", (int) ((x + height) / 0.75F), (int) ((y + 12.0F) / 0.75F), 16105765);
+ else if (playername.toLowerCase().equals("some beta tester <3"))
+ this.fontRenderer.drawString("Smelly Person :3", (int) ((x + height) / 0.75F), (int) ((y + 12.0F) / 0.75F), 16105765);
+ GL11.glPopMatrix();
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.social.GuiPlayerList
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/social/GuiPlayerSlot.java b/src/main/java/net/aetherteam/aether/client/gui/social/GuiPlayerSlot.java
new file mode 100644
index 0000000..b06f49d
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/social/GuiPlayerSlot.java
@@ -0,0 +1,114 @@
+package net.aetherteam.aether.client.gui.social;
+
+import java.util.ArrayList;
+
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.Gui;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.util.StringUtils;
+import org.lwjgl.opengl.GL11;
+
+public class GuiPlayerSlot extends Gui
+{
+ protected static final String ONLINE_TEXT = "ONLINE";
+ protected static final String OFFLINE_TEXT = "OFFLINE";
+ private static final int ONLINE_TEXT_COLOR = 6750054;
+ private static final int OFFLINE_TEXT_COLOR = 16711680;
+ protected int width;
+ protected int height;
+ public int xPosition;
+ public int yPosition;
+ public String displayString;
+ public int id;
+ public boolean enabled;
+ public boolean drawButton;
+ protected boolean field_82253_i;
+ public boolean selected;
+ private static final int LEADER_TEXT_COLOR = 26367;
+ public String username;
+ public String skinURL;
+
+ public GuiPlayerSlot(String username, String skinURL, int id, int x, int y, int width, int height)
+ {
+ this.skinURL = skinURL;
+ this.username = username;
+ this.selected = false;
+ this.width = width;
+ this.height = height;
+ this.enabled = true;
+ this.drawButton = true;
+ this.id = id;
+ this.xPosition = x;
+ this.yPosition = y;
+ }
+
+ public void drawPlayerSlot(int x, int y, int width, int height)
+ {
+ this.xPosition = x;
+ this.yPosition = y;
+
+ drawGradientRect(this.xPosition, this.yPosition, this.xPosition + width, this.yPosition + height, this.selected ? -10439830 : -13421773, this.selected ? -11563178 : -11184811);
+
+ Minecraft mc = Minecraft.getMinecraft();
+ FontRenderer fontRenderer = mc.fontRenderer;
+
+ ArrayList partyList = PartyController.instance().getParties();
+ ArrayList playerStringList = new ArrayList();
+
+ for (int i = 0; i < partyList.size(); i++)
+ {
+ PartyMember member = PartyController.instance().getMember(this.username);
+
+ if (((Party) partyList.get(i)).hasMember(member))
+ {
+ playerStringList.add(this.username);
+ }
+ }
+
+ int icon = mc.renderEngine.getTextureForDownloadableImage("http://skins.minecraft.net/MinecraftSkins/" + StringUtils.stripControlCodes(this.username) + ".png", "/mob/char.png");
+
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, icon);
+ GL11.glEnable(3553);
+
+ float u = 0.125F;
+ float v = 0.25F;
+ float u1 = 0.25F;
+ float v1 = 0.5F;
+ GL11.glBegin(7);
+ GL11.glTexCoord2f(u, v);
+ GL11.glVertex2f(x + 2, y + 2);
+ GL11.glTexCoord2f(u, v1);
+ GL11.glVertex2f(x + 2, y + 18);
+ GL11.glTexCoord2f(u1, v1);
+ GL11.glVertex2f(x + 18, y + 18);
+ GL11.glTexCoord2f(u1, v);
+ GL11.glVertex2f(x + 18, y + 2);
+ GL11.glEnd();
+
+ mc.renderEngine.resetBoundTexture();
+
+ fontRenderer.drawStringWithShadow(this.username, x + height, y + 2, 15066597);
+
+ GL11.glPushMatrix();
+ GL11.glScalef(0.75F, 0.75F, 1.0F);
+ if (playerStringList.contains(this.username))
+ fontRenderer.drawString("ONLINE", (int) ((x + height) / 0.75F), (int) ((y + 12.0F) / 0.75F), 6750054);
+ else fontRenderer.drawString("OFFLINE", (int) ((x + height) / 0.75F), (int) ((y + 12.0F) / 0.75F), 16711680);
+ GL11.glPopMatrix();
+ }
+
+ public boolean mousePressed(Minecraft par1Minecraft, int par2, int par3)
+ {
+ return (this.enabled) && (this.drawButton) && (par2 >= this.xPosition) && (par3 >= this.yPosition) && (par2 < this.xPosition + this.width) && (par3 < this.yPosition + this.height);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.social.GuiPlayerSlot
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/social/GuiScreenNotificationOverlay.java b/src/main/java/net/aetherteam/aether/client/gui/social/GuiScreenNotificationOverlay.java
new file mode 100644
index 0000000..ea198bc
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/social/GuiScreenNotificationOverlay.java
@@ -0,0 +1,74 @@
+package net.aetherteam.aether.client.gui.social;
+
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.renderer.RenderEngine;
+import org.lwjgl.opengl.GL11;
+
+public class GuiScreenNotificationOverlay extends GuiScreen
+{
+ private int guiNotification;
+ private int hMenu;
+ private int wMenu;
+ private int centerX;
+ private int centerY;
+ private Party party;
+ private byte guiType = 0;
+ byte REQUEST = 0;
+ byte DENY = 1;
+ byte ACCEPT = 2;
+
+ public GuiScreenNotificationOverlay(Party party, byte guiType)
+ {
+ this.guiNotification = Minecraft.getMinecraft().renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/guiNotification.png");
+ this.wMenu = 256;
+ this.hMenu = 256;
+ this.party = party;
+ this.guiType = guiType;
+ }
+
+ protected void keyTyped(char par1, int par2)
+ {
+ super.keyTyped(par1, par2);
+ }
+
+ public void updateScreen()
+ {
+ super.updateScreen();
+ ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+ this.centerX = (width / 2);
+ this.centerY = (height / 2);
+ }
+
+ public void drawScreen(int par1, int par2, float par3)
+ {
+ if (this.guiType == this.REQUEST)
+ {
+ drawCenteredString(this.fontRenderer, this.party.getLeader().username + " has invited you to join their party!", this.centerX, this.centerY, 56281239);
+ }
+ if (this.guiType == this.DENY)
+ {
+ drawCenteredString(this.fontRenderer, this.party.getLeader().username + " has invited you to join their party!", this.centerX, this.centerY, 56281239);
+ }
+ if (this.guiType == this.ACCEPT)
+ {
+ drawCenteredString(this.fontRenderer, this.party.getLeader().username + " has invited you to join their party!", this.centerX, this.centerY, 56281239);
+ }
+ drawDefaultBackground();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, this.guiNotification);
+ ScaledResolution sr = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ drawTexturedModalRect(this.centerX, this.centerY, 0, 0, 141, this.hMenu);
+ this.mc.renderEngine.resetBoundTexture();
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.social.GuiScreenNotificationOverlay
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/social/GuiYSlider.java b/src/main/java/net/aetherteam/aether/client/gui/social/GuiYSlider.java
new file mode 100644
index 0000000..769ec00
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/social/GuiYSlider.java
@@ -0,0 +1,101 @@
+package net.aetherteam.aether.client.gui.social;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.GuiButton;
+import org.lwjgl.opengl.GL11;
+
+public class GuiYSlider extends GuiButton
+{
+ private static final int BACKGROUND_COLOR = -8947849;
+ private static final int DEFAULT_BAR_COLOR = -10066330;
+ private static final int HOVER_BAR_COLOR = -11184811;
+ private static final int DRAG_BAR_COLOR = -12303292;
+ public float sliderValue = 0.0F;
+ public boolean dragging = false;
+
+ public GuiYSlider(int id, int x, int y, int width, int height)
+ {
+ super(id, x, y, width, height, "");
+ }
+
+ protected int getHoverState(boolean par1)
+ {
+ return super.getHoverState(par1);
+ }
+
+ protected void mouseDragged(Minecraft par1Minecraft, int par2, int par3)
+ {
+ if (this.drawButton)
+ {
+ if (this.dragging)
+ {
+ this.sliderValue = ((par3 - (this.yPosition + 4)) / (this.height - 8));
+
+ if (this.sliderValue < 0.0F)
+ {
+ this.sliderValue = 0.0F;
+ }
+
+ if (this.sliderValue > 1.0F)
+ {
+ this.sliderValue = 1.0F;
+ }
+ }
+
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ drawTexturedModalRect(this.xPosition, this.yPosition + (int) (this.sliderValue * (this.height - 20)), 0, 66, this.width, 20);
+ drawTexturedModalRect(this.xPosition, this.yPosition + (int) (this.sliderValue * (this.height - 20)) + 4, 196, 66, 4, 20);
+ }
+ }
+
+ public void drawButton(Minecraft par1Minecraft, int par2, int par3)
+ {
+ mouseDragged(par1Minecraft, par2, par3);
+ GL11.glDisable(3553);
+ drawGradientRect(this.xPosition, this.yPosition, this.xPosition + this.width, this.yPosition + this.height, -8947849, -8947849);
+
+ this.field_82253_i = ((par2 >= this.xPosition) && (par3 >= this.yPosition + (int) (this.sliderValue * (this.height - 20))) && (par2 < this.xPosition + this.width) && (par3 < this.yPosition + 20 + (int) (this.sliderValue * (this.height - 20))));
+ int barColor;
+ if (this.dragging)
+ {
+ barColor = -12303292;
+ } else
+ {
+ if (this.field_82253_i) barColor = -11184811;
+ else barColor = -10066330;
+ }
+ drawGradientRect(this.xPosition, this.yPosition + (int) (this.sliderValue * (this.height - 20)), this.xPosition + this.width, this.yPosition + (int) (this.sliderValue * (this.height - 20)) + 20, barColor, barColor);
+ }
+
+ public boolean mousePressed(Minecraft par1Minecraft, int par2, int par3)
+ {
+ if (super.mousePressed(par1Minecraft, par2, par3))
+ {
+ this.sliderValue = ((par3 - (this.yPosition + 4)) / (this.height - 8));
+
+ if (this.sliderValue < 0.0F)
+ {
+ this.sliderValue = 0.0F;
+ }
+
+ if (this.sliderValue > 1.0F)
+ {
+ this.sliderValue = 1.0F;
+ }
+
+ this.dragging = true;
+ return true;
+ }
+ return false;
+ }
+
+ public void mouseReleased(int par1, int par2)
+ {
+ this.dragging = false;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.social.GuiYSlider
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/social/PartyData.java b/src/main/java/net/aetherteam/aether/client/gui/social/PartyData.java
new file mode 100644
index 0000000..91ab748
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/social/PartyData.java
@@ -0,0 +1,14 @@
+package net.aetherteam.aether.client.gui.social;
+
+import java.util.ArrayList;
+
+public class PartyData
+{
+ public ArrayList pList_online = new ArrayList();
+ public ArrayList pList_offline = new ArrayList();
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.social.PartyData
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/social/PartyModel.java b/src/main/java/net/aetherteam/aether/client/gui/social/PartyModel.java
new file mode 100644
index 0000000..bc01301
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/social/PartyModel.java
@@ -0,0 +1,14 @@
+package net.aetherteam.aether.client.gui.social;
+
+import java.util.ArrayList;
+
+public class PartyModel
+{
+ public ArrayList pList_online = new ArrayList();
+ public ArrayList pList_offline = new ArrayList();
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.social.PartyModel
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/social/PartyView.java b/src/main/java/net/aetherteam/aether/client/gui/social/PartyView.java
new file mode 100644
index 0000000..17c9320
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/social/PartyView.java
@@ -0,0 +1,144 @@
+package net.aetherteam.aether.client.gui.social;
+
+import cpw.mods.fml.client.FMLClientHandler;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import org.lwjgl.opengl.GL11;
+
+public class PartyView extends GuiScreen
+{
+ private final PartyModel pm;
+ private int backgroundTexture;
+ private int xParty;
+ private int yParty;
+ private int wParty;
+ private int hParty;
+ Minecraft f;
+
+ public PartyView()
+ {
+ this(new PartyModel());
+ }
+
+ public PartyView(PartyModel pm)
+ {
+ this.mc = FMLClientHandler.instance().getClient();
+ this.pm = pm;
+ this.backgroundTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/party.png");
+ this.wParty = 256;
+ this.hParty = 256;
+ updateScreen();
+
+ pm.pList_online.add(this.mc.thePlayer);
+ pm.pList_online.add(this.mc.thePlayer);
+ pm.pList_online.add(this.mc.thePlayer);
+ }
+
+ public void initGui()
+ {
+ this.buttonList.clear();
+ this.buttonList.add(new GuiButton(0, this.xParty - 58, this.yParty + 85 - 28, 52, 20, "Invite"));
+ this.buttonList.add(new GuiButton(0, this.xParty - 1, this.yParty + 85 - 28, 60, 20, "Remove"));
+ super.initGui();
+ }
+
+ protected void actionPerformed(GuiButton btn)
+ {
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ public void drawScreen(int x, int y, float partialTick)
+ {
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+
+ int centerX = this.xParty - 70;
+ int centerY = this.yParty - 84;
+
+ drawTexturedModalRect(centerX, centerY, 0, 0, 141, this.hParty);
+ int totalHeight = 0;
+ int slotW = 111;
+ int slotH = 20;
+ int gutter = 2;
+ for (int i = 0; i < this.pm.pList_online.size(); i++)
+ {
+ EntityPlayer p = (EntityPlayer) this.pm.pList_online.get(i);
+ drawPlayerSlot(p, centerX + 15, centerY + totalHeight + 30, slotW, slotH);
+ totalHeight += slotH + gutter;
+ }
+ for (int i = 0; i < this.pm.pList_offline.size(); i++)
+ {
+ EntityPlayer p = (EntityPlayer) this.pm.pList_online.get(i);
+ drawPlayerSlot(p, this.xParty, this.yParty + totalHeight, slotW, slotH);
+ totalHeight += slotH + gutter;
+ }
+ this.fontRenderer.drawStringWithShadow("Kingbdogz' party", centerX + 16, centerY + 11, 16777215);
+
+ super.drawScreen(x, y, partialTick);
+ }
+
+ public void updateScreen()
+ {
+ super.updateScreen();
+ ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+ this.xParty = (width / 2);
+ this.yParty = (height / 2);
+ }
+
+ public void drawPlayerSlot(EntityPlayer p, int x, int y, int width, int height)
+ {
+ drawGradientRect(x, y, x + width, y + height, -5592406, -11184811);
+
+ int icon = this.mc.renderEngine.getTextureForDownloadableImage(p.skinUrl, "/mob/char.png");
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, icon);
+ GL11.glEnable(3553);
+
+ float u = 0.125F;
+ float v = 0.25F;
+ float u1 = 0.25F;
+ float v1 = 0.5F;
+
+ GL11.glBegin(7);
+
+ GL11.glTexCoord2f(u, v);
+ GL11.glVertex2f(x + 2, y + 2);
+
+ GL11.glTexCoord2f(u, v1);
+ GL11.glVertex2f(x + 2, y + 18);
+
+ GL11.glTexCoord2f(u1, v1);
+ GL11.glVertex2f(x + 18, y + 18);
+
+ GL11.glTexCoord2f(u1, v);
+ GL11.glVertex2f(x + 18, y + 2);
+ GL11.glEnd();
+
+ this.fontRenderer.drawStringWithShadow(p.username, x + height, y + 2, 15066597);
+ GL11.glPushMatrix();
+ GL11.glScalef(0.75F, 0.75F, 1.0F);
+ this.fontRenderer.drawString("Online", (int) ((x + height) / 0.75F), (int) ((y + 12.0F) / 0.75F), 7859831);
+ GL11.glPopMatrix();
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.social.PartyView
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/social/dialogue/GuiDialogueBox.java b/src/main/java/net/aetherteam/aether/client/gui/social/dialogue/GuiDialogueBox.java
new file mode 100644
index 0000000..683adc6
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/social/dialogue/GuiDialogueBox.java
@@ -0,0 +1,121 @@
+package net.aetherteam.aether.client.gui.social.dialogue;
+
+import cpw.mods.fml.client.FMLClientHandler;
+
+import java.util.List;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.settings.GameSettings;
+import net.minecraft.client.settings.KeyBinding;
+import org.lwjgl.opengl.GL11;
+
+public class GuiDialogueBox extends GuiScreen
+{
+ private static final int LEADER_TEXT_COLOR = 26367;
+ private int backgroundTexture;
+ private int dialogueTexture;
+ private int xParty;
+ private int yParty;
+ private int wParty;
+ private int hParty;
+ private GuiScreen parent;
+ Minecraft f;
+ private boolean created;
+ private String createdText;
+ private String failureText;
+
+ public GuiDialogueBox(GuiScreen parent, String createdText, String failureText, boolean created)
+ {
+ this.createdText = createdText;
+ this.failureText = failureText;
+ this.created = created;
+ this.mc = FMLClientHandler.instance().getClient();
+ this.backgroundTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/party.png");
+ this.dialogueTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/dialogue.png");
+ this.wParty = 256;
+ this.hParty = 256;
+ this.parent = parent;
+ updateScreen();
+ }
+
+ protected void keyTyped(char charTyped, int keyTyped)
+ {
+ super.keyTyped(charTyped, keyTyped);
+
+ if (keyTyped == Minecraft.getMinecraft().gameSettings.keyBindInventory.keyCode)
+ {
+ this.mc.displayGuiScreen((GuiScreen) null);
+ this.mc.setIngameFocus();
+ }
+ }
+
+ public void initGui()
+ {
+ updateScreen();
+ this.buttonList.clear();
+
+ this.buttonList.add(new GuiButton(0, this.xParty - 58, this.yParty, 120, 20, "Okay"));
+ }
+
+ protected void actionPerformed(GuiButton btn)
+ {
+ switch (btn.id)
+ {
+ case 0:
+ this.mc.displayGuiScreen(this.parent);
+ }
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ public void drawScreen(int x, int y, float partialTick)
+ {
+ drawDefaultBackground();
+
+ int centerX = this.xParty - 70;
+ int centerY = this.yParty - 84;
+
+ GL11.glPushMatrix();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, this.dialogueTexture);
+
+ float scaleFactor = 1.3F;
+
+ GL11.glTranslatef(this.xParty - 100.0F * scaleFactor, this.yParty - (this.hParty - 201) / 2 * scaleFactor, 0.0F);
+
+ GL11.glScalef(scaleFactor, scaleFactor, scaleFactor);
+
+ drawTexturedModalRect(0, 0, 0, 0, 201, this.hParty - 201);
+ GL11.glPopMatrix();
+ this.mc.renderEngine.resetBoundTexture();
+
+ String warningLabel = this.created ? this.createdText : this.failureText;
+
+ drawString(this.fontRenderer, warningLabel, centerX + 70 - this.fontRenderer.getStringWidth(warningLabel) / 2, centerY + 65, 16777215);
+
+ super.drawScreen(x, y, partialTick);
+ }
+
+ public void updateScreen()
+ {
+ super.updateScreen();
+ ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+ this.xParty = (width / 2);
+ this.yParty = (height / 2);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.social.dialogue.GuiDialogueBox
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/social/options/GuiOptions.java b/src/main/java/net/aetherteam/aether/client/gui/social/options/GuiOptions.java
new file mode 100644
index 0000000..aacb518
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/social/options/GuiOptions.java
@@ -0,0 +1,151 @@
+package net.aetherteam.aether.client.gui.social.options;
+
+import cpw.mods.fml.client.FMLClientHandler;
+
+import java.util.List;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.entity.EntityClientPlayerMP;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.multiplayer.NetClientHandler;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.settings.GameSettings;
+import net.minecraft.client.settings.KeyBinding;
+import net.minecraft.entity.player.EntityPlayer;
+import org.lwjgl.opengl.GL11;
+
+public class GuiOptions extends GuiScreen
+{
+ private int backgroundTexture;
+ private int easterTexture;
+ private int xParty;
+ private int yParty;
+ private int wParty;
+ private int hParty;
+ Minecraft f;
+ private EntityPlayer player;
+ private GuiScreen parent;
+
+ public GuiOptions(EntityPlayer player, GuiScreen parent)
+ {
+ this.parent = parent;
+ this.player = player;
+ this.mc = FMLClientHandler.instance().getClient();
+ this.backgroundTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/partyMain.png");
+ this.easterTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/partyMain.png");
+ this.wParty = 256;
+ this.hParty = 256;
+ updateScreen();
+ }
+
+ public void initGui()
+ {
+ updateScreen();
+ this.buttonList.clear();
+
+ this.buttonList.add(new GuiButton(0, this.xParty - 60, this.yParty + 81 - 28, 120, 20, "Back"));
+ }
+
+ protected void keyTyped(char charTyped, int keyTyped)
+ {
+ super.keyTyped(charTyped, keyTyped);
+
+ if (keyTyped == Minecraft.getMinecraft().gameSettings.keyBindInventory.keyCode)
+ {
+ this.mc.displayGuiScreen((GuiScreen) null);
+ this.mc.setIngameFocus();
+ }
+ }
+
+ protected void actionPerformed(GuiButton button)
+ {
+ List playerList = this.mc.thePlayer.sendQueue.playerInfoList;
+
+ boolean online = playerList.size() > 1;
+
+ switch (button.id)
+ {
+ case 0:
+ if (online)
+ {
+ this.mc.displayGuiScreen(this.parent);
+ } else this.mc.displayGuiScreen(null);
+
+ break;
+ case 1:
+ this.mc.displayGuiScreen(new GuiOptionsParty(this.player, this));
+ break;
+ case 2:
+ this.mc.displayGuiScreen(new GuiOptionsNotification(this.player, this));
+ break;
+ case 3:
+ this.mc.displayGuiScreen(new GuiOptionsCoinbar(this.player, this));
+ }
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ public void drawScreen(int x, int y, float partialTick)
+ {
+ this.buttonList.clear();
+
+ drawDefaultBackground();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+ int centerX = this.xParty - 70;
+ int centerY = this.yParty - 84;
+
+ ScaledResolution sr = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ drawTexturedModalRect(centerX, centerY, 0, 0, 141, this.hParty);
+
+ List playerList = this.mc.thePlayer.sendQueue.playerInfoList;
+
+ boolean online = playerList.size() > 1;
+
+ if (online)
+ {
+ this.buttonList.add(new GuiButton(1, this.xParty - 60, this.yParty - 36 - 28, 120, 20, "Party HUD"));
+ this.buttonList.add(new GuiButton(2, this.xParty - 60, this.yParty - 14 - 28, 120, 20, "Notifications"));
+ this.buttonList.add(new GuiButton(3, this.xParty - 60, this.yParty + 8 - 28, 120, 20, "Coinbar"));
+
+ this.mc.renderEngine.resetBoundTexture();
+
+ String title = "Options";
+
+ drawString(this.fontRenderer, title, centerX + 70 - this.fontRenderer.getStringWidth(title) / 2, centerY + 5, 16777215);
+ } else
+ {
+ GL11.glBindTexture(3553, this.backgroundTexture);
+ drawTexturedModalRect(centerX + 13, centerY + 40, 141, 131, 115, 125);
+
+ this.mc.renderEngine.resetBoundTexture();
+ drawString(this.fontRenderer, "Forever Alone :(", centerX + 26, centerY + 10, 15658734);
+ drawString(this.fontRenderer, "(Single Player)", centerX + 31, centerY + 22, 15658734);
+ }
+
+ this.buttonList.add(new GuiButton(0, this.xParty - 60, this.yParty + 81 - 28, 120, 20, online ? "Back" : "Exit"));
+
+ super.drawScreen(x, y, partialTick);
+ }
+
+ public void updateScreen()
+ {
+ super.updateScreen();
+ ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+ this.xParty = (width / 2);
+ this.yParty = (height / 2);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.social.options.GuiOptions
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/social/options/GuiOptionsCoinbar.java b/src/main/java/net/aetherteam/aether/client/gui/social/options/GuiOptionsCoinbar.java
new file mode 100644
index 0000000..34d33f7
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/social/options/GuiOptionsCoinbar.java
@@ -0,0 +1,148 @@
+package net.aetherteam.aether.client.gui.social.options;
+
+import cpw.mods.fml.client.FMLClientHandler;
+
+import java.util.List;
+
+import net.aetherteam.aether.data.AetherOptions;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.entity.EntityClientPlayerMP;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.multiplayer.NetClientHandler;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.settings.GameSettings;
+import net.minecraft.client.settings.KeyBinding;
+import net.minecraft.entity.player.EntityPlayer;
+import org.lwjgl.opengl.GL11;
+
+public class GuiOptionsCoinbar extends GuiScreen
+{
+ private int backgroundTexture;
+ private int easterTexture;
+ private int xParty;
+ private int yParty;
+ private int wParty;
+ private int hParty;
+ Minecraft f;
+ private EntityPlayer player;
+ private GuiScreen parent;
+
+ public GuiOptionsCoinbar(EntityPlayer player, GuiScreen parent)
+ {
+ this.parent = parent;
+ this.player = player;
+ this.mc = FMLClientHandler.instance().getClient();
+ this.backgroundTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/partyMain.png");
+ this.easterTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/partyMain.png");
+ this.wParty = 256;
+ this.hParty = 256;
+ updateScreen();
+ }
+
+ public void initGui()
+ {
+ updateScreen();
+ this.buttonList.clear();
+
+ this.buttonList.add(new GuiButton(0, this.xParty - 60, this.yParty + 81 - 28, 120, 20, "Back"));
+ }
+
+ protected void keyTyped(char charTyped, int keyTyped)
+ {
+ super.keyTyped(charTyped, keyTyped);
+
+ if (keyTyped == Minecraft.getMinecraft().gameSettings.keyBindInventory.keyCode)
+ {
+ this.mc.displayGuiScreen((GuiScreen) null);
+ this.mc.setIngameFocus();
+ }
+ }
+
+ protected void actionPerformed(GuiButton button)
+ {
+ List playerList = this.mc.thePlayer.sendQueue.playerInfoList;
+
+ boolean online = playerList.size() > 1;
+
+ switch (button.id)
+ {
+ case 0:
+ if (online)
+ {
+ this.mc.displayGuiScreen(this.parent);
+ } else this.mc.displayGuiScreen(null);
+
+ break;
+ case 1:
+ AetherOptions.setSlideCoinbar(!AetherOptions.getSlideCoinbar());
+ }
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ public void drawScreen(int x, int y, float partialTick)
+ {
+ this.buttonList.clear();
+
+ drawDefaultBackground();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+ int centerX = this.xParty - 70;
+ int centerY = this.yParty - 84;
+
+ ScaledResolution sr = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ drawTexturedModalRect(centerX, centerY, 0, 0, 141, this.hParty);
+
+ List playerList = this.mc.thePlayer.sendQueue.playerInfoList;
+
+ boolean online = playerList.size() > 1;
+
+ if (online)
+ {
+ String slideCoinbarString = AetherOptions.getSlideCoinbar() ? "True" : "False";
+
+ GuiButton showNotification = new GuiButton(1, this.xParty - 60, this.yParty - 36 - 28, 120, 20, "Slide Coinbar: " + slideCoinbarString);
+
+ this.buttonList.add(showNotification);
+
+ this.mc.renderEngine.resetBoundTexture();
+
+ String title = "Coinbar";
+
+ drawString(this.fontRenderer, title, centerX + 70 - this.fontRenderer.getStringWidth(title) / 2, centerY + 5, 16777215);
+ } else
+ {
+ GL11.glBindTexture(3553, this.backgroundTexture);
+ drawTexturedModalRect(centerX + 13, centerY + 40, 141, 131, 115, 125);
+
+ this.mc.renderEngine.resetBoundTexture();
+ drawString(this.fontRenderer, "Forever Alone :(", centerX + 26, centerY + 10, 15658734);
+ drawString(this.fontRenderer, "(Single Player)", centerX + 31, centerY + 22, 15658734);
+ }
+
+ this.buttonList.add(new GuiButton(0, this.xParty - 60, this.yParty + 81 - 28, 120, 20, online ? "Back" : "Exit"));
+
+ super.drawScreen(x, y, partialTick);
+ }
+
+ public void updateScreen()
+ {
+ super.updateScreen();
+ ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+ this.xParty = (width / 2);
+ this.yParty = (height / 2);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.social.options.GuiOptionsCoinbar
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/social/options/GuiOptionsNotification.java b/src/main/java/net/aetherteam/aether/client/gui/social/options/GuiOptionsNotification.java
new file mode 100644
index 0000000..f165e60
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/social/options/GuiOptionsNotification.java
@@ -0,0 +1,148 @@
+package net.aetherteam.aether.client.gui.social.options;
+
+import cpw.mods.fml.client.FMLClientHandler;
+
+import java.util.List;
+
+import net.aetherteam.aether.data.AetherOptions;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.entity.EntityClientPlayerMP;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.multiplayer.NetClientHandler;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.settings.GameSettings;
+import net.minecraft.client.settings.KeyBinding;
+import net.minecraft.entity.player.EntityPlayer;
+import org.lwjgl.opengl.GL11;
+
+public class GuiOptionsNotification extends GuiScreen
+{
+ private int backgroundTexture;
+ private int easterTexture;
+ private int xParty;
+ private int yParty;
+ private int wParty;
+ private int hParty;
+ Minecraft f;
+ private EntityPlayer player;
+ private GuiScreen parent;
+
+ public GuiOptionsNotification(EntityPlayer player, GuiScreen parent)
+ {
+ this.parent = parent;
+ this.player = player;
+ this.mc = FMLClientHandler.instance().getClient();
+ this.backgroundTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/partyMain.png");
+ this.easterTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/partyMain.png");
+ this.wParty = 256;
+ this.hParty = 256;
+ updateScreen();
+ }
+
+ public void initGui()
+ {
+ updateScreen();
+ this.buttonList.clear();
+
+ this.buttonList.add(new GuiButton(0, this.xParty - 60, this.yParty + 81 - 28, 120, 20, "Back"));
+ }
+
+ protected void keyTyped(char charTyped, int keyTyped)
+ {
+ super.keyTyped(charTyped, keyTyped);
+
+ if (keyTyped == Minecraft.getMinecraft().gameSettings.keyBindInventory.keyCode)
+ {
+ this.mc.displayGuiScreen((GuiScreen) null);
+ this.mc.setIngameFocus();
+ }
+ }
+
+ protected void actionPerformed(GuiButton button)
+ {
+ List playerList = this.mc.thePlayer.sendQueue.playerInfoList;
+
+ boolean online = playerList.size() > 1;
+
+ switch (button.id)
+ {
+ case 0:
+ if (online)
+ {
+ this.mc.displayGuiScreen(this.parent);
+ } else this.mc.displayGuiScreen(null);
+
+ break;
+ case 1:
+ AetherOptions.setShowNotifications(!AetherOptions.getShowNotifications());
+ }
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ public void drawScreen(int x, int y, float partialTick)
+ {
+ this.buttonList.clear();
+
+ drawDefaultBackground();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+ int centerX = this.xParty - 70;
+ int centerY = this.yParty - 84;
+
+ ScaledResolution sr = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ drawTexturedModalRect(centerX, centerY, 0, 0, 141, this.hParty);
+
+ List playerList = this.mc.thePlayer.sendQueue.playerInfoList;
+
+ boolean online = playerList.size() > 1;
+
+ if (online)
+ {
+ String showNotificationString = AetherOptions.getShowNotifications() ? "True" : "False";
+
+ GuiButton showNotification = new GuiButton(1, this.xParty - 60, this.yParty - 36 - 28, 120, 20, "Show Receiving: " + showNotificationString);
+
+ this.buttonList.add(showNotification);
+
+ this.mc.renderEngine.resetBoundTexture();
+
+ String title = "Notifications";
+
+ drawString(this.fontRenderer, title, centerX + 70 - this.fontRenderer.getStringWidth(title) / 2, centerY + 5, 16777215);
+ } else
+ {
+ GL11.glBindTexture(3553, this.backgroundTexture);
+ drawTexturedModalRect(centerX + 13, centerY + 40, 141, 131, 115, 125);
+
+ this.mc.renderEngine.resetBoundTexture();
+ drawString(this.fontRenderer, "Forever Alone :(", centerX + 26, centerY + 10, 15658734);
+ drawString(this.fontRenderer, "(Single Player)", centerX + 31, centerY + 22, 15658734);
+ }
+
+ this.buttonList.add(new GuiButton(0, this.xParty - 60, this.yParty + 81 - 28, 120, 20, online ? "Back" : "Exit"));
+
+ super.drawScreen(x, y, partialTick);
+ }
+
+ public void updateScreen()
+ {
+ super.updateScreen();
+ ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+ this.xParty = (width / 2);
+ this.yParty = (height / 2);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.social.options.GuiOptionsNotification
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/gui/social/options/GuiOptionsParty.java b/src/main/java/net/aetherteam/aether/client/gui/social/options/GuiOptionsParty.java
new file mode 100644
index 0000000..2b7d605
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/gui/social/options/GuiOptionsParty.java
@@ -0,0 +1,177 @@
+package net.aetherteam.aether.client.gui.social.options;
+
+import cpw.mods.fml.client.FMLClientHandler;
+
+import java.util.List;
+
+import net.aetherteam.aether.data.AetherOptions;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.entity.EntityClientPlayerMP;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.multiplayer.NetClientHandler;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.settings.GameSettings;
+import net.minecraft.client.settings.KeyBinding;
+import net.minecraft.entity.player.EntityPlayer;
+import org.lwjgl.opengl.GL11;
+
+public class GuiOptionsParty extends GuiScreen
+{
+ private int backgroundTexture;
+ private int easterTexture;
+ private int xParty;
+ private int yParty;
+ private int wParty;
+ private int hParty;
+ Minecraft f;
+ private EntityPlayer player;
+ private GuiScreen parent;
+
+ public GuiOptionsParty(EntityPlayer player, GuiScreen parent)
+ {
+ this.parent = parent;
+ this.player = player;
+ this.mc = FMLClientHandler.instance().getClient();
+ this.backgroundTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/partyMain.png");
+ this.easterTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/partyMain.png");
+ this.wParty = 256;
+ this.hParty = 256;
+ updateScreen();
+ }
+
+ public void initGui()
+ {
+ updateScreen();
+ this.buttonList.clear();
+
+ this.buttonList.add(new GuiButton(0, this.xParty - 60, this.yParty + 81 - 28, 120, 20, "Back"));
+ }
+
+ protected void keyTyped(char charTyped, int keyTyped)
+ {
+ super.keyTyped(charTyped, keyTyped);
+
+ if (keyTyped == Minecraft.getMinecraft().gameSettings.keyBindInventory.keyCode)
+ {
+ this.mc.displayGuiScreen((GuiScreen) null);
+ this.mc.setIngameFocus();
+ }
+ }
+
+ protected void actionPerformed(GuiButton button)
+ {
+ List playerList = this.mc.thePlayer.sendQueue.playerInfoList;
+
+ boolean online = playerList.size() > 1;
+
+ switch (button.id)
+ {
+ case 0:
+ if (online)
+ {
+ this.mc.displayGuiScreen(this.parent);
+ } else this.mc.displayGuiScreen(null);
+
+ break;
+ case 1:
+ AetherOptions.setShowPartyHUD(!AetherOptions.getShowPartyHUD());
+ break;
+ case 2:
+ AetherOptions.setMinimalPartyHUD(!AetherOptions.getMinimalPartyHUD());
+ break;
+ case 3:
+ AetherOptions.setRenderHead(!AetherOptions.getRenderHead());
+ break;
+ case 4:
+ AetherOptions.setShowPartyName(!AetherOptions.getShowPartyName());
+ }
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ public void drawScreen(int x, int y, float partialTick)
+ {
+ this.buttonList.clear();
+
+ drawDefaultBackground();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+ int centerX = this.xParty - 70;
+ int centerY = this.yParty - 84;
+
+ ScaledResolution sr = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ drawTexturedModalRect(centerX, centerY, 0, 0, 141, this.hParty);
+
+ List playerList = this.mc.thePlayer.sendQueue.playerInfoList;
+
+ boolean online = playerList.size() > 1;
+
+ if (online)
+ {
+ String renderHeadString = AetherOptions.getRenderHead() ? "True" : "False";
+ String showHUDString = AetherOptions.getShowPartyHUD() ? "True" : "False";
+
+ String showNameString = AetherOptions.getShowPartyName() ? "On" : "Off";
+
+ GuiButton minimalHUD = new GuiButton(2, this.xParty - 60, this.yParty - 14 - 28, 120, 20, "HUD Style: " + (AetherOptions.getMinimalPartyHUD() ? "Minimal" : "Heavy"));
+ GuiButton renderHead = new GuiButton(3, this.xParty - 60, this.yParty + 8 - 28, 120, 20, "Render Head: " + renderHeadString);
+ GuiButton showName = new GuiButton(4, this.xParty - 60, this.yParty + 30 - 28, 120, 20, "Party Name: " + showNameString);
+
+ this.buttonList.add(new GuiButton(1, this.xParty - 60, this.yParty - 36 - 28, 120, 20, "Show HUD: " + showHUDString));
+ this.buttonList.add(minimalHUD);
+ this.buttonList.add(renderHead);
+ this.buttonList.add(showName);
+
+ if (AetherOptions.getShowPartyHUD())
+ {
+ minimalHUD.enabled = true;
+ renderHead.enabled = true;
+ showName.enabled = true;
+ } else
+ {
+ minimalHUD.enabled = false;
+ renderHead.enabled = false;
+ showName.enabled = false;
+ }
+
+ this.mc.renderEngine.resetBoundTexture();
+
+ String title = "Party HUD";
+
+ drawString(this.fontRenderer, title, centerX + 70 - this.fontRenderer.getStringWidth(title) / 2, centerY + 5, 16777215);
+ } else
+ {
+ GL11.glBindTexture(3553, this.backgroundTexture);
+ drawTexturedModalRect(centerX + 13, centerY + 40, 141, 131, 115, 125);
+
+ this.mc.renderEngine.resetBoundTexture();
+ drawString(this.fontRenderer, "Forever Alone :(", centerX + 26, centerY + 10, 15658734);
+ drawString(this.fontRenderer, "(Single Player)", centerX + 31, centerY + 22, 15658734);
+ }
+
+ this.buttonList.add(new GuiButton(0, this.xParty - 60, this.yParty + 81 - 28, 120, 20, online ? "Back" : "Exit"));
+
+ super.drawScreen(x, y, partialTick);
+ }
+
+ public void updateScreen()
+ {
+ super.updateScreen();
+ ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+ this.xParty = (width / 2);
+ this.yParty = (height / 2);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.client.gui.social.options.GuiOptionsParty
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/client/models/ModelAechorPlant.java b/src/main/java/net/aetherteam/aether/client/models/ModelAechorPlant.java
new file mode 100644
index 0000000..ef4d74e
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/models/ModelAechorPlant.java
@@ -0,0 +1,179 @@
+package net.aetherteam.aether.client.models;
+
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+import org.lwjgl.opengl.GL11;
+
+public class ModelAechorPlant extends ModelBase
+{
+ private ModelRenderer[] petal;
+ private ModelRenderer[] leaf;
+ private ModelRenderer[] stamen;
+ private ModelRenderer[] stamen2;
+ private ModelRenderer[] thorn;
+ private ModelRenderer stem;
+ private ModelRenderer head;
+ private static int petals = 10;
+ private static int thorns = 4;
+ private static int stamens = 3;
+ public float sinage;
+ public float sinage2;
+ public float size;
+ private float pie;
+
+ public ModelAechorPlant()
+ {
+ this(0.0F);
+ }
+
+ public ModelAechorPlant(float var1)
+ {
+ this(var1, 0.0F);
+ }
+
+ public ModelAechorPlant(float var1, float var2)
+ {
+ this.pie = ((float) Math.PI * 2F);
+ this.size = 1.0F;
+ this.petal = new ModelRenderer[petals];
+ this.leaf = new ModelRenderer[petals];
+ int var3;
+
+ for (var3 = 0; var3 < petals; ++var3)
+ {
+ this.petal[var3] = new ModelRenderer(this, 0, 0);
+
+ if (var3 % 2 == 0)
+ {
+ this.petal[var3] = new ModelRenderer(this, 29, 3);
+ this.petal[var3].addBox(-4.0F, -1.0F, -12.0F, 8, 1, 9, var1 - 0.25F);
+ this.petal[var3].setRotationPoint(0.0F, 1.0F + var2, 0.0F);
+ } else
+ {
+ this.petal[var3].addBox(-4.0F, -1.0F, -13.0F, 8, 1, 10, var1 - 0.125F);
+ this.petal[var3].setRotationPoint(0.0F, 1.0F + var2, 0.0F);
+ }
+
+ this.leaf[var3] = new ModelRenderer(this, 38, 13);
+ this.leaf[var3].addBox(-2.0F, -1.0F, -9.5F, 4, 1, 8, var1 - 0.15F);
+ this.leaf[var3].setRotationPoint(0.0F, 1.0F + var2, 0.0F);
+ }
+
+ this.stamen = new ModelRenderer[stamens];
+ this.stamen2 = new ModelRenderer[stamens];
+
+ for (var3 = 0; var3 < stamens; ++var3)
+ {
+ this.stamen[var3] = new ModelRenderer(this, 36, 13);
+ this.stamen[var3].addBox(0.0F, -9.0F, -1.5F, 1, 6, 1, var1 - 0.25F);
+ this.stamen[var3].setRotationPoint(0.0F, 1.0F + var2, 0.0F);
+ }
+
+ for (var3 = 0; var3 < stamens; ++var3)
+ {
+ this.stamen2[var3] = new ModelRenderer(this, 32, 15);
+ this.stamen2[var3].addBox(0.0F, -10.0F, -1.5F, 1, 1, 1, var1 + 0.125F);
+ this.stamen2[var3].setRotationPoint(0.0F, 1.0F + var2, 0.0F);
+ }
+
+ this.head = new ModelRenderer(this, 0, 12);
+ this.head.addBox(-3.0F, -3.0F, -3.0F, 6, 2, 6, var1 + 0.75F);
+ this.head.setRotationPoint(0.0F, 1.0F + var2, 0.0F);
+ this.stem = new ModelRenderer(this, 24, 13);
+ this.stem.addBox(-1.0F, 0.0F, -1.0F, 2, 6, 2, var1);
+ this.stem.setRotationPoint(0.0F, 1.0F + var2, 0.0F);
+ this.thorn = new ModelRenderer[thorns];
+
+ for (var3 = 0; var3 < thorns; ++var3)
+ {
+ this.thorn[var3] = new ModelRenderer(this, 32, 13);
+ this.thorn[var3].setRotationPoint(0.0F, 1.0F + var2, 0.0F);
+ }
+
+ this.thorn[0].addBox(-1.75F, 1.25F, -1.0F, 1, 1, 1, var1 - 0.25F);
+ this.thorn[1].addBox(-1.0F, 2.25F, 0.75F, 1, 1, 1, var1 - 0.25F);
+ this.thorn[2].addBox(0.75F, 1.25F, 0.0F, 1, 1, 1, var1 - 0.25F);
+ this.thorn[3].addBox(0.0F, 2.25F, -1.75F, 1, 1, 1, var1 - 0.25F);
+ }
+
+ /**
+ * Sets the models various rotation angles then renders the model.
+ */
+ public void render(Entity var1, float var2, float var3, float var4, float var5, float var6, float var7)
+ {
+ this.setRotationAngles(var2, var3, var4, var5, var6, var7);
+ GL11.glPushMatrix();
+ GL11.glTranslatef(0.0F, 1.2F, 0.0F);
+ GL11.glScalef(this.size, this.size, this.size);
+ int var8;
+
+ for (var8 = 0; var8 < petals; ++var8)
+ {
+ this.petal[var8].render(var7);
+ this.leaf[var8].render(var7);
+ }
+
+ for (var8 = 0; var8 < stamens; ++var8)
+ {
+ this.stamen[var8].render(var7);
+ this.stamen2[var8].render(var7);
+ }
+
+ this.head.render(var7);
+ this.stem.render(var7);
+
+ for (var8 = 0; var8 < thorns; ++var8)
+ {
+ this.thorn[var8].render(var7);
+ }
+
+ GL11.glPopMatrix();
+ }
+
+ public void setRotationAngles(float var1, float var2, float var3, float var4, float var5, float var6)
+ {
+ this.head.rotateAngleX = 0.0F;
+ this.head.rotateAngleY = var5 / (180F / (float) Math.PI);
+ float var7 = this.sinage2;
+ this.stem.rotateAngleY = this.head.rotateAngleY;
+ this.stem.rotationPointY = var7 * 0.5F;
+ int var8;
+
+ for (var8 = 0; var8 < thorns; ++var8)
+ {
+ this.thorn[var8].rotateAngleY = this.head.rotateAngleY;
+ this.thorn[var8].rotationPointY = var7 * 0.5F;
+ }
+
+ for (var8 = 0; var8 < petals; ++var8)
+ {
+ this.petal[var8].rotateAngleX = var8 % 2 == 0 ? -0.25F : -0.4125F;
+ this.petal[var8].rotateAngleX += this.sinage;
+ this.petal[var8].rotateAngleY = this.head.rotateAngleY;
+ this.petal[var8].rotateAngleY += this.pie / (float) petals * (float) var8;
+ this.leaf[var8].rotateAngleX = var8 % 2 == 0 ? 0.1F : 0.2F;
+ this.leaf[var8].rotateAngleX += this.sinage * 0.75F;
+ this.leaf[var8].rotateAngleY = this.head.rotateAngleY + this.pie / (float) petals / 2.0F;
+ this.leaf[var8].rotateAngleY += this.pie / (float) petals * (float) var8;
+ this.petal[var8].rotationPointY = var7;
+ this.leaf[var8].rotationPointY = var7;
+ }
+
+ for (var8 = 0; var8 < stamens; ++var8)
+ {
+ this.stamen[var8].rotateAngleX = 0.2F + (float) var8 / 15.0F;
+ this.stamen[var8].rotateAngleY = this.head.rotateAngleY + 0.1F;
+ this.stamen[var8].rotateAngleY += this.pie / (float) stamens * (float) var8;
+ this.stamen[var8].rotateAngleX += this.sinage * 0.4F;
+ this.stamen2[var8].rotateAngleX = 0.2F + (float) var8 / 15.0F;
+ this.stamen2[var8].rotateAngleY = this.head.rotateAngleY + 0.1F;
+ this.stamen2[var8].rotateAngleY += this.pie / (float) stamens * (float) var8;
+ this.stamen2[var8].rotateAngleX += this.sinage * 0.4F;
+ this.stamen[var8].rotationPointY = var7 + this.sinage * 2.0F;
+ this.stamen2[var8].rotationPointY = var7 + this.sinage * 2.0F;
+ }
+
+ this.head.rotationPointY = var7 + this.sinage * 2.0F;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/models/ModelAerbunny.java b/src/main/java/net/aetherteam/aether/client/models/ModelAerbunny.java
new file mode 100644
index 0000000..ec920d2
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/models/ModelAerbunny.java
@@ -0,0 +1,139 @@
+package net.aetherteam.aether.client.models;
+
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.util.MathHelper;
+import org.lwjgl.opengl.GL11;
+
+public class ModelAerbunny extends ModelBase
+{
+ public ModelRenderer a;
+ public ModelRenderer b;
+ public ModelRenderer b2;
+ public ModelRenderer b3;
+ public ModelRenderer e1;
+ public ModelRenderer e2;
+ public ModelRenderer ff1;
+ public ModelRenderer ff2;
+ public ModelRenderer g;
+ public ModelRenderer g2;
+ public ModelRenderer h;
+ public ModelRenderer h2;
+ public float puffiness;
+
+ public ModelAerbunny()
+ {
+ byte var1 = 16;
+ this.a = new ModelRenderer(this, 0, 0);
+ this.a.addBox(-2.0F, -1.0F, -4.0F, 4, 4, 6, 0.0F);
+ this.a.setRotationPoint(0.0F, (float) (-1 + var1), -4.0F);
+ this.g = new ModelRenderer(this, 14, 0);
+ this.g.addBox(-2.0F, -5.0F, -3.0F, 1, 4, 2, 0.0F);
+ this.g.setRotationPoint(0.0F, (float) (-1 + var1), -4.0F);
+ this.g2 = new ModelRenderer(this, 14, 0);
+ this.g2.addBox(1.0F, -5.0F, -3.0F, 1, 4, 2, 0.0F);
+ this.g2.setRotationPoint(0.0F, (float) (-1 + var1), -4.0F);
+ this.h = new ModelRenderer(this, 20, 0);
+ this.h.addBox(-4.0F, 0.0F, -3.0F, 2, 3, 2, 0.0F);
+ this.h.setRotationPoint(0.0F, (float) (-1 + var1), -4.0F);
+ this.h2 = new ModelRenderer(this, 20, 0);
+ this.h2.addBox(2.0F, 0.0F, -3.0F, 2, 3, 2, 0.0F);
+ this.h2.setRotationPoint(0.0F, (float) (-1 + var1), -4.0F);
+ this.b = new ModelRenderer(this, 0, 10);
+ this.b.addBox(-3.0F, -4.0F, -3.0F, 6, 8, 6, 0.0F);
+ this.b.setRotationPoint(0.0F, (float) (0 + var1), 0.0F);
+ this.b2 = new ModelRenderer(this, 0, 24);
+ this.b2.addBox(-2.0F, 4.0F, -2.0F, 4, 3, 4, 0.0F);
+ this.b2.setRotationPoint(0.0F, (float) (0 + var1), 0.0F);
+ this.b3 = new ModelRenderer(this, 29, 0);
+ this.b3.addBox(-3.5F, -3.5F, -3.5F, 7, 7, 7, 0.0F);
+ this.b3.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.e1 = new ModelRenderer(this, 24, 16);
+ this.e1.addBox(-2.0F, 0.0F, -1.0F, 2, 2, 2);
+ this.e1.setRotationPoint(3.0F, (float) (3 + var1), -3.0F);
+ this.e2 = new ModelRenderer(this, 24, 16);
+ this.e2.addBox(0.0F, 0.0F, -1.0F, 2, 2, 2);
+ this.e2.setRotationPoint(-3.0F, (float) (3 + var1), -3.0F);
+ this.ff1 = new ModelRenderer(this, 16, 24);
+ this.ff1.addBox(-2.0F, 0.0F, -4.0F, 2, 2, 4);
+ this.ff1.setRotationPoint(3.0F, (float) (3 + var1), 4.0F);
+ this.ff2 = new ModelRenderer(this, 16, 24);
+ this.ff2.addBox(0.0F, 0.0F, -4.0F, 2, 2, 4);
+ this.ff2.setRotationPoint(-3.0F, (float) (3 + var1), 4.0F);
+ }
+
+ /**
+ * Sets the models various rotation angles then renders the model.
+ */
+ public void render(Entity var1, float var2, float var3, float var4, float var5, float var6, float var7)
+ {
+ this.setRotationAngles(var2, var3, var4, var5, var6, var7);
+ float var8;
+
+ if (this.isChild)
+ {
+ var8 = 2.0F;
+ GL11.glPushMatrix();
+ GL11.glTranslatef(0.0F, var7, var7);
+ this.a.render(var7);
+ this.g.render(var7);
+ this.g2.render(var7);
+ this.h.render(var7);
+ this.h2.render(var7);
+ GL11.glPopMatrix();
+ GL11.glScalef(1.0F / var8, 1.0F / var8, 1.0F / var8);
+ GL11.glTranslatef(0.0F, 18.0F * var7, 0.0F);
+ this.b.render(var7);
+ this.b2.render(var7);
+ this.e1.render(var7);
+ this.e2.render(var7);
+ this.ff1.render(var7);
+ this.ff2.render(var7);
+ float var9 = 1.0F + this.puffiness * 0.5F;
+ GL11.glTranslatef(0.0F, 1.0F, 0.0F);
+ GL11.glScalef(var9, var9, var9);
+ this.b3.render(var7);
+ } else
+ {
+ this.a.render(var7);
+ this.g.render(var7);
+ this.g2.render(var7);
+ this.h.render(var7);
+ this.h2.render(var7);
+ this.b.render(var7);
+ this.b2.render(var7);
+ GL11.glPushMatrix();
+ var8 = 1.0F + this.puffiness * 0.5F;
+ GL11.glTranslatef(0.0F, 1.0F, 0.0F);
+ GL11.glScalef(var8, var8, var8);
+ this.b3.render(var7);
+ GL11.glPopMatrix();
+ this.e1.render(var7);
+ this.e2.render(var7);
+ this.ff1.render(var7);
+ this.ff2.render(var7);
+ }
+ }
+
+ public void setRotationAngles(float var1, float var2, float var3, float var4, float var5, float var6)
+ {
+ this.a.rotateAngleX = -(var5 / (180F / (float) Math.PI));
+ this.a.rotateAngleY = var4 / (180F / (float) Math.PI);
+ this.g.rotateAngleX = this.a.rotateAngleX;
+ this.g.rotateAngleY = this.a.rotateAngleY;
+ this.g2.rotateAngleX = this.a.rotateAngleX;
+ this.g2.rotateAngleY = this.a.rotateAngleY;
+ this.h.rotateAngleX = this.a.rotateAngleX;
+ this.h.rotateAngleY = this.a.rotateAngleY;
+ this.h2.rotateAngleX = this.a.rotateAngleX;
+ this.h2.rotateAngleY = this.a.rotateAngleY;
+ this.b.rotateAngleX = ((float) Math.PI / 2F);
+ this.b2.rotateAngleX = ((float) Math.PI / 2F);
+ this.b3.rotateAngleX = ((float) Math.PI / 2F);
+ this.e1.rotateAngleX = MathHelper.cos(var1 * 0.6662F) * 1.0F * var2;
+ this.ff1.rotateAngleX = MathHelper.cos(var1 * 0.6662F + (float) Math.PI) * 1.2F * var2;
+ this.e2.rotateAngleX = MathHelper.cos(var1 * 0.6662F) * 1.0F * var2;
+ this.ff2.rotateAngleX = MathHelper.cos(var1 * 0.6662F + (float) Math.PI) * 1.2F * var2;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/models/ModelAerwhale.java b/src/main/java/net/aetherteam/aether/client/models/ModelAerwhale.java
new file mode 100644
index 0000000..b1fda49
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/models/ModelAerwhale.java
@@ -0,0 +1,131 @@
+package net.aetherteam.aether.client.models;
+
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+
+public class ModelAerwhale extends ModelBase
+{
+ ModelRenderer FrontBody;
+ ModelRenderer RightFin;
+ ModelRenderer BottomPartHead;
+ ModelRenderer LeftFin;
+ ModelRenderer BottomPartMiddlebody;
+ ModelRenderer Head;
+ ModelRenderer MiddleFin;
+ ModelRenderer BackfinRight;
+ ModelRenderer BackBody;
+ ModelRenderer BackfinLeft;
+ ModelRenderer Middlebody;
+
+ public ModelAerwhale()
+ {
+ this.textureWidth = 512;
+ this.textureHeight = 64;
+ this.FrontBody = new ModelRenderer(this, 0, 0);
+ this.FrontBody.addBox(-11.5F, -1.0F, -0.5F, 19, 5, 21);
+ this.FrontBody.setRotationPoint(2.0F, 6.0F, 38.0F);
+ this.FrontBody.setTextureSize(512, 64);
+ this.FrontBody.mirror = true;
+ this.setRotation(this.FrontBody, -0.1047198F, 0.0F, 0.0F);
+ this.RightFin = new ModelRenderer(this, 446, 1);
+ this.RightFin.addBox(-20.0F, -2.0F, -6.0F, 19, 3, 14);
+ this.RightFin.setRotationPoint(-10.0F, 4.0F, 10.0F);
+ this.RightFin.setTextureSize(512, 64);
+ this.RightFin.mirror = true;
+ this.setRotation(this.RightFin, -0.148353F, 0.2094395F, 0.0F);
+ this.RightFin.mirror = false;
+ this.BottomPartHead = new ModelRenderer(this, 116, 28);
+ this.BottomPartHead.addBox(-13.0F, 4.0F, -15.0F, 26, 6, 30);
+ this.BottomPartHead.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.BottomPartHead.setTextureSize(512, 64);
+ this.BottomPartHead.mirror = true;
+ this.setRotation(this.BottomPartHead, 0.0F, 0.0F, 0.0F);
+ this.LeftFin = new ModelRenderer(this, 446, 1);
+ this.LeftFin.addBox(1.0F, -2.0F, -6.0F, 19, 3, 14);
+ this.LeftFin.setRotationPoint(10.0F, 4.0F, 10.0F);
+ this.LeftFin.setTextureSize(512, 64);
+ this.LeftFin.mirror = true;
+ this.setRotation(this.LeftFin, -0.148353F, -0.2094395F, 0.0F);
+ this.BottomPartMiddlebody = new ModelRenderer(this, 16, 32);
+ this.BottomPartMiddlebody.addBox(-12.0F, 5.0F, -1.0F, 24, 6, 26);
+ this.BottomPartMiddlebody.setRotationPoint(0.0F, -1.0F, 14.0F);
+ this.BottomPartMiddlebody.setTextureSize(512, 64);
+ this.BottomPartMiddlebody.mirror = true;
+ this.setRotation(this.BottomPartMiddlebody, 0.0F, 0.0F, 0.0F);
+ this.Head = new ModelRenderer(this, 408, 18);
+ this.Head.addBox(-12.0F, -9.0F, -14.0F, 24, 18, 28);
+ this.Head.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.Head.setTextureSize(512, 64);
+ this.Head.mirror = true;
+ this.setRotation(this.Head, 0.0F, 0.0F, 0.0F);
+ this.MiddleFin = new ModelRenderer(this, 318, 35);
+ this.MiddleFin.addBox(-1.0F, -11.0F, 7.0F, 2, 7, 8);
+ this.MiddleFin.setRotationPoint(0.0F, -1.0F, 14.0F);
+ this.MiddleFin.setTextureSize(512, 64);
+ this.MiddleFin.mirror = true;
+ this.setRotation(this.MiddleFin, -0.1441704F, 0.0F, 0.0F);
+ this.BackfinRight = new ModelRenderer(this, 261, 5);
+ this.BackfinRight.addBox(-11.0F, 0.0F, -6.0F, 15, 3, 24);
+ this.BackfinRight.setRotationPoint(-4.0F, 5.0F, 59.0F);
+ this.BackfinRight.setTextureSize(512, 64);
+ this.BackfinRight.mirror = true;
+ this.setRotation(this.BackfinRight, -0.1047198F, -0.7330383F, 0.0F);
+ this.BackfinRight.mirror = false;
+ this.BackBody = new ModelRenderer(this, 228, 32);
+ this.BackBody.addBox(-10.5F, -9.0F, -2.0F, 17, 10, 22);
+ this.BackBody.setRotationPoint(2.0F, 5.0F, 38.0F);
+ this.BackBody.setTextureSize(512, 64);
+ this.BackBody.mirror = true;
+ this.setRotation(this.BackBody, -0.1047198F, 0.0F, 0.0F);
+ this.BackfinLeft = new ModelRenderer(this, 261, 5);
+ this.BackfinLeft.addBox(-4.0F, 0.0F, -6.0F, 13, 3, 24);
+ this.BackfinLeft.setRotationPoint(5.0F, 5.0F, 59.0F);
+ this.BackfinLeft.setTextureSize(512, 64);
+ this.BackfinLeft.mirror = true;
+ this.setRotation(this.BackfinLeft, -0.1047198F, 0.7330383F, 0.0F);
+ this.Middlebody = new ModelRenderer(this, 314, 25);
+ this.Middlebody.addBox(-11.0F, -5.0F, -1.0F, 22, 14, 25);
+ this.Middlebody.setRotationPoint(0.0F, -1.0F, 14.0F);
+ this.Middlebody.setTextureSize(512, 64);
+ this.Middlebody.mirror = true;
+ this.setRotation(this.Middlebody, -0.0698132F, 0.0F, 0.0F);
+ }
+
+ /**
+ * Sets the models various rotation angles then renders the model.
+ */
+ public void render(Entity var1, float var2, float var3, float var4, float var5, float var6, float var7)
+ {
+ super.render(var1, var2, var3, var4, var5, var6, var7);
+ this.setRotationAngles(var2, var3, var4, var5, var6, var7, var1);
+ this.FrontBody.render(var7);
+ this.RightFin.render(var7);
+ this.BottomPartHead.render(var7);
+ this.LeftFin.render(var7);
+ this.BottomPartMiddlebody.render(var7);
+ this.Head.render(var7);
+ this.MiddleFin.render(var7);
+ this.BackfinRight.render(var7);
+ this.BackBody.render(var7);
+ this.BackfinLeft.render(var7);
+ this.Middlebody.render(var7);
+ }
+
+ private void setRotation(ModelRenderer var1, float var2, float var3, float var4)
+ {
+ var1.rotateAngleX = var2;
+ var1.rotateAngleY = var3;
+ var1.rotateAngleZ = var4;
+ }
+
+ /**
+ * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
+ * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
+ * "far" arms and legs can swing at most.
+ */
+ public void setRotationAngles(float var1, float var2, float var3, float var4, float var5, float var6, Entity var7)
+ {
+ super.setRotationAngles(var1, var2, var3, var4, var5, var6, var7);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/models/ModelAetherCoin.java b/src/main/java/net/aetherteam/aether/client/models/ModelAetherCoin.java
new file mode 100644
index 0000000..e3ad64b
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/models/ModelAetherCoin.java
@@ -0,0 +1,243 @@
+package net.aetherteam.aether.client.models;
+
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+
+public class ModelAetherCoin extends ModelBase
+{
+ public ModelRenderer Shape1;
+ public ModelRenderer Shape2;
+ public ModelRenderer Shape3;
+ public ModelRenderer Shape4;
+ public ModelRenderer Shape5;
+ public ModelRenderer Shape6;
+ public ModelRenderer Shape7;
+ public ModelRenderer Shape8;
+ public ModelRenderer Shape9;
+ public ModelRenderer Shape10;
+ public ModelRenderer Shape11;
+ public ModelRenderer Shape12;
+ public ModelRenderer Shape13;
+ public ModelRenderer Shape14;
+ public ModelRenderer Shape15;
+ public ModelRenderer Shape16;
+ public ModelRenderer Shape17;
+ public ModelRenderer Shape18;
+ public ModelRenderer Shape19;
+ public ModelRenderer Shape20;
+ public ModelRenderer Shape21;
+ public ModelRenderer Shape22;
+
+ public ModelAetherCoin()
+ {
+ this.textureWidth = 64;
+ this.textureHeight = 64;
+ this.Shape1 = new ModelRenderer(this, 0, 0);
+ this.Shape1.addBox(-2.0F, 15.0F, -0.5F, 4, 8, 1);
+ this.Shape1.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.Shape1.setTextureSize(64, 64);
+ this.Shape1.mirror = true;
+ this.setRotation(this.Shape1, 0.0F, 0.0F, 0.0F);
+ this.Shape2 = new ModelRenderer(this, 0, 9);
+ this.Shape2.addBox(-4.0F, 17.0F, -0.5F, 8, 4, 1);
+ this.Shape2.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.Shape2.setTextureSize(64, 64);
+ this.Shape2.mirror = true;
+ this.setRotation(this.Shape2, 0.0F, 0.0F, 0.0F);
+ this.Shape3 = new ModelRenderer(this, 0, 14);
+ this.Shape3.addBox(-3.0F, 16.0F, -0.5F, 1, 1, 1);
+ this.Shape3.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.Shape3.setTextureSize(64, 64);
+ this.Shape3.mirror = true;
+ this.setRotation(this.Shape3, 0.0F, 0.0F, 0.0F);
+ this.Shape4 = new ModelRenderer(this, 0, 14);
+ this.Shape4.addBox(2.0F, 16.0F, -0.5F, 1, 1, 1);
+ this.Shape4.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.Shape4.setTextureSize(64, 64);
+ this.Shape4.mirror = true;
+ this.setRotation(this.Shape4, 0.0F, 0.0F, 0.0F);
+ this.Shape5 = new ModelRenderer(this, 0, 14);
+ this.Shape5.addBox(-3.0F, 21.0F, -0.5F, 1, 1, 1);
+ this.Shape5.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.Shape5.setTextureSize(64, 64);
+ this.Shape5.mirror = true;
+ this.setRotation(this.Shape5, 0.0F, 0.0F, 0.0F);
+ this.Shape6 = new ModelRenderer(this, 0, 14);
+ this.Shape6.addBox(2.0F, 21.0F, -0.5F, 1, 1, 1);
+ this.Shape6.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.Shape6.setTextureSize(64, 64);
+ this.Shape6.mirror = true;
+ this.setRotation(this.Shape6, 0.0F, 0.0F, 0.0F);
+ this.Shape7 = new ModelRenderer(this, 10, 0);
+ this.Shape7.addBox(-2.0F, 23.0F, -1.0F, 4, 1, 2);
+ this.Shape7.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.Shape7.setTextureSize(64, 64);
+ this.Shape7.mirror = true;
+ this.setRotation(this.Shape7, 0.0F, 0.0F, 0.0F);
+ this.Shape8 = new ModelRenderer(this, 22, 0);
+ this.Shape8.addBox(4.0F, 17.0F, -1.0F, 1, 4, 2);
+ this.Shape8.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.Shape8.setTextureSize(64, 64);
+ this.Shape8.mirror = true;
+ this.setRotation(this.Shape8, 0.0F, 0.0F, 0.0F);
+ this.Shape9 = new ModelRenderer(this, 22, 0);
+ this.Shape9.addBox(-5.0F, 17.0F, -1.0F, 1, 4, 2);
+ this.Shape9.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.Shape9.setTextureSize(64, 64);
+ this.Shape9.mirror = true;
+ this.setRotation(this.Shape9, 0.0F, 0.0F, 0.0F);
+ this.Shape10 = new ModelRenderer(this, 10, 0);
+ this.Shape10.addBox(-2.0F, 14.0F, -1.0F, 4, 1, 2);
+ this.Shape10.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.Shape10.setTextureSize(64, 64);
+ this.Shape10.mirror = true;
+ this.setRotation(this.Shape10, 0.0F, 0.0F, 0.0F);
+ this.Shape11 = new ModelRenderer(this, 10, 3);
+ this.Shape11.addBox(-3.0F, 22.0F, -1.0F, 1, 1, 2);
+ this.Shape11.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.Shape11.setTextureSize(64, 64);
+ this.Shape11.mirror = true;
+ this.setRotation(this.Shape11, 0.0F, 0.0F, 0.0F);
+ this.Shape12 = new ModelRenderer(this, 10, 3);
+ this.Shape12.addBox(3.0F, 21.0F, -1.0F, 1, 1, 2);
+ this.Shape12.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.Shape12.setTextureSize(64, 64);
+ this.Shape12.mirror = true;
+ this.setRotation(this.Shape12, 0.0F, 0.0F, 0.0F);
+ this.Shape13 = new ModelRenderer(this, 10, 3);
+ this.Shape13.addBox(-4.0F, 21.0F, -1.0F, 1, 1, 2);
+ this.Shape13.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.Shape13.setTextureSize(64, 64);
+ this.Shape13.mirror = true;
+ this.setRotation(this.Shape13, 0.0F, 0.0F, 0.0F);
+ this.Shape14 = new ModelRenderer(this, 10, 3);
+ this.Shape14.addBox(3.0F, 16.0F, -1.0F, 1, 1, 2);
+ this.Shape14.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.Shape14.setTextureSize(64, 64);
+ this.Shape14.mirror = true;
+ this.setRotation(this.Shape14, 0.0F, 0.0F, 0.0F);
+ this.Shape15 = new ModelRenderer(this, 10, 3);
+ this.Shape15.addBox(-4.0F, 16.0F, -1.0F, 1, 1, 2);
+ this.Shape15.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.Shape15.setTextureSize(64, 64);
+ this.Shape15.mirror = true;
+ this.setRotation(this.Shape15, 0.0F, 0.0F, 0.0F);
+ this.Shape16 = new ModelRenderer(this, 10, 3);
+ this.Shape16.addBox(2.0F, 15.0F, -1.0F, 1, 1, 2);
+ this.Shape16.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.Shape16.setTextureSize(64, 64);
+ this.Shape16.mirror = true;
+ this.setRotation(this.Shape16, 0.0F, 0.0F, 0.0F);
+ this.Shape17 = new ModelRenderer(this, 10, 3);
+ this.Shape17.addBox(-3.0F, 15.0F, -1.0F, 1, 1, 2);
+ this.Shape17.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.Shape17.setTextureSize(64, 64);
+ this.Shape17.mirror = true;
+ this.setRotation(this.Shape17, 0.0F, 0.0F, 0.0F);
+ this.Shape18 = new ModelRenderer(this, 10, 3);
+ this.Shape18.addBox(2.0F, 22.0F, -1.0F, 1, 1, 2);
+ this.Shape18.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.Shape18.setTextureSize(64, 64);
+ this.Shape18.mirror = true;
+ this.setRotation(this.Shape18, 0.0F, 0.0F, 0.0F);
+ this.Shape19 = new ModelRenderer(this, 0, 16);
+ this.Shape19.addBox(-2.0F, 18.0F, -1.0F, 4, 2, 2);
+ this.Shape19.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.Shape19.setTextureSize(64, 64);
+ this.Shape19.mirror = true;
+ this.setRotation(this.Shape19, 0.0F, 0.0F, 0.0F);
+ this.Shape20 = new ModelRenderer(this, 12, 16);
+ this.Shape20.addBox(0.0F, 17.0F, -1.0F, 1, 1, 2);
+ this.Shape20.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.Shape20.setTextureSize(64, 64);
+ this.Shape20.mirror = true;
+ this.setRotation(this.Shape20, 0.0F, 0.0F, 0.0F);
+ this.Shape21 = new ModelRenderer(this, 12, 16);
+ this.Shape21.addBox(2.0F, 19.0F, -1.0F, 1, 1, 2);
+ this.Shape21.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.Shape21.setTextureSize(64, 64);
+ this.Shape21.mirror = true;
+ this.setRotation(this.Shape21, 0.0F, 0.0F, 0.0F);
+ this.Shape22 = new ModelRenderer(this, 12, 16);
+ this.Shape22.addBox(-3.0F, 19.0F, -1.0F, 1, 1, 2);
+ this.Shape22.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.Shape22.setTextureSize(64, 64);
+ this.Shape22.mirror = true;
+ this.setRotation(this.Shape22, 0.0F, 0.0F, 0.0F);
+ }
+
+ /**
+ * Sets the models various rotation angles then renders the model.
+ */
+ public void render(Entity var1, float var2, float var3, float var4, float var5, float var6, float var7)
+ {
+ super.render(var1, var2, var3, var4, var5, var6, var7);
+ this.setRotationAngles(var2, var3, var4, var5, var6, var7, var1);
+ this.Shape1.render(var7);
+ this.Shape2.render(var7);
+ this.Shape3.render(var7);
+ this.Shape4.render(var7);
+ this.Shape5.render(var7);
+ this.Shape6.render(var7);
+ this.Shape7.render(var7);
+ this.Shape8.render(var7);
+ this.Shape9.render(var7);
+ this.Shape10.render(var7);
+ this.Shape11.render(var7);
+ this.Shape12.render(var7);
+ this.Shape13.render(var7);
+ this.Shape14.render(var7);
+ this.Shape15.render(var7);
+ this.Shape16.render(var7);
+ this.Shape17.render(var7);
+ this.Shape18.render(var7);
+ this.Shape19.render(var7);
+ this.Shape20.render(var7);
+ this.Shape21.render(var7);
+ this.Shape22.render(var7);
+ }
+
+ private void setRotation(ModelRenderer var1, float var2, float var3, float var4)
+ {
+ var1.rotateAngleX = var2;
+ var1.rotateAngleY = var3;
+ var1.rotateAngleZ = var4;
+ }
+
+ public void spinCoin(float var1, float var2, float var3)
+ {
+ this.setRotation(this.Shape1, var1, var2, var3);
+ this.setRotation(this.Shape2, var1, var2, var3);
+ this.setRotation(this.Shape3, var1, var2, var3);
+ this.setRotation(this.Shape4, var1, var2, var3);
+ this.setRotation(this.Shape5, var1, var2, var3);
+ this.setRotation(this.Shape6, var1, var2, var3);
+ this.setRotation(this.Shape7, var1, var2, var3);
+ this.setRotation(this.Shape8, var1, var2, var3);
+ this.setRotation(this.Shape9, var1, var2, var3);
+ this.setRotation(this.Shape10, var1, var2, var3);
+ this.setRotation(this.Shape11, var1, var2, var3);
+ this.setRotation(this.Shape12, var1, var2, var3);
+ this.setRotation(this.Shape13, var1, var2, var3);
+ this.setRotation(this.Shape14, var1, var2, var3);
+ this.setRotation(this.Shape15, var1, var2, var3);
+ this.setRotation(this.Shape16, var1, var2, var3);
+ this.setRotation(this.Shape17, var1, var2, var3);
+ this.setRotation(this.Shape18, var1, var2, var3);
+ this.setRotation(this.Shape19, var1, var2, var3);
+ this.setRotation(this.Shape20, var1, var2, var3);
+ this.setRotation(this.Shape21, var1, var2, var3);
+ this.setRotation(this.Shape22, var1, var2, var3);
+ }
+
+ /**
+ * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
+ * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
+ * "far" arms and legs can swing at most.
+ */
+ public void setRotationAngles(float var1, float var2, float var3, float var4, float var5, float var6, Entity var7)
+ {
+ super.setRotationAngles(var1, var2, var3, var4, var5, var6, var7);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/models/ModelAetherWings.java b/src/main/java/net/aetherteam/aether/client/models/ModelAetherWings.java
new file mode 100644
index 0000000..2d01c55
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/models/ModelAetherWings.java
@@ -0,0 +1,64 @@
+package net.aetherteam.aether.client.models;
+
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+
+public class ModelAetherWings extends ModelBiped
+{
+ public ModelRenderer wingLeft;
+ public ModelRenderer wingRight;
+ public float sinage;
+ public boolean gonRound;
+
+ public ModelAetherWings()
+ {
+ this(0.0F);
+ }
+
+ public ModelAetherWings(float var1)
+ {
+ this(var1, 0.0F);
+ }
+
+ public ModelAetherWings(float var1, float var2)
+ {
+ this.heldItemLeft = 0;
+ this.heldItemRight = 0;
+ this.isSneak = false;
+ this.wingLeft = new ModelRenderer(this, 24, 31);
+ this.wingLeft.addBox(0.0F, -7.0F, 1.0F, 19, 8, 0, var1);
+ this.wingLeft.setRotationPoint(0.5F, 5.0F + var2, 2.625F);
+ this.wingRight = new ModelRenderer(this, 24, 31);
+ this.wingRight.mirror = true;
+ this.wingRight.addBox(-19.0F, -7.0F, 1.0F, 19, 8, 0, var1);
+ this.wingRight.setRotationPoint(-0.5F, 5.0F + var2, 2.625F);
+ }
+
+ /**
+ * Sets the models various rotation angles then renders the model.
+ */
+ public void render(Entity var1, float var2, float var3, float var4, float var5, float var6, float var7)
+ {
+ this.setRotationAngles(var2, var3, var4, var5, var6, var7, var1);
+ this.wingLeft.renderWithRotation(var7);
+ this.wingRight.renderWithRotation(var7);
+ }
+
+ /**
+ * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
+ * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
+ * "far" arms and legs can swing at most.
+ */
+ public void setRotationAngles(float var1, float var2, float var3, float var4, float var5, float var6, Entity var7)
+ {
+ this.wingLeft.rotateAngleY = -0.2F;
+ this.wingRight.rotateAngleY = 0.2F;
+ this.wingLeft.rotateAngleZ = -0.125F;
+ this.wingRight.rotateAngleZ = 0.125F;
+ this.wingLeft.rotateAngleY = (float) ((double) this.wingLeft.rotateAngleY + Math.sin((double) this.sinage) / 6.0D);
+ this.wingRight.rotateAngleY = (float) ((double) this.wingRight.rotateAngleY - Math.sin((double) this.sinage) / 6.0D);
+ this.wingLeft.rotateAngleZ = (float) ((double) this.wingLeft.rotateAngleZ + Math.cos((double) this.sinage) / (double) (this.gonRound ? 8.0F : 3.0F));
+ this.wingRight.rotateAngleZ = (float) ((double) this.wingRight.rotateAngleZ - Math.cos((double) this.sinage) / (double) (this.gonRound ? 8.0F : 3.0F));
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/models/ModelAltar1.java b/src/main/java/net/aetherteam/aether/client/models/ModelAltar1.java
new file mode 100644
index 0000000..880fd8a
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/models/ModelAltar1.java
@@ -0,0 +1,134 @@
+package net.aetherteam.aether.client.models;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelRenderer;
+
+@SideOnly(Side.CLIENT)
+public class ModelAltar1 extends ModelBase
+{
+ public ModelRenderer TopBase;
+ public ModelRenderer CornerTopLeft;
+ public ModelRenderer AmbrosiumTopLeft;
+ public ModelRenderer CornerBottomLeft;
+ public ModelRenderer CornerBottomRight;
+ public ModelRenderer CornerTopRight;
+ public ModelRenderer AmbrosiumTopRight;
+ public ModelRenderer AmbrosiumBottomLeft;
+ public ModelRenderer AmbrosiumBottomRight;
+ public ModelRenderer LowerTopBase;
+ public ModelRenderer SupportPole;
+ public ModelRenderer BottomBase;
+ public ModelRenderer UpperBottomBase;
+ public ModelRenderer Scroll;
+ private float offsetX = 0.0F;
+ private float offsetY = 0.0F;
+ private float offsetZ = 0.0F;
+
+ public ModelAltar1()
+ {
+ this.textureWidth = 64;
+ this.textureHeight = 64;
+ this.TopBase = (new ModelRenderer(this, 8, 15)).setTextureSize(64, 64);
+ this.TopBase.addBox(0.0F, 0.0F, 0.0F, 14, 3, 14);
+ this.setRotationPointWithOffset(this.TopBase, -7.0F, 9.0F, -7.0F);
+ this.TopBase.mirror = true;
+ this.setRotation(this.TopBase, 0.0F, 0.0F, 0.0F);
+ this.CornerTopLeft = (new ModelRenderer(this, 48, 6)).setTextureSize(64, 64);
+ this.CornerTopLeft.addBox(0.0F, 0.0F, 0.0F, 4, 5, 4);
+ this.setRotationPointWithOffset(this.CornerTopLeft, 4.0F, 8.0F, 4.0F);
+ this.CornerTopLeft.mirror = true;
+ this.setRotation(this.CornerTopLeft, 0.0F, 0.0F, 0.0F);
+ this.AmbrosiumTopLeft = (new ModelRenderer(this, 0, 29)).setTextureSize(64, 64);
+ this.AmbrosiumTopLeft.addBox(-1.0F, 0.0F, -1.0F, 2, 1, 2);
+ this.setRotationPointWithOffset(this.AmbrosiumTopLeft, 6.0F, 7.0F, 6.0F);
+ this.AmbrosiumTopLeft.mirror = true;
+ this.setRotation(this.AmbrosiumTopLeft, 0.0F, 0.0F, 0.0F);
+ this.CornerBottomLeft = (new ModelRenderer(this, 48, 6)).setTextureSize(64, 64);
+ this.CornerBottomLeft.addBox(0.0F, 0.0F, 0.0F, 4, 5, 4);
+ this.setRotationPointWithOffset(this.CornerBottomLeft, -8.0F, 8.0F, 4.0F);
+ this.CornerBottomLeft.mirror = true;
+ this.setRotation(this.CornerBottomLeft, 0.0F, 0.0F, 0.0F);
+ this.CornerBottomRight = (new ModelRenderer(this, 48, 6)).setTextureSize(64, 64);
+ this.CornerBottomRight.addBox(0.0F, 0.0F, 0.0F, 4, 5, 4);
+ this.setRotationPointWithOffset(this.CornerBottomRight, -8.0F, 8.0F, -8.0F);
+ this.CornerBottomRight.mirror = true;
+ this.setRotation(this.CornerBottomRight, 0.0F, 0.0F, 0.0F);
+ this.CornerTopRight = (new ModelRenderer(this, 48, 6)).setTextureSize(64, 64);
+ this.CornerTopRight.addBox(0.0F, 0.0F, 0.0F, 4, 5, 4);
+ this.setRotationPointWithOffset(this.CornerTopRight, 4.0F, 8.0F, -8.0F);
+ this.CornerTopRight.mirror = true;
+ this.setRotation(this.CornerTopRight, 0.0F, 0.0F, 0.0F);
+ this.AmbrosiumTopRight = (new ModelRenderer(this, 0, 29)).setTextureSize(64, 64);
+ this.AmbrosiumTopRight.addBox(-1.0F, 0.0F, -1.0F, 2, 1, 2);
+ this.setRotationPointWithOffset(this.AmbrosiumTopRight, 6.0F, 7.0F, -6.0F);
+ this.AmbrosiumTopRight.mirror = true;
+ this.setRotation(this.AmbrosiumTopRight, 0.0F, 0.0F, 0.0F);
+ this.AmbrosiumBottomLeft = (new ModelRenderer(this, 0, 29)).setTextureSize(64, 64);
+ this.AmbrosiumBottomLeft.addBox(-1.0F, 0.0F, -1.0F, 2, 1, 2);
+ this.setRotationPointWithOffset(this.AmbrosiumBottomLeft, -6.0F, 7.0F, 6.0F);
+ this.AmbrosiumBottomLeft.mirror = true;
+ this.setRotation(this.AmbrosiumBottomLeft, 0.0F, 0.0F, 0.0F);
+ this.AmbrosiumBottomRight = (new ModelRenderer(this, 0, 29)).setTextureSize(64, 64);
+ this.AmbrosiumBottomRight.addBox(-1.0F, 0.0F, -1.0F, 2, 1, 2);
+ this.setRotationPointWithOffset(this.AmbrosiumBottomRight, -6.0F, 7.0F, -6.0F);
+ this.AmbrosiumBottomRight.mirror = true;
+ this.setRotation(this.AmbrosiumBottomRight, 0.0F, 0.0F, 0.0F);
+ this.LowerTopBase = (new ModelRenderer(this, 0, 0)).setTextureSize(64, 64);
+ this.LowerTopBase.addBox(0.0F, 0.0F, 0.0F, 6, 3, 6);
+ this.setRotationPointWithOffset(this.LowerTopBase, -3.0F, 12.0F, -3.0F);
+ this.LowerTopBase.mirror = true;
+ this.setRotation(this.LowerTopBase, 0.0F, 0.0F, 0.0F);
+ this.SupportPole = (new ModelRenderer(this, 0, 22)).setTextureSize(64, 64);
+ this.SupportPole.addBox(0.0F, 0.0F, 0.0F, 2, 5, 2);
+ this.setRotationPointWithOffset(this.SupportPole, -1.0F, 15.0F, -1.0F);
+ this.SupportPole.mirror = true;
+ this.setRotation(this.SupportPole, 0.0F, 0.0F, 0.0F);
+ this.BottomBase = (new ModelRenderer(this, 8, 32)).setTextureSize(64, 64);
+ this.BottomBase.addBox(0.0F, 0.0F, 0.0F, 14, 2, 14);
+ this.setRotationPointWithOffset(this.BottomBase, -7.0F, 22.0F, -7.0F);
+ this.BottomBase.mirror = true;
+ this.setRotation(this.BottomBase, 0.0F, 0.0F, 0.0F);
+ this.UpperBottomBase = (new ModelRenderer(this, 16, 5)).setTextureSize(64, 64);
+ this.UpperBottomBase.addBox(0.0F, 0.0F, 0.0F, 8, 2, 8);
+ this.setRotationPointWithOffset(this.UpperBottomBase, -4.0F, 20.0F, -4.0F);
+ this.UpperBottomBase.mirror = true;
+ this.setRotation(this.UpperBottomBase, 0.0F, 0.0F, 0.0F);
+ this.Scroll = (new ModelRenderer(this, 0, 56)).setTextureSize(64, 64);
+ this.Scroll.addBox(0.0F, 0.0F, 0.0F, 8, 2, 6);
+ this.setRotationPointWithOffset(this.Scroll, -4.0F, 8.4F, -3.0F);
+ this.Scroll.mirror = true;
+ this.setRotation(this.Scroll, 0.0F, 0.0F, -0.1047198F);
+ }
+
+ public void renderAll(float var1)
+ {
+ this.TopBase.render(var1);
+ this.CornerTopLeft.render(var1);
+ this.AmbrosiumTopLeft.render(var1);
+ this.CornerBottomLeft.render(var1);
+ this.CornerBottomRight.render(var1);
+ this.CornerTopRight.render(var1);
+ this.AmbrosiumTopRight.render(var1);
+ this.AmbrosiumBottomLeft.render(var1);
+ this.AmbrosiumBottomRight.render(var1);
+ this.LowerTopBase.render(var1);
+ this.SupportPole.render(var1);
+ this.BottomBase.render(var1);
+ this.UpperBottomBase.render(var1);
+ this.Scroll.render(var1);
+ }
+
+ private void setRotation(ModelRenderer var1, float var2, float var3, float var4)
+ {
+ var1.rotateAngleX = var2;
+ var1.rotateAngleY = var3;
+ var1.rotateAngleZ = var4;
+ }
+
+ private void setRotationPointWithOffset(ModelRenderer var1, float var2, float var3, float var4)
+ {
+ var1.setRotationPoint(var2 + this.offsetX, var3 + this.offsetY, var4 + this.offsetZ);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/models/ModelAltar2.java b/src/main/java/net/aetherteam/aether/client/models/ModelAltar2.java
new file mode 100644
index 0000000..2e7d6c3
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/models/ModelAltar2.java
@@ -0,0 +1,50 @@
+package net.aetherteam.aether.client.models;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelRenderer;
+
+@SideOnly(Side.CLIENT)
+public class ModelAltar2 extends ModelBase
+{
+ ModelRenderer UpperBottomBase;
+ ModelRenderer Scroll;
+ private float offsetX = 8.0F;
+ private float offsetY = -8.0F;
+ private float offsetZ = 8.0F;
+
+ public ModelAltar2()
+ {
+ this.textureWidth = 64;
+ this.textureHeight = 64;
+ this.UpperBottomBase = (new ModelRenderer(this, 16, 5)).setTextureSize(64, 64);
+ this.UpperBottomBase.addBox(0.0F, 0.0F, 0.0F, 8, 2, 8);
+ this.setRotationPointWithOffset(this.UpperBottomBase, -4.0F, 20.0F, -4.0F);
+ this.UpperBottomBase.mirror = true;
+ this.setRotation(this.UpperBottomBase, 0.0F, 0.0F, 0.0F);
+ this.Scroll = (new ModelRenderer(this, 0, 56)).setTextureSize(64, 64);
+ this.Scroll.addBox(0.0F, 0.0F, 0.0F, 8, 2, 6);
+ this.setRotationPointWithOffset(this.Scroll, -4.0F, 8.4F, -3.0F);
+ this.Scroll.mirror = true;
+ this.setRotation(this.Scroll, 0.0F, 0.0F, -0.1047198F);
+ }
+
+ public void renderAll(float var1)
+ {
+ this.UpperBottomBase.render(var1);
+ this.Scroll.render(var1);
+ }
+
+ private void setRotation(ModelRenderer var1, float var2, float var3, float var4)
+ {
+ var1.rotateAngleX = var2;
+ var1.rotateAngleY = var3;
+ var1.rotateAngleZ = var4;
+ }
+
+ private void setRotationPointWithOffset(ModelRenderer var1, float var2, float var3, float var4)
+ {
+ var1.setRotationPoint(var2 + this.offsetX, var3 + this.offsetY, var4 + this.offsetZ);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/models/ModelBall.java b/src/main/java/net/aetherteam/aether/client/models/ModelBall.java
new file mode 100644
index 0000000..1f00dce
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/models/ModelBall.java
@@ -0,0 +1,74 @@
+package net.aetherteam.aether.client.models;
+
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+import org.lwjgl.opengl.GL11;
+
+public class ModelBall extends ModelBase
+{
+ public ModelRenderer[] head;
+ public float[] sinage;
+ private static final float sponge = (180F / (float) Math.PI);
+
+ public ModelBall()
+ {
+ this(0.0F);
+ }
+
+ public ModelBall(float var1)
+ {
+ this(var1, 0.0F);
+ }
+
+ public ModelBall(float var1, float var2)
+ {
+ this.sinage = new float[3];
+ this.head = new ModelRenderer[3];
+ this.head[0] = new ModelRenderer(this, 0, 0);
+ this.head[1] = new ModelRenderer(this, 32, 0);
+ this.head[2] = new ModelRenderer(this, 0, 16);
+
+ for (int var3 = 0; var3 < 3; ++var3)
+ {
+ this.head[var3].addBox(-4.0F, -4.0F, -4.0F, 8, 8, 8, var1);
+ this.head[var3].setRotationPoint(0.0F, 0.0F + var2, 0.0F);
+ }
+ }
+
+ /**
+ * Sets the models various rotation angles then renders the model.
+ */
+ public void render(Entity var1, float var2, float var3, float var4, float var5, float var6, float var7)
+ {
+ this.setRotationAngles(var2, var3, var4, var5, var6, var7);
+ GL11.glTranslatef(0.0F, 0.75F, 0.0F);
+ GL11.glEnable(GL11.GL_NORMALIZE);
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glDisable(GL11.GL_ALPHA_TEST);
+ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glPushMatrix();
+ GL11.glRotatef(this.sinage[0] * (180F / (float) Math.PI), 1.0F, 0.0F, 0.0F);
+ this.head[0].render(var7);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glRotatef(this.sinage[1] * (180F / (float) Math.PI), 0.0F, 1.0F, 0.0F);
+ this.head[1].render(var7);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glRotatef(this.sinage[2] * (180F / (float) Math.PI), 0.0F, 0.0F, 1.0F);
+ this.head[2].render(var7);
+ GL11.glPopMatrix();
+ GL11.glEnable(GL11.GL_ALPHA_TEST);
+ }
+
+ public void setRotationAngles(float var1, float var2, float var3, float var4, float var5, float var6)
+ {
+ for (int var7 = 0; var7 < 3; ++var7)
+ {
+ this.head[var7].rotateAngleY = var4 / (180F / (float) Math.PI);
+ this.head[var7].rotateAngleX = var5 / (180F / (float) Math.PI);
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/models/ModelCarrionSprout.java b/src/main/java/net/aetherteam/aether/client/models/ModelCarrionSprout.java
new file mode 100644
index 0000000..54d326d
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/models/ModelCarrionSprout.java
@@ -0,0 +1,144 @@
+package net.aetherteam.aether.client.models;
+
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+import org.lwjgl.opengl.GL11;
+
+public class ModelCarrionSprout extends ModelBase
+{
+ ModelRenderer Pedal4;
+ ModelRenderer Pedal3;
+ ModelRenderer Pedal2;
+ ModelRenderer Pedal1;
+ ModelRenderer TopStem;
+ ModelRenderer BottomStem;
+ ModelRenderer HeadRoof;
+ ModelRenderer Teeth;
+ ModelRenderer Jaw;
+ ModelRenderer Head;
+ private ModelRenderer[] petal;
+ private static int petals = 8;
+ public float sinage;
+ public float sinage2;
+ private float pie = ((float) Math.PI * 2F);
+
+ public ModelCarrionSprout()
+ {
+ this.textureWidth = 64;
+ this.textureHeight = 64;
+ this.petal = new ModelRenderer[petals];
+
+ for (int var1 = 0; var1 < petals; ++var1)
+ {
+ this.petal[var1] = new ModelRenderer(this, 43, 49);
+
+ if (var1 % 2 == 0)
+ {
+ this.petal[var1] = new ModelRenderer(this, 43, 49);
+ this.petal[var1].addBox(-2.8F, -1.0F, -10.8F, 6, 0, 9);
+ this.petal[var1].setRotationPoint(0.0F, 1.0F, 0.0F);
+ } else
+ {
+ this.petal[var1].addBox(-2.8F, -1.0F, -11.8F, 6, 0, 9);
+ this.petal[var1].setRotationPoint(0.0F, 1.0F, 0.0F);
+ }
+ }
+
+ this.Head = new ModelRenderer(this, 0, 0);
+ this.Head.addBox(-3.0F, -3.0F, -3.0F, 6, 2, 6);
+ this.Head.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.TopStem = new ModelRenderer(this, 8, 25);
+ this.TopStem.addBox(0.0F, 0.0F, 0.0F, 2, 6, 2);
+ this.TopStem.setRotationPoint(-1.0F, 14.0F, -3.0F);
+ this.TopStem.setTextureSize(64, 64);
+ this.TopStem.mirror = true;
+ this.setRotation(this.TopStem, 0.3490659F, 0.0F, 0.0F);
+ this.BottomStem = new ModelRenderer(this, 0, 25);
+ this.BottomStem.addBox(0.0F, 0.0F, 0.0F, 2, 5, 2);
+ this.BottomStem.setRotationPoint(-1.0F, 19.0F, -1.0F);
+ this.BottomStem.setTextureSize(64, 64);
+ this.BottomStem.mirror = true;
+ this.setRotation(this.BottomStem, 0.0F, 0.0F, 0.0F);
+ this.HeadRoof = new ModelRenderer(this, 20, 16);
+ this.HeadRoof.addBox(0.0F, 0.0F, 0.0F, 11, 5, 11);
+ this.HeadRoof.setRotationPoint(-5.5F, 4.0F, -7.5F);
+ this.HeadRoof.setTextureSize(64, 64);
+ this.HeadRoof.mirror = true;
+ this.setRotation(this.HeadRoof, -0.3490659F, 0.0F, 0.0F);
+ this.Teeth = new ModelRenderer(this, 0, 33);
+ this.Teeth.addBox(0.0F, 0.0F, 0.0F, 9, 1, 9);
+ this.Teeth.setRotationPoint(-4.5F, 8.5F, -8.5F);
+ this.Teeth.setTextureSize(64, 64);
+ this.Teeth.mirror = true;
+ this.setRotation(this.Teeth, -0.3490659F, 0.0F, 0.0F);
+ this.Jaw = new ModelRenderer(this, 24, 1);
+ this.Jaw.addBox(0.0F, 0.0F, -9.0F, 10, 2, 10);
+ this.Jaw.setRotationPoint(-5.0F, 12.0F, 0.0F);
+ this.Jaw.setTextureSize(64, 64);
+ this.Jaw.mirror = true;
+ this.setRotation(this.Jaw, 0.0F, 0.0F, 0.0F);
+ }
+
+ /**
+ * Sets the models various rotation angles then renders the model.
+ */
+ public void render(Entity var1, float var2, float var3, float var4, float var5, float var6, float var7)
+ {
+ super.render(var1, var2, var3, var4, var5, var6, var7);
+ this.setRotationAngles(var2, var3, var4, var5, var6, var7, var1);
+
+ for (int var8 = 0; var8 < petals; ++var8)
+ {
+ this.petal[var8].render(var7);
+ }
+
+ this.TopStem.render(var7);
+ this.BottomStem.render(var7);
+ this.HeadRoof.render(var7);
+ this.Teeth.render(var7);
+ this.Jaw.render(var7);
+ this.Head.render(var7);
+ GL11.glPushMatrix();
+ GL11.glTranslatef(0.0F, 0.3F, 0.0F);
+ this.BottomStem.render(var7);
+ GL11.glPopMatrix();
+ }
+
+ private void setRotation(ModelRenderer var1, float var2, float var3, float var4)
+ {
+ var1.rotateAngleX = var2;
+ var1.rotateAngleY = var3;
+ var1.rotateAngleZ = var4;
+ }
+
+ /**
+ * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
+ * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
+ * "far" arms and legs can swing at most.
+ */
+ public void setRotationAngles(float var1, float var2, float var3, float var4, float var5, float var6, Entity var7)
+ {
+ super.setRotationAngles(var1, var2, var3, var4, var5, var6, var7);
+ float var8 = this.sinage2;
+ float var9 = 21.0F;
+
+ for (int var10 = 0; var10 < petals; ++var10)
+ {
+ this.petal[var10].rotateAngleX = var10 % 2 == 0 ? -0.25F : -0.4125F;
+ this.petal[var10].rotateAngleX += this.sinage;
+ this.petal[var10].rotateAngleY = 17.0F;
+ this.petal[var10].rotateAngleY += this.pie / (float) petals * (float) var10;
+ this.petal[var10].rotationPointY = var8 + var9;
+ }
+
+ this.Jaw.rotateAngleX = 0.08F;
+ this.Jaw.rotateAngleX += this.sinage;
+ this.Head.rotationPointY = var8 + var9 + this.sinage * 2.0F;
+ this.Jaw.rotationPointY = var8 + 8.0F + this.sinage * 2.0F;
+ this.BottomStem.rotationPointY = var8 + 15.0F + this.sinage * 2.0F;
+ this.TopStem.rotationPointY = var8 + 10.0F + this.sinage * 2.0F;
+ this.HeadRoof.rotationPointY = var8 + this.sinage * 2.0F;
+ this.Teeth.rotationPointY = var8 + 4.5F + this.sinage * 2.0F;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/models/ModelCockatrice.java b/src/main/java/net/aetherteam/aether/client/models/ModelCockatrice.java
new file mode 100644
index 0000000..fdbea95
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/models/ModelCockatrice.java
@@ -0,0 +1,131 @@
+package net.aetherteam.aether.client.models;
+
+import java.util.Random;
+
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.util.MathHelper;
+
+public class ModelCockatrice extends ModelBase
+{
+ public ModelRenderer head;
+ public ModelRenderer body;
+ public ModelRenderer legs;
+ public ModelRenderer legs2;
+ public ModelRenderer wings;
+ public ModelRenderer wings2;
+ public ModelRenderer jaw;
+ public ModelRenderer neck;
+ public ModelRenderer feather1;
+ public ModelRenderer feather2;
+ public ModelRenderer feather3;
+ public Random random;
+
+ public ModelCockatrice()
+ {
+ byte var1 = 16;
+ this.random = new Random();
+ this.head = new ModelRenderer(this, 0, 13);
+ this.head.addBox(-2.0F, -4.0F, -6.0F, 4, 4, 8, 0.0F);
+ this.head.setRotationPoint(0.0F, (float) (-8 + var1), -4.0F);
+ this.jaw = new ModelRenderer(this, 24, 13);
+ this.jaw.addBox(-2.0F, -1.0F, -6.0F, 4, 1, 8, -0.1F);
+ this.jaw.setRotationPoint(0.0F, (float) (-8 + var1), -4.0F);
+ this.body = new ModelRenderer(this, 0, 0);
+ this.body.addBox(-3.0F, -3.0F, 0.0F, 6, 8, 5, 0.0F);
+ this.body.setRotationPoint(0.0F, (float) (0 + var1), 0.0F);
+ this.legs = new ModelRenderer(this, 22, 0);
+ this.legs.addBox(-1.0F, -1.0F, -1.0F, 2, 9, 2);
+ this.legs.setRotationPoint(-2.0F, (float) (0 + var1), 1.0F);
+ this.legs2 = new ModelRenderer(this, 22, 0);
+ this.legs2.addBox(-1.0F, -1.0F, -1.0F, 2, 9, 2);
+ this.legs2.setRotationPoint(2.0F, (float) (0 + var1), 1.0F);
+ this.wings = new ModelRenderer(this, 52, 0);
+ this.wings.addBox(-1.0F, -0.0F, -1.0F, 1, 8, 4);
+ this.wings.setRotationPoint(-3.0F, (float) (-4 + var1), 0.0F);
+ this.wings2 = new ModelRenderer(this, 52, 0);
+ this.wings2.addBox(0.0F, -0.0F, -1.0F, 1, 8, 4);
+ this.wings2.setRotationPoint(3.0F, (float) (-4 + var1), 0.0F);
+ this.neck = new ModelRenderer(this, 44, 0);
+ this.neck.addBox(-1.0F, -6.0F, -1.0F, 2, 6, 2);
+ this.neck.setRotationPoint(0.0F, (float) (-2 + var1), -4.0F);
+ this.feather1 = new ModelRenderer(this, 30, 0);
+ this.feather1.addBox(-1.0F, -5.0F, 5.0F, 2, 1, 5, -0.3F);
+ this.feather1.setRotationPoint(0.0F, (float) (1 + var1), 1.0F);
+ this.feather2 = new ModelRenderer(this, 30, 0);
+ this.feather2.addBox(-1.0F, -5.0F, 5.0F, 2, 1, 5, -0.3F);
+ this.feather2.setRotationPoint(0.0F, (float) (1 + var1), 1.0F);
+ this.feather3 = new ModelRenderer(this, 30, 0);
+ this.feather3.addBox(-1.0F, -5.0F, 5.0F, 2, 1, 5, -0.3F);
+ this.feather3.setRotationPoint(0.0F, (float) (1 + var1), 1.0F);
+ this.feather1.rotationPointY += 0.5F;
+ this.feather2.rotationPointY += 0.5F;
+ this.feather3.rotationPointY += 0.5F;
+ }
+
+ /**
+ * Sets the models various rotation angles then renders the model.
+ */
+ public void render(Entity var1, float var2, float var3, float var4, float var5, float var6, float var7)
+ {
+ this.setRotationAngles(var2, var3, var4, var5, var6, var7);
+ this.head.render(var7);
+ this.jaw.render(var7);
+ this.body.render(var7);
+ this.legs.render(var7);
+ this.legs2.render(var7);
+ this.wings.render(var7);
+ this.wings2.render(var7);
+ this.neck.render(var7);
+ this.feather1.render(var7);
+ this.feather2.render(var7);
+ this.feather3.render(var7);
+ }
+
+ public void setRotationAngles(float var1, float var2, float var3, float var4, float var5, float var6)
+ {
+ float var7 = (float) Math.PI;
+ this.head.rotateAngleX = var5 / (180F / (float) Math.PI);
+ this.head.rotateAngleY = var4 / (180F / (float) Math.PI);
+ this.jaw.rotateAngleX = this.head.rotateAngleX;
+ this.jaw.rotateAngleY = this.head.rotateAngleY;
+ this.body.rotateAngleX = ((float) Math.PI / 2F);
+ this.legs.rotateAngleX = MathHelper.cos(var1 * 0.6662F) * 1.4F * var2;
+ this.legs2.rotateAngleX = MathHelper.cos(var1 * 0.6662F + (float) Math.PI) * 1.4F * var2;
+
+ if (var3 > 0.001F)
+ {
+ this.wings.rotationPointZ = -1.0F;
+ this.wings2.rotationPointZ = -1.0F;
+ this.wings.rotationPointY = 12.0F;
+ this.wings2.rotationPointY = 12.0F;
+ this.wings.rotateAngleX = 0.0F;
+ this.wings2.rotateAngleX = 0.0F;
+ this.wings.rotateAngleZ = var3;
+ this.wings2.rotateAngleZ = -var3;
+ this.legs.rotateAngleX = 0.6F;
+ this.legs2.rotateAngleX = 0.6F;
+ } else
+ {
+ this.wings.rotationPointZ = -3.0F;
+ this.wings2.rotationPointZ = -3.0F;
+ this.wings.rotationPointY = 14.0F;
+ this.wings2.rotationPointY = 14.0F;
+ this.wings.rotateAngleX = var7 / 2.0F;
+ this.wings2.rotateAngleX = var7 / 2.0F;
+ this.wings.rotateAngleZ = 0.0F;
+ this.wings2.rotateAngleZ = 0.0F;
+ }
+
+ this.feather1.rotateAngleY = -0.375F;
+ this.feather2.rotateAngleY = 0.0F;
+ this.feather3.rotateAngleY = 0.375F;
+ this.feather1.rotateAngleX = 0.25F;
+ this.feather2.rotateAngleX = 0.25F;
+ this.feather3.rotateAngleX = 0.25F;
+ this.neck.rotateAngleX = 0.0F;
+ this.neck.rotateAngleY = this.head.rotateAngleY;
+ this.jaw.rotateAngleX += 0.35F;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/models/ModelCog.java b/src/main/java/net/aetherteam/aether/client/models/ModelCog.java
new file mode 100644
index 0000000..50e02bd
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/models/ModelCog.java
@@ -0,0 +1,191 @@
+package net.aetherteam.aether.client.models;
+
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+
+public class ModelCog extends ModelBase
+{
+ ModelRenderer c11;
+ ModelRenderer c21;
+ ModelRenderer c31;
+ ModelRenderer c41;
+ ModelRenderer c51;
+ ModelRenderer c61;
+ ModelRenderer c71;
+ ModelRenderer c81;
+ ModelRenderer t11;
+ ModelRenderer t21;
+ ModelRenderer t31;
+ ModelRenderer t41;
+ ModelRenderer t51;
+ ModelRenderer t61;
+ ModelRenderer t71;
+ ModelRenderer t81;
+ ModelRenderer t91;
+ ModelRenderer t111;
+ ModelRenderer t101;
+ ModelRenderer t121;
+
+ public ModelCog()
+ {
+ this.textureWidth = 64;
+ this.textureHeight = 32;
+ this.c11 = new ModelRenderer(this, 44, 0);
+ this.c11.addBox(-3.0F, -7.0F, -2.0F, 6, 4, 4);
+ this.c11.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.c11.setTextureSize(64, 32);
+ this.c11.mirror = true;
+ this.setRotation(this.c11, 0.0F, 0.0F, 0.0F);
+ this.c21 = new ModelRenderer(this, 44, 0);
+ this.c21.addBox(-3.0F, -7.0F, -2.0F, 6, 4, 4);
+ this.c21.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.c21.setTextureSize(64, 32);
+ this.c21.mirror = true;
+ this.setRotation(this.c21, 0.0F, 0.0F, ((float) Math.PI / 4F));
+ this.c31 = new ModelRenderer(this, 44, 0);
+ this.c31.addBox(-3.0F, -7.0F, -2.0F, 6, 4, 4);
+ this.c31.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.c31.setTextureSize(64, 32);
+ this.c31.mirror = true;
+ this.setRotation(this.c31, 0.0F, 0.0F, ((float) Math.PI / 2F));
+ this.c41 = new ModelRenderer(this, 44, 0);
+ this.c41.addBox(-3.0F, -7.0F, -2.0F, 6, 4, 4);
+ this.c41.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.c41.setTextureSize(64, 32);
+ this.c41.mirror = true;
+ this.setRotation(this.c41, 0.0F, 0.0F, 2.356194F);
+ this.c51 = new ModelRenderer(this, 44, 0);
+ this.c51.addBox(-3.0F, 3.0F, -2.0F, 6, 4, 4);
+ this.c51.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.c51.setTextureSize(64, 32);
+ this.c51.mirror = true;
+ this.setRotation(this.c51, 0.0F, 0.0F, 0.0F);
+ this.c61 = new ModelRenderer(this, 44, 0);
+ this.c61.addBox(-3.0F, -7.0F, -2.0F, 6, 4, 4);
+ this.c61.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.c61.setTextureSize(64, 32);
+ this.c61.mirror = true;
+ this.setRotation(this.c61, 0.0F, 0.0F, -2.356194F);
+ this.c71 = new ModelRenderer(this, 44, 0);
+ this.c71.addBox(-3.0F, -7.0F, -2.0F, 6, 4, 4);
+ this.c71.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.c71.setTextureSize(64, 32);
+ this.c71.mirror = true;
+ this.setRotation(this.c71, 0.0F, 0.0F, -((float) Math.PI / 2F));
+ this.c81 = new ModelRenderer(this, 44, 0);
+ this.c81.addBox(-3.0F, -7.0F, -2.0F, 6, 4, 4);
+ this.c81.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.c81.setTextureSize(64, 32);
+ this.c81.mirror = true;
+ this.setRotation(this.c81, 0.0F, 0.0F, -((float) Math.PI / 4F));
+ this.t11 = new ModelRenderer(this, 0, 0);
+ this.t11.addBox(-1.0F, -9.0F, -2.0F, 2, 2, 4);
+ this.t11.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.t11.setTextureSize(64, 32);
+ this.t11.mirror = true;
+ this.setRotation(this.t11, 0.0F, 0.0F, 0.5235988F);
+ this.t21 = new ModelRenderer(this, 0, 0);
+ this.t21.addBox(-1.0F, -9.0F, -2.0F, 2, 2, 4);
+ this.t21.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.t21.setTextureSize(64, 32);
+ this.t21.mirror = true;
+ this.setRotation(this.t21, 0.0F, 0.0F, 1.047198F);
+ this.t31 = new ModelRenderer(this, 0, 0);
+ this.t31.addBox(-1.0F, -9.0F, -2.0F, 2, 2, 4);
+ this.t31.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.t31.setTextureSize(64, 32);
+ this.t31.mirror = true;
+ this.setRotation(this.t31, 0.0F, 0.0F, ((float) Math.PI / 2F));
+ this.t41 = new ModelRenderer(this, 0, 0);
+ this.t41.addBox(-1.0F, -9.0F, -2.0F, 2, 2, 4);
+ this.t41.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.t41.setTextureSize(64, 32);
+ this.t41.mirror = true;
+ this.setRotation(this.t41, 0.0F, 0.0F, 2.094395F);
+ this.t51 = new ModelRenderer(this, 0, 0);
+ this.t51.addBox(-1.0F, -9.0F, -2.0F, 2, 2, 4);
+ this.t51.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.t51.setTextureSize(64, 32);
+ this.t51.mirror = true;
+ this.setRotation(this.t51, 0.0F, 0.0F, 2.617994F);
+ this.t61 = new ModelRenderer(this, 0, 0);
+ this.t61.addBox(-1.0F, 7.0F, -2.0F, 2, 2, 4);
+ this.t61.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.t61.setTextureSize(64, 32);
+ this.t61.mirror = true;
+ this.setRotation(this.t61, 0.0F, 0.0F, 0.0F);
+ this.t71 = new ModelRenderer(this, 0, 0);
+ this.t71.addBox(-1.0F, -9.0F, -2.0F, 2, 2, 4);
+ this.t71.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.t71.setTextureSize(64, 32);
+ this.t71.mirror = true;
+ this.setRotation(this.t71, 0.0F, 0.0F, -2.617994F);
+ this.t81 = new ModelRenderer(this, 0, 0);
+ this.t81.addBox(-1.0F, -9.0F, -2.0F, 2, 2, 4);
+ this.t81.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.t81.setTextureSize(64, 32);
+ this.t81.mirror = true;
+ this.setRotation(this.t81, 0.0F, 0.0F, -2.094395F);
+ this.t91 = new ModelRenderer(this, 0, 0);
+ this.t91.addBox(-1.0F, -9.0F, -2.0F, 2, 2, 4);
+ this.t91.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.t91.setTextureSize(64, 32);
+ this.t91.mirror = true;
+ this.setRotation(this.t91, 0.0F, 0.0F, -((float) Math.PI / 2F));
+ this.t111 = new ModelRenderer(this, 0, 0);
+ this.t111.addBox(-1.0F, -9.0F, -2.0F, 2, 2, 4);
+ this.t111.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.t111.setTextureSize(64, 32);
+ this.t111.mirror = true;
+ this.setRotation(this.t111, 0.0F, 0.0F, -0.5235988F);
+ this.t101 = new ModelRenderer(this, 0, 0);
+ this.t101.addBox(-1.0F, -9.0F, -2.0F, 2, 2, 4);
+ this.t101.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.t101.setTextureSize(64, 32);
+ this.t101.mirror = true;
+ this.setRotation(this.t101, 0.0F, 0.0F, -1.047198F);
+ this.t121 = new ModelRenderer(this, 0, 0);
+ this.t121.addBox(-1.0F, -9.0F, -2.0F, 2, 2, 4);
+ this.t121.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.t121.setTextureSize(64, 32);
+ this.t121.mirror = true;
+ this.setRotation(this.t121, 0.0F, 0.0F, 0.0F);
+ }
+
+ /**
+ * Sets the models various rotation angles then renders the model.
+ */
+ public void render(Entity var1, float var2, float var3, float var4, float var5, float var6, float var7)
+ {
+ super.render(var1, var2, var3, var4, var5, var6, var7);
+ this.setRotationAngles(var2, var3, var4, var5, var6, var7, var1);
+ this.c11.render(var7);
+ this.c21.render(var7);
+ this.c31.render(var7);
+ this.c41.render(var7);
+ this.c51.render(var7);
+ this.c61.render(var7);
+ this.c71.render(var7);
+ this.c81.render(var7);
+ this.t11.render(var7);
+ this.t21.render(var7);
+ this.t31.render(var7);
+ this.t41.render(var7);
+ this.t51.render(var7);
+ this.t61.render(var7);
+ this.t71.render(var7);
+ this.t81.render(var7);
+ this.t91.render(var7);
+ this.t111.render(var7);
+ this.t101.render(var7);
+ this.t121.render(var7);
+ }
+
+ private void setRotation(ModelRenderer var1, float var2, float var3, float var4)
+ {
+ var1.rotateAngleX = var2;
+ var1.rotateAngleY = var3;
+ var1.rotateAngleZ = var4;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/models/ModelFlyingCow1.java b/src/main/java/net/aetherteam/aether/client/models/ModelFlyingCow1.java
new file mode 100644
index 0000000..20317ff
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/models/ModelFlyingCow1.java
@@ -0,0 +1,81 @@
+package net.aetherteam.aether.client.models;
+
+import net.minecraft.client.model.ModelQuadruped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+import org.lwjgl.opengl.GL11;
+
+public class ModelFlyingCow1 extends ModelQuadruped
+{
+ ModelRenderer udders;
+ ModelRenderer horn1;
+ ModelRenderer horn2;
+
+ public ModelFlyingCow1()
+ {
+ super(12, 0.0F);
+ this.head = new ModelRenderer(this, 0, 0);
+ this.head.addBox(-4.0F, -4.0F, -6.0F, 8, 8, 6, 0.0F);
+ this.head.setRotationPoint(0.0F, 4.0F, -8.0F);
+ this.horn1 = new ModelRenderer(this, 22, 0);
+ this.horn1.addBox(-4.0F, -5.0F, -4.0F, 1, 3, 1, 0.0F);
+ this.horn1.setRotationPoint(0.0F, 3.0F, -7.0F);
+ this.horn2 = new ModelRenderer(this, 22, 0);
+ this.horn2.addBox(3.0F, -5.0F, -4.0F, 1, 3, 1, 0.0F);
+ this.horn2.setRotationPoint(0.0F, 3.0F, -7.0F);
+ this.udders = new ModelRenderer(this, 52, 0);
+ this.udders.addBox(-2.0F, -3.0F, 0.0F, 4, 6, 2, 0.0F);
+ this.udders.setRotationPoint(0.0F, 14.0F, 6.0F);
+ this.udders.rotateAngleX = ((float) Math.PI / 2F);
+ this.body = new ModelRenderer(this, 18, 4);
+ this.body.addBox(-6.0F, -10.0F, -7.0F, 12, 18, 10, 0.0F);
+ this.body.setRotationPoint(0.0F, 5.0F, 2.0F);
+ --this.leg1.rotationPointX;
+ ++this.leg2.rotationPointX;
+ this.leg1.rotationPointZ += 0.0F;
+ this.leg2.rotationPointZ += 0.0F;
+ --this.leg3.rotationPointX;
+ ++this.leg4.rotationPointX;
+ --this.leg3.rotationPointZ;
+ --this.leg4.rotationPointZ;
+ }
+
+ /**
+ * Sets the models various rotation angles then renders the model.
+ */
+ public void render(Entity var1, float var2, float var3, float var4, float var5, float var6, float var7)
+ {
+ super.render(var1, var2, var3, var4, var5, var6, var7);
+
+ if (this.isChild)
+ {
+ float var8 = 2.0F;
+ GL11.glPushMatrix();
+ GL11.glPopMatrix();
+ GL11.glScalef(1.0F / var8, 1.0F / var8, 1.0F / var8);
+ GL11.glTranslatef(0.0F, 24.0F * var7, 0.0F);
+ this.horn1.render(var7);
+ this.horn2.render(var7);
+ this.udders.render(var7);
+ } else
+ {
+ this.horn1.render(var7);
+ this.horn2.render(var7);
+ this.udders.render(var7);
+ }
+ }
+
+ /**
+ * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
+ * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
+ * "far" arms and legs can swing at most.
+ */
+ public void setRotationAngles(float var1, float var2, float var3, float var4, float var5, float var6, Entity var7)
+ {
+ super.setRotationAngles(var1, var2, var3, var4, var5, var6, var7);
+ this.horn1.rotateAngleY = this.head.rotateAngleY;
+ this.horn1.rotateAngleX = this.head.rotateAngleX;
+ this.horn2.rotateAngleY = this.head.rotateAngleY;
+ this.horn2.rotateAngleX = this.head.rotateAngleX;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/models/ModelFlyingCow2.java b/src/main/java/net/aetherteam/aether/client/models/ModelFlyingCow2.java
new file mode 100644
index 0000000..d19c75b
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/models/ModelFlyingCow2.java
@@ -0,0 +1,58 @@
+package net.aetherteam.aether.client.models;
+
+import net.aetherteam.aether.entities.mounts.EntityFlyingCow;
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+import org.lwjgl.opengl.GL11;
+
+public class ModelFlyingCow2 extends ModelBase
+{
+ private ModelRenderer leftWingInner = new ModelRenderer(this, 0, 0);
+ private ModelRenderer leftWingOuter = new ModelRenderer(this, 20, 0);
+ private ModelRenderer rightWingInner = new ModelRenderer(this, 0, 0);
+ private ModelRenderer rightWingOuter = new ModelRenderer(this, 40, 0);
+ public static EntityFlyingCow flyingcow;
+
+ public ModelFlyingCow2()
+ {
+ this.leftWingInner.addBox(-1.0F, -8.0F, -4.0F, 2, 16, 8, 0.0F);
+ this.leftWingOuter.addBox(-1.0F, -8.0F, -4.0F, 2, 16, 8, 0.0F);
+ this.rightWingInner.addBox(-1.0F, -8.0F, -4.0F, 2, 16, 8, 0.0F);
+ this.rightWingOuter.addBox(-1.0F, -8.0F, -4.0F, 2, 16, 8, 0.0F);
+ this.rightWingOuter.rotateAngleY = (float) Math.PI;
+ }
+
+ /**
+ * Sets the models various rotation angles then renders the model.
+ */
+ public void render(Entity var1, float var2, float var3, float var4, float var5, float var6, float var7)
+ {
+ GL11.glPushMatrix();
+ GL11.glTranslatef(0.0F, -10.0F * var7, 0.0F);
+ float var8 = -((float) Math.acos((double) flyingcow.wingFold));
+ float var9 = 32.0F * flyingcow.wingFold / 4.0F;
+ float var10 = -32.0F * (float) Math.sqrt((double) (1.0F - flyingcow.wingFold * flyingcow.wingFold)) / 4.0F;
+ float var11 = 0.0F;
+ float var12 = var9 * (float) Math.cos((double) flyingcow.wingAngle) - var10 * (float) Math.sin((double) flyingcow.wingAngle);
+ float var13 = var9 * (float) Math.sin((double) flyingcow.wingAngle) + var10 * (float) Math.cos((double) flyingcow.wingAngle);
+ this.leftWingInner.setRotationPoint(4.0F + var12, var13 + 12.0F, var11);
+ this.rightWingInner.setRotationPoint(-4.0F - var12, var13 + 12.0F, var11);
+ var9 *= 3.0F;
+ var12 = var9 * (float) Math.cos((double) flyingcow.wingAngle) - var10 * (float) Math.sin((double) flyingcow.wingAngle);
+ var13 = var9 * (float) Math.sin((double) flyingcow.wingAngle) + var10 * (float) Math.cos((double) flyingcow.wingAngle);
+ this.leftWingOuter.setRotationPoint(4.0F + var12, var13 + 12.0F, var11);
+ this.rightWingOuter.setRotationPoint(-4.0F - var12, var13 + 12.0F, var11);
+ this.leftWingInner.rotateAngleZ = flyingcow.wingAngle + var8 + ((float) Math.PI / 2F);
+ this.leftWingOuter.rotateAngleZ = flyingcow.wingAngle - var8 + ((float) Math.PI / 2F);
+ this.rightWingInner.rotateAngleZ = -(flyingcow.wingAngle + var8 - ((float) Math.PI / 2F));
+ this.rightWingOuter.rotateAngleZ = -(flyingcow.wingAngle - var8 + ((float) Math.PI / 2F));
+ this.leftWingOuter.render(var7);
+ this.leftWingInner.render(var7);
+ this.rightWingOuter.render(var7);
+ this.rightWingInner.render(var7);
+ GL11.glPopMatrix();
+ }
+
+ public void setRotationAngles(float var1, float var2, float var3, float var4, float var5, float var6) {}
+}
diff --git a/src/main/java/net/aetherteam/aether/client/models/ModelHostEye.java b/src/main/java/net/aetherteam/aether/client/models/ModelHostEye.java
new file mode 100644
index 0000000..e095ff2
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/models/ModelHostEye.java
@@ -0,0 +1,49 @@
+package net.aetherteam.aether.client.models;
+
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+
+public class ModelHostEye extends ModelBase
+{
+ ModelRenderer Eye;
+
+ public ModelHostEye()
+ {
+ this.textureWidth = 64;
+ this.textureHeight = 32;
+ this.Eye = new ModelRenderer(this, 0, 0);
+ this.Eye.addBox(0.0F, 0.0F, 0.0F, 11, 11, 11);
+ this.Eye.setRotationPoint(-5.5F, 13.0F, -5.5F);
+ this.Eye.setTextureSize(64, 32);
+ this.Eye.mirror = true;
+ this.setRotation(this.Eye, 0.0F, 0.0F, 0.0F);
+ }
+
+ /**
+ * Sets the models various rotation angles then renders the model.
+ */
+ public void render(Entity var1, float var2, float var3, float var4, float var5, float var6, float var7)
+ {
+ super.render(var1, var2, var3, var4, var5, var6, var7);
+ this.setRotationAngles(var2, var3, var4, var5, var6, var7, var1);
+ this.Eye.render(var7);
+ }
+
+ private void setRotation(ModelRenderer var1, float var2, float var3, float var4)
+ {
+ var1.rotateAngleX = var2;
+ var1.rotateAngleY = var3;
+ var1.rotateAngleZ = var4;
+ }
+
+ /**
+ * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
+ * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
+ * "far" arms and legs can swing at most.
+ */
+ public void setRotationAngles(float var1, float var2, float var3, float var4, float var5, float var6, Entity var7)
+ {
+ super.setRotationAngles(var1, var2, var3, var4, var5, var6, var7);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/models/ModelLabyrinthEye.java b/src/main/java/net/aetherteam/aether/client/models/ModelLabyrinthEye.java
new file mode 100644
index 0000000..e156c89
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/models/ModelLabyrinthEye.java
@@ -0,0 +1,1973 @@
+package net.aetherteam.aether.client.models;
+
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+
+public class ModelLabyrinthEye extends ModelBase
+{
+ ModelRenderer eye;
+ ModelRenderer cog1a;
+ ModelRenderer cog1b;
+ ModelRenderer cog1c;
+ ModelRenderer cog1d;
+ ModelRenderer cog1e;
+ ModelRenderer cog1f;
+ ModelRenderer cog1g;
+ ModelRenderer cog1h;
+ ModelRenderer cog1i;
+ ModelRenderer cog1j;
+ ModelRenderer cog1k;
+ ModelRenderer cog1l;
+ ModelRenderer cog1m;
+ ModelRenderer cog1n;
+ ModelRenderer cog1o;
+ ModelRenderer cog1p;
+ ModelRenderer cog1q;
+ ModelRenderer cog1r;
+ ModelRenderer cog1s;
+ ModelRenderer cog1t;
+ ModelRenderer cog2a;
+ ModelRenderer cog2b;
+ ModelRenderer cog2c;
+ ModelRenderer cog2d;
+ ModelRenderer cog2e;
+ ModelRenderer cog2f;
+ ModelRenderer cog2g;
+ ModelRenderer cog2h;
+ ModelRenderer cog2i;
+ ModelRenderer cog2j;
+ ModelRenderer cog2k;
+ ModelRenderer cog2l;
+ ModelRenderer cog2m;
+ ModelRenderer cog2n;
+ ModelRenderer cog2o;
+ ModelRenderer cog2p;
+ ModelRenderer cog2q;
+ ModelRenderer cog2r;
+ ModelRenderer cog2s;
+ ModelRenderer cog2t;
+ ModelRenderer cog2u;
+ ModelRenderer cog3a;
+ ModelRenderer cog3b;
+ ModelRenderer cog3c;
+ ModelRenderer cog3d;
+ ModelRenderer cog3e;
+ ModelRenderer cog3f;
+ ModelRenderer cog3g;
+ ModelRenderer cog3h;
+ ModelRenderer cog3i;
+ ModelRenderer cog3j;
+ ModelRenderer cog3k;
+ ModelRenderer cog3l;
+ ModelRenderer cog3m;
+ ModelRenderer cog3n;
+ ModelRenderer cog3o;
+ ModelRenderer cog3p;
+ ModelRenderer cog3q;
+ ModelRenderer cog3r;
+ ModelRenderer cog3s;
+ ModelRenderer cog3t;
+ ModelRenderer cog4a;
+ ModelRenderer cog4b;
+ ModelRenderer cog4c;
+ ModelRenderer cog4d;
+ ModelRenderer cog4e;
+ ModelRenderer cog4f;
+ ModelRenderer cog4g;
+ ModelRenderer cog4h;
+ ModelRenderer cog4i;
+ ModelRenderer cog4j;
+ ModelRenderer cog4k;
+ ModelRenderer cog4l;
+ ModelRenderer cog4m;
+ ModelRenderer cog4n;
+ ModelRenderer cog4o;
+ ModelRenderer cog4p;
+ ModelRenderer cog4q;
+ ModelRenderer cog4r;
+ ModelRenderer cog4s;
+ ModelRenderer cog4t;
+ ModelRenderer cog5a;
+ ModelRenderer cog5b;
+ ModelRenderer cog5c;
+ ModelRenderer cog5d;
+ ModelRenderer cog5e;
+ ModelRenderer cog5f;
+ ModelRenderer cog5g;
+ ModelRenderer cog5h;
+ ModelRenderer cog5i;
+ ModelRenderer cog5j;
+ ModelRenderer cog5k;
+ ModelRenderer cog5l;
+ ModelRenderer cog5m;
+ ModelRenderer cog5n;
+ ModelRenderer cog5o;
+ ModelRenderer cog5p;
+ ModelRenderer cog5q;
+ ModelRenderer cog5r;
+ ModelRenderer cog5s;
+ ModelRenderer cog5t;
+ ModelRenderer cog6a;
+ ModelRenderer cog6b;
+ ModelRenderer cog6c;
+ ModelRenderer cog6d;
+ ModelRenderer cog6e;
+ ModelRenderer cog6f;
+ ModelRenderer cog6g;
+ ModelRenderer cog6h;
+ ModelRenderer cog6i;
+ ModelRenderer cog6j;
+ ModelRenderer cog6k;
+ ModelRenderer cog6l;
+ ModelRenderer cog6m;
+ ModelRenderer cog6n;
+ ModelRenderer cog6o;
+ ModelRenderer cog6p;
+ ModelRenderer cog6q;
+ ModelRenderer cog6r;
+ ModelRenderer cog6s;
+ ModelRenderer cog6t;
+ ModelRenderer cog7a;
+ ModelRenderer cog7b;
+ ModelRenderer cog7c;
+ ModelRenderer cog7d;
+ ModelRenderer cog7e;
+ ModelRenderer cog7f;
+ ModelRenderer cog7g;
+ ModelRenderer cog7h;
+ ModelRenderer cog7i;
+ ModelRenderer cog7j;
+ ModelRenderer cog7k;
+ ModelRenderer cog7l;
+ ModelRenderer cog7m;
+ ModelRenderer cog7n;
+ ModelRenderer cog7o;
+ ModelRenderer cog7p;
+ ModelRenderer cog7q;
+ ModelRenderer cog7r;
+ ModelRenderer cog7s;
+ ModelRenderer cog7t;
+ ModelRenderer cog8a;
+ ModelRenderer cog8b;
+ ModelRenderer cog8c;
+ ModelRenderer cog8d;
+ ModelRenderer cog8e;
+ ModelRenderer cog8f;
+ ModelRenderer cog8g;
+ ModelRenderer cog8h;
+ ModelRenderer cog8i;
+ ModelRenderer cog8j;
+ ModelRenderer cog8k;
+ ModelRenderer cog8l;
+ ModelRenderer cog8m;
+ ModelRenderer cog8n;
+ ModelRenderer cog8o;
+ ModelRenderer cog8p;
+ ModelRenderer cog8q;
+ ModelRenderer cog8r;
+ ModelRenderer cog8s;
+ ModelRenderer cog8t;
+ ModelRenderer cog9a;
+ ModelRenderer cog9b;
+ ModelRenderer cog9c;
+ ModelRenderer cog9d;
+ ModelRenderer cog9e;
+ ModelRenderer cog9f;
+ ModelRenderer cog9g;
+ ModelRenderer cog9h;
+ ModelRenderer cog9i;
+ ModelRenderer cog9j;
+ ModelRenderer cog9k;
+ ModelRenderer cog9l;
+ ModelRenderer cog9m;
+ ModelRenderer cog9n;
+ ModelRenderer cog9o;
+ ModelRenderer cog9p;
+ ModelRenderer cog9q;
+ ModelRenderer cog9r;
+ ModelRenderer cog9s;
+ ModelRenderer cog9t;
+ ModelRenderer cog10a;
+ ModelRenderer cog10b;
+ ModelRenderer cog10c;
+ ModelRenderer cog10d;
+ ModelRenderer cog10e;
+ ModelRenderer cog10f;
+ ModelRenderer cog10g;
+ ModelRenderer cog10h;
+ ModelRenderer cog10i;
+ ModelRenderer cog10j;
+ ModelRenderer cog10k;
+ ModelRenderer cog10l;
+ ModelRenderer cog10m;
+ ModelRenderer cog10n;
+ ModelRenderer cog10o;
+ ModelRenderer cog10p;
+ ModelRenderer cog10q;
+ ModelRenderer cog10r;
+ ModelRenderer cog10s;
+ ModelRenderer cog10t;
+ ModelRenderer cog11a;
+ ModelRenderer cog11b;
+ ModelRenderer cog11c;
+ ModelRenderer cog11d;
+ ModelRenderer cog11e;
+ ModelRenderer cog11f;
+ ModelRenderer cog11g;
+ ModelRenderer cog11h;
+ ModelRenderer cog11i;
+ ModelRenderer cog11j;
+ ModelRenderer cog11k;
+ ModelRenderer cog11l;
+ ModelRenderer cog11m;
+ ModelRenderer cog11n;
+ ModelRenderer cog11o;
+ ModelRenderer cog11p;
+ ModelRenderer cog11q;
+ ModelRenderer cog11r;
+ ModelRenderer cog11s;
+ ModelRenderer cog11t;
+ ModelRenderer cog12a;
+ ModelRenderer cog12b;
+ ModelRenderer cog12c;
+ ModelRenderer cog12d;
+ ModelRenderer cog12e;
+ ModelRenderer cog12f;
+ ModelRenderer cog12g;
+ ModelRenderer cog12h;
+ ModelRenderer cog12i;
+ ModelRenderer cog12j;
+ ModelRenderer cog12k;
+ ModelRenderer cog12l;
+ ModelRenderer cog12m;
+ ModelRenderer cog12n;
+ ModelRenderer cog12o;
+ ModelRenderer cog12p;
+ ModelRenderer cog12q;
+ ModelRenderer cog12r;
+ ModelRenderer cog12s;
+ ModelRenderer cog12t;
+ public float zRotationPoint = 0.0F;
+ public float yRotationPoint = -6.0F;
+
+ public ModelLabyrinthEye()
+ {
+ this.textureWidth = 64;
+ this.textureHeight = 32;
+ this.eye = new ModelRenderer(this, 20, 16);
+ this.eye.addBox(-5.0F, -11.0F, -2.0F, 8, 8, 8);
+ this.eye.setRotationPoint(1.0F, 7.0F, -2.5F);
+ this.eye.setTextureSize(64, 32);
+ this.eye.mirror = true;
+ this.setRotation(this.eye, 0.0F, 0.0F, 0.0F);
+ this.cog1a = new ModelRenderer(this, 0, 14);
+ this.cog1a.addBox(-3.0F, -2.0F, 3.0F, 6, 4, 4);
+ this.cog1a.setRotationPoint(-14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog1a.setTextureSize(64, 32);
+ this.cog1a.mirror = true;
+ this.setRotation(this.cog1a, 0.0F, 0.0F, 0.0F);
+ this.cog1b = new ModelRenderer(this, 0, 14);
+ this.cog1b.addBox(-3.0F, -2.0F, 3.0F, 6, 4, 4);
+ this.cog1b.setRotationPoint(-14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog1b.setTextureSize(64, 32);
+ this.cog1b.mirror = true;
+ this.setRotation(this.cog1b, 0.0F, ((float) Math.PI / 4F), 0.0F);
+ this.cog1c = new ModelRenderer(this, 0, 14);
+ this.cog1c.addBox(-3.0F, -2.0F, -7.0F, 6, 4, 4);
+ this.cog1c.setRotationPoint(-14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog1c.setTextureSize(64, 32);
+ this.cog1c.mirror = true;
+ this.setRotation(this.cog1c, 0.0F, 0.0F, 0.0F);
+ this.cog1d = new ModelRenderer(this, 0, 14);
+ this.cog1d.addBox(-3.0F, -2.0F, 3.0F, 6, 4, 4);
+ this.cog1d.setRotationPoint(-14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog1d.setTextureSize(64, 32);
+ this.cog1d.mirror = true;
+ this.setRotation(this.cog1d, 0.0F, ((float) Math.PI / 2F), 0.0F);
+ this.cog1e = new ModelRenderer(this, 0, 14);
+ this.cog1e.addBox(-3.0F, -2.0F, 3.0F, 6, 4, 4);
+ this.cog1e.setRotationPoint(-14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog1e.setTextureSize(64, 32);
+ this.cog1e.mirror = true;
+ this.setRotation(this.cog1e, 0.0F, 2.356194F, 0.0F);
+ this.cog1f = new ModelRenderer(this, 0, 14);
+ this.cog1f.addBox(-3.0F, -2.0F, 3.0F, 6, 4, 4);
+ this.cog1f.setRotationPoint(-14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog1f.setTextureSize(64, 32);
+ this.cog1f.mirror = true;
+ this.setRotation(this.cog1f, 0.0F, -((float) Math.PI / 4F), 0.0F);
+ this.cog1g = new ModelRenderer(this, 0, 14);
+ this.cog1g.addBox(-3.0F, -2.0F, 3.0F, 6, 4, 4);
+ this.cog1g.setRotationPoint(-14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog1g.setTextureSize(64, 32);
+ this.cog1g.mirror = true;
+ this.setRotation(this.cog1g, 0.0F, -((float) Math.PI / 2F), 0.0F);
+ this.cog1h = new ModelRenderer(this, 0, 14);
+ this.cog1h.addBox(-3.0F, -2.0F, 3.0F, 6, 4, 4);
+ this.cog1h.setRotationPoint(-14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog1h.setTextureSize(64, 32);
+ this.cog1h.mirror = true;
+ this.setRotation(this.cog1h, 0.0F, -2.356194F, 0.0F);
+ this.cog1i = new ModelRenderer(this, 12, 8);
+ this.cog1i.addBox(-1.0F, -2.0F, -9.0F, 2, 4, 2);
+ this.cog1i.setRotationPoint(-14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog1i.setTextureSize(64, 32);
+ this.cog1i.mirror = true;
+ this.setRotation(this.cog1i, 0.0F, 0.0F, 0.0F);
+ this.cog1j = new ModelRenderer(this, 12, 8);
+ this.cog1j.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog1j.setRotationPoint(-14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog1j.setTextureSize(64, 32);
+ this.cog1j.mirror = true;
+ this.setRotation(this.cog1j, 0.0F, 0.5235988F, 0.0F);
+ this.cog1k = new ModelRenderer(this, 12, 8);
+ this.cog1k.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog1k.setRotationPoint(-14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog1k.setTextureSize(64, 32);
+ this.cog1k.mirror = true;
+ this.setRotation(this.cog1k, 0.0F, 1.047198F, 0.0F);
+ this.cog1l = new ModelRenderer(this, 12, 8);
+ this.cog1l.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog1l.setRotationPoint(-14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog1l.setTextureSize(64, 32);
+ this.cog1l.mirror = true;
+ this.setRotation(this.cog1l, 0.0F, 2.094395F, 0.0F);
+ this.cog1m = new ModelRenderer(this, 12, 8);
+ this.cog1m.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog1m.setRotationPoint(-14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog1m.setTextureSize(64, 32);
+ this.cog1m.mirror = true;
+ this.setRotation(this.cog1m, 0.0F, 2.617994F, 0.0F);
+ this.cog1n = new ModelRenderer(this, 12, 8);
+ this.cog1n.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog1n.setRotationPoint(-14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog1n.setTextureSize(64, 32);
+ this.cog1n.mirror = true;
+ this.setRotation(this.cog1n, 0.0F, -2.617994F, 0.0F);
+ this.cog1o = new ModelRenderer(this, 12, 8);
+ this.cog1o.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog1o.setRotationPoint(-14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog1o.setTextureSize(64, 32);
+ this.cog1o.mirror = true;
+ this.setRotation(this.cog1o, 0.0F, -2.094395F, 0.0F);
+ this.cog1p = new ModelRenderer(this, 12, 8);
+ this.cog1p.addBox(-1.0F, -2.0F, -9.0F, 2, 4, 2);
+ this.cog1p.setRotationPoint(-14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog1p.setTextureSize(64, 32);
+ this.cog1p.mirror = true;
+ this.setRotation(this.cog1p, 0.0F, -((float) Math.PI / 2F), 0.0F);
+ this.cog1q = new ModelRenderer(this, 12, 8);
+ this.cog1q.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog1q.setRotationPoint(-14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog1q.setTextureSize(64, 32);
+ this.cog1q.mirror = true;
+ this.setRotation(this.cog1q, 0.0F, -1.047198F, 0.0F);
+ this.cog1r = new ModelRenderer(this, 12, 8);
+ this.cog1r.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog1r.setRotationPoint(-14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog1r.setTextureSize(64, 32);
+ this.cog1r.mirror = true;
+ this.setRotation(this.cog1r, 0.0F, -0.5235988F, 0.0F);
+ this.cog1s = new ModelRenderer(this, 12, 8);
+ this.cog1s.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog1s.setRotationPoint(-14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog1s.setTextureSize(64, 32);
+ this.cog1s.mirror = true;
+ this.setRotation(this.cog1s, 0.0F, 0.0F, 0.0F);
+ this.cog1t = new ModelRenderer(this, 12, 8);
+ this.cog1t.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog1t.setRotationPoint(-14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog1t.setTextureSize(64, 32);
+ this.cog1t.mirror = true;
+ this.setRotation(this.cog1t, 0.0F, -((float) Math.PI / 2F), 0.0F);
+ this.cog2a = new ModelRenderer(this, 0, 14);
+ this.cog2a.addBox(-3.0F, -2.0F, 3.0F, 6, 4, 4);
+ this.cog2a.setRotationPoint(0.0F, -8.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog2a.setTextureSize(64, 32);
+ this.cog2a.mirror = true;
+ this.setRotation(this.cog2a, ((float) Math.PI / 2F), ((float) Math.PI / 2F), 0.0F);
+ this.cog2b = new ModelRenderer(this, 0, 14);
+ this.cog2b.addBox(-3.0F, -2.0F, 3.0F, 6, 4, 4);
+ this.cog2b.setRotationPoint(0.0F, -8.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog2b.setTextureSize(64, 32);
+ this.cog2b.mirror = true;
+ this.setRotation(this.cog2b, -((float) Math.PI / 2F), -((float) Math.PI / 2F), 0.0F);
+ this.cog2c = new ModelRenderer(this, 0, 14);
+ this.cog2c.addBox(-3.0F, -2.0F, 3.0F, 6, 4, 4);
+ this.cog2c.setRotationPoint(0.0F, -8.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog2c.setTextureSize(64, 32);
+ this.cog2c.mirror = true;
+ this.setRotation(this.cog2c, 0.0F, 0.0F, ((float) Math.PI / 2F));
+ this.cog2d = new ModelRenderer(this, 12, 8);
+ this.cog2d.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog2d.setRotationPoint(0.0F, -8.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog2d.setTextureSize(64, 32);
+ this.cog2d.mirror = true;
+ this.setRotation(this.cog2d, ((float) Math.PI / 2F), -((float) Math.PI / 2F), 0.5235988F);
+ this.cog2e = new ModelRenderer(this, 0, 14);
+ this.cog2e.addBox(-3.0F, -2.0F, 3.0F, 6, 4, 4);
+ this.cog2e.setRotationPoint(0.0F, -8.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog2e.setTextureSize(64, 32);
+ this.cog2e.mirror = true;
+ this.setRotation(this.cog2e, ((float) Math.PI / 2F), ((float) Math.PI / 2F), ((float) Math.PI / 4F));
+ this.cog2f = new ModelRenderer(this, 12, 8);
+ this.cog2f.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog2f.setRotationPoint(0.0F, -8.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog2f.setTextureSize(64, 32);
+ this.cog2f.mirror = true;
+ this.setRotation(this.cog2f, ((float) Math.PI / 2F), -((float) Math.PI / 2F), 1.047198F);
+ this.cog2g = new ModelRenderer(this, 0, 14);
+ this.cog2g.addBox(-3.0F, -2.0F, 3.0F, 6, 4, 4);
+ this.cog2g.setRotationPoint(0.0F, -8.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog2g.setTextureSize(64, 32);
+ this.cog2g.mirror = true;
+ this.setRotation(this.cog2g, ((float) Math.PI / 2F), ((float) Math.PI / 2F), 2.356194F);
+ this.cog2h = new ModelRenderer(this, 12, 8);
+ this.cog2h.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog2h.setRotationPoint(0.0F, -8.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog2h.setTextureSize(64, 32);
+ this.cog2h.mirror = true;
+ this.setRotation(this.cog2h, ((float) Math.PI / 2F), -((float) Math.PI / 2F), 2.617994F);
+ this.cog2i = new ModelRenderer(this, 0, 14);
+ this.cog2i.addBox(-3.0F, -2.0F, 3.0F, 6, 4, 4);
+ this.cog2i.setRotationPoint(0.0F, -8.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog2i.setTextureSize(64, 32);
+ this.cog2i.mirror = true;
+ this.setRotation(this.cog2i, ((float) Math.PI / 2F), ((float) Math.PI / 2F), -((float) Math.PI / 4F));
+ this.cog2j = new ModelRenderer(this, 12, 8);
+ this.cog2j.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog2j.setRotationPoint(0.0F, -8.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog2j.setTextureSize(64, 32);
+ this.cog2j.mirror = true;
+ this.setRotation(this.cog2j, ((float) Math.PI / 2F), -((float) Math.PI / 2F), 2.094395F);
+ this.cog2k = new ModelRenderer(this, 0, 14);
+ this.cog2k.addBox(-3.0F, -2.0F, 3.0F, 6, 4, 4);
+ this.cog2k.setRotationPoint(0.0F, -8.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog2k.setTextureSize(64, 32);
+ this.cog2k.mirror = true;
+ this.setRotation(this.cog2k, ((float) Math.PI / 2F), ((float) Math.PI / 2F), -2.356194F);
+ this.cog2l = new ModelRenderer(this, 12, 8);
+ this.cog2l.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog2l.setRotationPoint(0.0F, -8.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog2l.setTextureSize(64, 32);
+ this.cog2l.mirror = true;
+ this.setRotation(this.cog2l, ((float) Math.PI / 2F), -((float) Math.PI / 2F), -2.617994F);
+ this.cog2m = new ModelRenderer(this, 12, 8);
+ this.cog2m.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog2m.setRotationPoint(0.0F, -8.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog2m.setTextureSize(64, 32);
+ this.cog2m.mirror = true;
+ this.setRotation(this.cog2m, ((float) Math.PI / 2F), -((float) Math.PI / 2F), -0.5235988F);
+ this.cog2n = new ModelRenderer(this, 12, 8);
+ this.cog2n.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog2n.setRotationPoint(0.0F, -8.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog2n.setTextureSize(64, 32);
+ this.cog2n.mirror = true;
+ this.setRotation(this.cog2n, ((float) Math.PI / 2F), -((float) Math.PI / 2F), -2.094395F);
+ this.cog2o = new ModelRenderer(this, 12, 8);
+ this.cog2o.addBox(-1.0F, -2.0F, -9.0F, 2, 4, 2);
+ this.cog2o.setRotationPoint(0.0F, -8.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog2o.setTextureSize(64, 32);
+ this.cog2o.mirror = true;
+ this.setRotation(this.cog2o, ((float) Math.PI / 2F), -((float) Math.PI / 2F), 0.0F);
+ this.cog2p = new ModelRenderer(this, 12, 8);
+ this.cog2p.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog2p.setRotationPoint(0.0F, -8.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog2p.setTextureSize(64, 32);
+ this.cog2p.mirror = true;
+ this.setRotation(this.cog2p, ((float) Math.PI / 2F), -((float) Math.PI / 2F), -1.047198F);
+ this.cog2q = new ModelRenderer(this, 12, 8);
+ this.cog2q.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog2q.setRotationPoint(0.0F, -8.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog2q.setTextureSize(64, 32);
+ this.cog2q.mirror = true;
+ this.setRotation(this.cog2q, 0.0F, 0.0F, ((float) Math.PI / 2F));
+ this.cog2r = new ModelRenderer(this, 0, 14);
+ this.cog2r.addBox(-3.0F, -2.0F, -7.0F, 6, 4, 4);
+ this.cog2r.setRotationPoint(0.0F, -8.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog2r.setTextureSize(64, 32);
+ this.cog2r.mirror = true;
+ this.setRotation(this.cog2r, 0.0F, 0.0F, ((float) Math.PI / 2F));
+ this.cog2s = new ModelRenderer(this, 12, 8);
+ this.cog2s.addBox(-1.0F, -2.0F, -9.0F, 2, 4, 2);
+ this.cog2s.setRotationPoint(0.0F, -8.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog2s.setTextureSize(64, 32);
+ this.cog2s.mirror = true;
+ this.setRotation(this.cog2s, 0.0F, 0.0F, ((float) Math.PI / 2F));
+ this.cog2t = new ModelRenderer(this, 12, 8);
+ this.cog2t.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog2t.setRotationPoint(0.0F, -8.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog2t.setTextureSize(64, 32);
+ this.cog2t.mirror = true;
+ this.setRotation(this.cog2t, ((float) Math.PI / 2F), -((float) Math.PI / 2F), 0.0F);
+ this.cog2u = new ModelRenderer(this, 12, 8);
+ this.cog2u.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog2u.setRotationPoint(0.0F, -8.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog2u.setTextureSize(64, 32);
+ this.cog2u.mirror = true;
+ this.setRotation(this.cog2u, 0.0F, 0.0F, ((float) Math.PI / 2F));
+ this.cog3a = new ModelRenderer(this, 0, 14);
+ this.cog3a.addBox(-3.0F, -2.0F, 3.0F, 6, 4, 4);
+ this.cog3a.setRotationPoint(14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog3a.setTextureSize(64, 32);
+ this.cog3a.mirror = true;
+ this.setRotation(this.cog3a, 0.0F, -((float) Math.PI / 4F), 0.0F);
+ this.cog3b = new ModelRenderer(this, 12, 8);
+ this.cog3b.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog3b.setRotationPoint(14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog3b.setTextureSize(64, 32);
+ this.cog3b.mirror = true;
+ this.setRotation(this.cog3b, 0.0F, -0.5235988F, 0.0F);
+ this.cog3c = new ModelRenderer(this, 0, 14);
+ this.cog3c.addBox(-3.0F, -2.0F, 3.0F, 6, 4, 4);
+ this.cog3c.setRotationPoint(14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog3c.setTextureSize(64, 32);
+ this.cog3c.mirror = true;
+ this.setRotation(this.cog3c, 0.0F, -((float) Math.PI / 2F), 0.0F);
+ this.cog3d = new ModelRenderer(this, 12, 8);
+ this.cog3d.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog3d.setRotationPoint(14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog3d.setTextureSize(64, 32);
+ this.cog3d.mirror = true;
+ this.setRotation(this.cog3d, 0.0F, -1.047198F, 0.0F);
+ this.cog3e = new ModelRenderer(this, 12, 8);
+ this.cog3e.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog3e.setRotationPoint(14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog3e.setTextureSize(64, 32);
+ this.cog3e.mirror = true;
+ this.setRotation(this.cog3e, 0.0F, -2.094395F, 0.0F);
+ this.cog3f = new ModelRenderer(this, 0, 14);
+ this.cog3f.addBox(-3.0F, -2.0F, 3.0F, 6, 4, 4);
+ this.cog3f.setRotationPoint(14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog3f.setTextureSize(64, 32);
+ this.cog3f.mirror = true;
+ this.setRotation(this.cog3f, 0.0F, -2.356194F, 0.0F);
+ this.cog3g = new ModelRenderer(this, 12, 8);
+ this.cog3g.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog3g.setRotationPoint(14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog3g.setTextureSize(64, 32);
+ this.cog3g.mirror = true;
+ this.setRotation(this.cog3g, 0.0F, -2.617994F, 0.0F);
+ this.cog3h = new ModelRenderer(this, 0, 14);
+ this.cog3h.addBox(-3.0F, -2.0F, -7.0F, 6, 4, 4);
+ this.cog3h.setRotationPoint(14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog3h.setTextureSize(64, 32);
+ this.cog3h.mirror = true;
+ this.setRotation(this.cog3h, 0.0F, 0.0F, 0.0F);
+ this.cog3i = new ModelRenderer(this, 12, 8);
+ this.cog3i.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog3i.setRotationPoint(14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog3i.setTextureSize(64, 32);
+ this.cog3i.mirror = true;
+ this.setRotation(this.cog3i, 0.0F, 0.0F, 0.0F);
+ this.cog3j = new ModelRenderer(this, 0, 14);
+ this.cog3j.addBox(-3.0F, -2.0F, 3.0F, 6, 4, 4);
+ this.cog3j.setRotationPoint(14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog3j.setTextureSize(64, 32);
+ this.cog3j.mirror = true;
+ this.setRotation(this.cog3j, 0.0F, ((float) Math.PI / 4F), 0.0F);
+ this.cog3k = new ModelRenderer(this, 12, 8);
+ this.cog3k.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog3k.setRotationPoint(14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog3k.setTextureSize(64, 32);
+ this.cog3k.mirror = true;
+ this.setRotation(this.cog3k, 0.0F, 2.094395F, 0.0F);
+ this.cog3l = new ModelRenderer(this, 0, 14);
+ this.cog3l.addBox(-3.0F, -2.0F, 3.0F, 6, 4, 4);
+ this.cog3l.setRotationPoint(14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog3l.setTextureSize(64, 32);
+ this.cog3l.mirror = true;
+ this.setRotation(this.cog3l, 0.0F, ((float) Math.PI / 2F), 0.0F);
+ this.cog3m = new ModelRenderer(this, 12, 8);
+ this.cog3m.addBox(-1.0F, -2.0F, -9.0F, 2, 4, 2);
+ this.cog3m.setRotationPoint(14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog3m.setTextureSize(64, 32);
+ this.cog3m.mirror = true;
+ this.setRotation(this.cog3m, 0.0F, ((float) Math.PI / 2F), 0.0F);
+ this.cog3n = new ModelRenderer(this, 0, 14);
+ this.cog3n.addBox(-3.0F, -2.0F, 3.0F, 6, 4, 4);
+ this.cog3n.setRotationPoint(14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog3n.setTextureSize(64, 32);
+ this.cog3n.mirror = true;
+ this.setRotation(this.cog3n, 0.0F, 2.356194F, 0.0F);
+ this.cog3o = new ModelRenderer(this, 12, 8);
+ this.cog3o.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog3o.setRotationPoint(14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog3o.setTextureSize(64, 32);
+ this.cog3o.mirror = true;
+ this.setRotation(this.cog3o, 0.0F, 1.047198F, 0.0F);
+ this.cog3p = new ModelRenderer(this, 12, 8);
+ this.cog3p.addBox(-1.0F, -2.0F, -9.0F, 2, 4, 2);
+ this.cog3p.setRotationPoint(14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog3p.setTextureSize(64, 32);
+ this.cog3p.mirror = true;
+ this.setRotation(this.cog3p, 0.0F, 0.0F, 0.0F);
+ this.cog3q = new ModelRenderer(this, 12, 8);
+ this.cog3q.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog3q.setRotationPoint(14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog3q.setTextureSize(64, 32);
+ this.cog3q.mirror = true;
+ this.setRotation(this.cog3q, 0.0F, 0.5235988F, 0.0F);
+ this.cog3r = new ModelRenderer(this, 12, 8);
+ this.cog3r.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog3r.setRotationPoint(14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog3r.setTextureSize(64, 32);
+ this.cog3r.mirror = true;
+ this.setRotation(this.cog3r, 0.0F, 2.617994F, 0.0F);
+ this.cog3s = new ModelRenderer(this, 0, 14);
+ this.cog3s.addBox(-3.0F, -2.0F, 3.0F, 6, 4, 4);
+ this.cog3s.setRotationPoint(14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog3s.setTextureSize(64, 32);
+ this.cog3s.mirror = true;
+ this.setRotation(this.cog3s, 0.0F, 0.0F, 0.0F);
+ this.cog3t = new ModelRenderer(this, 12, 8);
+ this.cog3t.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog3t.setRotationPoint(14.0F, 6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog3t.setTextureSize(64, 32);
+ this.cog3t.mirror = true;
+ this.setRotation(this.cog3t, 0.0F, ((float) Math.PI / 2F), 0.0F);
+ this.cog4a = new ModelRenderer(this, 12, 8);
+ this.cog4a.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog4a.setRotationPoint(0.0F, 20.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog4a.setTextureSize(64, 32);
+ this.cog4a.mirror = true;
+ this.setRotation(this.cog4a, ((float) Math.PI / 2F), -((float) Math.PI / 2F), -2.617994F);
+ this.cog4b = new ModelRenderer(this, 12, 8);
+ this.cog4b.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog4b.setRotationPoint(0.0F, 20.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog4b.setTextureSize(64, 32);
+ this.cog4b.mirror = true;
+ this.setRotation(this.cog4b, ((float) Math.PI / 2F), -((float) Math.PI / 2F), -2.094395F);
+ this.cog4c = new ModelRenderer(this, 12, 8);
+ this.cog4c.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog4c.setRotationPoint(0.0F, 20.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog4c.setTextureSize(64, 32);
+ this.cog4c.mirror = true;
+ this.setRotation(this.cog4c, ((float) Math.PI / 2F), -((float) Math.PI / 2F), -((float) Math.PI / 2F));
+ this.cog4d = new ModelRenderer(this, 0, 14);
+ this.cog4d.addBox(-3.0F, -2.0F, -7.0F, 6, 4, 4);
+ this.cog4d.setRotationPoint(0.0F, 20.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog4d.setTextureSize(64, 32);
+ this.cog4d.mirror = true;
+ this.setRotation(this.cog4d, -((float) Math.PI / 2F), -((float) Math.PI / 2F), 0.0F);
+ this.cog4e = new ModelRenderer(this, 12, 8);
+ this.cog4e.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog4e.setRotationPoint(0.0F, 20.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog4e.setTextureSize(64, 32);
+ this.cog4e.mirror = true;
+ this.setRotation(this.cog4e, ((float) Math.PI / 2F), -((float) Math.PI / 2F), -1.047198F);
+ this.cog4f = new ModelRenderer(this, 0, 14);
+ this.cog4f.addBox(-3.0F, -2.0F, -7.0F, 6, 4, 4);
+ this.cog4f.setRotationPoint(0.0F, 20.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog4f.setTextureSize(64, 32);
+ this.cog4f.mirror = true;
+ this.setRotation(this.cog4f, -((float) Math.PI / 2F), -((float) Math.PI / 2F), ((float) Math.PI / 4F));
+ this.cog4g = new ModelRenderer(this, 12, 8);
+ this.cog4g.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog4g.setRotationPoint(0.0F, 20.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog4g.setTextureSize(64, 32);
+ this.cog4g.mirror = true;
+ this.setRotation(this.cog4g, ((float) Math.PI / 2F), -((float) Math.PI / 2F), 0.5235988F);
+ this.cog4h = new ModelRenderer(this, 0, 14);
+ this.cog4h.addBox(-3.0F, -2.0F, -7.0F, 6, 4, 4);
+ this.cog4h.setRotationPoint(0.0F, 20.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog4h.setTextureSize(64, 32);
+ this.cog4h.mirror = true;
+ this.setRotation(this.cog4h, -((float) Math.PI / 2F), -((float) Math.PI / 2F), ((float) Math.PI / 2F));
+ this.cog4i = new ModelRenderer(this, 12, 8);
+ this.cog4i.addBox(-1.0F, -2.0F, -9.0F, 2, 4, 2);
+ this.cog4i.setRotationPoint(0.0F, 20.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog4i.setTextureSize(64, 32);
+ this.cog4i.mirror = true;
+ this.setRotation(this.cog4i, ((float) Math.PI / 2F), -((float) Math.PI / 2F), 0.0F);
+ this.cog4j = new ModelRenderer(this, 0, 14);
+ this.cog4j.addBox(-3.0F, -2.0F, -7.0F, 6, 4, 4);
+ this.cog4j.setRotationPoint(0.0F, 20.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog4j.setTextureSize(64, 32);
+ this.cog4j.mirror = true;
+ this.setRotation(this.cog4j, -((float) Math.PI / 2F), -((float) Math.PI / 2F), 2.356194F);
+ this.cog4k = new ModelRenderer(this, 12, 8);
+ this.cog4k.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog4k.setRotationPoint(0.0F, 20.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog4k.setTextureSize(64, 32);
+ this.cog4k.mirror = true;
+ this.setRotation(this.cog4k, ((float) Math.PI / 2F), -((float) Math.PI / 2F), 2.617994F);
+ this.cog4l = new ModelRenderer(this, 0, 14);
+ this.cog4l.addBox(-3.0F, -2.0F, 3.0F, 6, 4, 4);
+ this.cog4l.setRotationPoint(0.0F, 20.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog4l.setTextureSize(64, 32);
+ this.cog4l.mirror = true;
+ this.setRotation(this.cog4l, -((float) Math.PI / 2F), -((float) Math.PI / 2F), 0.0F);
+ this.cog4m = new ModelRenderer(this, 12, 8);
+ this.cog4m.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog4m.setRotationPoint(0.0F, 20.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog4m.setTextureSize(64, 32);
+ this.cog4m.mirror = true;
+ this.setRotation(this.cog4m, ((float) Math.PI / 2F), -((float) Math.PI / 2F), 2.094395F);
+ this.cog4n = new ModelRenderer(this, 0, 14);
+ this.cog4n.addBox(-3.0F, -2.0F, -7.0F, 6, 4, 4);
+ this.cog4n.setRotationPoint(0.0F, 20.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog4n.setTextureSize(64, 32);
+ this.cog4n.mirror = true;
+ this.setRotation(this.cog4n, -((float) Math.PI / 2F), -((float) Math.PI / 2F), -((float) Math.PI / 4F));
+ this.cog4o = new ModelRenderer(this, 12, 8);
+ this.cog4o.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog4o.setRotationPoint(0.0F, 20.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog4o.setTextureSize(64, 32);
+ this.cog4o.mirror = true;
+ this.setRotation(this.cog4o, ((float) Math.PI / 2F), -((float) Math.PI / 2F), ((float) Math.PI / 2F));
+ this.cog4p = new ModelRenderer(this, 0, 14);
+ this.cog4p.addBox(-3.0F, -2.0F, -7.0F, 6, 4, 4);
+ this.cog4p.setRotationPoint(0.0F, 20.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog4p.setTextureSize(64, 32);
+ this.cog4p.mirror = true;
+ this.setRotation(this.cog4p, -((float) Math.PI / 2F), -((float) Math.PI / 2F), -((float) Math.PI / 2F));
+ this.cog4q = new ModelRenderer(this, 12, 8);
+ this.cog4q.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog4q.setRotationPoint(0.0F, 20.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog4q.setTextureSize(64, 32);
+ this.cog4q.mirror = true;
+ this.setRotation(this.cog4q, ((float) Math.PI / 2F), -((float) Math.PI / 2F), 1.047198F);
+ this.cog4r = new ModelRenderer(this, 0, 14);
+ this.cog4r.addBox(-3.0F, -2.0F, -7.0F, 6, 4, 4);
+ this.cog4r.setRotationPoint(0.0F, 20.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog4r.setTextureSize(64, 32);
+ this.cog4r.mirror = true;
+ this.setRotation(this.cog4r, -((float) Math.PI / 2F), -((float) Math.PI / 2F), -2.356194F);
+ this.cog4s = new ModelRenderer(this, 12, 8);
+ this.cog4s.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog4s.setRotationPoint(0.0F, 20.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog4s.setTextureSize(64, 32);
+ this.cog4s.mirror = true;
+ this.setRotation(this.cog4s, ((float) Math.PI / 2F), -((float) Math.PI / 2F), -0.5235988F);
+ this.cog4t = new ModelRenderer(this, 12, 8);
+ this.cog4t.addBox(-1.0F, -2.0F, 7.0F, 2, 4, 2);
+ this.cog4t.setRotationPoint(0.0F, 20.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog4t.setTextureSize(64, 32);
+ this.cog4t.mirror = true;
+ this.setRotation(this.cog4t, ((float) Math.PI / 2F), -((float) Math.PI / 2F), 0.0F);
+ this.cog5a = new ModelRenderer(this, 0, 14);
+ this.cog5a.addBox(-3.0F, -2.0F, -7.0F, 6, 4, 4);
+ this.cog5a.setRotationPoint(-7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog5a.setTextureSize(64, 32);
+ this.cog5a.mirror = true;
+ this.setRotation(this.cog5a, 0.0F, 0.0F, 1.047198F);
+ this.cog5b = new ModelRenderer(this, 0, 14);
+ this.cog5b.addBox(-3.0F, -2.0F, 3.0F, 6, 4, 4);
+ this.cog5b.setRotationPoint(-7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog5b.setTextureSize(64, 32);
+ this.cog5b.mirror = true;
+ this.setRotation(this.cog5b, 0.0F, 0.0F, 1.047198F);
+ this.cog5c = new ModelRenderer(this, 0, 22);
+ this.cog5c.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog5c.setRotationPoint(-7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog5c.setTextureSize(64, 32);
+ this.cog5c.mirror = true;
+ this.setRotation(this.cog5c, -((float) Math.PI / 4F), 0.0F, -0.5235988F);
+ this.cog5d = new ModelRenderer(this, 0, 22);
+ this.cog5d.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog5d.setRotationPoint(-7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog5d.setTextureSize(64, 32);
+ this.cog5d.mirror = true;
+ this.setRotation(this.cog5d, -2.356194F, 0.0F, -0.5235988F);
+ this.cog5e = new ModelRenderer(this, 0, 22);
+ this.cog5e.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog5e.setRotationPoint(-7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog5e.setTextureSize(64, 32);
+ this.cog5e.mirror = true;
+ this.setRotation(this.cog5e, ((float) Math.PI / 4F), 0.0F, -0.5235988F);
+ this.cog5f = new ModelRenderer(this, 0, 22);
+ this.cog5f.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog5f.setRotationPoint(-7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog5f.setTextureSize(64, 32);
+ this.cog5f.mirror = true;
+ this.setRotation(this.cog5f, 0.0F, 0.0F, -0.5235988F);
+ this.cog5g = new ModelRenderer(this, 0, 22);
+ this.cog5g.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog5g.setRotationPoint(-7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog5g.setTextureSize(64, 32);
+ this.cog5g.mirror = true;
+ this.setRotation(this.cog5g, 2.356194F, 0.0F, -0.5235988F);
+ this.cog5h = new ModelRenderer(this, 0, 22);
+ this.cog5h.addBox(-2.0F, 3.0F, -3.0F, 4, 4, 6);
+ this.cog5h.setRotationPoint(-7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog5h.setTextureSize(64, 32);
+ this.cog5h.mirror = true;
+ this.setRotation(this.cog5h, 0.0F, 0.0F, -0.5235988F);
+ this.cog5i = new ModelRenderer(this, 16, 0);
+ this.cog5i.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog5i.setRotationPoint(-7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog5i.setTextureSize(64, 32);
+ this.cog5i.mirror = true;
+ this.setRotation(this.cog5i, 0.0F, 0.0F, -0.5235988F);
+ this.cog5j = new ModelRenderer(this, 16, 0);
+ this.cog5j.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog5j.setRotationPoint(-7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog5j.setTextureSize(64, 32);
+ this.cog5j.mirror = true;
+ this.setRotation(this.cog5j, 0.5235988F, 0.0F, -0.5235988F);
+ this.cog5k = new ModelRenderer(this, 16, 0);
+ this.cog5k.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog5k.setRotationPoint(-7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog5k.setTextureSize(64, 32);
+ this.cog5k.mirror = true;
+ this.setRotation(this.cog5k, 1.047198F, 0.0F, -0.5235988F);
+ this.cog5l = new ModelRenderer(this, 16, 0);
+ this.cog5l.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog5l.setRotationPoint(-7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog5l.setTextureSize(64, 32);
+ this.cog5l.mirror = true;
+ this.setRotation(this.cog5l, ((float) Math.PI / 2F), 0.0F, -0.5235988F);
+ this.cog5m = new ModelRenderer(this, 16, 0);
+ this.cog5m.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog5m.setRotationPoint(-7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog5m.setTextureSize(64, 32);
+ this.cog5m.mirror = true;
+ this.setRotation(this.cog5m, 2.094395F, 0.0F, -0.5235988F);
+ this.cog5n = new ModelRenderer(this, 16, 0);
+ this.cog5n.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog5n.setRotationPoint(-7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog5n.setTextureSize(64, 32);
+ this.cog5n.mirror = true;
+ this.setRotation(this.cog5n, 2.617994F, 0.0F, -0.5235988F);
+ this.cog5o = new ModelRenderer(this, 16, 0);
+ this.cog5o.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog5o.setRotationPoint(-7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog5o.setTextureSize(64, 32);
+ this.cog5o.mirror = true;
+ this.setRotation(this.cog5o, 0.0F, 0.0F, -0.5235988F);
+ this.cog5p = new ModelRenderer(this, 16, 0);
+ this.cog5p.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog5p.setRotationPoint(-7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog5p.setTextureSize(64, 32);
+ this.cog5p.mirror = true;
+ this.setRotation(this.cog5p, -0.5235988F, 0.0F, -0.5235988F);
+ this.cog5q = new ModelRenderer(this, 16, 0);
+ this.cog5q.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog5q.setRotationPoint(-7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog5q.setTextureSize(64, 32);
+ this.cog5q.mirror = true;
+ this.setRotation(this.cog5q, -1.047198F, 0.0F, -0.5235988F);
+ this.cog5r = new ModelRenderer(this, 16, 0);
+ this.cog5r.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog5r.setRotationPoint(-7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog5r.setTextureSize(64, 32);
+ this.cog5r.mirror = true;
+ this.setRotation(this.cog5r, -((float) Math.PI / 2F), 0.0F, -0.5235988F);
+ this.cog5s = new ModelRenderer(this, 16, 0);
+ this.cog5s.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog5s.setRotationPoint(-7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog5s.setTextureSize(64, 32);
+ this.cog5s.mirror = true;
+ this.setRotation(this.cog5s, -2.094395F, 0.0F, -0.5235988F);
+ this.cog5t = new ModelRenderer(this, 16, 0);
+ this.cog5t.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog5t.setRotationPoint(-7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog5t.setTextureSize(64, 32);
+ this.cog5t.mirror = true;
+ this.setRotation(this.cog5t, -2.617994F, 0.0F, -0.5235988F);
+ this.cog6a = new ModelRenderer(this, 0, 22);
+ this.cog6a.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog6a.setRotationPoint(-12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog6a.setTextureSize(64, 32);
+ this.cog6a.mirror = true;
+ this.setRotation(this.cog6a, 0.0F, 0.0F, -1.047198F);
+ this.cog6b = new ModelRenderer(this, 0, 22);
+ this.cog6b.addBox(-2.0F, 3.0F, -3.0F, 4, 4, 6);
+ this.cog6b.setRotationPoint(-12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog6b.setTextureSize(64, 32);
+ this.cog6b.mirror = true;
+ this.setRotation(this.cog6b, 0.0F, 0.0F, -1.047198F);
+ this.cog6c = new ModelRenderer(this, 0, 22);
+ this.cog6c.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog6c.setRotationPoint(-12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog6c.setTextureSize(64, 32);
+ this.cog6c.mirror = true;
+ this.setRotation(this.cog6c, -((float) Math.PI / 4F), 0.0F, -1.047198F);
+ this.cog6d = new ModelRenderer(this, 0, 22);
+ this.cog6d.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog6d.setRotationPoint(-12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog6d.setTextureSize(64, 32);
+ this.cog6d.mirror = true;
+ this.setRotation(this.cog6d, -((float) Math.PI / 2F), 0.0F, -1.047198F);
+ this.cog6e = new ModelRenderer(this, 0, 22);
+ this.cog6e.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog6e.setRotationPoint(-12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog6e.setTextureSize(64, 32);
+ this.cog6e.mirror = true;
+ this.setRotation(this.cog6e, -2.356194F, 0.0F, -1.047198F);
+ this.cog6f = new ModelRenderer(this, 0, 22);
+ this.cog6f.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog6f.setRotationPoint(-12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog6f.setTextureSize(64, 32);
+ this.cog6f.mirror = true;
+ this.setRotation(this.cog6f, ((float) Math.PI / 4F), 0.0F, -1.047198F);
+ this.cog6g = new ModelRenderer(this, 0, 22);
+ this.cog6g.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog6g.setRotationPoint(-12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog6g.setTextureSize(64, 32);
+ this.cog6g.mirror = true;
+ this.setRotation(this.cog6g, ((float) Math.PI / 2F), 0.0F, -1.047198F);
+ this.cog6h = new ModelRenderer(this, 0, 22);
+ this.cog6h.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog6h.setRotationPoint(-12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog6h.setTextureSize(64, 32);
+ this.cog6h.mirror = true;
+ this.setRotation(this.cog6h, 2.356194F, 0.0F, -1.047198F);
+ this.cog6i = new ModelRenderer(this, 16, 0);
+ this.cog6i.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog6i.setRotationPoint(-12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog6i.setTextureSize(64, 32);
+ this.cog6i.mirror = true;
+ this.setRotation(this.cog6i, ((float) Math.PI / 2F), 0.0F, -1.047198F);
+ this.cog6j = new ModelRenderer(this, 16, 0);
+ this.cog6j.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog6j.setRotationPoint(-12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog6j.setTextureSize(64, 32);
+ this.cog6j.mirror = true;
+ this.setRotation(this.cog6j, ((float) Math.PI / 2F), 0.0F, -1.047198F);
+ this.cog6k = new ModelRenderer(this, 16, 0);
+ this.cog6k.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog6k.setRotationPoint(-12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog6k.setTextureSize(64, 32);
+ this.cog6k.mirror = true;
+ this.setRotation(this.cog6k, 0.0F, 0.0F, -1.047198F);
+ this.cog6l = new ModelRenderer(this, 16, 0);
+ this.cog6l.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog6l.setRotationPoint(-12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog6l.setTextureSize(64, 32);
+ this.cog6l.mirror = true;
+ this.setRotation(this.cog6l, 0.0F, 0.0F, -1.047198F);
+ this.cog6m = new ModelRenderer(this, 16, 0);
+ this.cog6m.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog6m.setRotationPoint(-12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog6m.setTextureSize(64, 32);
+ this.cog6m.mirror = true;
+ this.setRotation(this.cog6m, 0.5235988F, 0.0F, -1.047198F);
+ this.cog6n = new ModelRenderer(this, 16, 0);
+ this.cog6n.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog6n.setRotationPoint(-12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog6n.setTextureSize(64, 32);
+ this.cog6n.mirror = true;
+ this.setRotation(this.cog6n, 1.047198F, 0.0F, -1.047198F);
+ this.cog6o = new ModelRenderer(this, 16, 0);
+ this.cog6o.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog6o.setRotationPoint(-12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog6o.setTextureSize(64, 32);
+ this.cog6o.mirror = true;
+ this.setRotation(this.cog6o, -0.5235988F, 0.0F, -1.047198F);
+ this.cog6p = new ModelRenderer(this, 16, 0);
+ this.cog6p.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog6p.setRotationPoint(-12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog6p.setTextureSize(64, 32);
+ this.cog6p.mirror = true;
+ this.setRotation(this.cog6p, -1.047198F, 0.0F, -1.047198F);
+ this.cog6q = new ModelRenderer(this, 16, 0);
+ this.cog6q.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog6q.setRotationPoint(-12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog6q.setTextureSize(64, 32);
+ this.cog6q.mirror = true;
+ this.setRotation(this.cog6q, 0.5235988F, 0.0F, -1.047198F);
+ this.cog6r = new ModelRenderer(this, 16, 0);
+ this.cog6r.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog6r.setRotationPoint(-12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog6r.setTextureSize(64, 32);
+ this.cog6r.mirror = true;
+ this.setRotation(this.cog6r, 1.047198F, 0.0F, -1.047198F);
+ this.cog6s = new ModelRenderer(this, 16, 0);
+ this.cog6s.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog6s.setRotationPoint(-12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog6s.setTextureSize(64, 32);
+ this.cog6s.mirror = true;
+ this.setRotation(this.cog6s, -0.5235988F, 0.0F, -1.047198F);
+ this.cog6t = new ModelRenderer(this, 16, 0);
+ this.cog6t.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog6t.setRotationPoint(-12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog6t.setTextureSize(64, 32);
+ this.cog6t.mirror = true;
+ this.setRotation(this.cog6t, -1.047198F, 0.0F, -1.047198F);
+ this.cog7a = new ModelRenderer(this, 0, 22);
+ this.cog7a.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog7a.setRotationPoint(7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog7a.setTextureSize(64, 32);
+ this.cog7a.mirror = true;
+ this.setRotation(this.cog7a, 0.0F, 0.0F, 0.5235988F);
+ this.cog7b = new ModelRenderer(this, 0, 22);
+ this.cog7b.addBox(-2.0F, 3.0F, -3.0F, 4, 4, 6);
+ this.cog7b.setRotationPoint(7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog7b.setTextureSize(64, 32);
+ this.cog7b.mirror = true;
+ this.setRotation(this.cog7b, 0.0F, 0.0F, 0.5235988F);
+ this.cog7c = new ModelRenderer(this, 0, 22);
+ this.cog7c.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog7c.setRotationPoint(7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog7c.setTextureSize(64, 32);
+ this.cog7c.mirror = true;
+ this.setRotation(this.cog7c, ((float) Math.PI / 4F), 0.0F, 0.5235988F);
+ this.cog7d = new ModelRenderer(this, 0, 22);
+ this.cog7d.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog7d.setRotationPoint(7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog7d.setTextureSize(64, 32);
+ this.cog7d.mirror = true;
+ this.setRotation(this.cog7d, ((float) Math.PI / 2F), 0.0F, 0.5235988F);
+ this.cog7e = new ModelRenderer(this, 0, 22);
+ this.cog7e.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog7e.setRotationPoint(7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog7e.setTextureSize(64, 32);
+ this.cog7e.mirror = true;
+ this.setRotation(this.cog7e, 2.356194F, 0.0F, 0.5235988F);
+ this.cog7f = new ModelRenderer(this, 0, 22);
+ this.cog7f.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog7f.setRotationPoint(7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog7f.setTextureSize(64, 32);
+ this.cog7f.mirror = true;
+ this.setRotation(this.cog7f, -((float) Math.PI / 4F), 0.0F, 0.5235988F);
+ this.cog7g = new ModelRenderer(this, 0, 22);
+ this.cog7g.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog7g.setRotationPoint(7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog7g.setTextureSize(64, 32);
+ this.cog7g.mirror = true;
+ this.setRotation(this.cog7g, -((float) Math.PI / 2F), 0.0F, 0.5235988F);
+ this.cog7h = new ModelRenderer(this, 0, 22);
+ this.cog7h.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog7h.setRotationPoint(7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog7h.setTextureSize(64, 32);
+ this.cog7h.mirror = true;
+ this.setRotation(this.cog7h, -2.356194F, 0.0F, 0.5235988F);
+ this.cog7i = new ModelRenderer(this, 16, 0);
+ this.cog7i.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog7i.setRotationPoint(7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog7i.setTextureSize(64, 32);
+ this.cog7i.mirror = true;
+ this.setRotation(this.cog7i, ((float) Math.PI / 2F), 0.0F, 0.5235988F);
+ this.cog7j = new ModelRenderer(this, 16, 0);
+ this.cog7j.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog7j.setRotationPoint(7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog7j.setTextureSize(64, 32);
+ this.cog7j.mirror = true;
+ this.setRotation(this.cog7j, ((float) Math.PI / 2F), 0.0F, 0.5235988F);
+ this.cog7k = new ModelRenderer(this, 16, 0);
+ this.cog7k.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog7k.setRotationPoint(7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog7k.setTextureSize(64, 32);
+ this.cog7k.mirror = true;
+ this.setRotation(this.cog7k, 0.0F, 0.0F, 0.5235988F);
+ this.cog7l = new ModelRenderer(this, 16, 0);
+ this.cog7l.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog7l.setRotationPoint(7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog7l.setTextureSize(64, 32);
+ this.cog7l.mirror = true;
+ this.setRotation(this.cog7l, 0.0F, 0.0F, 0.5235988F);
+ this.cog7m = new ModelRenderer(this, 16, 0);
+ this.cog7m.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog7m.setRotationPoint(7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog7m.setTextureSize(64, 32);
+ this.cog7m.mirror = true;
+ this.setRotation(this.cog7m, 1.047198F, 0.0F, 0.5235988F);
+ this.cog7n = new ModelRenderer(this, 16, 0);
+ this.cog7n.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog7n.setRotationPoint(7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog7n.setTextureSize(64, 32);
+ this.cog7n.mirror = true;
+ this.setRotation(this.cog7n, 0.5235988F, 0.0F, 0.5235988F);
+ this.cog7o = new ModelRenderer(this, 16, 0);
+ this.cog7o.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog7o.setRotationPoint(7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog7o.setTextureSize(64, 32);
+ this.cog7o.mirror = true;
+ this.setRotation(this.cog7o, -0.5235988F, 0.0F, 0.5235988F);
+ this.cog7p = new ModelRenderer(this, 16, 0);
+ this.cog7p.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog7p.setRotationPoint(7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog7p.setTextureSize(64, 32);
+ this.cog7p.mirror = true;
+ this.setRotation(this.cog7p, -1.047198F, 0.0F, 0.5235988F);
+ this.cog7q = new ModelRenderer(this, 16, 0);
+ this.cog7q.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog7q.setRotationPoint(7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog7q.setTextureSize(64, 32);
+ this.cog7q.mirror = true;
+ this.setRotation(this.cog7q, 2.094395F, 0.0F, 0.5235988F);
+ this.cog7r = new ModelRenderer(this, 16, 0);
+ this.cog7r.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog7r.setRotationPoint(7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog7r.setTextureSize(64, 32);
+ this.cog7r.mirror = true;
+ this.setRotation(this.cog7r, 2.617994F, 0.0F, 0.5235988F);
+ this.cog7s = new ModelRenderer(this, 16, 0);
+ this.cog7s.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog7s.setRotationPoint(7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog7s.setTextureSize(64, 32);
+ this.cog7s.mirror = true;
+ this.setRotation(this.cog7s, 1.047198F, 0.0F, 0.5235988F);
+ this.cog7t = new ModelRenderer(this, 16, 0);
+ this.cog7t.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog7t.setRotationPoint(7.0F, -6.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog7t.setTextureSize(64, 32);
+ this.cog7t.mirror = true;
+ this.setRotation(this.cog7t, 0.5235988F, 0.0F, 0.5235988F);
+ this.cog8a = new ModelRenderer(this, 0, 22);
+ this.cog8a.addBox(-2.0F, 3.0F, -3.0F, 4, 4, 6);
+ this.cog8a.setRotationPoint(12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog8a.setTextureSize(64, 32);
+ this.cog8a.mirror = true;
+ this.setRotation(this.cog8a, 0.0F, 0.0F, 1.047198F);
+ this.cog8b = new ModelRenderer(this, 0, 22);
+ this.cog8b.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog8b.setRotationPoint(12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog8b.setTextureSize(64, 32);
+ this.cog8b.mirror = true;
+ this.setRotation(this.cog8b, ((float) Math.PI / 4F), 0.0F, 1.047198F);
+ this.cog8c = new ModelRenderer(this, 0, 22);
+ this.cog8c.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog8c.setRotationPoint(12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog8c.setTextureSize(64, 32);
+ this.cog8c.mirror = true;
+ this.setRotation(this.cog8c, ((float) Math.PI / 2F), 0.0F, 1.047198F);
+ this.cog8d = new ModelRenderer(this, 0, 22);
+ this.cog8d.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog8d.setRotationPoint(12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog8d.setTextureSize(64, 32);
+ this.cog8d.mirror = true;
+ this.setRotation(this.cog8d, 2.356194F, 0.0F, 1.047198F);
+ this.cog8e = new ModelRenderer(this, 0, 22);
+ this.cog8e.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog8e.setRotationPoint(12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog8e.setTextureSize(64, 32);
+ this.cog8e.mirror = true;
+ this.setRotation(this.cog8e, -((float) Math.PI / 4F), 0.0F, 1.047198F);
+ this.cog8f = new ModelRenderer(this, 0, 22);
+ this.cog8f.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog8f.setRotationPoint(12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog8f.setTextureSize(64, 32);
+ this.cog8f.mirror = true;
+ this.setRotation(this.cog8f, -((float) Math.PI / 2F), 0.0F, 1.047198F);
+ this.cog8g = new ModelRenderer(this, 0, 22);
+ this.cog8g.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog8g.setRotationPoint(12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog8g.setTextureSize(64, 32);
+ this.cog8g.mirror = true;
+ this.setRotation(this.cog8g, -2.356194F, 0.0F, 1.047198F);
+ this.cog8h = new ModelRenderer(this, 16, 0);
+ this.cog8h.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog8h.setRotationPoint(12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog8h.setTextureSize(64, 32);
+ this.cog8h.mirror = true;
+ this.setRotation(this.cog8h, ((float) Math.PI / 2F), 0.0F, 1.047198F);
+ this.cog8i = new ModelRenderer(this, 16, 0);
+ this.cog8i.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog8i.setRotationPoint(12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog8i.setTextureSize(64, 32);
+ this.cog8i.mirror = true;
+ this.setRotation(this.cog8i, 0.0F, 0.0F, 1.047198F);
+ this.cog8j = new ModelRenderer(this, 16, 0);
+ this.cog8j.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog8j.setRotationPoint(12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog8j.setTextureSize(64, 32);
+ this.cog8j.mirror = true;
+ this.setRotation(this.cog8j, ((float) Math.PI / 2F), 0.0F, 1.047198F);
+ this.cog8k = new ModelRenderer(this, 16, 0);
+ this.cog8k.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog8k.setRotationPoint(12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog8k.setTextureSize(64, 32);
+ this.cog8k.mirror = true;
+ this.setRotation(this.cog8k, 0.0F, 0.0F, 1.047198F);
+ this.cog8l = new ModelRenderer(this, 16, 0);
+ this.cog8l.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog8l.setRotationPoint(12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog8l.setTextureSize(64, 32);
+ this.cog8l.mirror = true;
+ this.setRotation(this.cog8l, 1.047198F, 0.0F, 1.047198F);
+ this.cog8m = new ModelRenderer(this, 16, 0);
+ this.cog8m.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog8m.setRotationPoint(12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog8m.setTextureSize(64, 32);
+ this.cog8m.mirror = true;
+ this.setRotation(this.cog8m, 0.5235988F, 0.0F, 1.047198F);
+ this.cog8n = new ModelRenderer(this, 16, 0);
+ this.cog8n.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog8n.setRotationPoint(12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog8n.setTextureSize(64, 32);
+ this.cog8n.mirror = true;
+ this.setRotation(this.cog8n, -0.5235988F, 0.0F, 1.047198F);
+ this.cog8o = new ModelRenderer(this, 16, 0);
+ this.cog8o.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog8o.setRotationPoint(12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog8o.setTextureSize(64, 32);
+ this.cog8o.mirror = true;
+ this.setRotation(this.cog8o, -1.047198F, 0.0F, 1.047198F);
+ this.cog8p = new ModelRenderer(this, 16, 0);
+ this.cog8p.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog8p.setRotationPoint(12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog8p.setTextureSize(64, 32);
+ this.cog8p.mirror = true;
+ this.setRotation(this.cog8p, 2.094395F, 0.0F, 1.047198F);
+ this.cog8q = new ModelRenderer(this, 16, 0);
+ this.cog8q.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog8q.setRotationPoint(12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog8q.setTextureSize(64, 32);
+ this.cog8q.mirror = true;
+ this.setRotation(this.cog8q, 2.617994F, 0.0F, 1.047198F);
+ this.cog8r = new ModelRenderer(this, 16, 0);
+ this.cog8r.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog8r.setRotationPoint(12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog8r.setTextureSize(64, 32);
+ this.cog8r.mirror = true;
+ this.setRotation(this.cog8r, -2.094395F, 0.0F, 1.047198F);
+ this.cog8s = new ModelRenderer(this, 16, 0);
+ this.cog8s.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog8s.setRotationPoint(12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog8s.setTextureSize(64, 32);
+ this.cog8s.mirror = true;
+ this.setRotation(this.cog8s, -2.617994F, 0.0F, 1.047198F);
+ this.cog8t = new ModelRenderer(this, 0, 22);
+ this.cog8t.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog8t.setRotationPoint(12.0F, -1.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog8t.setTextureSize(64, 32);
+ this.cog8t.mirror = true;
+ this.setRotation(this.cog8t, 0.0F, 0.0F, 1.047198F);
+ this.cog9a = new ModelRenderer(this, 0, 22);
+ this.cog9a.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog9a.setRotationPoint(-12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog9a.setTextureSize(64, 32);
+ this.cog9a.mirror = true;
+ this.setRotation(this.cog9a, ((float) Math.PI / 2F), 0.0F, -2.094395F);
+ this.cog9b = new ModelRenderer(this, 0, 22);
+ this.cog9b.addBox(-2.0F, 3.0F, -3.0F, 4, 4, 6);
+ this.cog9b.setRotationPoint(-12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog9b.setTextureSize(64, 32);
+ this.cog9b.mirror = true;
+ this.setRotation(this.cog9b, 0.0F, 0.0F, -2.094395F);
+ this.cog9c = new ModelRenderer(this, 0, 22);
+ this.cog9c.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog9c.setRotationPoint(-12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog9c.setTextureSize(64, 32);
+ this.cog9c.mirror = true;
+ this.setRotation(this.cog9c, 0.0F, 0.0F, -2.094395F);
+ this.cog9d = new ModelRenderer(this, 0, 22);
+ this.cog9d.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog9d.setRotationPoint(-12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog9d.setTextureSize(64, 32);
+ this.cog9d.mirror = true;
+ this.setRotation(this.cog9d, ((float) Math.PI / 4F), 0.0F, -2.094395F);
+ this.cog9e = new ModelRenderer(this, 0, 22);
+ this.cog9e.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog9e.setRotationPoint(-12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog9e.setTextureSize(64, 32);
+ this.cog9e.mirror = true;
+ this.setRotation(this.cog9e, 2.356194F, 0.0F, -2.094395F);
+ this.cog9f = new ModelRenderer(this, 0, 22);
+ this.cog9f.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog9f.setRotationPoint(-12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog9f.setTextureSize(64, 32);
+ this.cog9f.mirror = true;
+ this.setRotation(this.cog9f, -((float) Math.PI / 4F), 0.0F, -2.094395F);
+ this.cog9g = new ModelRenderer(this, 0, 22);
+ this.cog9g.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog9g.setRotationPoint(-12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog9g.setTextureSize(64, 32);
+ this.cog9g.mirror = true;
+ this.setRotation(this.cog9g, -((float) Math.PI / 2F), 0.0F, -2.094395F);
+ this.cog9h = new ModelRenderer(this, 0, 22);
+ this.cog9h.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog9h.setRotationPoint(-12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog9h.setTextureSize(64, 32);
+ this.cog9h.mirror = true;
+ this.setRotation(this.cog9h, -2.356194F, 0.0F, -2.094395F);
+ this.cog9i = new ModelRenderer(this, 16, 0);
+ this.cog9i.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog9i.setRotationPoint(-12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog9i.setTextureSize(64, 32);
+ this.cog9i.mirror = true;
+ this.setRotation(this.cog9i, ((float) Math.PI / 2F), 0.0F, -2.094395F);
+ this.cog9j = new ModelRenderer(this, 16, 0);
+ this.cog9j.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog9j.setRotationPoint(-12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog9j.setTextureSize(64, 32);
+ this.cog9j.mirror = true;
+ this.setRotation(this.cog9j, ((float) Math.PI / 2F), 0.0F, -2.094395F);
+ this.cog9k = new ModelRenderer(this, 16, 0);
+ this.cog9k.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog9k.setRotationPoint(-12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog9k.setTextureSize(64, 32);
+ this.cog9k.mirror = true;
+ this.setRotation(this.cog9k, 0.0F, 0.0F, -2.094395F);
+ this.cog9l = new ModelRenderer(this, 16, 0);
+ this.cog9l.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog9l.setRotationPoint(-12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog9l.setTextureSize(64, 32);
+ this.cog9l.mirror = true;
+ this.setRotation(this.cog9l, 0.0F, 0.0F, -2.094395F);
+ this.cog9m = new ModelRenderer(this, 16, 0);
+ this.cog9m.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog9m.setRotationPoint(-12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog9m.setTextureSize(64, 32);
+ this.cog9m.mirror = true;
+ this.setRotation(this.cog9m, 1.047198F, 0.0F, -2.094395F);
+ this.cog9n = new ModelRenderer(this, 16, 0);
+ this.cog9n.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog9n.setRotationPoint(-12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog9n.setTextureSize(64, 32);
+ this.cog9n.mirror = true;
+ this.setRotation(this.cog9n, 0.5235988F, 0.0F, -2.094395F);
+ this.cog9o = new ModelRenderer(this, 16, 0);
+ this.cog9o.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog9o.setRotationPoint(-12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog9o.setTextureSize(64, 32);
+ this.cog9o.mirror = true;
+ this.setRotation(this.cog9o, -0.5235988F, 0.0F, -2.094395F);
+ this.cog9p = new ModelRenderer(this, 16, 0);
+ this.cog9p.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog9p.setRotationPoint(-12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog9p.setTextureSize(64, 32);
+ this.cog9p.mirror = true;
+ this.setRotation(this.cog9p, -1.047198F, 0.0F, -2.094395F);
+ this.cog9q = new ModelRenderer(this, 16, 0);
+ this.cog9q.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog9q.setRotationPoint(-12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog9q.setTextureSize(64, 32);
+ this.cog9q.mirror = true;
+ this.setRotation(this.cog9q, 2.094395F, 0.0F, -2.094395F);
+ this.cog9r = new ModelRenderer(this, 16, 0);
+ this.cog9r.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog9r.setRotationPoint(-12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog9r.setTextureSize(64, 32);
+ this.cog9r.mirror = true;
+ this.setRotation(this.cog9r, 2.617994F, 0.0F, -2.094395F);
+ this.cog9s = new ModelRenderer(this, 16, 0);
+ this.cog9s.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog9s.setRotationPoint(-12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog9s.setTextureSize(64, 32);
+ this.cog9s.mirror = true;
+ this.setRotation(this.cog9s, -2.617994F, 0.0F, -2.094395F);
+ this.cog9t = new ModelRenderer(this, 16, 0);
+ this.cog9t.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog9t.setRotationPoint(-12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog9t.setTextureSize(64, 32);
+ this.cog9t.mirror = true;
+ this.setRotation(this.cog9t, -2.094395F, 0.0F, -2.094395F);
+ this.cog10a = new ModelRenderer(this, 0, 22);
+ this.cog10a.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog10a.setRotationPoint(-7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog10a.setTextureSize(64, 32);
+ this.cog10a.mirror = true;
+ this.setRotation(this.cog10a, 0.0F, 0.0F, -2.617994F);
+ this.cog10b = new ModelRenderer(this, 0, 22);
+ this.cog10b.addBox(-2.0F, 3.0F, -3.0F, 4, 4, 6);
+ this.cog10b.setRotationPoint(-7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog10b.setTextureSize(64, 32);
+ this.cog10b.mirror = true;
+ this.setRotation(this.cog10b, 0.0F, 0.0F, -2.617994F);
+ this.cog10c = new ModelRenderer(this, 0, 22);
+ this.cog10c.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog10c.setRotationPoint(-7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog10c.setTextureSize(64, 32);
+ this.cog10c.mirror = true;
+ this.setRotation(this.cog10c, ((float) Math.PI / 4F), 0.0F, -2.617994F);
+ this.cog10d = new ModelRenderer(this, 0, 22);
+ this.cog10d.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog10d.setRotationPoint(-7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog10d.setTextureSize(64, 32);
+ this.cog10d.mirror = true;
+ this.setRotation(this.cog10d, ((float) Math.PI / 2F), 0.0F, -2.617994F);
+ this.cog10e = new ModelRenderer(this, 0, 22);
+ this.cog10e.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog10e.setRotationPoint(-7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog10e.setTextureSize(64, 32);
+ this.cog10e.mirror = true;
+ this.setRotation(this.cog10e, 2.356194F, 0.0F, -2.617994F);
+ this.cog10f = new ModelRenderer(this, 0, 22);
+ this.cog10f.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog10f.setRotationPoint(-7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog10f.setTextureSize(64, 32);
+ this.cog10f.mirror = true;
+ this.setRotation(this.cog10f, -((float) Math.PI / 4F), 0.0F, -2.617994F);
+ this.cog10g = new ModelRenderer(this, 0, 22);
+ this.cog10g.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog10g.setRotationPoint(-7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog10g.setTextureSize(64, 32);
+ this.cog10g.mirror = true;
+ this.setRotation(this.cog10g, -((float) Math.PI / 2F), 0.0F, -2.617994F);
+ this.cog10h = new ModelRenderer(this, 0, 22);
+ this.cog10h.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog10h.setRotationPoint(-7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog10h.setTextureSize(64, 32);
+ this.cog10h.mirror = true;
+ this.setRotation(this.cog10h, -2.356194F, 0.0F, -2.617994F);
+ this.cog10i = new ModelRenderer(this, 16, 0);
+ this.cog10i.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog10i.setRotationPoint(-7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog10i.setTextureSize(64, 32);
+ this.cog10i.mirror = true;
+ this.setRotation(this.cog10i, ((float) Math.PI / 2F), 0.0F, -2.617994F);
+ this.cog10j = new ModelRenderer(this, 16, 0);
+ this.cog10j.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog10j.setRotationPoint(-7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog10j.setTextureSize(64, 32);
+ this.cog10j.mirror = true;
+ this.setRotation(this.cog10j, ((float) Math.PI / 2F), 0.0F, -2.617994F);
+ this.cog10k = new ModelRenderer(this, 16, 0);
+ this.cog10k.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog10k.setRotationPoint(-7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog10k.setTextureSize(64, 32);
+ this.cog10k.mirror = true;
+ this.setRotation(this.cog10k, 0.0F, 0.0F, -2.617994F);
+ this.cog10l = new ModelRenderer(this, 16, 0);
+ this.cog10l.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog10l.setRotationPoint(-7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog10l.setTextureSize(64, 32);
+ this.cog10l.mirror = true;
+ this.setRotation(this.cog10l, 0.0F, 0.0F, -2.617994F);
+ this.cog10m = new ModelRenderer(this, 16, 0);
+ this.cog10m.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog10m.setRotationPoint(-7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog10m.setTextureSize(64, 32);
+ this.cog10m.mirror = true;
+ this.setRotation(this.cog10m, 2.094395F, 0.0F, -2.617994F);
+ this.cog10n = new ModelRenderer(this, 16, 0);
+ this.cog10n.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog10n.setRotationPoint(-7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog10n.setTextureSize(64, 32);
+ this.cog10n.mirror = true;
+ this.setRotation(this.cog10n, 2.617994F, 0.0F, -2.617994F);
+ this.cog10o = new ModelRenderer(this, 16, 0);
+ this.cog10o.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog10o.setRotationPoint(-7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog10o.setTextureSize(64, 32);
+ this.cog10o.mirror = true;
+ this.setRotation(this.cog10o, -2.094395F, 0.0F, -2.617994F);
+ this.cog10p = new ModelRenderer(this, 16, 0);
+ this.cog10p.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog10p.setRotationPoint(-7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog10p.setTextureSize(64, 32);
+ this.cog10p.mirror = true;
+ this.setRotation(this.cog10p, -2.617994F, 0.0F, -2.617994F);
+ this.cog10q = new ModelRenderer(this, 16, 0);
+ this.cog10q.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog10q.setRotationPoint(-7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog10q.setTextureSize(64, 32);
+ this.cog10q.mirror = true;
+ this.setRotation(this.cog10q, 1.047198F, 0.0F, -2.617994F);
+ this.cog10r = new ModelRenderer(this, 16, 0);
+ this.cog10r.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog10r.setRotationPoint(-7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog10r.setTextureSize(64, 32);
+ this.cog10r.mirror = true;
+ this.setRotation(this.cog10r, 0.5235988F, 0.0F, -2.617994F);
+ this.cog10s = new ModelRenderer(this, 16, 0);
+ this.cog10s.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog10s.setRotationPoint(-7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog10s.setTextureSize(64, 32);
+ this.cog10s.mirror = true;
+ this.setRotation(this.cog10s, -0.5235988F, 0.0F, -2.617994F);
+ this.cog10t = new ModelRenderer(this, 16, 0);
+ this.cog10t.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog10t.setRotationPoint(-7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog10t.setTextureSize(64, 32);
+ this.cog10t.mirror = true;
+ this.setRotation(this.cog10t, -1.047198F, 0.0F, -2.617994F);
+ this.cog11a = new ModelRenderer(this, 0, 22);
+ this.cog11a.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog11a.setRotationPoint(12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog11a.setTextureSize(64, 32);
+ this.cog11a.mirror = true;
+ this.setRotation(this.cog11a, 0.0F, 0.0F, 2.094395F);
+ this.cog11b = new ModelRenderer(this, 0, 22);
+ this.cog11b.addBox(-2.0F, 3.0F, -3.0F, 4, 4, 6);
+ this.cog11b.setRotationPoint(12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog11b.setTextureSize(64, 32);
+ this.cog11b.mirror = true;
+ this.setRotation(this.cog11b, 0.0F, 0.0F, 2.094395F);
+ this.cog11c = new ModelRenderer(this, 0, 22);
+ this.cog11c.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog11c.setRotationPoint(12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog11c.setTextureSize(64, 32);
+ this.cog11c.mirror = true;
+ this.setRotation(this.cog11c, -((float) Math.PI / 4F), 0.0F, 2.094395F);
+ this.cog11d = new ModelRenderer(this, 0, 22);
+ this.cog11d.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog11d.setRotationPoint(12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog11d.setTextureSize(64, 32);
+ this.cog11d.mirror = true;
+ this.setRotation(this.cog11d, -((float) Math.PI / 2F), 0.0F, 2.094395F);
+ this.cog11e = new ModelRenderer(this, 0, 22);
+ this.cog11e.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog11e.setRotationPoint(12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog11e.setTextureSize(64, 32);
+ this.cog11e.mirror = true;
+ this.setRotation(this.cog11e, -2.356194F, 0.0F, 2.094395F);
+ this.cog11f = new ModelRenderer(this, 0, 22);
+ this.cog11f.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog11f.setRotationPoint(12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog11f.setTextureSize(64, 32);
+ this.cog11f.mirror = true;
+ this.setRotation(this.cog11f, ((float) Math.PI / 4F), 0.0F, 2.094395F);
+ this.cog11g = new ModelRenderer(this, 0, 22);
+ this.cog11g.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog11g.setRotationPoint(12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog11g.setTextureSize(64, 32);
+ this.cog11g.mirror = true;
+ this.setRotation(this.cog11g, ((float) Math.PI / 2F), 0.0F, 2.094395F);
+ this.cog11h = new ModelRenderer(this, 0, 22);
+ this.cog11h.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog11h.setRotationPoint(12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog11h.setTextureSize(64, 32);
+ this.cog11h.mirror = true;
+ this.setRotation(this.cog11h, 2.356194F, 0.0F, 2.094395F);
+ this.cog11i = new ModelRenderer(this, 16, 0);
+ this.cog11i.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog11i.setRotationPoint(12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog11i.setTextureSize(64, 32);
+ this.cog11i.mirror = true;
+ this.setRotation(this.cog11i, ((float) Math.PI / 2F), 0.0F, 2.094395F);
+ this.cog11j = new ModelRenderer(this, 16, 0);
+ this.cog11j.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog11j.setRotationPoint(12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog11j.setTextureSize(64, 32);
+ this.cog11j.mirror = true;
+ this.setRotation(this.cog11j, ((float) Math.PI / 2F), 0.0F, 2.094395F);
+ this.cog11k = new ModelRenderer(this, 16, 0);
+ this.cog11k.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog11k.setRotationPoint(12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog11k.setTextureSize(64, 32);
+ this.cog11k.mirror = true;
+ this.setRotation(this.cog11k, 0.0F, 0.0F, 2.094395F);
+ this.cog11l = new ModelRenderer(this, 16, 0);
+ this.cog11l.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog11l.setRotationPoint(12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog11l.setTextureSize(64, 32);
+ this.cog11l.mirror = true;
+ this.setRotation(this.cog11l, 0.0F, 0.0F, 2.094395F);
+ this.cog11m = new ModelRenderer(this, 16, 0);
+ this.cog11m.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog11m.setRotationPoint(12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog11m.setTextureSize(64, 32);
+ this.cog11m.mirror = true;
+ this.setRotation(this.cog11m, 0.5235988F, 0.0F, 2.094395F);
+ this.cog11n = new ModelRenderer(this, 16, 0);
+ this.cog11n.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog11n.setRotationPoint(12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog11n.setTextureSize(64, 32);
+ this.cog11n.mirror = true;
+ this.setRotation(this.cog11n, 1.047198F, 0.0F, 2.094395F);
+ this.cog11o = new ModelRenderer(this, 16, 0);
+ this.cog11o.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog11o.setRotationPoint(12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog11o.setTextureSize(64, 32);
+ this.cog11o.mirror = true;
+ this.setRotation(this.cog11o, -0.5235988F, 0.0F, 2.094395F);
+ this.cog11p = new ModelRenderer(this, 16, 0);
+ this.cog11p.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog11p.setRotationPoint(12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog11p.setTextureSize(64, 32);
+ this.cog11p.mirror = true;
+ this.setRotation(this.cog11p, -1.047198F, 0.0F, 2.094395F);
+ this.cog11q = new ModelRenderer(this, 16, 0);
+ this.cog11q.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog11q.setRotationPoint(12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog11q.setTextureSize(64, 32);
+ this.cog11q.mirror = true;
+ this.setRotation(this.cog11q, -2.094395F, 0.0F, 2.094395F);
+ this.cog11r = new ModelRenderer(this, 16, 0);
+ this.cog11r.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog11r.setRotationPoint(12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog11r.setTextureSize(64, 32);
+ this.cog11r.mirror = true;
+ this.setRotation(this.cog11r, -2.617994F, 0.0F, 2.094395F);
+ this.cog11s = new ModelRenderer(this, 16, 0);
+ this.cog11s.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog11s.setRotationPoint(12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog11s.setTextureSize(64, 32);
+ this.cog11s.mirror = true;
+ this.setRotation(this.cog11s, 2.617994F, 0.0F, 2.094395F);
+ this.cog11t = new ModelRenderer(this, 16, 0);
+ this.cog11t.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog11t.setRotationPoint(12.0F, 13.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog11t.setTextureSize(64, 32);
+ this.cog11t.mirror = true;
+ this.setRotation(this.cog11t, 2.094395F, 0.0F, 2.094395F);
+ this.cog12a = new ModelRenderer(this, 0, 22);
+ this.cog12a.addBox(-2.0F, 3.0F, -3.0F, 4, 4, 6);
+ this.cog12a.setRotationPoint(7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog12a.setTextureSize(64, 32);
+ this.cog12a.mirror = true;
+ this.setRotation(this.cog12a, 0.0F, 0.0F, -0.5235988F);
+ this.cog12b = new ModelRenderer(this, 0, 22);
+ this.cog12b.addBox(-2.0F, -7.0F, -3.0F, 4, 4, 6);
+ this.cog12b.setRotationPoint(7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog12b.setTextureSize(64, 32);
+ this.cog12b.mirror = true;
+ this.setRotation(this.cog12b, 0.0F, 0.0F, -0.5235988F);
+ this.cog12c = new ModelRenderer(this, 0, 22);
+ this.cog12c.addBox(-2.0F, 3.0F, -3.0F, 4, 4, 6);
+ this.cog12c.setRotationPoint(7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog12c.setTextureSize(64, 32);
+ this.cog12c.mirror = true;
+ this.setRotation(this.cog12c, -((float) Math.PI / 4F), 0.0F, -0.5235988F);
+ this.cog12d = new ModelRenderer(this, 0, 22);
+ this.cog12d.addBox(-2.0F, 3.0F, -3.0F, 4, 4, 6);
+ this.cog12d.setRotationPoint(7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog12d.setTextureSize(64, 32);
+ this.cog12d.mirror = true;
+ this.setRotation(this.cog12d, ((float) Math.PI / 2F), 0.0F, -0.5235988F);
+ this.cog12e = new ModelRenderer(this, 0, 22);
+ this.cog12e.addBox(-2.0F, 3.0F, -3.0F, 4, 4, 6);
+ this.cog12e.setRotationPoint(7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog12e.setTextureSize(64, 32);
+ this.cog12e.mirror = true;
+ this.setRotation(this.cog12e, -((float) Math.PI / 2F), 0.0F, -0.5235988F);
+ this.cog12f = new ModelRenderer(this, 0, 22);
+ this.cog12f.addBox(-2.0F, 3.0F, -3.0F, 4, 4, 6);
+ this.cog12f.setRotationPoint(7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog12f.setTextureSize(64, 32);
+ this.cog12f.mirror = true;
+ this.setRotation(this.cog12f, -2.356194F, 0.0F, -0.5235988F);
+ this.cog12g = new ModelRenderer(this, 0, 22);
+ this.cog12g.addBox(-2.0F, 3.0F, -3.0F, 4, 4, 6);
+ this.cog12g.setRotationPoint(7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog12g.setTextureSize(64, 32);
+ this.cog12g.mirror = true;
+ this.setRotation(this.cog12g, 2.356194F, 0.0F, -0.5235988F);
+ this.cog12h = new ModelRenderer(this, 0, 22);
+ this.cog12h.addBox(-2.0F, 3.0F, -3.0F, 4, 4, 6);
+ this.cog12h.setRotationPoint(7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog12h.setTextureSize(64, 32);
+ this.cog12h.mirror = true;
+ this.setRotation(this.cog12h, ((float) Math.PI / 4F), 0.0F, -0.5235988F);
+ this.cog12i = new ModelRenderer(this, 16, 0);
+ this.cog12i.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog12i.setRotationPoint(7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog12i.setTextureSize(64, 32);
+ this.cog12i.mirror = true;
+ this.setRotation(this.cog12i, ((float) Math.PI / 2F), 0.0F, 2.617994F);
+ this.cog12j = new ModelRenderer(this, 16, 0);
+ this.cog12j.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog12j.setRotationPoint(7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog12j.setTextureSize(64, 32);
+ this.cog12j.mirror = true;
+ this.setRotation(this.cog12j, ((float) Math.PI / 2F), 0.0F, 2.617994F);
+ this.cog12k = new ModelRenderer(this, 16, 0);
+ this.cog12k.addBox(-2.0F, -1.0F, 7.0F, 4, 2, 2);
+ this.cog12k.setRotationPoint(7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog12k.setTextureSize(64, 32);
+ this.cog12k.mirror = true;
+ this.setRotation(this.cog12k, 0.0F, 0.0F, 2.617994F);
+ this.cog12l = new ModelRenderer(this, 16, 0);
+ this.cog12l.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog12l.setRotationPoint(7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog12l.setTextureSize(64, 32);
+ this.cog12l.mirror = true;
+ this.setRotation(this.cog12l, 0.0F, 0.0F, 2.617994F);
+ this.cog12m = new ModelRenderer(this, 16, 0);
+ this.cog12m.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog12m.setRotationPoint(7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog12m.setTextureSize(64, 32);
+ this.cog12m.mirror = true;
+ this.setRotation(this.cog12m, 0.5235988F, 0.0F, 2.617994F);
+ this.cog12n = new ModelRenderer(this, 16, 0);
+ this.cog12n.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog12n.setRotationPoint(7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog12n.setTextureSize(64, 32);
+ this.cog12n.mirror = true;
+ this.setRotation(this.cog12n, 1.047198F, 0.0F, 2.617994F);
+ this.cog12o = new ModelRenderer(this, 16, 0);
+ this.cog12o.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog12o.setRotationPoint(7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog12o.setTextureSize(64, 32);
+ this.cog12o.mirror = true;
+ this.setRotation(this.cog12o, -0.5235988F, 0.0F, 2.617994F);
+ this.cog12p = new ModelRenderer(this, 16, 0);
+ this.cog12p.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog12p.setRotationPoint(7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog12p.setTextureSize(64, 32);
+ this.cog12p.mirror = true;
+ this.setRotation(this.cog12p, -1.047198F, 0.0F, 2.617994F);
+ this.cog12q = new ModelRenderer(this, 16, 0);
+ this.cog12q.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog12q.setRotationPoint(7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog12q.setTextureSize(64, 32);
+ this.cog12q.mirror = true;
+ this.setRotation(this.cog12q, -2.094395F, 0.0F, 2.617994F);
+ this.cog12r = new ModelRenderer(this, 16, 0);
+ this.cog12r.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog12r.setRotationPoint(7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog12r.setTextureSize(64, 32);
+ this.cog12r.mirror = true;
+ this.setRotation(this.cog12r, -2.617994F, 0.0F, 2.617994F);
+ this.cog12s = new ModelRenderer(this, 16, 0);
+ this.cog12s.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog12s.setRotationPoint(7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog12s.setTextureSize(64, 32);
+ this.cog12s.mirror = true;
+ this.setRotation(this.cog12s, 2.617994F, 0.0F, 2.617994F);
+ this.cog12t = new ModelRenderer(this, 16, 0);
+ this.cog12t.addBox(-2.0F, -1.0F, -9.0F, 4, 2, 2);
+ this.cog12t.setRotationPoint(7.0F, 18.0F + this.yRotationPoint, this.zRotationPoint);
+ this.cog12t.setTextureSize(64, 32);
+ this.cog12t.mirror = true;
+ this.setRotation(this.cog12t, 2.094395F, 0.0F, 2.617994F);
+ }
+
+ public void renderEye(Entity var1, float var2, float var3, float var4, float var5, float var6, float var7)
+ {
+ this.eye.render(var7);
+ }
+
+ /**
+ * Sets the models various rotation angles then renders the model.
+ */
+ public void render(Entity var1, float var2, float var3, float var4, float var5, float var6, float var7)
+ {
+ super.render(var1, var2, var3, var4, var5, var6, var7);
+ this.setRotationAngles(var2, var3, var4, var5, var6, var7, var1);
+ this.cog1a.render(var7);
+ this.cog1b.render(var7);
+ this.cog1c.render(var7);
+ this.cog1d.render(var7);
+ this.cog1e.render(var7);
+ this.cog1f.render(var7);
+ this.cog1g.render(var7);
+ this.cog1h.render(var7);
+ this.cog1i.render(var7);
+ this.cog1j.render(var7);
+ this.cog1k.render(var7);
+ this.cog1l.render(var7);
+ this.cog1m.render(var7);
+ this.cog1n.render(var7);
+ this.cog1o.render(var7);
+ this.cog1p.render(var7);
+ this.cog1q.render(var7);
+ this.cog1r.render(var7);
+ this.cog1s.render(var7);
+ this.cog1t.render(var7);
+ this.cog2a.render(var7);
+ this.cog2b.render(var7);
+ this.cog2c.render(var7);
+ this.cog2d.render(var7);
+ this.cog2e.render(var7);
+ this.cog2f.render(var7);
+ this.cog2g.render(var7);
+ this.cog2h.render(var7);
+ this.cog2i.render(var7);
+ this.cog2j.render(var7);
+ this.cog2k.render(var7);
+ this.cog2l.render(var7);
+ this.cog2m.render(var7);
+ this.cog2n.render(var7);
+ this.cog2o.render(var7);
+ this.cog2p.render(var7);
+ this.cog2q.render(var7);
+ this.cog2r.render(var7);
+ this.cog2s.render(var7);
+ this.cog2t.render(var7);
+ this.cog2u.render(var7);
+ this.cog3a.render(var7);
+ this.cog3b.render(var7);
+ this.cog3c.render(var7);
+ this.cog3d.render(var7);
+ this.cog3e.render(var7);
+ this.cog3f.render(var7);
+ this.cog3g.render(var7);
+ this.cog3h.render(var7);
+ this.cog3i.render(var7);
+ this.cog3j.render(var7);
+ this.cog3k.render(var7);
+ this.cog3l.render(var7);
+ this.cog3m.render(var7);
+ this.cog3n.render(var7);
+ this.cog3o.render(var7);
+ this.cog3p.render(var7);
+ this.cog3q.render(var7);
+ this.cog3r.render(var7);
+ this.cog3s.render(var7);
+ this.cog3t.render(var7);
+ this.cog4a.render(var7);
+ this.cog4b.render(var7);
+ this.cog4c.render(var7);
+ this.cog4d.render(var7);
+ this.cog4e.render(var7);
+ this.cog4f.render(var7);
+ this.cog4g.render(var7);
+ this.cog4h.render(var7);
+ this.cog4i.render(var7);
+ this.cog4j.render(var7);
+ this.cog4k.render(var7);
+ this.cog4l.render(var7);
+ this.cog4m.render(var7);
+ this.cog4n.render(var7);
+ this.cog4o.render(var7);
+ this.cog4p.render(var7);
+ this.cog4q.render(var7);
+ this.cog4r.render(var7);
+ this.cog4s.render(var7);
+ this.cog4t.render(var7);
+ this.cog5a.render(var7);
+ this.cog5b.render(var7);
+ this.cog5c.render(var7);
+ this.cog5d.render(var7);
+ this.cog5e.render(var7);
+ this.cog5f.render(var7);
+ this.cog5g.render(var7);
+ this.cog5h.render(var7);
+ this.cog5i.render(var7);
+ this.cog5j.render(var7);
+ this.cog5k.render(var7);
+ this.cog5l.render(var7);
+ this.cog5m.render(var7);
+ this.cog5n.render(var7);
+ this.cog5o.render(var7);
+ this.cog5p.render(var7);
+ this.cog5q.render(var7);
+ this.cog5r.render(var7);
+ this.cog5s.render(var7);
+ this.cog5t.render(var7);
+ this.cog6a.render(var7);
+ this.cog6b.render(var7);
+ this.cog6c.render(var7);
+ this.cog6d.render(var7);
+ this.cog6e.render(var7);
+ this.cog6f.render(var7);
+ this.cog6g.render(var7);
+ this.cog6h.render(var7);
+ this.cog6i.render(var7);
+ this.cog6j.render(var7);
+ this.cog6k.render(var7);
+ this.cog6l.render(var7);
+ this.cog6m.render(var7);
+ this.cog6n.render(var7);
+ this.cog6o.render(var7);
+ this.cog6p.render(var7);
+ this.cog6q.render(var7);
+ this.cog6r.render(var7);
+ this.cog6s.render(var7);
+ this.cog6t.render(var7);
+ this.cog7a.render(var7);
+ this.cog7b.render(var7);
+ this.cog7c.render(var7);
+ this.cog7d.render(var7);
+ this.cog7e.render(var7);
+ this.cog7f.render(var7);
+ this.cog7g.render(var7);
+ this.cog7h.render(var7);
+ this.cog7i.render(var7);
+ this.cog7j.render(var7);
+ this.cog7k.render(var7);
+ this.cog7l.render(var7);
+ this.cog7m.render(var7);
+ this.cog7n.render(var7);
+ this.cog7o.render(var7);
+ this.cog7p.render(var7);
+ this.cog7q.render(var7);
+ this.cog7r.render(var7);
+ this.cog7s.render(var7);
+ this.cog7t.render(var7);
+ this.cog8a.render(var7);
+ this.cog8b.render(var7);
+ this.cog8c.render(var7);
+ this.cog8d.render(var7);
+ this.cog8e.render(var7);
+ this.cog8f.render(var7);
+ this.cog8g.render(var7);
+ this.cog8h.render(var7);
+ this.cog8i.render(var7);
+ this.cog8j.render(var7);
+ this.cog8k.render(var7);
+ this.cog8l.render(var7);
+ this.cog8m.render(var7);
+ this.cog8n.render(var7);
+ this.cog8o.render(var7);
+ this.cog8p.render(var7);
+ this.cog8q.render(var7);
+ this.cog8r.render(var7);
+ this.cog8s.render(var7);
+ this.cog8t.render(var7);
+ this.cog9a.render(var7);
+ this.cog9b.render(var7);
+ this.cog9c.render(var7);
+ this.cog9d.render(var7);
+ this.cog9e.render(var7);
+ this.cog9f.render(var7);
+ this.cog9g.render(var7);
+ this.cog9h.render(var7);
+ this.cog9i.render(var7);
+ this.cog9j.render(var7);
+ this.cog9k.render(var7);
+ this.cog9l.render(var7);
+ this.cog9m.render(var7);
+ this.cog9n.render(var7);
+ this.cog9o.render(var7);
+ this.cog9p.render(var7);
+ this.cog9q.render(var7);
+ this.cog9r.render(var7);
+ this.cog9s.render(var7);
+ this.cog9t.render(var7);
+ this.cog10a.render(var7);
+ this.cog10b.render(var7);
+ this.cog10c.render(var7);
+ this.cog10d.render(var7);
+ this.cog10e.render(var7);
+ this.cog10f.render(var7);
+ this.cog10g.render(var7);
+ this.cog10h.render(var7);
+ this.cog10i.render(var7);
+ this.cog10j.render(var7);
+ this.cog10k.render(var7);
+ this.cog10l.render(var7);
+ this.cog10m.render(var7);
+ this.cog10n.render(var7);
+ this.cog10o.render(var7);
+ this.cog10p.render(var7);
+ this.cog10q.render(var7);
+ this.cog10r.render(var7);
+ this.cog10s.render(var7);
+ this.cog10t.render(var7);
+ this.cog11a.render(var7);
+ this.cog11b.render(var7);
+ this.cog11c.render(var7);
+ this.cog11d.render(var7);
+ this.cog11e.render(var7);
+ this.cog11f.render(var7);
+ this.cog11g.render(var7);
+ this.cog11h.render(var7);
+ this.cog11i.render(var7);
+ this.cog11j.render(var7);
+ this.cog11k.render(var7);
+ this.cog11l.render(var7);
+ this.cog11m.render(var7);
+ this.cog11n.render(var7);
+ this.cog11o.render(var7);
+ this.cog11p.render(var7);
+ this.cog11q.render(var7);
+ this.cog11r.render(var7);
+ this.cog11s.render(var7);
+ this.cog11t.render(var7);
+ this.cog12a.render(var7);
+ this.cog12b.render(var7);
+ this.cog12c.render(var7);
+ this.cog12d.render(var7);
+ this.cog12e.render(var7);
+ this.cog12f.render(var7);
+ this.cog12g.render(var7);
+ this.cog12h.render(var7);
+ this.cog12i.render(var7);
+ this.cog12j.render(var7);
+ this.cog12k.render(var7);
+ this.cog12l.render(var7);
+ this.cog12m.render(var7);
+ this.cog12n.render(var7);
+ this.cog12o.render(var7);
+ this.cog12p.render(var7);
+ this.cog12q.render(var7);
+ this.cog12r.render(var7);
+ this.cog12s.render(var7);
+ this.cog12t.render(var7);
+ }
+
+ private void setRotation(ModelRenderer var1, float var2, float var3, float var4)
+ {
+ var1.rotateAngleX = var2;
+ var1.rotateAngleY = var3;
+ var1.rotateAngleZ = var4;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/models/ModelMimic.java b/src/main/java/net/aetherteam/aether/client/models/ModelMimic.java
new file mode 100644
index 0000000..3a99033
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/models/ModelMimic.java
@@ -0,0 +1,44 @@
+package net.aetherteam.aether.client.models;
+
+import net.aetherteam.aether.entities.EntityMimic;
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelRenderer;
+
+public class ModelMimic extends ModelBase
+{
+ ModelRenderer box = new ModelRenderer(this, 0, 0);
+ ModelRenderer boxLid;
+ ModelRenderer leftLeg;
+ ModelRenderer rightLeg;
+
+ public ModelMimic()
+ {
+ this.box.addBox(-8.0F, 0.0F, -8.0F, 16, 10, 16);
+ this.box.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.boxLid = new ModelRenderer(this, 16, 10);
+ this.boxLid.addBox(0.0F, 0.0F, 0.0F, 16, 6, 16);
+ this.boxLid.setRotationPoint(-8.0F, 0.0F, 8.0F);
+ this.leftLeg = new ModelRenderer(this, 0, 0);
+ this.leftLeg.addBox(-3.0F, 0.0F, -3.0F, 6, 15, 6);
+ this.leftLeg.setRotationPoint(-4.0F, 9.0F, 0.0F);
+ this.rightLeg = new ModelRenderer(this, 0, 0);
+ this.rightLeg.addBox(-3.0F, 0.0F, -3.0F, 6, 15, 6);
+ this.rightLeg.setRotationPoint(4.0F, 9.0F, 0.0F);
+ }
+
+ public void render1(float var1, float var2, float var3, float var4, float var5, float var6, EntityMimic var7)
+ {
+ this.setRotationAngles(var1, var2, var3, var4, var5, var6, var7);
+ this.boxLid.rotateAngleX = (float) Math.PI - var7.mouth;
+ this.rightLeg.rotateAngleX = var7.legs;
+ this.leftLeg.rotateAngleX = -var7.legs;
+ this.box.render(var6);
+ }
+
+ public void render2(float var1, float var2, float var3, float var4, float var5, float var6, EntityMimic var7)
+ {
+ this.boxLid.render(var6);
+ this.leftLeg.render(var6);
+ this.rightLeg.render(var6);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/models/ModelMiniCloud.java b/src/main/java/net/aetherteam/aether/client/models/ModelMiniCloud.java
new file mode 100644
index 0000000..80eeb21
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/models/ModelMiniCloud.java
@@ -0,0 +1,62 @@
+package net.aetherteam.aether.client.models;
+
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+
+public class ModelMiniCloud extends ModelBase
+{
+ public ModelRenderer[] head;
+
+ public ModelMiniCloud()
+ {
+ this(0.0F);
+ }
+
+ public ModelMiniCloud(float var1)
+ {
+ this(var1, 0.0F);
+ }
+
+ public ModelMiniCloud(float var1, float var2)
+ {
+ this.head = new ModelRenderer[5];
+ this.head[0] = new ModelRenderer(this, 0, 0);
+ this.head[1] = new ModelRenderer(this, 36, 0);
+ this.head[2] = new ModelRenderer(this, 36, 0);
+ this.head[3] = new ModelRenderer(this, 36, 8);
+ this.head[4] = new ModelRenderer(this, 36, 8);
+ this.head[0].addBox(-4.5F, -4.5F, -4.5F, 9, 9, 9, var1);
+ this.head[0].setRotationPoint(0.0F, 0.0F + var2, 0.0F);
+ this.head[1].addBox(-3.5F, -3.5F, -5.5F, 7, 7, 1, var1);
+ this.head[1].setRotationPoint(0.0F, 0.0F + var2, 0.0F);
+ this.head[2].addBox(-3.5F, -3.5F, 4.5F, 7, 7, 1, var1);
+ this.head[2].setRotationPoint(0.0F, 0.0F + var2, 0.0F);
+ this.head[3].addBox(-5.5F, -3.5F, -3.5F, 1, 7, 7, var1);
+ this.head[3].setRotationPoint(0.0F, 0.0F + var2, 0.0F);
+ this.head[4].addBox(4.5F, -3.5F, -3.5F, 1, 7, 7, var1);
+ this.head[4].setRotationPoint(0.0F, 0.0F + var2, 0.0F);
+ }
+
+ /**
+ * Sets the models various rotation angles then renders the model.
+ */
+ public void render(Entity var1, float var2, float var3, float var4, float var5, float var6, float var7)
+ {
+ this.setRotationAngles(var2, var3, var4, var5, var6, var7);
+
+ for (int var8 = 0; var8 < 5; ++var8)
+ {
+ this.head[var8].render(var7);
+ }
+ }
+
+ public void setRotationAngles(float var1, float var2, float var3, float var4, float var5, float var6)
+ {
+ for (int var7 = 0; var7 < 5; ++var7)
+ {
+ this.head[var7].rotateAngleY = var4 / (180F / (float) Math.PI);
+ this.head[var7].rotateAngleX = var5 / (180F / (float) Math.PI);
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/models/ModelMoa.java b/src/main/java/net/aetherteam/aether/client/models/ModelMoa.java
new file mode 100644
index 0000000..ec25e96
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/models/ModelMoa.java
@@ -0,0 +1,131 @@
+package net.aetherteam.aether.client.models;
+
+import java.util.Random;
+
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.util.MathHelper;
+
+public class ModelMoa extends ModelBase
+{
+ public ModelRenderer head;
+ public ModelRenderer body;
+ public ModelRenderer legs;
+ public ModelRenderer legs2;
+ public ModelRenderer wings;
+ public ModelRenderer wings2;
+ public ModelRenderer jaw;
+ public ModelRenderer neck;
+ public ModelRenderer feather1;
+ public ModelRenderer feather2;
+ public ModelRenderer feather3;
+ public Random random;
+
+ public ModelMoa()
+ {
+ byte var1 = 16;
+ this.random = new Random();
+ this.head = new ModelRenderer(this, 0, 13);
+ this.head.addBox(-2.0F, -4.0F, -6.0F, 4, 4, 8, 0.0F);
+ this.head.setRotationPoint(0.0F, (float) (-8 + var1), -4.0F);
+ this.jaw = new ModelRenderer(this, 24, 13);
+ this.jaw.addBox(-2.0F, -1.0F, -6.0F, 4, 1, 8, -0.1F);
+ this.jaw.setRotationPoint(0.0F, (float) (-8 + var1), -4.0F);
+ this.body = new ModelRenderer(this, 0, 0);
+ this.body.addBox(-3.0F, -3.0F, 0.0F, 6, 8, 5, 0.0F);
+ this.body.setRotationPoint(0.0F, (float) (0 + var1), 0.0F);
+ this.legs = new ModelRenderer(this, 22, 0);
+ this.legs.addBox(-1.0F, -1.0F, -1.0F, 2, 9, 2);
+ this.legs.setRotationPoint(-2.0F, (float) (0 + var1), 1.0F);
+ this.legs2 = new ModelRenderer(this, 22, 0);
+ this.legs2.addBox(-1.0F, -1.0F, -1.0F, 2, 9, 2);
+ this.legs2.setRotationPoint(2.0F, (float) (0 + var1), 1.0F);
+ this.wings = new ModelRenderer(this, 52, 0);
+ this.wings.addBox(-1.0F, -0.0F, -1.0F, 1, 8, 4);
+ this.wings.setRotationPoint(-3.0F, (float) (-4 + var1), 0.0F);
+ this.wings2 = new ModelRenderer(this, 52, 0);
+ this.wings2.addBox(0.0F, -0.0F, -1.0F, 1, 8, 4);
+ this.wings2.setRotationPoint(3.0F, (float) (-4 + var1), 0.0F);
+ this.neck = new ModelRenderer(this, 44, 0);
+ this.neck.addBox(-1.0F, -6.0F, -1.0F, 2, 6, 2);
+ this.neck.setRotationPoint(0.0F, (float) (-2 + var1), -4.0F);
+ this.feather1 = new ModelRenderer(this, 30, 0);
+ this.feather1.addBox(-1.0F, -5.0F, 5.0F, 2, 1, 5, -0.3F);
+ this.feather1.setRotationPoint(0.0F, (float) (1 + var1), 1.0F);
+ this.feather2 = new ModelRenderer(this, 30, 0);
+ this.feather2.addBox(-1.0F, -5.0F, 5.0F, 2, 1, 5, -0.3F);
+ this.feather2.setRotationPoint(0.0F, (float) (1 + var1), 1.0F);
+ this.feather3 = new ModelRenderer(this, 30, 0);
+ this.feather3.addBox(-1.0F, -5.0F, 5.0F, 2, 1, 5, -0.3F);
+ this.feather3.setRotationPoint(0.0F, (float) (1 + var1), 1.0F);
+ this.feather1.rotationPointY += 0.5F;
+ this.feather2.rotationPointY += 0.5F;
+ this.feather3.rotationPointY += 0.5F;
+ }
+
+ /**
+ * Sets the models various rotation angles then renders the model.
+ */
+ public void render(Entity var1, float var2, float var3, float var4, float var5, float var6, float var7)
+ {
+ this.setRotationAngles(var2, var3, var4, var5, var6, var7);
+ this.head.render(var7);
+ this.jaw.render(var7);
+ this.body.render(var7);
+ this.legs.render(var7);
+ this.legs2.render(var7);
+ this.wings.render(var7);
+ this.wings2.render(var7);
+ this.neck.render(var7);
+ this.feather1.render(var7);
+ this.feather2.render(var7);
+ this.feather3.render(var7);
+ }
+
+ public void setRotationAngles(float var1, float var2, float var3, float var4, float var5, float var6)
+ {
+ float var7 = (float) Math.PI;
+ this.head.rotateAngleX = var5 / (180F / (float) Math.PI);
+ this.head.rotateAngleY = var4 / (180F / (float) Math.PI);
+ this.jaw.rotateAngleX = this.head.rotateAngleX;
+ this.jaw.rotateAngleY = this.head.rotateAngleY;
+ this.body.rotateAngleX = ((float) Math.PI / 2F);
+ this.legs.rotateAngleX = MathHelper.cos(var1 * 0.6662F) * 1.4F * var2;
+ this.legs2.rotateAngleX = MathHelper.cos(var1 * 0.6662F + (float) Math.PI) * 1.4F * var2;
+
+ if (var3 > 0.001F)
+ {
+ this.wings.rotationPointZ = -1.0F;
+ this.wings2.rotationPointZ = -1.0F;
+ this.wings.rotationPointY = 12.0F;
+ this.wings2.rotationPointY = 12.0F;
+ this.wings.rotateAngleX = 0.0F;
+ this.wings2.rotateAngleX = 0.0F;
+ this.wings.rotateAngleZ = var3;
+ this.wings2.rotateAngleZ = -var3;
+ this.legs.rotateAngleX = 0.6F;
+ this.legs2.rotateAngleX = 0.6F;
+ } else
+ {
+ this.wings.rotationPointZ = -3.0F;
+ this.wings2.rotationPointZ = -3.0F;
+ this.wings.rotationPointY = 14.0F;
+ this.wings2.rotationPointY = 14.0F;
+ this.wings.rotateAngleX = var7 / 2.0F;
+ this.wings2.rotateAngleX = var7 / 2.0F;
+ this.wings.rotateAngleZ = 0.0F;
+ this.wings2.rotateAngleZ = 0.0F;
+ }
+
+ this.feather1.rotateAngleY = -0.375F;
+ this.feather2.rotateAngleY = 0.0F;
+ this.feather3.rotateAngleY = 0.375F;
+ this.feather1.rotateAngleX = 0.25F;
+ this.feather2.rotateAngleX = 0.25F;
+ this.feather3.rotateAngleX = 0.25F;
+ this.neck.rotateAngleX = 0.0F;
+ this.neck.rotateAngleY = this.head.rotateAngleY;
+ this.jaw.rotateAngleX += 0.35F;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/models/ModelNewZephyr.java b/src/main/java/net/aetherteam/aether/client/models/ModelNewZephyr.java
new file mode 100644
index 0000000..bd4b876
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/models/ModelNewZephyr.java
@@ -0,0 +1,158 @@
+package net.aetherteam.aether.client.models;
+
+import net.aetherteam.aether.entities.EntityNewZephyr;
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.util.MathHelper;
+
+public class ModelNewZephyr extends ModelBase
+{
+ ModelRenderer mainbody;
+ ModelRenderer RBcloud;
+ ModelRenderer LBcloud;
+ ModelRenderer tail2;
+ ModelRenderer FRcloud;
+ ModelRenderer FLcloud;
+ ModelRenderer tail1;
+ ModelRenderer Shape1;
+ ModelRenderer Shape2;
+ ModelRenderer Shape3;
+ public float sinage;
+ public float sinage2;
+
+ public ModelNewZephyr()
+ {
+ this.textureWidth = 64;
+ this.textureHeight = 64;
+ this.mainbody = new ModelRenderer(this, 0, 0);
+ this.mainbody.addBox(-6.0F, -4.0F, -7.0F, 12, 8, 14);
+ this.mainbody.setRotationPoint(0.0F, 10.0F, 0.0F);
+ this.mainbody.setTextureSize(64, 64);
+ this.mainbody.mirror = true;
+ this.setRotation(this.mainbody, 0.0F, 0.0F, 0.0F);
+ this.RBcloud = new ModelRenderer(this, 16, 22);
+ this.RBcloud.addBox(-7.0F, -2.0F, 0.0F, 2, 6, 6);
+ this.RBcloud.setRotationPoint(0.0F, 10.0F, 0.0F);
+ this.RBcloud.setTextureSize(64, 64);
+ this.RBcloud.mirror = true;
+ this.setRotation(this.RBcloud, 0.0F, 0.0F, 0.0F);
+ this.LBcloud = new ModelRenderer(this, 16, 22);
+ this.LBcloud.addBox(5.0F, -2.0F, 0.0F, 2, 6, 6);
+ this.LBcloud.setRotationPoint(0.0F, 10.0F, 0.0F);
+ this.LBcloud.setTextureSize(64, 64);
+ this.LBcloud.mirror = true;
+ this.setRotation(this.LBcloud, 0.0F, 0.0F, 0.0F);
+ this.LBcloud.mirror = false;
+ this.tail2 = new ModelRenderer(this, 32, 22);
+ this.tail2.addBox(-2.0F, -2.0F, -2.0F, 4, 4, 4);
+ this.tail2.setRotationPoint(0.0F, 10.0F, 19.0F);
+ this.tail2.setTextureSize(64, 64);
+ this.tail2.mirror = true;
+ this.setRotation(this.tail2, 0.0F, 0.0F, 0.0F);
+ this.FRcloud = new ModelRenderer(this, 0, 22);
+ this.FRcloud.addBox(-8.0F, -3.0F, -7.0F, 2, 6, 6);
+ this.FRcloud.setRotationPoint(0.0F, 10.0F, 0.0F);
+ this.FRcloud.setTextureSize(64, 64);
+ this.FRcloud.mirror = true;
+ this.setRotation(this.FRcloud, 0.0F, 0.0F, 0.0F);
+ this.FLcloud = new ModelRenderer(this, 0, 22);
+ this.FLcloud.addBox(6.0F, -3.0F, -7.0F, 2, 6, 6);
+ this.FLcloud.setRotationPoint(0.0F, 10.0F, 0.0F);
+ this.FLcloud.setTextureSize(64, 64);
+ this.FLcloud.mirror = true;
+ this.setRotation(this.FLcloud, 0.0F, 0.0F, 0.0F);
+ this.FLcloud.mirror = false;
+ this.tail1 = new ModelRenderer(this, 0, 34);
+ this.tail1.addBox(-3.0F, -3.0F, -3.0F, 6, 6, 6);
+ this.tail1.setRotationPoint(0.0F, 10.0F, 12.0F);
+ this.tail1.setTextureSize(64, 64);
+ this.tail1.mirror = true;
+ this.setRotation(this.tail1, 0.0F, 0.0F, 0.0F);
+ this.Shape1 = new ModelRenderer(this, 0, 1);
+ this.Shape1.addBox(-7.0F, 0.0F, -9.0F, 4, 4, 2);
+ this.Shape1.setRotationPoint(0.0F, 10.0F, 0.0F);
+ this.Shape1.setTextureSize(64, 64);
+ this.Shape1.mirror = true;
+ this.setRotation(this.Shape1, 0.0F, 0.0F, 0.0F);
+ this.Shape2 = new ModelRenderer(this, 0, 1);
+ this.Shape2.addBox(3.0F, 0.0F, -9.0F, 4, 4, 2);
+ this.Shape2.setRotationPoint(0.0F, 10.0F, 0.0F);
+ this.Shape2.setTextureSize(64, 64);
+ this.Shape2.mirror = true;
+ this.setRotation(this.Shape2, 0.0F, 0.0F, 0.0F);
+ this.Shape3 = new ModelRenderer(this, 0, 7);
+ this.Shape3.addBox(-3.0F, 3.0F, -8.0F, 6, 3, 1);
+ this.Shape3.setRotationPoint(0.0F, 10.0F, 0.0F);
+ this.Shape3.setTextureSize(64, 64);
+ this.Shape3.mirror = true;
+ this.setRotation(this.Shape3, 0.0F, 0.0F, 0.0F);
+ }
+
+ /**
+ * Sets the models various rotation angles then renders the model.
+ */
+ public void render(Entity var1, float var2, float var3, float var4, float var5, float var6, float var7)
+ {
+ super.render(var1, var2, var3, var4, var5, var6, var7);
+ this.setRotationAngles(var2, var3, var4, var5, var6, var7, var1);
+ this.mainbody.render(var7);
+ this.RBcloud.render(var7);
+ this.LBcloud.render(var7);
+ this.tail2.render(var7);
+ this.FRcloud.render(var7);
+ this.FLcloud.render(var7);
+ this.tail1.render(var7);
+ this.Shape1.render(var7);
+ this.Shape2.render(var7);
+ this.Shape3.render(var7);
+ }
+
+ private void setRotation(ModelRenderer var1, float var2, float var3, float var4)
+ {
+ var1.rotateAngleX = var2;
+ var1.rotateAngleY = var3;
+ var1.rotateAngleZ = var4;
+ }
+
+ /**
+ * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
+ * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
+ * "far" arms and legs can swing at most.
+ */
+ public void setRotationAngles(float var1, float var2, float var3, float var4, float var5, float var6, Entity var7)
+ {
+ super.setRotationAngles(var1, var2, var3, var4, var5, var6, var7);
+ float var8 = this.sinage2;
+ float var9 = 5.5F;
+ float var10 = (float) (Math.sin((double) (var1 * 20.0F) / (180D / Math.PI)) * (double) var2 * 0.5D);
+ float var11 = (float) Math.PI;
+ float var12 = var11 / 2.0F;
+ float var13 = var11 * 3.0F / 11.0F;
+ this.FRcloud.rotationPointY = var10 + 10.0F;
+ this.FLcloud.rotationPointX = var10 * 0.5F;
+ this.LBcloud.rotationPointY = 8.0F - var10 * 0.5F;
+ this.RBcloud.rotationPointY = 9.0F + var10 * 0.5F;
+ this.Shape2.rotationPointY = 10.0F - var10;
+ this.Shape2.rotationPointX = -var10 * 0.5F;
+ this.Shape1.rotationPointY = 10.0F + var10;
+ this.Shape1.rotationPointX = var10 * 0.5F;
+ this.tail1.rotationPointX = (float) (Math.sin((double) (var1 * 20.0F) / (180D / Math.PI)) * (double) var2 * 0.75D);
+ this.tail1.rotateAngleY = (float) Math.pow(0.9900000095367432D, -4.0D) * 1.0F * var11 / 4.0F * MathHelper.cos(-0.055F * var1 + var12);
+ this.tail1.rotationPointY = 10.0F - var10;
+ this.tail2.rotationPointX = (float) Math.pow(0.9900000095367432D, 1.0D) * 1.0F * var11 / 4.0F * MathHelper.cos(-0.055F * var1 + var12);
+ this.tail2.rotationPointY = 10.0F - var10 * 1.25F;
+ this.tail2.rotateAngleY = this.tail1.rotateAngleY + 0.25F;
+ this.Shape3.rotationPointY = (float) (8 + ((EntityNewZephyr) var7).attackTime + 1);
+ this.mainbody.rotationPointY = var8 + var9 + this.sinage * 2.0F;
+ this.RBcloud.rotationPointY = var8 + var9 + this.sinage * 2.0F;
+ this.LBcloud.rotationPointY = var8 + var9 + this.sinage * 2.0F;
+ this.tail2.rotationPointY = var8 + var9 + this.sinage * 2.0F;
+ this.FRcloud.rotationPointY = var8 + var9 + this.sinage * 2.0F;
+ this.FLcloud.rotationPointY = var8 + var9 + this.sinage * 2.0F;
+ this.tail1.rotationPointY = var8 + var9 + this.sinage * 2.0F;
+ this.Shape1.rotationPointY = var8 + var9 + this.sinage * 2.0F;
+ this.Shape2.rotationPointY = var8 + var9 + this.sinage * 2.0F;
+ this.Shape3.rotationPointY = var8 + var9 + this.sinage * 2.0F;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/models/ModelPhyg1.java b/src/main/java/net/aetherteam/aether/client/models/ModelPhyg1.java
new file mode 100644
index 0000000..a699564
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/models/ModelPhyg1.java
@@ -0,0 +1,13 @@
+package net.aetherteam.aether.client.models;
+
+import net.minecraft.client.model.ModelPig;
+
+public class ModelPhyg1 extends ModelPig
+{
+ public ModelPhyg1() {}
+
+ public ModelPhyg1(float var1)
+ {
+ super(var1);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/models/ModelPhyg2.java b/src/main/java/net/aetherteam/aether/client/models/ModelPhyg2.java
new file mode 100644
index 0000000..6cefe24
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/models/ModelPhyg2.java
@@ -0,0 +1,93 @@
+package net.aetherteam.aether.client.models;
+
+import net.aetherteam.aether.entities.mounts.EntityPhyg;
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+import org.lwjgl.opengl.GL11;
+
+public class ModelPhyg2 extends ModelBase
+{
+ private ModelRenderer leftWingInner = new ModelRenderer(this, 0, 0);
+ private ModelRenderer leftWingOuter = new ModelRenderer(this, 20, 0);
+ private ModelRenderer rightWingInner = new ModelRenderer(this, 0, 0);
+ private ModelRenderer rightWingOuter = new ModelRenderer(this, 40, 0);
+ public static EntityPhyg pig;
+
+ public ModelPhyg2()
+ {
+ this.leftWingInner.addBox(-1.0F, -8.0F, -4.0F, 2, 16, 8, 0.0F);
+ this.leftWingOuter.addBox(-1.0F, -8.0F, -4.0F, 2, 16, 8, 0.0F);
+ this.rightWingInner.addBox(-1.0F, -8.0F, -4.0F, 2, 16, 8, 0.0F);
+ this.rightWingOuter.addBox(-1.0F, -8.0F, -4.0F, 2, 16, 8, 0.0F);
+ this.rightWingOuter.rotateAngleY = (float) Math.PI;
+ }
+
+ /**
+ * Sets the models various rotation angles then renders the model.
+ */
+ public void render(Entity var1, float var2, float var3, float var4, float var5, float var6, float var7)
+ {
+ float var8;
+ float var9;
+ float var10;
+ float var11;
+ float var12;
+ float var13;
+
+ if (this.isChild)
+ {
+ var8 = 2.0F;
+ GL11.glPushMatrix();
+ GL11.glPopMatrix();
+ GL11.glScalef(1.0F / var8, 1.0F / var8, 1.0F / var8);
+ GL11.glTranslatef(0.0F, 24.0F * var7, 0.0F);
+ var9 = -((float) Math.acos((double) pig.wingFold));
+ var10 = 32.0F * pig.wingFold / 4.0F;
+ var11 = -32.0F * (float) Math.sqrt((double) (1.0F - pig.wingFold * pig.wingFold)) / 4.0F;
+ var12 = 0.0F;
+ var13 = var10 * (float) Math.cos((double) pig.wingAngle) - var11 * (float) Math.sin((double) pig.wingAngle);
+ float var14 = var10 * (float) Math.sin((double) pig.wingAngle) + var11 * (float) Math.cos((double) pig.wingAngle);
+ this.leftWingInner.setRotationPoint(4.0F + var13, var14 + 12.0F, var12);
+ this.rightWingInner.setRotationPoint(-4.0F - var13, var14 + 12.0F, var12);
+ var10 *= 3.0F;
+ var13 = var10 * (float) Math.cos((double) pig.wingAngle) - var11 * (float) Math.sin((double) pig.wingAngle);
+ var14 = var10 * (float) Math.sin((double) pig.wingAngle) + var11 * (float) Math.cos((double) pig.wingAngle);
+ this.leftWingOuter.setRotationPoint(4.0F + var13, var14 + 12.0F, var12);
+ this.rightWingOuter.setRotationPoint(-4.0F - var13, var14 + 12.0F, var12);
+ this.leftWingInner.rotateAngleZ = pig.wingAngle + var9 + ((float) Math.PI / 2F);
+ this.leftWingOuter.rotateAngleZ = pig.wingAngle - var9 + ((float) Math.PI / 2F);
+ this.rightWingInner.rotateAngleZ = -(pig.wingAngle + var9 - ((float) Math.PI / 2F));
+ this.rightWingOuter.rotateAngleZ = -(pig.wingAngle - var9 + ((float) Math.PI / 2F));
+ this.leftWingOuter.render(var7);
+ this.leftWingInner.render(var7);
+ this.rightWingOuter.render(var7);
+ this.rightWingInner.render(var7);
+ } else
+ {
+ var8 = -((float) Math.acos((double) pig.wingFold));
+ var9 = 32.0F * pig.wingFold / 4.0F;
+ var10 = -32.0F * (float) Math.sqrt((double) (1.0F - pig.wingFold * pig.wingFold)) / 4.0F;
+ var11 = 0.0F;
+ var12 = var9 * (float) Math.cos((double) pig.wingAngle) - var10 * (float) Math.sin((double) pig.wingAngle);
+ var13 = var9 * (float) Math.sin((double) pig.wingAngle) + var10 * (float) Math.cos((double) pig.wingAngle);
+ this.leftWingInner.setRotationPoint(4.0F + var12, var13 + 12.0F, var11);
+ this.rightWingInner.setRotationPoint(-4.0F - var12, var13 + 12.0F, var11);
+ var9 *= 3.0F;
+ var12 = var9 * (float) Math.cos((double) pig.wingAngle) - var10 * (float) Math.sin((double) pig.wingAngle);
+ var13 = var9 * (float) Math.sin((double) pig.wingAngle) + var10 * (float) Math.cos((double) pig.wingAngle);
+ this.leftWingOuter.setRotationPoint(4.0F + var12, var13 + 12.0F, var11);
+ this.rightWingOuter.setRotationPoint(-4.0F - var12, var13 + 12.0F, var11);
+ this.leftWingInner.rotateAngleZ = pig.wingAngle + var8 + ((float) Math.PI / 2F);
+ this.leftWingOuter.rotateAngleZ = pig.wingAngle - var8 + ((float) Math.PI / 2F);
+ this.rightWingInner.rotateAngleZ = -(pig.wingAngle + var8 - ((float) Math.PI / 2F));
+ this.rightWingOuter.rotateAngleZ = -(pig.wingAngle - var8 + ((float) Math.PI / 2F));
+ this.leftWingOuter.render(var7);
+ this.leftWingInner.render(var7);
+ this.rightWingOuter.render(var7);
+ this.rightWingInner.render(var7);
+ }
+ }
+
+ public void setRotationAngles(float var1, float var2, float var3, float var4, float var5, float var6) {}
+}
diff --git a/src/main/java/net/aetherteam/aether/client/models/ModelSentryGolem.java b/src/main/java/net/aetherteam/aether/client/models/ModelSentryGolem.java
new file mode 100644
index 0000000..4f80987
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/models/ModelSentryGolem.java
@@ -0,0 +1,168 @@
+package net.aetherteam.aether.client.models;
+
+import net.aetherteam.aether.entities.EntitySentryGolem;
+import net.minecraft.client.model.ModelBiped;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+
+public class ModelSentryGolem extends ModelBiped
+{
+ ModelRenderer LowerBody = new ModelRenderer(this);
+ ModelRenderer LeftArmHand;
+ ModelRenderer RightArmHand;
+ ModelRenderer SentryHead;
+ ModelRenderer SentryBody;
+ public boolean isDefault = false;
+ public byte armState = 2;
+ float armAngle = 0.0F;
+ float[] armsAngles = new float[]{1.0F, 1.0F, 0.5F, 0.5F};
+
+ public ModelSentryGolem()
+ {
+ this.textureWidth = 128;
+ this.textureHeight = 64;
+ this.bipedHead = new ModelRenderer(this, 0, 0);
+ this.bipedHead.addBox(-5.5F, -10.0F, -4.5F, 11, 8, 9);
+ this.bipedHead.setRotationPoint(0.0F, -2.0F, 0.0F);
+ this.bipedHead.setTextureSize(128, 64);
+ this.bipedHead.mirror = true;
+ this.setRotation(this.bipedHead, 0.0F, 0.0F, 0.0F);
+ this.bipedLeftLeg = new ModelRenderer(this, 42, 47);
+ this.bipedLeftLeg.addBox(-3.3F, 0.0F, -3.0F, 5, 11, 6);
+ this.bipedLeftLeg.setRotationPoint(4.0F, 13.0F, 0.0F);
+ this.bipedLeftLeg.setTextureSize(128, 64);
+ this.bipedLeftLeg.mirror = true;
+ this.setRotation(this.bipedLeftLeg, 0.0F, 0.0F, 0.0F);
+ this.bipedLeftArm = new ModelRenderer(this, 40, 3);
+ this.bipedLeftArm.addBox(3.0F, -1.0F, -3.0F, 4, 8, 6);
+ this.bipedLeftArm.setRotationPoint(8.0F, 0.0F, 0.0F);
+ this.bipedLeftArm.setTextureSize(128, 64);
+ this.bipedLeftArm.mirror = true;
+ this.setRotation(this.bipedLeftArm, 0.0F, 0.0F, 0.0F);
+ this.LowerBody = new ModelRenderer(this, 0, 50);
+ this.LowerBody.addBox(-6.0F, 6.0F, -4.5F, 12, 5, 9);
+ this.LowerBody.setRotationPoint(0.0F, 2.0F, 0.0F);
+ this.LowerBody.setTextureSize(128, 64);
+ this.LowerBody.mirror = true;
+ this.setRotation(this.LowerBody, 0.0F, 0.0F, 0.0F);
+ this.bipedRightLeg.mirror = true;
+ this.bipedRightLeg = new ModelRenderer(this, 42, 47);
+ this.bipedRightLeg.addBox(-1.633333F, 0.0F, -3.0F, 5, 11, 6);
+ this.bipedRightLeg.setRotationPoint(-4.0F, 13.0F, 0.0F);
+ this.bipedRightLeg.setTextureSize(128, 64);
+ this.bipedRightLeg.mirror = true;
+ this.setRotation(this.bipedRightLeg, 0.0F, 0.0F, 0.0F);
+ this.bipedRightLeg.mirror = false;
+ this.bipedBody = new ModelRenderer(this, 0, 17);
+ this.bipedBody.addBox(-8.0F, -4.0F, -5.5F, 16, 10, 11);
+ this.bipedBody.setRotationPoint(0.0F, 2.0F, 0.0F);
+ this.bipedBody.setTextureSize(128, 64);
+ this.bipedBody.mirror = true;
+ this.setRotation(this.bipedBody, 0.0F, 0.0F, 0.0F);
+ this.RightArmHand = new ModelRenderer(this, 54, 17);
+ this.RightArmHand.addBox(-5.0F, 6.0F, -3.5F, 5, 6, 7);
+ this.RightArmHand.setRotationPoint(-8.0F, 0.0F, 0.0F);
+ this.RightArmHand.setTextureSize(128, 64);
+ this.RightArmHand.mirror = true;
+ this.setRotation(this.RightArmHand, 0.0F, 0.0F, 0.0F);
+ this.RightArmHand.mirror = false;
+ this.bipedRightArm.mirror = true;
+ this.bipedRightArm = new ModelRenderer(this, 40, 3);
+ this.bipedRightArm.addBox(-7.0F, -1.0F, -3.0F, 4, 8, 6);
+ this.bipedRightArm.setRotationPoint(-8.0F, 0.0F, 0.0F);
+ this.bipedRightArm.setTextureSize(128, 64);
+ this.bipedRightArm.mirror = true;
+ this.setRotation(this.bipedRightArm, 0.0F, 0.0F, 0.0F);
+ this.bipedRightArm.mirror = false;
+ this.LeftArmHand = new ModelRenderer(this, 54, 17);
+ this.LeftArmHand.addBox(0.0F, 6.0F, -3.5F, 5, 6, 7);
+ this.LeftArmHand.setRotationPoint(8.0F, 0.0F, 0.0F);
+ this.LeftArmHand.setTextureSize(128, 64);
+ this.LeftArmHand.mirror = true;
+ this.setRotation(this.LeftArmHand, 0.0F, 0.0F, 0.0F);
+ this.SentryBody = new ModelRenderer(this, 64, 48);
+ this.SentryBody.addBox(-5.5F, -8.0F, -4.5F, 8, 8, 8);
+ this.SentryBody.setRotationPoint(1.5F, 4.0F, -12.0F);
+ this.SentryBody.setTextureSize(128, 64);
+ this.SentryBody.mirror = true;
+ this.setRotation(this.SentryBody, 0.0F, 0.0F, 0.0F);
+ this.SentryHead = new ModelRenderer(this, 64, 48);
+ this.SentryHead.addBox(-5.5F, -8.0F, -4.5F, 8, 8, 8);
+ this.SentryHead.setRotationPoint(1.5F, -11.0F, 0.0F);
+ this.SentryHead.setTextureSize(128, 64);
+ this.SentryHead.mirror = true;
+ this.setRotation(this.SentryHead, 0.0F, 0.0F, 0.0F);
+ }
+
+ /**
+ * Sets the models various rotation angles then renders the model.
+ */
+ public void render(Entity var1, float var2, float var3, float var4, float var5, float var6, float var7)
+ {
+ super.render(var1, var2, var3, var4, var5, var6, var7);
+ this.setRotationAngles(var2, var3, var4, var5, var6, var7, var1);
+ this.bipedBody.render(var7);
+ this.bipedLeftLeg.render(var7);
+ this.bipedLeftArm.render(var7);
+ this.LowerBody.render(var7);
+ this.bipedRightLeg.render(var7);
+ this.bipedBody.render(var7);
+ this.RightArmHand.render(var7);
+ this.bipedRightArm.render(var7);
+ this.LeftArmHand.render(var7);
+ this.SentryHead.render(var7);
+ this.SentryBody.render(var7);
+ this.SentryHead.isHidden = true;
+ this.SentryBody.isHidden = true;
+ }
+
+ private void setRotation(ModelRenderer var1, float var2, float var3, float var4)
+ {
+ var1.rotateAngleX = var2;
+ var1.rotateAngleY = var3;
+ var1.rotateAngleZ = var4;
+ }
+
+ /**
+ * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
+ * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
+ * "far" arms and legs can swing at most.
+ */
+ public void setRotationAngles(float var1, float var2, float var3, float var4, float var5, float var6, Entity var7)
+ {
+ super.setRotationAngles(var1, var2, var3, var4, var5, var6, var7);
+
+ if (var7 instanceof EntitySentryGolem)
+ {
+ EntitySentryGolem var8 = (EntitySentryGolem) var7;
+ this.armState = var8.getHandState();
+
+ if (var8.progress < this.armsAngles[this.armState])
+ {
+ var8.progress += 0.02F;
+ }
+
+ if (var8.progress > this.armsAngles[this.armState])
+ {
+ var8.progress -= 0.02F;
+ }
+
+ this.bipedRightArm.rotateAngleX = -3.0F * var8.progress;
+ this.bipedLeftArm.rotateAngleX = -3.0F * var8.progress;
+ this.bipedRightArm.rotateAngleY -= 0.3F * var8.progress;
+ this.bipedLeftArm.rotateAngleY += 0.3F * var8.progress;
+ this.bipedRightArm.rotateAngleZ += 0.3F * var8.progress;
+ this.bipedLeftArm.rotateAngleZ -= 0.3F * var8.progress;
+ }
+
+ this.RightArmHand.rotateAngleX = this.bipedRightArm.rotateAngleX;
+ this.RightArmHand.rotateAngleY = this.bipedRightArm.rotateAngleY;
+ this.RightArmHand.rotateAngleZ = this.bipedRightArm.rotateAngleZ;
+ this.LeftArmHand.rotateAngleX = this.bipedLeftArm.rotateAngleX;
+ this.LeftArmHand.rotateAngleY = this.bipedLeftArm.rotateAngleY;
+ this.LeftArmHand.rotateAngleZ = this.bipedLeftArm.rotateAngleZ;
+ this.LowerBody.rotateAngleX = this.bipedBody.rotateAngleX;
+ this.LowerBody.rotateAngleY = this.bipedBody.rotateAngleY;
+ this.LowerBody.rotateAngleZ = this.bipedBody.rotateAngleZ;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/models/ModelSentryGolemBoss.java b/src/main/java/net/aetherteam/aether/client/models/ModelSentryGolemBoss.java
new file mode 100644
index 0000000..17e46c5
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/models/ModelSentryGolemBoss.java
@@ -0,0 +1,122 @@
+package net.aetherteam.aether.client.models;
+
+import net.aetherteam.aether.entities.bosses.EntitySentryGuardian;
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+
+public class ModelSentryGolemBoss extends ModelBase
+{
+ ModelRenderer body;
+ ModelRenderer head;
+ ModelRenderer bottom;
+ ModelRenderer rightforearm;
+ ModelRenderer leftarm;
+ ModelRenderer rightarm;
+ ModelRenderer leftforearm;
+
+ public ModelSentryGolemBoss()
+ {
+ this.textureWidth = 128;
+ this.textureHeight = 128;
+ this.body = new ModelRenderer(this, 32, 4);
+ this.body.addBox(0.0F, 0.0F, 0.0F, 18, 20, 18);
+ this.body.setRotationPoint(-9.0F, -16.0F, -9.0F);
+ this.body.setTextureSize(128, 128);
+ this.body.mirror = true;
+ this.setRotation(this.body, 0.0F, 0.0F, 0.0F);
+ this.head = new ModelRenderer(this, 42, 48);
+ this.head.addBox(0.0F, 0.0F, 0.0F, 14, 8, 14);
+ this.head.setRotationPoint(-7.0F, -24.0F, -7.0F);
+ this.head.setTextureSize(128, 128);
+ this.head.mirror = true;
+ this.setRotation(this.head, 0.0F, 0.0F, 0.0F);
+ this.bottom = new ModelRenderer(this, 0, 42);
+ this.bottom.addBox(0.0F, 0.0F, 0.0F, 14, 6, 14);
+ this.bottom.setRotationPoint(-7.0F, 4.0F, -7.0F);
+ this.bottom.setTextureSize(128, 128);
+ this.bottom.mirror = true;
+ this.setRotation(this.bottom, 0.0F, 0.0F, 0.0F);
+ this.rightforearm = new ModelRenderer(this, 0, 90);
+ this.rightforearm.addBox(0.0F, 0.0F, 0.0F, 10, 18, 10);
+ this.rightforearm.setRotationPoint(9.0F, -5.0F, -5.5F);
+ this.rightforearm.setTextureSize(128, 128);
+ this.rightforearm.mirror = true;
+ this.setRotation(this.rightforearm, -0.4363323F, 0.0F, 0.0F);
+ this.leftarm = new ModelRenderer(this, 0, 0);
+ this.leftarm.addBox(0.0F, 0.0F, 0.0F, 8, 15, 8);
+ this.leftarm.setRotationPoint(-9.0F, -16.0F, 4.0F);
+ this.leftarm.setTextureSize(128, 128);
+ this.leftarm.mirror = true;
+ this.setRotation(this.leftarm, -((float) Math.PI * 2F / 9F), ((float) Math.PI / 2F), 0.0F);
+ this.rightarm = new ModelRenderer(this, 0, 0);
+ this.rightarm.addBox(0.0F, 0.0F, 0.0F, 8, 15, 8);
+ this.rightarm.setRotationPoint(9.0F, -16.0F, -4.0F);
+ this.rightarm.setTextureSize(128, 128);
+ this.rightarm.mirror = true;
+ this.setRotation(this.rightarm, -((float) Math.PI * 2F / 9F), -((float) Math.PI / 2F), 0.0F);
+ this.leftforearm = new ModelRenderer(this, 0, 62);
+ this.leftforearm.addBox(0.0F, 0.0F, 0.0F, 10, 17, 10);
+ this.leftforearm.setRotationPoint(-19.0F, -5.0F, -4.5F);
+ this.leftforearm.setTextureSize(128, 128);
+ this.leftforearm.mirror = true;
+ this.setRotation(this.leftforearm, -0.4363323F, 0.0F, 0.0F);
+ }
+
+ /**
+ * Sets the models various rotation angles then renders the model.
+ */
+ public void render(Entity var1, float var2, float var3, float var4, float var5, float var6, float var7)
+ {
+ super.render(var1, var2, var3, var4, var5, var6, var7);
+ this.setRotationAngles(var2, var3, var4, var5, var6, var7, var1);
+ this.body.render(var7);
+ this.head.render(var7);
+ this.bottom.render(var7);
+ this.rightforearm.render(var7);
+ this.leftarm.render(var7);
+ this.rightarm.render(var7);
+ this.leftforearm.render(var7);
+ }
+
+ private void setRotation(ModelRenderer var1, float var2, float var3, float var4)
+ {
+ var1.rotateAngleX = var2;
+ var1.rotateAngleY = var3;
+ var1.rotateAngleZ = var4;
+ }
+
+ /**
+ * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
+ * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
+ * "far" arms and legs can swing at most.
+ */
+ public void setRotationAngles(float var1, float var2, float var3, float var4, float var5, float var6, Entity var7)
+ {
+ super.setRotationAngles(var1, var2, var3, var4, var5, var6, var7);
+ this.leftforearm.rotateAngleX = this.leftarm.rotateAngleX + var2;
+ this.rightforearm.rotateAngleX = this.rightarm.rotateAngleX + var2;
+ }
+
+ /**
+ * Used for easily adding entity-dependent animations. The second and third float params here are the same second
+ * and third as in the setRotationAngles method.
+ */
+ public void setLivingAnimations(EntityLiving var1, float var2, float var3, float var4)
+ {
+ EntitySentryGuardian var5 = (EntitySentryGuardian) var1;
+ int var6 = var5.getAttackTimer();
+
+ if (var6 != 0)
+ {
+ this.leftforearm.rotateAngleX = 5.0F;
+ this.rightforearm.rotateAngleX = 5.0F;
+ }
+ }
+
+ private float func_78172_a(float var1, float var2)
+ {
+ return (Math.abs(var1 % var2 - var2 * 0.5F) - var2 * 0.25F) / (var2 * 0.25F);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/models/ModelSheepuff1.java b/src/main/java/net/aetherteam/aether/client/models/ModelSheepuff1.java
new file mode 100644
index 0000000..aaaf21c
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/models/ModelSheepuff1.java
@@ -0,0 +1,31 @@
+package net.aetherteam.aether.client.models;
+
+import net.minecraft.client.model.ModelQuadruped;
+import net.minecraft.client.model.ModelRenderer;
+
+public class ModelSheepuff1 extends ModelQuadruped
+{
+ public ModelSheepuff1()
+ {
+ super(12, 0.0F);
+ this.head = new ModelRenderer(this, 0, 0);
+ this.head.addBox(-3.0F, -4.0F, -4.0F, 6, 6, 6, 0.6F);
+ this.head.setRotationPoint(0.0F, 6.0F, -8.0F);
+ this.body = new ModelRenderer(this, 28, 8);
+ this.body.addBox(-4.0F, -10.0F, -7.0F, 8, 16, 6, 1.75F);
+ this.body.setRotationPoint(0.0F, 5.0F, 2.0F);
+ float var1 = 0.5F;
+ this.leg1 = new ModelRenderer(this, 0, 16);
+ this.leg1.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, var1);
+ this.leg1.setRotationPoint(-3.0F, 12.0F, 7.0F);
+ this.leg2 = new ModelRenderer(this, 0, 16);
+ this.leg2.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, var1);
+ this.leg2.setRotationPoint(3.0F, 12.0F, 7.0F);
+ this.leg3 = new ModelRenderer(this, 0, 16);
+ this.leg3.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, var1);
+ this.leg3.setRotationPoint(-3.0F, 12.0F, -5.0F);
+ this.leg4 = new ModelRenderer(this, 0, 16);
+ this.leg4.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, var1);
+ this.leg4.setRotationPoint(3.0F, 12.0F, -5.0F);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/models/ModelSheepuff2.java b/src/main/java/net/aetherteam/aether/client/models/ModelSheepuff2.java
new file mode 100644
index 0000000..8b244df
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/models/ModelSheepuff2.java
@@ -0,0 +1,18 @@
+package net.aetherteam.aether.client.models;
+
+import net.minecraft.client.model.ModelQuadruped;
+import net.minecraft.client.model.ModelRenderer;
+
+public class ModelSheepuff2 extends ModelQuadruped
+{
+ public ModelSheepuff2()
+ {
+ super(12, 0.0F);
+ this.head = new ModelRenderer(this, 0, 0);
+ this.head.addBox(-3.0F, -4.0F, -6.0F, 6, 6, 8, 0.0F);
+ this.head.setRotationPoint(0.0F, 6.0F, -8.0F);
+ this.body = new ModelRenderer(this, 28, 8);
+ this.body.addBox(-4.0F, -10.0F, -7.0F, 8, 16, 6, 0.0F);
+ this.body.setRotationPoint(0.0F, 5.0F, 2.0F);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/models/ModelSheepuff3.java b/src/main/java/net/aetherteam/aether/client/models/ModelSheepuff3.java
new file mode 100644
index 0000000..7536893
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/models/ModelSheepuff3.java
@@ -0,0 +1,31 @@
+package net.aetherteam.aether.client.models;
+
+import net.minecraft.client.model.ModelQuadruped;
+import net.minecraft.client.model.ModelRenderer;
+
+public class ModelSheepuff3 extends ModelQuadruped
+{
+ public ModelSheepuff3()
+ {
+ super(12, 0.0F);
+ this.head = new ModelRenderer(this, 0, 0);
+ this.head.addBox(-3.0F, -4.0F, -4.0F, 6, 6, 6, 0.6F);
+ this.head.setRotationPoint(0.0F, 6.0F, -8.0F);
+ this.body = new ModelRenderer(this, 28, 8);
+ this.body.addBox(-4.0F, -8.0F, -7.0F, 8, 16, 6, 3.75F);
+ this.body.setRotationPoint(0.0F, 5.0F, 2.0F);
+ float var1 = 0.5F;
+ this.leg1 = new ModelRenderer(this, 0, 16);
+ this.leg1.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, var1);
+ this.leg1.setRotationPoint(-3.0F, 12.0F, 7.0F);
+ this.leg2 = new ModelRenderer(this, 0, 16);
+ this.leg2.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, var1);
+ this.leg2.setRotationPoint(3.0F, 12.0F, 7.0F);
+ this.leg3 = new ModelRenderer(this, 0, 16);
+ this.leg3.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, var1);
+ this.leg3.setRotationPoint(-3.0F, 12.0F, -5.0F);
+ this.leg4 = new ModelRenderer(this, 0, 16);
+ this.leg4.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, var1);
+ this.leg4.setRotationPoint(3.0F, 12.0F, -5.0F);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/models/ModelSlider.java b/src/main/java/net/aetherteam/aether/client/models/ModelSlider.java
new file mode 100644
index 0000000..8082032
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/models/ModelSlider.java
@@ -0,0 +1,46 @@
+package net.aetherteam.aether.client.models;
+
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+import org.lwjgl.opengl.GL11;
+
+public class ModelSlider extends ModelBase
+{
+ public ModelRenderer head;
+
+ public ModelSlider()
+ {
+ this(0.0F);
+ }
+
+ public ModelSlider(float var1)
+ {
+ this(var1, 0.0F);
+ }
+
+ public ModelSlider(float var1, float var2)
+ {
+ this.head = new ModelRenderer(this, 0, 0);
+ this.head.addBox(-8.0F, -16.0F, -8.0F, 16, 16, 16, var1);
+ this.head.setRotationPoint(0.0F, 0.0F + var2, 0.0F);
+ }
+
+ /**
+ * Sets the models various rotation angles then renders the model.
+ */
+ public void render(Entity var1, float var2, float var3, float var4, float var5, float var6, float var7)
+ {
+ this.setRotationAngles(var2, var3, var4, var5, var6, var7);
+ GL11.glPushMatrix();
+ GL11.glScalef(2.0F, 2.0F, 2.0F);
+ this.head.render(var7);
+ GL11.glPopMatrix();
+ }
+
+ public void setRotationAngles(float var1, float var2, float var3, float var4, float var5, float var6)
+ {
+ this.head.rotateAngleY = 0.0F;
+ this.head.rotateAngleX = 0.0F;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/models/ModelSliderMimicHost.java b/src/main/java/net/aetherteam/aether/client/models/ModelSliderMimicHost.java
new file mode 100644
index 0000000..c28a5e3
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/models/ModelSliderMimicHost.java
@@ -0,0 +1,144 @@
+package net.aetherteam.aether.client.models;
+
+import net.aetherteam.aether.entities.bosses.EntitySliderHostMimic;
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.util.MathHelper;
+
+public class ModelSliderMimicHost extends ModelBase
+{
+ ModelRenderer body3;
+ ModelRenderer frontLeftLeg;
+ ModelRenderer frontRightLeg;
+ ModelRenderer backLeftLeg;
+ ModelRenderer backRightLeg;
+ ModelRenderer body;
+ ModelRenderer body2;
+ ModelRenderer body5;
+ ModelRenderer body4;
+ ModelRenderer body6;
+ ModelRenderer fakeBody;
+
+ public ModelSliderMimicHost()
+ {
+ this.textureWidth = 128;
+ this.textureHeight = 64;
+ this.fakeBody = new ModelRenderer(this, 0, 0);
+ this.fakeBody.addBox(0.0F, 0.0F, 0.0F, 32, 32, 32);
+ this.fakeBody.setRotationPoint(-16.0F, -8.0F, -16.0F);
+ this.fakeBody.setTextureSize(128, 64);
+ this.fakeBody.mirror = true;
+ this.setRotation(this.fakeBody, 0.0F, 0.0F, 0.0F);
+ this.body3 = new ModelRenderer(this, 21, 11);
+ this.body3.addBox(22.0F, 2.0F, 0.0F, 11, 11, 32);
+ this.body3.setRotationPoint(-17.0F, -10.0F, -16.0F);
+ this.body3.setTextureSize(128, 64);
+ this.body3.mirror = true;
+ this.frontLeftLeg = new ModelRenderer(this, 0, 0);
+ this.frontLeftLeg.addBox(0.0F, 0.0F, 0.0F, 6, 13, 6);
+ this.frontLeftLeg.setRotationPoint(10.0F, 11.0F, -16.0F);
+ this.frontLeftLeg.setTextureSize(128, 64);
+ this.frontLeftLeg.mirror = true;
+ this.setRotation(this.frontLeftLeg, 0.0F, 0.0F, 0.0F);
+ this.frontRightLeg = new ModelRenderer(this, 0, 0);
+ this.frontRightLeg.addBox(0.0F, 0.0F, 0.0F, 6, 13, 6);
+ this.frontRightLeg.setRotationPoint(-16.0F, 11.0F, -16.0F);
+ this.frontRightLeg.setTextureSize(128, 64);
+ this.frontRightLeg.mirror = true;
+ this.setRotation(this.frontRightLeg, 0.0F, 0.0F, 0.0F);
+ this.backLeftLeg = new ModelRenderer(this, 0, 0);
+ this.backLeftLeg.addBox(0.0F, 0.0F, 0.0F, 6, 13, 6);
+ this.backLeftLeg.setRotationPoint(10.0F, 11.0F, 10.0F);
+ this.backLeftLeg.setTextureSize(128, 64);
+ this.backLeftLeg.mirror = true;
+ this.setRotation(this.backLeftLeg, 0.0F, 0.0F, 0.0F);
+ this.backRightLeg = new ModelRenderer(this, 0, 0);
+ this.backRightLeg.addBox(0.0F, 0.0F, 0.0F, 6, 13, 6);
+ this.backRightLeg.setRotationPoint(-16.0F, 11.0F, 10.0F);
+ this.backRightLeg.setTextureSize(128, 64);
+ this.backRightLeg.mirror = true;
+ this.setRotation(this.backRightLeg, 0.0F, 0.0F, 0.0F);
+ this.body = new ModelRenderer(this, 0, 0);
+ this.body.addBox(0.0F, 2.0F, 0.0F, 32, 10, 32);
+ this.body.setRotationPoint(-16.0F, -20.0F, -16.0F);
+ this.body.setTextureSize(128, 64);
+ this.body.mirror = true;
+ this.setRotation(this.body, 0.0F, 0.0F, 0.0F);
+ this.body2 = new ModelRenderer(this, 58, 25);
+ this.body2.addBox(0.0F, 2.0F, 0.0F, 13, 11, 18);
+ this.body2.setRotationPoint(-6.0F, -10.0F, -2.0F);
+ this.body2.setTextureSize(128, 64);
+ this.body2.mirror = true;
+ this.setRotation(this.body2, 0.0F, 0.0F, 0.0F);
+ this.body5 = new ModelRenderer(this, 106, 42);
+ this.body5.addBox(0.0F, 2.0F, 0.0F, 10, 11, 1);
+ this.body5.setRotationPoint(-16.0F, -10.0F, 15.0F);
+ this.body5.setTextureSize(128, 64);
+ this.body5.mirror = true;
+ this.setRotation(this.body5, 0.0F, 0.0F, 0.0F);
+ this.body4 = new ModelRenderer(this, 0, 22);
+ this.body4.addBox(0.0F, 2.0F, 0.0F, 32, 10, 32);
+ this.body4.setRotationPoint(-16.0F, 1.0F, -16.0F);
+ this.body4.setTextureSize(128, 64);
+ this.body4.mirror = true;
+ this.setRotation(this.body4, 0.0F, 0.0F, 0.0F);
+ this.body6 = new ModelRenderer(this, 1, 11);
+ this.body6.addBox(0.0F, 2.0F, 0.0F, 10, 11, 31);
+ this.body6.setRotationPoint(-16.0F, -10.0F, -16.0F);
+ this.body6.setTextureSize(128, 64);
+ this.body6.mirror = true;
+ this.setRotation(this.body6, 0.0F, 0.0F, 0.0F);
+ }
+
+ /**
+ * Sets the models various rotation angles then renders the model.
+ */
+ public void render(Entity var1, float var2, float var3, float var4, float var5, float var6, float var7)
+ {
+ super.render(var1, var2, var3, var4, var5, var6, var7);
+ this.setRotationAngles(var2, var3, var4, var5, var6, var7, var1);
+
+ if (var1 instanceof EntitySliderHostMimic && !((EntitySliderHostMimic) var1).isAwake())
+ {
+ this.fakeBody.render(var7);
+ } else
+ {
+ this.body3.render(var7);
+ this.frontLeftLeg.render(var7);
+ this.frontRightLeg.render(var7);
+ this.backLeftLeg.render(var7);
+ this.backRightLeg.render(var7);
+ this.body.render(var7);
+ this.body2.render(var7);
+ this.body5.render(var7);
+ this.body4.render(var7);
+ this.body6.render(var7);
+ }
+ }
+
+ private void setRotation(ModelRenderer var1, float var2, float var3, float var4)
+ {
+ var1.rotateAngleX = var2;
+ var1.rotateAngleY = var3;
+ var1.rotateAngleZ = var4;
+ }
+
+ /**
+ * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
+ * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
+ * "far" arms and legs can swing at most.
+ */
+ public void setRotationAngles(float var1, float var2, float var3, float var4, float var5, float var6, Entity var7)
+ {
+ super.setRotationAngles(var1, var2, var3, var4, var5, var6, var7);
+ this.frontRightLeg.rotateAngleX = MathHelper.cos(var1 * 0.6662F) * 1.4F * var2;
+ this.frontLeftLeg.rotateAngleX = MathHelper.cos(var1 * 0.6662F + (float) Math.PI) * 1.4F * var2;
+ this.frontRightLeg.rotateAngleY = 0.0F;
+ this.frontLeftLeg.rotateAngleY = 0.0F;
+ this.backRightLeg.rotateAngleX = MathHelper.cos(var1 * 0.6662F) * 1.4F * var2;
+ this.backLeftLeg.rotateAngleX = MathHelper.cos(var1 * 0.6662F + (float) Math.PI) * 1.4F * var2;
+ this.backRightLeg.rotateAngleY = 0.0F;
+ this.backLeftLeg.rotateAngleY = 0.0F;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/models/ModelTempest.java b/src/main/java/net/aetherteam/aether/client/models/ModelTempest.java
new file mode 100644
index 0000000..9ca0138
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/models/ModelTempest.java
@@ -0,0 +1,136 @@
+package net.aetherteam.aether.client.models;
+
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.util.MathHelper;
+import org.lwjgl.opengl.GL11;
+
+public class ModelTempest extends ModelBase
+{
+ ModelRenderer main_body;
+ ModelRenderer RB_cloud;
+ ModelRenderer LB_cloud;
+ ModelRenderer tail_2;
+ ModelRenderer FR_cloud;
+ ModelRenderer FL_cloud;
+ ModelRenderer tail_1;
+ public float sinage;
+ public float sinage2;
+
+ public ModelTempest()
+ {
+ this.textureWidth = 64;
+ this.textureHeight = 64;
+ this.main_body = new ModelRenderer(this, 0, 0);
+ this.main_body.addBox(-6.0F, -4.0F, -7.0F, 12, 8, 14);
+ this.main_body.setRotationPoint(0.0F, 10.0F, 0.0F);
+ this.main_body.setTextureSize(64, 64);
+ this.main_body.mirror = true;
+ this.setRotation(this.main_body, 0.0F, 0.0F, 0.0F);
+ this.RB_cloud = new ModelRenderer(this, 16, 22);
+ this.RB_cloud.addBox(-8.0F, -2.0F, 0.0F, 2, 6, 6);
+ this.RB_cloud.setRotationPoint(0.0F, 10.0F, 0.0F);
+ this.RB_cloud.setTextureSize(64, 64);
+ this.RB_cloud.mirror = true;
+ this.setRotation(this.RB_cloud, 0.0F, 0.0F, 0.0F);
+ this.LB_cloud = new ModelRenderer(this, 16, 22);
+ this.LB_cloud.addBox(6.0F, -2.0F, 0.0F, 2, 6, 6);
+ this.LB_cloud.setRotationPoint(0.0F, 10.0F, 0.0F);
+ this.LB_cloud.setTextureSize(64, 64);
+ this.LB_cloud.mirror = true;
+ this.setRotation(this.LB_cloud, 0.0F, 0.0F, 0.0F);
+ this.LB_cloud.mirror = false;
+ this.tail_2 = new ModelRenderer(this, 32, 22);
+ this.tail_2.addBox(-2.0F, -2.0F, -2.0F, 4, 4, 4);
+ this.tail_2.setRotationPoint(0.0F, 10.0F, 19.0F);
+ this.tail_2.setTextureSize(64, 64);
+ this.tail_2.mirror = true;
+ this.setRotation(this.tail_2, 0.0F, 0.0F, 0.0F);
+ this.FR_cloud = new ModelRenderer(this, 0, 22);
+ this.FR_cloud.addBox(-8.0F, -3.0F, -7.0F, 2, 6, 6);
+ this.FR_cloud.setRotationPoint(0.0F, 10.0F, 0.0F);
+ this.FR_cloud.setTextureSize(64, 64);
+ this.FR_cloud.mirror = true;
+ this.setRotation(this.FR_cloud, 0.0F, 0.0F, 0.0F);
+ this.FL_cloud = new ModelRenderer(this, 0, 22);
+ this.FL_cloud.addBox(6.0F, -3.0F, -7.0F, 2, 6, 6);
+ this.FL_cloud.setRotationPoint(0.0F, 10.0F, 0.0F);
+ this.FL_cloud.setTextureSize(64, 64);
+ this.FL_cloud.mirror = true;
+ this.setRotation(this.FL_cloud, 0.0F, 0.0F, 0.0F);
+ this.FL_cloud.mirror = false;
+ this.tail_1 = new ModelRenderer(this, 0, 34);
+ this.tail_1.addBox(-3.0F, -3.0F, -3.0F, 6, 6, 6);
+ this.tail_1.setRotationPoint(0.0F, 10.0F, 12.0F);
+ this.tail_1.setTextureSize(64, 64);
+ this.tail_1.mirror = true;
+ this.setRotation(this.tail_1, 0.0F, 0.0F, 0.0F);
+ }
+
+ /**
+ * Sets the models various rotation angles then renders the model.
+ */
+ public void render(Entity var1, float var2, float var3, float var4, float var5, float var6, float var7)
+ {
+ super.render(var1, var2, var3, var4, var5, var6, var7);
+ this.setRotationAngles(var2, var3, var4, var5, var6, var7, var1);
+ this.main_body.render(var7);
+ this.RB_cloud.render(var7);
+ this.LB_cloud.render(var7);
+ this.FR_cloud.render(var7);
+ this.FL_cloud.render(var7);
+ GL11.glPushMatrix();
+ GL11.glEnable(GL11.GL_BLEND);
+ this.tail_1.render(var7);
+ this.tail_2.render(var7);
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glPopMatrix();
+ }
+
+ public void renderTransparentTail(Entity var1, float var2, float var3, float var4, float var5, float var6, float var7)
+ {
+ this.tail_1.render(var7);
+ this.tail_2.render(var7);
+ }
+
+ private void setRotation(ModelRenderer var1, float var2, float var3, float var4)
+ {
+ var1.rotateAngleX = var2;
+ var1.rotateAngleY = var3;
+ var1.rotateAngleZ = var4;
+ }
+
+ /**
+ * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
+ * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
+ * "far" arms and legs can swing at most.
+ */
+ public void setRotationAngles(float var1, float var2, float var3, float var4, float var5, float var6, Entity var7)
+ {
+ super.setRotationAngles(var1, var2, var3, var4, var5, var6, var7);
+ float var8 = this.sinage2;
+ float var9 = 7.5F;
+ float var10 = (float) (Math.sin((double) (var1 * 20.0F) / (180D / Math.PI)) * (double) this.sinage * 0.5D);
+ float var11 = (float) Math.PI;
+ float var12 = var11 / 2.0F;
+ float var13 = var11 * 3.0F / 11.0F;
+ this.FR_cloud.rotationPointY = var10 + 10.0F;
+ this.FL_cloud.rotationPointX = var10 * 0.5F;
+ this.LB_cloud.rotationPointY = 8.0F - var10 * 0.5F;
+ this.RB_cloud.rotationPointY = 9.0F + var10 * 0.5F;
+ this.tail_1.rotationPointX = (float) (Math.sin((double) (var1 * 20.0F) / (180D / Math.PI)) * (double) var2 * 0.75D);
+ this.tail_1.rotateAngleY = (float) Math.pow(0.9900000095367432D, -4.0D) * 1.0F * var11 / 4.0F * MathHelper.cos(-0.055F * var1 + var12);
+ this.tail_1.rotationPointY = 10.0F - var10;
+ this.tail_2.rotationPointX = (float) Math.pow(0.9900000095367432D, 1.0D) * 1.0F * var11 / 4.0F * MathHelper.cos(-0.055F * var1 + var12);
+ this.tail_2.rotationPointY = 10.0F - var10 * 1.25F;
+ this.tail_2.rotateAngleY = this.tail_1.rotateAngleY + 0.25F;
+ this.main_body.rotationPointY = var8 + var9 + this.sinage * 2.0F;
+ this.RB_cloud.rotationPointY = var8 + var9 + this.sinage * 2.0F;
+ this.LB_cloud.rotationPointY = var8 + var9 + this.sinage * 2.0F;
+ this.tail_2.rotationPointY = var8 + var9 + this.sinage * 2.0F;
+ this.FR_cloud.rotationPointY = var8 + var9 + this.sinage * 2.0F;
+ this.FL_cloud.rotationPointY = var8 + var9 + this.sinage * 2.0F;
+ this.tail_1.rotationPointY = var8 + var9 + this.sinage * 2.0F;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/models/ModelTempestBall.java b/src/main/java/net/aetherteam/aether/client/models/ModelTempestBall.java
new file mode 100644
index 0000000..ae58995
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/models/ModelTempestBall.java
@@ -0,0 +1,81 @@
+package net.aetherteam.aether.client.models;
+
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+
+public class ModelTempestBall extends ModelBase
+{
+ ModelRenderer Shape2;
+ ModelRenderer Shape21;
+ ModelRenderer Shape23;
+ ModelRenderer Shape24;
+
+ public ModelTempestBall()
+ {
+ this.textureWidth = 64;
+ this.textureHeight = 32;
+ this.Shape2 = new ModelRenderer(this, 0, 16);
+ this.Shape2.addBox(0.0F, 0.0F, 0.0F, 8, 8, 8);
+ this.Shape2.setRotationPoint(-3.0F, 1.0F, 1.0F);
+ this.Shape2.setTextureSize(64, 32);
+ this.Shape2.mirror = true;
+ this.setRotation(this.Shape2, 0.2602503F, 0.4833219F, -0.0743572F);
+ this.Shape21 = new ModelRenderer(this, 0, 0);
+ this.Shape21.addBox(0.0F, 0.0F, 0.0F, 8, 8, 8);
+ this.Shape21.setRotationPoint(9.0F, 2.0F, 7.0F);
+ this.Shape21.setTextureSize(64, 32);
+ this.Shape21.mirror = true;
+ this.setRotation(this.Shape21, 0.0F, -(float) Math.PI, -0.1745329F);
+ this.Shape23 = new ModelRenderer(this, 32, 0);
+ this.Shape23.addBox(0.0F, 0.0F, 0.0F, 8, 8, 8);
+ this.Shape23.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.Shape23.setTextureSize(64, 32);
+ this.Shape23.mirror = true;
+ this.setRotation(this.Shape23, 0.0F, -0.1745329F, -0.1745329F);
+ this.Shape24 = new ModelRenderer(this, 32, 16);
+ this.Shape24.addBox(0.0F, 0.0F, 0.0F, 8, 8, 8);
+ this.Shape24.setRotationPoint(0.0F, 0.0F, 0.0F);
+ this.Shape24.setTextureSize(64, 32);
+ this.Shape24.mirror = true;
+ this.setRotation(this.Shape24, 0.0F, 0.1115358F, 0.0F);
+ }
+
+ /**
+ * Sets the models various rotation angles then renders the model.
+ */
+ public void render(Entity var1, float var2, float var3, float var4, float var5, float var6, float var7)
+ {
+ super.render(var1, var2, var3, var4, var5, var6, var7);
+ this.setRotationAngles(var2, var3, var4, var5, var6, var7, var1);
+ this.Shape2.render(var7);
+ this.Shape21.render(var7);
+ this.Shape23.render(var7);
+ this.Shape24.render(var7);
+ }
+
+ public void render(Entity var1, float var2)
+ {
+ this.Shape2.render(var2);
+ this.Shape21.render(var2);
+ this.Shape23.render(var2);
+ this.Shape24.render(var2);
+ }
+
+ private void setRotation(ModelRenderer var1, float var2, float var3, float var4)
+ {
+ var1.rotateAngleX = var2;
+ var1.rotateAngleY = var3;
+ var1.rotateAngleZ = var4;
+ }
+
+ /**
+ * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
+ * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
+ * "far" arms and legs can swing at most.
+ */
+ public void setRotationAngles(float var1, float var2, float var3, float var4, float var5, float var6, Entity var7)
+ {
+ super.setRotationAngles(var1, var2, var3, var4, var5, var6, var7);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/models/ModelZephyr.java b/src/main/java/net/aetherteam/aether/client/models/ModelZephyr.java
new file mode 100644
index 0000000..ae6f352
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/models/ModelZephyr.java
@@ -0,0 +1,155 @@
+package net.aetherteam.aether.client.models;
+
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+import net.minecraft.util.MathHelper;
+
+public class ModelZephyr extends ModelBase
+{
+ ModelRenderer LeftFace;
+ ModelRenderer BodyRightSide2;
+ ModelRenderer Mouth;
+ ModelRenderer CloudButt;
+ ModelRenderer Tail3;
+ ModelRenderer RightFace;
+ ModelRenderer BodyLeftSide1;
+ ModelRenderer BodyLeftSide2;
+ ModelRenderer Body;
+ ModelRenderer BodyRightSide1;
+ ModelRenderer Tail1;
+ ModelRenderer Tail2;
+
+ public ModelZephyr()
+ {
+ this.textureWidth = 128;
+ this.textureHeight = 32;
+ this.setTextureOffset("Tail1.tail1", 96, 22);
+ this.setTextureOffset("Tail2.tail2", 80, 24);
+ this.setTextureOffset("Tail3.tail3", 84, 18);
+ this.Tail1 = new ModelRenderer(this, "Tail1");
+ this.Tail1.setRotationPoint(0.0F, 0.0F, 12.4F);
+ this.Tail1.addBox("tail1", -2.5F, -2.5F, -2.5F, 5, 5, 5);
+ this.Tail2 = new ModelRenderer(this, "Tail2");
+ this.Tail2.setRotationPoint(0.0F, 0.0F, 6.0F);
+ this.Tail2.addBox("tail2", -2.0F, -2.0F, -1.966667F, 4, 4, 4);
+ this.Tail3 = new ModelRenderer(this, "Tail3");
+ this.Tail3.setRotationPoint(0.0F, 0.0F, 5.0F);
+ this.Tail3.addBox(-1.5F, -1.5F, -1.5F, 3, 3, 3);
+ this.Tail1.addChild(this.Tail2);
+ this.Tail2.addChild(this.Tail3);
+ this.LeftFace = new ModelRenderer(this, 67, 11);
+ this.LeftFace.addBox(3.0F, -1.0F, -9.0F, 4, 6, 2);
+ this.LeftFace.setRotationPoint(0.0F, 8.0F, 0.0F);
+ this.LeftFace.setTextureSize(128, 32);
+ this.LeftFace.mirror = true;
+ this.setRotation(this.LeftFace, 0.0F, 0.0F, 0.0F);
+ this.BodyRightSide2 = new ModelRenderer(this, 25, 11);
+ this.BodyRightSide2.addBox(-2.0F, -3.333333F, -2.5F, 2, 6, 6);
+ this.BodyRightSide2.setRotationPoint(-5.5F, 9.0F, 2.0F);
+ this.BodyRightSide2.setTextureSize(128, 32);
+ this.BodyRightSide2.mirror = true;
+ this.setRotation(this.BodyRightSide2, 0.0F, 0.0F, 0.0F);
+ this.BodyRightSide2.mirror = false;
+ this.Mouth = new ModelRenderer(this, 66, 19);
+ this.Mouth.addBox(-3.0F, 1.0F, -8.0F, 6, 3, 1);
+ this.Mouth.setRotationPoint(0.0F, 8.0F, 0.0F);
+ this.Mouth.setTextureSize(128, 32);
+ this.Mouth.mirror = true;
+ this.setRotation(this.Mouth, 0.0F, 0.0F, 0.0F);
+ this.CloudButt = new ModelRenderer(this, 0, 0);
+ this.CloudButt.addBox(-6.0F, -3.0F, 0.0F, 8, 6, 2);
+ this.CloudButt.setRotationPoint(2.0F, 8.0F, 7.0F);
+ this.CloudButt.setTextureSize(128, 32);
+ this.CloudButt.mirror = true;
+ this.setRotation(this.CloudButt, 0.0F, 0.0F, 0.0F);
+ this.RightFace = new ModelRenderer(this, 67, 11);
+ this.RightFace.addBox(-7.0F, -1.0F, -9.0F, 4, 6, 2);
+ this.RightFace.setRotationPoint(0.0F, 8.0F, 0.0F);
+ this.RightFace.setTextureSize(128, 32);
+ this.RightFace.mirror = true;
+ this.setRotation(this.RightFace, 0.0F, 0.0F, 0.0F);
+ this.RightFace.mirror = false;
+ this.BodyLeftSide1 = new ModelRenderer(this, 0, 20);
+ this.BodyLeftSide1.addBox(0.0F, -3.0F, -3.0F, 2, 6, 6);
+ this.BodyLeftSide1.setRotationPoint(6.0F, 8.0F, -4.0F);
+ this.BodyLeftSide1.setTextureSize(128, 32);
+ this.BodyLeftSide1.mirror = true;
+ this.setRotation(this.BodyLeftSide1, 0.0F, 0.0F, 0.0F);
+ this.BodyLeftSide2 = new ModelRenderer(this, 25, 11);
+ this.BodyLeftSide2.addBox(0.0F, -3.333333F, -2.5F, 2, 6, 6);
+ this.BodyLeftSide2.setRotationPoint(5.5F, 9.0F, 2.0F);
+ this.BodyLeftSide2.setTextureSize(128, 32);
+ this.BodyLeftSide2.mirror = true;
+ this.setRotation(this.BodyLeftSide2, 0.0F, 0.0F, 0.0F);
+ this.Body = new ModelRenderer(this, 27, 9);
+ this.Body.addBox(-6.0F, -4.0F, -7.0F, 12, 9, 14);
+ this.Body.setRotationPoint(0.0F, 8.0F, 0.0F);
+ this.Body.setTextureSize(128, 32);
+ this.setRotation(this.Body, 0.0F, 0.0F, 0.0F);
+ this.BodyRightSide1 = new ModelRenderer(this, 0, 20);
+ this.BodyRightSide1.addBox(-2.0F, -3.0F, -3.0F, 2, 6, 6);
+ this.BodyRightSide1.setRotationPoint(-6.0F, 8.0F, -4.0F);
+ this.BodyRightSide1.setTextureSize(128, 32);
+ this.BodyRightSide1.mirror = true;
+ this.setRotation(this.BodyRightSide1, 0.0F, 0.0F, 0.0F);
+ this.BodyRightSide1.mirror = false;
+ }
+
+ /**
+ * Sets the models various rotation angles then renders the model.
+ */
+ public void render(Entity var1, float var2, float var3, float var4, float var5, float var6, float var7)
+ {
+ super.render(var1, var2, var3, var4, var5, var6, var7);
+ this.setRotationAngles(var2, var3, var4, var5, var6, var7, var1);
+ this.LeftFace.render(var7);
+ this.BodyRightSide2.render(var7);
+ this.Mouth.render(var7);
+ this.CloudButt.render(var7);
+ this.RightFace.render(var7);
+ this.BodyLeftSide1.render(var7);
+ this.BodyLeftSide2.render(var7);
+ this.Body.render(var7);
+ this.BodyRightSide1.render(var7);
+ this.Tail1.render(var7);
+ }
+
+ private void setRotation(ModelRenderer var1, float var2, float var3, float var4)
+ {
+ var1.rotateAngleX = var2;
+ var1.rotateAngleY = var3;
+ var1.rotateAngleZ = var4;
+ }
+
+ /**
+ * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
+ * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
+ * "far" arms and legs can swing at most.
+ */
+ public void setRotationAngles(float var1, float var2, float var3, float var4, float var5, float var6, Entity var7)
+ {
+ super.setRotationAngles(var1, var2, var3, var4, var5, var6, var7);
+ float var8 = (float) (Math.sin((double) (var1 * 20.0F) / (180D / Math.PI)) * (double) var2 * 0.5D);
+ float var9 = (float) Math.PI;
+ float var10 = var9 / 2.0F;
+ float var11 = var9 * 3.0F / 11.0F;
+ this.LeftFace.rotationPointY = var8 + 8.0F;
+ this.LeftFace.rotationPointX = var8 * 0.5F;
+ this.BodyLeftSide1.rotationPointY = 8.0F - var8 * 0.5F;
+ this.BodyLeftSide2.rotationPointY = 9.0F + var8 * 0.5F;
+ this.RightFace.rotationPointY = 8.0F - var8;
+ this.RightFace.rotationPointX = -var8 * 0.5F;
+ this.BodyRightSide1.rotationPointY = 8.0F - var8 * 0.5F;
+ this.BodyRightSide2.rotationPointY = 9.0F + var8 * 0.5F;
+ this.Tail1.rotationPointX = (float) (Math.sin((double) (var1 * 20.0F) / (180D / Math.PI)) * (double) var2 * 0.75D);
+ this.Tail1.rotateAngleY = (float) Math.pow(0.9900000095367432D, -4.0D) * 1.0F * var9 / 4.0F * MathHelper.cos(-0.055F * var1 + var10);
+ this.Tail1.rotationPointY = 8.0F - var8;
+ this.Tail2.rotationPointX = (float) Math.pow(0.9900000095367432D, 1.0D) * 1.0F * var9 / 4.0F * MathHelper.cos(-0.055F * var1 + var10);
+ this.Tail2.rotationPointY = var8 * 1.25F;
+ this.Tail2.rotateAngleY = this.Tail1.rotateAngleY + 0.25F;
+ this.Tail3.rotationPointX = (float) Math.pow(0.9900000095367432D, 2.0D) * 1.0F * var9 / 4.0F * MathHelper.cos(-0.055F * var1 + var10);
+ this.Tail3.rotationPointY = -var8;
+ this.Tail3.rotateAngleY = this.Tail2.rotateAngleY + 0.35F;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/models/ModelZephyroo.java b/src/main/java/net/aetherteam/aether/client/models/ModelZephyroo.java
new file mode 100644
index 0000000..f5eabf9
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/models/ModelZephyroo.java
@@ -0,0 +1,224 @@
+package net.aetherteam.aether.client.models;
+
+import net.aetherteam.aether.entities.EntityZephyroo;
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+
+public class ModelZephyroo extends ModelBase
+{
+ ModelRenderer LeftHand;
+ ModelRenderer LeftArm;
+ ModelRenderer LeftFoot;
+ ModelRenderer LeftLeg;
+ ModelRenderer LeftHip;
+ ModelRenderer LeftShoulder;
+ ModelRenderer TailBottom;
+ ModelRenderer Pouch;
+ ModelRenderer Snout;
+ ModelRenderer RightHip;
+ ModelRenderer RightLeg;
+ ModelRenderer RightFoot;
+ ModelRenderer RightShoulder;
+ ModelRenderer RightArm;
+ ModelRenderer RightHand;
+ ModelRenderer TailTop;
+ ModelRenderer EarLeft;
+ ModelRenderer Neck;
+ ModelRenderer EarRight;
+ ModelRenderer Head;
+ ModelRenderer Body;
+
+ public ModelZephyroo()
+ {
+ this.textureWidth = 128;
+ this.textureHeight = 64;
+ this.LeftHand = new ModelRenderer(this, 50, 50);
+ this.LeftHand.addBox(0.0F, 0.0F, 0.0F, 2, 1, 4);
+ this.LeftHand.setRotationPoint(5.0F, 10.5F, -10.5F);
+ this.LeftHand.setTextureSize(128, 64);
+ this.LeftHand.mirror = true;
+ this.setRotation(this.LeftHand, -0.3665191F, 0.0F, 0.0F);
+ this.LeftArm = new ModelRenderer(this, 40, 38);
+ this.LeftArm.addBox(0.0F, 0.0F, 0.0F, 2, 9, 2);
+ this.LeftArm.setRotationPoint(5.0F, 3.0F, -7.0F);
+ this.LeftArm.setTextureSize(128, 64);
+ this.LeftArm.mirror = true;
+ this.setRotation(this.LeftArm, -0.4363323F, 0.0F, 0.0F);
+ this.LeftFoot = new ModelRenderer(this, 29, 19);
+ this.LeftFoot.addBox(0.0F, 8.0F, -7.0F, 3, 2, 6);
+ this.LeftFoot.setRotationPoint(3.0F, 14.0F, 1.0F);
+ this.LeftFoot.setTextureSize(128, 64);
+ this.LeftFoot.mirror = true;
+ this.setRotation(this.LeftFoot, 0.0F, 0.0F, 0.0F);
+ this.LeftLeg = new ModelRenderer(this, 0, 0);
+ this.LeftLeg.addBox(0.0F, 0.0F, 0.0F, 3, 9, 3);
+ this.LeftLeg.setRotationPoint(3.0F, 14.0F, 1.0F);
+ this.LeftLeg.setTextureSize(128, 64);
+ this.LeftLeg.mirror = true;
+ this.setRotation(this.LeftLeg, -0.4363323F, 0.0F, 0.0F);
+ this.LeftHip = new ModelRenderer(this, 0, 41);
+ this.LeftHip.addBox(0.0F, 0.0F, 0.0F, 2, 7, 7);
+ this.LeftHip.setRotationPoint(4.0F, 8.0F, 0.5F);
+ this.LeftHip.setTextureSize(128, 64);
+ this.LeftHip.mirror = true;
+ this.setRotation(this.LeftHip, 0.0349066F, 0.0F, 0.0F);
+ this.LeftShoulder = new ModelRenderer(this, 40, 49);
+ this.LeftShoulder.addBox(0.0F, 0.0F, 0.0F, 2, 3, 3);
+ this.LeftShoulder.setRotationPoint(5.0F, 2.0F, -7.5F);
+ this.LeftShoulder.setTextureSize(128, 64);
+ this.LeftShoulder.mirror = true;
+ this.setRotation(this.LeftShoulder, 0.0349066F, 0.0F, 0.0F);
+ this.TailBottom = new ModelRenderer(this, 44, 25);
+ this.TailBottom.addBox(0.0F, 0.0F, 0.0F, 3, 9, 3);
+ this.TailBottom.setRotationPoint(-1.5F, 21.0F, 15.0F);
+ this.TailBottom.setTextureSize(128, 64);
+ this.TailBottom.mirror = true;
+ this.setRotation(this.TailBottom, 1.32645F, 0.0F, 0.0F);
+ this.Pouch = new ModelRenderer(this, 13, 0);
+ this.Pouch.addBox(0.0F, 0.0F, 0.0F, 9, 2, 8);
+ this.Pouch.setRotationPoint(-4.5F, 10.0F, -4.0F);
+ this.Pouch.setTextureSize(128, 64);
+ this.Pouch.mirror = true;
+ this.setRotation(this.Pouch, -((float) Math.PI / 4F), 0.0F, 0.0F);
+ this.Snout = new ModelRenderer(this, 0, 22);
+ this.Snout.addBox(0.0F, 0.0F, 0.0F, 4, 4, 9);
+ this.Snout.setRotationPoint(-2.0F, -2.0F, -14.5F);
+ this.Snout.setTextureSize(128, 64);
+ this.Snout.mirror = true;
+ this.setRotation(this.Snout, 0.3490659F, 0.0F, 0.0F);
+ this.RightHip = new ModelRenderer(this, 0, 41);
+ this.RightHip.addBox(0.0F, 0.0F, 0.0F, 2, 7, 7);
+ this.RightHip.setRotationPoint(-6.0F, 8.0F, 0.5F);
+ this.RightHip.setTextureSize(128, 64);
+ this.RightHip.mirror = true;
+ this.setRotation(this.RightHip, 0.0349066F, 0.0F, 0.0F);
+ this.RightLeg = new ModelRenderer(this, 0, 0);
+ this.RightLeg.addBox(0.0F, 0.0F, 0.0F, 3, 9, 3);
+ this.RightLeg.setRotationPoint(-6.0F, 14.0F, 1.0F);
+ this.RightLeg.setTextureSize(128, 64);
+ this.RightLeg.mirror = true;
+ this.setRotation(this.RightLeg, -0.4363323F, 0.0F, 0.0F);
+ this.RightFoot = new ModelRenderer(this, 29, 19);
+ this.RightFoot.addBox(0.0F, 8.0F, -7.0F, 3, 2, 6);
+ this.RightFoot.setRotationPoint(-6.0F, 14.0F, 1.0F);
+ this.RightFoot.setTextureSize(128, 64);
+ this.RightFoot.mirror = true;
+ this.setRotation(this.RightFoot, 0.0F, 0.0F, 0.0F);
+ this.RightShoulder = new ModelRenderer(this, 40, 49);
+ this.RightShoulder.addBox(0.0F, 0.0F, 0.0F, 2, 3, 3);
+ this.RightShoulder.setRotationPoint(-7.0F, 2.0F, -7.5F);
+ this.RightShoulder.setTextureSize(128, 64);
+ this.RightShoulder.mirror = true;
+ this.setRotation(this.RightShoulder, 0.0349066F, 0.0F, 0.0F);
+ this.RightArm = new ModelRenderer(this, 40, 38);
+ this.RightArm.addBox(0.0F, 0.0F, 0.0F, 2, 9, 2);
+ this.RightArm.setRotationPoint(-7.0F, 3.0F, -7.0F);
+ this.RightArm.setTextureSize(128, 64);
+ this.RightArm.mirror = true;
+ this.setRotation(this.RightArm, -0.4363323F, 0.0F, 0.0F);
+ this.RightHand = new ModelRenderer(this, 50, 50);
+ this.RightHand.addBox(0.0F, 0.0F, 0.0F, 2, 1, 4);
+ this.RightHand.setRotationPoint(-7.0F, 10.5F, -10.5F);
+ this.RightHand.setTextureSize(128, 64);
+ this.RightHand.mirror = true;
+ this.setRotation(this.RightHand, -0.3665191F, 0.0F, 0.0F);
+ this.TailTop = new ModelRenderer(this, 48, 37);
+ this.TailTop.addBox(0.0F, 0.0F, 0.0F, 3, 10, 3);
+ this.TailTop.setRotationPoint(-1.5F, 14.0F, 8.0F);
+ this.TailTop.setTextureSize(128, 64);
+ this.TailTop.mirror = true;
+ this.setRotation(this.TailTop, 0.8028515F, 0.0F, 0.0F);
+ this.EarLeft = new ModelRenderer(this, 0, 41);
+ this.EarLeft.addBox(0.0F, 0.0F, 0.0F, 1, 5, 2);
+ this.EarLeft.setRotationPoint(2.0F, -10.5F, -10.0F);
+ this.EarLeft.setTextureSize(128, 64);
+ this.EarLeft.mirror = true;
+ this.setRotation(this.EarLeft, 0.0F, 0.0F, 0.2443461F);
+ this.Neck = new ModelRenderer(this, 0, 14);
+ this.Neck.addBox(0.0F, 0.0F, 0.0F, 4, 3, 5);
+ this.Neck.setRotationPoint(-2.0F, 0.0F, -9.5F);
+ this.Neck.setTextureSize(128, 64);
+ this.Neck.mirror = true;
+ this.setRotation(this.Neck, 0.6108652F, 0.0F, 0.0F);
+ this.EarRight = new ModelRenderer(this, 0, 41);
+ this.EarRight.addBox(0.0F, 0.0F, 0.0F, 1, 5, 2);
+ this.EarRight.setRotationPoint(-3.0F, -10.0F, -10.0F);
+ this.EarRight.setTextureSize(128, 64);
+ this.EarRight.mirror = true;
+ this.setRotation(this.EarRight, 0.0F, 0.0F, -0.2617994F);
+ this.Head = new ModelRenderer(this, 26, 27);
+ this.Head.addBox(0.0F, 0.0F, 0.0F, 4, 3, 5);
+ this.Head.setRotationPoint(-2.0F, -6.0F, -11.0F);
+ this.Head.setTextureSize(128, 64);
+ this.Head.mirror = true;
+ this.setRotation(this.Head, 0.0F, 0.0F, 0.0F);
+ this.Body = new ModelRenderer(this, 0, 35);
+ this.Body.addBox(0.0F, 0.0F, 0.0F, 10, 9, 20);
+ this.Body.setRotationPoint(-5.0F, -2.0F, -4.0F);
+ this.Body.setTextureSize(128, 64);
+ this.Body.mirror = true;
+ this.setRotation(this.Body, -((float) Math.PI / 4F), 0.0F, 0.0F);
+ }
+
+ /**
+ * Sets the models various rotation angles then renders the model.
+ */
+ public void render(Entity var1, float var2, float var3, float var4, float var5, float var6, float var7)
+ {
+ super.render(var1, var2, var3, var4, var5, var6, var7);
+ this.setRotationAngles(var2, var3, var4, var5, var6, var7, var1);
+ this.LeftHand.render(var7);
+ this.LeftArm.render(var7);
+ this.LeftFoot.render(var7);
+ this.LeftLeg.render(var7);
+ this.LeftHip.render(var7);
+ this.LeftShoulder.render(var7);
+ this.TailBottom.render(var7);
+ this.Pouch.render(var7);
+ this.Snout.render(var7);
+ this.RightHip.render(var7);
+ this.RightLeg.render(var7);
+ this.RightFoot.render(var7);
+ this.RightShoulder.render(var7);
+ this.RightArm.render(var7);
+ this.RightHand.render(var7);
+ this.TailTop.render(var7);
+ this.EarLeft.render(var7);
+ this.Neck.render(var7);
+ this.EarRight.render(var7);
+ this.Head.render(var7);
+ this.Body.render(var7);
+ }
+
+ private void setRotation(ModelRenderer var1, float var2, float var3, float var4)
+ {
+ var1.rotateAngleX = var2;
+ var1.rotateAngleY = var3;
+ var1.rotateAngleZ = var4;
+ }
+
+ /**
+ * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
+ * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
+ * "far" arms and legs can swing at most.
+ */
+ public void setRotationAngles(float var1, float var2, float var3, float var4, float var5, float var6, Entity var7)
+ {
+ super.setRotationAngles(var1, var2, var3, var4, var5, var6, var7);
+
+ if (var7.motionX != 0.0D && var7.motionZ != 0.0D)
+ {
+ this.RightLeg.rotateAngleX = (float) Math.cos((double) (((EntityZephyroo) var7).getTimeTilJump() * 0.5F));
+ this.LeftLeg.rotateAngleX = (float) Math.cos((double) (((EntityZephyroo) var7).getTimeTilJump() * 0.5F));
+ this.RightFoot.rotateAngleX = this.RightLeg.rotateAngleX + 0.25F;
+ this.LeftFoot.rotateAngleX = this.RightLeg.rotateAngleX + 0.25F;
+ } else
+ {
+ this.RightLeg.rotateAngleX = 0.0F;
+ this.LeftLeg.rotateAngleX = 0.0F;
+ this.RightFoot.rotateAngleX = this.RightLeg.rotateAngleX + 0.25F;
+ this.LeftFoot.rotateAngleX = this.RightLeg.rotateAngleX + 0.25F;
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/renders/AetherEntityRenderers.java b/src/main/java/net/aetherteam/aether/client/renders/AetherEntityRenderers.java
new file mode 100644
index 0000000..9e1cb3d
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/renders/AetherEntityRenderers.java
@@ -0,0 +1,121 @@
+package net.aetherteam.aether.client.renders;
+
+import cpw.mods.fml.client.registry.RenderingRegistry;
+import net.aetherteam.aether.client.models.ModelAechorPlant;
+import net.aetherteam.aether.client.models.ModelAerbunny;
+import net.aetherteam.aether.client.models.ModelCarrionSprout;
+import net.aetherteam.aether.client.models.ModelCockatrice;
+import net.aetherteam.aether.client.models.ModelHostEye;
+import net.aetherteam.aether.client.models.ModelLabyrinthEye;
+import net.aetherteam.aether.client.models.ModelMimic;
+import net.aetherteam.aether.client.models.ModelMiniCloud;
+import net.aetherteam.aether.client.models.ModelMoa;
+import net.aetherteam.aether.client.models.ModelNewZephyr;
+import net.aetherteam.aether.client.models.ModelPhyg1;
+import net.aetherteam.aether.client.models.ModelPhyg2;
+import net.aetherteam.aether.client.models.ModelSentryGolem;
+import net.aetherteam.aether.client.models.ModelSentryGolemBoss;
+import net.aetherteam.aether.client.models.ModelSheepuff1;
+import net.aetherteam.aether.client.models.ModelSheepuff2;
+import net.aetherteam.aether.client.models.ModelSheepuff3;
+import net.aetherteam.aether.client.models.ModelSlider;
+import net.aetherteam.aether.client.models.ModelSliderMimicHost;
+import net.aetherteam.aether.client.models.ModelTempest;
+import net.aetherteam.aether.client.models.ModelZephyroo;
+import net.aetherteam.aether.client.renders.dungeon.RenderRewardItem;
+import net.aetherteam.aether.entities.EntityAechorPlant;
+import net.aetherteam.aether.entities.EntityAerwhale;
+import net.aetherteam.aether.entities.EntityAetherCoin;
+import net.aetherteam.aether.entities.EntityAetherLightning;
+import net.aetherteam.aether.entities.EntityBattleSentry;
+import net.aetherteam.aether.entities.EntityCarrionSprout;
+import net.aetherteam.aether.entities.EntityCloudParachute;
+import net.aetherteam.aether.entities.EntityCockatrice;
+import net.aetherteam.aether.entities.EntityColdLightningBolt;
+import net.aetherteam.aether.entities.EntityDartEnchanted;
+import net.aetherteam.aether.entities.EntityDartGolden;
+import net.aetherteam.aether.entities.EntityDartPoison;
+import net.aetherteam.aether.entities.EntityFloatingBlock;
+import net.aetherteam.aether.entities.EntityLightningKnife;
+import net.aetherteam.aether.entities.EntityMimic;
+import net.aetherteam.aether.entities.EntityNewZephyr;
+import net.aetherteam.aether.entities.EntityNotchWave;
+import net.aetherteam.aether.entities.EntityPoisonNeedle;
+import net.aetherteam.aether.entities.EntityProjectileSentry;
+import net.aetherteam.aether.entities.EntitySentry;
+import net.aetherteam.aether.entities.EntitySentryGolem;
+import net.aetherteam.aether.entities.EntitySheepuff;
+import net.aetherteam.aether.entities.EntityTNTPresent;
+import net.aetherteam.aether.entities.EntityTempest;
+import net.aetherteam.aether.entities.EntityTempestBall;
+import net.aetherteam.aether.entities.EntityTrackingGolem;
+import net.aetherteam.aether.entities.EntityZephyr;
+import net.aetherteam.aether.entities.EntityZephyrSnowball;
+import net.aetherteam.aether.entities.EntityZephyroo;
+import net.aetherteam.aether.entities.altar.EntityFakeItem;
+import net.aetherteam.aether.entities.bosses.EntityCog;
+import net.aetherteam.aether.entities.bosses.EntityHostEye;
+import net.aetherteam.aether.entities.bosses.EntityLabyrinthEye;
+import net.aetherteam.aether.entities.bosses.EntityMiniSlider;
+import net.aetherteam.aether.entities.bosses.EntitySentryGuardian;
+import net.aetherteam.aether.entities.bosses.EntitySlider;
+import net.aetherteam.aether.entities.bosses.EntitySliderHostMimic;
+import net.aetherteam.aether.entities.dungeon.EntityRewardItem;
+import net.aetherteam.aether.entities.mounts.EntityAerbunny;
+import net.aetherteam.aether.entities.mounts.EntityMoa;
+import net.aetherteam.aether.entities.mounts.EntityPhyg;
+import net.aetherteam.aether.entities.mounts.EntitySwet;
+import net.aetherteam.aether.oldcode.EntityMiniCloud;
+import net.minecraft.client.model.ModelSlime;
+import net.minecraft.client.renderer.entity.RenderLightningBolt;
+import net.minecraft.client.renderer.entity.RenderLiving;
+
+public class AetherEntityRenderers
+{
+ public static void registerEntityRenderers()
+ {
+ RenderingRegistry.registerEntityRenderingHandler(EntityAerwhale.class, new RenderAerwhale());
+ RenderingRegistry.registerEntityRenderingHandler(EntityZephyr.class, new RenderZephyr());
+ RenderingRegistry.registerEntityRenderingHandler(EntityZephyrSnowball.class, new RenderZephyrSnowball());
+ RenderingRegistry.registerEntityRenderingHandler(EntityPhyg.class, new RenderPhyg(new ModelPhyg1(), new ModelPhyg2(), 0.0F));
+ RenderingRegistry.registerEntityRenderingHandler(EntityAerbunny.class, new RenderAerbunny(new ModelAerbunny(), 0.3F));
+ RenderingRegistry.registerEntityRenderingHandler(EntitySheepuff.class, new RenderSheepuff(new ModelSheepuff1(), new ModelSheepuff2(), new ModelSheepuff3(), 0.7F));
+ RenderingRegistry.registerEntityRenderingHandler(EntityCloudParachute.class, new RenderCloudParachute());
+ RenderingRegistry.registerEntityRenderingHandler(EntityFloatingBlock.class, new RenderFloatingBlock());
+ RenderingRegistry.registerEntityRenderingHandler(EntityNotchWave.class, new RenderNotchWave(0.5F));
+ RenderingRegistry.registerEntityRenderingHandler(EntityCockatrice.class, new RenderCockatrice(new ModelCockatrice(), 1.0F));
+ RenderingRegistry.registerEntityRenderingHandler(EntityMoa.class, new RenderMoa(new ModelMoa(), 1.0F));
+ RenderingRegistry.registerEntityRenderingHandler(EntitySlider.class, new RenderSlider(new ModelSlider(0.0F, 12.0F), 1.5F));
+ RenderingRegistry.registerEntityRenderingHandler(EntityAechorPlant.class, new RenderAechorPlant(new ModelAechorPlant(), 0.3F));
+ RenderingRegistry.registerEntityRenderingHandler(EntityPoisonNeedle.class, new RenderPoisonNeedle());
+ RenderingRegistry.registerEntityRenderingHandler(EntityDartGolden.class, new RenderDartGolden());
+ RenderingRegistry.registerEntityRenderingHandler(EntityDartEnchanted.class, new RenderDartEnchanted());
+ RenderingRegistry.registerEntityRenderingHandler(EntityDartPoison.class, new RenderDartPoison());
+ RenderingRegistry.registerEntityRenderingHandler(EntityProjectileSentry.class, new RenderProjectileSentry());
+ RenderingRegistry.registerEntityRenderingHandler(EntitySentry.class, new RenderSentry(new ModelSlime(0), 0.2F));
+ RenderingRegistry.registerEntityRenderingHandler(EntityBattleSentry.class, new RenderBattleSentry(new ModelSlime(0), 0.2F));
+ RenderingRegistry.registerEntityRenderingHandler(EntityLightningKnife.class, new RenderLightningKnife());
+ RenderingRegistry.registerEntityRenderingHandler(EntityMimic.class, new RenderMimic(new ModelMimic(), 1.0F));
+ RenderingRegistry.registerEntityRenderingHandler(EntityMiniCloud.class, new RenderLiving(new ModelMiniCloud(0.0F, 20.0F), 0.35F));
+ RenderingRegistry.registerEntityRenderingHandler(EntityTNTPresent.class, new RenderTNTPresent());
+ RenderingRegistry.registerEntityRenderingHandler(EntityAetherLightning.class, new RenderLightningBolt());
+ RenderingRegistry.registerEntityRenderingHandler(EntitySwet.class, new RenderSwet(new ModelSlime(16), new ModelSlime(0), 0.3F));
+ RenderingRegistry.registerEntityRenderingHandler(EntityTrackingGolem.class, new RenderTrackingGolem(new ModelSentryGolem(), 1.0F));
+ RenderingRegistry.registerEntityRenderingHandler(EntitySentryGolem.class, new RenderSentryGolem(new ModelSentryGolem(), 1.0F));
+ RenderingRegistry.registerEntityRenderingHandler(EntitySentryGuardian.class, new RenderSentryGuardian(new ModelSentryGolemBoss(), 1.0F));
+ RenderingRegistry.registerEntityRenderingHandler(EntitySliderHostMimic.class, new RenderSliderHostMimic(new ModelSliderMimicHost(), 1.0F));
+ RenderingRegistry.registerEntityRenderingHandler(EntityHostEye.class, new RenderHostEye(new ModelHostEye(), 0.5F));
+ RenderingRegistry.registerEntityRenderingHandler(EntityMiniSlider.class, new RenderMiniSlider(new ModelHostEye(), 1.5F));
+ RenderingRegistry.registerEntityRenderingHandler(EntityAetherCoin.class, new RenderAetherCoin());
+ RenderingRegistry.registerEntityRenderingHandler(EntityCog.class, new RenderCog());
+ RenderingRegistry.registerEntityRenderingHandler(EntityLabyrinthEye.class, new RenderLabyrinthEye(new ModelLabyrinthEye(), 1.5F));
+ RenderingRegistry.registerEntityRenderingHandler(EntityCarrionSprout.class, new RenderCarrionSprout(new ModelCarrionSprout(), 0.5F));
+ RenderingRegistry.registerEntityRenderingHandler(EntityTempest.class, new RenderTempest(new ModelTempest()));
+ RenderingRegistry.registerEntityRenderingHandler(EntityTempestBall.class, new RenderTempestBall());
+ RenderingRegistry.registerEntityRenderingHandler(EntityNewZephyr.class, new RenderNewZephyr(new ModelNewZephyr()));
+ RenderingRegistry.registerEntityRenderingHandler(EntityZephyroo.class, new RenderZephyroo(new ModelZephyroo(), 1.0F));
+ RenderingRegistry.registerEntityRenderingHandler(EntityFakeItem.class, new RenderFakeItem());
+ RenderingRegistry.registerEntityRenderingHandler(EntityRewardItem.class, new RenderRewardItem());
+ RenderingRegistry.registerEntityRenderingHandler(EntityColdLightningBolt.class, new RenderColdLightning());
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/renders/AetherSkyProvider.java b/src/main/java/net/aetherteam/aether/client/renders/AetherSkyProvider.java
new file mode 100644
index 0000000..a5ba9b4
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/renders/AetherSkyProvider.java
@@ -0,0 +1,223 @@
+package net.aetherteam.aether.client.renders;
+
+import cpw.mods.fml.client.FMLClientHandler;
+import cpw.mods.fml.common.ObfuscationReflectionHelper;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.multiplayer.WorldClient;
+import net.minecraft.client.renderer.RenderGlobal;
+import net.minecraft.client.renderer.RenderHelper;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.Vec3;
+import net.minecraftforge.client.IRenderHandler;
+import org.lwjgl.opengl.GL11;
+
+@SideOnly(Side.CLIENT)
+public class AetherSkyProvider extends IRenderHandler
+{
+ private int glSkyList;
+ private int glSkyList2;
+ private int starGLCallList;
+ private boolean inited;
+
+ public AetherSkyProvider()
+ {
+ Minecraft var1 = FMLClientHandler.instance().getClient();
+ RenderGlobal var2 = var1.renderGlobal;
+
+ try
+ {
+ this.starGLCallList = ObfuscationReflectionHelper.getPrivateValue(RenderGlobal.class, var2, new String[]{"starGLCallList"});
+ this.glSkyList = ObfuscationReflectionHelper.getPrivateValue(RenderGlobal.class, var2, new String[]{"glSkyList"});
+ this.glSkyList2 = ObfuscationReflectionHelper.getPrivateValue(RenderGlobal.class, var2, new String[]{"glSkyList2"});
+ this.inited = true;
+ } catch (Exception var4)
+ {
+ this.inited = false;
+ }
+ }
+
+ public void render(float var1, WorldClient var2, Minecraft var3)
+ {
+ if (this.inited)
+ {
+ GL11.glDisable(GL11.GL_TEXTURE_2D);
+ Vec3 var4 = var2.getSkyColor(var3.renderViewEntity, var1);
+ float var5 = (float) var4.xCoord;
+ float var6 = (float) var4.yCoord;
+ float var7 = (float) var4.zCoord;
+ float var8;
+
+ if (var3.gameSettings.anaglyph)
+ {
+ float var9 = (var5 * 30.0F + var6 * 59.0F + var7 * 11.0F) / 100.0F;
+ float var10 = (var5 * 30.0F + var6 * 70.0F) / 100.0F;
+ var8 = (var5 * 30.0F + var7 * 70.0F) / 100.0F;
+ var5 = var9;
+ var6 = var10;
+ var7 = var8;
+ }
+
+ GL11.glColor3f(var5, var6, var7);
+ Tessellator var28 = Tessellator.instance;
+ GL11.glDepthMask(false);
+ GL11.glEnable(GL11.GL_FOG);
+ GL11.glColor3f(var5, var6, var7);
+ GL11.glCallList(this.glSkyList);
+ GL11.glDisable(GL11.GL_FOG);
+ GL11.glDisable(GL11.GL_ALPHA_TEST);
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ RenderHelper.disableStandardItemLighting();
+ float[] var25 = var2.provider.calcSunriseSunsetColors(var2.getCelestialAngle(var1), var1);
+ float var11;
+ float var13;
+ float var12;
+ float var14;
+ int var17;
+ float var18;
+ float var19;
+
+ if (var25 != null)
+ {
+ GL11.glDisable(GL11.GL_TEXTURE_2D);
+ GL11.glShadeModel(GL11.GL_SMOOTH);
+ GL11.glPushMatrix();
+ GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glRotatef(MathHelper.sin(var2.getCelestialAngleRadians(var1)) < 0.0F ? 180.0F : 0.0F, 0.0F, 0.0F, 1.0F);
+ GL11.glRotatef(90.0F, 0.0F, 0.0F, 1.0F);
+ var8 = var25[0];
+ var11 = var25[1];
+ var12 = var25[2];
+ float var15;
+
+ if (var3.gameSettings.anaglyph)
+ {
+ var13 = (var8 * 30.0F + var11 * 59.0F + var12 * 11.0F) / 100.0F;
+ var14 = (var8 * 30.0F + var11 * 70.0F) / 100.0F;
+ var15 = (var8 * 30.0F + var12 * 70.0F) / 100.0F;
+ var8 = var13;
+ var11 = var14;
+ var12 = var15;
+ }
+
+ var28.startDrawing(6);
+ var28.setColorRGBA_F(var8, var11, var12, var25[3]);
+ var28.addVertex(0.0D, 100.0D, 0.0D);
+ byte var16 = 16;
+ var28.setColorRGBA_F(var25[0], var25[1], var25[2], 0.0F);
+
+ for (var17 = 0; var17 <= var16; ++var17)
+ {
+ var15 = (float) var17 * (float) Math.PI * 2.0F / (float) var16;
+ var18 = MathHelper.sin(var15);
+ var19 = MathHelper.cos(var15);
+ var28.addVertex((double) (var18 * 120.0F), (double) (var19 * 120.0F), (double) (-var19 * 40.0F * var25[3]));
+ }
+
+ var28.draw();
+ GL11.glPopMatrix();
+ GL11.glShadeModel(GL11.GL_FLAT);
+ }
+
+ GL11.glEnable(GL11.GL_TEXTURE_2D);
+ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
+ GL11.glPushMatrix();
+ var8 = 1.0F - var2.getRainStrength(var1);
+ var11 = 0.0F;
+ var12 = 0.0F;
+ var13 = 0.0F;
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, var8);
+ GL11.glTranslatef(var11, var12, var13);
+ GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
+ GL11.glRotatef(var2.getCelestialAngle(var1) * 360.0F, 1.0F, 0.0F, 0.0F);
+ var14 = 30.0F;
+ GL11.glBindTexture(GL11.GL_TEXTURE_2D, var3.renderEngine.getTexture("/environment/sun.png"));
+ var28.startDrawingQuads();
+ var28.addVertexWithUV((double) (-var14), 100.0D, (double) (-var14), 0.0D, 0.0D);
+ var28.addVertexWithUV((double) var14, 100.0D, (double) (-var14), 1.0D, 0.0D);
+ var28.addVertexWithUV((double) var14, 100.0D, (double) var14, 1.0D, 1.0D);
+ var28.addVertexWithUV((double) (-var14), 100.0D, (double) var14, 0.0D, 1.0D);
+ var28.draw();
+ var14 = 20.0F;
+ GL11.glBindTexture(GL11.GL_TEXTURE_2D, var3.renderEngine.getTexture("/environment/moon_phases.png"));
+ int var26 = var2.getMoonPhase();
+ int var27 = var26 % 4;
+ var17 = var26 / 4 % 2;
+ var18 = (float) (var27 + 0) / 4.0F;
+ var19 = (float) (var17 + 0) / 2.0F;
+ float var20 = (float) (var27 + 1) / 4.0F;
+ float var21 = (float) (var17 + 1) / 2.0F;
+ var28.startDrawingQuads();
+ var28.addVertexWithUV((double) (-var14), -100.0D, (double) var14, (double) var20, (double) var21);
+ var28.addVertexWithUV((double) var14, -100.0D, (double) var14, (double) var18, (double) var21);
+ var28.addVertexWithUV((double) var14, -100.0D, (double) (-var14), (double) var18, (double) var19);
+ var28.addVertexWithUV((double) (-var14), -100.0D, (double) (-var14), (double) var20, (double) var19);
+ var28.draw();
+ GL11.glDisable(GL11.GL_TEXTURE_2D);
+ float var22 = 1000000.0F + var2.getStarBrightness(var1) * var8;
+
+ if (var22 > 0.0F)
+ {
+ GL11.glColor4f(var22, var22, var22, var22);
+ GL11.glCallList(this.starGLCallList);
+ }
+
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glEnable(GL11.GL_ALPHA_TEST);
+ GL11.glEnable(GL11.GL_FOG);
+ GL11.glPopMatrix();
+ GL11.glDisable(GL11.GL_TEXTURE_2D);
+ GL11.glColor3f(0.0F, 0.0F, 0.0F);
+ double var23 = var3.thePlayer.getPosition(var1).yCoord - var2.getHorizon();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(0.0F, 12.0F, 0.0F);
+ GL11.glCallList(this.glSkyList2);
+ GL11.glPopMatrix();
+ var12 = 1.0F;
+ var13 = -((float) (var23 + 65.0D));
+ var14 = -var12;
+ var28.startDrawingQuads();
+ var28.setColorRGBA_F((float) var4.xCoord, (float) var4.yCoord, (float) var4.zCoord, 1.0F);
+ var28.addVertex((double) (-var12), (double) var13, (double) var12);
+ var28.addVertex((double) var12, (double) var13, (double) var12);
+ var28.addVertex((double) var12, (double) var14, (double) var12);
+ var28.addVertex((double) (-var12), (double) var14, (double) var12);
+ var28.addVertex((double) (-var12), (double) var14, (double) (-var12));
+ var28.addVertex((double) var12, (double) var14, (double) (-var12));
+ var28.addVertex((double) var12, (double) var13, (double) (-var12));
+ var28.addVertex((double) (-var12), (double) var13, (double) (-var12));
+ var28.addVertex((double) var12, (double) var14, (double) (-var12));
+ var28.addVertex((double) var12, (double) var14, (double) var12);
+ var28.addVertex((double) var12, (double) var13, (double) var12);
+ var28.addVertex((double) var12, (double) var13, (double) (-var12));
+ var28.addVertex((double) (-var12), (double) var13, (double) (-var12));
+ var28.addVertex((double) (-var12), (double) var13, (double) var12);
+ var28.addVertex((double) (-var12), (double) var14, (double) var12);
+ var28.addVertex((double) (-var12), (double) var14, (double) (-var12));
+ var28.addVertex((double) (-var12), (double) var14, (double) (-var12));
+ var28.addVertex((double) (-var12), (double) var14, (double) var12);
+ var28.addVertex((double) var12, (double) var14, (double) var12);
+ var28.addVertex((double) var12, (double) var14, (double) (-var12));
+ var28.draw();
+
+ if (var2.provider.isSkyColored())
+ {
+ GL11.glColor3f(var5 * 0.9F + 0.04F, var6 * 0.0F + 0.0F, var7 * 0.0F + 0.0F);
+ } else
+ {
+ GL11.glColor3f(var5, var6, var7);
+ }
+
+ GL11.glPushMatrix();
+ GL11.glTranslatef(0.0F, -((float) (var23 - 16.0D)), 0.0F);
+ GL11.glCallList(this.glSkyList2);
+ GL11.glPopMatrix();
+ GL11.glEnable(GL11.GL_TEXTURE_2D);
+ GL11.glDepthMask(true);
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/renders/EntityCloudSmokeFX.java b/src/main/java/net/aetherteam/aether/client/renders/EntityCloudSmokeFX.java
new file mode 100644
index 0000000..62b7169
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/renders/EntityCloudSmokeFX.java
@@ -0,0 +1,83 @@
+package net.aetherteam.aether.client.renders;
+
+import net.minecraft.client.particle.EntityFX;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.world.World;
+
+public class EntityCloudSmokeFX extends EntityFX
+{
+ float smokeParticleScale;
+
+ public EntityCloudSmokeFX(World var1, double var2, double var4, double var6, double var8, double var10, double var12, float var14, float var15, float var16, float var17)
+ {
+ super(var1, var2, var4, var6, 0.0D, 0.0D, 0.0D);
+ this.motionX *= 0.10000000149011612D;
+ this.motionY *= 0.10000000149011612D;
+ this.motionZ *= 0.10000000149011612D;
+ this.motionX += var8;
+ this.motionY += var10;
+ this.motionZ += var12;
+ this.particleRed = var15;
+ this.particleBlue = var16;
+ this.particleGreen = var17;
+ this.particleScale *= 0.75F;
+ this.particleScale *= var14;
+ this.smokeParticleScale = this.particleScale;
+ this.particleMaxAge = (int) (8.0D / (Math.random() * 0.8D + 0.2D));
+ this.particleMaxAge = (int) ((float) this.particleMaxAge * var14);
+ this.noClip = false;
+ }
+
+ public void renderParticle(Tessellator var1, float var2, float var3, float var4, float var5, float var6, float var7)
+ {
+ float var8 = ((float) this.particleAge + var2) / (float) this.particleMaxAge * 32.0F;
+
+ if (var8 < 0.0F)
+ {
+ var8 = 0.0F;
+ }
+
+ if (var8 > 1.0F)
+ {
+ var8 = 1.0F;
+ }
+
+ this.particleScale = this.smokeParticleScale * var8;
+ super.renderParticle(var1, var2, var3, var4, var5, var6, var7);
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ this.prevPosX = this.posX;
+ this.prevPosY = this.posY;
+ this.prevPosZ = this.posZ;
+
+ if (this.particleAge++ >= this.particleMaxAge)
+ {
+ this.setDead();
+ }
+
+ this.setParticleTextureIndex(7 - this.particleAge * 8 / this.particleMaxAge);
+ this.motionY += 0.004D;
+ this.moveEntity(this.motionX, this.motionY, this.motionZ);
+
+ if (this.posY == this.prevPosY)
+ {
+ this.motionX *= 1.1D;
+ this.motionZ *= 1.1D;
+ }
+
+ this.motionX *= 0.9599999785423279D;
+ this.motionY *= 0.9599999785423279D;
+ this.motionZ *= 0.9599999785423279D;
+
+ if (this.onGround)
+ {
+ this.motionX *= 0.699999988079071D;
+ this.motionZ *= 0.699999988079071D;
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/renders/ModelThrowingCube.java b/src/main/java/net/aetherteam/aether/client/renders/ModelThrowingCube.java
new file mode 100644
index 0000000..bc012a3
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/renders/ModelThrowingCube.java
@@ -0,0 +1,20 @@
+package net.aetherteam.aether.client.renders;
+
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.model.ModelRenderer;
+import net.minecraft.entity.Entity;
+
+public class ModelThrowingCube extends ModelBase
+{
+ ModelRenderer cube = new ModelRenderer(this, 0, 0);
+
+ public ModelThrowingCube()
+ {
+ this.cube.addBox(0.0F, 0.0F, 0.0F, 8, 8, 8);
+ }
+
+ public void render(Entity var1, float var2)
+ {
+ this.cube.render(var2);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/renders/RenderAechorPlant.java b/src/main/java/net/aetherteam/aether/client/renders/RenderAechorPlant.java
new file mode 100644
index 0000000..605b734
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/renders/RenderAechorPlant.java
@@ -0,0 +1,74 @@
+package net.aetherteam.aether.client.renders;
+
+import net.aetherteam.aether.client.models.ModelAechorPlant;
+import net.aetherteam.aether.entities.EntityAechorPlant;
+import net.minecraft.client.renderer.entity.RenderLiving;
+import net.minecraft.entity.EntityLiving;
+import org.lwjgl.opengl.GL11;
+
+public class RenderAechorPlant extends RenderLiving
+{
+ public ModelAechorPlant xd;
+
+ public RenderAechorPlant(ModelAechorPlant var1, float var2)
+ {
+ super(var1, var2);
+ this.setRenderPassModel(var1);
+ this.xd = var1;
+ }
+
+ /**
+ * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
+ * entityLiving, partialTickTime
+ */
+ protected void preRenderCallback(EntityLiving var1, float var2)
+ {
+ EntityAechorPlant var3 = (EntityAechorPlant) var1;
+ float var4 = (float) Math.sin((double) var3.sinage);
+ float var5;
+
+ if (var3.hurtTime > 0)
+ {
+ var4 *= 0.45F;
+ var4 -= 0.125F;
+ var5 = 1.75F + (float) Math.sin((double) (var3.sinage + 2.0F)) * 1.5F;
+ } else if (var3.seeprey)
+ {
+ var4 *= 0.25F;
+ var5 = 1.75F + (float) Math.sin((double) (var3.sinage + 2.0F)) * 1.5F;
+ } else
+ {
+ var4 *= 0.125F;
+ var5 = 1.75F;
+ }
+
+ this.xd.sinage = var4;
+ this.xd.sinage2 = var5;
+ float var6 = 0.625F + (float) var3.getSize() / 6.0F;
+ this.xd.size = var6;
+ this.shadowSize = var6 - 0.25F;
+ }
+
+ protected int a(EntityAechorPlant var1, int var2, float var3)
+ {
+ if (var2 != 0)
+ {
+ return -1;
+ } else
+ {
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glDisable(GL11.GL_ALPHA_TEST);
+ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.325F);
+ return 1;
+ }
+ }
+
+ /**
+ * Queries whether should render the specified pass or not.
+ */
+ protected int shouldRenderPass(EntityLiving var1, int var2, float var3)
+ {
+ return this.a((EntityAechorPlant) var1, var2, var3);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/renders/RenderAerbunny.java b/src/main/java/net/aetherteam/aether/client/renders/RenderAerbunny.java
new file mode 100644
index 0000000..9ec5f35
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/renders/RenderAerbunny.java
@@ -0,0 +1,275 @@
+package net.aetherteam.aether.client.renders;
+
+import net.aetherteam.aether.client.models.ModelAerbunny;
+import net.aetherteam.aether.entities.mounts.EntityAerbunny;
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.renderer.OpenGlHelper;
+import net.minecraft.client.renderer.entity.RenderLiving;
+import net.minecraft.client.renderer.entity.RenderManager;
+import net.minecraft.entity.EntityLiving;
+import org.lwjgl.opengl.GL11;
+import org.lwjgl.opengl.GL12;
+
+public class RenderAerbunny extends RenderLiving
+{
+ public ModelAerbunny mb;
+
+ public RenderAerbunny(ModelBase var1, float var2)
+ {
+ super(var1, var2);
+ this.mb = (ModelAerbunny) var1;
+ }
+
+ protected void rotAerbunny(EntityAerbunny var1)
+ {
+ if (!var1.onGround && var1.ridingEntity == null)
+ {
+ if (var1.motionY > 0.5D)
+ {
+ GL11.glRotatef(15.0F, -1.0F, 0.0F, 0.0F);
+ } else if (var1.motionY < -0.5D)
+ {
+ GL11.glRotatef(-15.0F, -1.0F, 0.0F, 0.0F);
+ } else
+ {
+ GL11.glRotatef((float) (var1.motionY * 30.0D), -1.0F, 0.0F, 0.0F);
+ }
+ }
+
+ this.mb.puffiness = (float) var1.getPuffiness() / 10.0F;
+ }
+
+ /**
+ * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
+ * entityLiving, partialTickTime
+ */
+ protected void preRenderCallback(EntityLiving var1, float var2)
+ {
+ this.rotAerbunny((EntityAerbunny) var1);
+ }
+
+ public void doRenderLiving(EntityLiving var1, double var2, double var4, double var6, float var8, float var9)
+ {
+ float var10 = this.interpolateRotation(var1.prevRenderYawOffset, var1.renderYawOffset, var9);
+ float var11 = this.interpolateRotation(var1.prevRotationYawHead, var1.rotationYawHead, var9);
+ float var12 = var1.prevRotationPitch + (var1.rotationPitch - var1.prevRotationPitch) * var9;
+
+ if (var1 instanceof EntityAerbunny && ((EntityAerbunny) var1).getRidingHandler().isBeingRidden())
+ {
+ EntityLiving var13 = ((EntityAerbunny) var1).getRidingHandler().getRider();
+ var2 = var13.lastTickPosX + (var13.posX - var13.lastTickPosX) * (double) var9;
+ var4 = var13.lastTickPosY - 1.68D + (var13.posY - var13.lastTickPosY) * (double) var9 + ((EntityAerbunny) var1).getRidingHandler().getAnimalYOffset();
+ var6 = var13.lastTickPosZ + (var13.posZ - var13.lastTickPosZ) * (double) var9;
+ var2 -= RenderManager.renderPosX;
+ var4 -= RenderManager.renderPosY;
+ var6 -= RenderManager.renderPosZ;
+ var8 = (float) ((double) var13.prevRotationYaw + (double) (var13.rotationYaw - var13.prevRotationYaw) * var2);
+ var10 = this.interpolateRotation(var13.prevRenderYawOffset, var13.renderYawOffset, var9);
+ var12 = var13.prevRotationPitch + (var13.rotationPitch - var13.prevRotationPitch) * var9;
+ var11 = this.interpolateRotation(var13.prevRotationYawHead, var13.rotationYawHead, var9);
+ }
+
+ GL11.glPushMatrix();
+ GL11.glDisable(GL11.GL_CULL_FACE);
+ this.mainModel.onGround = this.renderSwingProgress(var1, var9);
+
+ if (this.renderPassModel != null)
+ {
+ this.renderPassModel.onGround = this.mainModel.onGround;
+ }
+
+ this.mainModel.isRiding = var1.isRiding();
+
+ if (this.renderPassModel != null)
+ {
+ this.renderPassModel.isRiding = this.mainModel.isRiding;
+ }
+
+ this.mainModel.isChild = var1.isChild();
+
+ if (this.renderPassModel != null)
+ {
+ this.renderPassModel.isChild = this.mainModel.isChild;
+ }
+
+ try
+ {
+ this.renderLivingAt(var1, var2, var4, var6);
+ float var26 = this.handleRotationFloat(var1, var9);
+ this.rotateCorpse(var1, var26, var10, var9);
+ float var14 = 0.0625F;
+ GL11.glEnable(GL12.GL_RESCALE_NORMAL);
+ GL11.glScalef(-1.0F, -1.0F, 1.0F);
+ this.preRenderCallback(var1, var9);
+ GL11.glTranslatef(0.0F, -24.0F * var14 - 0.0078125F, 0.0F);
+ float var15 = var1.prevLimbYaw + (var1.limbYaw - var1.prevLimbYaw) * var9;
+ float var16 = var1.limbSwing - var1.limbYaw * (1.0F - var9);
+
+ if (var1.isChild())
+ {
+ var16 *= 3.0F;
+ }
+
+ if (var15 > 1.0F)
+ {
+ var15 = 1.0F;
+ }
+
+ GL11.glEnable(GL11.GL_ALPHA_TEST);
+ this.mainModel.setLivingAnimations(var1, var16, var15, var9);
+ this.renderModel(var1, var16, var15, var26, var11 - var10, var12, var14);
+ int var18;
+ float var19;
+ float var17;
+ int var22;
+ float var20;
+
+ for (int var21 = 0; var21 < 4; ++var21)
+ {
+ var18 = this.shouldRenderPass(var1, var21, var9);
+
+ if (var18 > 0)
+ {
+ this.renderPassModel.setLivingAnimations(var1, var16, var15, var9);
+ this.renderPassModel.render(var1, var16, var15, var26, var11 - var10, var12, var14);
+
+ if ((var18 & 240) == 16)
+ {
+ this.func_82408_c(var1, var21, var9);
+ this.renderPassModel.render(var1, var16, var15, var26, var11 - var10, var12, var14);
+ }
+
+ if ((var18 & 15) == 15)
+ {
+ var17 = (float) var1.ticksExisted + var9;
+ this.loadTexture("%blur%/misc/glint.png");
+ GL11.glEnable(GL11.GL_BLEND);
+ var19 = 0.5F;
+ GL11.glColor4f(var19, var19, var19, 1.0F);
+ GL11.glDepthFunc(GL11.GL_EQUAL);
+ GL11.glDepthMask(false);
+
+ for (var22 = 0; var22 < 2; ++var22)
+ {
+ GL11.glDisable(GL11.GL_LIGHTING);
+ var20 = 0.76F;
+ GL11.glColor4f(0.5F * var20, 0.25F * var20, 0.8F * var20, 1.0F);
+ GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE);
+ GL11.glMatrixMode(GL11.GL_TEXTURE);
+ GL11.glLoadIdentity();
+ float var23 = var17 * (0.001F + (float) var22 * 0.003F) * 20.0F;
+ float var24 = 0.33333334F;
+ GL11.glScalef(var24, var24, var24);
+ GL11.glRotatef(30.0F - (float) var22 * 60.0F, 0.0F, 0.0F, 1.0F);
+ GL11.glTranslatef(0.0F, var23, 0.0F);
+ GL11.glMatrixMode(GL11.GL_MODELVIEW);
+ this.renderPassModel.render(var1, var16, var15, var26, var11 - var10, var12, var14);
+ }
+
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glMatrixMode(GL11.GL_TEXTURE);
+ GL11.glDepthMask(true);
+ GL11.glLoadIdentity();
+ GL11.glMatrixMode(GL11.GL_MODELVIEW);
+ GL11.glEnable(GL11.GL_LIGHTING);
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glDepthFunc(GL11.GL_LEQUAL);
+ }
+
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glEnable(GL11.GL_ALPHA_TEST);
+ }
+ }
+
+ GL11.glDepthMask(true);
+ this.renderEquippedItems(var1, var9);
+ float var27 = var1.getBrightness(var9);
+ var18 = this.getColorMultiplier(var1, var27, var9);
+ OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit);
+ GL11.glDisable(GL11.GL_TEXTURE_2D);
+ OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);
+
+ if ((var18 >> 24 & 255) > 0 || var1.hurtTime > 0 || var1.deathTime > 0)
+ {
+ GL11.glDisable(GL11.GL_TEXTURE_2D);
+ GL11.glDisable(GL11.GL_ALPHA_TEST);
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ GL11.glDepthFunc(GL11.GL_EQUAL);
+
+ if (var1.hurtTime > 0 || var1.deathTime > 0)
+ {
+ GL11.glColor4f(var27, 0.0F, 0.0F, 0.4F);
+ this.mainModel.render(var1, var16, var15, var26, var11 - var10, var12, var14);
+
+ for (var22 = 0; var22 < 4; ++var22)
+ {
+ if (this.inheritRenderPass(var1, var22, var9) >= 0)
+ {
+ GL11.glColor4f(var27, 0.0F, 0.0F, 0.4F);
+ this.renderPassModel.render(var1, var16, var15, var26, var11 - var10, var12, var14);
+ }
+ }
+ }
+
+ if ((var18 >> 24 & 255) > 0)
+ {
+ var17 = (float) (var18 >> 16 & 255) / 255.0F;
+ var19 = (float) (var18 >> 8 & 255) / 255.0F;
+ float var29 = (float) (var18 & 255) / 255.0F;
+ var20 = (float) (var18 >> 24 & 255) / 255.0F;
+ GL11.glColor4f(var17, var19, var29, var20);
+ this.mainModel.render(var1, var16, var15, var26, var11 - var10, var12, var14);
+
+ for (int var28 = 0; var28 < 4; ++var28)
+ {
+ if (this.inheritRenderPass(var1, var28, var9) >= 0)
+ {
+ GL11.glColor4f(var17, var19, var29, var20);
+ this.renderPassModel.render(var1, var16, var15, var26, var11 - var10, var12, var14);
+ }
+ }
+ }
+
+ GL11.glDepthFunc(GL11.GL_LEQUAL);
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glEnable(GL11.GL_ALPHA_TEST);
+ GL11.glEnable(GL11.GL_TEXTURE_2D);
+ }
+
+ GL11.glDisable(GL12.GL_RESCALE_NORMAL);
+ } catch (Exception var25)
+ {
+ var25.printStackTrace();
+ }
+
+ OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit);
+ GL11.glEnable(GL11.GL_TEXTURE_2D);
+ OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);
+ GL11.glEnable(GL11.GL_CULL_FACE);
+ GL11.glPopMatrix();
+ this.passSpecialRender(var1, var2, var4, var6);
+ }
+
+ private float interpolateRotation(float var1, float var2, float var3)
+ {
+ float var4;
+
+ for (var4 = var2 - var1; var4 < -180.0F; var4 += 360.0F)
+ {
+ ;
+ }
+
+ while (var4 >= 180.0F)
+ {
+ var4 -= 360.0F;
+ }
+
+ return var1 + var3 * var4;
+ }
+
+ public void doRender(EntityLiving var1, double var2, double var4, double var6, float var8, float var9)
+ {
+ this.doRenderLiving(var1, var2, var4, var6, var8, var9);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/renders/RenderAerwhale.java b/src/main/java/net/aetherteam/aether/client/renders/RenderAerwhale.java
new file mode 100644
index 0000000..cd619d1
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/renders/RenderAerwhale.java
@@ -0,0 +1,30 @@
+package net.aetherteam.aether.client.renders;
+
+import net.aetherteam.aether.client.models.ModelAerwhale;
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.renderer.entity.Render;
+import net.minecraft.entity.Entity;
+import org.lwjgl.opengl.GL11;
+
+public class RenderAerwhale extends Render
+{
+ private ModelBase model = new ModelAerwhale();
+
+ /**
+ * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
+ * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
+ * (Render 1 ? 1.5F : 0.5F;
+ GL11.glTranslatef((float) var2, (float) var4 + var10, (float) var6);
+ float var11 = var1.getCoinValue() > 1 ? 0.8F : 0.25F;
+ GL11.glScalef(var11, var11, var11);
+ GL11.glRotatef(-180.0F, 1.0F, 0.0F, 0.0F);
+ this.CoinModel.spinCoin(0.0F, var1.getSpinSpeed(), 0.0F);
+ this.loadTexture("/net/aetherteam/aether/client/sprites/coin/AetherCoins.png");
+ this.CoinModel.render(var1, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
+ GL11.glPopMatrix();
+ }
+
+ /**
+ * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
+ * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
+ * (Render> 16 & 255) / 255.0F;
+ float var12 = (float) (var10 >> 8 & 255) / 255.0F;
+ float var13 = (float) (var10 & 255) / 255.0F;
+
+ if (EntityRenderer.anaglyphEnable)
+ {
+ float var14 = (var11 * 30.0F + var12 * 59.0F + var13 * 11.0F) / 100.0F;
+ float var15 = (var11 * 30.0F + var12 * 70.0F) / 100.0F;
+ float var16 = (var11 * 30.0F + var13 * 70.0F) / 100.0F;
+ var11 = var14;
+ var12 = var15;
+ var13 = var16;
+ }
+
+ var8.setColorOpaque_F(var9 * var11, var9 * var12, var9 * var13);
+ double var22 = (double) var2;
+ double var23 = (double) var3;
+ double var18 = (double) var4;
+ long var20 = (long) (var2 * 3129871) ^ (long) var4 * 116129781L ^ (long) var3;
+ var20 = var20 * var20 * 42317861L + var20 * 11L;
+ var22 += ((double) ((float) (var20 >> 16 & 15L) / 15.0F) - 0.5D) * 0.5D;
+ var23 += ((double) ((float) (var20 >> 20 & 15L) / 15.0F) - 1.0D) * 0.2D;
+ var18 += ((double) ((float) (var20 >> 24 & 15L) / 15.0F) - 0.5D) * 0.5D;
+ this.drawCrossedSquares(var5, var1.getBlockMetadata(var2, var3, var4), var22, var23, var18, 1.0F);
+ return true;
+ } else
+ {
+ return false;
+ }
+ }
+
+ public void drawCrossedSquares(Block var1, int var2, double var3, double var5, double var7, float var9)
+ {
+ Tessellator var10 = Tessellator.instance;
+ Icon var11 = var1.getIcon(0, var2);
+ double var12 = (double) var11.getMinU();
+ double var14 = (double) var11.getMinV();
+ double var16 = (double) var11.getMaxU();
+ double var18 = (double) var11.getMaxV();
+ double var20 = 0.45D * (double) var9;
+ double var22 = var3 + 0.5D - var20;
+ double var24 = var3 + 0.5D + var20;
+ double var26 = var7 + 0.5D - var20;
+ double var28 = var7 + 0.5D + var20;
+ var10.addVertexWithUV(var22, var5 + (double) var9, var26, var12, var14);
+ var10.addVertexWithUV(var22, var5 + 0.0D, var26, var12, var18);
+ var10.addVertexWithUV(var24, var5 + 0.0D, var28, var16, var18);
+ var10.addVertexWithUV(var24, var5 + (double) var9, var28, var16, var14);
+ var10.addVertexWithUV(var24, var5 + (double) var9, var28, var12, var14);
+ var10.addVertexWithUV(var24, var5 + 0.0D, var28, var12, var18);
+ var10.addVertexWithUV(var22, var5 + 0.0D, var26, var16, var18);
+ var10.addVertexWithUV(var22, var5 + (double) var9, var26, var16, var14);
+ var10.addVertexWithUV(var22, var5 + (double) var9, var28, var12, var14);
+ var10.addVertexWithUV(var22, var5 + 0.0D, var28, var12, var18);
+ var10.addVertexWithUV(var24, var5 + 0.0D, var26, var16, var18);
+ var10.addVertexWithUV(var24, var5 + (double) var9, var26, var16, var14);
+ var10.addVertexWithUV(var24, var5 + (double) var9, var26, var12, var14);
+ var10.addVertexWithUV(var24, var5 + 0.0D, var26, var12, var18);
+ var10.addVertexWithUV(var22, var5 + 0.0D, var28, var16, var18);
+ var10.addVertexWithUV(var22, var5 + (double) var9, var28, var16, var14);
+ }
+
+ public boolean shouldRender3DInInventory()
+ {
+ return false;
+ }
+
+ public int getRenderId()
+ {
+ return renderID;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/renders/RenderBattleSentry.java b/src/main/java/net/aetherteam/aether/client/renders/RenderBattleSentry.java
new file mode 100644
index 0000000..ec4a178
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/renders/RenderBattleSentry.java
@@ -0,0 +1,82 @@
+package net.aetherteam.aether.client.renders;
+
+import net.aetherteam.aether.entities.EntityBattleSentry;
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.renderer.OpenGlHelper;
+import net.minecraft.client.renderer.entity.RenderLiving;
+import net.minecraft.entity.EntityLiving;
+import org.lwjgl.opengl.GL11;
+
+public class RenderBattleSentry extends RenderLiving
+{
+ public RenderBattleSentry(ModelBase var1, float var2)
+ {
+ super(var1, var2);
+ this.setRenderPassModel(var1);
+ }
+
+ /**
+ * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
+ * entityLiving, partialTickTime
+ */
+ protected void preRenderCallback(EntityLiving var1, float var2)
+ {
+ float var3 = 1.75F;
+ GL11.glScalef(var3, var3, var3);
+ }
+
+ protected int a(EntityBattleSentry var1, int var2, float var3)
+ {
+ if (var2 != 0)
+ {
+ return -1;
+ } else
+ {
+ this.loadTexture("/net/aetherteam/aether/client/sprites/mobs/sentryMelee/eye.png");
+ float var4 = 1.0F;
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
+ GL11.glDepthMask(false);
+ char var5 = 61680;
+ int var6 = var5 % 65536;
+ int var7 = var5 / 65536;
+ OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) var6 / 1.0F, (float) var7 / 1.0F);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, var4);
+
+ if (var1.isInView() && !var1.getHasBeenAttacked())
+ {
+ GL11.glTranslatef(0.0F, 0.5F, 0.0F);
+ }
+
+ return 1;
+ }
+ }
+
+ /**
+ * Queries whether should render the specified pass or not.
+ */
+ protected int shouldRenderPass(EntityLiving var1, int var2, float var3)
+ {
+ return this.a((EntityBattleSentry) var1, var2, var3);
+ }
+
+ /**
+ * Renders the model in RenderLiving
+ */
+ protected void renderModel(EntityLiving var1, float var2, float var3, float var4, float var5, float var6, float var7)
+ {
+ if (!((EntityBattleSentry) var1).isInView() || ((EntityBattleSentry) var1).getHasBeenAttacked())
+ {
+ super.renderModel(var1, var2, var3, var4, var5, var6, var7);
+ }
+
+ if (((EntityBattleSentry) var1).isInView() && !((EntityBattleSentry) var1).getHasBeenAttacked())
+ {
+ GL11.glPushMatrix();
+ GL11.glTranslatef(0.0F, 0.5F, 0.0F);
+ super.renderModel(var1, var2, var3, var4, var5, var6, var7);
+ GL11.glPopMatrix();
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/renders/RenderBerryBush.java b/src/main/java/net/aetherteam/aether/client/renders/RenderBerryBush.java
new file mode 100644
index 0000000..fc8ccf4
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/renders/RenderBerryBush.java
@@ -0,0 +1,75 @@
+package net.aetherteam.aether.client.renders;
+
+import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
+import net.minecraft.block.Block;
+import net.minecraft.client.renderer.RenderBlocks;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.world.IBlockAccess;
+import org.lwjgl.opengl.GL11;
+
+public class RenderBerryBush implements ISimpleBlockRenderingHandler
+{
+ public static int renderID = 100;
+
+ public void renderInventoryBlock(Block var1, int var2, int var3, RenderBlocks var4)
+ {
+ if (var3 == this.getRenderId())
+ {
+ Tessellator var5 = Tessellator.instance;
+ var5.startDrawingQuads();
+ var5.setNormal(0.0F, -1.0F, 0.0F);
+ var4.drawCrossedSquares(var1, var2, -0.5D, -0.5D, -0.5D, 1.0F);
+ var5.draw();
+ var1.setBlockBoundsForItemRender();
+ GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
+ var5.startDrawingQuads();
+ var5.setNormal(0.0F, -1.0F, 0.0F);
+ var4.renderBottomFace(var1, 0.0D, 0.0D, 0.0D, var1.getIcon(0, var2));
+ var5.draw();
+ var5.startDrawingQuads();
+ var5.setNormal(0.0F, 1.0F, 0.0F);
+ var4.renderTopFace(var1, 0.0D, 0.0D, 0.0D, var1.getIcon(1, var2));
+ var5.draw();
+ var5.startDrawingQuads();
+ var5.setNormal(0.0F, 0.0F, -1.0F);
+ var4.renderEastFace(var1, 0.0D, 0.0D, 0.0D, var1.getIcon(2, var2));
+ var5.draw();
+ var5.startDrawingQuads();
+ var5.setNormal(0.0F, 0.0F, 1.0F);
+ var4.renderWestFace(var1, 0.0D, 0.0D, 0.0D, var1.getIcon(3, var2));
+ var5.draw();
+ var5.startDrawingQuads();
+ var5.setNormal(-1.0F, 0.0F, 0.0F);
+ var4.renderNorthFace(var1, 0.0D, 0.0D, 0.0D, var1.getIcon(4, var2));
+ var5.draw();
+ var5.startDrawingQuads();
+ var5.setNormal(1.0F, 0.0F, 0.0F);
+ var4.renderSouthFace(var1, 0.0D, 0.0D, 0.0D, var1.getIcon(5, var2));
+ var5.draw();
+ GL11.glTranslatef(0.5F, 0.5F, 0.5F);
+ }
+ }
+
+ public boolean renderWorldBlock(IBlockAccess var1, int var2, int var3, int var4, Block var5, int var6, RenderBlocks var7)
+ {
+ if (var6 == this.getRenderId())
+ {
+ var7.renderCrossedSquares(var5, var2, var3, var4);
+ var7.renderStandardBlock(var5, var2, var3, var4);
+ return true;
+ } else
+ {
+ return false;
+ }
+ }
+
+ public boolean shouldRender3DInInventory()
+ {
+ return true;
+ }
+
+ public int getRenderId()
+ {
+ return renderID;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/renders/RenderCarrionSprout.java b/src/main/java/net/aetherteam/aether/client/renders/RenderCarrionSprout.java
new file mode 100644
index 0000000..4ca5deb
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/renders/RenderCarrionSprout.java
@@ -0,0 +1,61 @@
+package net.aetherteam.aether.client.renders;
+
+import net.aetherteam.aether.client.models.ModelCarrionSprout;
+import net.aetherteam.aether.entities.EntityAechorPlant;
+import net.aetherteam.aether.entities.EntityCarrionSprout;
+import net.minecraft.client.renderer.entity.RenderLiving;
+import net.minecraft.entity.EntityLiving;
+import org.lwjgl.opengl.GL11;
+
+public class RenderCarrionSprout extends RenderLiving
+{
+ public ModelCarrionSprout plantModel;
+
+ public RenderCarrionSprout(ModelCarrionSprout var1, float var2)
+ {
+ super(var1, var2);
+ this.setRenderPassModel(var1);
+ this.plantModel = var1;
+ }
+
+ /**
+ * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
+ * entityLiving, partialTickTime
+ */
+ protected void preRenderCallback(EntityLiving var1, float var2)
+ {
+ EntityCarrionSprout var3 = (EntityCarrionSprout) var1;
+ float var4 = (float) Math.sin((double) var3.sinage);
+ float var5;
+
+ if (var3.hurtTime > 0)
+ {
+ var4 *= 0.45F;
+ var4 -= 0.125F;
+ var5 = 1.75F + (float) Math.sin((double) (var3.sinage + 2.0F)) * 1.5F;
+ } else
+ {
+ var4 *= 0.25F;
+ var5 = 1.75F + (float) Math.sin((double) (var3.sinage + 2.0F)) * 1.5F;
+ }
+
+ this.plantModel.sinage = var4;
+ this.plantModel.sinage2 = var5;
+ this.shadowSize = 0.25F;
+ }
+
+ protected int a(EntityAechorPlant var1, int var2, float var3)
+ {
+ if (var2 != 0)
+ {
+ return -1;
+ } else
+ {
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glDisable(GL11.GL_ALPHA_TEST);
+ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.325F);
+ return 1;
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/renders/RenderCloudParachute.java b/src/main/java/net/aetherteam/aether/client/renders/RenderCloudParachute.java
new file mode 100644
index 0000000..15837b3
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/renders/RenderCloudParachute.java
@@ -0,0 +1,56 @@
+package net.aetherteam.aether.client.renders;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.entities.EntityCloudParachute;
+import net.minecraft.client.renderer.RenderBlocks;
+import net.minecraft.client.renderer.entity.Render;
+import net.minecraft.client.renderer.entity.RenderManager;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import org.lwjgl.opengl.GL11;
+
+public class RenderCloudParachute extends Render
+{
+ static RenderBlocks renderBlocks;
+
+ public RenderCloudParachute()
+ {
+ this.shadowSize = 0.5F;
+ renderBlocks = new RenderBlocks();
+ }
+
+ public void renderCloud(EntityCloudParachute var1, double var2, double var4, double var6, float var8, float var9)
+ {
+ GL11.glPushMatrix();
+
+ if (var1.getRidingHandler().isBeingRidden())
+ {
+ EntityLiving var10 = var1.getRidingHandler().getRider();
+ var2 = var10.lastTickPosX + (var10.posX - var10.lastTickPosX) * (double) var9;
+ var4 = var10.lastTickPosY - 1.68D + (var10.posY - var10.lastTickPosY) * (double) var9;
+ var6 = var10.lastTickPosZ + (var10.posZ - var10.lastTickPosZ) * (double) var9;
+ var2 -= RenderManager.renderPosX;
+ var4 -= RenderManager.renderPosY;
+ var6 -= RenderManager.renderPosZ;
+ var8 = (float) ((double) var10.prevRotationYaw + (double) (var10.rotationYaw - var10.prevRotationYaw) * var2);
+ }
+
+ GL11.glTranslatef((float) var2, (float) var4, (float) var6);
+ GL11.glRotatef(180.0F - var8, 0.0F, 1.0F, 0.0F);
+ this.loadTexture("/net/aetherteam/aether/client/sprites/aetherBlocks.png");
+ GL11.glEnable(GL11.GL_LIGHTING);
+ renderBlocks.renderBlockAsItem(AetherBlocks.Aercloud, var1.getColor() ? 2 : 0, var1.getBrightness(var9));
+ GL11.glPopMatrix();
+ }
+
+ /**
+ * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
+ * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
+ * (Render= 0; --var18)
+ {
+ var11[var18] = var13;
+ var12[var18] = var15;
+ var13 += (double) (var17.nextInt(11) - 5);
+ var15 += (double) (var17.nextInt(11) - 5);
+ }
+
+ for (var18 = 0; var18 < 4; ++var18)
+ {
+ Random var19 = new Random(var1.boltVertex);
+
+ for (int var20 = 0; var20 < 3; ++var20)
+ {
+ int var21 = 7;
+ int var22 = 0;
+
+ if (var20 > 0)
+ {
+ var21 = 7 - var20;
+ }
+
+ if (var20 > 0)
+ {
+ var22 = var21 - 2;
+ }
+
+ double var23 = var11[var21] - var13;
+ double var25 = var12[var21] - var15;
+
+ for (int var27 = var21; var27 >= var22; --var27)
+ {
+ double var28 = var23;
+ double var30 = var25;
+
+ if (var20 == 0)
+ {
+ var23 += (double) (var19.nextInt(11) - 5);
+ var25 += (double) (var19.nextInt(11) - 5);
+ } else
+ {
+ var23 += (double) (var19.nextInt(31) - 15);
+ var25 += (double) (var19.nextInt(31) - 15);
+ }
+
+ var10.startDrawing(5);
+ float var32 = 0.5F;
+ var10.setColorRGBA_F(0.9F * var32, 0.9F * var32, 1.0F * var32, 7.3F);
+ double var33 = 0.1D + (double) var18 * 0.2D;
+
+ if (var20 == 0)
+ {
+ var33 *= (double) var27 * 0.1D + 1.0D;
+ }
+
+ double var35 = 0.1D + (double) var18 * 0.2D;
+
+ if (var20 == 0)
+ {
+ var35 *= (double) (var27 - 1) * 0.1D + 1.0D;
+ }
+
+ for (int var37 = 0; var37 < 5; ++var37)
+ {
+ double var38 = var2 + 0.5D - var33;
+ double var40 = var6 + 0.5D - var33;
+
+ if (var37 == 1 || var37 == 2)
+ {
+ var38 += var33 * 2.0D;
+ }
+
+ if (var37 == 2 || var37 == 3)
+ {
+ var40 += var33 * 2.0D;
+ }
+
+ double var42 = var2 + 0.5D - var35;
+ double var44 = var6 + 0.5D - var35;
+
+ if (var37 == 1 || var37 == 2)
+ {
+ var42 += var35 * 2.0D;
+ }
+
+ if (var37 == 2 || var37 == 3)
+ {
+ var44 += var35 * 2.0D;
+ }
+
+ var10.addVertex(var42 + var23, var4 + (double) (var27 * 16), var44 + var25);
+ var10.addVertex(var38 + var28, var4 + (double) ((var27 + 1) * 16), var40 + var30);
+ }
+
+ var10.draw();
+ }
+ }
+ }
+
+ GL11.glDepthMask(false);
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glEnable(GL11.GL_LIGHTING);
+ GL11.glEnable(GL11.GL_TEXTURE_2D);
+ }
+
+ /**
+ * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
+ * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
+ * (Render 0.0F)
+ {
+ float var22 = -MathHelper.sin(var21 * 3.0F) * var21;
+ GL11.glRotatef(var22, 0.0F, 0.0F, 1.0F);
+ }
+
+ GL11.glRotatef(45.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glScalef(var20, var20, var20);
+ GL11.glTranslatef(-4.0F, 0.0F, 0.0F);
+ GL11.glNormal3f(var20, 0.0F, 0.0F);
+ var10.startDrawingQuads();
+ var10.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double) var16, (double) var18);
+ var10.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double) var17, (double) var18);
+ var10.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double) var17, (double) var19);
+ var10.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double) var16, (double) var19);
+ var10.draw();
+ GL11.glNormal3f(-var20, 0.0F, 0.0F);
+ var10.startDrawingQuads();
+ var10.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double) var16, (double) var18);
+ var10.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double) var17, (double) var18);
+ var10.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double) var17, (double) var19);
+ var10.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double) var16, (double) var19);
+ var10.draw();
+
+ for (int var23 = 0; var23 < 5; ++var23)
+ {
+ GL11.glRotatef(72.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glNormal3f(0.0F, 0.0F, var20);
+ var10.startDrawingQuads();
+ var10.addVertexWithUV(-8.0D, -2.0D, 0.0D, (double) var12, (double) var14);
+ var10.addVertexWithUV(8.0D, -2.0D, 0.0D, (double) var13, (double) var14);
+ var10.addVertexWithUV(8.0D, 2.0D, 0.0D, (double) var13, (double) var15);
+ var10.addVertexWithUV(-8.0D, 2.0D, 0.0D, (double) var12, (double) var15);
+ var10.draw();
+ }
+
+ GL11.glDisable(GL12.GL_RESCALE_NORMAL);
+ GL11.glPopMatrix();
+ }
+ }
+
+ /**
+ * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
+ * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
+ * (Render 0.0F)
+ {
+ float var22 = -MathHelper.sin(var21 * 3.0F) * var21;
+ GL11.glRotatef(var22, 0.0F, 0.0F, 1.0F);
+ }
+
+ GL11.glRotatef(45.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glScalef(var20, var20, var20);
+ GL11.glTranslatef(-4.0F, 0.0F, 0.0F);
+ GL11.glNormal3f(var20, 0.0F, 0.0F);
+ var10.startDrawingQuads();
+ var10.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double) var16, (double) var18);
+ var10.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double) var17, (double) var18);
+ var10.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double) var17, (double) var19);
+ var10.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double) var16, (double) var19);
+ var10.draw();
+ GL11.glNormal3f(-var20, 0.0F, 0.0F);
+ var10.startDrawingQuads();
+ var10.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double) var16, (double) var18);
+ var10.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double) var17, (double) var18);
+ var10.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double) var17, (double) var19);
+ var10.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double) var16, (double) var19);
+ var10.draw();
+
+ for (int var23 = 0; var23 < 5; ++var23)
+ {
+ GL11.glRotatef(72.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glNormal3f(0.0F, 0.0F, var20);
+ var10.startDrawingQuads();
+ var10.addVertexWithUV(-8.0D, -2.0D, 0.0D, (double) var12, (double) var14);
+ var10.addVertexWithUV(8.0D, -2.0D, 0.0D, (double) var13, (double) var14);
+ var10.addVertexWithUV(8.0D, 2.0D, 0.0D, (double) var13, (double) var15);
+ var10.addVertexWithUV(-8.0D, 2.0D, 0.0D, (double) var12, (double) var15);
+ var10.draw();
+ }
+
+ GL11.glDisable(GL12.GL_RESCALE_NORMAL);
+ GL11.glPopMatrix();
+ }
+ }
+
+ /**
+ * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
+ * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
+ * (Render 0.0F)
+ {
+ float var22 = -MathHelper.sin(var21 * 3.0F) * var21;
+ GL11.glRotatef(var22, 0.0F, 0.0F, 1.0F);
+ }
+
+ GL11.glRotatef(45.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glScalef(var20, var20, var20);
+ GL11.glTranslatef(-4.0F, 0.0F, 0.0F);
+ GL11.glNormal3f(var20, 0.0F, 0.0F);
+ var10.startDrawingQuads();
+ var10.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double) var16, (double) var18);
+ var10.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double) var17, (double) var18);
+ var10.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double) var17, (double) var19);
+ var10.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double) var16, (double) var19);
+ var10.draw();
+ GL11.glNormal3f(-var20, 0.0F, 0.0F);
+ var10.startDrawingQuads();
+ var10.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double) var16, (double) var18);
+ var10.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double) var17, (double) var18);
+ var10.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double) var17, (double) var19);
+ var10.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double) var16, (double) var19);
+ var10.draw();
+
+ for (int var23 = 0; var23 < 5; ++var23)
+ {
+ GL11.glRotatef(72.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glNormal3f(0.0F, 0.0F, var20);
+ var10.startDrawingQuads();
+ var10.addVertexWithUV(-8.0D, -2.0D, 0.0D, (double) var12, (double) var14);
+ var10.addVertexWithUV(8.0D, -2.0D, 0.0D, (double) var13, (double) var14);
+ var10.addVertexWithUV(8.0D, 2.0D, 0.0D, (double) var13, (double) var15);
+ var10.addVertexWithUV(-8.0D, 2.0D, 0.0D, (double) var12, (double) var15);
+ var10.draw();
+ }
+
+ GL11.glDisable(GL12.GL_RESCALE_NORMAL);
+ GL11.glPopMatrix();
+ }
+ }
+
+ /**
+ * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
+ * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
+ * (Render 0)
+ {
+ var16 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.2F / var19;
+ var15 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.2F / var19;
+ var17 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.2F / var19;
+ GL11.glTranslatef(var16, var15, var17);
+ }
+
+ var16 = 1.0F;
+ this.itemRenderBlocks.renderBlockAsItem(var18, var10.getItemDamage(), var16);
+ GL11.glPopMatrix();
+ }
+ } else if (var10.getItem().requiresMultipleRenderPasses())
+ {
+ if (renderInFrame)
+ {
+ GL11.glScalef(0.5128205F, 0.5128205F, 0.5128205F);
+ GL11.glTranslatef(0.0F, -0.05F, 0.0F);
+ } else
+ {
+ GL11.glScalef(0.5F, 0.5F, 0.5F);
+ }
+
+ this.loadTexture("/gui/items.png");
+
+ for (var20 = 0; var20 < var10.getItem().getRenderPasses(var10.getItemDamage()); ++var20)
+ {
+ this.random.setSeed(187L);
+ Icon var21 = var10.getItem().getIcon(var10, var20);
+ var19 = 1.0F;
+
+ if (this.renderWithColor)
+ {
+ var14 = Item.itemsList[var10.itemID].getColorFromItemStack(var10, var20);
+ var16 = (float) (var14 >> 16 & 255) / 255.0F;
+ var15 = (float) (var14 >> 8 & 255) / 255.0F;
+ var17 = (float) (var14 & 255) / 255.0F;
+ GL11.glColor4f(var16 * var19, var15 * var19, var17 * var19, 1.0F);
+ this.renderDroppedItem(var1, var21, var13, var9, var16 * var19, var15 * var19, var17 * var19);
+ } else
+ {
+ this.renderDroppedItem(var1, var21, var13, var9, 1.0F, 1.0F, 1.0F);
+ }
+ }
+ } else
+ {
+ if (renderInFrame)
+ {
+ GL11.glScalef(0.5128205F, 0.5128205F, 0.5128205F);
+ GL11.glTranslatef(0.0F, -0.05F, 0.0F);
+ } else
+ {
+ GL11.glScalef(0.5F, 0.5F, 0.5F);
+ }
+
+ Icon var23 = var10.getIconIndex();
+
+ if (var10.getItemSpriteNumber() == 0)
+ {
+ this.loadTexture("/terrain.png");
+ } else
+ {
+ this.loadTexture("/gui/items.png");
+ }
+
+ if (this.renderWithColor)
+ {
+ int var24 = Item.itemsList[var10.itemID].getColorFromItemStack(var10, 0);
+ var19 = (float) (var24 >> 16 & 255) / 255.0F;
+ float var22 = (float) (var24 >> 8 & 255) / 255.0F;
+ var16 = (float) (var24 & 255) / 255.0F;
+ var15 = 1.0F;
+ this.renderDroppedItem(var1, var23, var13, var9, var19 * var15, var22 * var15, var16 * var15);
+ } else
+ {
+ this.renderDroppedItem(var1, var23, var13, var9, 1.0F, 1.0F, 1.0F);
+ }
+ }
+ }
+
+ GL11.glDisable(GL12.GL_RESCALE_NORMAL);
+ GL11.glPopMatrix();
+ }
+ }
+
+ private void renderDroppedItem(EntityItem var1, Icon var2, int var3, float var4, float var5, float var6, float var7)
+ {
+ Tessellator var8 = Tessellator.instance;
+
+ if (var2 == null)
+ {
+ var2 = this.renderManager.renderEngine.getMissingIcon(var1.getEntityItem().getItemSpriteNumber());
+ }
+
+ float var9 = var2.getMinU();
+ float var10 = var2.getMaxU();
+ float var11 = var2.getMinV();
+ float var12 = var2.getMaxV();
+ float var13 = 1.0F;
+ float var14 = 0.5F;
+ float var15 = 0.25F;
+ float var16;
+
+ if (this.renderManager.options.fancyGraphics)
+ {
+ GL11.glPushMatrix();
+
+ if (renderInFrame)
+ {
+ GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
+ } else
+ {
+ GL11.glRotatef((((float) var1.age + var4) / 20.0F + var1.hoverStart) * (180F / (float) Math.PI), 0.0F, 1.0F, 0.0F);
+ }
+
+ float var17 = 0.0625F;
+ var16 = 0.021875F;
+ ItemStack var18 = var1.getEntityItem();
+ int var19 = var18.stackSize;
+ byte var20 = this.getMiniItemCount(var18);
+ GL11.glTranslatef(-var14, -var15, -((var17 + var16) * (float) var20 / 2.0F));
+
+ for (int var21 = 0; var21 < var20; ++var21)
+ {
+ float var24;
+ float var23;
+ float var22;
+
+ if (var21 > 0 && this.shouldSpreadItems())
+ {
+ var22 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.3F / 0.5F;
+ var23 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.3F / 0.5F;
+ var24 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.3F / 0.5F;
+ GL11.glTranslatef(var22, var23, var17 + var16);
+ } else
+ {
+ GL11.glTranslatef(0.0F, 0.0F, var17 + var16);
+ }
+
+ if (var18.getItemSpriteNumber() == 0)
+ {
+ this.loadTexture("/terrain.png");
+ } else
+ {
+ this.loadTexture("/gui/items.png");
+ }
+
+ GL11.glColor4f(var5, var6, var7, 1.0F);
+ ItemRenderer.renderItemIn2D(var8, var10, var11, var9, var12, var2.getSheetWidth(), var2.getSheetHeight(), var17);
+
+ if (var18 != null && var18.hasEffect())
+ {
+ GL11.glDepthFunc(GL11.GL_EQUAL);
+ GL11.glDisable(GL11.GL_LIGHTING);
+ this.renderManager.renderEngine.bindTexture("%blur%/misc/glint.png");
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE);
+ var22 = 0.76F;
+ GL11.glColor4f(0.5F * var22, 0.25F * var22, 0.8F * var22, 1.0F);
+ GL11.glMatrixMode(GL11.GL_TEXTURE);
+ GL11.glPushMatrix();
+ var23 = 0.125F;
+ GL11.glScalef(var23, var23, var23);
+ var24 = (float) (Minecraft.getSystemTime() % 3000L) / 3000.0F * 8.0F;
+ GL11.glTranslatef(var24, 0.0F, 0.0F);
+ GL11.glRotatef(-50.0F, 0.0F, 0.0F, 1.0F);
+ ItemRenderer.renderItemIn2D(var8, 0.0F, 0.0F, 1.0F, 1.0F, 255, 255, var17);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glScalef(var23, var23, var23);
+ var24 = (float) (Minecraft.getSystemTime() % 4873L) / 4873.0F * 8.0F;
+ GL11.glTranslatef(-var24, 0.0F, 0.0F);
+ GL11.glRotatef(10.0F, 0.0F, 0.0F, 1.0F);
+ ItemRenderer.renderItemIn2D(var8, 0.0F, 0.0F, 1.0F, 1.0F, 255, 255, var17);
+ GL11.glPopMatrix();
+ GL11.glMatrixMode(GL11.GL_MODELVIEW);
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glEnable(GL11.GL_LIGHTING);
+ GL11.glDepthFunc(GL11.GL_LEQUAL);
+ }
+ }
+
+ GL11.glPopMatrix();
+ } else
+ {
+ for (int var27 = 0; var27 < var3; ++var27)
+ {
+ GL11.glPushMatrix();
+
+ if (var27 > 0)
+ {
+ var16 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.3F;
+ float var26 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.3F;
+ float var25 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.3F;
+ GL11.glTranslatef(var16, var26, var25);
+ }
+
+ if (!renderInFrame)
+ {
+ GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
+ }
+
+ GL11.glColor4f(var5, var6, var7, 1.0F);
+ var8.startDrawingQuads();
+ var8.setNormal(0.0F, 1.0F, 0.0F);
+ var8.addVertexWithUV((double) (0.0F - var14), (double) (0.0F - var15), 0.0D, (double) var9, (double) var12);
+ var8.addVertexWithUV((double) (var13 - var14), (double) (0.0F - var15), 0.0D, (double) var10, (double) var12);
+ var8.addVertexWithUV((double) (var13 - var14), (double) (1.0F - var15), 0.0D, (double) var10, (double) var11);
+ var8.addVertexWithUV((double) (0.0F - var14), (double) (1.0F - var15), 0.0D, (double) var9, (double) var11);
+ var8.draw();
+ GL11.glPopMatrix();
+ }
+ }
+ }
+
+ public void renderItemIntoGUI(FontRenderer var1, RenderEngine var2, ItemStack var3, int var4, int var5)
+ {
+ int var6 = var3.itemID;
+ int var7 = var3.getItemDamage();
+ Icon var8 = var3.getIconIndex();
+ Block var12 = var6 < Block.blocksList.length ? Block.blocksList[var6] : null;
+ float var10;
+ float var11;
+ float var9;
+ int var13;
+
+ if (var3.getItemSpriteNumber() == 0 && var12 != null && RenderBlocks.renderItemIn3d(Block.blocksList[var6].getRenderType()))
+ {
+ var2.bindTexture("/terrain.png");
+ GL11.glPushMatrix();
+ GL11.glTranslatef((float) (var4 - 2), (float) (var5 + 3), -3.0F + this.zLevel);
+ GL11.glScalef(10.0F, 10.0F, 10.0F);
+ GL11.glTranslatef(1.0F, 0.5F, 1.0F);
+ GL11.glScalef(1.0F, 1.0F, -1.0F);
+ GL11.glRotatef(210.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
+ var13 = Item.itemsList[var6].getColorFromItemStack(var3, 0);
+ var11 = (float) (var13 >> 16 & 255) / 255.0F;
+ var9 = (float) (var13 >> 8 & 255) / 255.0F;
+ var10 = (float) (var13 & 255) / 255.0F;
+
+ if (this.renderWithColor)
+ {
+ GL11.glColor4f(var11, var9, var10, 1.0F);
+ }
+
+ GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
+ this.itemRenderBlocks.useInventoryTint = this.renderWithColor;
+ this.itemRenderBlocks.renderBlockAsItem(var12, var7, 1.0F);
+ this.itemRenderBlocks.useInventoryTint = true;
+ GL11.glPopMatrix();
+ } else if (Item.itemsList[var6].requiresMultipleRenderPasses())
+ {
+ GL11.glDisable(GL11.GL_LIGHTING);
+ var2.bindTexture(var3.getItemSpriteNumber() == 0 ? "/terrain.png" : "/gui/items.png");
+
+ for (var13 = 0; var13 < Item.itemsList[var6].getRenderPasses(var7); ++var13)
+ {
+ Icon var14 = Item.itemsList[var6].getIcon(var3, var13);
+ int var15 = Item.itemsList[var6].getColorFromItemStack(var3, var13);
+ var9 = (float) (var15 >> 16 & 255) / 255.0F;
+ var10 = (float) (var15 >> 8 & 255) / 255.0F;
+ float var16 = (float) (var15 & 255) / 255.0F;
+
+ if (this.renderWithColor)
+ {
+ GL11.glColor4f(var9, var10, var16, 1.0F);
+ }
+
+ this.renderIcon(var4, var5, var14, 16, 16);
+ }
+
+ GL11.glEnable(GL11.GL_LIGHTING);
+ } else
+ {
+ GL11.glDisable(GL11.GL_LIGHTING);
+
+ if (var3.getItemSpriteNumber() == 0)
+ {
+ var2.bindTexture("/terrain.png");
+ } else
+ {
+ var2.bindTexture("/gui/items.png");
+ }
+
+ if (var8 == null)
+ {
+ var8 = var2.getMissingIcon(var3.getItemSpriteNumber());
+ }
+
+ var13 = Item.itemsList[var6].getColorFromItemStack(var3, 0);
+ float var17 = (float) (var13 >> 16 & 255) / 255.0F;
+ var11 = (float) (var13 >> 8 & 255) / 255.0F;
+ var9 = (float) (var13 & 255) / 255.0F;
+
+ if (this.renderWithColor)
+ {
+ GL11.glColor4f(var17, var11, var9, 1.0F);
+ }
+
+ this.renderIcon(var4, var5, var8, 16, 16);
+ GL11.glEnable(GL11.GL_LIGHTING);
+ }
+
+ GL11.glEnable(GL11.GL_CULL_FACE);
+ }
+
+ public void renderItemAndEffectIntoGUI(FontRenderer var1, RenderEngine var2, ItemStack var3, int var4, int var5)
+ {
+ if (var3 != null)
+ {
+ if (!ForgeHooksClient.renderInventoryItem(this.renderBlocks, var2, var3, this.renderWithColor, this.zLevel, (float) var4, (float) var5))
+ {
+ this.renderItemIntoGUI(var1, var2, var3, var4, var5);
+ }
+
+ if (var3.hasEffect())
+ {
+ GL11.glDepthFunc(GL11.GL_GREATER);
+ GL11.glDisable(GL11.GL_LIGHTING);
+ GL11.glDepthMask(false);
+ var2.bindTexture("%blur%/misc/glint.png");
+ this.zLevel -= 50.0F;
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_DST_COLOR, GL11.GL_DST_COLOR);
+ GL11.glColor4f(0.5F, 0.25F, 0.8F, 1.0F);
+ this.renderGlint(var4 * 431278612 + var5 * 32178161, var4 - 2, var5 - 2, 20, 20);
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glDepthMask(true);
+ this.zLevel += 50.0F;
+ GL11.glEnable(GL11.GL_LIGHTING);
+ GL11.glDepthFunc(GL11.GL_LEQUAL);
+ }
+ }
+ }
+
+ private void renderGlint(int var1, int var2, int var3, int var4, int var5)
+ {
+ for (int var6 = 0; var6 < 2; ++var6)
+ {
+ if (var6 == 0)
+ {
+ GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE);
+ }
+
+ if (var6 == 1)
+ {
+ GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE);
+ }
+
+ float var7 = 0.00390625F;
+ float var8 = 0.00390625F;
+ float var9 = (float) (Minecraft.getSystemTime() % (long) (3000 + var6 * 1873)) / (3000.0F + (float) (var6 * 1873)) * 256.0F;
+ float var10 = 0.0F;
+ Tessellator var11 = Tessellator.instance;
+ float var12 = 4.0F;
+
+ if (var6 == 1)
+ {
+ var12 = -1.0F;
+ }
+
+ var11.startDrawingQuads();
+ var11.addVertexWithUV((double) (var2 + 0), (double) (var3 + var5), (double) this.zLevel, (double) ((var9 + (float) var5 * var12) * var7), (double) ((var10 + (float) var5) * var8));
+ var11.addVertexWithUV((double) (var2 + var4), (double) (var3 + var5), (double) this.zLevel, (double) ((var9 + (float) var4 + (float) var5 * var12) * var7), (double) ((var10 + (float) var5) * var8));
+ var11.addVertexWithUV((double) (var2 + var4), (double) (var3 + 0), (double) this.zLevel, (double) ((var9 + (float) var4) * var7), (double) ((var10 + 0.0F) * var8));
+ var11.addVertexWithUV((double) (var2 + 0), (double) (var3 + 0), (double) this.zLevel, (double) ((var9 + 0.0F) * var7), (double) ((var10 + 0.0F) * var8));
+ var11.draw();
+ }
+ }
+
+ public void renderItemOverlayIntoGUI(FontRenderer var1, RenderEngine var2, ItemStack var3, int var4, int var5)
+ {
+ this.renderItemStack(var1, var2, var3, var4, var5, (String) null);
+ }
+
+ public void renderItemStack(FontRenderer var1, RenderEngine var2, ItemStack var3, int var4, int var5, String var6)
+ {
+ if (var3 != null)
+ {
+ if (var3.stackSize > 1 || var6 != null)
+ {
+ String var7 = var6 == null ? String.valueOf(var3.stackSize) : var6;
+ GL11.glDisable(GL11.GL_LIGHTING);
+ GL11.glDisable(GL11.GL_DEPTH_TEST);
+ var1.drawStringWithShadow(var7, var4 + 19 - 2 - var1.getStringWidth(var7), var5 + 6 + 3, 16777215);
+ GL11.glEnable(GL11.GL_LIGHTING);
+ GL11.glEnable(GL11.GL_DEPTH_TEST);
+ }
+
+ if (var3.isItemDamaged())
+ {
+ int var12 = (int) Math.round(13.0D - (double) var3.getItemDamageForDisplay() * 13.0D / (double) var3.getMaxDamage());
+ int var8 = (int) Math.round(255.0D - (double) var3.getItemDamageForDisplay() * 255.0D / (double) var3.getMaxDamage());
+ GL11.glDisable(GL11.GL_LIGHTING);
+ GL11.glDisable(GL11.GL_DEPTH_TEST);
+ GL11.glDisable(GL11.GL_TEXTURE_2D);
+ Tessellator var9 = Tessellator.instance;
+ int var10 = 255 - var8 << 16 | var8 << 8;
+ int var11 = (255 - var8) / 4 << 16 | 16128;
+ this.renderQuad(var9, var4 + 2, var5 + 13, 13, 2, 0);
+ this.renderQuad(var9, var4 + 2, var5 + 13, 12, 1, var11);
+ this.renderQuad(var9, var4 + 2, var5 + 13, var12, 1, var10);
+ GL11.glEnable(GL11.GL_TEXTURE_2D);
+ GL11.glEnable(GL11.GL_LIGHTING);
+ GL11.glEnable(GL11.GL_DEPTH_TEST);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ }
+ }
+ }
+
+ private void renderQuad(Tessellator var1, int var2, int var3, int var4, int var5, int var6)
+ {
+ var1.startDrawingQuads();
+ var1.setColorOpaque_I(var6);
+ var1.addVertex((double) (var2 + 0), (double) (var3 + 0), 0.0D);
+ var1.addVertex((double) (var2 + 0), (double) (var3 + var5), 0.0D);
+ var1.addVertex((double) (var2 + var4), (double) (var3 + var5), 0.0D);
+ var1.addVertex((double) (var2 + var4), (double) (var3 + 0), 0.0D);
+ var1.draw();
+ }
+
+ public void renderIcon(int var1, int var2, Icon var3, int var4, int var5)
+ {
+ Tessellator var6 = Tessellator.instance;
+ var6.startDrawingQuads();
+ var6.addVertexWithUV((double) (var1 + 0), (double) (var2 + var5), (double) this.zLevel, (double) var3.getMinU(), (double) var3.getMaxV());
+ var6.addVertexWithUV((double) (var1 + var4), (double) (var2 + var5), (double) this.zLevel, (double) var3.getMaxU(), (double) var3.getMaxV());
+ var6.addVertexWithUV((double) (var1 + var4), (double) (var2 + 0), (double) this.zLevel, (double) var3.getMaxU(), (double) var3.getMinV());
+ var6.addVertexWithUV((double) (var1 + 0), (double) (var2 + 0), (double) this.zLevel, (double) var3.getMinU(), (double) var3.getMinV());
+ var6.draw();
+ }
+
+ /**
+ * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
+ * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
+ * (Render 1)
+ {
+ var2 = 2;
+ }
+
+ if (var1.stackSize > 5)
+ {
+ var2 = 3;
+ }
+
+ if (var1.stackSize > 20)
+ {
+ var2 = 4;
+ }
+
+ if (var1.stackSize > 40)
+ {
+ var2 = 5;
+ }
+
+ return var2;
+ }
+
+ public byte getMiniItemCount(ItemStack var1)
+ {
+ byte var2 = 1;
+
+ if (var1.stackSize > 1)
+ {
+ var2 = 2;
+ }
+
+ if (var1.stackSize > 15)
+ {
+ var2 = 3;
+ }
+
+ if (var1.stackSize > 31)
+ {
+ var2 = 4;
+ }
+
+ return var2;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/renders/RenderFloatingBlock.java b/src/main/java/net/aetherteam/aether/client/renders/RenderFloatingBlock.java
new file mode 100644
index 0000000..d920940
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/renders/RenderFloatingBlock.java
@@ -0,0 +1,49 @@
+package net.aetherteam.aether.client.renders;
+
+import net.aetherteam.aether.entities.EntityFloatingBlock;
+import net.minecraft.block.Block;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.RenderBlocks;
+import net.minecraft.client.renderer.entity.Render;
+import net.minecraft.entity.Entity;
+import org.lwjgl.opengl.GL11;
+
+public class RenderFloatingBlock extends Render
+{
+ static RenderBlocks renderBlocks;
+
+ public RenderFloatingBlock()
+ {
+ this.shadowSize = 0.5F;
+ renderBlocks = new RenderBlocks();
+ }
+
+ public void renderFloatingBlock(EntityFloatingBlock var1, double var2, double var4, double var6, float var8, float var9)
+ {
+ Block var10 = Block.blocksList[var1.getBlockID()];
+ GL11.glPushMatrix();
+ GL11.glTranslatef((float) var2, (float) var4, (float) var6);
+ GL11.glDisable(GL11.GL_LIGHTING);
+ GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
+
+ if (var10 != null)
+ {
+ Minecraft.getMinecraft().renderEngine.resetBoundTexture();
+ this.loadTexture("/terrain.png");
+ renderBlocks.renderBlockAsItem(var10, var1.getMetadata(), var1.getBrightness(var9));
+ }
+
+ GL11.glPopMatrix();
+ }
+
+ /**
+ * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
+ * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
+ * (Render= 180.0F)
+ {
+ var4 -= 360.0F;
+ }
+
+ return var1 + var3 * var4;
+ }
+
+ public void doRender(EntityLiving var1, double var2, double var4, double var6, float var8, float var9)
+ {
+ this.doRenderLiving(var1, var2, var4, var6, var8, var9);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/renders/RenderHandlerAltar.java b/src/main/java/net/aetherteam/aether/client/renders/RenderHandlerAltar.java
new file mode 100644
index 0000000..8b3e564
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/renders/RenderHandlerAltar.java
@@ -0,0 +1,40 @@
+package net.aetherteam.aether.client.renders;
+
+import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.tile_entities.TileEntityAltar;
+import net.minecraft.block.Block;
+import net.minecraft.client.renderer.RenderBlocks;
+import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
+import net.minecraft.world.IBlockAccess;
+
+@SideOnly(Side.CLIENT)
+public class RenderHandlerAltar implements ISimpleBlockRenderingHandler
+{
+ public TileEntityAltar dummyAltar = new TileEntityAltar();
+
+ public void renderInventoryBlock(Block var1, int var2, int var3, RenderBlocks var4)
+ {
+ if (var3 == this.getRenderId())
+ {
+ TileEntityRenderer.instance.renderTileEntityAt(this.dummyAltar, 0.0D, -0.1D, 0.0D, 0.0F);
+ }
+ }
+
+ public boolean renderWorldBlock(IBlockAccess var1, int var2, int var3, int var4, Block var5, int var6, RenderBlocks var7)
+ {
+ return false;
+ }
+
+ public boolean shouldRender3DInInventory()
+ {
+ return true;
+ }
+
+ public int getRenderId()
+ {
+ return AetherBlocks.altarRenderId;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/renders/RenderHandlerSkyrootChest.java b/src/main/java/net/aetherteam/aether/client/renders/RenderHandlerSkyrootChest.java
new file mode 100644
index 0000000..7509742
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/renders/RenderHandlerSkyrootChest.java
@@ -0,0 +1,40 @@
+package net.aetherteam.aether.client.renders;
+
+import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.tile_entities.TileEntitySkyrootChest;
+import net.minecraft.block.Block;
+import net.minecraft.client.renderer.RenderBlocks;
+import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
+import net.minecraft.world.IBlockAccess;
+
+@SideOnly(Side.CLIENT)
+public class RenderHandlerSkyrootChest implements ISimpleBlockRenderingHandler
+{
+ public TileEntitySkyrootChest dummyTreasureChest = new TileEntitySkyrootChest();
+
+ public void renderInventoryBlock(Block var1, int var2, int var3, RenderBlocks var4)
+ {
+ if (var3 == this.getRenderId())
+ {
+ TileEntityRenderer.instance.renderTileEntityAt(this.dummyTreasureChest, 0.0D, 0.0D, 0.0D, 0.0F);
+ }
+ }
+
+ public boolean renderWorldBlock(IBlockAccess var1, int var2, int var3, int var4, Block var5, int var6, RenderBlocks var7)
+ {
+ return false;
+ }
+
+ public boolean shouldRender3DInInventory()
+ {
+ return true;
+ }
+
+ public int getRenderId()
+ {
+ return AetherBlocks.skyrootChestRenderId;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/renders/RenderHandlerTreasureChest.java b/src/main/java/net/aetherteam/aether/client/renders/RenderHandlerTreasureChest.java
new file mode 100644
index 0000000..227b85b
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/renders/RenderHandlerTreasureChest.java
@@ -0,0 +1,40 @@
+package net.aetherteam.aether.client.renders;
+
+import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.tile_entities.TileEntityTreasureChest;
+import net.minecraft.block.Block;
+import net.minecraft.client.renderer.RenderBlocks;
+import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
+import net.minecraft.world.IBlockAccess;
+
+@SideOnly(Side.CLIENT)
+public class RenderHandlerTreasureChest implements ISimpleBlockRenderingHandler
+{
+ public TileEntityTreasureChest dummyTreasureChest = new TileEntityTreasureChest();
+
+ public void renderInventoryBlock(Block var1, int var2, int var3, RenderBlocks var4)
+ {
+ if (var3 == this.getRenderId())
+ {
+ TileEntityRenderer.instance.renderTileEntityAt(this.dummyTreasureChest, 0.0D, 0.0D, 0.0D, 0.0F);
+ }
+ }
+
+ public boolean renderWorldBlock(IBlockAccess var1, int var2, int var3, int var4, Block var5, int var6, RenderBlocks var7)
+ {
+ return false;
+ }
+
+ public boolean shouldRender3DInInventory()
+ {
+ return true;
+ }
+
+ public int getRenderId()
+ {
+ return AetherBlocks.treasureChestRenderId;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/renders/RenderHostEye.java b/src/main/java/net/aetherteam/aether/client/renders/RenderHostEye.java
new file mode 100644
index 0000000..1db6ea0
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/renders/RenderHostEye.java
@@ -0,0 +1,61 @@
+package net.aetherteam.aether.client.renders;
+
+import net.aetherteam.aether.entities.bosses.EntityHostEye;
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.renderer.OpenGlHelper;
+import net.minecraft.client.renderer.entity.RenderLiving;
+import net.minecraft.entity.EntityLiving;
+import org.lwjgl.opengl.GL11;
+
+public class RenderHostEye extends RenderLiving
+{
+ public RenderHostEye(ModelBase var1, float var2)
+ {
+ super(var1, var2);
+ this.renderPassModel = var1;
+ }
+
+ /**
+ * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
+ * entityLiving, partialTickTime
+ */
+ protected void preRenderCallback(EntityLiving var1, float var2)
+ {
+ EntityHostEye var3 = (EntityHostEye) var1;
+
+ if (var3.harvey > 0.01F)
+ {
+ GL11.glRotatef(var3.harvey * -30.0F, (float) var3.rennis, 0.0F, (float) var3.dennis);
+ }
+ }
+
+ protected int setSliderEyeBrightness(EntityHostEye var1, int var2, float var3)
+ {
+ if (var2 != 0)
+ {
+ return -1;
+ } else
+ {
+ this.loadTexture("/net/aetherteam/aether/client/sprites/mobs/host/hosteye.png");
+ float var4 = 1.0F;
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glDisable(GL11.GL_ALPHA_TEST);
+ GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
+ char var5 = 61680;
+ int var6 = var5 % 65536;
+ int var7 = var5 / 65536;
+ OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) var6 / 1.0F, (float) var7 / 1.0F);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, var4);
+ return 1;
+ }
+ }
+
+ /**
+ * Queries whether should render the specified pass or not.
+ */
+ protected int shouldRenderPass(EntityLiving var1, int var2, float var3)
+ {
+ return this.setSliderEyeBrightness((EntityHostEye) var1, var2, var3);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/renders/RenderLabyrinthEye.java b/src/main/java/net/aetherteam/aether/client/renders/RenderLabyrinthEye.java
new file mode 100644
index 0000000..db6b8dc
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/renders/RenderLabyrinthEye.java
@@ -0,0 +1,88 @@
+package net.aetherteam.aether.client.renders;
+
+import net.aetherteam.aether.client.models.ModelLabyrinthEye;
+import net.aetherteam.aether.entities.bosses.EntityLabyrinthEye;
+import net.minecraft.client.renderer.OpenGlHelper;
+import net.minecraft.client.renderer.entity.RenderLiving;
+import net.minecraft.entity.EntityLiving;
+import org.lwjgl.opengl.GL11;
+
+public class RenderLabyrinthEye extends RenderLiving
+{
+ public RenderLabyrinthEye(ModelLabyrinthEye var1, float var2)
+ {
+ super(var1, var2);
+ this.setRenderPassModel(var1);
+ }
+
+ /**
+ * Renders the model in RenderLiving
+ */
+ protected void renderModel(EntityLiving var1, float var2, float var3, float var4, float var5, float var6, float var7)
+ {
+ if (!var1.getHasActivePotion())
+ {
+ GL11.glTranslatef(0.0F, 0.0F, 0.0F);
+ this.loadDownloadableImageTexture(var1.skinUrl, var1.getTexture());
+ GL11.glPushMatrix();
+ GL11.glRotatef((float) (var1.ticksExisted * 10), 0.0F, 0.0F, 1.0F);
+
+ if (var1.motionX == 0.0D && var1.motionZ != 0.0D)
+ {
+ ;
+ }
+
+ this.mainModel.render(var1, var2, var3, var4, var5, var6, var7);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glPopMatrix();
+ ((ModelLabyrinthEye) this.mainModel).renderEye(var1, var2, var3, var4, var5, var6, var7);
+ }
+ }
+
+ protected int setMarkingBrightness(EntityLabyrinthEye var1, int var2, float var3)
+ {
+ if (var2 != 0)
+ {
+ return -1;
+ } else
+ {
+ if (var1.getAwake())
+ {
+ this.loadTexture("/net/aetherteam/aether/client/sprites/mobs/cogboss/cogglow.png");
+ } else
+ {
+ this.loadTexture("/net/aetherteam/aether/client/sprites/mobs/cogboss/cogglowblue.png");
+ }
+
+ float var4 = 1.0F;
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glRotatef((float) (var1.ticksExisted * 10), 0.0F, 1.0F, 0.0F);
+ GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
+
+ if (var1.getHasActivePotion())
+ {
+ GL11.glDepthMask(false);
+ } else
+ {
+ GL11.glDepthMask(true);
+ }
+
+ char var5 = 61680;
+ int var6 = var5 % 65536;
+ int var7 = var5 / 65536;
+ OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) var6 / 1.0F, (float) var7 / 1.0F);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, var4);
+ return 1;
+ }
+ }
+
+ /**
+ * Queries whether should render the specified pass or not.
+ */
+ protected int shouldRenderPass(EntityLiving var1, int var2, float var3)
+ {
+ return this.setMarkingBrightness((EntityLabyrinthEye) var1, var2, var3);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/renders/RenderLightningKnife.java b/src/main/java/net/aetherteam/aether/client/renders/RenderLightningKnife.java
new file mode 100644
index 0000000..0c9920f
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/renders/RenderLightningKnife.java
@@ -0,0 +1,125 @@
+package net.aetherteam.aether.client.renders;
+
+import net.aetherteam.aether.entities.EntityLightningKnife;
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.entity.Render;
+import net.minecraft.entity.Entity;
+import net.minecraft.util.Icon;
+import org.lwjgl.opengl.GL11;
+import org.lwjgl.opengl.GL12;
+
+public class RenderLightningKnife extends Render
+{
+ /**
+ * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
+ * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
+ * (Render 0.01F)
+ {
+ GL11.glRotatef(var3.harvey * -30.0F, (float) var3.rennis, 0.0F, (float) var3.dennis);
+ }
+ }
+
+ protected int setSliderEyeBrightness(EntityMiniSlider var1, int var2, float var3)
+ {
+ if (var2 != 0)
+ {
+ return -1;
+ } else
+ {
+ this.loadTexture("/net/aetherteam/aether/client/sprites/mobs/host/hosteye.png");
+ float var4 = 1.0F;
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glDisable(GL11.GL_ALPHA_TEST);
+ GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
+ char var5 = 61680;
+ int var6 = var5 % 65536;
+ int var7 = var5 / 65536;
+ OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) var6 / 1.0F, (float) var7 / 1.0F);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, var4);
+ return 1;
+ }
+ }
+
+ /**
+ * Queries whether should render the specified pass or not.
+ */
+ protected int shouldRenderPass(EntityLiving var1, int var2, float var3)
+ {
+ return this.setSliderEyeBrightness((EntityMiniSlider) var1, var2, var3);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/renders/RenderMoa.java b/src/main/java/net/aetherteam/aether/client/renders/RenderMoa.java
new file mode 100644
index 0000000..e7334ef
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/renders/RenderMoa.java
@@ -0,0 +1,77 @@
+package net.aetherteam.aether.client.renders;
+
+import net.aetherteam.aether.entities.mounts.EntityMoa;
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.renderer.entity.RenderLiving;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.util.MathHelper;
+import org.lwjgl.opengl.GL11;
+
+public class RenderMoa extends RenderLiving
+{
+ public RenderMoa(ModelBase var1, float var2)
+ {
+ super(var1, var2);
+ }
+
+ protected float getWingRotation(EntityMoa var1, float var2)
+ {
+ float var3 = var1.field_756_e + (var1.field_752_b - var1.field_756_e) * var2;
+ float var4 = var1.field_757_d + (var1.destPos - var1.field_757_d) * var2;
+ return (MathHelper.sin(var3) + 1.0F) * var4;
+ }
+
+ /**
+ * Defines what float the third param in setRotationAngles of ModelBase is
+ */
+ protected float handleRotationFloat(EntityLiving var1, float var2)
+ {
+ return this.getWingRotation((EntityMoa) var1, var2);
+ }
+
+ protected void scalemoa()
+ {
+ GL11.glScalef(1.8F, 1.8F, 1.8F);
+ }
+
+ /**
+ * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
+ * entityLiving, partialTickTime
+ */
+ protected void preRenderCallback(EntityLiving var1, float var2)
+ {
+ if (!(var1 instanceof EntityMoa) || !((EntityMoa) var1).isBaby())
+ {
+ this.scalemoa();
+ }
+ }
+
+ private float interpolateRotation(float var1, float var2, float var3)
+ {
+ float var4;
+
+ for (var4 = var2 - var1; var4 < -180.0F; var4 += 360.0F)
+ {
+ ;
+ }
+
+ while (var4 >= 180.0F)
+ {
+ var4 -= 360.0F;
+ }
+
+ return var1 + var3 * var4;
+ }
+
+ /**
+ * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
+ * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
+ * (Render 0)
+ {
+ var4 *= 0.45F;
+ var4 -= 0.125F;
+ var5 = 1.75F + (float) Math.sin((double) (var3.sinage + 2.0F)) * 1.5F;
+ } else
+ {
+ var4 *= 0.25F;
+ var5 = 1.75F + (float) Math.sin((double) (var3.sinage + 2.0F)) * 1.5F;
+ }
+
+ this.newZephyrModel.sinage = var4;
+ this.newZephyrModel.sinage2 = var5;
+ this.shadowSize = 0.75F;
+ GL11.glScalef(1.25F, 1.25F, 1.25F);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/renders/RenderNotchWave.java b/src/main/java/net/aetherteam/aether/client/renders/RenderNotchWave.java
new file mode 100644
index 0000000..826d2b3
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/renders/RenderNotchWave.java
@@ -0,0 +1,54 @@
+package net.aetherteam.aether.client.renders;
+
+import net.aetherteam.aether.entities.EntityNotchWave;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.entity.Render;
+import net.minecraft.entity.Entity;
+import org.lwjgl.opengl.GL11;
+import org.lwjgl.opengl.GL12;
+
+public class RenderNotchWave extends Render
+{
+ private float field_77002_a;
+
+ public RenderNotchWave(float var1)
+ {
+ this.field_77002_a = var1;
+ }
+
+ public void doRenderNotchWave(EntityNotchWave var1, double var2, double var4, double var6, float var8, float var9)
+ {
+ GL11.glPushMatrix();
+ GL11.glTranslatef((float) var2, (float) var4, (float) var6);
+ GL11.glEnable(GL12.GL_RESCALE_NORMAL);
+ float var10 = this.field_77002_a;
+ GL11.glScalef(var10 / 1.0F, var10 / 1.0F, var10 / 1.0F);
+ this.loadTexture("/net/aetherteam/aether/client/sprites/projectiles/notchwave/notchwave.png");
+ Tessellator var11 = Tessellator.instance;
+ float var12 = 1.0F;
+ float var13 = 0.5F;
+ float var14 = 0.25F;
+ GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
+ GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
+ var11.startDrawingQuads();
+ var11.setNormal(0.0F, 1.0F, 0.0F);
+ var11.addVertexWithUV((double) (0.0F - var13), (double) (0.0F - var14), 0.0D, 0.0D, 0.0D);
+ var11.addVertexWithUV((double) (var12 - var13), (double) (0.0F - var14), 0.0D, 0.0D, 1.0D);
+ var11.addVertexWithUV((double) (var12 - var13), (double) (1.0F - var14), 0.0D, 1.0D, 1.0D);
+ var11.addVertexWithUV((double) (0.0F - var13), (double) (1.0F - var14), 0.0D, 1.0D, 0.0D);
+ var11.draw();
+ GL11.glDisable(GL12.GL_RESCALE_NORMAL);
+ GL11.glPopMatrix();
+ }
+
+ /**
+ * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
+ * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
+ * (Render= 180.0F)
+ {
+ var4 -= 360.0F;
+ }
+
+ return var1 + var3 * var4;
+ }
+
+ public void doRender(EntityLiving var1, double var2, double var4, double var6, float var8, float var9)
+ {
+ this.doRenderLiving(var1, var2, var4, var6, var8, var9);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/renders/RenderPoisonNeedle.java b/src/main/java/net/aetherteam/aether/client/renders/RenderPoisonNeedle.java
new file mode 100644
index 0000000..cd7a13d
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/renders/RenderPoisonNeedle.java
@@ -0,0 +1,87 @@
+package net.aetherteam.aether.client.renders;
+
+import net.aetherteam.aether.entities.EntityPoisonNeedle;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.entity.Render;
+import net.minecraft.entity.Entity;
+import net.minecraft.util.MathHelper;
+import org.lwjgl.opengl.GL11;
+import org.lwjgl.opengl.GL12;
+
+public class RenderPoisonNeedle extends Render
+{
+ public void renderPoisonNeedle(EntityPoisonNeedle var1, double var2, double var4, double var6, float var8, float var9)
+ {
+ if (var1.victim == null)
+ {
+ this.loadTexture("/net/aetherteam/aether/client/sprites/projectiles/dart/entitypoisonneedle.png");
+ GL11.glPushMatrix();
+ GL11.glTranslatef((float) var2, (float) var4, (float) var6);
+ GL11.glRotatef(var1.prevRotationYaw + (var1.rotationYaw - var1.prevRotationYaw) * var9 - 90.0F, 0.0F, 1.0F, 0.0F);
+ GL11.glRotatef(var1.prevRotationPitch + (var1.rotationPitch - var1.prevRotationPitch) * var9, 0.0F, 0.0F, 1.0F);
+ Tessellator var10 = Tessellator.instance;
+ byte var11 = 1;
+ float var12 = 0.0F;
+ float var13 = 0.5F;
+ float var14 = (float) (0 + var11 * 10) / 32.0F;
+ float var15 = (float) (5 + var11 * 10) / 32.0F;
+ float var16 = 0.0F;
+ float var17 = 0.15625F;
+ float var18 = (float) (5 + var11 * 10) / 32.0F;
+ float var19 = (float) (10 + var11 * 10) / 32.0F;
+ float var20 = 0.05625F;
+ GL11.glEnable(GL12.GL_RESCALE_NORMAL);
+ float var21 = (float) var1.arrowShake - var9;
+
+ if (var21 > 0.0F)
+ {
+ float var22 = -MathHelper.sin(var21 * 3.0F) * var21;
+ GL11.glRotatef(var22, 0.0F, 0.0F, 1.0F);
+ }
+
+ GL11.glRotatef(45.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glScalef(var20, var20, var20);
+ GL11.glTranslatef(-4.0F, 0.0F, 0.0F);
+ GL11.glNormal3f(var20, 0.0F, 0.0F);
+ var10.startDrawingQuads();
+ var10.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double) var16, (double) var18);
+ var10.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double) var17, (double) var18);
+ var10.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double) var17, (double) var19);
+ var10.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double) var16, (double) var19);
+ var10.draw();
+ GL11.glNormal3f(-var20, 0.0F, 0.0F);
+ var10.startDrawingQuads();
+ var10.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double) var16, (double) var18);
+ var10.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double) var17, (double) var18);
+ var10.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double) var17, (double) var19);
+ var10.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double) var16, (double) var19);
+ var10.draw();
+
+ for (int var23 = 0; var23 < 5; ++var23)
+ {
+ GL11.glRotatef(72.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glNormal3f(0.0F, 0.0F, var20);
+ var10.startDrawingQuads();
+ var10.addVertexWithUV(-8.0D, -2.0D, 0.0D, (double) var12, (double) var14);
+ var10.addVertexWithUV(8.0D, -2.0D, 0.0D, (double) var13, (double) var14);
+ var10.addVertexWithUV(8.0D, 2.0D, 0.0D, (double) var13, (double) var15);
+ var10.addVertexWithUV(-8.0D, 2.0D, 0.0D, (double) var12, (double) var15);
+ var10.draw();
+ }
+
+ GL11.glDisable(GL12.GL_RESCALE_NORMAL);
+ GL11.glPopMatrix();
+ }
+ }
+
+ /**
+ * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
+ * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
+ * (Render= 0.5D)
+ {
+ return;
+ }
+
+ var11 = Math.min(1.0F - (float) (var1.getFire() - 30) / 30.0F, 0.9F);
+ }
+
+ GL11.glPushMatrix();
+ GL11.glDisable(GL11.GL_CULL_FACE);
+ GL11.glTranslatef((float) var2, (float) var4 + 2.2F, (float) var6);
+ GL11.glRotatef(var1.renderYawOffset + 180.0F, 0.0F, -1.0F, 0.0F);
+ GL11.glScalef(var11, var11, var11);
+ GL11.glTranslated(-0.25D, 0.0D, -0.25D);
+ GL11.glEnable(GL12.GL_RESCALE_NORMAL);
+ float var12 = 0.0625F;
+ GL11.glTranslated(0.0D, Math.sin((double) var10) * 2.4000000953674316D - 2.0D, Math.sin((double) (1.0F - var10)) * -1.399999976158142D);
+ GL11.glEnable(GL11.GL_ALPHA_TEST);
+ this.loadDownloadableImageTexture((String) null, "/net/aetherteam/aether/client/sprites/mobs/sentry/sentry_lit.png");
+ this.Box.render(var1, var12);
+ GL11.glPopMatrix();
+ }
+
+ protected int setMarkingBrightness(EntitySentryGolem var1, int var2, float var3)
+ {
+ if (var2 != 0)
+ {
+ return -1;
+ } else
+ {
+ this.loadTexture("/net/aetherteam/aether/client/sprites/mobs/sentrygolem/sentryGolemGreenGlow.png");
+ this.model.isDefault = false;
+ this.model.armState = var1.getHandState();
+ float var4 = 1.0F;
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
+
+ if (var1.getHasActivePotion())
+ {
+ GL11.glDepthMask(false);
+ } else
+ {
+ GL11.glDepthMask(true);
+ }
+
+ char var5 = 61680;
+ int var6 = var5 % 65536;
+ int var7 = var5 / 65536;
+ OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) var6 / 1.0F, (float) var7 / 1.0F);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, var4);
+ return 1;
+ }
+ }
+
+ /**
+ * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
+ * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
+ * (Render 0.01F)
+ {
+ GL11.glRotatef(var3.harvey * -30.0F, (float) var3.rennis, 0.0F, (float) var3.dennis);
+ }
+ }
+
+ protected int setSliderEyeBrightness(EntitySlider var1, int var2, float var3)
+ {
+ if (var2 != 0)
+ {
+ return -1;
+ } else
+ {
+ if (var1.getAwake())
+ {
+ if (var1.getCritical())
+ {
+ this.loadTexture("/net/aetherteam/aether/client/sprites/bosses/slider/sliderAwakeGlow_red.png");
+ } else
+ {
+ this.loadTexture("/net/aetherteam/aether/client/sprites/bosses/slider/sliderAwakeGlow.png");
+ }
+
+ float var4 = 1.0F;
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glDisable(GL11.GL_ALPHA_TEST);
+ GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
+ char var5 = 61680;
+ int var6 = var5 % 65536;
+ int var7 = var5 / 65536;
+ OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) var6 / 1.0F, (float) var7 / 1.0F);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, var4);
+ }
+
+ return 1;
+ }
+ }
+
+ /**
+ * Queries whether should render the specified pass or not.
+ */
+ protected int shouldRenderPass(EntityLiving var1, int var2, float var3)
+ {
+ return this.setSliderEyeBrightness((EntitySlider) var1, var2, var3);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/renders/RenderSliderHostMimic.java b/src/main/java/net/aetherteam/aether/client/renders/RenderSliderHostMimic.java
new file mode 100644
index 0000000..0ae83f5
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/renders/RenderSliderHostMimic.java
@@ -0,0 +1,65 @@
+package net.aetherteam.aether.client.renders;
+
+import net.aetherteam.aether.entities.bosses.EntitySliderHostMimic;
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.renderer.OpenGlHelper;
+import net.minecraft.client.renderer.entity.RenderLiving;
+import net.minecraft.entity.EntityLiving;
+import org.lwjgl.opengl.GL11;
+
+public class RenderSliderHostMimic extends RenderLiving
+{
+ public RenderSliderHostMimic(ModelBase var1, float var2)
+ {
+ super(var1, var2);
+ this.setRenderPassModel(var1);
+ }
+
+ protected int setMarkingBrightness(EntitySliderHostMimic var1, int var2, float var3)
+ {
+ if (var2 != 0)
+ {
+ return -1;
+ } else if (var1.isAwake())
+ {
+ if (!var1.hasBeenAttacked)
+ {
+ this.loadTexture("/net/aetherteam/aether/client/sprites/mobs/host/hostblue_glow.png");
+ } else
+ {
+ this.loadTexture("/net/aetherteam/aether/client/sprites/mobs/host/hostred_glow.png");
+ }
+
+ float var4 = 1.0F;
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
+
+ if (var1.getHasActivePotion())
+ {
+ GL11.glDepthMask(false);
+ } else
+ {
+ GL11.glDepthMask(true);
+ }
+
+ char var5 = 61680;
+ int var6 = var5 % 65536;
+ int var7 = var5 / 65536;
+ OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) var6 / 1.0F, (float) var7 / 1.0F);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, var4);
+ return 1;
+ } else
+ {
+ return -1;
+ }
+ }
+
+ /**
+ * Queries whether should render the specified pass or not.
+ */
+ protected int shouldRenderPass(EntityLiving var1, int var2, float var3)
+ {
+ return this.setMarkingBrightness((EntitySliderHostMimic) var1, var2, var3);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/renders/RenderSwet.java b/src/main/java/net/aetherteam/aether/client/renders/RenderSwet.java
new file mode 100644
index 0000000..f2bfdd5
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/renders/RenderSwet.java
@@ -0,0 +1,88 @@
+package net.aetherteam.aether.client.renders;
+
+import net.aetherteam.aether.entities.mounts.EntitySwet;
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.renderer.entity.RenderLiving;
+import net.minecraft.entity.EntityLiving;
+import org.lwjgl.opengl.GL11;
+
+public class RenderSwet extends RenderLiving
+{
+ private ModelBase field_22001_a;
+
+ public RenderSwet(ModelBase var1, ModelBase var2, float var3)
+ {
+ super(var1, var3);
+ this.field_22001_a = var2;
+ }
+
+ protected int a(EntitySwet var1, int var2, float var3)
+ {
+ if (var2 == 0)
+ {
+ this.setRenderPassModel(this.field_22001_a);
+ GL11.glEnable(GL11.GL_NORMALIZE);
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ return 1;
+ } else
+ {
+ if (var2 == 1)
+ {
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ }
+
+ return -1;
+ }
+ }
+
+ protected void a(EntitySwet var1, float var2)
+ {
+ float var3 = 1.0F;
+ float var4 = 1.0F;
+ float var5 = 1.5F;
+
+ if (!var1.onGround)
+ {
+ if (var1.motionY > 0.8500000238418579D)
+ {
+ var4 = 1.425F;
+ var3 = 0.575F;
+ } else if (var1.motionY < -0.8500000238418579D)
+ {
+ var4 = 0.575F;
+ var3 = 1.425F;
+ } else
+ {
+ float var6 = (float) var1.motionY * 0.5F;
+ var4 += var6;
+ var3 -= var6;
+ }
+ }
+
+ if (var1.riddenByEntity != null)
+ {
+ var5 = 1.5F + (var1.riddenByEntity.width + var1.riddenByEntity.height) * 0.75F;
+ }
+
+ GL11.glScalef(var3 * var5, var4 * var5, var3 * var5);
+ }
+
+ /**
+ * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
+ * entityLiving, partialTickTime
+ */
+ protected void preRenderCallback(EntityLiving var1, float var2)
+ {
+ this.a((EntitySwet) var1, var2);
+ }
+
+ /**
+ * Queries whether should render the specified pass or not.
+ */
+ protected int shouldRenderPass(EntityLiving var1, int var2, float var3)
+ {
+ return this.a((EntitySwet) var1, var2, var3);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/renders/RenderTNTPresent.java b/src/main/java/net/aetherteam/aether/client/renders/RenderTNTPresent.java
new file mode 100644
index 0000000..7dbcf5d
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/renders/RenderTNTPresent.java
@@ -0,0 +1,77 @@
+package net.aetherteam.aether.client.renders;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.entities.EntityTNTPresent;
+import net.minecraft.block.Block;
+import net.minecraft.client.renderer.RenderBlocks;
+import net.minecraft.client.renderer.entity.Render;
+import net.minecraft.entity.Entity;
+import org.lwjgl.opengl.GL11;
+
+public class RenderTNTPresent extends Render
+{
+ private RenderBlocks blockRenderer = new RenderBlocks();
+
+ public RenderTNTPresent()
+ {
+ this.shadowSize = 0.5F;
+ }
+
+ public void renderPrimedTNT(EntityTNTPresent var1, double var2, double var4, double var6, float var8, float var9)
+ {
+ GL11.glPushMatrix();
+ GL11.glTranslatef((float) var2, (float) var4, (float) var6);
+ float var10;
+
+ if ((float) var1.fuse - var9 + 1.0F < 10.0F)
+ {
+ var10 = 1.0F - ((float) var1.fuse - var9 + 1.0F) / 10.0F;
+
+ if (var10 < 0.0F)
+ {
+ var10 = 0.0F;
+ }
+
+ if (var10 > 1.0F)
+ {
+ var10 = 1.0F;
+ }
+
+ var10 *= var10;
+ var10 *= var10;
+ float var11 = 1.0F + var10 * 0.3F;
+ GL11.glScalef(1.0F, 1.0F, 1.0F);
+ }
+
+ var10 = (1.0F - ((float) var1.fuse - var9 + 1.0F) / 100.0F) * 0.8F;
+ this.loadTexture("/terrain.png");
+ this.blockRenderer.renderBlockAsItem(AetherBlocks.Present, 0, var1.getBrightness(var9));
+
+ if (var1.fuse / 5 % 2 == 0)
+ {
+ GL11.glDisable(GL11.GL_TEXTURE_2D);
+ GL11.glDisable(GL11.GL_LIGHTING);
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_DST_ALPHA);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, var10);
+ this.blockRenderer.renderBlockAsItem(Block.tnt, 0, 1.0F);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glEnable(GL11.GL_LIGHTING);
+ GL11.glEnable(GL11.GL_TEXTURE_2D);
+ }
+
+ GL11.glPopMatrix();
+ }
+
+ /**
+ * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
+ * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
+ * (Render 0)
+ {
+ var4 *= 0.45F;
+ var4 -= 0.125F;
+ var5 = 1.75F + (float) Math.sin((double) (var3.sinage + 2.0F)) * 1.5F;
+ } else
+ {
+ var4 *= 0.25F;
+ var5 = 1.75F + (float) Math.sin((double) (var3.sinage + 2.0F)) * 1.5F;
+ }
+
+ this.tempestModel.sinage = var4;
+ this.tempestModel.sinage2 = var5;
+ this.shadowSize = 0.25F;
+ GL11.glScalef(1.5F, 1.5F, 1.5F);
+ }
+
+ protected int setMarkingBrightness(EntityTempest var1, int var2, float var3)
+ {
+ if (var2 != 0)
+ {
+ return -1;
+ } else
+ {
+ this.loadTexture("/net/aetherteam/aether/client/sprites/mobs/tempest/glow.png");
+ float var4 = 1.0F;
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
+ GL11.glDepthMask(false);
+ char var5 = 61680;
+ int var6 = var5 % 65536;
+ int var7 = var5 / 65536;
+ OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) var6 / 1.0F, (float) var7 / 1.0F);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, var4);
+ return 1;
+ }
+ }
+
+ /**
+ * Queries whether should render the specified pass or not.
+ */
+ protected int shouldRenderPass(EntityLiving var1, int var2, float var3)
+ {
+ return this.setMarkingBrightness((EntityTempest) var1, var2, var3);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/renders/RenderTempestBall.java b/src/main/java/net/aetherteam/aether/client/renders/RenderTempestBall.java
new file mode 100644
index 0000000..afb4d6f
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/client/renders/RenderTempestBall.java
@@ -0,0 +1,38 @@
+package net.aetherteam.aether.client.renders;
+
+import net.aetherteam.aether.client.models.ModelTempestBall;
+import net.aetherteam.aether.entities.EntityTempestBall;
+import net.minecraft.client.renderer.entity.RenderEntity;
+import net.minecraft.entity.Entity;
+import org.lwjgl.opengl.GL11;
+import org.lwjgl.opengl.GL12;
+
+public class RenderTempestBall extends RenderEntity
+{
+ private ModelTempestBall ball = new ModelTempestBall();
+
+ public void render(EntityTempestBall var1, double var2, double var4, double var6, float var8, float var9)
+ {
+ GL11.glPushMatrix();
+ GL11.glDisable(GL11.GL_CULL_FACE);
+ GL11.glTranslatef((float) var2, (float) var4, (float) var6);
+ GL11.glEnable(GL12.GL_RESCALE_NORMAL);
+ GL11.glScalef(0.65F, 0.65F, 0.65F);
+ GL11.glRotatef(var1.rotationYaw + 180.0F, 0.0F, 1.0F, 0.0F);
+ GL11.glEnable(GL11.GL_ALPHA_TEST);
+ this.loadDownloadableImageTexture((String) null, "/net/aetherteam/aether/client/sprites/projectiles/electroball/electroball.png");
+ this.ball.render(var1, 0.0625F);
+ GL11.glPopMatrix();
+ }
+
+ /**
+ * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
+ * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
+ * (Render 0)
+ {
+ var16 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.2F / var19;
+ var15 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.2F / var19;
+ var17 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.2F / var19;
+ GL11.glTranslatef(var16, var15, var17);
+ }
+
+ var16 = 1.0F;
+ this.itemRenderBlocks.renderBlockAsItem(var18, var10.getItemDamage(), var16);
+ GL11.glPopMatrix();
+ }
+ } else if (var10.getItem().requiresMultipleRenderPasses())
+ {
+ if (renderInFrame)
+ {
+ GL11.glScalef(0.5128205F, 0.5128205F, 0.5128205F);
+ GL11.glTranslatef(0.0F, -0.05F, 0.0F);
+ } else
+ {
+ GL11.glScalef(0.5F, 0.5F, 0.5F);
+ }
+
+ this.loadTexture("/gui/items.png");
+
+ for (var20 = 0; var20 < var10.getItem().getRenderPasses(var10.getItemDamage()); ++var20)
+ {
+ this.random.setSeed(187L);
+ Icon var21 = var10.getItem().getIcon(var10, var20);
+ var19 = 1.0F;
+
+ if (this.renderWithColor)
+ {
+ var14 = Item.itemsList[var10.itemID].getColorFromItemStack(var10, var20);
+ var16 = (float) (var14 >> 16 & 255) / 255.0F;
+ var15 = (float) (var14 >> 8 & 255) / 255.0F;
+ var17 = (float) (var14 & 255) / 255.0F;
+ GL11.glColor4f(var16 * var19, var15 * var19, var17 * var19, 1.0F);
+ this.renderDroppedItem(var1, var21, var13, var9, var16 * var19, var15 * var19, var17 * var19);
+ } else
+ {
+ this.renderDroppedItem(var1, var21, var13, var9, 1.0F, 1.0F, 1.0F);
+ }
+ }
+ } else
+ {
+ if (renderInFrame)
+ {
+ GL11.glScalef(0.5128205F, 0.5128205F, 0.5128205F);
+ GL11.glTranslatef(0.0F, -0.05F, 0.0F);
+ } else
+ {
+ GL11.glScalef(0.5F, 0.5F, 0.5F);
+ }
+
+ Icon var23 = var10.getIconIndex();
+
+ if (var10.getItemSpriteNumber() == 0)
+ {
+ this.loadTexture("/terrain.png");
+ } else
+ {
+ this.loadTexture("/gui/items.png");
+ }
+
+ if (this.renderWithColor)
+ {
+ int var24 = Item.itemsList[var10.itemID].getColorFromItemStack(var10, 0);
+ var19 = (float) (var24 >> 16 & 255) / 255.0F;
+ float var22 = (float) (var24 >> 8 & 255) / 255.0F;
+ var16 = (float) (var24 & 255) / 255.0F;
+ var15 = 1.0F;
+ this.renderDroppedItem(var1, var23, var13, var9, var19 * var15, var22 * var15, var16 * var15);
+ } else
+ {
+ this.renderDroppedItem(var1, var23, var13, var9, 1.0F, 1.0F, 1.0F);
+ }
+ }
+ }
+
+ GL11.glDisable(GL12.GL_RESCALE_NORMAL);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+
+ private void renderDroppedItem(EntityRewardItem var1, Icon var2, int var3, float var4, float var5, float var6, float var7)
+ {
+ Tessellator var8 = Tessellator.instance;
+
+ if (var2 == null)
+ {
+ var2 = this.renderManager.renderEngine.getMissingIcon(var1.getEntityItem().getItemSpriteNumber());
+ }
+
+ float var9 = var2.getMinU();
+ float var10 = var2.getMaxU();
+ float var11 = var2.getMinV();
+ float var12 = var2.getMaxV();
+ float var13 = 1.0F;
+ float var14 = 0.5F;
+ float var15 = 0.25F;
+ float var16;
+
+ if (this.renderManager.options.fancyGraphics)
+ {
+ GL11.glPushMatrix();
+
+ if (renderInFrame)
+ {
+ GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
+ } else
+ {
+ GL11.glRotatef((((float) var1.age + var4) / 20.0F + var1.hoverStart) * (180F / (float) Math.PI), 0.0F, 1.0F, 0.0F);
+ }
+
+ float var17 = 0.0625F;
+ var16 = 0.021875F;
+ ItemStack var18 = var1.getEntityItem();
+ int var19 = var18.stackSize;
+ byte var20 = this.getMiniItemCount(var18);
+ GL11.glTranslatef(-var14, -var15, -((var17 + var16) * (float) var20 / 2.0F));
+
+ for (int var21 = 0; var21 < var20; ++var21)
+ {
+ float var24;
+ float var23;
+ float var22;
+
+ if (var21 > 0 && this.shouldSpreadItems())
+ {
+ var22 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.3F / 0.5F;
+ var23 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.3F / 0.5F;
+ var24 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.3F / 0.5F;
+ GL11.glTranslatef(var22, var23, var17 + var16);
+ } else
+ {
+ GL11.glTranslatef(0.0F, 0.0F, var17 + var16);
+ }
+
+ if (var18.getItemSpriteNumber() == 0)
+ {
+ this.loadTexture("/terrain.png");
+ } else
+ {
+ this.loadTexture("/gui/items.png");
+ }
+
+ GL11.glColor4f(var5, var6, var7, 1.0F);
+ ItemRenderer.renderItemIn2D(var8, var10, var11, var9, var12, var2.getSheetWidth(), var2.getSheetHeight(), var17);
+
+ if (var18 != null && var18.hasEffect())
+ {
+ GL11.glDepthFunc(GL11.GL_EQUAL);
+ GL11.glDisable(GL11.GL_LIGHTING);
+ this.renderManager.renderEngine.bindTexture("%blur%/misc/glint.png");
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE);
+ var22 = 0.76F;
+ GL11.glColor4f(0.5F * var22, 0.25F * var22, 0.8F * var22, 1.0F);
+ GL11.glMatrixMode(GL11.GL_TEXTURE);
+ GL11.glPushMatrix();
+ var23 = 0.125F;
+ GL11.glScalef(var23, var23, var23);
+ var24 = (float) (Minecraft.getSystemTime() % 3000L) / 3000.0F * 8.0F;
+ GL11.glTranslatef(var24, 0.0F, 0.0F);
+ GL11.glRotatef(-50.0F, 0.0F, 0.0F, 1.0F);
+ ItemRenderer.renderItemIn2D(var8, 0.0F, 0.0F, 1.0F, 1.0F, 255, 255, var17);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glScalef(var23, var23, var23);
+ var24 = (float) (Minecraft.getSystemTime() % 4873L) / 4873.0F * 8.0F;
+ GL11.glTranslatef(-var24, 0.0F, 0.0F);
+ GL11.glRotatef(10.0F, 0.0F, 0.0F, 1.0F);
+ ItemRenderer.renderItemIn2D(var8, 0.0F, 0.0F, 1.0F, 1.0F, 255, 255, var17);
+ GL11.glPopMatrix();
+ GL11.glMatrixMode(GL11.GL_MODELVIEW);
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glEnable(GL11.GL_LIGHTING);
+ GL11.glDepthFunc(GL11.GL_LEQUAL);
+ }
+ }
+
+ GL11.glPopMatrix();
+ } else
+ {
+ for (int var25 = 0; var25 < var3; ++var25)
+ {
+ GL11.glPushMatrix();
+
+ if (var25 > 0)
+ {
+ var16 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.3F;
+ float var26 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.3F;
+ float var27 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.3F;
+ GL11.glTranslatef(var16, var26, var27);
+ }
+
+ if (!renderInFrame)
+ {
+ GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
+ }
+
+ GL11.glColor4f(var5, var6, var7, 1.0F);
+ var8.startDrawingQuads();
+ var8.setNormal(0.0F, 1.0F, 0.0F);
+ var8.addVertexWithUV((double) (0.0F - var14), (double) (0.0F - var15), 0.0D, (double) var9, (double) var12);
+ var8.addVertexWithUV((double) (var13 - var14), (double) (0.0F - var15), 0.0D, (double) var10, (double) var12);
+ var8.addVertexWithUV((double) (var13 - var14), (double) (1.0F - var15), 0.0D, (double) var10, (double) var11);
+ var8.addVertexWithUV((double) (0.0F - var14), (double) (1.0F - var15), 0.0D, (double) var9, (double) var11);
+ var8.draw();
+ GL11.glPopMatrix();
+ }
+ }
+ }
+
+ public void renderItemIntoGUI(FontRenderer var1, RenderEngine var2, ItemStack var3, int var4, int var5)
+ {
+ int var6 = var3.itemID;
+ int var7 = var3.getItemDamage();
+ Icon var8 = var3.getIconIndex();
+ Block var12 = var6 < Block.blocksList.length ? Block.blocksList[var6] : null;
+ float var10;
+ float var11;
+ float var9;
+ int var13;
+
+ if (var3.getItemSpriteNumber() == 0 && var12 != null && RenderBlocks.renderItemIn3d(Block.blocksList[var6].getRenderType()))
+ {
+ var2.bindTexture("/terrain.png");
+ GL11.glPushMatrix();
+ GL11.glTranslatef((float) (var4 - 2), (float) (var5 + 3), -3.0F + this.zLevel);
+ GL11.glScalef(10.0F, 10.0F, 10.0F);
+ GL11.glTranslatef(1.0F, 0.5F, 1.0F);
+ GL11.glScalef(1.0F, 1.0F, -1.0F);
+ GL11.glRotatef(210.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
+ var13 = Item.itemsList[var6].getColorFromItemStack(var3, 0);
+ var11 = (float) (var13 >> 16 & 255) / 255.0F;
+ var9 = (float) (var13 >> 8 & 255) / 255.0F;
+ var10 = (float) (var13 & 255) / 255.0F;
+
+ if (this.renderWithColor)
+ {
+ GL11.glColor4f(var11, var9, var10, 1.0F);
+ }
+
+ GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
+ this.itemRenderBlocks.useInventoryTint = this.renderWithColor;
+ this.itemRenderBlocks.renderBlockAsItem(var12, var7, 1.0F);
+ this.itemRenderBlocks.useInventoryTint = true;
+ GL11.glPopMatrix();
+ } else if (Item.itemsList[var6].requiresMultipleRenderPasses())
+ {
+ GL11.glDisable(GL11.GL_LIGHTING);
+ var2.bindTexture(var3.getItemSpriteNumber() == 0 ? "/terrain.png" : "/gui/items.png");
+
+ for (var13 = 0; var13 < Item.itemsList[var6].getRenderPasses(var7); ++var13)
+ {
+ Icon var14 = Item.itemsList[var6].getIcon(var3, var13);
+ int var15 = Item.itemsList[var6].getColorFromItemStack(var3, var13);
+ var9 = (float) (var15 >> 16 & 255) / 255.0F;
+ var10 = (float) (var15 >> 8 & 255) / 255.0F;
+ float var16 = (float) (var15 & 255) / 255.0F;
+
+ if (this.renderWithColor)
+ {
+ GL11.glColor4f(var9, var10, var16, 1.0F);
+ }
+
+ this.renderIcon(var4, var5, var14, 16, 16);
+ }
+
+ GL11.glEnable(GL11.GL_LIGHTING);
+ } else
+ {
+ GL11.glDisable(GL11.GL_LIGHTING);
+
+ if (var3.getItemSpriteNumber() == 0)
+ {
+ var2.bindTexture("/terrain.png");
+ } else
+ {
+ var2.bindTexture("/gui/items.png");
+ }
+
+ if (var8 == null)
+ {
+ var8 = var2.getMissingIcon(var3.getItemSpriteNumber());
+ }
+
+ var13 = Item.itemsList[var6].getColorFromItemStack(var3, 0);
+ float var17 = (float) (var13 >> 16 & 255) / 255.0F;
+ var11 = (float) (var13 >> 8 & 255) / 255.0F;
+ var9 = (float) (var13 & 255) / 255.0F;
+
+ if (this.renderWithColor)
+ {
+ GL11.glColor4f(var17, var11, var9, 1.0F);
+ }
+
+ this.renderIcon(var4, var5, var8, 16, 16);
+ GL11.glEnable(GL11.GL_LIGHTING);
+ }
+
+ GL11.glEnable(GL11.GL_CULL_FACE);
+ }
+
+ public void renderItemAndEffectIntoGUI(FontRenderer var1, RenderEngine var2, ItemStack var3, int var4, int var5)
+ {
+ if (var3 != null)
+ {
+ if (!ForgeHooksClient.renderInventoryItem(this.renderBlocks, var2, var3, this.renderWithColor, this.zLevel, (float) var4, (float) var5))
+ {
+ this.renderItemIntoGUI(var1, var2, var3, var4, var5);
+ }
+
+ if (var3.hasEffect())
+ {
+ GL11.glDepthFunc(GL11.GL_GREATER);
+ GL11.glDisable(GL11.GL_LIGHTING);
+ GL11.glDepthMask(false);
+ var2.bindTexture("%blur%/misc/glint.png");
+ this.zLevel -= 50.0F;
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_DST_COLOR, GL11.GL_DST_COLOR);
+ GL11.glColor4f(0.5F, 0.25F, 0.8F, 1.0F);
+ this.renderGlint(var4 * 431278612 + var5 * 32178161, var4 - 2, var5 - 2, 20, 20);
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glDepthMask(true);
+ this.zLevel += 50.0F;
+ GL11.glEnable(GL11.GL_LIGHTING);
+ GL11.glDepthFunc(GL11.GL_LEQUAL);
+ }
+ }
+ }
+
+ private void renderGlint(int var1, int var2, int var3, int var4, int var5)
+ {
+ for (int var6 = 0; var6 < 2; ++var6)
+ {
+ if (var6 == 0)
+ {
+ GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE);
+ }
+
+ if (var6 == 1)
+ {
+ GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE);
+ }
+
+ float var7 = 0.00390625F;
+ float var8 = 0.00390625F;
+ float var9 = (float) (Minecraft.getSystemTime() % (long) (3000 + var6 * 1873)) / (3000.0F + (float) (var6 * 1873)) * 256.0F;
+ float var10 = 0.0F;
+ Tessellator var11 = Tessellator.instance;
+ float var12 = 4.0F;
+
+ if (var6 == 1)
+ {
+ var12 = -1.0F;
+ }
+
+ var11.startDrawingQuads();
+ var11.addVertexWithUV((double) (var2 + 0), (double) (var3 + var5), (double) this.zLevel, (double) ((var9 + (float) var5 * var12) * var7), (double) ((var10 + (float) var5) * var8));
+ var11.addVertexWithUV((double) (var2 + var4), (double) (var3 + var5), (double) this.zLevel, (double) ((var9 + (float) var4 + (float) var5 * var12) * var7), (double) ((var10 + (float) var5) * var8));
+ var11.addVertexWithUV((double) (var2 + var4), (double) (var3 + 0), (double) this.zLevel, (double) ((var9 + (float) var4) * var7), (double) ((var10 + 0.0F) * var8));
+ var11.addVertexWithUV((double) (var2 + 0), (double) (var3 + 0), (double) this.zLevel, (double) ((var9 + 0.0F) * var7), (double) ((var10 + 0.0F) * var8));
+ var11.draw();
+ }
+ }
+
+ public void renderItemOverlayIntoGUI(FontRenderer var1, RenderEngine var2, ItemStack var3, int var4, int var5)
+ {
+ this.renderItemStack(var1, var2, var3, var4, var5, (String) null);
+ }
+
+ public void renderItemStack(FontRenderer var1, RenderEngine var2, ItemStack var3, int var4, int var5, String var6)
+ {
+ if (var3 != null)
+ {
+ if (var3.stackSize > 1 || var6 != null)
+ {
+ String var7 = var6 == null ? String.valueOf(var3.stackSize) : var6;
+ GL11.glDisable(GL11.GL_LIGHTING);
+ GL11.glDisable(GL11.GL_DEPTH_TEST);
+ var1.drawStringWithShadow(var7, var4 + 19 - 2 - var1.getStringWidth(var7), var5 + 6 + 3, 16777215);
+ GL11.glEnable(GL11.GL_LIGHTING);
+ GL11.glEnable(GL11.GL_DEPTH_TEST);
+ }
+
+ if (var3.isItemDamaged())
+ {
+ int var12 = (int) Math.round(13.0D - (double) var3.getItemDamageForDisplay() * 13.0D / (double) var3.getMaxDamage());
+ int var8 = (int) Math.round(255.0D - (double) var3.getItemDamageForDisplay() * 255.0D / (double) var3.getMaxDamage());
+ GL11.glDisable(GL11.GL_LIGHTING);
+ GL11.glDisable(GL11.GL_DEPTH_TEST);
+ GL11.glDisable(GL11.GL_TEXTURE_2D);
+ Tessellator var9 = Tessellator.instance;
+ int var10 = 255 - var8 << 16 | var8 << 8;
+ int var11 = (255 - var8) / 4 << 16 | 16128;
+ this.renderQuad(var9, var4 + 2, var5 + 13, 13, 2, 0);
+ this.renderQuad(var9, var4 + 2, var5 + 13, 12, 1, var11);
+ this.renderQuad(var9, var4 + 2, var5 + 13, var12, 1, var10);
+ GL11.glEnable(GL11.GL_TEXTURE_2D);
+ GL11.glEnable(GL11.GL_LIGHTING);
+ GL11.glEnable(GL11.GL_DEPTH_TEST);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ }
+ }
+ }
+
+ private void renderQuad(Tessellator var1, int var2, int var3, int var4, int var5, int var6)
+ {
+ var1.startDrawingQuads();
+ var1.setColorOpaque_I(var6);
+ var1.addVertex((double) (var2 + 0), (double) (var3 + 0), 0.0D);
+ var1.addVertex((double) (var2 + 0), (double) (var3 + var5), 0.0D);
+ var1.addVertex((double) (var2 + var4), (double) (var3 + var5), 0.0D);
+ var1.addVertex((double) (var2 + var4), (double) (var3 + 0), 0.0D);
+ var1.draw();
+ }
+
+ public void renderIcon(int var1, int var2, Icon var3, int var4, int var5)
+ {
+ Tessellator var6 = Tessellator.instance;
+ var6.startDrawingQuads();
+ var6.addVertexWithUV((double) (var1 + 0), (double) (var2 + var5), (double) this.zLevel, (double) var3.getMinU(), (double) var3.getMaxV());
+ var6.addVertexWithUV((double) (var1 + var4), (double) (var2 + var5), (double) this.zLevel, (double) var3.getMaxU(), (double) var3.getMaxV());
+ var6.addVertexWithUV((double) (var1 + var4), (double) (var2 + 0), (double) this.zLevel, (double) var3.getMaxU(), (double) var3.getMinV());
+ var6.addVertexWithUV((double) (var1 + 0), (double) (var2 + 0), (double) this.zLevel, (double) var3.getMinU(), (double) var3.getMinV());
+ var6.draw();
+ }
+
+ /**
+ * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
+ * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
+ * (Render 1)
+ {
+ var2 = 2;
+ }
+
+ if (var1.stackSize > 5)
+ {
+ var2 = 3;
+ }
+
+ if (var1.stackSize > 20)
+ {
+ var2 = 4;
+ }
+
+ if (var1.stackSize > 40)
+ {
+ var2 = 5;
+ }
+
+ return var2;
+ }
+
+ public byte getMiniItemCount(ItemStack var1)
+ {
+ byte var2 = 1;
+
+ if (var1.stackSize > 1)
+ {
+ var2 = 2;
+ }
+
+ if (var1.stackSize > 15)
+ {
+ var2 = 3;
+ }
+
+ if (var1.stackSize > 31)
+ {
+ var2 = 4;
+ }
+
+ return var2;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/client/sprites/menu/tug/seed_and_moa.jpg b/src/main/java/net/aetherteam/aether/client/sprites/menu/tug/seed_and_moa.jpg
new file mode 100644
index 0000000..58704d8
Binary files /dev/null and b/src/main/java/net/aetherteam/aether/client/sprites/menu/tug/seed_and_moa.jpg differ
diff --git a/src/main/java/net/aetherteam/aether/commands/CommandClearInventoryAether.java b/src/main/java/net/aetherteam/aether/commands/CommandClearInventoryAether.java
new file mode 100644
index 0000000..fbae2ea
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/commands/CommandClearInventoryAether.java
@@ -0,0 +1,73 @@
+package net.aetherteam.aether.commands;
+
+import java.util.List;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.containers.InventoryAether;
+import net.minecraft.command.CommandBase;
+import net.minecraft.command.CommandException;
+import net.minecraft.command.ICommandSender;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.server.MinecraftServer;
+
+public class CommandClearInventoryAether extends CommandBase
+{
+ public String getCommandName()
+ {
+ return "clear";
+ }
+
+ public String getCommandUsage(ICommandSender var1)
+ {
+ return var1.translateString("commands.clear.usage", new Object[0]);
+ }
+
+ /**
+ * Return the required permission level for this command.
+ */
+ public int getRequiredPermissionLevel()
+ {
+ return 2;
+ }
+
+ public void processCommand(ICommandSender var1, String[] var2)
+ {
+ EntityPlayerMP var3 = var2.length == 0 ? getCommandSenderAsPlayer(var1) : func_82359_c(var1, var2[0]);
+ int var4 = var2.length >= 2 ? parseIntWithMin(var1, var2[1], 1) : -1;
+ int var5 = var2.length >= 3 ? parseIntWithMin(var1, var2[2], 0) : -1;
+ int var6 = var3.inventory.clearInventory(var4, var5);
+ Aether.getServerPlayer(var3).inv.isEmpty();
+ Aether.getServerPlayer(var3).inv = new InventoryAether(var3);
+ Aether.getServerPlayer(var3).inv.onInventoryChanged();
+ var3.inventoryContainer.detectAndSendChanges();
+
+ if (var6 == 0 && Aether.getServerPlayer(var3).inv.isEmpty())
+ {
+ throw new CommandException("commands.clear.failure", new Object[]{var3.getEntityName()});
+ } else
+ {
+ notifyAdmins(var1, "commands.clear.success", new Object[]{var3.getEntityName(), Integer.valueOf(var6)});
+ }
+ }
+
+ /**
+ * Adds the strings available in this command to the given list of tab completion options.
+ */
+ public List addTabCompletionOptions(ICommandSender var1, String[] var2)
+ {
+ return var2.length == 1 ? getListOfStringsMatchingLastWord(var2, this.getAllOnlineUsernames()) : null;
+ }
+
+ protected String[] getAllOnlineUsernames()
+ {
+ return MinecraftServer.getServer().getAllUsernames();
+ }
+
+ /**
+ * Return whether the specified command parameter index is a username parameter.
+ */
+ public boolean isUsernameIndex(String[] var1, int var2)
+ {
+ return var2 == 0;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/commands/CommandTeleport.java b/src/main/java/net/aetherteam/aether/commands/CommandTeleport.java
new file mode 100644
index 0000000..6ed8b5c
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/commands/CommandTeleport.java
@@ -0,0 +1,195 @@
+package net.aetherteam.aether.commands;
+
+import java.util.List;
+
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.minecraft.command.CommandBase;
+import net.minecraft.command.ICommandSender;
+import net.minecraft.command.NumberInvalidException;
+import net.minecraft.command.PlayerNotFoundException;
+import net.minecraft.command.WrongUsageException;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.server.MinecraftServer;
+import net.minecraft.util.MathHelper;
+
+public class CommandTeleport extends CommandBase
+{
+ public String getCommandName()
+ {
+ return "tp";
+ }
+
+ /**
+ * Return the required permission level for this command.
+ */
+ public int getRequiredPermissionLevel()
+ {
+ return 2;
+ }
+
+ public String getCommandUsage(ICommandSender var1)
+ {
+ return var1.translateString("commands.tp.usage", new Object[0]);
+ }
+
+ public void processCommand(ICommandSender var1, String[] var2)
+ {
+ if (var2.length < 1)
+ {
+ throw new WrongUsageException("commands.tp.usage", new Object[0]);
+ } else
+ {
+ EntityPlayerMP var3;
+
+ if (var2.length != 2 && var2.length != 4)
+ {
+ var3 = getCommandSenderAsPlayer(var1);
+ } else
+ {
+ var3 = func_82359_c(var1, var2[0]);
+
+ if (var3 == null)
+ {
+ throw new PlayerNotFoundException();
+ }
+ }
+
+ if (var2.length != 3 && var2.length != 4)
+ {
+ if (var2.length == 1 || var2.length == 2)
+ {
+ EntityPlayerMP var11 = func_82359_c(var1, var2[var2.length - 1]);
+
+ if (var11 == null)
+ {
+ throw new PlayerNotFoundException();
+ }
+
+ if (var11.worldObj != var3.worldObj)
+ {
+ notifyAdmins(var1, "commands.tp.notSameDimension", new Object[0]);
+ return;
+ }
+
+ if (!this.dungeonCheck(var3, var1, var11.posX, var11.posY, var11.posZ))
+ {
+ return;
+ }
+
+ var3.mountEntity((Entity) null);
+ var3.playerNetServerHandler.setPlayerLocation(var11.posX, var11.posY, var11.posZ, var11.rotationYaw, var11.rotationPitch);
+ notifyAdmins(var1, "commands.tp.success", new Object[]{var3.getEntityName(), var11.getEntityName()});
+ }
+ } else if (var3.worldObj != null)
+ {
+ int var4 = var2.length - 3;
+ double var5 = this.func_82368_a(var1, var3.posX, var2[var4++]);
+ double var7 = this.func_82367_a(var1, var3.posY, var2[var4++], 0, 0);
+ double var9 = this.func_82368_a(var1, var3.posZ, var2[var4++]);
+
+ if (!this.dungeonCheck(var3, var1, var5, var7, var9))
+ {
+ return;
+ }
+
+ var3.mountEntity((Entity) null);
+ var3.setPositionAndUpdate(var5, var7, var9);
+ notifyAdmins(var1, "commands.tp.success.coordinates", new Object[]{var3.getEntityName(), Double.valueOf(var5), Double.valueOf(var7), Double.valueOf(var9)});
+ }
+ }
+ }
+
+ public boolean dungeonCheck(EntityPlayerMP var1, ICommandSender var2, double var3, double var5, double var7)
+ {
+ Party var9 = PartyController.instance().getParty((EntityPlayer) var1);
+ Dungeon var10 = DungeonHandler.instance().getDungeon(var9);
+ Dungeon var11 = DungeonHandler.instance().getInstanceAt(MathHelper.floor_double(var3), MathHelper.floor_double(var5), MathHelper.floor_double(var7));
+
+ if (var1.dimension == 3)
+ {
+ if (var9 != null && var10 != null && var10.hasMember(PartyController.instance().getMember((EntityPlayer) var1)) && var11 == null)
+ {
+ notifyAdmins(var2, "You cannot teleport " + var1.username + " out side of a dungeon!", new Object[0]);
+ return false;
+ }
+
+ if (var11 != null && var11.getQueuedParty() != null && var11.getQueuedParty() != var9)
+ {
+ notifyAdmins(var2, "You cannot teleport " + var1.username + " into another dungeon!", new Object[0]);
+ return false;
+ }
+
+ if (var11 != null)
+ {
+ notifyAdmins(var2, "You cannot teleport " + var1.username + " into a dungeon!", new Object[0]);
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ private double func_82368_a(ICommandSender var1, double var2, String var4)
+ {
+ return this.func_82367_a(var1, var2, var4, -30000000, 30000000);
+ }
+
+ private double func_82367_a(ICommandSender var1, double var2, String var4, int var5, int var6)
+ {
+ boolean var7 = var4.startsWith("~");
+ double var8 = var7 ? var2 : 0.0D;
+
+ if (!var7 || var4.length() > 1)
+ {
+ boolean var10 = var4.contains(".");
+
+ if (var7)
+ {
+ var4 = var4.substring(1);
+ }
+
+ var8 += func_82363_b(var1, var4);
+
+ if (!var10 && !var7)
+ {
+ var8 += 0.5D;
+ }
+ }
+
+ if (var5 != 0 || var6 != 0)
+ {
+ if (var8 < (double) var5)
+ {
+ throw new NumberInvalidException("commands.generic.double.tooSmall", new Object[]{Double.valueOf(var8), Integer.valueOf(var5)});
+ }
+
+ if (var8 > (double) var6)
+ {
+ throw new NumberInvalidException("commands.generic.double.tooBig", new Object[]{Double.valueOf(var8), Integer.valueOf(var6)});
+ }
+ }
+
+ return var8;
+ }
+
+ /**
+ * Adds the strings available in this command to the given list of tab completion options.
+ */
+ public List addTabCompletionOptions(ICommandSender var1, String[] var2)
+ {
+ return var2.length != 1 && var2.length != 2 ? null : getListOfStringsMatchingLastWord(var2, MinecraftServer.getServer().getAllUsernames());
+ }
+
+ /**
+ * Return whether the specified command parameter index is a username parameter.
+ */
+ public boolean isUsernameIndex(String[] var1, int var2)
+ {
+ return var2 == 0;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/containers/ContainerAether.java b/src/main/java/net/aetherteam/aether/containers/ContainerAether.java
new file mode 100644
index 0000000..ffbf947
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/containers/ContainerAether.java
@@ -0,0 +1,65 @@
+package net.aetherteam.aether.containers;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.inventory.ContainerPlayer;
+import net.minecraft.inventory.InventoryCraftResult;
+import net.minecraft.inventory.InventoryCrafting;
+import net.minecraft.inventory.Slot;
+import net.minecraft.inventory.SlotCrafting;
+
+public class ContainerAether extends ContainerPlayer
+{
+ public ContainerAether(InventoryPlayer var1, InventoryAether var2, EntityPlayer var3)
+ {
+ this(var1, var2, true, var3);
+ }
+
+ public ContainerAether(InventoryPlayer var1, InventoryAether var2, boolean var3, EntityPlayer var4)
+ {
+ super(var1, var3, var4);
+ this.inventorySlots.clear();
+ this.craftMatrix = new InventoryCrafting(this, 2, 2);
+ this.craftResult = new InventoryCraftResult();
+ this.isLocalWorld = var3;
+ this.addSlotToContainer(new SlotCrafting(var1.player, this.craftMatrix, this.craftResult, 0, 134, 62));
+ int var5;
+ int var6;
+
+ for (var5 = 0; var5 < 2; ++var5)
+ {
+ for (var6 = 0; var6 < 2; ++var6)
+ {
+ this.addSlotToContainer(new Slot(this.craftMatrix, var6 + var5 * 2, 125 + var6 * 18, 8 + var5 * 18));
+ }
+ }
+
+ for (var5 = 0; var5 < 4; ++var5)
+ {
+ ;
+ }
+
+ for (var5 = 0; var5 < 3; ++var5)
+ {
+ for (var6 = 0; var6 < 9; ++var6)
+ {
+ this.addSlotToContainer(new Slot(var1, var6 + (var5 + 1) * 9, 8 + var6 * 18, 84 + var5 * 18));
+ }
+ }
+
+ for (var5 = 0; var5 < 9; ++var5)
+ {
+ this.addSlotToContainer(new Slot(var1, var5, 8 + var5 * 18, 142));
+ }
+
+ for (var5 = 1; var5 < 3; ++var5)
+ {
+ for (var6 = 0; var6 < 4; ++var6)
+ {
+ int var7 = 4 * (var5 - 1) + var6;
+ }
+ }
+
+ this.onCraftMatrixChanged(this.craftMatrix);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/containers/ContainerAetherCreative.java b/src/main/java/net/aetherteam/aether/containers/ContainerAetherCreative.java
new file mode 100644
index 0000000..76df284
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/containers/ContainerAetherCreative.java
@@ -0,0 +1,126 @@
+package net.aetherteam.aether.containers;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.client.gui.GuiAetherContainerCreative;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.inventory.Container;
+import net.minecraft.inventory.IInventory;
+import net.minecraft.inventory.Slot;
+import net.minecraft.item.ItemStack;
+
+public class ContainerAetherCreative extends Container
+{
+ public List itemList = new ArrayList();
+ public EntityPlayer player;
+ public InventoryAether inv;
+
+ public ContainerAetherCreative(EntityPlayer var1)
+ {
+ this.player = var1;
+ InventoryPlayer var2 = var1.inventory;
+
+ if (!this.player.worldObj.isRemote)
+ {
+ this.inv = Aether.getServerPlayer(var1).inv;
+ }
+
+ int var3;
+
+ for (var3 = 0; var3 < 5; ++var3)
+ {
+ for (int var4 = 0; var4 < 9; ++var4)
+ {
+ this.addSlotToContainer(new Slot(GuiAetherContainerCreative.getInventory(), var3 * 9 + var4, 9 + var4 * 18, 18 + var3 * 18));
+ }
+ }
+
+ for (var3 = 0; var3 < 9; ++var3)
+ {
+ this.addSlotToContainer(new Slot(var2, var3, 9 + var3 * 18, 112));
+ }
+
+ for (var3 = 0; var3 < 8; ++var3)
+ {
+ ;
+ }
+
+ this.scrollTo(0.0F);
+ }
+
+ public boolean canInteractWith(EntityPlayer var1)
+ {
+ return true;
+ }
+
+ /**
+ * Callback for when the crafting matrix is changed.
+ */
+ public void onCraftMatrixChanged(IInventory var1)
+ {
+ super.onCraftMatrixChanged(var1);
+ }
+
+ public void scrollTo(float var1)
+ {
+ int var2 = this.itemList.size() / 9 - 5 + 1;
+ int var3 = (int) ((double) (var1 * (float) var2) + 0.5D);
+
+ if (var3 < 0)
+ {
+ var3 = 0;
+ }
+
+ for (int var4 = 0; var4 < 5; ++var4)
+ {
+ for (int var5 = 0; var5 < 9; ++var5)
+ {
+ int var6 = var5 + (var4 + var3) * 9;
+
+ if (var6 >= 0 && var6 < this.itemList.size())
+ {
+ GuiAetherContainerCreative.getInventory().setInventorySlotContents(var5 + var4 * 9, (ItemStack) this.itemList.get(var6));
+ } else
+ {
+ GuiAetherContainerCreative.getInventory().setInventorySlotContents(var5 + var4 * 9, (ItemStack) null);
+ }
+ }
+ }
+ }
+
+ public boolean hasMoreThan1PageOfItemsInList()
+ {
+ return this.itemList.size() > 45;
+ }
+
+ protected void retrySlotClick(int var1, int var2, boolean var3, EntityPlayer var4) {}
+
+ /**
+ * Looks for changes made in the container, sends them to every listener.
+ */
+ public void detectAndSendChanges()
+ {
+ super.detectAndSendChanges();
+ }
+
+ /**
+ * Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that.
+ */
+ public ItemStack transferStackInSlot(EntityPlayer var1, int var2)
+ {
+ if (var2 >= this.inventorySlots.size() - 9 && var2 < this.inventorySlots.size())
+ {
+ Slot var3 = (Slot) this.inventorySlots.get(var2);
+
+ if (var3 != null && var3.getHasStack())
+ {
+ var3.putStack((ItemStack) null);
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/containers/ContainerAltar.java b/src/main/java/net/aetherteam/aether/containers/ContainerAltar.java
new file mode 100644
index 0000000..25a9dfb
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/containers/ContainerAltar.java
@@ -0,0 +1,114 @@
+package net.aetherteam.aether.containers;
+
+import net.aetherteam.aether.tile_entities.TileEntityAltar;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.inventory.Container;
+import net.minecraft.inventory.Slot;
+import net.minecraft.inventory.SlotFurnace;
+import net.minecraft.item.ItemStack;
+
+public class ContainerAltar extends Container
+{
+ private TileEntityAltar altar;
+ private int cookTime = 0;
+ private int burnTime = 0;
+ private int itemBurnTime = 0;
+
+ public ContainerAltar(InventoryPlayer var1, TileEntityAltar var2)
+ {
+ this.altar = var2;
+ this.addSlotToContainer(new Slot(var2, 0, 56, 17));
+ this.addSlotToContainer(new Slot(var2, 1, 56, 53));
+ this.addSlotToContainer(new SlotFurnace(var1.player, var2, 2, 116, 35));
+ int var3;
+
+ for (var3 = 0; var3 < 3; ++var3)
+ {
+ for (int var4 = 0; var4 < 9; ++var4)
+ {
+ this.addSlotToContainer(new Slot(var1, var4 + var3 * 9 + 9, 8 + var4 * 18, 84 + var3 * 18));
+ }
+ }
+
+ for (var3 = 0; var3 < 9; ++var3)
+ {
+ this.addSlotToContainer(new Slot(var1, var3, 8 + var3 * 18, 142));
+ }
+ }
+
+ /**
+ * Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that.
+ */
+ public ItemStack transferStackInSlot(EntityPlayer var1, int var2)
+ {
+ ItemStack var3 = null;
+ Slot var4 = (Slot) this.inventorySlots.get(var2);
+
+ if (var4 != null && var4.getHasStack())
+ {
+ ItemStack var5 = var4.getStack();
+ var3 = var5.copy();
+
+ if (var2 == 2)
+ {
+ if (!this.mergeItemStack(var5, 3, 39, true))
+ {
+ return null;
+ }
+
+ var4.onSlotChange(var5, var3);
+ } else if (var2 != 1 && var2 != 0)
+ {
+ if (var2 >= 3 && var2 < 30)
+ {
+ this.mergeItemStack(var5, 30, 39, false);
+ } else if (var2 >= 30 && var2 < 39 && !this.mergeItemStack(var5, 3, 30, false))
+ {
+ this.mergeItemStack(var5, 3, 30, false);
+ }
+ } else if (!this.mergeItemStack(var5, 3, 39, false))
+ {
+ return null;
+ }
+
+ if (var5.stackSize == 0)
+ {
+ var4.putStack((ItemStack) null);
+ } else
+ {
+ var4.onSlotChanged();
+ }
+
+ if (var5.stackSize == var3.stackSize)
+ {
+ return null;
+ }
+ }
+
+ return var3;
+ }
+
+ public void updateProgressBar(int var1, int var2)
+ {
+ if (var1 == 0)
+ {
+ this.altar.enchantTimeForItem = var2;
+ }
+
+ if (var1 == 1)
+ {
+ this.altar.enchantProgress = var2;
+ }
+
+ if (var1 == 2)
+ {
+ this.altar.enchantPowerRemaining = var2;
+ }
+ }
+
+ public boolean canInteractWith(EntityPlayer var1)
+ {
+ return this.altar.isUseableByPlayer(var1);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/containers/ContainerEnchanter.java b/src/main/java/net/aetherteam/aether/containers/ContainerEnchanter.java
new file mode 100644
index 0000000..db6a6f3
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/containers/ContainerEnchanter.java
@@ -0,0 +1,114 @@
+package net.aetherteam.aether.containers;
+
+import net.aetherteam.aether.tile_entities.TileEntityEnchanter;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.inventory.Container;
+import net.minecraft.inventory.Slot;
+import net.minecraft.inventory.SlotFurnace;
+import net.minecraft.item.ItemStack;
+
+public class ContainerEnchanter extends Container
+{
+ private TileEntityEnchanter enchanter;
+ private int cookTime = 0;
+ private int burnTime = 0;
+ private int itemBurnTime = 0;
+
+ public ContainerEnchanter(InventoryPlayer var1, TileEntityEnchanter var2)
+ {
+ this.enchanter = var2;
+ this.addSlotToContainer(new Slot(var2, 0, 56, 17));
+ this.addSlotToContainer(new Slot(var2, 1, 56, 53));
+ this.addSlotToContainer(new SlotFurnace(var1.player, var2, 2, 116, 35));
+ int var3;
+
+ for (var3 = 0; var3 < 3; ++var3)
+ {
+ for (int var4 = 0; var4 < 9; ++var4)
+ {
+ this.addSlotToContainer(new Slot(var1, var4 + var3 * 9 + 9, 8 + var4 * 18, 84 + var3 * 18));
+ }
+ }
+
+ for (var3 = 0; var3 < 9; ++var3)
+ {
+ this.addSlotToContainer(new Slot(var1, var3, 8 + var3 * 18, 142));
+ }
+ }
+
+ /**
+ * Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that.
+ */
+ public ItemStack transferStackInSlot(EntityPlayer var1, int var2)
+ {
+ ItemStack var3 = null;
+ Slot var4 = (Slot) this.inventorySlots.get(var2);
+
+ if (var4 != null && var4.getHasStack())
+ {
+ ItemStack var5 = var4.getStack();
+ var3 = var5.copy();
+
+ if (var2 == 2)
+ {
+ if (!this.mergeItemStack(var5, 3, 39, true))
+ {
+ return null;
+ }
+
+ var4.onSlotChange(var5, var3);
+ } else if (var2 != 1 && var2 != 0)
+ {
+ if (var2 >= 3 && var2 < 30)
+ {
+ this.mergeItemStack(var5, 30, 39, false);
+ } else if (var2 >= 30 && var2 < 39 && !this.mergeItemStack(var5, 3, 30, false))
+ {
+ this.mergeItemStack(var5, 3, 30, false);
+ }
+ } else if (!this.mergeItemStack(var5, 3, 39, false))
+ {
+ return null;
+ }
+
+ if (var5.stackSize == 0)
+ {
+ var4.putStack((ItemStack) null);
+ } else
+ {
+ var4.onSlotChanged();
+ }
+
+ if (var5.stackSize == var3.stackSize)
+ {
+ return null;
+ }
+ }
+
+ return var3;
+ }
+
+ public void updateProgressBar(int var1, int var2)
+ {
+ if (var1 == 0)
+ {
+ this.enchanter.enchantTimeForItem = var2;
+ }
+
+ if (var1 == 1)
+ {
+ this.enchanter.enchantProgress = var2;
+ }
+
+ if (var1 == 2)
+ {
+ this.enchanter.enchantPowerRemaining = var2;
+ }
+ }
+
+ public boolean canInteractWith(EntityPlayer var1)
+ {
+ return this.enchanter.isUseableByPlayer(var1);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/containers/ContainerFreezer.java b/src/main/java/net/aetherteam/aether/containers/ContainerFreezer.java
new file mode 100644
index 0000000..5f4cfcc
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/containers/ContainerFreezer.java
@@ -0,0 +1,152 @@
+package net.aetherteam.aether.containers;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.aetherteam.aether.tile_entities.TileEntityFreezer;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.inventory.Container;
+import net.minecraft.inventory.ICrafting;
+import net.minecraft.inventory.Slot;
+import net.minecraft.inventory.SlotFurnace;
+import net.minecraft.item.ItemStack;
+
+public class ContainerFreezer extends Container
+{
+ private TileEntityFreezer freezer;
+ private int cookTime = 0;
+ private int burnTime = 0;
+ private int itemBurnTime = 0;
+
+ public ContainerFreezer(InventoryPlayer var1, TileEntityFreezer var2)
+ {
+ this.freezer = var2;
+ this.addSlotToContainer(new Slot(var2, 0, 56, 17));
+ this.addSlotToContainer(new Slot(var2, 1, 56, 53));
+ this.addSlotToContainer(new SlotFurnace(var1.player, var2, 2, 116, 35));
+ int var3;
+
+ for (var3 = 0; var3 < 3; ++var3)
+ {
+ for (int var4 = 0; var4 < 9; ++var4)
+ {
+ this.addSlotToContainer(new Slot(var1, var4 + var3 * 9 + 9, 8 + var4 * 18, 84 + var3 * 18));
+ }
+ }
+
+ for (var3 = 0; var3 < 9; ++var3)
+ {
+ this.addSlotToContainer(new Slot(var1, var3, 8 + var3 * 18, 142));
+ }
+ }
+
+ /**
+ * Looks for changes made in the container, sends them to every listener.
+ */
+ public void detectAndSendChanges()
+ {
+ super.detectAndSendChanges();
+
+ for (int var1 = 0; var1 < this.crafters.size(); ++var1)
+ {
+ ICrafting var2 = (ICrafting) this.crafters.get(var1);
+
+ if (this.cookTime != this.freezer.frozenTimeForItem)
+ {
+ var2.sendProgressBarUpdate(this, 0, this.freezer.frozenTimeForItem);
+ }
+
+ if (this.burnTime != this.freezer.frozenProgress)
+ {
+ var2.sendProgressBarUpdate(this, 1, this.freezer.frozenProgress);
+ }
+
+ if (this.itemBurnTime != this.freezer.frozenPowerRemaining)
+ {
+ var2.sendProgressBarUpdate(this, 2, this.freezer.frozenPowerRemaining);
+ }
+ }
+
+ this.cookTime = this.freezer.frozenTimeForItem;
+ this.burnTime = this.freezer.frozenProgress;
+ this.itemBurnTime = this.freezer.frozenPowerRemaining;
+ }
+
+ @SideOnly(Side.CLIENT)
+ public void updateProgressBar(int var1, int var2)
+ {
+ if (var1 == 0)
+ {
+ this.freezer.frozenTimeForItem = var2;
+ }
+
+ if (var1 == 1)
+ {
+ this.freezer.frozenProgress = var2;
+ }
+
+ if (var1 == 2)
+ {
+ this.freezer.frozenPowerRemaining = var2;
+ }
+ }
+
+ public boolean canInteractWith(EntityPlayer var1)
+ {
+ return this.freezer.isUseableByPlayer(var1);
+ }
+
+ /**
+ * Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that.
+ */
+ public ItemStack transferStackInSlot(EntityPlayer var1, int var2)
+ {
+ ItemStack var3 = null;
+ Slot var4 = (Slot) this.inventorySlots.get(var2);
+
+ if (var4 != null && var4.getHasStack())
+ {
+ ItemStack var5 = var4.getStack();
+ var3 = var5.copy();
+
+ if (var2 == 2)
+ {
+ if (!this.mergeItemStack(var5, 3, 39, true))
+ {
+ return null;
+ }
+
+ var4.onSlotChange(var5, var3);
+ } else if (var2 != 1 && var2 != 0)
+ {
+ if (var2 >= 3 && var2 < 30)
+ {
+ this.mergeItemStack(var5, 30, 39, false);
+ } else if (var2 >= 30 && var2 < 39 && !this.mergeItemStack(var5, 3, 30, false))
+ {
+ this.mergeItemStack(var5, 3, 30, false);
+ }
+ } else if (!this.mergeItemStack(var5, 3, 39, false))
+ {
+ return null;
+ }
+
+ if (var5.stackSize == 0)
+ {
+ var4.putStack((ItemStack) null);
+ } else
+ {
+ var4.onSlotChanged();
+ }
+
+ if (var5.stackSize == var3.stackSize)
+ {
+ return null;
+ }
+
+ var4.onPickupFromSlot(var1, var5);
+ }
+
+ return var3;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/containers/ContainerIncubator.java b/src/main/java/net/aetherteam/aether/containers/ContainerIncubator.java
new file mode 100644
index 0000000..035b4ef
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/containers/ContainerIncubator.java
@@ -0,0 +1,97 @@
+package net.aetherteam.aether.containers;
+
+import net.aetherteam.aether.tile_entities.TileEntityIncubator;
+import net.aetherteam.aether.tile_entities.TileEntityIncubatorSlot;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.inventory.Container;
+import net.minecraft.inventory.Slot;
+import net.minecraft.item.ItemStack;
+
+public class ContainerIncubator extends Container
+{
+ private TileEntityIncubator Incubator;
+ private int cookTime = 0;
+ private int burnTime = 0;
+ private int itemBurnTime = 0;
+
+ public ContainerIncubator(InventoryPlayer var1, TileEntityIncubator var2)
+ {
+ this.Incubator = var2;
+ this.addSlotToContainer(new TileEntityIncubatorSlot(var2, 1, 73, 17));
+ this.addSlotToContainer(new Slot(var2, 0, 73, 53));
+ int var3;
+
+ for (var3 = 0; var3 < 3; ++var3)
+ {
+ for (int var4 = 0; var4 < 9; ++var4)
+ {
+ this.addSlotToContainer(new Slot(var1, var4 + var3 * 9 + 9, 8 + var4 * 18, 84 + var3 * 18));
+ }
+ }
+
+ for (var3 = 0; var3 < 9; ++var3)
+ {
+ this.addSlotToContainer(new Slot(var1, var3, 8 + var3 * 18, 142));
+ }
+ }
+
+ public boolean canInteractWith(EntityPlayer var1)
+ {
+ return this.Incubator.isUseableByPlayer(var1);
+ }
+
+ /**
+ * Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that.
+ */
+ public ItemStack transferStackInSlot(EntityPlayer var1, int var2)
+ {
+ ItemStack var3 = null;
+ Slot var4 = (Slot) this.inventorySlots.get(var2);
+
+ if (var4 != null && var4.getHasStack())
+ {
+ ItemStack var5 = var4.getStack();
+ var3 = var5.copy();
+
+ if (var2 == 2)
+ {
+ if (!this.mergeItemStack(var5, 3, 39, true))
+ {
+ return null;
+ }
+
+ var4.onSlotChange(var5, var3);
+ } else if (var2 != 1 && var2 != 0)
+ {
+ if (var2 >= 3 && var2 < 30)
+ {
+ this.mergeItemStack(var5, 30, 39, false);
+ } else if (var2 >= 30 && var2 < 39 && !this.mergeItemStack(var5, 3, 30, false))
+ {
+ this.mergeItemStack(var5, 3, 30, false);
+ }
+ } else if (!this.mergeItemStack(var5, 3, 39, false))
+ {
+ return null;
+ }
+
+ if (var5.stackSize == 0)
+ {
+ var4.putStack((ItemStack) null);
+ } else
+ {
+ var4.onSlotChanged();
+ }
+
+ if (var5.stackSize == var3.stackSize)
+ {
+ return null;
+ }
+
+ var4.onPickupFromSlot(var1, var5);
+ }
+
+ return var3;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/containers/ContainerLore.java b/src/main/java/net/aetherteam/aether/containers/ContainerLore.java
new file mode 100644
index 0000000..283ad19
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/containers/ContainerLore.java
@@ -0,0 +1,122 @@
+package net.aetherteam.aether.containers;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.inventory.ContainerPlayer;
+import net.minecraft.inventory.IInventory;
+import net.minecraft.inventory.InventoryBasic;
+import net.minecraft.inventory.Slot;
+import net.minecraft.item.ItemStack;
+
+public class ContainerLore extends ContainerPlayer
+{
+ public List slotsToRemove = new ArrayList();
+ public IInventory loreSlot;
+
+ public ContainerLore(InventoryPlayer var1, boolean var2, EntityPlayer var3)
+ {
+ super(var1, var2, var3);
+ Iterator var4 = this.inventorySlots.iterator();
+
+ while (var4.hasNext())
+ {
+ Object var5 = var4.next();
+
+ if (var5 instanceof Slot)
+ {
+ Slot var6 = (Slot) var5;
+ this.slotsToRemove.add(var6);
+ }
+ }
+
+ this.inventorySlots.remove(0);
+ int var7;
+
+ for (var7 = 0; var7 < 3; ++var7)
+ {
+ for (int var8 = 0; var8 < 9; ++var8)
+ {
+ ((Slot) this.inventorySlots.get(var8 + (var7 + 1) * 9)).xDisplayPosition = 48 + var8 * 18;
+ ((Slot) this.inventorySlots.get(var8 + (var7 + 1) * 9)).yDisplayPosition = 113 + var7 * 18;
+ }
+ }
+
+ for (var7 = 0; var7 < 9; ++var7)
+ {
+ ((Slot) this.inventorySlots.get(var7)).xDisplayPosition = 48 + var7 * 18;
+ ((Slot) this.inventorySlots.get(var7)).yDisplayPosition = 171;
+ }
+
+ this.loreSlot = new InventoryBasic("Lore Item", true, 1);
+ this.addSlotToContainer(new Slot(this.loreSlot, 0, 82, 66));
+ this.onCraftMatrixChanged(this.craftMatrix);
+ }
+
+ protected void retrySlotClick(int var1, int var2, boolean var3, EntityPlayer var4) {}
+
+ /**
+ * Callback for when the crafting gui is closed.
+ */
+ public void onCraftGuiClosed(EntityPlayer var1)
+ {
+ super.onCraftGuiClosed(var1);
+ ItemStack var2 = this.loreSlot.getStackInSlotOnClosing(0);
+
+ if (var2 != null)
+ {
+ var1.dropPlayerItem(var2);
+ }
+ }
+
+ public boolean canInteractWith(EntityPlayer var1)
+ {
+ return true;
+ }
+
+ public ItemStack getStackInSlot(int var1)
+ {
+ ItemStack var2 = null;
+ Slot var3 = (Slot) this.inventorySlots.get(var1);
+
+ if (var3 != null && var3.getHasStack())
+ {
+ ItemStack var4 = var3.getStack();
+ var2 = var4.copy();
+
+ if (var1 == 0)
+ {
+ this.mergeItemStack(var4, 10, 46, true);
+ } else if (var1 >= 10 && var1 < 37)
+ {
+ this.mergeItemStack(var4, 37, 46, false);
+ } else if (var1 >= 37 && var1 < 46)
+ {
+ this.mergeItemStack(var4, 10, 37, false);
+ } else
+ {
+ this.mergeItemStack(var4, 10, 46, false);
+ }
+
+ if (var4.stackSize == 0)
+ {
+ var3.putStack((ItemStack) null);
+ } else
+ {
+ var3.onSlotChanged();
+ }
+
+ if (var4.stackSize == var2.stackSize)
+ {
+ return null;
+ }
+
+ var3.onSlotChange(var4, var2);
+ }
+
+ return var2;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/containers/ContainerPlayerAether.java b/src/main/java/net/aetherteam/aether/containers/ContainerPlayerAether.java
new file mode 100644
index 0000000..cd4218b
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/containers/ContainerPlayerAether.java
@@ -0,0 +1,83 @@
+package net.aetherteam.aether.containers;
+
+import java.util.Iterator;
+
+import net.aetherteam.aether.AetherCommonPlayerHandler;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.inventory.ContainerPlayer;
+import net.minecraft.inventory.Slot;
+import net.minecraft.item.ItemStack;
+
+public class ContainerPlayerAether extends ContainerPlayer
+{
+ public InventoryAether inv;
+ public EntityPlayer player;
+
+ public ContainerPlayerAether(InventoryPlayer var1, InventoryAether var2, boolean var3, EntityPlayer var4, AetherCommonPlayerHandler var5)
+ {
+ super(var1, var3, var4);
+ this.player = var4;
+ Iterator var6 = this.inventorySlots.iterator();
+
+ while (var6.hasNext())
+ {
+ Object var7 = var6.next();
+
+ if (var7 instanceof Slot)
+ {
+ Slot var8 = (Slot) var7;
+
+ switch (var8.slotNumber)
+ {
+ case 0:
+ var8.yDisplayPosition += 26;
+ var8.xDisplayPosition -= 10;
+ break;
+
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ var8.yDisplayPosition -= 18;
+ var8.xDisplayPosition += 37;
+ break;
+
+ case 5:
+ case 6:
+ case 7:
+ case 8:
+ var8.xDisplayPosition += 54;
+ }
+ }
+ }
+
+ for (int var11 = 1; var11 < 3; ++var11)
+ {
+ for (int var10 = 0; var10 < 4; ++var10)
+ {
+ int var12 = 4 * (var11 - 1) + var10;
+ this.addSlotToContainer(new SlotMoreArmor(this, var2, var12, 62 + var11 * 18, 8 + var10 * 18, var12 + 4));
+ }
+ }
+
+ this.inv = var2;
+ this.onCraftMatrixChanged(this.craftMatrix);
+ }
+
+ /**
+ * Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that.
+ */
+ public ItemStack transferStackInSlot(EntityPlayer var1, int var2)
+ {
+ Slot var3 = (Slot) this.inventorySlots.get(var2);
+
+ if (var3 != null && var3.getHasStack())
+ {
+ ItemStack var4 = var3.getStack();
+ this.inv.isStackValidForSlot(var2, var4);
+ }
+
+ return super.transferStackInSlot(var1, var2);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/containers/ContainerSkyrootWorkbench.java b/src/main/java/net/aetherteam/aether/containers/ContainerSkyrootWorkbench.java
new file mode 100644
index 0000000..429884a
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/containers/ContainerSkyrootWorkbench.java
@@ -0,0 +1,29 @@
+package net.aetherteam.aether.containers;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.inventory.ContainerWorkbench;
+import net.minecraft.world.World;
+
+public class ContainerSkyrootWorkbench extends ContainerWorkbench
+{
+ private World worldObj;
+ private int posX;
+ private int posY;
+ private int posZ;
+
+ public ContainerSkyrootWorkbench(InventoryPlayer var1, World var2, int var3, int var4, int var5)
+ {
+ super(var1, var2, var3, var4, var5);
+ this.worldObj = var2;
+ this.posX = var3;
+ this.posY = var4;
+ this.posZ = var5;
+ }
+
+ public boolean canInteractWith(EntityPlayer var1)
+ {
+ return this.worldObj.getBlockId(this.posX, this.posY, this.posZ) != AetherBlocks.SkyrootCraftingTable.blockID ? false : var1.getDistanceSq((double) this.posX + 0.5D, (double) this.posY + 0.5D, (double) this.posZ + 0.5D) <= 64.0D;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/containers/InventoryAether.java b/src/main/java/net/aetherteam/aether/containers/InventoryAether.java
new file mode 100644
index 0000000..e15679d
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/containers/InventoryAether.java
@@ -0,0 +1,334 @@
+package net.aetherteam.aether.containers;
+
+import cpw.mods.fml.common.network.PacketDispatcher;
+
+import java.util.Collections;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.interfaces.IAetherAccessory;
+import net.aetherteam.aether.items.ItemAccessory;
+import net.aetherteam.aether.packets.AetherPacketHandler;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.inventory.IInventory;
+import net.minecraft.inventory.Slot;
+import net.minecraft.item.ItemArmor;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.NBTTagList;
+
+public class InventoryAether implements IInventory
+{
+ public ItemStack[] slots;
+ public EntityPlayer player;
+
+ public InventoryAether(EntityPlayer var1)
+ {
+ this.player = var1;
+ this.slots = new ItemStack[8];
+ }
+
+ public boolean canInteractWith(EntityPlayer var1)
+ {
+ return true;
+ }
+
+ public boolean isEmpty()
+ {
+ ItemStack[] var1 = this.slots;
+ int var2 = var1.length;
+
+ for (int var3 = 0; var3 < var2; ++var3)
+ {
+ ItemStack var4 = var1[var3];
+
+ if (var4 != null)
+ {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ public void closeChest() {}
+
+ public void damageArmor(int var1)
+ {
+ for (int var2 = 0; var2 < this.slots.length; ++var2)
+ {
+ if (this.slots[var2] != null && this.slots[var2].getItem() instanceof IAetherAccessory)
+ {
+ this.slots[var2].damageItem(var1, this.player);
+
+ if (this.slots[var2].stackSize == 0)
+ {
+ this.slots[var2] = null;
+ }
+ }
+ }
+ }
+
+ /**
+ * Removes from an inventory slot (first arg) up to a specified number (second arg) of items and returns them in a
+ * new stack.
+ */
+ public ItemStack decrStackSize(int var1, int var2)
+ {
+ if (this.slots[var1] != null)
+ {
+ ItemStack var3;
+
+ if (this.slots[var1].stackSize <= var2)
+ {
+ var3 = this.slots[var1];
+ this.slots[var1] = null;
+ this.onInventoryChanged();
+ return var3;
+ } else
+ {
+ var3 = this.slots[var1].splitStack(var2);
+
+ if (this.slots[var1].stackSize == 0)
+ {
+ this.slots[var1] = null;
+ }
+
+ this.onInventoryChanged();
+ return var3;
+ }
+ } else
+ {
+ return null;
+ }
+ }
+
+ public void dropAllItems()
+ {
+ for (int var1 = 0; var1 < this.slots.length; ++var1)
+ {
+ if (this.slots[var1] != null)
+ {
+ this.player.dropPlayerItemWithRandomChoice(this.slots[var1], true);
+ this.slots[var1] = null;
+ }
+ }
+
+ this.onInventoryChanged();
+ }
+
+ /**
+ * Returns the maximum stack size for a inventory slot. Seems to always be 64, possibly will be extended. *Isn't
+ * this more of a set than a get?*
+ */
+ public int getInventoryStackLimit()
+ {
+ return 1;
+ }
+
+ /**
+ * Returns the name of the inventory.
+ */
+ public String getInvName()
+ {
+ return "Aether Slots";
+ }
+
+ /**
+ * Returns the number of slots in the inventory.
+ */
+ public int getSizeInventory()
+ {
+ return 8;
+ }
+
+ /**
+ * Returns the stack in slot i
+ */
+ public ItemStack getStackInSlot(int var1)
+ {
+ return this.slots[var1];
+ }
+
+ /**
+ * When some containers are closed they call this on each slot, then drop whatever it returns as an EntityItem -
+ * like when you close a workbench GUI.
+ */
+ public ItemStack getStackInSlotOnClosing(int var1)
+ {
+ return null;
+ }
+
+ public int getTotalArmorValue()
+ {
+ int var1 = 0;
+ int var2 = 0;
+ int var3 = 0;
+ ItemStack[] var4 = this.slots;
+ int var5 = var4.length;
+
+ for (int var6 = 0; var6 < var5; ++var6)
+ {
+ ItemStack var7 = var4[var6];
+
+ if (var7 != null && var7.getItem() instanceof IAetherAccessory)
+ {
+ int var8 = var7.getMaxDamage();
+ int var9 = var7.getItemDamageForDisplay();
+ int var10 = var8 - var9;
+ var2 += var10;
+ var3 += var8;
+ int var11 = ((ItemAccessory) var7.getItem()).damageReduceAmount;
+ var1 += var11;
+ }
+ }
+
+ if (var3 == 0)
+ {
+ return 0;
+ } else
+ {
+ return (var1 - 1) * var2 / var3 + 1;
+ }
+ }
+
+ /**
+ * Do not make give this method the name canInteractWith because it clashes with Container
+ */
+ public boolean isUseableByPlayer(EntityPlayer var1)
+ {
+ return true;
+ }
+
+ /**
+ * Called when an the contents of an Inventory change, usually
+ */
+ public void onInventoryChanged()
+ {
+ if (!this.player.worldObj.isRemote)
+ {
+ PacketDispatcher.sendPacketToAllPlayers(AetherPacketHandler.sendAccessoryChange(Aether.getServerPlayer((EntityPlayerMP) this.player).inv.writeToNBT(new NBTTagList()), false, true, Collections.singleton(this.player.username), (byte) 1));
+ }
+ }
+
+ public void openChest() {}
+
+ public void readFromNBT(NBTTagList var1)
+ {
+ this.slots = new ItemStack[8];
+
+ for (int var2 = 0; var2 < var1.tagCount(); ++var2)
+ {
+ NBTTagCompound var3 = (NBTTagCompound) var1.tagAt(var2);
+ int var4 = var3.getByte("Slot") & 255;
+ ItemStack var5 = ItemStack.loadItemStackFromNBT(var3);
+
+ if (var4 > 8 || !(var5.getItem() instanceof IAetherAccessory))
+ {
+ this.readOldFile(var1);
+ return;
+ }
+
+ if (var5.getItem() != null && var4 < this.slots.length)
+ {
+ this.slots[var4] = var5;
+ }
+ }
+ }
+
+ public void readOldFile(NBTTagList var1)
+ {
+ for (int var2 = 0; var2 < var1.tagCount(); ++var2)
+ {
+ NBTTagCompound var3 = (NBTTagCompound) var1.tagAt(var2);
+ int var4 = var3.getByte("Slot") & 255;
+ ItemStack var5 = ItemStack.loadItemStackFromNBT(var3);
+
+ if (var5.getItem() != null && var4 >= 104 && var4 < 112)
+ {
+ this.slots[var4 - 104] = var5;
+ }
+ }
+ }
+
+ public NBTTagList writeToNBT(NBTTagList var1)
+ {
+ for (int var2 = 0; var2 < this.slots.length; ++var2)
+ {
+ if (this.slots[var2] != null)
+ {
+ NBTTagCompound var3 = new NBTTagCompound();
+ var3.setByte("Slot", (byte) var2);
+ this.slots[var2].writeToNBT(var3);
+ var1.appendTag(var3);
+ }
+ }
+
+ return var1;
+ }
+
+ /**
+ * Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).
+ */
+ public void setInventorySlotContents(int var1, ItemStack var2)
+ {
+ this.slots[var1] = var2;
+
+ if (var2 != null && var2.stackSize > this.getInventoryStackLimit())
+ {
+ var2.stackSize = this.getInventoryStackLimit();
+ }
+
+ this.onInventoryChanged();
+ }
+
+ /**
+ * If this returns false, the inventory name will be used as an unlocalized name, and translated into the player's
+ * language. Otherwise it will be used directly.
+ */
+ public boolean isInvNameLocalized()
+ {
+ return false;
+ }
+
+ /**
+ * Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot.
+ */
+ public boolean isStackValidForSlot(int var1, ItemStack var2)
+ {
+ Slot var3 = (Slot) this.player.inventoryContainer.inventorySlots.get(var1);
+
+ if (var3 != null && var3.getHasStack() && !(var3 instanceof SlotMoreArmor))
+ {
+ int var4;
+
+ if (var2.getItem() instanceof ItemArmor && !((Slot) this.player.inventoryContainer.inventorySlots.get(5 + ((ItemArmor) var2.getItem()).armorType)).getHasStack())
+ {
+ var4 = 5 + ((ItemArmor) var2.getItem()).armorType;
+ } else
+ {
+ if (var2.getItem() instanceof IAetherAccessory && this.slots[((ItemAccessory) var2.getItem()).getSlotType()[0]] == null)
+ {
+ var4 = ((ItemAccessory) var2.getItem()).getSlotType()[0];
+ this.slots[var4] = var2;
+ var3.putStack((ItemStack) null);
+ var3.onSlotChanged();
+ this.onInventoryChanged();
+ return true;
+ }
+
+ if (var2.getItem() instanceof IAetherAccessory && this.slots[((ItemAccessory) var2.getItem()).getSlotType()[1]] == null)
+ {
+ var4 = ((ItemAccessory) var2.getItem()).getSlotType()[1];
+ this.slots[var4] = var2;
+ var3.putStack((ItemStack) null);
+ var3.onSlotChanged();
+ this.onInventoryChanged();
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/containers/SlotAetherCreativeInventory.java b/src/main/java/net/aetherteam/aether/containers/SlotAetherCreativeInventory.java
new file mode 100644
index 0000000..c0b678d
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/containers/SlotAetherCreativeInventory.java
@@ -0,0 +1,102 @@
+package net.aetherteam.aether.containers;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.aetherteam.aether.client.gui.GuiAetherContainerCreative;
+import net.minecraft.inventory.IInventory;
+import net.minecraft.inventory.Slot;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.Icon;
+
+@SideOnly(Side.CLIENT)
+public class SlotAetherCreativeInventory extends Slot
+{
+ private final Slot theSlot;
+ final GuiAetherContainerCreative theCreativeInventory;
+
+ public SlotAetherCreativeInventory(GuiAetherContainerCreative var1, Slot var2, int var3)
+ {
+ super(var2.inventory, var3, 0, 0);
+ this.theCreativeInventory = var1;
+ this.theSlot = var2;
+ }
+
+ /**
+ * Check if the stack is a valid item for this slot. Always true beside for the armor slots.
+ */
+ public boolean isItemValid(ItemStack var1)
+ {
+ return this.theSlot.isItemValid(var1);
+ }
+
+ /**
+ * Helper fnct to get the stack in the slot.
+ */
+ public ItemStack getStack()
+ {
+ return this.theSlot.getStack();
+ }
+
+ /**
+ * Returns if this slot contains a stack.
+ */
+ public boolean getHasStack()
+ {
+ return this.theSlot.getHasStack();
+ }
+
+ /**
+ * Helper method to put a stack in the slot.
+ */
+ public void putStack(ItemStack var1)
+ {
+ this.theSlot.putStack(var1);
+ }
+
+ /**
+ * Called when the stack in a Slot changes
+ */
+ public void onSlotChanged()
+ {
+ this.theSlot.onSlotChanged();
+ }
+
+ /**
+ * Returns the maximum stack size for a given slot (usually the same as getInventoryStackLimit(), but 1 in the case
+ * of armor slots)
+ */
+ public int getSlotStackLimit()
+ {
+ return this.theSlot.getSlotStackLimit();
+ }
+
+ /**
+ * Returns the icon index on items.png that is used as background image of the slot.
+ */
+ public Icon getBackgroundIconIndex()
+ {
+ return this.theSlot.getBackgroundIconIndex();
+ }
+
+ /**
+ * Decrease the size of the stack in slot (first int arg) by the amount of the second int arg. Returns the new
+ * stack.
+ */
+ public ItemStack decrStackSize(int var1)
+ {
+ return this.theSlot.decrStackSize(var1);
+ }
+
+ /**
+ * returns true if this slot is in par2 of par1
+ */
+ public boolean isSlotInInventory(IInventory var1, int var2)
+ {
+ return this.theSlot.isSlotInInventory(var1, var2);
+ }
+
+ public static Slot func_75240_a(SlotAetherCreativeInventory var0)
+ {
+ return var0.theSlot;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/containers/SlotMoreArmor.java b/src/main/java/net/aetherteam/aether/containers/SlotMoreArmor.java
new file mode 100644
index 0000000..3ff1689
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/containers/SlotMoreArmor.java
@@ -0,0 +1,87 @@
+package net.aetherteam.aether.containers;
+
+import net.aetherteam.aether.interfaces.IAetherAccessory;
+import net.aetherteam.aether.items.ItemAccessory;
+import net.minecraft.inventory.Container;
+import net.minecraft.inventory.IInventory;
+import net.minecraft.inventory.Slot;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.Icon;
+
+public class SlotMoreArmor extends Slot
+{
+ final int armorType;
+ public int iconIndex = 0;
+
+ public SlotMoreArmor(Container var1, IInventory var2, int var3, int var4, int var5, int var6)
+ {
+ super(var2, var3, var4, var5);
+ this.armorType = var6;
+ }
+
+ /**
+ * Returns the maximum stack size for a given slot (usually the same as getInventoryStackLimit(), but 1 in the case
+ * of armor slots)
+ */
+ public int getSlotStackLimit()
+ {
+ return 1;
+ }
+
+ /**
+ * Check if the stack is a valid item for this slot. Always true beside for the armor slots.
+ */
+ public boolean isItemValid(ItemStack var1)
+ {
+ return var1.getItem() instanceof IAetherAccessory ? ((ItemAccessory) var1.getItem()).isTypeValid(this.armorType) : false;
+ }
+
+ public void setBackgroundIconIndex(int var1)
+ {
+ this.iconIndex = var1;
+ }
+
+ /**
+ * Returns the icon index on items.png that is used as background image of the slot.
+ */
+ public Icon getBackgroundIconIndex()
+ {
+ switch (this.armorType)
+ {
+ case 4:
+ return ItemAccessory.pendantSlot;
+
+ case 5:
+ return ItemAccessory.capeSlot;
+
+ case 6:
+ return ItemAccessory.shieldSlot;
+
+ case 7:
+ return ItemAccessory.miscSlot;
+
+ case 8:
+ return ItemAccessory.ringSlot;
+
+ case 9:
+ return ItemAccessory.ringSlot;
+
+ case 10:
+ return ItemAccessory.gloveSlot;
+
+ case 11:
+ return ItemAccessory.miscSlot;
+
+ default:
+ return super.getBackgroundIconIndex();
+ }
+ }
+
+ /**
+ * Called when the stack in a Slot changes
+ */
+ public void onSlotChanged()
+ {
+ super.onSlotChanged();
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/creative_tabs/AetherAccessoryTab.java b/src/main/java/net/aetherteam/aether/creative_tabs/AetherAccessoryTab.java
new file mode 100644
index 0000000..fb83b35
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/creative_tabs/AetherAccessoryTab.java
@@ -0,0 +1,33 @@
+package net.aetherteam.aether.creative_tabs;
+
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.ItemStack;
+
+public class AetherAccessoryTab extends CreativeTabs
+{
+ public AetherAccessoryTab()
+ {
+ super("AetherAccessoryTab");
+ }
+
+ public ItemStack getIconItemStack()
+ {
+ return new ItemStack(AetherItems.IronRing);
+ }
+
+ public String getTabLabel()
+ {
+ return "Aether Accessories";
+ }
+
+ public String getTranslatedTabLabel()
+ {
+ return getTabLabel();
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.creative_tabs.AetherAccessoryTab
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/creative_tabs/AetherArmourTab.java b/src/main/java/net/aetherteam/aether/creative_tabs/AetherArmourTab.java
new file mode 100644
index 0000000..a2480bb
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/creative_tabs/AetherArmourTab.java
@@ -0,0 +1,33 @@
+package net.aetherteam.aether.creative_tabs;
+
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.ItemStack;
+
+public class AetherArmourTab extends CreativeTabs
+{
+ public AetherArmourTab()
+ {
+ super("AetherArmourTab");
+ }
+
+ public ItemStack getIconItemStack()
+ {
+ return new ItemStack(AetherItems.ValkyrieChestplate);
+ }
+
+ public String getTabLabel()
+ {
+ return "Aether Armour";
+ }
+
+ public String getTranslatedTabLabel()
+ {
+ return getTabLabel();
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.creative_tabs.AetherArmourTab
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/creative_tabs/AetherBlockTab.java b/src/main/java/net/aetherteam/aether/creative_tabs/AetherBlockTab.java
new file mode 100644
index 0000000..b757d8e
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/creative_tabs/AetherBlockTab.java
@@ -0,0 +1,33 @@
+package net.aetherteam.aether.creative_tabs;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.ItemStack;
+
+public class AetherBlockTab extends CreativeTabs
+{
+ public AetherBlockTab()
+ {
+ super("AetherBlockTab");
+ }
+
+ public ItemStack getIconItemStack()
+ {
+ return new ItemStack(AetherBlocks.AetherGrass);
+ }
+
+ public String getTabLabel()
+ {
+ return "Aether Blocks";
+ }
+
+ public String getTranslatedTabLabel()
+ {
+ return getTabLabel();
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.creative_tabs.AetherBlockTab
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/creative_tabs/AetherCapeTab.java b/src/main/java/net/aetherteam/aether/creative_tabs/AetherCapeTab.java
new file mode 100644
index 0000000..df15c7a
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/creative_tabs/AetherCapeTab.java
@@ -0,0 +1,33 @@
+package net.aetherteam.aether.creative_tabs;
+
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.ItemStack;
+
+public class AetherCapeTab extends CreativeTabs
+{
+ public AetherCapeTab()
+ {
+ super("AetherCapeTab");
+ }
+
+ public ItemStack getIconItemStack()
+ {
+ return new ItemStack(AetherItems.SwetCape);
+ }
+
+ public String getTabLabel()
+ {
+ return "Aether Capes";
+ }
+
+ public String getTranslatedTabLabel()
+ {
+ return getTabLabel();
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.creative_tabs.AetherCapeTab
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/creative_tabs/AetherFoodTab.java b/src/main/java/net/aetherteam/aether/creative_tabs/AetherFoodTab.java
new file mode 100644
index 0000000..a7e30cd
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/creative_tabs/AetherFoodTab.java
@@ -0,0 +1,33 @@
+package net.aetherteam.aether.creative_tabs;
+
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.ItemStack;
+
+public class AetherFoodTab extends CreativeTabs
+{
+ public AetherFoodTab()
+ {
+ super("AetherFoodTab");
+ }
+
+ public ItemStack getIconItemStack()
+ {
+ return new ItemStack(AetherItems.BlueBerry);
+ }
+
+ public String getTabLabel()
+ {
+ return "Aether Food";
+ }
+
+ public String getTranslatedTabLabel()
+ {
+ return getTabLabel();
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.creative_tabs.AetherFoodTab
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/creative_tabs/AetherMaterialsTab.java b/src/main/java/net/aetherteam/aether/creative_tabs/AetherMaterialsTab.java
new file mode 100644
index 0000000..d7c331d
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/creative_tabs/AetherMaterialsTab.java
@@ -0,0 +1,33 @@
+package net.aetherteam.aether.creative_tabs;
+
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.ItemStack;
+
+public class AetherMaterialsTab extends CreativeTabs
+{
+ public AetherMaterialsTab()
+ {
+ super("AetherMaterialsTab");
+ }
+
+ public ItemStack getIconItemStack()
+ {
+ return new ItemStack(AetherItems.SkyrootStick);
+ }
+
+ public String getTabLabel()
+ {
+ return "Aether Materials";
+ }
+
+ public String getTranslatedTabLabel()
+ {
+ return getTabLabel();
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.creative_tabs.AetherMaterialsTab
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/creative_tabs/AetherMiscTab.java b/src/main/java/net/aetherteam/aether/creative_tabs/AetherMiscTab.java
new file mode 100644
index 0000000..58c9098
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/creative_tabs/AetherMiscTab.java
@@ -0,0 +1,33 @@
+package net.aetherteam.aether.creative_tabs;
+
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.ItemStack;
+
+public class AetherMiscTab extends CreativeTabs
+{
+ public AetherMiscTab()
+ {
+ super("AetherMiscTab");
+ }
+
+ public ItemStack getIconItemStack()
+ {
+ return new ItemStack(AetherItems.ShardOfLife);
+ }
+
+ public String getTabLabel()
+ {
+ return "Aether Miscellaneous";
+ }
+
+ public String getTranslatedTabLabel()
+ {
+ return getTabLabel();
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.creative_tabs.AetherMiscTab
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/creative_tabs/AetherToolsTab.java b/src/main/java/net/aetherteam/aether/creative_tabs/AetherToolsTab.java
new file mode 100644
index 0000000..1893158
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/creative_tabs/AetherToolsTab.java
@@ -0,0 +1,33 @@
+package net.aetherteam.aether.creative_tabs;
+
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.ItemStack;
+
+public class AetherToolsTab extends CreativeTabs
+{
+ public AetherToolsTab()
+ {
+ super("AetherToolsTab");
+ }
+
+ public ItemStack getIconItemStack()
+ {
+ return new ItemStack(AetherItems.GravititePickaxe);
+ }
+
+ public String getTabLabel()
+ {
+ return "Aether Tools";
+ }
+
+ public String getTranslatedTabLabel()
+ {
+ return getTabLabel();
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.creative_tabs.AetherToolsTab
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/creative_tabs/AetherWeaponsTab.java b/src/main/java/net/aetherteam/aether/creative_tabs/AetherWeaponsTab.java
new file mode 100644
index 0000000..3b4dc15
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/creative_tabs/AetherWeaponsTab.java
@@ -0,0 +1,33 @@
+package net.aetherteam.aether.creative_tabs;
+
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.ItemStack;
+
+public class AetherWeaponsTab extends CreativeTabs
+{
+ public AetherWeaponsTab()
+ {
+ super("AetherWeaponsTab");
+ }
+
+ public ItemStack getIconItemStack()
+ {
+ return new ItemStack(AetherItems.GravititeSword);
+ }
+
+ public String getTabLabel()
+ {
+ return "Aether Weapons";
+ }
+
+ public String getTranslatedTabLabel()
+ {
+ return getTabLabel();
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.creative_tabs.AetherWeaponsTab
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/data/AetherDataHandler.java b/src/main/java/net/aetherteam/aether/data/AetherDataHandler.java
new file mode 100644
index 0000000..a97834c
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/data/AetherDataHandler.java
@@ -0,0 +1,9 @@
+package net.aetherteam.aether.data;
+
+public class AetherDataHandler
+{}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.data.AetherDataHandler
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/data/AetherOptions.java b/src/main/java/net/aetherteam/aether/data/AetherOptions.java
new file mode 100644
index 0000000..5961102
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/data/AetherOptions.java
@@ -0,0 +1,76 @@
+package net.aetherteam.aether.data;
+
+public class AetherOptions
+{
+ private static boolean renderMemberHead = true;
+ private static boolean minimalPartyHUD = false;
+ private static boolean showPartyHUD = true;
+ private static boolean showPartyName = true;
+ private static boolean showNotifications = true;
+ private static boolean slideCoinbar = true;
+
+ public static void setMinimalPartyHUD(boolean option)
+ {
+ minimalPartyHUD = option;
+ }
+
+ public static void setRenderHead(boolean option)
+ {
+ renderMemberHead = option;
+ }
+
+ public static void setShowPartyHUD(boolean option)
+ {
+ showPartyHUD = option;
+ }
+
+ public static void setShowPartyName(boolean option)
+ {
+ showPartyName = option;
+ }
+
+ public static void setShowNotifications(boolean option)
+ {
+ showNotifications = option;
+ }
+
+ public static void setSlideCoinbar(boolean option)
+ {
+ slideCoinbar = option;
+ }
+
+ public static boolean getRenderHead()
+ {
+ return renderMemberHead;
+ }
+
+ public static boolean getMinimalPartyHUD()
+ {
+ return minimalPartyHUD;
+ }
+
+ public static boolean getShowPartyHUD()
+ {
+ return showPartyHUD;
+ }
+
+ public static boolean getShowPartyName()
+ {
+ return showPartyName;
+ }
+
+ public static boolean getShowNotifications()
+ {
+ return showNotifications;
+ }
+
+ public static boolean getSlideCoinbar()
+ {
+ return slideCoinbar;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.data.AetherOptions
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/data/PlayerClientInfo.java b/src/main/java/net/aetherteam/aether/data/PlayerClientInfo.java
new file mode 100644
index 0000000..0609188
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/data/PlayerClientInfo.java
@@ -0,0 +1,51 @@
+package net.aetherteam.aether.data;
+
+import net.minecraft.util.MathHelper;
+
+public class PlayerClientInfo
+{
+ private int halfHearts;
+ private int maxHealth;
+ private int hunger;
+ private int armourValue;
+ private int aetherCoins;
+
+ public PlayerClientInfo(int halfHearts, int maxHealth, int hunger, int armourValue, int aetherCoins)
+ {
+ this.maxHealth = maxHealth;
+ this.halfHearts = MathHelper.clamp_int(halfHearts, 0, this.maxHealth);
+ this.hunger = hunger;
+ this.armourValue = armourValue;
+ this.aetherCoins = aetherCoins;
+ }
+
+ public int getHalfHearts()
+ {
+ return this.halfHearts;
+ }
+
+ public int getMaxHealth()
+ {
+ return this.maxHealth;
+ }
+
+ public int getHunger()
+ {
+ return this.hunger;
+ }
+
+ public int getArmourValue()
+ {
+ return this.armourValue;
+ }
+
+ public int getAetherCoins()
+ {
+ return this.aetherCoins;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.data.PlayerClientInfo
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/data/SerialDataHandler.java b/src/main/java/net/aetherteam/aether/data/SerialDataHandler.java
new file mode 100644
index 0000000..30a7c5c
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/data/SerialDataHandler.java
@@ -0,0 +1,114 @@
+package net.aetherteam.aether.data;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.EOFException;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import net.minecraft.server.MinecraftServer;
+import net.minecraft.world.WorldServer;
+import net.minecraft.world.storage.ISaveHandler;
+
+public class SerialDataHandler
+{
+ private String path;
+ private String fileName;
+
+ public SerialDataHandler(String path, String fileName)
+ {
+ this.path = path;
+ this.fileName = fileName;
+ }
+
+ public SerialDataHandler(String fileName)
+ {
+ this.path = (serverIsUp() ? MinecraftServer.getServer().worldServers[0].getSaveHandler().getMapFileFromName(MinecraftServer.getServer().getFolderName()).getAbsolutePath().replace(MinecraftServer.getServer().getFolderName() + ".dat", "") : null);
+ this.fileName = fileName;
+ }
+
+ public boolean serverIsUp()
+ {
+ return (MinecraftServer.getServer() != null) && (MinecraftServer.getServer().worldServers != null) && (MinecraftServer.getServer().worldServers[0] != null);
+ }
+
+ public void serializeObjects(ArrayList objects)
+ {
+ try
+ {
+ ObjectOutputStream objectOut = new ObjectOutputStream(new BufferedOutputStream(new FileOutputStream(this.path + this.fileName)));
+
+ for (Iterator i$ = objects.iterator(); i$.hasNext(); )
+ {
+ Object object = i$.next();
+
+ objectOut.writeObject(object);
+ }
+
+ objectOut.close();
+ } catch (FileNotFoundException e)
+ {
+ e.printStackTrace();
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ public ArrayList deserializeObjects()
+ {
+ try
+ {
+ File file = new File(this.path + this.fileName);
+
+ if (file.exists())
+ {
+ FileInputStream inputStream = new FileInputStream(this.path + this.fileName);
+
+ ArrayList objects = new ArrayList();
+
+ ObjectInputStream objectIn = new ObjectInputStream(new BufferedInputStream(inputStream));
+
+ Object obj = null;
+
+ boolean catchBool = true;
+ try
+ {
+ while (true) if (catchBool) try
+ {
+ if ((obj = objectIn.readObject()) != null)
+ {
+ objects.add(obj);
+ } else catchBool = false;
+ } catch (EOFException exc)
+ {
+ }
+ } catch (ClassNotFoundException e)
+ {
+ e.printStackTrace();
+ }
+
+ objectIn.close();
+
+ return objects;
+ }
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ return null;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.data.SerialDataHandler
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/donator/Base58.java b/src/main/java/net/aetherteam/aether/donator/Base58.java
new file mode 100644
index 0000000..605f6c1
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/donator/Base58.java
@@ -0,0 +1,80 @@
+package net.aetherteam.aether.donator;
+
+import java.math.BigInteger;
+
+public class Base58
+{
+ private static final String ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
+ private static final BigInteger BASE = BigInteger.valueOf(58L);
+
+ public static String encode(byte[] input)
+ {
+ BigInteger bi = new BigInteger(1, input);
+ StringBuffer s = new StringBuffer();
+ while (bi.compareTo(BASE) >= 0)
+ {
+ BigInteger mod = bi.mod(BASE);
+ s.insert(0, "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz".charAt(mod.intValue()));
+ bi = bi.subtract(mod).divide(BASE);
+ }
+ s.insert(0, "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz".charAt(bi.intValue()));
+
+ for (byte anInput : input)
+ {
+ if (anInput != 0) break;
+ s.insert(0, "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz".charAt(0));
+ }
+
+ return s.toString();
+ }
+
+ public static byte[] decode(String input)
+ {
+ if (input.length() == 0)
+ {
+ return null;
+ }
+ BigInteger decoded = decodeToBigInteger(input);
+ if (decoded == null)
+ {
+ return null;
+ }
+ byte[] bytes = decoded.toByteArray();
+
+ boolean stripSignByte = (bytes.length > 1) && (bytes[0] == 0) && (bytes[1] < 0);
+
+ int leadingZeros = 0;
+ for (int i = 0; (i < input.length()) && (input.charAt(i) == "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz".charAt(0)); i++)
+ {
+ leadingZeros++;
+ }
+
+ byte[] tmp = new byte[bytes.length - (stripSignByte ? 1 : 0) + leadingZeros];
+
+ System.arraycopy(bytes, stripSignByte ? 1 : 0, tmp, leadingZeros, tmp.length - leadingZeros);
+
+ return tmp;
+ }
+
+ private static BigInteger decodeToBigInteger(String input)
+ {
+ BigInteger bi = BigInteger.valueOf(0L);
+
+ for (int i = input.length() - 1; i >= 0; i--)
+ {
+ int alphaIndex = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz".indexOf(input.charAt(i));
+ if (alphaIndex == -1)
+ {
+ return null;
+ }
+ bi = bi.add(BigInteger.valueOf(alphaIndex).multiply(BASE.pow(input.length() - 1 - i)));
+ }
+
+ return bi;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.donator.Base58
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/donator/Donator.java b/src/main/java/net/aetherteam/aether/donator/Donator.java
new file mode 100644
index 0000000..fdf30c7
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/donator/Donator.java
@@ -0,0 +1,64 @@
+package net.aetherteam.aether.donator;
+
+import java.util.HashMap;
+
+public class Donator
+{
+ public String username;
+ String RSA;
+ public HashMap choices = new HashMap();
+
+ public Donator(String username, String RSA)
+ {
+ this.username = username;
+ this.RSA = RSA;
+ }
+
+ public String getRSA()
+ {
+ return this.RSA;
+ }
+
+ public void addChoice(DonatorChoice choice)
+ {
+ if (this.choices.get(choice.type) != null)
+ {
+ this.choices.remove(choice.type);
+ }
+
+ this.choices.put(choice.type, choice);
+ }
+
+ public void removeChoiceType(EnumChoiceType type)
+ {
+ if (this.choices.get(type) != null)
+ {
+ this.choices.remove(type);
+ }
+ }
+
+ public boolean containsChoiceType(EnumChoiceType type)
+ {
+ if (this.choices.get(type) != null)
+ {
+ return true;
+ }
+
+ return false;
+ }
+
+ public DonatorChoice getChoiceFromType(EnumChoiceType type)
+ {
+ if (this.choices.get(type) != null)
+ {
+ return (DonatorChoice) this.choices.get(type);
+ }
+
+ return null;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.donator.Donator
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/donator/DonatorChoice.java b/src/main/java/net/aetherteam/aether/donator/DonatorChoice.java
new file mode 100644
index 0000000..35c6ec1
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/donator/DonatorChoice.java
@@ -0,0 +1,47 @@
+package net.aetherteam.aether.donator;
+
+import java.util.ArrayList;
+
+public class DonatorChoice
+{
+ public String name;
+ public EnumChoiceType type;
+ public DonatorTexture textureFile;
+ public static ArrayList choices = new ArrayList();
+
+ public DonatorChoice(String name, EnumChoiceType type, DonatorTexture texture)
+ {
+ this.name = name;
+ this.type = type;
+
+ texture.localURL = (type.localTexturePath + texture.localURL);
+ texture.onlineURL = (type.onlineTexturePath + texture.onlineURL);
+
+ this.textureFile = texture;
+
+ choices.add(this);
+ }
+
+ public static DonatorChoice getChoiceFromString(String name)
+ {
+ for (int i = 0; i < choices.size(); i++)
+ {
+ if (((DonatorChoice) choices.get(i)).name.equalsIgnoreCase(name))
+ {
+ return (DonatorChoice) choices.get(i);
+ }
+ }
+
+ return null;
+ }
+
+ public boolean isType(EnumChoiceType type)
+ {
+ return this.type == type;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.donator.DonatorChoice
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/donator/DonatorChoices.java b/src/main/java/net/aetherteam/aether/donator/DonatorChoices.java
new file mode 100644
index 0000000..0dbff25
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/donator/DonatorChoices.java
@@ -0,0 +1,30 @@
+package net.aetherteam.aether.donator;
+
+import java.util.ArrayList;
+
+import net.aetherteam.aether.donator.choices.AercloudCapeChoice;
+import net.aetherteam.aether.donator.choices.ClassicMoaChoice;
+import net.aetherteam.aether.donator.choices.PhoenixMoaChoice;
+import net.aetherteam.aether.donator.choices.SliderCapeChoice;
+import net.aetherteam.aether.donator.choices.ValkyrieMoaChoice;
+
+public class DonatorChoices
+{
+ public ArrayList capeChoices = new ArrayList();
+ public ArrayList moaChoices = new ArrayList();
+
+ public DonatorChoices()
+ {
+ this.capeChoices.add(new SliderCapeChoice());
+ this.capeChoices.add(new AercloudCapeChoice());
+
+ this.moaChoices.add(new ValkyrieMoaChoice());
+ this.moaChoices.add(new PhoenixMoaChoice());
+ this.moaChoices.add(new ClassicMoaChoice());
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.donator.DonatorChoices
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/donator/DonatorTexture.java b/src/main/java/net/aetherteam/aether/donator/DonatorTexture.java
new file mode 100644
index 0000000..fc130b7
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/donator/DonatorTexture.java
@@ -0,0 +1,22 @@
+package net.aetherteam.aether.donator;
+
+public class DonatorTexture
+{
+ public int imageWidth;
+ public int imageHeight;
+ public String onlineURL;
+ public String localURL;
+
+ public DonatorTexture(String local, String url, int width, int height)
+ {
+ this.localURL = local;
+ this.onlineURL = url;
+ this.imageWidth = width;
+ this.imageHeight = height;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.donator.DonatorTexture
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/donator/EnumChoiceType.java b/src/main/java/net/aetherteam/aether/donator/EnumChoiceType.java
new file mode 100644
index 0000000..a153ff6
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/donator/EnumChoiceType.java
@@ -0,0 +1,36 @@
+package net.aetherteam.aether.donator;
+
+public enum EnumChoiceType
+{
+ MOA("MOA", "/net/aetherteam/aether/client/sprites/moa/", "http://www.aethermod.net/skins/moa_"),
+ CAPE("CAPE", "/net/aetherteam/aether/client/sprites/capes/", "http://www.aethermod.net/skins/cape_");
+
+ public String name;
+ public String localTexturePath;
+ public String onlineTexturePath;
+
+ private EnumChoiceType(String name, String texturePath, String onlinePath)
+ {
+ this.name = name;
+ this.localTexturePath = texturePath;
+ this.onlineTexturePath = onlinePath;
+ }
+
+ public static EnumChoiceType getTypeFromString(String name)
+ {
+ for (EnumChoiceType v : values())
+ {
+ if (v.name().equals(name))
+ {
+ return v;
+ }
+ }
+
+ return null;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.donator.EnumChoiceType
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/donator/SyncDonatorList.java b/src/main/java/net/aetherteam/aether/donator/SyncDonatorList.java
new file mode 100644
index 0000000..ada1758
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/donator/SyncDonatorList.java
@@ -0,0 +1,101 @@
+package net.aetherteam.aether.donator;
+
+import cpw.mods.fml.common.network.PacketDispatcher;
+import cpw.mods.fml.common.network.Player;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.packets.AetherPacketHandler;
+import net.minecraft.client.Minecraft;
+import net.minecraft.util.Session;
+
+public class SyncDonatorList
+{
+ String meName;
+ Donator meDonator;
+ HashMap DonatorList = new HashMap();
+ boolean server = false;
+ String MyRSA;
+
+ public void initialVerification(Minecraft mc)
+ {
+ String Username = mc.session.username;
+
+ this.MyRSA = Aether.getInstance().getMyKey(Username.toLowerCase());
+
+ if (this.MyRSA != null)
+ {
+ Aether.getInstance();
+ Aether.syncDonatorList.addMe(Username.toLowerCase(), this.MyRSA);
+ }
+ }
+
+ public void addMe(String username, String myRSA)
+ {
+ if (this.server)
+ {
+ return;
+ }
+
+ this.meName = username.toLowerCase();
+
+ if (myRSA != null)
+ {
+ this.meDonator = new Donator(username.toLowerCase(), myRSA);
+ addDonator(this.meName.toLowerCase(), this.meDonator);
+ }
+ }
+
+ public boolean isDonator(String name)
+ {
+ return this.DonatorList.containsKey(name.toLowerCase());
+ }
+
+ public Donator getDonator(String name)
+ {
+ return (Donator) this.DonatorList.get(name.toLowerCase());
+ }
+
+ public void addDonator(String name, Donator donator)
+ {
+ if (Aether.instance.isLegit(name.toLowerCase(), donator.getRSA()))
+ {
+ this.DonatorList.put(name.toLowerCase(), donator);
+ }
+ if (this.server) sendDonatorToAll(name.toLowerCase(), donator);
+ }
+
+ public void sendDonatorToAll(String name, Donator donator)
+ {
+ PacketDispatcher.sendPacketToAllPlayers(AetherPacketHandler.sendDonatorChange(name.toLowerCase(), donator));
+ }
+
+ public void sendChoiceToAll(String donator, DonatorChoice choice, boolean adding)
+ {
+ PacketDispatcher.sendPacketToServer(AetherPacketHandler.sendDonatorChoice(donator.toLowerCase(), choice, adding, (byte) 0));
+ }
+
+ public void sendTypeRemoveToAll(String donator, EnumChoiceType type)
+ {
+ PacketDispatcher.sendPacketToServer(AetherPacketHandler.sendDonatorTypeRemoval(donator.toLowerCase(), type, (byte) 0));
+ }
+
+ void sendAllToOne(Player player)
+ {
+ Iterator i = this.DonatorList.values().iterator();
+
+ while (i.hasNext())
+ {
+ String name = (String) i.next();
+ PacketDispatcher.sendPacketToPlayer(AetherPacketHandler.sendDonatorChange(name, (Donator) this.DonatorList.get(name.toLowerCase())), player);
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.donator.SyncDonatorList
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/donator/SyncedDonatorChoices.java b/src/main/java/net/aetherteam/aether/donator/SyncedDonatorChoices.java
new file mode 100644
index 0000000..4e07e12
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/donator/SyncedDonatorChoices.java
@@ -0,0 +1,126 @@
+package net.aetherteam.aether.donator;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Properties;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.util.Session;
+
+public class SyncedDonatorChoices
+{
+ private static Minecraft mc = Minecraft.getMinecraft();
+
+ private static final Properties props = new Properties();
+ private static String fileName;
+ private static String directory;
+ private static File config;
+ public static HashMap choices = new HashMap();
+
+ public static void loadConfig()
+ {
+ fileName = mc.session.username + ".properties";
+ directory = Minecraft.getMinecraftDir() + "/aether/donators/";
+ config = new File(directory, fileName);
+ config.mkdir();
+
+ if (config.exists()) try
+ {
+ FileInputStream in = new FileInputStream(directory + fileName);
+
+ props.load(in);
+
+ if (props.size() <= 0)
+ {
+ resetChoices();
+ return;
+ }
+
+ int count = 0;
+
+ while (String.valueOf(props.getProperty("choice" + count)) != null)
+ {
+ String name = String.valueOf(props.getProperty("choice" + count));
+ choices.put(name, "choice" + count);
+
+ count++;
+ }
+ } catch (FileNotFoundException e)
+ {
+ e.printStackTrace();
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+ else resetChoices();
+ }
+
+ public static void resetChoices()
+ {
+ try
+ {
+ props.clear();
+
+ props.store(new FileOutputStream(directory + fileName), null);
+
+ FileInputStream in = new FileInputStream(directory + fileName);
+
+ props.load(in);
+ } catch (FileNotFoundException e)
+ {
+ e.printStackTrace();
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ public static void removeProperty(String name)
+ {
+ try
+ {
+ props.remove(name);
+
+ props.store(new FileOutputStream(directory + fileName), null);
+
+ FileInputStream in = new FileInputStream(fileName);
+
+ props.load(in);
+ } catch (FileNotFoundException e)
+ {
+ e.printStackTrace();
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ public static void setProperty(String name, String value)
+ {
+ try
+ {
+ props.setProperty(name, value);
+
+ props.store(new FileOutputStream(directory + fileName), null);
+
+ FileInputStream in = new FileInputStream(fileName);
+
+ props.load(in);
+ } catch (FileNotFoundException e)
+ {
+ e.printStackTrace();
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.donator.SyncedDonatorChoices
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/donator/choices/AercloudCapeChoice.java b/src/main/java/net/aetherteam/aether/donator/choices/AercloudCapeChoice.java
new file mode 100644
index 0000000..34784cc
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/donator/choices/AercloudCapeChoice.java
@@ -0,0 +1,18 @@
+package net.aetherteam.aether.donator.choices;
+
+import net.aetherteam.aether.donator.DonatorChoice;
+import net.aetherteam.aether.donator.DonatorTexture;
+import net.aetherteam.aether.donator.EnumChoiceType;
+
+public class AercloudCapeChoice extends DonatorChoice
+{
+ public AercloudCapeChoice()
+ {
+ super("Aercloud Cape", EnumChoiceType.CAPE, new DonatorTexture("cape_Aercloud.png", "Aercloud.png", 256, 128));
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.donator.choices.AercloudCapeChoice
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/donator/choices/ClassicMoaChoice.java b/src/main/java/net/aetherteam/aether/donator/choices/ClassicMoaChoice.java
new file mode 100644
index 0000000..7a339b6
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/donator/choices/ClassicMoaChoice.java
@@ -0,0 +1,17 @@
+package net.aetherteam.aether.donator.choices;
+
+import net.aetherteam.aether.donator.DonatorTexture;
+import net.aetherteam.aether.donator.EnumChoiceType;
+
+public class ClassicMoaChoice extends MoaChoice
+{
+ public ClassicMoaChoice()
+ {
+ super("Classic Moa", EnumChoiceType.MOA, new DonatorTexture("/old/moa_Classic.png", "Classic.png", 128, 64));
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.donator.choices.ClassicMoaChoice
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/donator/choices/MoaChoice.java b/src/main/java/net/aetherteam/aether/donator/choices/MoaChoice.java
new file mode 100644
index 0000000..9498786
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/donator/choices/MoaChoice.java
@@ -0,0 +1,49 @@
+package net.aetherteam.aether.donator.choices;
+
+import java.util.Random;
+
+import net.aetherteam.aether.AetherMoaColour;
+import net.aetherteam.aether.donator.DonatorChoice;
+import net.aetherteam.aether.donator.DonatorTexture;
+import net.aetherteam.aether.donator.EnumChoiceType;
+import net.minecraft.entity.player.EntityPlayer;
+
+public class MoaChoice extends DonatorChoice
+{
+ AetherMoaColour colour = null;
+ boolean overrideAll = true;
+
+ public MoaChoice(String name, EnumChoiceType type, DonatorTexture texture)
+ {
+ super(name, type, texture);
+ }
+
+ public void setOverrideAll(boolean all)
+ {
+ this.overrideAll = all;
+ }
+
+ public boolean getOverrideAll()
+ {
+ return this.overrideAll;
+ }
+
+ public AetherMoaColour getOverridingColour()
+ {
+ return this.colour;
+ }
+
+ public void setOverridingColour(AetherMoaColour colour)
+ {
+ this.colour = colour;
+ }
+
+ public void spawnParticleEffects(Random random, EntityPlayer player)
+ {
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.donator.choices.MoaChoice
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/donator/choices/PhoenixMoaChoice.java b/src/main/java/net/aetherteam/aether/donator/choices/PhoenixMoaChoice.java
new file mode 100644
index 0000000..aaff805
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/donator/choices/PhoenixMoaChoice.java
@@ -0,0 +1,17 @@
+package net.aetherteam.aether.donator.choices;
+
+import net.aetherteam.aether.donator.DonatorTexture;
+import net.aetherteam.aether.donator.EnumChoiceType;
+
+public class PhoenixMoaChoice extends MoaChoice
+{
+ public PhoenixMoaChoice()
+ {
+ super("Phoenix Moa", EnumChoiceType.MOA, new DonatorTexture("saddle_Phoenix.png", "Phoenix.png", 256, 128));
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.donator.choices.PhoenixMoaChoice
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/donator/choices/SliderCapeChoice.java b/src/main/java/net/aetherteam/aether/donator/choices/SliderCapeChoice.java
new file mode 100644
index 0000000..0af9450
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/donator/choices/SliderCapeChoice.java
@@ -0,0 +1,18 @@
+package net.aetherteam.aether.donator.choices;
+
+import net.aetherteam.aether.donator.DonatorChoice;
+import net.aetherteam.aether.donator.DonatorTexture;
+import net.aetherteam.aether.donator.EnumChoiceType;
+
+public class SliderCapeChoice extends DonatorChoice
+{
+ public SliderCapeChoice()
+ {
+ super("Slider Cape", EnumChoiceType.CAPE, new DonatorTexture("cape_Slider.png", "Slider.png", 256, 128));
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.donator.choices.SliderCapeChoice
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/donator/choices/ValkyrieMoaChoice.java b/src/main/java/net/aetherteam/aether/donator/choices/ValkyrieMoaChoice.java
new file mode 100644
index 0000000..d6455b0
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/donator/choices/ValkyrieMoaChoice.java
@@ -0,0 +1,27 @@
+package net.aetherteam.aether.donator.choices;
+
+import java.util.Random;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.CommonProxy;
+import net.aetherteam.aether.donator.DonatorTexture;
+import net.aetherteam.aether.donator.EnumChoiceType;
+import net.minecraft.entity.player.EntityPlayer;
+
+public class ValkyrieMoaChoice extends MoaChoice
+{
+ public ValkyrieMoaChoice()
+ {
+ super("Valkyrie Moa", EnumChoiceType.MOA, new DonatorTexture("saddle_Valkyrie.png", "Valkyrie.png", 256, 128));
+ }
+
+ public void spawnParticleEffects(Random random, EntityPlayer player)
+ {
+ Aether.proxy.spawnDonatorMoaParticles(player, random);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.donator.choices.ValkyrieMoaChoice
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/dungeons/Dungeon.java b/src/main/java/net/aetherteam/aether/dungeons/Dungeon.java
new file mode 100644
index 0000000..8c4c52d
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/dungeons/Dungeon.java
@@ -0,0 +1,793 @@
+package net.aetherteam.aether.dungeons;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.network.PacketDispatcher;
+import cpw.mods.fml.relauncher.Side;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.AetherLoot;
+import net.aetherteam.aether.CommonProxy;
+import net.aetherteam.aether.dungeons.keys.DungeonKey;
+import net.aetherteam.aether.dungeons.keys.EnumKeyType;
+import net.aetherteam.aether.packets.AetherPacketHandler;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.aetherteam.aether.tile_entities.TileEntityEntranceController;
+import net.aetherteam.aether.tile_entities.TileEntitySkyrootChest;
+import net.aetherteam.aether.worldgen.ComponentDungeonBronzeRoom;
+import net.aetherteam.aether.worldgen.StructureBoundingBoxSerial;
+import net.aetherteam.aether.worldgen.StructureBronzeDungeonStart;
+import net.minecraft.block.Block;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.audio.SoundManager;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityList;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.server.MinecraftServer;
+import net.minecraft.server.management.ServerConfigurationManager;
+import net.minecraft.tileentity.MobSpawnerBaseLogic;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.tileentity.TileEntityMobSpawner;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.Session;
+import net.minecraft.world.World;
+import paulscode.sound.SoundSystem;
+
+public class Dungeon implements Serializable
+{
+ private DungeonType dungeonType;
+ private String name;
+ private int keepCap;
+ private boolean hasStarted;
+ public int centerX;
+ public int centerZ;
+ private Party currentActiveParty;
+ private ArrayList conquerers = new ArrayList();
+ private HashMap leavers = new HashMap();
+
+ public ArrayList boundingBoxes = new ArrayList();
+ public StructureBoundingBoxSerial boundingBox;
+ private int dungeonID;
+ private boolean active;
+ private HashMap queuedMembers = new HashMap();
+
+ private Integer[] controllerCoords = new Integer[3];
+
+ private long startingTime = 0L;
+ private boolean timerStarted;
+ private int timerLength;
+ private ArrayList keyList = new ArrayList();
+ private ArrayList savedBlockCoords = new ArrayList();
+ private ArrayList savedEntityCoords = new ArrayList();
+ private ArrayList savedTileEntities = new ArrayList();
+ private ArrayList savedMobSpawners = new ArrayList();
+ String aetherVersion;
+
+ public Dungeon(DungeonType type, int x, int z, StructureBronzeDungeonStart start)
+ {
+ this.dungeonType = type;
+ this.name = this.dungeonType.getName();
+ this.aetherVersion = Aether.getVersion();
+
+ this.centerX = x;
+ this.centerZ = z;
+
+ updateBoundingBox(start);
+
+ this.dungeonID = DungeonHandler.instance().getInstances().size();
+ }
+
+ public Dungeon(DungeonType type, int x, int z, StructureBoundingBoxSerial box, ArrayList boxes)
+ {
+ this(type, x, z, null);
+
+ this.boundingBox = box;
+ this.boundingBoxes = boxes;
+ }
+
+ public void addKey(DungeonKey key)
+ {
+ this.keyList.add(key);
+ }
+
+ public void removeKey(DungeonKey key)
+ {
+ for (DungeonKey keyToRemove : this.keyList)
+ {
+ if (keyToRemove.getType() == key.getType())
+ {
+ this.keyList.remove(keyToRemove);
+ return;
+ }
+ }
+ }
+
+ public int getKeyAmount()
+ {
+ return this.keyList.size();
+ }
+
+ public int getKeyAmount(DungeonKey key)
+ {
+ return getKeyAmount(key.getType());
+ }
+
+ public ArrayList getKeys()
+ {
+ return this.keyList;
+ }
+
+ public int getKeyAmount(EnumKeyType type)
+ {
+ int keyAmount = 0;
+
+ if (type != null)
+ {
+ for (DungeonKey keyIt : this.keyList)
+ {
+ if (keyIt.getType() == type)
+ {
+ keyAmount++;
+ }
+ }
+ }
+
+ return keyAmount;
+ }
+
+ public boolean hasKeyType(EnumKeyType type)
+ {
+ if (type != null)
+ {
+ for (DungeonKey keyIt : this.keyList)
+ {
+ if (keyIt.getType() == type)
+ {
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+
+ public DungeonType getType()
+ {
+ return this.dungeonType;
+ }
+
+ public Dungeon setID(int id)
+ {
+ this.dungeonID = id;
+
+ return this;
+ }
+
+ public int getID()
+ {
+ return this.dungeonID;
+ }
+
+ public void updateBoundingBox(StructureBronzeDungeonStart structure)
+ {
+ if (structure != null)
+ {
+ this.boundingBox = StructureBoundingBoxSerial.getNewBoundingBox();
+ Iterator componentsIt = structure.components.iterator();
+
+ while (componentsIt.hasNext())
+ {
+ ComponentDungeonBronzeRoom component = (ComponentDungeonBronzeRoom) componentsIt.next();
+
+ StructureBoundingBoxSerial serialBox = new StructureBoundingBoxSerial(component.getBoundingBox());
+
+ this.boundingBoxes.add(serialBox);
+
+ this.boundingBox.expandTo(serialBox);
+ }
+ }
+ }
+
+ public void finishDungeon(Party party)
+ {
+ if (this.currentActiveParty == null)
+ {
+ return;
+ }
+
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if ((this.currentActiveParty.getName().equalsIgnoreCase(party.getName())) && (this.active))
+ {
+ if (side.isServer())
+ {
+ MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
+ ServerConfigurationManager configManager = server.getConfigurationManager();
+
+ EntityPlayer player = null;
+
+ for (Iterator i$ = configManager.playerEntityList.iterator(); i$.hasNext(); )
+ {
+ Object obj = i$.next();
+
+ if (((obj instanceof EntityPlayer)) && (party.hasMember(((EntityPlayer) obj).username.toLowerCase())))
+ {
+ if (((EntityPlayer) obj).username.equalsIgnoreCase(party.getLeader().username.toLowerCase()))
+ {
+ player = (EntityPlayer) obj;
+ }
+ }
+ }
+
+ if (player != null)
+ {
+ TileEntityEntranceController controller = (TileEntityEntranceController) player.worldObj.getBlockTileEntity(this.controllerCoords[0].intValue(), this.controllerCoords[1].intValue(), this.controllerCoords[2].intValue());
+
+ controller.teleportMembersFromParty(getQueuedMembers(), true);
+ cleanUpDungeon(controller.worldObj);
+ }
+ }
+
+ for (PartyMember member : getQueuedMembers())
+ {
+ this.conquerers.add(member.username.toLowerCase());
+ }
+
+ this.currentActiveParty = null;
+ setActive(false);
+ this.hasStarted = false;
+ this.timerStarted = false;
+ this.keyList.clear();
+ this.controllerCoords = new Integer[3];
+ this.queuedMembers.clear();
+ }
+
+ DungeonHandler.instance().saveDungeons();
+ }
+
+ public boolean hasConqueredDungeon(String username)
+ {
+ for (String conquererName : this.conquerers)
+ {
+ if (username.equalsIgnoreCase(conquererName))
+ {
+ return true;
+ }
+ }
+
+ for (String leaverName : this.leavers.keySet())
+ {
+ if ((this.leavers.get(username.toLowerCase()) == null) || ((username.equalsIgnoreCase(leaverName)) && (this.leavers.get(username.toLowerCase()) != null) && (((Integer) this.leavers.get(username.toLowerCase())).intValue() >= 3)))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public boolean hasConqueredDungeon(EntityPlayer player)
+ {
+ return hasConqueredDungeon(player.username);
+ }
+
+ public boolean hasConqueredDungeon(PartyMember player)
+ {
+ return hasConqueredDungeon(player.username);
+ }
+
+ public boolean hasAnyConqueredDungeon(ArrayList players)
+ {
+ for (int count = 0; count < players.size(); count++)
+ {
+ if ((players.get(count) instanceof PartyMember))
+ {
+ if (hasConqueredDungeon((PartyMember) players.get(count)))
+ {
+ return true;
+ }
+ } else if ((players.get(count) instanceof EntityPlayer))
+ {
+ if (hasConqueredDungeon((EntityPlayer) players.get(count)))
+ {
+ return true;
+ }
+ } else if (((players.get(count) instanceof String)) && (hasConqueredDungeon((String) players.get(count))))
+ {
+ return true;
+ }
+
+ }
+
+ return false;
+ }
+
+ public boolean hasListConqueredDungeon(ArrayList players)
+ {
+ if (hasAnyConqueredDungeon(players))
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ public void queueParty(Party party, int controlX, int controlY, int controlZ)
+ {
+ if ((this.currentActiveParty == null) && (party != null))
+ {
+ this.currentActiveParty = party;
+
+ this.controllerCoords[0] = Integer.valueOf(MathHelper.floor_double(controlX));
+ this.controllerCoords[1] = Integer.valueOf(MathHelper.floor_double(controlY));
+ this.controllerCoords[2] = Integer.valueOf(MathHelper.floor_double(controlZ));
+ }
+
+ DungeonHandler.instance().saveDungeons();
+ }
+
+ public boolean isSoundOn()
+ {
+ return (isClient()) && (Aether.proxy.getClient().sndManager != null) && (SoundManager.sndSystem != null);
+ }
+
+ public boolean isClient()
+ {
+ return Aether.proxy.getClient() != null;
+ }
+
+ public boolean isMusicPlaying()
+ {
+ return (SoundManager.sndSystem != null) && (SoundManager.sndSystem.playing("streaming"));
+ }
+
+ public void turnMusicOff()
+ {
+ if (isSoundOn())
+ {
+ SoundManager.sndSystem.stop("streaming");
+ }
+ }
+
+ public void playMusicFile(String fileName, int x, int y, int z)
+ {
+ if (isSoundOn())
+ {
+ Aether.proxy.getClient().sndManager.playStreaming(fileName, x, y, z);
+ }
+ }
+
+ public void checkForQueue()
+ {
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if ((this.currentActiveParty != null) && (this.queuedMembers.size() >= this.currentActiveParty.getMembers().size()) && (!this.hasStarted) && (this.currentActiveParty.getMembers() != null))
+ {
+ this.hasStarted = true;
+ if (side.isServer())
+ {
+ MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
+ ServerConfigurationManager configManager = server.getConfigurationManager();
+
+ EntityPlayer player = null;
+
+ for (Iterator i$ = configManager.playerEntityList.iterator(); i$.hasNext(); )
+ {
+ Object obj = i$.next();
+
+ if (((obj instanceof EntityPlayer)) && (this.currentActiveParty.hasMember(((EntityPlayer) obj).username.toLowerCase())))
+ {
+ if (((EntityPlayer) obj).username.equalsIgnoreCase(this.currentActiveParty.getLeader().username.toLowerCase()))
+ {
+ player = (EntityPlayer) obj;
+ }
+
+ EntityPlayer player2 = (EntityPlayer) obj;
+
+ if (player2.dimension != 3)
+ {
+ TileEntityEntranceController controller = (TileEntityEntranceController) player.worldObj.getBlockTileEntity(this.controllerCoords[0].intValue(), this.controllerCoords[1].intValue(), this.controllerCoords[2].intValue());
+
+ if (controller != null)
+ {
+ int x = MathHelper.floor_double(controller.xCoord);
+ int y = MathHelper.floor_double(controller.yCoord);
+ int z = MathHelper.floor_double(controller.zCoord);
+
+ DungeonHandler.instance().disbandQueue(this, this.currentActiveParty, x, y, z, PartyController.instance().getMember((EntityPlayer) obj), false);
+
+ PacketDispatcher.sendPacketToAllPlayers(AetherPacketHandler.sendDungeonQueueChange(false, this, x, y, z, this.currentActiveParty));
+ }
+
+ return;
+ }
+ }
+ }
+
+ if (player != null)
+ {
+ TileEntityEntranceController controller = (TileEntityEntranceController) player.worldObj.getBlockTileEntity(this.controllerCoords[0].intValue(), this.controllerCoords[1].intValue(), this.controllerCoords[2].intValue());
+
+ controller.teleportMembersFromParty(this.currentActiveParty.getMembers(), false);
+
+ regenBosses(player.worldObj);
+ }
+
+ } else if (hasMember(PartyController.instance().getMember(Minecraft.getMinecraft().session.username)))
+ {
+ playMusicFile("Dungeon Background", this.controllerCoords[0].intValue(), this.controllerCoords[1].intValue(), this.controllerCoords[2].intValue());
+ }
+ }
+ }
+
+ public void queueMember(Party party, PartyMember member)
+ {
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if ((isQueuedParty(party)) && (party.hasMember(member)))
+ {
+ setActive(true);
+ this.queuedMembers.put(member.username.toLowerCase(), member);
+
+ checkForQueue();
+ }
+
+ DungeonHandler.instance().saveDungeons();
+ }
+
+ public void startTimer(int seconds)
+ {
+ this.timerLength = seconds;
+ this.startingTime = (System.currentTimeMillis() / 1000L);
+ this.timerStarted = true;
+ }
+
+ public boolean timerFinished()
+ {
+ return getTimerSeconds() >= this.timerLength;
+ }
+
+ public boolean timerStarted()
+ {
+ return this.timerStarted;
+ }
+
+ public int getTimerSeconds()
+ {
+ long currentTime = System.currentTimeMillis() / 1000L;
+
+ return (int) (currentTime - this.startingTime);
+ }
+
+ public int getTimerLength()
+ {
+ return this.timerLength;
+ }
+
+ public boolean hasQueuedParty()
+ {
+ return this.currentActiveParty != null;
+ }
+
+ public Party getQueuedParty()
+ {
+ return this.currentActiveParty;
+ }
+
+ public boolean isQueuedParty(Party party)
+ {
+ return (party != null) && (this.currentActiveParty != null) && (this.currentActiveParty.getName().equalsIgnoreCase(party.getName()));
+ }
+
+ public boolean isActive()
+ {
+ return this.active;
+ }
+
+ public void setActive(boolean flag)
+ {
+ this.active = flag;
+ }
+
+ public void disbandQueue(Party party)
+ {
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (this.currentActiveParty != null)
+ {
+ if ((this.currentActiveParty.getName().equalsIgnoreCase(party.getName())) && (this.active) && (getQueuedMembers() != null))
+ {
+ if (side.isServer())
+ {
+ MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
+ ServerConfigurationManager configManager = server.getConfigurationManager();
+
+ EntityPlayer player = null;
+
+ for (Iterator i$ = configManager.playerEntityList.iterator(); i$.hasNext(); )
+ {
+ Object obj = i$.next();
+
+ if (((obj instanceof EntityPlayer)) && (party.hasMember(((EntityPlayer) obj).username.toLowerCase())))
+ {
+ if (((EntityPlayer) obj).username.equalsIgnoreCase(party.getLeader().username.toLowerCase()))
+ {
+ player = (EntityPlayer) obj;
+ }
+ }
+ }
+
+ if (player != null)
+ {
+ TileEntityEntranceController controller = (TileEntityEntranceController) player.worldObj.getBlockTileEntity(this.controllerCoords[0].intValue(), this.controllerCoords[1].intValue(), this.controllerCoords[2].intValue());
+
+ controller.teleportMembersFromParty(getQueuedMembers(), true);
+ cleanUpDungeon(controller.worldObj);
+ }
+ }
+ }
+
+ setActive(false);
+ this.hasStarted = false;
+ this.queuedMembers.clear();
+ this.currentActiveParty = null;
+ this.controllerCoords = new Integer[3];
+ this.keyList.clear();
+ }
+
+ DungeonHandler.instance().saveDungeons();
+ }
+
+ public void disbandMember(PartyMember member)
+ {
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+ PartyMember removingMember = null;
+
+ if ((this.currentActiveParty != null) && (hasMember(member)))
+ {
+ if (side.isServer())
+ {
+ MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
+ ServerConfigurationManager configManager = server.getConfigurationManager();
+
+ EntityPlayer player = null;
+
+ for (Iterator i$ = configManager.playerEntityList.iterator(); i$.hasNext(); )
+ {
+ Object obj = i$.next();
+
+ if (((obj instanceof EntityPlayer)) && (member.username.equalsIgnoreCase(((EntityPlayer) obj).username.toLowerCase())))
+ {
+ player = (EntityPlayer) obj;
+ }
+ }
+
+ if (player != null)
+ {
+ TileEntityEntranceController controller = (TileEntityEntranceController) player.worldObj.getBlockTileEntity(this.controllerCoords[0].intValue(), this.controllerCoords[1].intValue(), this.controllerCoords[2].intValue());
+
+ player.setPositionAndUpdate(this.controllerCoords[0].intValue() + 0.5D, this.controllerCoords[1].intValue() + 1.5D, this.controllerCoords[2].intValue() + 3.5D);
+ }
+
+ }
+
+ this.queuedMembers.remove(member.username.toLowerCase());
+
+ int count = (this.leavers.containsKey(member.username.toLowerCase())) && (this.leavers.get(member.username.toLowerCase()) != null) ? ((Integer) this.leavers.get(member.username.toLowerCase())).intValue() : 0;
+
+ this.leavers.put(member.username.toLowerCase(), Integer.valueOf(count + 1));
+
+ if (this.queuedMembers.size() <= 0)
+ {
+ disbandQueue(this.currentActiveParty);
+ setActive(false);
+ this.hasStarted = false;
+ }
+ }
+
+ DungeonHandler.instance().saveDungeons();
+ }
+
+ public boolean hasMember(PartyMember member)
+ {
+ if (member != null)
+ {
+ if (this.queuedMembers.get(member.username.toLowerCase()) != null)
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public int getMemberLeaves(PartyMember member)
+ {
+ if (this.leavers.get(member.username.toLowerCase()) != null)
+ {
+ return ((Integer) this.leavers.get(member.username.toLowerCase())).intValue();
+ }
+
+ return 0;
+ }
+
+ public int getAmountQueued()
+ {
+ return this.queuedMembers.size();
+ }
+
+ public int getControllerX()
+ {
+ return this.controllerCoords[0].intValue();
+ }
+
+ public int getControllerY()
+ {
+ return this.controllerCoords[1].intValue();
+ }
+
+ public int getControllerZ()
+ {
+ return this.controllerCoords[2].intValue();
+ }
+
+ public ArrayList getQueuedMembers()
+ {
+ ArrayList members = new ArrayList(this.queuedMembers.values());
+
+ return members;
+ }
+
+ public void cleanUpDungeon(World world)
+ {
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ setActive(false);
+
+ if ((side.isServer()) && (!world.isRemote))
+ {
+ EntityLiving savedEntityLiving = null;
+
+ for (int i = 0; i < this.savedBlockCoords.size(); i++)
+ {
+ world.setBlockToAir(((TrackedCoord) this.savedBlockCoords.get(i)).getX(), ((TrackedCoord) this.savedBlockCoords.get(i)).getY(), ((TrackedCoord) this.savedBlockCoords.get(i)).getZ());
+ }
+
+ for (int i = 0; i < this.savedTileEntities.size(); i++)
+ {
+ if ((world.getBlockTileEntity(((TrackedTileEntityCoord) this.savedTileEntities.get(i)).getX(), ((TrackedTileEntityCoord) this.savedTileEntities.get(i)).getY(), ((TrackedTileEntityCoord) this.savedTileEntities.get(i)).getZ()) != null) && ((world.getBlockTileEntity(((TrackedTileEntityCoord) this.savedTileEntities.get(i)).getX(), ((TrackedTileEntityCoord) this.savedTileEntities.get(i)).getY(), ((TrackedTileEntityCoord) this.savedTileEntities.get(i)).getZ()) instanceof TileEntitySkyrootChest)))
+ {
+ TileEntitySkyrootChest chestEntity1 = (TileEntitySkyrootChest) world.getBlockTileEntity(((TrackedTileEntityCoord) this.savedTileEntities.get(i)).getX(), ((TrackedTileEntityCoord) this.savedTileEntities.get(i)).getY(), ((TrackedTileEntityCoord) this.savedTileEntities.get(i)).getZ());
+
+ chestEntity1.getChestContents();
+
+ for (int count = 0; count < chestEntity1.getSizeInventory(); count++)
+ {
+ chestEntity1.setInventorySlotContents(count, null);
+ }
+ }
+
+ world.setBlockToAir(((TrackedTileEntityCoord) this.savedTileEntities.get(i)).getX(), ((TrackedTileEntityCoord) this.savedTileEntities.get(i)).getY(), ((TrackedTileEntityCoord) this.savedTileEntities.get(i)).getZ());
+ world.setBlock(((TrackedTileEntityCoord) this.savedTileEntities.get(i)).getX(), ((TrackedTileEntityCoord) this.savedTileEntities.get(i)).getY(), ((TrackedTileEntityCoord) this.savedTileEntities.get(i)).getZ(), ((TrackedTileEntityCoord) this.savedTileEntities.get(i)).getBlock(), ((TrackedTileEntityCoord) this.savedTileEntities.get(i)).getBlockMeta(), 2);
+
+ if ((world.getBlockTileEntity(((TrackedTileEntityCoord) this.savedTileEntities.get(i)).getX(), ((TrackedTileEntityCoord) this.savedTileEntities.get(i)).getY(), ((TrackedTileEntityCoord) this.savedTileEntities.get(i)).getZ()) instanceof TileEntitySkyrootChest))
+ {
+ TileEntitySkyrootChest chestEntity = (TileEntitySkyrootChest) world.getBlockTileEntity(((TrackedTileEntityCoord) this.savedTileEntities.get(i)).getX(), ((TrackedTileEntityCoord) this.savedTileEntities.get(i)).getY(), ((TrackedTileEntityCoord) this.savedTileEntities.get(i)).getZ());
+
+ for (int count = 0; count < 3 + world.rand.nextInt(3); count++)
+ {
+ chestEntity.setInventorySlotContents(world.rand.nextInt(chestEntity.getSizeInventory()), AetherLoot.NORMAL.getRandomItem(world.rand));
+ }
+ }
+ }
+
+ for (int i = 0; i < this.savedMobSpawners.size(); i++)
+ {
+ int x = ((TrackedMobSpawnerCoord) this.savedMobSpawners.get(i)).getX();
+ int y = ((TrackedMobSpawnerCoord) this.savedMobSpawners.get(i)).getY();
+ int z = ((TrackedMobSpawnerCoord) this.savedMobSpawners.get(i)).getZ();
+
+ String mobID = ((TrackedMobSpawnerCoord) this.savedMobSpawners.get(i)).getMobID();
+
+ world.setBlockToAir(x, y, z);
+ world.setBlock(x, y, z, Block.mobSpawner.blockID);
+
+ TileEntityMobSpawner spawner = (TileEntityMobSpawner) world.getBlockTileEntity(x, y, z);
+
+ if (spawner != null)
+ {
+ spawner.func_98049_a().setMobID(mobID);
+ }
+ }
+ }
+
+ DungeonHandler.instance().saveDungeons();
+ }
+
+ public void regenBosses(World world)
+ {
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (side.isServer())
+ {
+ EntityLiving savedEntityLiving = null;
+
+ for (int i = 0; i < this.savedEntityCoords.size(); i++)
+ {
+ savedEntityLiving = ((TrackedEntityCoord) this.savedEntityCoords.get(i)).getTrackedEntity(world);
+ savedEntityLiving.setPosition(((TrackedEntityCoord) this.savedEntityCoords.get(i)).getX(), ((TrackedEntityCoord) this.savedEntityCoords.get(i)).getY(), ((TrackedEntityCoord) this.savedEntityCoords.get(i)).getZ());
+ world.spawnEntityInWorld(savedEntityLiving);
+ }
+ }
+
+ DungeonHandler.instance().saveDungeons();
+ }
+
+ public boolean hasStarted()
+ {
+ return this.hasStarted;
+ }
+
+ public void registerBlockPlacement(int x, int y, int z)
+ {
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (side.isServer())
+ {
+ this.savedBlockCoords.add(new TrackedCoord(x, y, z));
+ }
+
+ DungeonHandler.instance().saveDungeons();
+ }
+
+ public void registerEntity(float f, float g, float h, EntityLiving entityLiving)
+ {
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (side.isServer())
+ {
+ this.savedEntityCoords.add(new TrackedEntityCoord(f, g, h, EntityList.getEntityString(entityLiving)));
+ }
+
+ DungeonHandler.instance().saveDungeons();
+ }
+
+ public void registerSafeBlock(int x, int y, int z, int blockID, int meta)
+ {
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (side.isServer())
+ {
+ this.savedTileEntities.add(new TrackedTileEntityCoord(x, y, z, blockID, meta));
+ }
+
+ DungeonHandler.instance().saveDungeons();
+ }
+
+ public void registerMobSpawner(int x, int y, int z, String mobID)
+ {
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (side.isServer())
+ {
+ this.savedMobSpawners.add(new TrackedMobSpawnerCoord(x, y, z, mobID));
+ }
+
+ DungeonHandler.instance().saveDungeons();
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.dungeons.Dungeon
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/dungeons/DungeonHandler.java b/src/main/java/net/aetherteam/aether/dungeons/DungeonHandler.java
new file mode 100644
index 0000000..63d451a
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/dungeons/DungeonHandler.java
@@ -0,0 +1,334 @@
+package net.aetherteam.aether.dungeons;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.network.PacketDispatcher;
+import cpw.mods.fml.relauncher.Side;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+
+import net.aetherteam.aether.data.SerialDataHandler;
+import net.aetherteam.aether.dungeons.keys.DungeonKey;
+import net.aetherteam.aether.notifications.Notification;
+import net.aetherteam.aether.notifications.NotificationHandler;
+import net.aetherteam.aether.notifications.NotificationType;
+import net.aetherteam.aether.notifications.client.ClientNotificationHandler;
+import net.aetherteam.aether.packets.AetherPacketHandler;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.aetherteam.aether.tile_entities.TileEntityEntranceController;
+import net.aetherteam.aether.worldgen.StructureBoundingBoxSerial;
+
+public class DungeonHandler
+{
+ private HashMap instances = new HashMap();
+ private static DungeonHandler clientHandler = new DungeonHandler();
+ private static DungeonHandler serverHandler = new DungeonHandler();
+
+ public static DungeonHandler instance()
+ {
+ Side var0 = FMLCommonHandler.instance().getEffectiveSide();
+ return var0.isClient() ? clientHandler : serverHandler;
+ }
+
+ public void addInstance(Dungeon var1)
+ {
+ Side var2 = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (var2.isServer())
+ {
+ PacketDispatcher.sendPacketToAllPlayers(AetherPacketHandler.sendDungeonChange(true, var1));
+ }
+
+ System.out.println("Adding a dungeon! X: (" + var1.centerX + ") Z: (" + var1.centerZ + ") Object: (" + var1 + ")");
+ System.out.println("Current Dungeons: " + this.instances);
+ this.instances.put(Integer.valueOf(this.instances.size()), var1);
+ instance().saveDungeons();
+ }
+
+ public void removeInstance(Dungeon var1)
+ {
+ this.instances.remove(var1);
+ Side var2 = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (var2.isServer())
+ {
+ PacketDispatcher.sendPacketToAllPlayers(AetherPacketHandler.sendDungeonChange(false, var1));
+ }
+
+ instance().saveDungeons();
+ }
+
+ public int getDungeonID(Dungeon var1)
+ {
+ int var2 = 0;
+
+ for (Iterator var3 = this.instances.values().iterator(); var3.hasNext(); ++var2)
+ {
+ Dungeon var4 = (Dungeon) var3.next();
+
+ if (var4 == var1)
+ {
+ return var2;
+ }
+ }
+
+ return -1;
+ }
+
+ public Dungeon getDungeon(int var1)
+ {
+ return (Dungeon) this.instances.get(Integer.valueOf(var1));
+ }
+
+ public Dungeon getInstanceAt(int var1, int var2, int var3)
+ {
+ Iterator var4 = this.instances.values().iterator();
+
+ while (var4.hasNext())
+ {
+ Dungeon var5 = (Dungeon) var4.next();
+
+ if (var5.boundingBox.intersectsWith(var1, var3, var1, var3))
+ {
+ Iterator var6 = var5.boundingBoxes.iterator();
+
+ while (var6.hasNext())
+ {
+ StructureBoundingBoxSerial var7 = (StructureBoundingBoxSerial) var6.next();
+
+ if (var7.isVecInside(var1, var2, var3))
+ {
+ return var5;
+ }
+ }
+ }
+ }
+
+ return null;
+ }
+
+ public void queueParty(Dungeon var1, Party var2, int var3, int var4, int var5, boolean var6)
+ {
+ Side var7 = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (var2 != null && var1 != null && !var1.hasQueuedParty())
+ {
+ var1.queueParty(var2, var3, var4, var5);
+ this.queueMember(var1, var2.getLeader(), true);
+
+ if (var6 && var7.isClient())
+ {
+ Iterator var8 = var2.getMembers().iterator();
+
+ while (var8.hasNext())
+ {
+ PartyMember var9 = (PartyMember) var8.next();
+
+ if (!var2.isLeader(var9))
+ {
+ NotificationHandler.instance().sendNotification(new Notification(NotificationType.DUNGEON, var2.getLeader().username, var9.username));
+ }
+ }
+
+ PacketDispatcher.sendPacketToServer(AetherPacketHandler.sendDungeonQueueChange(true, var1, var3, var4, var5, var2));
+ }
+ }
+ }
+
+ public void queueMember(Dungeon var1, PartyMember var2, boolean var3)
+ {
+ Party var4 = PartyController.instance().getParty(var2);
+ Side var5 = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (var4 != null && var1 != null && var1.isQueuedParty(var4))
+ {
+ var1.queueMember(var4, var2);
+
+ if (var5.isClient() && var1.getAmountQueued() == var4.getMembers().size())
+ {
+ ;
+ }
+
+ if (var3 && var5.isClient())
+ {
+ PacketDispatcher.sendPacketToServer(AetherPacketHandler.sendDungeonMemberQueue(var1, var2));
+ }
+ }
+ }
+
+ public void checkForQueue(Dungeon var1)
+ {
+ Side var2 = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (var1 != null && !var1.hasStarted())
+ {
+ var1.checkForQueue();
+ }
+ }
+
+ public void disbandQueue(Dungeon var1, Party var2, int var3, int var4, int var5, PartyMember var6, boolean var7)
+ {
+ Side var8 = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (var2 != null && var1 != null && var1.isQueuedParty(var2))
+ {
+ var1.disbandQueue(var2);
+
+ if (var8.isClient())
+ {
+ ClientNotificationHandler.createGeneric("Dungeon Queue Failed!", "By " + var6.username, "");
+
+ if (var7)
+ {
+ PacketDispatcher.sendPacketToServer(AetherPacketHandler.sendDungeonQueueChange(false, var1, var3, var4, var5, var2));
+ }
+ }
+ }
+ }
+
+ public void disbandMember(Dungeon var1, PartyMember var2, boolean var3)
+ {
+ Side var4 = FMLCommonHandler.instance().getEffectiveSide();
+ System.out.println(var4 + ": is the side we\'re on.");
+
+ if (var2 != null && var1 != null && var1.isQueuedParty(PartyController.instance().getParty(var2)))
+ {
+ System.out.println(var4 + ": is where we kill shit.");
+ var1.disbandMember(var2);
+
+ if (var4.isClient() && PartyController.instance().getParty(PartyController.instance().getMember(ClientNotificationHandler.clientUsername())).getName().equalsIgnoreCase(PartyController.instance().getParty(var2).getName()))
+ {
+ ClientNotificationHandler.createGeneric("Member Left Dungeon!", var2.username, "");
+ }
+
+ if (var3 && var4.isClient())
+ {
+ PacketDispatcher.sendPacketToServer(AetherPacketHandler.sendDungeonDisbandMember(var1, var2));
+ }
+ }
+ }
+
+ public void finishDungeon(Dungeon var1, Party var2, TileEntityEntranceController var3, boolean var4)
+ {
+ Side var5 = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (var2 != null && var1 != null && var1.hasQueuedParty() && var3 != null)
+ {
+ var1.finishDungeon(var2);
+
+ if (var4 && var5.isClient())
+ {
+ PacketDispatcher.sendPacketToAllPlayers(AetherPacketHandler.sendDungeonFinish(var1, var3, var2));
+ }
+ }
+ }
+
+ public void startTimer(Dungeon var1, Party var2, int var3)
+ {
+ if (var2 != null && var1 != null && var1.hasQueuedParty())
+ {
+ var1.startTimer(var3);
+ }
+ }
+
+ public void addKey(Dungeon var1, Party var2, DungeonKey var3)
+ {
+ if (var2 != null && var1 != null && var1.hasQueuedParty())
+ {
+ var1.addKey(var3);
+ }
+ }
+
+ public void removeKey(Dungeon var1, Party var2, DungeonKey var3)
+ {
+ if (var2 != null && var1 != null && var1.hasQueuedParty())
+ {
+ var1.removeKey(var3);
+ }
+ }
+
+ public Dungeon getDungeon(Party var1)
+ {
+ if (var1 != null)
+ {
+ Iterator var2 = this.instances.values().iterator();
+
+ while (var2.hasNext())
+ {
+ Dungeon var3 = (Dungeon) var2.next();
+
+ if (var3.hasQueuedParty() && var3.getQueuedParty().getName().equalsIgnoreCase(var1.getName()))
+ {
+ return var3;
+ }
+ }
+ }
+
+ return null;
+ }
+
+ public boolean isInDungeon(Party var1)
+ {
+ if (var1 != null)
+ {
+ Iterator var2 = this.instances.values().iterator();
+
+ while (var2.hasNext())
+ {
+ Dungeon var3 = (Dungeon) var2.next();
+
+ if (var3.isQueuedParty(var1))
+ {
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+
+ public ArrayList getInstances()
+ {
+ ArrayList var1 = new ArrayList();
+ Iterator var2 = this.instances.values().iterator();
+
+ while (var2.hasNext())
+ {
+ Object var3 = var2.next();
+
+ if (var3 instanceof Dungeon)
+ {
+ Dungeon var4 = (Dungeon) var3;
+ var1.add(var4);
+ }
+ }
+
+ return var1;
+ }
+
+ public void loadInstances(ArrayList var1)
+ {
+ Iterator var2 = var1.iterator();
+
+ while (var2.hasNext())
+ {
+ Dungeon var3 = (Dungeon) var2.next();
+ this.addInstance(var3);
+ }
+ }
+
+ public void saveDungeons()
+ {
+ Side var1 = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (var1.isServer())
+ {
+ SerialDataHandler var2 = new SerialDataHandler("dungeons.dat");
+ ArrayList var3 = this.getInstances();
+ var2.serializeObjects(var3);
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/dungeons/DungeonType.java b/src/main/java/net/aetherteam/aether/dungeons/DungeonType.java
new file mode 100644
index 0000000..630513e
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/dungeons/DungeonType.java
@@ -0,0 +1,43 @@
+package net.aetherteam.aether.dungeons;
+
+public enum DungeonType
+{
+ BRONZE("Slider's Labyrinth", 6), SILVER("Valkyrie Temple", 6), GOLD("Fortress of the Sun Spirit", 6);
+
+ String dungeonName;
+ int keepCap;
+
+ private DungeonType(String dungeonName, int keepCap)
+ {
+ this.dungeonName = dungeonName;
+ this.keepCap = keepCap;
+ }
+
+ public String getName()
+ {
+ return this.dungeonName;
+ }
+
+ public int getKeepCap()
+ {
+ return this.keepCap;
+ }
+
+ public static DungeonType getTypeFromString(String name)
+ {
+ for (DungeonType type : values())
+ {
+ if (type.name().equalsIgnoreCase(name))
+ {
+ return type;
+ }
+ }
+
+ return null;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.dungeons.DungeonType
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/dungeons/TrackedCoord.java b/src/main/java/net/aetherteam/aether/dungeons/TrackedCoord.java
new file mode 100644
index 0000000..146673c
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/dungeons/TrackedCoord.java
@@ -0,0 +1,37 @@
+package net.aetherteam.aether.dungeons;
+
+import java.io.Serializable;
+
+public class TrackedCoord implements Serializable
+{
+ private int x;
+ private int y;
+ private int z;
+
+ public TrackedCoord(int x, int y, int z)
+ {
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ }
+
+ public int getX()
+ {
+ return this.x;
+ }
+
+ public int getY()
+ {
+ return this.y;
+ }
+
+ public int getZ()
+ {
+ return this.z;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.dungeons.TrackedCoord
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/dungeons/TrackedEntityCoord.java b/src/main/java/net/aetherteam/aether/dungeons/TrackedEntityCoord.java
new file mode 100644
index 0000000..69cf260
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/dungeons/TrackedEntityCoord.java
@@ -0,0 +1,49 @@
+package net.aetherteam.aether.dungeons;
+
+import java.io.Serializable;
+
+import net.minecraft.entity.EntityList;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.world.World;
+
+public class TrackedEntityCoord implements Serializable
+{
+ private String entityName;
+ private float x;
+ private float y;
+ private float z;
+
+ public TrackedEntityCoord(float x, float y, float z, String entityName)
+ {
+ this.x = x;
+ this.y = y;
+ this.z = z;
+
+ this.entityName = entityName;
+ }
+
+ public EntityLiving getTrackedEntity(World world)
+ {
+ return (EntityLiving) EntityList.createEntityByName(this.entityName, world);
+ }
+
+ public float getX()
+ {
+ return this.x;
+ }
+
+ public float getY()
+ {
+ return this.y;
+ }
+
+ public float getZ()
+ {
+ return this.z;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.dungeons.TrackedEntityCoord
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/dungeons/TrackedMobSpawnerCoord.java b/src/main/java/net/aetherteam/aether/dungeons/TrackedMobSpawnerCoord.java
new file mode 100644
index 0000000..6bb53bf
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/dungeons/TrackedMobSpawnerCoord.java
@@ -0,0 +1,23 @@
+package net.aetherteam.aether.dungeons;
+
+public class TrackedMobSpawnerCoord extends TrackedCoord
+{
+ private String mobID;
+
+ public TrackedMobSpawnerCoord(int x, int y, int z, String mobID)
+ {
+ super(x, y, z);
+
+ this.mobID = mobID;
+ }
+
+ public String getMobID()
+ {
+ return this.mobID;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.dungeons.TrackedMobSpawnerCoord
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/dungeons/TrackedTileEntityCoord.java b/src/main/java/net/aetherteam/aether/dungeons/TrackedTileEntityCoord.java
new file mode 100644
index 0000000..4348257
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/dungeons/TrackedTileEntityCoord.java
@@ -0,0 +1,29 @@
+package net.aetherteam.aether.dungeons;
+
+public class TrackedTileEntityCoord extends TrackedCoord
+{
+ private int trackedBlock;
+ private int trackedBlockMeta;
+
+ public TrackedTileEntityCoord(int x, int y, int z, int trackedBlock, int trackedBlockMeta)
+ {
+ super(x, y, z);
+ this.trackedBlock = trackedBlock;
+ this.trackedBlockMeta = trackedBlockMeta;
+ }
+
+ public int getBlock()
+ {
+ return this.trackedBlock;
+ }
+
+ public int getBlockMeta()
+ {
+ return this.trackedBlockMeta;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.dungeons.TrackedTileEntityCoord
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/dungeons/keys/DungeonKey.java b/src/main/java/net/aetherteam/aether/dungeons/keys/DungeonKey.java
new file mode 100644
index 0000000..4b0feea
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/dungeons/keys/DungeonKey.java
@@ -0,0 +1,21 @@
+package net.aetherteam.aether.dungeons.keys;
+
+public class DungeonKey
+{
+ EnumKeyType type;
+
+ public DungeonKey(EnumKeyType type)
+ {
+ this.type = type;
+ }
+
+ public EnumKeyType getType()
+ {
+ return this.type;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.dungeons.keys.DungeonKey
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/dungeons/keys/EnumKeyType.java b/src/main/java/net/aetherteam/aether/dungeons/keys/EnumKeyType.java
new file mode 100644
index 0000000..5fc1e20
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/dungeons/keys/EnumKeyType.java
@@ -0,0 +1,57 @@
+package net.aetherteam.aether.dungeons.keys;
+
+import net.aetherteam.aether.entities.bosses.EntityKey;
+
+public enum EnumKeyType
+{
+ Host("Host"), Guardian("Guardian"), Eye("Eye");
+
+ private String texture;
+ private String keyName;
+
+ private EnumKeyType(String keyName)
+ {
+ this.texture = ("/net/aetherteam/aether/client/sprites/gui/key/" + keyName + ".png");
+ this.keyName = keyName;
+ }
+
+ public String getTexture()
+ {
+ return this.texture;
+ }
+
+ public String getKeyName()
+ {
+ return this.keyName;
+ }
+
+ public static EnumKeyType getEnumFromItem(EntityKey key)
+ {
+ for (int i = 0; i < values().length; i++)
+ {
+ if (key.getKeyName().contains(values()[i].keyName))
+ {
+ return values()[i];
+ }
+ }
+ return null;
+ }
+
+ public static EnumKeyType getTypeFromString(String name)
+ {
+ for (EnumKeyType type : values())
+ {
+ if (type.name().equalsIgnoreCase(name))
+ {
+ return type;
+ }
+ }
+
+ return null;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.dungeons.keys.EnumKeyType
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/entities/AetherEntities.java b/src/main/java/net/aetherteam/aether/entities/AetherEntities.java
new file mode 100644
index 0000000..c42ca20
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/AetherEntities.java
@@ -0,0 +1,184 @@
+package net.aetherteam.aether.entities;
+
+import cpw.mods.fml.client.registry.RenderingRegistry;
+import cpw.mods.fml.common.registry.EntityRegistry;
+import cpw.mods.fml.common.registry.LanguageRegistry;
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.entities.altar.EntityFakeItem;
+import net.aetherteam.aether.entities.bosses.EntityCog;
+import net.aetherteam.aether.entities.bosses.EntityHostEye;
+import net.aetherteam.aether.entities.bosses.EntityLabyrinthEye;
+import net.aetherteam.aether.entities.bosses.EntityMiniSlider;
+import net.aetherteam.aether.entities.bosses.EntitySentryGuardian;
+import net.aetherteam.aether.entities.bosses.EntitySlider;
+import net.aetherteam.aether.entities.bosses.EntitySliderHostMimic;
+import net.aetherteam.aether.entities.dungeon.EntityRewardItem;
+import net.aetherteam.aether.entities.mounts.EntityAerbunny;
+import net.aetherteam.aether.entities.mounts.EntityMoa;
+import net.aetherteam.aether.entities.mounts.EntityPhyg;
+import net.aetherteam.aether.entities.mounts.EntitySwet;
+import net.aetherteam.aether.oldcode.EntityMiniCloud;
+import net.minecraft.client.renderer.entity.Render;
+import net.minecraft.entity.EnumCreatureType;
+import net.minecraft.src.ModLoader;
+import net.minecraft.world.biome.BiomeGenBase;
+
+public class AetherEntities
+{
+ public static Aether mod;
+ private static int entityId = 1;
+
+ public static void addSpawn(String var0, int var1, int var2, EnumCreatureType var3)
+ {
+ EntityRegistry.addSpawn(var0, makeWeight(var0, var1), makeGroupSize(var0, var2), makeGroupSize(var0, var2), var3, new BiomeGenBase[]{Aether.biome});
+ }
+
+ public static void addMappings()
+ {
+ EntityRegistry.registerGlobalEntityID(EntityAerwhale.class, "Aerwhale", ModLoader.getUniqueEntityId(), 13434879, 39423);
+ EntityRegistry.registerGlobalEntityID(EntityPhyg.class, "Phyg", ModLoader.getUniqueEntityId(), 13434879, 16751001);
+ EntityRegistry.registerGlobalEntityID(EntityAerbunny.class, "Aerbunny", ModLoader.getUniqueEntityId(), 13434879, 26316);
+ EntityRegistry.registerGlobalEntityID(EntitySheepuff.class, "Sheepuff", ModLoader.getUniqueEntityId(), 13434879, 13421823);
+ EntityRegistry.registerGlobalEntityID(EntityCockatrice.class, "Cockatrice", ModLoader.getUniqueEntityId(), 13434879, 5156188);
+ EntityRegistry.registerGlobalEntityID(EntityMoa.class, "Moa", ModLoader.getUniqueEntityId(), 13434879, 3394764);
+ EntityRegistry.registerGlobalEntityID(EntityAechorPlant.class, "AechorPlant", ModLoader.getUniqueEntityId(), 13434879, 13144035);
+ EntityRegistry.registerGlobalEntityID(EntitySentry.class, "Sentry", ModLoader.getUniqueEntityId(), 13434879, 10395294);
+ EntityRegistry.registerGlobalEntityID(EntityBattleSentry.class, "SentryMelee", ModLoader.getUniqueEntityId(), 13234879, 10395294);
+ EntityRegistry.registerGlobalEntityID(EntityMimic.class, "Mimic", ModLoader.getUniqueEntityId(), 13434879, 14592106);
+ EntityRegistry.registerGlobalEntityID(EntityMiniCloud.class, "CloudSentry", ModLoader.getUniqueEntityId());
+ EntityRegistry.registerGlobalEntityID(EntitySwet.class, "Swet", ModLoader.getUniqueEntityId(), 13434879, 4107504);
+ EntityRegistry.registerGlobalEntityID(EntityTrackingGolem.class, "SentryGolem", ModLoader.getUniqueEntityId(), 13434879, 4107504);
+ EntityRegistry.registerGlobalEntityID(EntitySentryGolem.class, "SentryGolemRanged", ModLoader.getUniqueEntityId(), 13434879, 4107504);
+ EntityRegistry.registerGlobalEntityID(EntitySentryGuardian.class, "SentryGuardian", ModLoader.getUniqueEntityId(), 134351879, 4127984);
+ EntityRegistry.registerGlobalEntityID(EntitySliderHostMimic.class, "Host", ModLoader.getUniqueEntityId(), 134351879, 10395294);
+ EntityRegistry.registerGlobalEntityID(EntityHostEye.class, "HostEye", ModLoader.getUniqueEntityId(), 134351879, 10395294);
+ EntityRegistry.registerGlobalEntityID(EntityMiniSlider.class, "MiniSlider", ModLoader.getUniqueEntityId(), 134351879, 10395294);
+ EntityRegistry.registerGlobalEntityID(EntitySlider.class, "Slider", ModLoader.getUniqueEntityId(), 134351879, 10395294);
+ EntityRegistry.registerGlobalEntityID(EntityCog.class, "Cog", ModLoader.getUniqueEntityId(), 1244351879, 6200990);
+ EntityRegistry.registerGlobalEntityID(EntityLabyrinthEye.class, "LabyrinthEye", ModLoader.getUniqueEntityId(), 124435179, 2006638);
+ EntityRegistry.registerGlobalEntityID(EntityCarrionSprout.class, "CarrionSprout", ModLoader.getUniqueEntityId(), 124435179, 2006638);
+ EntityRegistry.registerGlobalEntityID(EntityTempest.class, "Tempest", ModLoader.getUniqueEntityId(), 124435179, 2006638);
+ EntityRegistry.registerGlobalEntityID(EntityNewZephyr.class, "Zephyr", ModLoader.getUniqueEntityId(), 124435179, 2006638);
+ EntityRegistry.registerGlobalEntityID(EntityZephyroo.class, "Zephyroo", ModLoader.getUniqueEntityId(), 124435179, 2006638);
+ EntityRegistry.registerModEntity(EntitySlider.class, "Slider", 1, Aether.getInstance(), 80, 1, true);
+ EntityRegistry.registerModEntity(EntityFloatingBlock.class, "FloatingBlock", 2, Aether.getInstance(), 80, 1, true);
+ EntityRegistry.registerModEntity(EntityPoisonNeedle.class, "PoisonNeedle", 3, Aether.getInstance(), 80, 1, true);
+ EntityRegistry.registerModEntity(EntityDartGolden.class, "DartGolden", 4, Aether.getInstance(), 80, 1, true);
+ EntityRegistry.registerModEntity(EntityDartEnchanted.class, "DartEnchanted", 5, Aether.getInstance(), 80, 1, true);
+ EntityRegistry.registerModEntity(EntityDartPoison.class, "DartPoison", 6, Aether.getInstance(), 80, 1, true);
+ EntityRegistry.registerModEntity(EntityLightningKnife.class, "LightningKnife", 7, Aether.getInstance(), 80, 1, true);
+ EntityRegistry.registerModEntity(EntityNotchWave.class, "NotchWave", 8, Aether.getInstance(), 80, 1, true);
+ EntityRegistry.registerModEntity(EntityZephyrSnowball.class, "ZephyrSnowball", 9, Aether.getInstance(), 80, 1, true);
+ EntityRegistry.registerModEntity(EntityTNTPresent.class, "TNTPresent", 10, Aether.getInstance(), 80, 1, true);
+ EntityRegistry.registerModEntity(EntityAerbunny.class, "Aerbunny", 11, Aether.getInstance(), 80, 1, true);
+ EntityRegistry.registerModEntity(EntityAetherLightning.class, "AetherLightning", 12, Aether.getInstance(), 80, 1, true);
+ EntityRegistry.registerModEntity(EntitySwet.class, "Swet", 13, Aether.getInstance(), 80, 1, true);
+ EntityRegistry.registerModEntity(EntityCloudParachute.class, "CloudParachute", 15, Aether.getInstance(), 80, 1, true);
+ EntityRegistry.registerModEntity(EntityDartPhoenix.class, "DartPhoenix", 16, Aether.getInstance(), 80, 1, true);
+ EntityRegistry.registerModEntity(EntityHostEye.class, "HostEye", 17, Aether.getInstance(), 80, 1, true);
+ EntityRegistry.registerModEntity(EntityProjectileSentry.class, "Sentry Projectile", 18, Aether.getInstance(), 80, 1, true);
+ EntityRegistry.registerModEntity(EntityMiniSlider.class, "MiniSlider", 19, Aether.getInstance(), 80, 1, true);
+ EntityRegistry.registerModEntity(EntityAetherCoin.class, "AetherCoin", 20, Aether.getInstance(), 80, 1, true);
+ EntityRegistry.registerModEntity(EntityCog.class, "Cog", 21, Aether.getInstance(), 80, 1, true);
+ EntityRegistry.registerModEntity(EntityLabyrinthEye.class, "LabyrinthEye", 22, Aether.getInstance(), 80, 1, true);
+ EntityRegistry.registerModEntity(EntityTempestBall.class, "TempestBall", 23, Aether.getInstance(), 80, 1, true);
+ EntityRegistry.registerModEntity(EntityZephyroo.class, "Zephyroo", 24, Aether.getInstance(), 80, 1, true);
+ EntityRegistry.registerModEntity(EntityFakeItem.class, "FakeItem", 25, Aether.getInstance(), 80, 1, true);
+ EntityRegistry.registerModEntity(EntityRewardItem.class, "RewardItem", 26, Aether.getInstance(), 80, 1, true);
+ LanguageRegistry.instance().addStringLocalization("entity.Aerwhale.name", "en_US", "Aerwhale");
+ LanguageRegistry.instance().addStringLocalization("entity.ZephyrSnowball.name", "en_US", "Zephyr Snowball");
+ LanguageRegistry.instance().addStringLocalization("entity.Phyg.name", "en_US", "Phyg");
+ LanguageRegistry.instance().addStringLocalization("entity.Aerbunny.name", "en_US", "Aerbunny");
+ LanguageRegistry.instance().addStringLocalization("entity.Sheepuff.name", "en_US", "Sheepuff");
+ LanguageRegistry.instance().addStringLocalization("entity.CloudParachute.name", "en_US", "Cloud Parachute");
+ LanguageRegistry.instance().addStringLocalization("entity.FloatingBlock.name", "en_US", "Floating Block");
+ LanguageRegistry.instance().addStringLocalization("entity.NotchWave.name", "en_US", "Wave of Notch");
+ LanguageRegistry.instance().addStringLocalization("entity.Cockatrice.name", "en_US", "Cockatrice");
+ LanguageRegistry.instance().addStringLocalization("entity.Moa.name", "en_US", "Moa");
+ LanguageRegistry.instance().addStringLocalization("entity.FlyingCow.name", "en_US", "Flying Cow");
+ LanguageRegistry.instance().addStringLocalization("entity.Aether.Slider.name", "en_US", "Slider");
+ LanguageRegistry.instance().addStringLocalization("entity.AechorPlant.name", "en_US", "Aechor Plant");
+ LanguageRegistry.instance().addStringLocalization("entity.PoisonNeedle.name", "en_US", "Poison Needle");
+ LanguageRegistry.instance().addStringLocalization("entity.DartGolden.name", "en_US", "Golden Dart");
+ LanguageRegistry.instance().addStringLocalization("entity.DartEnchanted.name", "en_US", "Enchanted Dart");
+ LanguageRegistry.instance().addStringLocalization("entity.DartPoison.name", "en_US", "Poison Dart");
+ LanguageRegistry.instance().addStringLocalization("entity.Sentry.name", "en_US", "Detonation Sentry");
+ LanguageRegistry.instance().addStringLocalization("entity.SentryMelee.name", "en_US", "Battle Sentry");
+ LanguageRegistry.instance().addStringLocalization("entity.LightningKnife.name", "en_US", "Lightning Knife");
+ LanguageRegistry.instance().addStringLocalization("entity.Mimic.name", "en_US", "Mimic");
+ LanguageRegistry.instance().addStringLocalization("entity.CloudSentry.name", "en_US", "Cloud Sentry");
+ LanguageRegistry.instance().addStringLocalization("entity.TNTPresent.name", "en_US", "Present TNT");
+ LanguageRegistry.instance().addStringLocalization("entity.AetherLightning.name", "en_US", "Aether Lightning");
+ LanguageRegistry.instance().addStringLocalization("entity.Swet.name", "en_US", "Swet");
+ LanguageRegistry.instance().addStringLocalization("entity.SentryGolem.name", "en_US", "Tracking Golem");
+ LanguageRegistry.instance().addStringLocalization("entity.SentryGolemRanged.name", "en_US", "Sentry Golem");
+ LanguageRegistry.instance().addStringLocalization("entity.PhoenixDart.name", "en_US", "Phoenix Dart");
+ LanguageRegistry.instance().addStringLocalization("entity.Host.name", "en_US", "Slider Host Mimic");
+ LanguageRegistry.instance().addStringLocalization("entity.HostEye.name", "en_US", "Host Eye");
+ LanguageRegistry.instance().addStringLocalization("entity.SentryGuardian.name", "en_US", "Sentry Guardian");
+ LanguageRegistry.instance().addStringLocalization("entity.Aether.SentryProjectile.name", "en_US", "Sentry Projectile");
+ LanguageRegistry.instance().addStringLocalization("entity.MiniSlider.name", "en_US", "Mini Slider");
+ LanguageRegistry.instance().addStringLocalization("entity.Slider.name", "en_US", "Slider");
+ LanguageRegistry.instance().addStringLocalization("entity.Cog.name", "en_US", "Loose Cog");
+ LanguageRegistry.instance().addStringLocalization("entity.LabyrinthEye.name", "en_US", "Labyrinth\'s Eye");
+ LanguageRegistry.instance().addStringLocalization("entity.CarrionSprout.name", "en_US", "Carrion Sprout");
+ LanguageRegistry.instance().addStringLocalization("entity.Zephyr.name", "en_US", "Zephyr");
+ LanguageRegistry.instance().addStringLocalization("entity.Zephyroo.name", "en_US", "Zephyroo");
+ LanguageRegistry.instance().addStringLocalization("entity.Tempest.name", "en_US", "Tempest");
+ LanguageRegistry.instance().addStringLocalization("entity.Sprite.name", "en_US", "Sprite");
+ addSpawn("Aerwhale", 8, 5, EnumCreatureType.creature);
+ addSpawn("Tempest", 10, 1, EnumCreatureType.monster);
+ addSpawn("Zephyr", 10, 1, EnumCreatureType.monster);
+ addSpawn("Phyg", 12, 4, EnumCreatureType.creature);
+ addSpawn("Sheepuff", 10, 4, EnumCreatureType.creature);
+ addSpawn("Aerbunny", 12, 3, EnumCreatureType.creature);
+ addSpawn("Moa", 10, 3, EnumCreatureType.creature);
+ addSpawn("Zephyroo", 10, 6, EnumCreatureType.creature);
+ addSpawn("Cockatrice", 10, 1, EnumCreatureType.monster);
+ addSpawn("AechorPlant", 10, 2, EnumCreatureType.creature);
+ addSpawn("Swet", 14, 8, EnumCreatureType.creature);
+ addSpawn("CarrionSprout", 10, 3, EnumCreatureType.creature);
+ }
+
+ public static int makeGroupSize(String var0, int var1)
+ {
+ Aether.getInstance();
+ return Aether.getConfig().get("GroupSize" + var0, "general", var1).getInt(var1);
+ }
+
+ public static int makeWeight(String var0, int var1)
+ {
+ Aether.getInstance();
+ return Aether.getConfig().get("Weight" + var0, "general", var1).getInt(var1);
+ }
+
+ public static void registerEntity(Class var0, String var1, int var2, Render var3, int var4, int var5, boolean var6)
+ {
+ EntityRegistry.registerModEntity(var0, var1, var2, Aether.getInstance(), var4, var5, var6);
+ RenderingRegistry.registerEntityRenderingHandler(var0, var3);
+ }
+
+ public static void addMapping(Class var0, String var1, int var2, int var3)
+ {
+ ++entityId;
+ EntityRegistry.registerModEntity(var0, var1, entityId, mod, var2, var3, false);
+ }
+
+ public static void addMapping(Class var0, String var1, int var2, int var3, boolean var4, boolean var5)
+ {
+ if (var5)
+ {
+ EntityRegistry.registerModEntity(var0, var1, EntityRegistry.findGlobalUniqueEntityId(), mod, var2, var3, var4);
+ } else
+ {
+ ++entityId;
+ EntityRegistry.registerModEntity(var0, var1, entityId, mod, var2, var3, var4);
+ }
+ }
+
+ public static void init(Aether var0)
+ {
+ mod = var0;
+ addMappings();
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/CustomDamageSource.java b/src/main/java/net/aetherteam/aether/entities/CustomDamageSource.java
new file mode 100644
index 0000000..6e24c43
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/CustomDamageSource.java
@@ -0,0 +1,41 @@
+package net.aetherteam.aether.entities;
+
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.util.EntityDamageSource;
+
+public class CustomDamageSource extends EntityDamageSource
+{
+ private Entity indirectEntity;
+ private String deathMessage;
+
+ public CustomDamageSource(String var1, Entity var2, Entity var3)
+ {
+ super(var1, var2);
+ this.indirectEntity = var3;
+ }
+
+ public CustomDamageSource setDeathMessage(String var1)
+ {
+ this.deathMessage = var1;
+ return this;
+ }
+
+ public Entity getSourceOfDamage()
+ {
+ return this.damageSourceEntity;
+ }
+
+ public Entity getEntity()
+ {
+ return this.indirectEntity;
+ }
+
+ /**
+ * Returns the message to be displayed on player death.
+ */
+ public String getDeathMessage(EntityLiving var1)
+ {
+ return var1.getEntityName() + this.deathMessage;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityAechorPlant.java b/src/main/java/net/aetherteam/aether/entities/EntityAechorPlant.java
new file mode 100644
index 0000000..3356b63
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityAechorPlant.java
@@ -0,0 +1,351 @@
+package net.aetherteam.aether.entities;
+
+import java.util.List;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityAgeable;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.monster.EntityCreeper;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.potion.Potion;
+import net.minecraft.potion.PotionEffect;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class EntityAechorPlant extends EntityAetherAnimal
+{
+ public EntityLiving target;
+ public int attTime;
+ public int smokeTime;
+ public boolean seeprey;
+ public boolean grounded;
+ public boolean noDespawn;
+ public float sinage;
+
+ public EntityAechorPlant(World var1)
+ {
+ super(var1);
+ this.texture = this.dir + "/mobs/aechorplant/aechorplant.png";
+ this.setSize(this.rand.nextInt(4) + 1);
+ this.health = 10 + this.getSize() * 2;
+ this.sinage = this.rand.nextFloat() * 6.0F;
+ this.smokeTime = this.attTime = 0;
+ this.seeprey = false;
+ this.setSize(0.75F + (float) this.getSize() * 0.125F, 0.5F + (float) this.getSize() * 0.075F);
+ this.setPosition(this.posX, this.posY, this.posZ);
+ this.setPoisonAmount(2);
+ }
+
+ /**
+ * Checks if the entity's current position is a valid location to spawn this entity.
+ */
+ public boolean getCanSpawnHere()
+ {
+ int var1 = MathHelper.floor_double(this.posX);
+ int var2 = MathHelper.floor_double(this.boundingBox.minY);
+ int var3 = MathHelper.floor_double(this.posZ);
+ return this.worldObj.getBlockId(var1, var2 - 1, var3) == AetherBlocks.AetherGrass.blockID && this.worldObj.getBlockLightValue(var1, var2, var3) > 8 && super.getCanSpawnHere();
+ }
+
+ public boolean isPotionApplicable(PotionEffect var1)
+ {
+ return var1.getPotionID() == Potion.poison.id ? false : super.isPotionApplicable(var1);
+ }
+
+ /**
+ * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons
+ * use this to react to sunlight and start to burn.
+ */
+ public void onLivingUpdate()
+ {
+ if (this.health > 0 && this.grounded)
+ {
+ ++this.entityAge;
+ this.despawnEntity();
+ } else
+ {
+ super.onLivingUpdate();
+
+ if (this.health <= 0)
+ {
+ return;
+ }
+ }
+
+ if (this.onGround)
+ {
+ this.grounded = true;
+ }
+
+ if (this.hurtTime > 0)
+ {
+ this.sinage += 0.9F;
+ } else if (this.seeprey)
+ {
+ this.sinage += 0.3F;
+ } else
+ {
+ this.sinage += 0.1F;
+ }
+
+ if (this.sinage > ((float) Math.PI * 2F))
+ {
+ this.sinage -= ((float) Math.PI * 2F);
+ }
+
+ int var2;
+
+ if (this.target == null || this.velocityChanged)
+ {
+ List var1 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.expand(10.0D, 10.0D, 10.0D));
+
+ for (var2 = 0; var2 < var1.size(); ++var2)
+ {
+ Entity var3 = (Entity) var1.get(var2);
+
+ if (var3 instanceof EntityLiving && !(var3 instanceof EntityAechorPlant) && !(var3 instanceof EntityCreeper))
+ {
+ if (var3 instanceof EntityPlayer)
+ {
+ EntityPlayer var4 = (EntityPlayer) var3;
+ boolean var5 = false;
+
+ if (var5)
+ {
+ continue;
+ }
+ }
+
+ this.target = (EntityLiving) var3;
+ break;
+ }
+ }
+ }
+
+ if (this.target != null)
+ {
+ if (!this.target.isDead && (double) this.target.getDistanceToEntity(this) <= 12.0D)
+ {
+ if (this.target instanceof EntityPlayer)
+ {
+ EntityPlayer var7 = (EntityPlayer) this.target;
+ boolean var9 = false;
+
+ if (var9)
+ {
+ this.target = null;
+ this.attTime = 0;
+ }
+ }
+ } else
+ {
+ this.target = null;
+ this.attTime = 0;
+ }
+
+ if (this.target != null && this.attTime >= 20 && this.canEntityBeSeen(this.target) && (double) this.target.getDistanceToEntity(this) < 12.0D)
+ {
+ this.shootTarget();
+ this.attTime = -10;
+ }
+
+ if (this.attTime < 20)
+ {
+ ++this.attTime;
+ }
+ }
+
+ ++this.smokeTime;
+
+ if (this.smokeTime >= (this.seeprey ? 3 : 8))
+ {
+ this.smokeTime = 0;
+ int var6 = MathHelper.floor_double(this.posX);
+ var2 = MathHelper.floor_double(this.boundingBox.minY);
+ int var8 = MathHelper.floor_double(this.posZ);
+
+ if (this.worldObj.getBlockId(var6, var2 - 1, var8) != AetherBlocks.AetherGrass.blockID && this.grounded)
+ {
+ this.isDead = true;
+ }
+ }
+
+ this.seeprey = this.target != null || this.worldObj.getClosestPlayerToEntity(this, 10.0D) != null;
+ }
+
+ public void shootTarget()
+ {
+ if (this.worldObj.difficultySetting != 0 && this.target != null && this.canEntityBeSeen(this.target) && MathHelper.floor_double(this.target.posY) == MathHelper.floor_double(this.posY))
+ {
+ double var1 = this.target.posX - this.posX;
+ double var3 = this.target.posZ - this.posZ;
+ double var5 = 1.5D / Math.sqrt(var1 * var1 + var3 * var3 + 0.1D);
+ double var7 = 0.1D + Math.sqrt(var1 * var1 + var3 * var3 + 0.1D) * 0.5D + (this.posY - this.target.posY) * 0.25D;
+ var1 *= var7;
+ var3 *= var7;
+ EntityPoisonNeedle var9 = new EntityPoisonNeedle(this.worldObj, this);
+ var9.posY = this.posY + 0.6D;
+ this.worldObj.playSoundAtEntity(this, "aemisc.shootDart", 2.0F, 1.0F / (this.rand.nextFloat() * 0.4F + 0.8F));
+
+ if (!this.worldObj.isRemote)
+ {
+ var9.setArrowHeading(var1, var7, var3, 0.285F + (float) var7 * 0.55F, 1.0F);
+ this.worldObj.spawnEntityInWorld(var9);
+ }
+ }
+ }
+
+ /**
+ * Returns the sound this mob makes when it is hurt.
+ */
+ protected String getHurtSound()
+ {
+ return "damage.hurtflesh";
+ }
+
+ /**
+ * Returns the sound this mob makes on death.
+ */
+ protected String getDeathSound()
+ {
+ return "damage.fallbig";
+ }
+
+ /**
+ * knocks back this entity
+ */
+ public void knockBack(Entity var1, int var2, double var3, double var5)
+ {
+ for (int var7 = 0; var7 < 8; ++var7)
+ {
+ double var8 = this.posX + (double) (this.rand.nextFloat() - this.rand.nextFloat()) * 0.5D;
+ double var10 = this.posY + 0.25D + (double) (this.rand.nextFloat() - this.rand.nextFloat()) * 0.5D;
+ double var12 = this.posZ + (double) (this.rand.nextFloat() - this.rand.nextFloat()) * 0.5D;
+ double var14 = (double) (this.rand.nextFloat() - this.rand.nextFloat()) * 0.5D;
+ double var16 = (double) (this.rand.nextFloat() - this.rand.nextFloat()) * 0.5D;
+ this.worldObj.spawnParticle("portal", var8, var10, var12, var14, 0.25D, var16);
+ }
+
+ if (this.health <= 0)
+ {
+ super.knockBack(var1, var2, var3, var5);
+ }
+ }
+
+ /**
+ * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig.
+ */
+ public boolean interact(EntityPlayer var1)
+ {
+ boolean var2 = false;
+ ItemStack var3 = var1.inventory.getCurrentItem();
+
+ if (var3 != null && var3.itemID == AetherItems.SkyrootBucket.itemID && this.getPoisonLeft() > 0)
+ {
+ this.decrementPoison();
+ var1.inventory.setInventorySlotContents(var1.inventory.currentItem, (ItemStack) null);
+ var1.inventory.setInventorySlotContents(var1.inventory.currentItem, new ItemStack(AetherItems.SkyrootBucket, 1, 2));
+ return true;
+ } else
+ {
+ if (var2)
+ {
+ this.noDespawn = true;
+ String var4 = "heart";
+
+ for (int var5 = 0; var5 < 7; ++var5)
+ {
+ double var6 = this.rand.nextGaussian() * 0.02D;
+ double var8 = this.rand.nextGaussian() * 0.02D;
+ double var10 = this.rand.nextGaussian() * 0.02D;
+ this.worldObj.spawnParticle(var4, this.posX + (double) (this.rand.nextFloat() * this.width * 2.0F) - (double) this.width, this.posY + 0.5D + (double) (this.rand.nextFloat() * this.height), this.posZ + (double) (this.rand.nextFloat() * this.width * 2.0F) - (double) this.width, var6, var8, var10);
+ }
+ }
+
+ return false;
+ }
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ super.writeEntityToNBT(var1);
+ var1.setBoolean("Grounded", this.grounded);
+ var1.setBoolean("NoDespawn", this.noDespawn);
+ var1.setShort("AttTime", (short) this.attTime);
+ var1.setShort("Size", (short) this.getSize());
+ var1.setInteger("Poison", this.getPoisonLeft());
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ super.readEntityFromNBT(var1);
+ this.grounded = var1.getBoolean("Grounded");
+ this.noDespawn = var1.getBoolean("NoDespawn");
+ this.attTime = var1.getShort("AttTime");
+ this.setSize(var1.getShort("Size"));
+ this.setPoisonAmount(var1.getInteger("Poison"));
+ this.setSize(0.75F + (float) this.getSize() * 0.125F, 0.5F + (float) this.getSize() * 0.075F);
+ this.setPosition(this.posX, this.posY, this.posZ);
+ }
+
+ public void entityInit()
+ {
+ super.entityInit();
+ this.dataWatcher.addObject(16, Integer.valueOf(0));
+ this.dataWatcher.addObject(17, Short.valueOf((short) 0));
+ }
+
+ public int getPoisonLeft()
+ {
+ return this.dataWatcher.getWatchableObjectInt(16);
+ }
+
+ public void setPoisonAmount(int var1)
+ {
+ this.dataWatcher.updateObject(16, Integer.valueOf(var1));
+ }
+
+ public void decrementPoison()
+ {
+ this.dataWatcher.updateObject(16, Integer.valueOf(this.dataWatcher.getWatchableObjectInt(16) - 1));
+ }
+
+ public int getSize()
+ {
+ return this.dataWatcher.getWatchableObjectShort(17);
+ }
+
+ public void setSize(int var1)
+ {
+ this.dataWatcher.updateObject(17, Short.valueOf((short) var1));
+ }
+
+ /**
+ * Drop 0-2 items of this living's type. @param par1 - Whether this entity has recently been hit by a player. @param
+ * par2 - Level of Looting used to kill this mob.
+ */
+ protected void dropFewItems(boolean var1, int var2)
+ {
+ this.dropItem(AetherItems.AechorPetal.itemID, 2);
+ }
+
+ public int getMaxHealth()
+ {
+ return 20;
+ }
+
+ public EntityAgeable createChild(EntityAgeable var1)
+ {
+ return null;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityAerwhale.java b/src/main/java/net/aetherteam/aether/entities/EntityAerwhale.java
new file mode 100644
index 0000000..a4ec615
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityAerwhale.java
@@ -0,0 +1,428 @@
+package net.aetherteam.aether.entities;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.minecraft.block.Block;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.monster.IMob;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.EnumMovingObjectType;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.MovingObjectPosition;
+import net.minecraft.util.Vec3;
+import net.minecraft.world.World;
+
+public class EntityAerwhale extends EntityLiving implements IMob
+{
+ public String dir = "/net/aetherteam/aether/client/sprites";
+ private int aboveBelow;
+ private long checkTime = 0L;
+ private final long checkTimeInterval = 3000L;
+ private double checkX = 0.0D;
+ private double checkY = 0.0D;
+ private double checkZ = 0.0D;
+ private final double minTraversalDist = 3.0D;
+ private boolean isStuckWarning = false;
+ public int courseChangeCooldown = 0;
+ public double waypointX;
+ public double waypointZ;
+ private Entity targetedEntity = null;
+ private int aggroCooldown;
+ public int prevAttackCounter;
+ public int attackCounter;
+ public double motionYaw;
+ public double motionPitch;
+
+ public EntityAerwhale(World var1)
+ {
+ super(var1);
+ this.isImmuneToFire = true;
+ this.aggroCooldown = 0;
+ this.prevAttackCounter = 0;
+ this.attackCounter = 0;
+ this.texture = this.dir + "/mobs/aerwhale/aerwhale.png";
+ this.setSize(2.0F, 2.0F);
+ this.moveSpeed = 0.5F;
+ this.health = 20;
+ this.rotationYaw = 360.0F * this.rand.nextFloat();
+ this.rotationPitch = 90.0F * this.rand.nextFloat() - 45.0F;
+ this.ignoreFrustumCheck = true;
+ this.aboveBelow = this.rand.nextInt(2);
+ }
+
+ public int getMaxHealth()
+ {
+ return 20;
+ }
+
+ protected void entityInit()
+ {
+ super.entityInit();
+ this.dataWatcher.addObject(16, Byte.valueOf((byte) 0));
+ }
+
+ /**
+ * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons
+ * use this to react to sunlight and start to burn.
+ */
+ public void onLivingUpdate()
+ {}
+
+ /**
+ * Moves the entity based on the specified heading. Args: strafe, forward
+ */
+ public void moveEntityWithHeading(float var1, float var2)
+ {
+ if (this.isInWater())
+ {
+ this.moveFlying(var1, var2, 0.02F);
+ this.moveEntity(this.motionX, this.motionY, this.motionZ);
+ this.motionX *= 0.800000011920929D;
+ this.motionY *= 0.800000011920929D;
+ this.motionZ *= 0.800000011920929D;
+ } else if (this.handleLavaMovement())
+ {
+ this.moveFlying(var1, var2, 0.02F);
+ this.moveEntity(this.motionX, this.motionY, this.motionZ);
+ this.motionX *= 0.5D;
+ this.motionY *= 0.5D;
+ this.motionZ *= 0.5D;
+ } else
+ {
+ float var3 = 0.91F;
+
+ if (this.onGround)
+ {
+ var3 = 0.54600006F;
+ int var4 = this.worldObj.getBlockId(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.boundingBox.minY) - 1, MathHelper.floor_double(this.posZ));
+
+ if (var4 > 0)
+ {
+ var3 = Block.blocksList[var4].slipperiness * 0.91F;
+ }
+ }
+
+ float var10 = 0.16277136F / (var3 * var3 * var3);
+ this.moveFlying(var1, var2, this.onGround ? 0.1F * var10 : 0.02F);
+ var3 = 0.91F;
+
+ if (this.onGround)
+ {
+ var3 = 0.54600006F;
+ int var5 = this.worldObj.getBlockId(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.boundingBox.minY) - 1, MathHelper.floor_double(this.posZ));
+
+ if (var5 > 0)
+ {
+ var3 = Block.blocksList[var5].slipperiness * 0.91F;
+ }
+ }
+
+ this.moveEntity(this.motionX, this.motionY, this.motionZ);
+ this.motionX *= (double) var3;
+ this.motionY *= (double) var3;
+ this.motionZ *= (double) var3;
+ }
+
+ this.prevLimbYaw = this.limbYaw;
+ double var8 = this.posX - this.prevPosX;
+ double var9 = this.posZ - this.prevPosZ;
+ float var7 = MathHelper.sqrt_double(var8 * var8 + var9 * var9) * 4.0F;
+
+ if (var7 > 1.0F)
+ {
+ var7 = 1.0F;
+ }
+
+ this.limbYaw += (var7 - this.limbYaw) * 0.4F;
+ this.limbSwing += this.limbYaw;
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+ this.rotationPitch = 0.0F;
+
+ if (this.aboveBelow == 0)
+ {
+ this.setPosition(this.posX, 1.0D, this.posZ);
+ } else
+ {
+ this.setPosition(this.posX, 128.0D, this.posZ);
+ }
+
+ double[] var1 = new double[]{this.openSpace(0.0F, 0.0F), this.openSpace(45.0F, 0.0F), this.openSpace(0.0F, 45.0F), this.openSpace(-45.0F, 0.0F), this.openSpace(0.0F, -45.0F)};
+ int var2 = 0;
+ int var3;
+
+ for (var3 = 1; var3 < 5; ++var3)
+ {
+ if (var1[var3] > var1[var2])
+ {
+ var2 = var3;
+ }
+ }
+
+ switch (var2)
+ {
+ case 0:
+ if (var1[0] == 50.0D)
+ {
+ this.motionYaw *= 0.8999999761581421D;
+ this.motionPitch *= 0.8999999761581421D;
+
+ if (this.posY > 100.0D)
+ {
+ this.motionPitch -= 2.0D;
+ }
+
+ if (this.posY < 20.0D)
+ {
+ this.motionPitch += 2.0D;
+ }
+ } else
+ {
+ this.rotationPitch = -this.rotationPitch;
+ this.rotationYaw = -this.rotationYaw;
+ }
+
+ break;
+
+ case 1:
+ this.motionYaw += 5.0D;
+ break;
+
+ case 2:
+ this.motionPitch -= 5.0D;
+ break;
+
+ case 3:
+ this.motionYaw -= 5.0D;
+ break;
+
+ case 4:
+ this.motionPitch += 5.0D;
+ }
+
+ this.motionYaw += (double) (2.0F * this.rand.nextFloat() - 1.0F);
+ this.motionPitch += (double) (2.0F * this.rand.nextFloat() - 1.0F);
+ this.rotationPitch = (float) ((double) this.rotationPitch + 0.1D * this.motionPitch);
+ this.rotationYaw = (float) ((double) this.rotationYaw + 0.1D * this.motionYaw);
+
+ if (this.rotationPitch < -60.0F)
+ {
+ this.rotationPitch = -60.0F;
+ }
+
+ if (this.rotationPitch > 60.0F)
+ {
+ this.rotationPitch = 60.0F;
+ }
+
+ this.rotationPitch = (float) ((double) this.rotationPitch * 0.99D);
+ this.motionX += 0.005D * Math.cos((double) this.rotationYaw / 180.0D * Math.PI) * Math.cos((double) this.rotationPitch / 180.0D * Math.PI);
+ this.motionY += 0.005D * Math.sin((double) this.rotationPitch / 180.0D * Math.PI);
+ this.motionZ += 0.005D * Math.sin((double) this.rotationYaw / 180.0D * Math.PI) * Math.cos((double) this.rotationPitch / 180.0D * Math.PI);
+ this.motionX *= 0.98D;
+ this.motionY *= 0.98D;
+ this.motionZ *= 0.98D;
+ var3 = MathHelper.floor_double(this.posX);
+ int var4 = MathHelper.floor_double(this.boundingBox.minY);
+ int var5 = MathHelper.floor_double(this.posZ);
+
+ if (this.motionX > 0.0D && this.worldObj.getBlockId(var3 + 1, var4, var5) != 0)
+ {
+ this.motionX = -this.motionX;
+ this.motionYaw -= 10.0D;
+ } else if (this.motionX < 0.0D && this.worldObj.getBlockId(var3 - 1, var4, var5) != 0)
+ {
+ this.motionX = -this.motionX;
+ this.motionYaw += 10.0D;
+ }
+
+ if (this.motionY > 0.0D && this.worldObj.getBlockId(var3, var4 + 1, var5) != 0)
+ {
+ this.motionY = -this.motionY;
+ this.motionPitch -= 10.0D;
+ } else if (this.motionY < 0.0D && this.worldObj.getBlockId(var3, var4 - 1, var5) != 0)
+ {
+ this.motionY = -this.motionY;
+ this.motionPitch += 10.0D;
+ }
+
+ if (this.motionZ > 0.0D && this.worldObj.getBlockId(var3, var4, var5 + 1) != 0)
+ {
+ this.motionZ = -this.motionZ;
+ this.motionYaw -= 10.0D;
+ } else if (this.motionZ < 0.0D && this.worldObj.getBlockId(var3, var4, var5 - 1) != 0)
+ {
+ this.motionZ = -this.motionZ;
+ this.motionYaw += 10.0D;
+ }
+
+ this.extinguish();
+ this.moveEntity(this.motionX, this.motionY, this.motionZ);
+ this.checkForBeingStuck();
+ }
+
+ public double getSpeed()
+ {
+ return Math.sqrt(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
+ }
+
+ private double openSpace(float var1, float var2)
+ {
+ float var3 = this.rotationYaw + var1;
+ float var4 = this.rotationYaw + var1;
+ Vec3 var5 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
+ float var6 = MathHelper.cos(-var3 * 0.01745329F - (float) Math.PI);
+ float var7 = MathHelper.sin(-var3 * 0.01745329F - (float) Math.PI);
+ float var8 = MathHelper.cos(-var4 * 0.01745329F);
+ float var9 = MathHelper.sin(-var4 * 0.01745329F);
+ float var10 = var7 * var8;
+ float var12 = var6 * var8;
+ double var13 = 50.0D;
+ Vec3 var15 = var5.addVector((double) var10 * var13, (double) var9 * var13, (double) var12 * var13);
+ MovingObjectPosition var16 = this.worldObj.rayTraceBlocks_do(var5, var15, true);
+
+ if (var16 == null)
+ {
+ return 50.0D;
+ } else if (var16.typeOfHit == EnumMovingObjectType.TILE)
+ {
+ double var17 = (double) var16.blockX - this.posX;
+ double var19 = (double) var16.blockY - this.posY;
+ double var21 = (double) var16.blockZ - this.posZ;
+ return Math.sqrt(var17 * var17 + var19 * var19 + var21 * var21);
+ } else
+ {
+ return 50.0D;
+ }
+ }
+
+ private void checkForBeingStuck()
+ {
+ long var1 = System.currentTimeMillis();
+
+ if (var1 > this.checkTime + 3000L)
+ {
+ double var3 = this.posX - this.checkX;
+ double var5 = this.posY - this.checkY;
+ double var7 = this.posZ - this.checkZ;
+ double var9 = Math.sqrt(var3 * var3 + var5 * var5 + var7 * var7);
+
+ if (var9 < 3.0D && !this.isStuckWarning)
+ {
+ this.isStuckWarning = true;
+ }
+
+ this.checkX = this.posX;
+ this.checkY = this.posY;
+ this.checkZ = this.posZ;
+ this.checkTime = var1;
+ }
+ }
+
+ private boolean isCourseTraversable(double var1, double var3, double var5, double var7)
+ {
+ double var9 = (this.waypointX - this.posX) / var7;
+ double var11 = (this.waypointZ - this.posZ) / var7;
+ AxisAlignedBB var13 = this.boundingBox.copy();
+
+ for (int var14 = 1; (double) var14 < var7; ++var14)
+ {
+ var13.offset(var9, this.posY, var11);
+
+ if (this.worldObj.getCollidingBoundingBoxes(this, var13).size() > 0)
+ {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Returns the sound this mob makes while it's alive.
+ */
+ protected String getLivingSound()
+ {
+ return "aemob.aerwhale.say";
+ }
+
+ /**
+ * Returns the sound this mob makes when it is hurt.
+ */
+ protected String getHurtSound()
+ {
+ return "aemob.aerwhale.die";
+ }
+
+ /**
+ * Returns the sound this mob makes on death.
+ */
+ protected String getDeathSound()
+ {
+ return "aemob.aerwhale.die";
+ }
+
+ /**
+ * Returns the volume for the sounds this mob makes.
+ */
+ protected float getSoundVolume()
+ {
+ return 3.0F;
+ }
+
+ /**
+ * Will return how many at most can spawn in a chunk at once.
+ */
+ public int getMaxSpawnedInChunk()
+ {
+ return 1;
+ }
+
+ /**
+ * Determines if an entity can be despawned, used on idle far away entities
+ */
+ public boolean canDespawn()
+ {
+ return true;
+ }
+
+ /**
+ * Returns true if other Entities should be prevented from moving through this Entity.
+ */
+ public boolean canBeCollidedWith()
+ {
+ return true;
+ }
+
+ /**
+ * returns the bounding box for this entity
+ */
+ public AxisAlignedBB getBoundingBox()
+ {
+ return this.boundingBox;
+ }
+
+ /**
+ * Called by a player entity when they collide with an entity
+ */
+ public void onCollideWithPlayer(EntityPlayer var1)
+ {}
+
+ /**
+ * Checks if the entity's current position is a valid location to spawn this entity.
+ */
+ public boolean getCanSpawnHere()
+ {
+ int var1 = MathHelper.floor_double(this.posX);
+ int var2 = MathHelper.floor_double(this.boundingBox.minY);
+ int var3 = MathHelper.floor_double(this.posZ);
+ return this.rand.nextInt(65) == 0 && this.worldObj.checkNoEntityCollision(this.boundingBox) && this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).size() == 0 && !this.worldObj.isAnyLiquid(this.boundingBox) && this.worldObj.getBlockId(var1, var2 - 1, var3) == AetherBlocks.AetherGrass.blockID && this.worldObj.getBlockId(var1, var2 - 1, var3) != AetherBlocks.Holystone.blockID;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityAetherAnimal.java b/src/main/java/net/aetherteam/aether/entities/EntityAetherAnimal.java
new file mode 100644
index 0000000..bdfc3a1
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityAetherAnimal.java
@@ -0,0 +1,75 @@
+package net.aetherteam.aether.entities;
+
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.interfaces.IAetherMob;
+import net.minecraft.entity.passive.EntityAnimal;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public abstract class EntityAetherAnimal extends EntityAnimal implements IAetherMob
+{
+ Random random = new Random();
+ public String dir = "/net/aetherteam/aether/client/sprites";
+
+ public EntityAetherAnimal(World var1)
+ {
+ super(var1);
+ }
+
+ protected void entityInit()
+ {
+ super.entityInit();
+ }
+
+ /**
+ * Takes a coordinate in and returns a weight to determine how likely this creature will try to path to the block.
+ * Args: x, y, z
+ */
+ public float getBlockPathWeight(int var1, int var2, int var3)
+ {
+ float var4 = 0.0F;
+
+ if (this.worldObj.getBlockId(var1, var2 - 1, var3) == AetherBlocks.AetherGrass.blockID)
+ {
+ var4 += 10.0F;
+ }
+
+ var4 += this.worldObj.getLightBrightness(var1, var2, var3) - 0.5F;
+ var4 = (float) ((double) var4 + ((double) var2 - this.posY));
+ return var4;
+ }
+
+ /**
+ * handles entity death timer, experience orb and particle creation
+ */
+ protected void onDeathUpdate()
+ {
+ if (this.deathTime == 18 && !this.worldObj.isRemote && (this.recentlyHit > 0 || this.isPlayer()) && !this.isChild())
+ {
+ for (int var1 = 0; var1 < this.random.nextInt(4); ++var1)
+ {
+ this.worldObj.spawnEntityInWorld(new EntityAetherCoin(this.worldObj, this.posX, this.posY, this.posZ, 1));
+ }
+ }
+
+ super.onDeathUpdate();
+ }
+
+ /**
+ * Checks if the entity's current position is a valid location to spawn this entity.
+ */
+ public boolean getCanSpawnHere()
+ {
+ int var1 = MathHelper.floor_double(this.posX);
+ int var2 = MathHelper.floor_double(this.boundingBox.minY);
+ int var3 = MathHelper.floor_double(this.posZ);
+ return this.worldObj.checkNoEntityCollision(this.boundingBox) && this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).size() == 0 && !this.worldObj.isAnyLiquid(this.boundingBox) && this.worldObj.getBlockId(var1, var2 - 1, var3) == AetherBlocks.AetherGrass.blockID && this.worldObj.getFullBlockLightValue(var1, var2, var3) > 8 && this.getBlockPathWeight(var1, var2, var3) >= 0.0F;
+ }
+
+ public EntityAnimal spawnBabyAnimal(EntityAnimal var1)
+ {
+ return null;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityAetherBreakingFX.java b/src/main/java/net/aetherteam/aether/entities/EntityAetherBreakingFX.java
new file mode 100644
index 0000000..68a6509
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityAetherBreakingFX.java
@@ -0,0 +1,15 @@
+package net.aetherteam.aether.entities;
+
+import net.minecraft.client.particle.EntityBreakingFX;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.item.Item;
+import net.minecraft.world.World;
+
+public class EntityAetherBreakingFX extends EntityBreakingFX
+{
+ public EntityAetherBreakingFX(World var1, double var2, double var4, double var6, Item var8)
+ {
+ super(var1, var2, var4, var6, 0.0D, 0.0D, 0.0D, var8, (RenderEngine) null);
+ this.noClip = true;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityAetherCoin.java b/src/main/java/net/aetherteam/aether/entities/EntityAetherCoin.java
new file mode 100644
index 0000000..e1e4000
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityAetherCoin.java
@@ -0,0 +1,263 @@
+package net.aetherteam.aether.entities;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.aetherteam.aether.Aether;
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class EntityAetherCoin extends Entity
+{
+ public float spinSpeed = 0.0F;
+ public int xpOrbAge = 0;
+ public int field_70532_c;
+ private int xpOrbHealth = 5;
+ private EntityPlayer closestPlayer;
+
+ /**
+ * Threshold color for tracking players
+ */
+ private int xpTargetColor;
+
+ public EntityAetherCoin(World var1, double var2, double var4, double var6, int var8)
+ {
+ super(var1);
+ this.setSize(0.5F, 0.5F);
+ this.yOffset = this.height / 2.0F;
+ this.setPosition(var2, var4, var6);
+ this.rotationYaw = (float) (Math.random() * 360.0D);
+ this.motionX = (double) ((float) (Math.random() * 0.20000000298023224D - 0.10000000149011612D) * 2.0F);
+ this.motionY = (double) ((float) (Math.random() * 0.2D) * 2.0F);
+ this.motionZ = (double) ((float) (Math.random() * 0.20000000298023224D - 0.10000000149011612D) * 2.0F);
+ this.setCoinValue(var8);
+
+ if (this.getCoinValue() <= 0)
+ {
+ this.setDead();
+ }
+ }
+
+ /**
+ * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to
+ * prevent them from trampling crops
+ */
+ protected boolean canTriggerWalking()
+ {
+ return false;
+ }
+
+ public EntityAetherCoin(World var1)
+ {
+ super(var1);
+ this.setSize(0.25F, 0.25F);
+ this.yOffset = this.height / 2.0F;
+ }
+
+ protected void entityInit()
+ {
+ this.dataWatcher.addObject(16, Short.valueOf((short) 0));
+ }
+
+ public int getCoinValue()
+ {
+ return this.dataWatcher.getWatchableObjectShort(16);
+ }
+
+ public void setCoinValue(int var1)
+ {
+ this.dataWatcher.updateObject(16, Short.valueOf((short) var1));
+ }
+
+ @SideOnly(Side.CLIENT)
+ public int getBrightnessForRender(float var1)
+ {
+ float var2 = 0.5F;
+
+ if (var2 < 0.0F)
+ {
+ var2 = 0.0F;
+ }
+
+ if (var2 > 1.0F)
+ {
+ var2 = 1.0F;
+ }
+
+ int var3 = super.getBrightnessForRender(var1);
+ int var4 = var3 & 255;
+ int var5 = var3 >> 16 & 255;
+ var4 += (int) (var2 * 15.0F * 16.0F);
+
+ if (var4 > 240)
+ {
+ var4 = 240;
+ }
+
+ return var4 | var5 << 16;
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+ this.spinSpeed += 0.35F;
+
+ if (this.field_70532_c > 0)
+ {
+ --this.field_70532_c;
+ }
+
+ this.prevPosX = this.posX;
+ this.prevPosY = this.posY;
+ this.prevPosZ = this.posZ;
+ this.motionY -= 0.029999999329447746D;
+
+ if (this.worldObj.getBlockMaterial(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ)) == Material.lava)
+ {
+ this.motionY = 0.20000000298023224D;
+ this.motionX = (double) ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F);
+ this.motionZ = (double) ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F);
+ this.worldObj.playSoundAtEntity(this, "random.fizz", 0.4F, 2.0F + this.rand.nextFloat() * 0.4F);
+ }
+
+ this.pushOutOfBlocks(this.posX, (this.boundingBox.minY + this.boundingBox.maxY) / 2.0D, this.posZ);
+ double var1 = 8.0D;
+
+ if (this.closestPlayer != null)
+ {
+ double var3 = (this.closestPlayer.posX - this.posX) / var1;
+ double var5 = (this.closestPlayer.posY + (double) this.closestPlayer.getEyeHeight() - this.posY) / var1;
+ double var7 = (this.closestPlayer.posZ - this.posZ) / var1;
+ double var9 = Math.sqrt(var3 * var3 + var5 * var5 + var7 * var7);
+ double var11 = 1.0D - var9;
+
+ if (var11 > 0.0D)
+ {
+ var11 *= var11;
+ this.motionX += var3 / var9 * var11 * 0.1D;
+ this.motionY += var5 / var9 * var11 * 0.1D;
+ this.motionZ += var7 / var9 * var11 * 0.1D;
+ }
+ }
+
+ this.moveEntity(this.motionX, this.motionY, this.motionZ);
+ float var13 = 0.98F;
+
+ if (this.onGround)
+ {
+ var13 = 0.58800006F;
+ int var4 = this.worldObj.getBlockId(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.boundingBox.minY) - 1, MathHelper.floor_double(this.posZ));
+
+ if (var4 > 0)
+ {
+ var13 = Block.blocksList[var4].slipperiness * 0.98F;
+ }
+ }
+
+ this.motionX *= (double) var13;
+ this.motionY *= 0.9800000190734863D;
+ this.motionZ *= (double) var13;
+
+ if (this.onGround)
+ {
+ this.motionY *= -0.8999999761581421D;
+ }
+
+ ++this.xpOrbAge;
+
+ if (this.xpOrbAge >= 6000)
+ {
+ this.setDead();
+ }
+ }
+
+ /**
+ * Returns if this entity is in water and will end up adding the waters velocity to the entity
+ */
+ public boolean handleWaterMovement()
+ {
+ return this.worldObj.handleMaterialAcceleration(this.boundingBox, Material.water, this);
+ }
+
+ /**
+ * Will deal the specified amount of damage to the entity if the entity isn't immune to fire damage. Args:
+ * amountDamage
+ */
+ protected void dealFireDamage(int var1)
+ {
+ this.attackEntityFrom(DamageSource.inFire, var1);
+ }
+
+ /**
+ * Called when the entity is attacked.
+ */
+ public boolean attackEntityFrom(DamageSource var1, int var2)
+ {
+ this.setBeenAttacked();
+ this.xpOrbHealth -= var2;
+
+ if (this.xpOrbHealth <= 0)
+ {
+ this.setDead();
+ }
+
+ return false;
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ var1.setShort("Health", (short) ((byte) this.xpOrbHealth));
+ var1.setShort("Age", (short) this.xpOrbAge);
+ var1.setShort("Value", (short) this.getCoinValue());
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ this.xpOrbHealth = var1.getShort("Health") & 255;
+ this.xpOrbAge = var1.getShort("Age");
+ this.setCoinValue(var1.getShort("Value"));
+ }
+
+ /**
+ * Called by a player entity when they collide with an entity
+ */
+ public void onCollideWithPlayer(EntityPlayer var1)
+ {
+ if (!this.worldObj.isRemote && this.field_70532_c == 0 && var1.xpCooldown == 0)
+ {
+ var1.xpCooldown = 2;
+ this.worldObj.playSoundAtEntity(this, "aemisc.coin", 0.3F, 0.5F * ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.7F + 1.8F));
+ var1.onItemPickup(this, 1);
+ Aether.getServerPlayer(var1).addCoins(this.getCoinValue());
+ this.setDead();
+ }
+ }
+
+ @SideOnly(Side.CLIENT)
+ public float getSpinSpeed()
+ {
+ return this.spinSpeed;
+ }
+
+ /**
+ * If returns false, the item will not inflict any damage against entities.
+ */
+ public boolean canAttackWithItem()
+ {
+ return false;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityAetherLightning.java b/src/main/java/net/aetherteam/aether/entities/EntityAetherLightning.java
new file mode 100644
index 0000000..05c9f7d
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityAetherLightning.java
@@ -0,0 +1,92 @@
+package net.aetherteam.aether.entities;
+
+import java.util.List;
+
+import net.minecraft.block.Block;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.effect.EntityLightningBolt;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class EntityAetherLightning extends EntityLightningBolt
+{
+ private int lightningState;
+
+ /**
+ * A random long that is used to change the vertex of the lightning rendered in RenderLightningBolt
+ */
+ public long boltVertex = 0L;
+ private int boltLivingTime;
+ public EntityPlayer playerUsing;
+
+ public EntityAetherLightning(World var1, double var2, double var4, double var6, EntityPlayer var8)
+ {
+ super(var1, var2, var4, var6);
+ this.playerUsing = var8;
+ this.setLocationAndAngles(var2, var4, var6, 0.0F, 0.0F);
+ this.lightningState = 2;
+ this.boltVertex = this.rand.nextLong();
+ this.boltLivingTime = this.rand.nextInt(3) + 1;
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+
+ if (this.lightningState == 2)
+ {
+ this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "ambient.weather.thunder", 10000.0F, 0.8F + this.rand.nextFloat() * 0.2F);
+ this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 2.0F, 0.5F + this.rand.nextFloat() * 0.2F);
+ }
+
+ --this.lightningState;
+
+ if (this.lightningState < 0)
+ {
+ if (this.boltLivingTime == 0)
+ {
+ this.setDead();
+ } else if (this.lightningState < -this.rand.nextInt(10))
+ {
+ --this.boltLivingTime;
+ this.lightningState = 1;
+ this.boltVertex = this.rand.nextLong();
+
+ if (!this.worldObj.isRemote && this.worldObj.doChunksNearChunkExist(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ), 10))
+ {
+ int var1 = MathHelper.floor_double(this.posX);
+ int var2 = MathHelper.floor_double(this.posY);
+ int var3 = MathHelper.floor_double(this.posZ);
+
+ if (this.worldObj.getBlockId(var1, var2, var3) == 0 && Block.fire.canPlaceBlockAt(this.worldObj, var1, var2, var3))
+ {
+ this.worldObj.setBlock(var1, var2, var3, Block.fire.blockID);
+ }
+ }
+ }
+ }
+
+ if (this.lightningState >= 0)
+ {
+ if (this.worldObj.isRemote)
+ {
+ this.worldObj.lastLightningBolt = 2;
+ } else
+ {
+ double var7 = 3.0D;
+ List var6 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, AxisAlignedBB.getAABBPool().getAABB(this.posX - var7, this.posY - var7, this.posZ - var7, this.posX + var7, this.posY + 6.0D + var7, this.posZ + var7));
+
+ for (int var4 = 0; var4 < var6.size(); ++var4)
+ {
+ Entity var5 = (Entity) var6.get(var4);
+ var5.onStruckByLightning(this);
+ }
+ }
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityAetherMob.java b/src/main/java/net/aetherteam/aether/entities/EntityAetherMob.java
new file mode 100644
index 0000000..96ca3d6
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityAetherMob.java
@@ -0,0 +1,37 @@
+package net.aetherteam.aether.entities;
+
+import java.util.Random;
+
+import net.minecraft.entity.monster.EntityMob;
+import net.minecraft.world.World;
+
+public class EntityAetherMob extends EntityMob
+{
+ Random random = new Random();
+
+ public EntityAetherMob(World var1)
+ {
+ super(var1);
+ }
+
+ /**
+ * handles entity death timer, experience orb and particle creation
+ */
+ protected void onDeathUpdate()
+ {
+ if (this.deathTime == 18 && !this.worldObj.isRemote && (this.recentlyHit > 0 || this.isPlayer()) && !this.isChild())
+ {
+ for (int var1 = 0; var1 < this.random.nextInt(4); ++var1)
+ {
+ this.worldObj.spawnEntityInWorld(new EntityAetherCoin(this.worldObj, this.posX, this.posY, this.posZ, 1));
+ }
+ }
+
+ super.onDeathUpdate();
+ }
+
+ public int getMaxHealth()
+ {
+ return 10;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityAetherPortalFX.java b/src/main/java/net/aetherteam/aether/entities/EntityAetherPortalFX.java
new file mode 100644
index 0000000..e4a697a
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityAetherPortalFX.java
@@ -0,0 +1,17 @@
+package net.aetherteam.aether.entities;
+
+import net.minecraft.client.particle.EntityPortalFX;
+import net.minecraft.world.World;
+
+public class EntityAetherPortalFX extends EntityPortalFX
+{
+ public EntityAetherPortalFX(World var1, double var2, double var4, double var6, double var8, double var10, double var12)
+ {
+ super(var1, var2, var4, var6, var8, var10, var12);
+ float var14 = this.rand.nextFloat() * 0.6F + 0.4F;
+ this.particleRed = this.particleGreen = this.particleBlue = 1.0F * var14;
+ this.particleRed *= 0.2F;
+ this.particleGreen *= 0.2F;
+ this.noClip = true;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityBattleSentry.java b/src/main/java/net/aetherteam/aether/entities/EntityBattleSentry.java
new file mode 100644
index 0000000..3ee2ab4
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityBattleSentry.java
@@ -0,0 +1,349 @@
+package net.aetherteam.aether.entities;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.DamageSource;
+import net.minecraft.world.World;
+
+public class EntityBattleSentry extends EntityAetherMob
+{
+ public String dir = "/net/aetherteam/aether/client/sprites";
+
+ /**
+ * Reference to the World object.
+ */
+ private World worldObj;
+ private int timeTilHide;
+ public float field_100021_a;
+ public float field_100020_b;
+ private int jcount;
+ public int size;
+ public int counter;
+ public int lostyou;
+
+ public EntityBattleSentry(World var1)
+ {
+ super(var1);
+ this.texture = this.dir + "/mobs/sentryMelee/sentryMelee.png";
+ this.size = 2;
+ this.yOffset = 0.0F;
+ this.moveSpeed = 1.0F;
+ this.field_100021_a = 1.0F;
+ this.field_100020_b = 1.0F;
+ this.jcount = this.rand.nextInt(20) + 10;
+ this.func_100019_e(this.size);
+ this.worldObj = var1;
+ this.timeTilHide = 0;
+ }
+
+ public EntityBattleSentry(World var1, double var2, double var4, double var6)
+ {
+ super(var1);
+ this.texture = this.dir + "/mobs/sentryMelee/sentryMelee.png";
+ this.size = 2;
+ this.yOffset = 0.0F;
+ this.moveSpeed = 1.0F;
+ this.field_100021_a = 1.0F;
+ this.field_100020_b = 1.0F;
+ this.jcount = this.rand.nextInt(20) + 10;
+ this.func_100019_e(this.size);
+ this.rotationYaw = (float) this.rand.nextInt(4) * ((float) Math.PI / 2F);
+ this.setPosition(var2, var4, var6);
+ this.worldObj = var1;
+ this.timeTilHide = 0;
+ }
+
+ public void func_100019_e(int var1)
+ {
+ this.setEntityHealth(10);
+ this.width = 0.85F;
+ this.height = 0.85F;
+ this.setPosition(this.posX, this.posY, this.posZ);
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ super.writeEntityToNBT(var1);
+ var1.setInteger("Size", this.size - 1);
+ var1.setBoolean("seen", this.isInView());
+ this.setHasBeenAttacked(var1.getBoolean("HasBeenAttacked"));
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ super.readEntityFromNBT(var1);
+ this.size = var1.getInteger("Size") + 1;
+ this.setInView(var1.getBoolean("seen"));
+ var1.setBoolean("HasBeenAttacked", this.getHasBeenAttacked());
+ }
+
+ /**
+ * Called when the entity is attacked.
+ */
+ public boolean attackEntityFrom(DamageSource var1, int var2)
+ {
+ if (var1.getEntity() != null)
+ {
+ this.setHasBeenAttacked(true);
+ this.timeTilHide = 50;
+ }
+
+ return super.attackEntityFrom(var1, var2);
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ boolean var1 = this.onGround;
+ super.onUpdate();
+
+ if (this.onGround && !var1)
+ {
+ this.worldObj.playSoundAtEntity(this, "mob.slime.small", this.getSoundVolume(), ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F) / 0.8F);
+ } else if (!this.onGround && var1)
+ {
+ this.motionX *= 3.0D;
+ this.motionZ *= 3.0D;
+ }
+
+ if (this.entityToAttack != null && this.entityToAttack.isDead)
+ {
+ this.entityToAttack = null;
+ }
+
+ if (this.timeTilHide != 0)
+ {
+ this.setHasBeenAttacked(true);
+ --this.timeTilHide;
+ } else
+ {
+ this.setHasBeenAttacked(false);
+ }
+ }
+
+ /**
+ * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons
+ * use this to react to sunlight and start to burn.
+ */
+ public void onLivingUpdate()
+ {
+ super.onLivingUpdate();
+
+ if (this.entityToAttack instanceof EntityPlayer && (EntityPlayer) this.entityToAttack != null)
+ {
+ this.setInView(!this.isInFieldOfVision((EntityPlayer) this.entityToAttack, this));
+ }
+ }
+
+ private boolean isInFieldOfVision(EntityPlayer var1, Entity var2)
+ {
+ float var3 = var1.rotationPitch;
+ float var4 = var1.rotationYaw;
+ var1.faceEntity(var2, 360.0F, 360.0F);
+ float var5 = var1.rotationPitch;
+ float var6 = var1.rotationYaw;
+ var1.rotationPitch = var3;
+ var1.rotationYaw = var4;
+ float var7 = 70.0F;
+ float var8 = 65.0F;
+ float var9 = var1.rotationPitch - var7;
+ float var10 = var1.rotationPitch + var7;
+ float var11 = var1.rotationYaw - var8;
+ float var12 = var1.rotationYaw + var8;
+ boolean var13 = this.GetFlag(var9, var10, var5, 0.0F, 360.0F);
+ boolean var14 = this.GetFlag(var11, var12, var6, -180.0F, 180.0F);
+ return var13 && var14;
+ }
+
+ public boolean GetFlag(float var1, float var2, float var3, float var4, float var5)
+ {
+ if (var1 < var4)
+ {
+ if (var3 >= var1 + var5)
+ {
+ return true;
+ }
+
+ if (var3 <= var2)
+ {
+ return true;
+ }
+ }
+
+ if (var2 >= var5)
+ {
+ if (var3 <= var2 - var5)
+ {
+ return true;
+ }
+
+ if (var3 >= var1)
+ {
+ return true;
+ }
+ }
+
+ return var2 < var5 && var1 >= var4 ? var3 <= var2 && var3 > var1 : false;
+ }
+
+ protected void updateEntityActionState()
+ {
+ super.updateEntityActionState();
+ EntityPlayer var1 = this.worldObj.getClosestPlayerToEntity(this, 8.0D);
+
+ if (var1 != null && this.canEntityBeSeen(var1) && !var1.capabilities.isCreativeMode)
+ {
+ this.faceEntity(var1, 10.0F, 10.0F);
+ this.entityToAttack = var1;
+ this.texture = this.dir + "/mobs/sentry/sentry_lit.png";
+ }
+
+ if (this.entityToAttack != null)
+ {
+ this.faceEntity(this.entityToAttack, 10.0F, 10.0F);
+ }
+
+ if ((!this.onGround || this.jcount-- > 0 || this.isInView()) && !this.getHasBeenAttacked())
+ {
+ this.isJumping = false;
+
+ if (this.onGround)
+ {
+ this.moveStrafing = this.moveForward = 0.0F;
+ }
+ } else
+ {
+ this.jcount = this.rand.nextInt(20) + 10;
+ this.isJumping = true;
+ this.moveStrafing = 0.5F - this.rand.nextFloat();
+ this.moveForward = 1.0F;
+ this.worldObj.playSoundAtEntity(this, "mob.slime.small", this.getSoundVolume(), ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F) * 0.8F);
+ this.jcount /= 2;
+ this.moveForward = 1.0F;
+ }
+ }
+
+ /**
+ * Returns true if other Entities should be prevented from moving through this Entity.
+ */
+ public boolean canBeCollidedWith()
+ {
+ return true;
+ }
+
+ /**
+ * Called by a player entity when they collide with an entity
+ */
+ public void onCollideWithPlayer(EntityPlayer var1)
+ {
+ super.onCollideWithPlayer(var1);
+
+ if (!this.getHasBeenAttacked())
+ {
+ this.setHasBeenAttacked(true);
+ this.timeTilHide = 15;
+ }
+ }
+
+ /**
+ * Returns the sound this mob makes when it is hurt.
+ */
+ protected String getHurtSound()
+ {
+ return "mob.slime.small";
+ }
+
+ /**
+ * Returns the sound this mob makes on death.
+ */
+ protected String getDeathSound()
+ {
+ return "mob.slime.small";
+ }
+
+ /**
+ * Checks if the entity's current position is a valid location to spawn this entity.
+ */
+ public boolean getCanSpawnHere()
+ {
+ return super.getCanSpawnHere();
+ }
+
+ /**
+ * Returns the volume for the sounds this mob makes.
+ */
+ protected float getSoundVolume()
+ {
+ return 0.6F;
+ }
+
+ /**
+ * Returns the amount of damage a mob should deal.
+ */
+ public int getAttackStrength(Entity var1)
+ {
+ return 2;
+ }
+
+ /**
+ * Returns the item ID for the item the mob drops on death.
+ */
+ protected int getDropItemId()
+ {
+ return this.rand.nextInt(5) == 0 ? AetherBlocks.LightDungeonStone.blockID : AetherBlocks.DungeonStone.blockID;
+ }
+
+ public void entityInit()
+ {
+ super.entityInit();
+ this.dataWatcher.addObject(16, Byte.valueOf((byte) 0));
+ this.dataWatcher.addObject(17, Byte.valueOf((byte) 0));
+ }
+
+ public boolean isInView()
+ {
+ return this.dataWatcher.getWatchableObjectByte(16) == 0;
+ }
+
+ public void setInView(boolean var1)
+ {
+ if (var1)
+ {
+ this.dataWatcher.updateObject(16, Byte.valueOf((byte) 1));
+ } else
+ {
+ this.dataWatcher.updateObject(16, Byte.valueOf((byte) 0));
+ }
+ }
+
+ public boolean getHasBeenAttacked()
+ {
+ return this.dataWatcher.getWatchableObjectByte(17) == 1;
+ }
+
+ public void setHasBeenAttacked(boolean var1)
+ {
+ if (var1)
+ {
+ this.dataWatcher.updateObject(17, Byte.valueOf((byte) 1));
+ } else
+ {
+ this.dataWatcher.updateObject(17, Byte.valueOf((byte) 0));
+ }
+ }
+
+ public int getMaxHealth()
+ {
+ return 10;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityBlueFX.java b/src/main/java/net/aetherteam/aether/entities/EntityBlueFX.java
new file mode 100644
index 0000000..06b17d3
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityBlueFX.java
@@ -0,0 +1,15 @@
+package net.aetherteam.aether.entities;
+
+import net.minecraft.client.particle.EntityPortalFX;
+import net.minecraft.world.World;
+
+public class EntityBlueFX extends EntityPortalFX
+{
+ public EntityBlueFX(World var1, double var2, double var4, double var6, double var8, double var10, double var12)
+ {
+ super(var1, var2, var4, var6, var8, var10, var12);
+ this.particleBlue = 0.9764706F;
+ this.particleRed = 0.39215687F;
+ this.particleGreen = 0.93333334F;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityCarrionSprout.java b/src/main/java/net/aetherteam/aether/entities/EntityCarrionSprout.java
new file mode 100644
index 0000000..0e4b549
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityCarrionSprout.java
@@ -0,0 +1,109 @@
+package net.aetherteam.aether.entities;
+
+import net.aetherteam.aether.interfaces.IAetherMob;
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityAgeable;
+import net.minecraft.world.World;
+
+public class EntityCarrionSprout extends EntityAetherAnimal implements IAetherMob
+{
+ public float sinage;
+
+ public EntityCarrionSprout(World var1)
+ {
+ super(var1);
+ this.setSize(1.0F, 1.25F);
+ this.jumpMovementFactor = 0.0F;
+ this.moveSpeed = 0.0F;
+ this.texture = this.dir + "/mobs/carrionsprout/sprout.png";
+ this.sinage = this.rand.nextFloat() * 6.0F;
+ }
+
+ /**
+ * Causes this entity to do an upwards motion (jumping).
+ */
+ protected void jump()
+ {}
+
+ /**
+ * Drop 0-2 items of this living's type. @param par1 - Whether this entity has recently been hit by a player. @param
+ * par2 - Level of Looting used to kill this mob.
+ */
+ protected void dropFewItems(boolean var1, int var2)
+ {
+ this.dropItem(AetherItems.Strawberry.itemID, 2);
+ }
+
+ /**
+ * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons
+ * use this to react to sunlight and start to burn.
+ */
+ public void onLivingUpdate()
+ {
+ super.onLivingUpdate();
+
+ if (this.health <= 0)
+ {
+ if (this.health <= 0)
+ {
+ return;
+ }
+ } else
+ {
+ ++this.entityAge;
+ this.despawnEntity();
+ }
+
+ if (this.hurtTime > 0)
+ {
+ this.sinage += 0.9F;
+ } else
+ {
+ this.sinage += 0.15F;
+ }
+
+ if (this.sinage > ((float) Math.PI * 2F))
+ {
+ this.sinage -= ((float) Math.PI * 2F);
+ }
+
+ if (!this.isDead && !this.isCollided)
+ {
+ this.motionX = this.motionZ = 0.0D;
+ }
+ }
+
+ /**
+ * Adds to the current velocity of the entity. Args: x, y, z
+ */
+ public void addVelocity(double var1, double var3, double var5)
+ {}
+
+ /**
+ * knocks back this entity
+ */
+ public void knockBack(Entity var1, int var2, double var3, double var5)
+ {}
+
+ /**
+ * Applies a velocity to each of the entities pushing them away from each other. Args: entity
+ */
+ public void applyEntityCollision(Entity var1)
+ {
+ if (var1 instanceof EntityCarrionSprout)
+ {
+ super.applyEntityCollision(var1);
+ }
+ }
+
+ public int getMaxHealth()
+ {
+ return 10;
+ }
+
+ public EntityAgeable createChild(EntityAgeable var1)
+ {
+ return null;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityChristmasSnowFX.java b/src/main/java/net/aetherteam/aether/entities/EntityChristmasSnowFX.java
new file mode 100644
index 0000000..7fe4697
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityChristmasSnowFX.java
@@ -0,0 +1,13 @@
+package net.aetherteam.aether.entities;
+
+import net.minecraft.client.particle.EntityPortalFX;
+import net.minecraft.world.World;
+
+public class EntityChristmasSnowFX extends EntityPortalFX
+{
+ public EntityChristmasSnowFX(World var1, double var2, double var4, double var6, double var8, double var10, double var12)
+ {
+ super(var1, var2, var4, var6, var8, var10, var12);
+ this.particleRed = this.particleGreen = this.particleBlue = 1.0F;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityCloudParachute.java b/src/main/java/net/aetherteam/aether/entities/EntityCloudParachute.java
new file mode 100644
index 0000000..62a47c2
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityCloudParachute.java
@@ -0,0 +1,172 @@
+package net.aetherteam.aether.entities;
+
+import java.util.Random;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.entities.mounts_old.RidingHandler;
+import net.aetherteam.aether.entities.mounts_old.RidingHandlerParachute;
+import net.minecraft.block.material.Material;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.world.World;
+
+public class EntityCloudParachute extends Entity
+{
+ public static Random rand;
+ public RidingHandler ridinghandler;
+ private static final double ANIM_RADIUS = 0.75D;
+
+ public EntityCloudParachute(World var1)
+ {
+ super(var1);
+ this.setSize(1.0F, 1.0F);
+ rand = new Random();
+ this.prevPosX = this.posX;
+ this.prevPosY = this.posY;
+ this.prevPosZ = this.posZ;
+ this.ridinghandler = new RidingHandlerParachute(this);
+ this.ignoreFrustumCheck = true;
+ }
+
+ public EntityCloudParachute(World var1, EntityPlayer var2, boolean var3)
+ {
+ this(var1);
+
+ if (var2 != null)
+ {
+ this.setPositionAndRotation(var2.posX, var2.posY, var2.posZ, this.rotationYaw, this.rotationPitch);
+ this.getRidingHandler().setRider(var2);
+ this.setColor(var3);
+ }
+ }
+
+ public static boolean entityHasRoomForCloud(World var0, EntityLiving var1)
+ {
+ AxisAlignedBB var2 = AxisAlignedBB.getBoundingBox(var1.posX - 0.5D, var1.boundingBox.minY - 1.0D, var1.posZ - 0.5D, var1.posX + 0.5D, var1.boundingBox.minY, var1.posZ + 0.5D);
+ return var0.getCollidingBoundingBoxes(var1, var2).size() == 0 && !var0.isAABBInMaterial(var2, Material.water);
+ }
+
+ protected void entityInit()
+ {
+ this.dataWatcher.addObject(16, new Byte((byte) 0));
+ }
+
+ public boolean getColor()
+ {
+ return this.dataWatcher.getWatchableObjectByte(16) == 1;
+ }
+
+ public void setColor(boolean var1)
+ {
+ byte var2 = this.dataWatcher.getWatchableObjectByte(16);
+ this.dataWatcher.updateObject(16, Byte.valueOf((byte) (var1 ? 1 : 0)));
+ }
+
+ /**
+ * Checks if the entity is in range to render by using the past in distance and comparing it to its average edge
+ * length * 64 * renderDistanceWeight Args: distance
+ */
+ public boolean isInRangeToRenderDist(double var1)
+ {
+ return this.getRidingHandler().getRider() != null ? this.getRidingHandler().getRider().isInRangeToRenderDist(var1) : super.isInRangeToRenderDist(var1);
+ }
+
+ /**
+ * Returns true if other Entities should be prevented from moving through this Entity.
+ */
+ public boolean canBeCollidedWith()
+ {
+ return false;
+ }
+
+ /**
+ * returns the bounding box for this entity
+ */
+ public AxisAlignedBB getBoundingBox()
+ {
+ return this.boundingBox;
+ }
+
+ /**
+ * Gets called every tick from main Entity class
+ */
+ public void onEntityUpdate()
+ {
+ if (this.getRidingHandler() != null && this.getRidingHandler().getRider() != null)
+ {
+ Aether.proxy.spawnCloudSmoke(this.worldObj, this.posX, this.posY, this.posZ, rand, Double.valueOf(0.75D));
+ }
+
+ if (this.isCollided())
+ {
+ this.die();
+ }
+
+ super.onEntityUpdate();
+ }
+
+ /**
+ * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig.
+ */
+ public boolean interact(EntityPlayer var1)
+ {
+ if (super.interact(var1))
+ {
+ return super.interact(var1);
+ } else
+ {
+ if (this.riddenByEntity == null && !this.getRidingHandler().isBeingRidden())
+ {
+ this.getRidingHandler().setRider(var1);
+ } else
+ {
+ this.getRidingHandler().onUnMount();
+ }
+
+ return true;
+ }
+ }
+
+ public void die()
+ {
+ this.getRidingHandler().onUnMount();
+
+ for (int var1 = 0; var1 < 32; ++var1)
+ {
+ Aether.proxy.spawnCloudSmoke(this.worldObj, this.posX, this.posY, this.posZ, rand, Double.valueOf(0.75D));
+ }
+
+ this.isDead = true;
+ }
+
+ private boolean isCollided()
+ {
+ return this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).size() > 0 || this.worldObj.isAABBInMaterial(this.boundingBox, Material.water);
+ }
+
+ /**
+ * Called by a player entity when they collide with an entity
+ */
+ public void onCollideWithPlayer(EntityPlayer var1)
+ {}
+
+ public RidingHandler getRidingHandler()
+ {
+ return this.ridinghandler;
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ protected void readEntityFromNBT(NBTTagCompound var1)
+ {}
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ protected void writeEntityToNBT(NBTTagCompound var1)
+ {}
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityCloudSmokeFX.java b/src/main/java/net/aetherteam/aether/entities/EntityCloudSmokeFX.java
new file mode 100644
index 0000000..24cdfa8
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityCloudSmokeFX.java
@@ -0,0 +1,83 @@
+package net.aetherteam.aether.entities;
+
+import net.minecraft.client.particle.EntityFX;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.world.World;
+
+public class EntityCloudSmokeFX extends EntityFX
+{
+ float smokeParticleScale;
+
+ public EntityCloudSmokeFX(World var1, double var2, double var4, double var6, double var8, double var10, double var12, float var14, float var15, float var16, float var17)
+ {
+ super(var1, var2, var4, var6, 0.0D, 0.0D, 0.0D);
+ this.motionX *= 0.10000000149011612D;
+ this.motionY *= 0.10000000149011612D;
+ this.motionZ *= 0.10000000149011612D;
+ this.motionX += var8;
+ this.motionY += var10;
+ this.motionZ += var12;
+ this.particleRed = var15;
+ this.particleBlue = var16;
+ this.particleGreen = var17;
+ this.particleScale *= 0.75F;
+ this.particleScale *= var14;
+ this.smokeParticleScale = this.particleScale;
+ this.particleMaxAge = (int) (8.0D / (Math.random() * 0.8D + 0.2D));
+ this.particleMaxAge = (int) ((float) this.particleMaxAge * var14);
+ this.noClip = true;
+ }
+
+ public void renderParticle(Tessellator var1, float var2, float var3, float var4, float var5, float var6, float var7)
+ {
+ float var8 = ((float) this.particleAge + var2) / (float) this.particleMaxAge * 32.0F;
+
+ if (var8 < 0.0F)
+ {
+ var8 = 0.0F;
+ }
+
+ if (var8 > 1.0F)
+ {
+ var8 = 1.0F;
+ }
+
+ this.particleScale = this.smokeParticleScale * var8;
+ super.renderParticle(var1, var2, var3, var4, var5, var6, var7);
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ this.prevPosX = this.posX;
+ this.prevPosY = this.posY;
+ this.prevPosZ = this.posZ;
+
+ if (this.particleAge++ >= this.particleMaxAge)
+ {
+ this.setDead();
+ }
+
+ this.setParticleTextureIndex(7 - this.particleAge * 8 / this.particleMaxAge);
+ this.motionY += 0.004D;
+ this.moveEntity(this.motionX, this.motionY, this.motionZ);
+
+ if (this.posY == this.prevPosY)
+ {
+ this.motionX *= 1.1D;
+ this.motionZ *= 1.1D;
+ }
+
+ this.motionX *= 0.9599999785423279D;
+ this.motionY *= 0.9599999785423279D;
+ this.motionZ *= 0.9599999785423279D;
+
+ if (this.onGround)
+ {
+ this.motionX *= 0.699999988079071D;
+ this.motionZ *= 0.699999988079071D;
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityCockatrice.java b/src/main/java/net/aetherteam/aether/entities/EntityCockatrice.java
new file mode 100644
index 0000000..8630440
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityCockatrice.java
@@ -0,0 +1,302 @@
+package net.aetherteam.aether.entities;
+
+import java.util.List;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.interfaces.IAetherMob;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.item.Item;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.potion.Potion;
+import net.minecraft.potion.PotionEffect;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class EntityCockatrice extends EntityAetherMob implements IAetherMob
+{
+ public String dir = "/net/aetherteam/aether/client/sprites";
+ public EntityLiving target;
+ public float field_752_b;
+ public float destPos = 0.0F;
+ public float field_757_d;
+ public float field_756_e;
+ public float field_755_h = 1.0F;
+ public int timeUntilNextEgg;
+ public int jumps;
+ public int jrem;
+ public boolean jpress;
+ public boolean gotrider;
+
+ public EntityCockatrice(World var1)
+ {
+ super(var1);
+ this.stepHeight = 1.0F;
+ this.jrem = 0;
+ this.jumps = 3;
+ this.texture = this.dir + "/mobs/cockatrice/cockatrice.png";
+ this.setSize(1.0F, 2.0F);
+ this.timeUntilNextEgg = this.rand.nextInt(6000) + 6000;
+ }
+
+ public int getMaxHealth()
+ {
+ return 10;
+ }
+
+ public boolean isPotionApplicable(PotionEffect var1)
+ {
+ return var1.getPotionID() == Potion.poison.id ? false : super.isPotionApplicable(var1);
+ }
+
+ /**
+ * Checks if the entity's current position is a valid location to spawn this entity.
+ */
+ public boolean getCanSpawnHere()
+ {
+ int var1 = MathHelper.floor_double(this.posX);
+ int var2 = MathHelper.floor_double(this.boundingBox.minY);
+ int var3 = MathHelper.floor_double(this.posZ);
+ return this.rand.nextInt(25) == 0 && this.getBlockPathWeight(var1, var2, var3) >= 0.0F && this.worldObj.checkNoEntityCollision(this.boundingBox) && this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).size() == 0 && !this.worldObj.isAnyLiquid(this.boundingBox) && this.worldObj.getBlockId(var1, var2 - 1, var3) != AetherBlocks.DungeonStone.blockID && this.worldObj.getBlockId(var1, var2 - 1, var3) != AetherBlocks.LightDungeonStone.blockID && this.worldObj.getBlockId(var1, var2 - 1, var3) != AetherBlocks.LockedDungeonStone.blockID && this.worldObj.getBlockId(var1, var2 - 1, var3) != AetherBlocks.LockedLightDungeonStone.blockID && this.worldObj.getBlockId(var1, var2 - 1, var3) != AetherBlocks.Holystone.blockID && this.worldObj.difficultySetting > 0 && !this.worldObj.isDaytime();
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+ this.ignoreFrustumCheck = this.riddenByEntity == Aether.proxy.getClientPlayer();
+
+ if (!this.worldObj.isRemote && this.gotrider)
+ {
+ if (this.riddenByEntity != null)
+ {
+ return;
+ }
+
+ List var1 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.expand(0.5D, 0.75D, 0.5D));
+ byte var2 = 0;
+
+ if (var2 < var1.size())
+ {
+ Entity var3 = (Entity) var1.get(var2);
+ var3.mountEntity(this);
+ }
+
+ this.gotrider = false;
+ }
+
+ if (!this.worldObj.isRemote && this.worldObj.difficultySetting == 0)
+ {
+ this.setDead();
+ }
+ }
+
+ /**
+ * Basic mob attack. Default to touch of death in EntityCreature. Overridden by each mob to define their attack.
+ */
+ protected void attackEntity(Entity var1, float var2)
+ {
+ if (var1 instanceof EntityLiving)
+ {
+ this.target = (EntityLiving) var1;
+
+ if (var2 < 10.0F)
+ {
+ double var3 = var1.posX - this.posX;
+ double var5 = var1.posZ - this.posZ;
+
+ if (this.target != null)
+ {
+ if (this.target.isDead || (double) this.target.getDistanceToEntity(this) > 12.0D)
+ {
+ this.target = null;
+ this.attackTime = 0;
+ }
+
+ if (this.attackTime >= 20 && this.canEntityBeSeen(this.target))
+ {
+ this.shootTarget();
+ this.attackTime = -10;
+ }
+
+ if (this.attackTime < 20)
+ {
+ this.attackTime += 2;
+ }
+ }
+
+ this.rotationYaw = (float) (Math.atan2(var5, var3) * 180.0D / Math.PI) - 90.0F;
+ this.hasAttacked = true;
+ }
+ }
+ }
+
+ public void shootTarget()
+ {
+ if (this.worldObj.difficultySetting != 0)
+ {
+ double var1 = this.target.posX - this.posX;
+ double var3 = this.target.posZ - this.posZ;
+ double var5 = 1.5D / Math.sqrt(var1 * var1 + var3 * var3 + 0.1D);
+ double var7 = 0.1D + Math.sqrt(var1 * var1 + var3 * var3 + 0.1D) * 0.5D + (this.posY - this.target.posY) * 0.25D;
+ double var10000 = var1 * var5;
+ var10000 = var3 * var5;
+ EntityPoisonNeedle var9 = new EntityPoisonNeedle(this.worldObj, this);
+ var9.posY = this.posY + 0.5D;
+ this.worldObj.playSoundAtEntity(this, "aemisc.shootDart", 2.0F, 1.0F / (this.rand.nextFloat() * 0.4F + 0.8F));
+
+ if (!this.worldObj.isRemote)
+ {
+ this.worldObj.spawnEntityInWorld(var9);
+ }
+ }
+ }
+
+ /**
+ * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons
+ * use this to react to sunlight and start to burn.
+ */
+ public void onLivingUpdate()
+ {
+ super.onLivingUpdate();
+ this.field_756_e = this.field_752_b;
+ this.field_757_d = this.destPos;
+ this.destPos = (float) ((double) this.destPos + (double) (this.onGround ? -1 : 4) * 0.05D);
+
+ if (this.destPos < 0.01F)
+ {
+ this.destPos = 0.01F;
+ }
+
+ if (this.destPos > 1.0F)
+ {
+ this.destPos = 1.0F;
+ }
+
+ if (this.onGround)
+ {
+ this.destPos = 0.0F;
+ this.jpress = false;
+ this.jrem = this.jumps;
+ }
+
+ if (!this.onGround && this.field_755_h < 1.0F)
+ {
+ this.field_755_h = 1.0F;
+ }
+
+ this.field_755_h = (float) ((double) this.field_755_h * 0.9D);
+
+ if (!this.onGround && this.motionY < 0.0D)
+ {
+ if (this.riddenByEntity == null)
+ {
+ this.motionY *= 0.6D;
+ } else
+ {
+ this.motionY *= 0.6375D;
+ }
+ }
+
+ this.field_752_b += this.field_755_h * 2.0F;
+
+ if (!this.worldObj.isRemote && --this.timeUntilNextEgg <= 0)
+ {
+ this.timeUntilNextEgg = this.rand.nextInt(6000) + 6000;
+ }
+ }
+
+ /**
+ * Called when the mob is falling. Calculates and applies fall damage.
+ */
+ protected void fall(float var1)
+ {}
+
+ /**
+ * Called when the entity is attacked.
+ */
+ public boolean attackEntityFrom(DamageSource var1, int var2)
+ {
+ Entity var3 = var1.getEntity();
+
+ if (var3 != null && this.riddenByEntity != null && var3 == this.riddenByEntity)
+ {
+ return false;
+ } else
+ {
+ boolean var4 = super.attackEntityFrom(var1, var2);
+
+ if (var4 && this.riddenByEntity != null && (this.health <= 0 || this.rand.nextInt(3) == 0))
+ {
+ this.riddenByEntity.mountEntity(this);
+ }
+
+ return var4;
+ }
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ super.writeEntityToNBT(var1);
+ var1.setShort("Jumps", (short) this.jumps);
+ var1.setShort("Remaining", (short) this.jrem);
+
+ if (this.riddenByEntity != null)
+ {
+ this.gotrider = true;
+ }
+
+ var1.setBoolean("GotRider", this.gotrider);
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ super.readEntityFromNBT(var1);
+ this.jumps = var1.getShort("Jumps");
+ this.jrem = var1.getShort("Remaining");
+ this.gotrider = var1.getBoolean("GotRider");
+ }
+
+ /**
+ * Returns the sound this mob makes while it's alive.
+ */
+ protected String getLivingSound()
+ {
+ return "aemob.moa.say";
+ }
+
+ /**
+ * Returns the sound this mob makes when it is hurt.
+ */
+ protected String getHurtSound()
+ {
+ return "aemob.moa.say";
+ }
+
+ /**
+ * Returns the sound this mob makes on death.
+ */
+ protected String getDeathSound()
+ {
+ return "aemob.moa.say";
+ }
+
+ /**
+ * Drop 0-2 items of this living's type. @param par1 - Whether this entity has recently been hit by a player. @param
+ * par2 - Level of Looting used to kill this mob.
+ */
+ protected void dropFewItems(boolean var1, int var2)
+ {
+ this.dropItem(Item.feather.itemID, 3);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityColdLightningBolt.java b/src/main/java/net/aetherteam/aether/entities/EntityColdLightningBolt.java
new file mode 100644
index 0000000..9a9686f
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityColdLightningBolt.java
@@ -0,0 +1,146 @@
+package net.aetherteam.aether.entities;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.List;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.effect.EntityWeatherEffect;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.Vec3;
+import net.minecraft.world.World;
+
+public class EntityColdLightningBolt extends EntityWeatherEffect
+{
+ private int lightningState;
+ public long boltVertex = 0L;
+ private int boltLivingTime;
+ DamageSource damageSource;
+
+ public EntityColdLightningBolt(World var1, double var2, double var4, double var6)
+ {
+ super(var1);
+ this.setLocationAndAngles(var2, var4, var6, 0.0F, 0.0F);
+ this.lightningState = 2;
+ this.boltVertex = this.rand.nextLong();
+ this.boltLivingTime = this.rand.nextInt(3) + 1;
+
+ if (!var1.isRemote && var1.difficultySetting >= 2 && var1.doChunksNearChunkExist(MathHelper.floor_double(var2), MathHelper.floor_double(var4), MathHelper.floor_double(var6), 10))
+ {
+ int var8 = MathHelper.floor_double(var2);
+ int var9 = MathHelper.floor_double(var4);
+ int var10 = MathHelper.floor_double(var6);
+
+ if (var1.getBlockId(var8, var9, var10) == 0 && AetherBlocks.ColdFire.canPlaceBlockAt(var1, var8, var9, var10))
+ {
+ var1.setBlock(var8, var9, var10, AetherBlocks.ColdFire.blockID);
+ }
+
+ for (var8 = 0; var8 < 4; ++var8)
+ {
+ var9 = MathHelper.floor_double(var2) + this.rand.nextInt(3) - 1;
+ var10 = MathHelper.floor_double(var4) + this.rand.nextInt(3) - 1;
+ int var11 = MathHelper.floor_double(var6) + this.rand.nextInt(3) - 1;
+
+ if (var1.getBlockId(var9, var10, var11) == 0 && AetherBlocks.ColdFire.canPlaceBlockAt(var1, var9, var10, var11))
+ {
+ var1.setBlock(var9, var10, var11, AetherBlocks.ColdFire.blockID);
+ }
+ }
+ }
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+
+ if (this.lightningState == 2)
+ {
+ this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "ambient.weather.thunder", 2.0F, 0.8F + this.rand.nextFloat() * 0.2F);
+ this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 2.0F, 0.5F + this.rand.nextFloat() * 0.2F);
+ }
+
+ --this.lightningState;
+
+ if (this.lightningState < 0)
+ {
+ if (this.boltLivingTime == 0)
+ {
+ this.setDead();
+ } else if (this.lightningState < -this.rand.nextInt(10))
+ {
+ --this.boltLivingTime;
+ this.lightningState = 1;
+ this.boltVertex = this.rand.nextLong();
+
+ if (!this.worldObj.isRemote && this.worldObj.doChunksNearChunkExist(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ), 10))
+ {
+ int var1 = MathHelper.floor_double(this.posX);
+ int var2 = MathHelper.floor_double(this.posY);
+ int var3 = MathHelper.floor_double(this.posZ);
+
+ if (this.worldObj.getBlockId(var1, var2, var3) == 0 && AetherBlocks.ColdFire.canPlaceBlockAt(this.worldObj, var1, var2, var3))
+ {
+ this.worldObj.setBlock(var1, var2, var3, AetherBlocks.ColdFire.blockID);
+ }
+ }
+ }
+ }
+
+ if (this.lightningState >= 0)
+ {
+ if (this.worldObj.isRemote)
+ {
+ this.worldObj.lastLightningBolt = 2;
+ } else
+ {
+ double var7 = 3.0D;
+ List var6 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, AxisAlignedBB.getAABBPool().getAABB(this.posX - var7, this.posY - var7, this.posZ - var7, this.posX + var7, this.posY + 6.0D + var7, this.posZ + var7));
+
+ for (int var4 = 0; var4 < var6.size(); ++var4)
+ {
+ Entity var5 = (Entity) var6.get(var4);
+ this.damageSource = (new CustomDamageSource(" has been struck with frost bite", var5, this)).setDeathMessage(" has been struck with frost bite");
+
+ if (!(var5 instanceof EntityTempest) && !(var5 instanceof EntityItem))
+ {
+ var5.attackEntityFrom(this.damageSource, 6);
+ }
+ }
+ }
+ }
+ }
+
+ protected void entityInit() {}
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ protected void readEntityFromNBT(NBTTagCompound var1)
+ {}
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ protected void writeEntityToNBT(NBTTagCompound var1)
+ {}
+
+ @SideOnly(Side.CLIENT)
+
+ /**
+ * Checks using a Vec3d to determine if this entity is within range of that vector to be rendered. Args: vec3D
+ */
+ public boolean isInRangeToRenderVec3D(Vec3 var1)
+ {
+ return this.lightningState >= 0;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityDartEnchanted.java b/src/main/java/net/aetherteam/aether/entities/EntityDartEnchanted.java
new file mode 100644
index 0000000..2ae17b4
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityDartEnchanted.java
@@ -0,0 +1,34 @@
+package net.aetherteam.aether.entities;
+
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
+public class EntityDartEnchanted extends EntityDartGolden
+{
+ public EntityLiving victim;
+ public static int texfxindex = 94;
+
+ public EntityDartEnchanted(World var1)
+ {
+ super(var1);
+ }
+
+ public EntityDartEnchanted(World var1, double var2, double var4, double var6)
+ {
+ super(var1, var2, var4, var6);
+ }
+
+ public EntityDartEnchanted(World var1, EntityLiving var2)
+ {
+ super(var1, var2);
+ }
+
+ public void entityInit()
+ {
+ super.entityInit();
+ this.item = new ItemStack(AetherItems.Dart, 1, 2);
+ this.dmg = 6;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityDartGolden.java b/src/main/java/net/aetherteam/aether/entities/EntityDartGolden.java
new file mode 100644
index 0000000..e7abacf
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityDartGolden.java
@@ -0,0 +1,79 @@
+package net.aetherteam.aether.entities;
+
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
+public class EntityDartGolden extends EntityProjectileBase
+{
+ public EntityLiving victim;
+ public static int texfxindex = 94;
+
+ public EntityDartGolden(World var1)
+ {
+ super(var1);
+ }
+
+ public EntityDartGolden(World var1, double var2, double var4, double var6)
+ {
+ super(var1, var2, var4, var6);
+ }
+
+ public EntityDartGolden(World var1, EntityLiving var2)
+ {
+ super(var1, var2);
+ }
+
+ public void entityInit()
+ {
+ super.entityInit();
+ this.item = new ItemStack(AetherItems.Dart, 1, 0);
+ this.curvature = 0.0F;
+ this.dmg = 4;
+ this.speed = 1.5F;
+ }
+
+ /**
+ * Returns if this entity is in water and will end up adding the waters velocity to the entity
+ */
+ public boolean handleWaterMovement()
+ {
+ return this.victim == null && super.handleWaterMovement();
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+
+ if (this.ticksFlying == 200 && !this.worldObj.isRemote)
+ {
+ this.setDead();
+ }
+ }
+
+ /**
+ * Will get destroyed next tick.
+ */
+ public void setDead()
+ {
+ this.victim = null;
+ super.setDead();
+ }
+
+ public boolean onHitBlock()
+ {
+ this.curvature = 0.03F;
+ this.worldObj.playSoundAtEntity(this, "random.drr", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F));
+ return this.victim == null;
+ }
+
+ public boolean canBeShot(Entity var1)
+ {
+ return super.canBeShot(var1) && this.victim == null;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityDartPhoenix.java b/src/main/java/net/aetherteam/aether/entities/EntityDartPhoenix.java
new file mode 100644
index 0000000..cb334cc
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityDartPhoenix.java
@@ -0,0 +1,64 @@
+package net.aetherteam.aether.entities;
+
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class EntityDartPhoenix extends EntityDartGolden
+{
+ public EntityLiving victim;
+ public static int texfxindex = 94;
+
+ public EntityDartPhoenix(World var1)
+ {
+ super(var1);
+ }
+
+ public EntityDartPhoenix(World var1, double var2, double var4, double var6)
+ {
+ super(var1, var2, var4, var6);
+ }
+
+ public EntityDartPhoenix(World var1, EntityLiving var2, ItemStack var3)
+ {
+ super(var1, var2);
+ }
+
+ public void entityInit()
+ {
+ super.entityInit();
+ this.setFire(10);
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+ this.setFire(10);
+ this.item = new ItemStack(AetherItems.Dart, 1, 0);
+
+ for (int var1 = 0; var1 < 2; ++var1)
+ {
+ double var2 = this.rand.nextGaussian() * 0.02D;
+ double var4 = this.rand.nextGaussian() * 0.02D;
+ double var6 = this.rand.nextGaussian() * 0.02D;
+ this.worldObj.spawnParticle("flame", this.posX, this.posY, this.posZ, var2, var4, var6);
+ }
+ }
+
+ public boolean onHitBlock()
+ {
+ this.curvature = 0.03F;
+ int var1 = MathHelper.floor_double(this.posX);
+ int var2 = MathHelper.floor_double(this.posY);
+ int var3 = MathHelper.floor_double(this.posZ);
+ this.worldObj.setBlock(var1, var2, var3, 51);
+ this.worldObj.playSoundAtEntity(this, "random.drr", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F));
+ this.setDead();
+ return this.victim == null;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityDartPoison.java b/src/main/java/net/aetherteam/aether/entities/EntityDartPoison.java
new file mode 100644
index 0000000..acde39c
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityDartPoison.java
@@ -0,0 +1,52 @@
+package net.aetherteam.aether.entities;
+
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.item.ItemStack;
+import net.minecraft.potion.Potion;
+import net.minecraft.potion.PotionEffect;
+import net.minecraft.world.World;
+
+public class EntityDartPoison extends EntityDartGolden
+{
+ public EntityLiving victim;
+ public int poisonTime;
+
+ public EntityDartPoison(World var1)
+ {
+ super(var1);
+ }
+
+ public EntityDartPoison(World var1, double var2, double var4, double var6)
+ {
+ super(var1, var2, var4, var6);
+ }
+
+ public EntityDartPoison(World var1, EntityLiving var2)
+ {
+ super(var1, var2);
+ }
+
+ public void entityInit()
+ {
+ super.entityInit();
+ this.item = new ItemStack(AetherItems.Dart, 1, 1);
+ this.dmg = 1;
+ }
+
+ public boolean onHitTarget(Entity var1)
+ {
+ super.onHitTarget(var1);
+ EntityLiving var2 = (EntityLiving) var1;
+
+ if (!this.worldObj.isRemote)
+ {
+ var2.addPotionEffect(new PotionEffect(Potion.poison.id, 200, 0));
+ var2.addPotionEffect(new PotionEffect(Potion.confusion.id, 200, 3));
+ this.setDead();
+ }
+
+ return true;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityDungeonMob.java b/src/main/java/net/aetherteam/aether/entities/EntityDungeonMob.java
new file mode 100644
index 0000000..b3b51c1
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityDungeonMob.java
@@ -0,0 +1,186 @@
+package net.aetherteam.aether.entities;
+
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.party.Party;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityCreature;
+import net.minecraft.entity.monster.IMob;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.EnumSkyBlock;
+import net.minecraft.world.World;
+
+public class EntityDungeonMob extends EntityCreature implements IMob
+{
+ Random random = new Random();
+ protected int attackStrength = 2;
+
+ public EntityDungeonMob(World var1)
+ {
+ super(var1);
+ }
+
+ public int getMaxHealth()
+ {
+ return 20;
+ }
+
+ /**
+ * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons
+ * use this to react to sunlight and start to burn.
+ */
+ public void onLivingUpdate()
+ {
+ float var1 = this.getBrightness(1.0F);
+
+ if (var1 > 0.5F)
+ {
+ this.entityAge += 2;
+ }
+
+ super.onLivingUpdate();
+ }
+
+ /**
+ * Returns the item ID for the item the mob drops on death.
+ */
+ protected int getDropItemId()
+ {
+ return this.rand.nextInt(5) == 0 ? AetherBlocks.LightDungeonStone.blockID : AetherBlocks.DungeonStone.blockID;
+ }
+
+ /**
+ * Finds the closest player within 16 blocks to attack, or null if this Entity isn't interested in attacking
+ * (Animals, Spiders at day, peaceful PigZombies).
+ */
+ protected Entity findPlayerToAttack()
+ {
+ EntityPlayer var1 = this.worldObj.getClosestPlayerToEntity(this, 16.0D);
+ return var1 != null && this.canEntityBeSeen(var1) && !var1.capabilities.isCreativeMode ? var1 : null;
+ }
+
+ /**
+ * Called when the entity is attacked.
+ */
+ public boolean attackEntityFrom(DamageSource var1, int var2)
+ {
+ Dungeon var3 = DungeonHandler.instance().getInstanceAt(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ));
+
+ if (var3 != null && var3.hasQueuedParty())
+ {
+ Party var8 = var3.getQueuedParty();
+ int var5 = var3.getQueuedMembers().size() + 1;
+ float var6 = (float) (var5 - 1) * 0.075F;
+ int var7 = MathHelper.clamp_int((int) ((float) var2 - (float) var2 * var6), 1, var2);
+ return super.attackEntityFrom(var1, var7);
+ } else if (!super.attackEntityFrom(var1, var2))
+ {
+ return false;
+ } else
+ {
+ Entity var4 = var1.getEntity();
+
+ if (var4 != null)
+ {
+ if (this.riddenByEntity == var4 || this.ridingEntity == var4)
+ {
+ return true;
+ }
+
+ if (var4 != this)
+ {
+ this.entityToAttack = var4;
+ }
+ }
+
+ return true;
+ }
+ }
+
+ /**
+ * Basic mob attack. Default to touch of death in EntityCreature. Overridden by each mob to define their attack.
+ */
+ protected void attackEntity(Entity var1, float var2)
+ {
+ if (this.attackTime <= 0 && var2 < 2.0F && var1.boundingBox.maxY > this.boundingBox.minY && var1.boundingBox.minY < this.boundingBox.maxY)
+ {
+ this.attackTime = 20;
+ var1.attackEntityFrom(DamageSource.causeMobDamage(this), this.attackStrength);
+ }
+ }
+
+ /**
+ * Takes a coordinate in and returns a weight to determine how likely this creature will try to path to the block.
+ * Args: x, y, z
+ */
+ public float getBlockPathWeight(int var1, int var2, int var3)
+ {
+ return 0.5F - this.worldObj.getLightBrightness(var1, var2, var3);
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ super.writeEntityToNBT(var1);
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ super.readEntityFromNBT(var1);
+ }
+
+ /**
+ * Checks if the entity's current position is a valid location to spawn this entity.
+ */
+ public boolean getCanSpawnHere()
+ {
+ int var1 = MathHelper.floor_double(this.posX);
+ int var2 = MathHelper.floor_double(this.boundingBox.minY);
+ int var3 = MathHelper.floor_double(this.posZ);
+
+ if (this.worldObj.getSavedLightValue(EnumSkyBlock.Sky, var1, var2, var3) > this.rand.nextInt(32))
+ {
+ return false;
+ } else
+ {
+ int var4 = this.worldObj.getBlockLightValue(var1, var2, var3);
+
+ if (this.worldObj.isThundering())
+ {
+ int var5 = this.worldObj.skylightSubtracted;
+ this.worldObj.skylightSubtracted = 10;
+ var4 = this.worldObj.getBlockLightValue(var1, var2, var3);
+ this.worldObj.skylightSubtracted = var5;
+ }
+
+ return var4 <= this.rand.nextInt(8) && super.getCanSpawnHere();
+ }
+ }
+
+ /**
+ * handles entity death timer, experience orb and particle creation
+ */
+ protected void onDeathUpdate()
+ {
+ if (this.deathTime == 18 && !this.worldObj.isRemote && (this.recentlyHit > 0 || this.isPlayer()) && !this.isChild())
+ {
+ for (int var1 = 0; var1 < this.random.nextInt(4); ++var1)
+ {
+ this.worldObj.spawnEntityInWorld(new EntityAetherCoin(this.worldObj, this.posX, this.posY, this.posZ, 1));
+ }
+ }
+
+ super.onDeathUpdate();
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityFloatingBlock.java b/src/main/java/net/aetherteam/aether/entities/EntityFloatingBlock.java
new file mode 100644
index 0000000..28c59fe
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityFloatingBlock.java
@@ -0,0 +1,207 @@
+package net.aetherteam.aether.entities;
+
+import java.util.List;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.blocks.BlockFloating;
+import net.minecraft.block.Block;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.item.EntityFallingSand;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class EntityFloatingBlock extends Entity
+{
+ public int flytime;
+
+ public EntityFloatingBlock(World var1)
+ {
+ super(var1);
+ this.flytime = 0;
+ }
+
+ public EntityFloatingBlock(World var1, double var2, double var4, double var6, int var8, int var9)
+ {
+ super(var1);
+ this.flytime = 0;
+ this.setBlockID(var8);
+ this.setMetadata(var9);
+ this.preventEntitySpawning = true;
+ this.setSize(0.98F, 0.98F);
+ this.yOffset = this.height / 2.0F;
+ this.setPosition(var2, var4, var6);
+ this.motionX = 0.0D;
+ this.motionY = 0.0D;
+ this.motionZ = 0.0D;
+ this.prevPosX = var2;
+ this.prevPosY = var4;
+ this.prevPosZ = var6;
+ }
+
+ public EntityFloatingBlock(World var1, double var2, double var4, double var6, int var8)
+ {
+ this(var1, var2, var4, var6, var8, 0);
+ }
+
+ /**
+ * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to
+ * prevent them from trampling crops
+ */
+ protected boolean canTriggerWalking()
+ {
+ return false;
+ }
+
+ protected void entityInit()
+ {
+ this.dataWatcher.addObject(16, Integer.valueOf(0));
+ this.dataWatcher.addObject(17, Integer.valueOf(0));
+ }
+
+ public int getBlockID()
+ {
+ return this.dataWatcher.getWatchableObjectInt(16);
+ }
+
+ public void setBlockID(int var1)
+ {
+ this.dataWatcher.updateObject(16, Integer.valueOf(var1));
+ }
+
+ public int getMetadata()
+ {
+ return this.dataWatcher.getWatchableObjectInt(17);
+ }
+
+ public void setMetadata(int var1)
+ {
+ this.dataWatcher.updateObject(17, Integer.valueOf(var1));
+ }
+
+ /**
+ * Will get destroyed next tick.
+ */
+ public void setDead()
+ {
+ super.setDead();
+ }
+
+ /**
+ * returns the bounding box for this entity
+ */
+ public AxisAlignedBB getBoundingBox()
+ {
+ return this.boundingBox;
+ }
+
+ /**
+ * Returns true if other Entities should be prevented from moving through this Entity.
+ */
+ public boolean canBeCollidedWith()
+ {
+ return !this.isDead;
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ if (this.getBlockID() == 0)
+ {
+ this.setDead();
+ } else
+ {
+ this.prevPosX = this.posX;
+ this.prevPosY = this.posY;
+ this.prevPosZ = this.posZ;
+ ++this.flytime;
+ this.motionY += 0.04D;
+ this.moveEntity(this.motionX, this.motionY, this.motionZ);
+ this.motionX *= 0.9800000190734863D;
+ this.motionY *= 0.9800000190734863D;
+ this.motionZ *= 0.9800000190734863D;
+ int var1 = MathHelper.floor_double(this.posX);
+ int var2 = MathHelper.floor_double(this.posY);
+ int var3 = MathHelper.floor_double(this.posZ);
+
+ if (this.worldObj.getBlockId(var1, var2, var3) == this.getBlockID() || this.worldObj.getBlockId(var1, var2, var3) == AetherBlocks.AetherGrass.blockID && this.getBlockID() == AetherBlocks.AetherDirt.blockID)
+ {
+ this.worldObj.setBlock(var1, var2, var3, 0);
+ }
+
+ List var4 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.expand(0.0D, 1.0D, 0.0D));
+
+ for (int var5 = 0; var5 < var4.size(); ++var5)
+ {
+ if (var4.get(var5) instanceof EntityFallingSand && Block.blocksList[this.getBlockID()].canPlaceBlockAt(this.worldObj, var1, var2, var3))
+ {
+ this.worldObj.setBlock(var1, var2, var3, this.getBlockID(), this.getMetadata(), 2);
+ this.setDead();
+ }
+ }
+
+ ItemStack var6;
+
+ if (this.isCollidedVertically && !this.onGround)
+ {
+ this.motionX *= 0.699999988079071D;
+ this.motionZ *= 0.699999988079071D;
+ this.motionY *= -0.5D;
+ this.setDead();
+
+ if (!Block.blocksList[this.getBlockID()].canPlaceBlockAt(this.worldObj, var1, var2, var3) || BlockFloating.canFallAbove(this.worldObj, var1, var2 + 1, var3) || !this.worldObj.setBlock(var1, var2, var3, this.getBlockID(), this.getMetadata(), 2))
+ {
+ var6 = new ItemStack(this.getBlockID(), 1, this.getMetadata());
+
+ if (!this.worldObj.isRemote)
+ {
+ this.worldObj.spawnEntityInWorld(new EntityItem(this.worldObj, this.posX, this.posY, this.posZ, var6));
+ }
+ }
+ } else if (this.flytime > 100)
+ {
+ var6 = new ItemStack(this.getBlockID(), 1, this.getMetadata());
+
+ if (!this.worldObj.isRemote)
+ {
+ this.worldObj.spawnEntityInWorld(new EntityItem(this.worldObj, this.posX, this.posY, this.posZ, var6));
+ }
+
+ this.setDead();
+ }
+ }
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ protected void writeEntityToNBT(NBTTagCompound var1)
+ {
+ var1.setInteger("blockID", this.getBlockID());
+ var1.setInteger("metadata", this.getMetadata());
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ protected void readEntityFromNBT(NBTTagCompound var1)
+ {
+ this.setBlockID(var1.getInteger("blockID"));
+ this.setMetadata(var1.getInteger("metadata"));
+ }
+
+ public float getShadowSize()
+ {
+ return 0.0F;
+ }
+
+ public World getWorld()
+ {
+ return this.worldObj;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityGoldenFX.java b/src/main/java/net/aetherteam/aether/entities/EntityGoldenFX.java
new file mode 100644
index 0000000..f43fff4
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityGoldenFX.java
@@ -0,0 +1,52 @@
+package net.aetherteam.aether.entities;
+
+import net.minecraft.client.particle.EntityPortalFX;
+import net.minecraft.world.World;
+
+public class EntityGoldenFX extends EntityPortalFX
+{
+ private double portalPosX;
+ private double portalPosY;
+ private double portalPosZ;
+ private boolean rising;
+
+ public EntityGoldenFX(World var1, double var2, double var4, double var6, double var8, double var10, double var12, boolean var14)
+ {
+ super(var1, var2, var4, var6, var8, var10, var12);
+ this.particleBlue = 0.0F;
+ this.particleRed = 0.976F;
+ this.particleGreen = 0.74509805F;
+ this.portalPosX = this.posX = var2;
+ this.portalPosY = this.posY = var4;
+ this.portalPosZ = this.posZ = var6;
+ this.rising = var14;
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ if (this.rising)
+ {
+ this.prevPosX = this.posX;
+ this.prevPosY = this.posY;
+ this.prevPosZ = this.posZ;
+ float var1 = (float) this.particleAge / (float) this.particleMaxAge;
+ float var2 = var1;
+ var1 = -var1 + var1 * var1 * 2.0F;
+ var1 = 1.0F - var1;
+ this.posX = this.portalPosX + this.motionX * (double) var1;
+ this.posY = this.portalPosY - 1.5D + this.motionY * (double) var1 + (double) (1.0F + var2);
+ this.posZ = this.portalPosZ + this.motionZ * (double) var1;
+
+ if (this.particleAge++ >= this.particleMaxAge)
+ {
+ this.setDead();
+ }
+ } else
+ {
+ super.onUpdate();
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityLightningKnife.java b/src/main/java/net/aetherteam/aether/entities/EntityLightningKnife.java
new file mode 100644
index 0000000..d30a557
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityLightningKnife.java
@@ -0,0 +1,333 @@
+package net.aetherteam.aether.entities;
+
+import java.util.List;
+
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.effect.EntityLightningBolt;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.MovingObjectPosition;
+import net.minecraft.util.Vec3;
+import net.minecraft.world.World;
+
+public class EntityLightningKnife extends Entity
+{
+ private int xTileSnowball = -1;
+ private int yTileSnowball = -1;
+ private int zTileSnowball = -1;
+ private int inTileSnowball = 0;
+ private boolean inGroundSnowball = false;
+ public int shakeSnowball = 0;
+ private EntityLiving thrower;
+ private int ticksInGroundSnowball;
+ private int ticksInAirSnowball = 0;
+
+ public EntityLightningKnife(World var1)
+ {
+ super(var1);
+ this.setSize(0.25F, 0.25F);
+ }
+
+ protected void entityInit() {}
+
+ /**
+ * Checks if the entity is in range to render by using the past in distance and comparing it to its average edge
+ * length * 64 * renderDistanceWeight Args: distance
+ */
+ public boolean isInRangeToRenderDist(double var1)
+ {
+ double var3 = this.boundingBox.getAverageEdgeLength() * 4.0D;
+ var3 *= 64.0D;
+ return var1 < var3 * var3;
+ }
+
+ public EntityLightningKnife(World var1, EntityLiving var2)
+ {
+ super(var1);
+ this.thrower = var2;
+ this.setSize(0.25F, 0.25F);
+ this.setLocationAndAngles(var2.posX, var2.posY + (double) var2.getEyeHeight(), var2.posZ, var2.rotationYaw, var2.rotationPitch);
+ this.posX -= (double) (MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F);
+ this.posY -= 0.10000000149011612D;
+ this.posZ -= (double) (MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F);
+ this.setPositionAndRotation(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
+ this.yOffset = 0.0F;
+ float var3 = 0.4F;
+ this.motionX = (double) (-MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI) * var3);
+ this.motionZ = (double) (MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI) * var3);
+ this.motionY = (double) (-MathHelper.sin(this.rotationPitch / 180.0F * (float) Math.PI) * var3);
+ this.setSnowballHeading(this.motionX, this.motionY, this.motionZ, 1.5F, 1.0F);
+ }
+
+ public EntityLightningKnife(World var1, double var2, double var4, double var6)
+ {
+ super(var1);
+ this.ticksInGroundSnowball = 0;
+ this.setSize(0.25F, 0.25F);
+ this.setPositionAndRotation(var2, var4, var6, this.rotationYaw, this.rotationPitch);
+ this.yOffset = 0.0F;
+ }
+
+ public void setSnowballHeading(double var1, double var3, double var5, float var7, float var8)
+ {
+ float var9 = MathHelper.sqrt_double(var1 * var1 + var3 * var3 + var5 * var5);
+ var1 /= (double) var9;
+ var3 /= (double) var9;
+ var5 /= (double) var9;
+ var1 += this.rand.nextGaussian() * 0.007499999832361937D * (double) var8;
+ var3 += this.rand.nextGaussian() * 0.007499999832361937D * (double) var8;
+ var5 += this.rand.nextGaussian() * 0.007499999832361937D * (double) var8;
+ var1 *= (double) var7;
+ var3 *= (double) var7;
+ var5 *= (double) var7;
+ this.motionX = var1;
+ this.motionY = var3;
+ this.motionZ = var5;
+ float var10 = MathHelper.sqrt_double(var1 * var1 + var5 * var5);
+ this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(var1, var5) * 180.0D / Math.PI);
+ this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(var3, (double) var10) * 180.0D / Math.PI);
+ this.ticksInGroundSnowball = 0;
+ }
+
+ /**
+ * Sets the velocity to the args. Args: x, y, z
+ */
+ public void setVelocity(double var1, double var3, double var5)
+ {
+ this.motionX = var1;
+ this.motionY = var3;
+ this.motionZ = var5;
+
+ if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
+ {
+ float var7 = MathHelper.sqrt_double(var1 * var1 + var5 * var5);
+ this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(var1, var5) * 180.0D / Math.PI);
+ this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(var3, (double) var7) * 180.0D / Math.PI);
+ }
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ this.lastTickPosX = this.posX;
+ this.lastTickPosY = this.posY;
+ this.lastTickPosZ = this.posZ;
+ super.onUpdate();
+
+ if (this.shakeSnowball > 0)
+ {
+ --this.shakeSnowball;
+ }
+
+ if (this.inGroundSnowball)
+ {
+ int var1 = this.worldObj.getBlockId(this.xTileSnowball, this.yTileSnowball, this.zTileSnowball);
+
+ if (var1 == this.inTileSnowball)
+ {
+ ++this.ticksInGroundSnowball;
+
+ if (this.ticksInGroundSnowball == 1200)
+ {
+ this.setDead();
+ }
+
+ return;
+ }
+
+ this.inGroundSnowball = false;
+ this.motionX *= (double) (this.rand.nextFloat() * 0.2F);
+ this.motionY *= (double) (this.rand.nextFloat() * 0.2F);
+ this.motionZ *= (double) (this.rand.nextFloat() * 0.2F);
+ this.ticksInGroundSnowball = 0;
+ this.ticksInAirSnowball = 0;
+ } else
+ {
+ ++this.ticksInAirSnowball;
+ }
+
+ Vec3 var15 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
+ Vec3 var2 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
+ MovingObjectPosition var3 = this.worldObj.rayTraceBlocks(var15, var2);
+ var15 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
+ var2 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
+
+ if (var3 != null)
+ {
+ var2 = Vec3.createVectorHelper(var3.hitVec.xCoord, var3.hitVec.yCoord, var3.hitVec.zCoord);
+ }
+
+ if (!this.worldObj.isRemote)
+ {
+ Entity var4 = null;
+ List var5 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D));
+ double var6 = 0.0D;
+
+ for (int var8 = 0; var8 < var5.size(); ++var8)
+ {
+ Entity var9 = (Entity) var5.get(var8);
+
+ if (var9.canBeCollidedWith() && (var9 != this.thrower || this.ticksInAirSnowball >= 5))
+ {
+ float var10 = 0.3F;
+ AxisAlignedBB var11 = var9.boundingBox.expand((double) var10, (double) var10, (double) var10);
+ MovingObjectPosition var12 = var11.calculateIntercept(var15, var2);
+
+ if (var12 != null)
+ {
+ double var13 = var15.distanceTo(var12.hitVec);
+
+ if (var13 < var6 || var6 == 0.0D)
+ {
+ var4 = var9;
+ var6 = var13;
+ }
+ }
+ }
+ }
+
+ if (var4 != null)
+ {
+ var3 = new MovingObjectPosition(var4);
+ }
+ }
+
+ if (var3 != null)
+ {
+ int var18;
+ int var16;
+ int var21;
+ EntityLightningBolt var7;
+
+ if (var3.entityHit != null)
+ {
+ if (!var3.entityHit.attackEntityFrom(DamageSource.causeMobDamage(this.thrower), 0))
+ {
+ ;
+ }
+
+ var16 = MathHelper.floor_double(var3.entityHit.boundingBox.minX);
+ var21 = MathHelper.floor_double(var3.entityHit.boundingBox.minY);
+ var18 = MathHelper.floor_double(var3.entityHit.boundingBox.minZ);
+ var7 = new EntityLightningBolt(this.worldObj, (double) var16, (double) var21, (double) var18);
+ var7.setLocationAndAngles((double) var16, (double) var21, (double) var18, this.rotationYaw, 0.0F);
+ this.worldObj.spawnEntityInWorld(var7);
+ } else
+ {
+ var16 = MathHelper.floor_double(this.posX);
+ var21 = MathHelper.floor_double(this.posY);
+ var18 = MathHelper.floor_double(this.posZ);
+ var7 = new EntityLightningBolt(this.worldObj, this.posX, this.posY, this.posZ);
+ var7.setLocationAndAngles((double) var16, (double) var21, (double) var18, this.rotationYaw, 0.0F);
+ this.worldObj.spawnEntityInWorld(var7);
+ }
+
+ for (var16 = 0; var16 < 8; ++var16)
+ {
+ this.worldObj.spawnParticle("largesmoke", this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
+ }
+
+ this.setDead();
+ }
+
+ this.posX += this.motionX;
+ this.posY += this.motionY;
+ this.posZ += this.motionZ;
+ float var19 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
+ this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
+
+ for (this.rotationPitch = (float) (Math.atan2(this.motionY, (double) var19) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F)
+ {
+ ;
+ }
+
+ while (this.rotationPitch - this.prevRotationPitch >= 180.0F)
+ {
+ this.prevRotationPitch += 360.0F;
+ }
+
+ while (this.rotationYaw - this.prevRotationYaw < -180.0F)
+ {
+ this.prevRotationYaw -= 360.0F;
+ }
+
+ while (this.rotationYaw - this.prevRotationYaw >= 180.0F)
+ {
+ this.prevRotationYaw += 360.0F;
+ }
+
+ this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F;
+ this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F;
+ float var20 = 0.99F;
+ float var17 = 0.03F;
+
+ if (this.isInWater())
+ {
+ for (int var23 = 0; var23 < 4; ++var23)
+ {
+ float var22 = 0.25F;
+ this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double) var22, this.posY - this.motionY * (double) var22, this.posZ - this.motionZ * (double) var22, this.motionX, this.motionY, this.motionZ);
+ }
+
+ var20 = 0.8F;
+ }
+
+ this.motionX *= (double) var20;
+ this.motionY *= (double) var20;
+ this.motionZ *= (double) var20;
+ this.motionY -= (double) var17;
+ this.setPositionAndRotation(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ var1.setShort("xTile", (short) this.xTileSnowball);
+ var1.setShort("yTile", (short) this.yTileSnowball);
+ var1.setShort("zTile", (short) this.zTileSnowball);
+ var1.setByte("inTile", (byte) this.inTileSnowball);
+ var1.setByte("shake", (byte) this.shakeSnowball);
+ var1.setByte("inGround", (byte) (this.inGroundSnowball ? 1 : 0));
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ this.xTileSnowball = var1.getShort("xTile");
+ this.yTileSnowball = var1.getShort("yTile");
+ this.zTileSnowball = var1.getShort("zTile");
+ this.inTileSnowball = var1.getByte("inTile") & 255;
+ this.shakeSnowball = var1.getByte("shake") & 255;
+ this.inGroundSnowball = var1.getByte("inGround") == 1;
+ }
+
+ /**
+ * Called by a player entity when they collide with an entity
+ */
+ public void onCollideWithPlayer(EntityPlayer var1)
+ {
+ if (this.inGroundSnowball && this.thrower == var1 && this.shakeSnowball <= 0 && var1.inventory.addItemStackToInventory(new ItemStack(Item.arrow, 1)))
+ {
+ this.worldObj.playSoundAtEntity(this, "random.pop", 0.2F, ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
+ var1.onItemPickup(this, 1);
+ this.setDead();
+ }
+ }
+
+ public float getShadowSize()
+ {
+ return 0.0F;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityMimic.java b/src/main/java/net/aetherteam/aether/entities/EntityMimic.java
new file mode 100644
index 0000000..5a97868
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityMimic.java
@@ -0,0 +1,93 @@
+package net.aetherteam.aether.entities;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.minecraft.entity.Entity;
+import net.minecraft.util.DamageSource;
+import net.minecraft.world.World;
+
+public class EntityMimic extends EntityDungeonMob
+{
+ public String dir = "/net/aetherteam/aether/client/sprites";
+ public float mouth;
+ public float legs;
+ private float legsDirection = 1.0F;
+
+ public EntityMimic(World var1)
+ {
+ super(var1);
+ this.texture = this.dir + "/mobs/mimic/mimic1.png";
+ this.yOffset = 0.0F;
+ this.setSize(1.0F, 2.0F);
+ this.health = 40;
+ this.attackStrength = 5;
+ this.entityToAttack = var1.getClosestPlayerToEntity(this, 64.0D);
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+ this.mouth = (float) (Math.cos((double) ((float) this.ticksExisted / 10.0F * (float) Math.PI)) + 1.0D) * 0.6F;
+ this.legs *= 0.9F;
+
+ if (this.motionX > 0.001D || this.motionX < -0.001D || this.motionZ > 0.001D || this.motionZ < -0.001D)
+ {
+ this.legs += this.legsDirection * 0.2F;
+
+ if (this.legs > 1.0F)
+ {
+ this.legsDirection = -1.0F;
+ }
+
+ if (this.legs < -1.0F)
+ {
+ this.legsDirection = 1.0F;
+ }
+ }
+ }
+
+ /**
+ * Applies a velocity to each of the entities pushing them away from each other. Args: entity
+ */
+ public void applyEntityCollision(Entity var1)
+ {
+ if (!this.isDead && var1 != null)
+ {
+ var1.attackEntityFrom(DamageSource.causeMobDamage(this), 4);
+ }
+ }
+
+ /**
+ * Returns the sound this mob makes when it is hurt.
+ */
+ protected String getHurtSound()
+ {
+ return "mob.slime.small";
+ }
+
+ /**
+ * Returns the sound this mob makes on death.
+ */
+ protected String getDeathSound()
+ {
+ return "mob.slime.small";
+ }
+
+ /**
+ * Returns the volume for the sounds this mob makes.
+ */
+ protected float getSoundVolume()
+ {
+ return 0.6F;
+ }
+
+ /**
+ * Returns the item ID for the item the mob drops on death.
+ */
+ protected int getDropItemId()
+ {
+ return AetherBlocks.SkyrootChest.blockID;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityNewZephyr.java b/src/main/java/net/aetherteam/aether/entities/EntityNewZephyr.java
new file mode 100644
index 0000000..317ab3b
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityNewZephyr.java
@@ -0,0 +1,238 @@
+package net.aetherteam.aether.entities;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.monster.IMob;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class EntityNewZephyr extends EntityAetherMob implements IMob
+{
+ public String dir = "/net/aetherteam/aether/client/sprites";
+ private int heightOffsetUpdateTime;
+ private float heightOffset = 1.5F;
+ private int attackTimer;
+ public float sinage;
+ public int timeUntilShoot = 20;
+
+ public EntityNewZephyr(World var1)
+ {
+ super(var1);
+ this.texture = this.dir + "/mobs/newzephyr/zephyr.png";
+ this.setSize(1.25F, 1.5F);
+ this.isImmuneToFire = true;
+ this.attackTime = this.timeUntilShoot;
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+ this.jumpMovementFactor = 0.0F;
+
+ if (this.health > 0)
+ {
+ double var1 = (double) (this.rand.nextFloat() - 0.5F);
+ double var3 = (double) this.rand.nextFloat();
+ double var5 = (double) (this.rand.nextFloat() - 0.5F);
+ double var7 = this.posX + var1 * var3;
+ double var9 = this.boundingBox.minY + var3 - 0.30000001192092896D;
+ double var11 = this.posZ + var5 * var3;
+ this.worldObj.spawnParticle("reddust", var7, var9, var11, 1.0D, 1.0D, 1.0D);
+ }
+
+ if (this.entityToAttack != null)
+ {
+ this.attackEntity(this.entityToAttack, this.getDistanceToEntity(this.entityToAttack));
+ }
+ }
+
+ /**
+ * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons
+ * use this to react to sunlight and start to burn.
+ */
+ public void onLivingUpdate()
+ {
+ if (this.attackTimer > 0)
+ {
+ --this.attackTimer;
+ }
+
+ if (!this.worldObj.isRemote)
+ {
+ --this.heightOffsetUpdateTime;
+
+ if (this.heightOffsetUpdateTime <= 0)
+ {
+ this.heightOffsetUpdateTime = 100;
+ this.heightOffset = 1.5F + (float) this.rand.nextGaussian() * 3.0F;
+ }
+
+ if (this.getEntityToAttack() != null && this.getEntityToAttack().posY + (double) this.getEntityToAttack().getEyeHeight() > this.posY + (double) this.getEyeHeight() + (double) this.heightOffset)
+ {
+ this.motionY += (0.700000011920929D - this.motionY) * 0.700000011920929D;
+ }
+ }
+
+ if (!this.onGround && this.motionY < 0.0D)
+ {
+ this.motionY *= 0.8D;
+ }
+
+ if (this.hurtTime > 0)
+ {
+ this.sinage += 0.9F;
+ } else
+ {
+ this.sinage += 0.2F;
+ }
+
+ if (this.sinage > ((float) Math.PI * 2F))
+ {
+ this.sinage -= ((float) Math.PI * 2F);
+ }
+
+ super.onLivingUpdate();
+ }
+
+ /**
+ * Basic mob attack. Default to touch of death in EntityCreature. Overridden by each mob to define their attack.
+ */
+ protected void attackEntity(Entity var1, float var2)
+ {
+ EntityLiving var3 = null;
+
+ if (var1 instanceof EntityLiving)
+ {
+ var3 = (EntityLiving) var1;
+ }
+
+ if (var2 < 10.0F)
+ {
+ double var4 = var1.posX - this.posX;
+ double var6 = var1.posZ - this.posZ;
+
+ if (var3 != null)
+ {
+ if (var3.isDead || (double) var3.getDistanceToEntity(this) > 12.0D || var3 instanceof EntityNewZephyr || var3 instanceof EntityTempest)
+ {
+ var3 = null;
+ this.entityToAttack = null;
+ return;
+ }
+
+ if (this.attackTime >= this.timeUntilShoot)
+ {
+ this.shootTarget(var3);
+ }
+
+ if (this.attackTime >= this.timeUntilShoot && this.canEntityBeSeen(var3))
+ {
+ this.attackTime = -10;
+ }
+
+ if (this.attackTime < this.timeUntilShoot)
+ {
+ ++this.attackTime;
+ }
+ }
+
+ this.rotationYaw = (float) (Math.atan2(var6, var4) * 180.0D / Math.PI) - 90.0F;
+ }
+ }
+
+ public void shootTarget(EntityLiving var1)
+ {
+ if (this.worldObj.difficultySetting != 0)
+ {
+ double var2 = var1.posX - this.posX;
+ double var4 = var1.boundingBox.minY + (double) (var1.height / 2.0F) - (this.posY + (double) (this.height / 2.0F));
+ double var6 = var1.posZ - this.posZ;
+ double var8 = var1.posX - this.posX;
+ double var10 = var1.posZ - this.posZ;
+ double var12 = 1.5D / Math.sqrt(var8 * var8 + var10 * var10 + 0.1D);
+ double var14 = 0.1D + Math.sqrt(var8 * var8 + var10 * var10 + 0.1D) * 0.5D + (this.posY - var1.posY) * 0.25D;
+ double var10000 = var8 * var12;
+ var10000 = var10 * var12;
+ EntityZephyrSnowball var16 = new EntityZephyrSnowball(this.worldObj, this, var2, var4, var6);
+ var16.posY = this.posY + 1.0D;
+ this.worldObj.playSoundAtEntity(this, "aemob.zephyr.shoot", 2.0F, (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F);
+
+ if (!this.worldObj.isRemote)
+ {
+ this.worldObj.spawnEntityInWorld(var16);
+ }
+ }
+ }
+
+ /**
+ * Called when the mob is falling. Calculates and applies fall damage.
+ */
+ protected void fall(float var1)
+ {}
+
+ /**
+ * Causes this entity to do an upwards motion (jumping).
+ */
+ protected void jump()
+ {}
+
+ public int getMaxHealth()
+ {
+ return 15;
+ }
+
+ /**
+ * Returns the sound this mob makes while it's alive.
+ */
+ protected String getLivingSound()
+ {
+ return "aemob.zephyr.say";
+ }
+
+ /**
+ * Returns the sound this mob makes when it is hurt.
+ */
+ protected String getHurtSound()
+ {
+ return null;
+ }
+
+ /**
+ * Returns the sound this mob makes on death.
+ */
+ protected String getDeathSound()
+ {
+ return null;
+ }
+
+ /**
+ * Determines if an entity can be despawned, used on idle far away entities
+ */
+ public boolean canDespawn()
+ {
+ return true;
+ }
+
+ /**
+ * Checks if the entity's current position is a valid location to spawn this entity.
+ */
+ public boolean getCanSpawnHere()
+ {
+ int var1 = MathHelper.floor_double(this.posX);
+ int var2 = MathHelper.floor_double(this.boundingBox.minY);
+ int var3 = MathHelper.floor_double(this.posZ);
+ return this.rand.nextInt(65) == 0 && this.worldObj.checkNoEntityCollision(this.boundingBox) && this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).size() == 0 && !this.worldObj.isAnyLiquid(this.boundingBox) && this.worldObj.getBlockId(var1, var2 - 1, var3) == AetherBlocks.AetherGrass.blockID && this.worldObj.getBlockId(var1, var2 - 1, var3) != AetherBlocks.Holystone.blockID && this.worldObj.difficultySetting > 0;
+ }
+
+ /**
+ * Will return how many at most can spawn in a chunk at once.
+ */
+ public int getMaxSpawnedInChunk()
+ {
+ return 1;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityNotchWave.java b/src/main/java/net/aetherteam/aether/entities/EntityNotchWave.java
new file mode 100644
index 0000000..ba9b4f0
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityNotchWave.java
@@ -0,0 +1,387 @@
+package net.aetherteam.aether.entities;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.entities.mounts.EntityAerbunny;
+import net.aetherteam.aether.entities.mounts.EntityMoa;
+import net.aetherteam.aether.entities.mounts.EntityPhyg;
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockFlower;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.IProjectile;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.MovingObjectPosition;
+import net.minecraft.util.Vec3;
+import net.minecraft.world.World;
+
+public class EntityNotchWave extends Entity implements IProjectile
+{
+ private int xTileSnowball;
+ private int yTileSnowball;
+ private int zTileSnowball;
+ private int inTileSnowball;
+ private boolean inGroundSnowball;
+ public int shakeSnowball;
+ private EntityLiving thrower;
+ private int ticksInGroundSnowball;
+ private int ticksInAirSnowball;
+ public ArrayList harvestBlockBans;
+
+ public EntityNotchWave(World var1)
+ {
+ super(var1);
+ this.harvestBlockBans = new ArrayList();
+ this.xTileSnowball = -1;
+ this.yTileSnowball = -1;
+ this.zTileSnowball = -1;
+ this.inTileSnowball = 0;
+ this.inGroundSnowball = false;
+ this.shakeSnowball = 0;
+ this.ticksInAirSnowball = 0;
+ this.setSize(0.25F, 0.25F);
+ this.harvestBlockBans.add(Integer.valueOf(AetherBlocks.BerryBushStem.blockID));
+ }
+
+ protected void entityInit() {}
+
+ /**
+ * Checks if the entity is in range to render by using the past in distance and comparing it to its average edge
+ * length * 64 * renderDistanceWeight Args: distance
+ */
+ public boolean isInRangeToRenderDist(double var1)
+ {
+ double var3 = this.boundingBox.getAverageEdgeLength() * 4.0D;
+ var3 *= 64.0D;
+ return var1 < var3 * var3;
+ }
+
+ public EntityNotchWave(World var1, EntityLiving var2)
+ {
+ this(var1);
+ this.thrower = var2;
+ this.setLocationAndAngles(var2.posX, var2.posY + (double) var2.getEyeHeight(), var2.posZ, var2.rotationYaw, var2.rotationPitch);
+ this.posX -= (double) (MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F);
+ this.posY -= 0.10000000149011612D;
+ this.posZ -= (double) (MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F);
+ this.setPositionAndRotation(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
+ this.yOffset = 0.0F;
+ float var3 = 0.4F;
+ this.motionX = (double) (-MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI) * var3);
+ this.motionZ = (double) (MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI) * var3);
+ this.motionY = (double) (-MathHelper.sin(this.rotationPitch / 180.0F * (float) Math.PI) * var3);
+ this.setSnowballHeading(this.motionX, this.motionY, this.motionZ, 1.5F, 1.0F);
+ this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, 1.5F, 1.0F);
+ }
+
+ public EntityNotchWave(World var1, double var2, double var4, double var6)
+ {
+ this(var1);
+ this.setPositionAndRotation(var2, var4, var6, this.rotationYaw, this.rotationPitch);
+ this.yOffset = 0.0F;
+ }
+
+ public void setSnowballHeading(double var1, double var3, double var5, float var7, float var8)
+ {
+ float var9 = MathHelper.sqrt_double(var1 * var1 + var3 * var3 + var5 * var5);
+ var1 /= (double) var9;
+ var3 /= (double) var9;
+ var5 /= (double) var9;
+ var1 += this.rand.nextGaussian() * 0.007499999832361937D * (double) var8;
+ var3 += this.rand.nextGaussian() * 0.007499999832361937D * (double) var8;
+ var5 += this.rand.nextGaussian() * 0.007499999832361937D * (double) var8;
+ var1 *= (double) var7;
+ var3 *= (double) var7;
+ var5 *= (double) var7;
+ this.motionX = var1;
+ this.motionY = var3;
+ this.motionZ = var5;
+ float var10 = MathHelper.sqrt_double(var1 * var1 + var5 * var5);
+ this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(var1, var5) * 180.0D / Math.PI);
+ this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(var3, (double) var10) * 180.0D / Math.PI);
+ this.ticksInGroundSnowball = 0;
+ }
+
+ /**
+ * Sets the velocity to the args. Args: x, y, z
+ */
+ public void setVelocity(double var1, double var3, double var5)
+ {
+ this.motionX = var1;
+ this.motionY = var3;
+ this.motionZ = var5;
+
+ if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
+ {
+ float var7 = MathHelper.sqrt_double(var1 * var1 + var5 * var5);
+ this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(var1, var5) * 180.0D / Math.PI);
+ this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(var3, (double) var7) * 180.0D / Math.PI);
+ }
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ this.lastTickPosX = this.posX;
+ this.lastTickPosY = this.posY;
+ this.lastTickPosZ = this.posZ;
+ super.onUpdate();
+
+ if (this.shakeSnowball > 0)
+ {
+ --this.shakeSnowball;
+ }
+
+ if (this.ticksInAirSnowball > 100)
+ {
+ this.setDead();
+ }
+
+ if (this.inGroundSnowball)
+ {
+ this.setDead();
+ } else
+ {
+ ++this.ticksInAirSnowball;
+ }
+
+ Vec3 var1 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
+ Vec3 var2 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
+ MovingObjectPosition var3 = this.worldObj.rayTraceBlocks(var1, var2);
+ var1 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
+ var2 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
+
+ if (var3 != null)
+ {
+ var2 = Vec3.createVectorHelper(var3.hitVec.xCoord, var3.hitVec.yCoord, var3.hitVec.zCoord);
+ }
+
+ int var8;
+
+ if (!this.worldObj.isRemote)
+ {
+ Entity var4 = null;
+ List var5 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(4.0D, 4.0D, 4.0D));
+ double var6 = 0.0D;
+
+ for (var8 = 0; var8 < var5.size(); ++var8)
+ {
+ Entity var9 = (Entity) var5.get(var8);
+
+ if (var9.canBeCollidedWith() && (var9 != this.thrower || this.ticksInAirSnowball >= 5))
+ {
+ float var10 = 0.3F;
+
+ if ((!(var9 instanceof EntityPhyg) || ((EntityPhyg) var9).getSaddled()) && (!(var9 instanceof EntityMoa) || ((EntityMoa) var9).getSaddled()) && (!(var9 instanceof EntityAerbunny) || !(((EntityAerbunny) var9).riddenByEntity instanceof EntityPlayer)) && var9 != this.thrower)
+ {
+ var9.attackEntityFrom(DamageSource.causeMobDamage(this.thrower), 5);
+ }
+
+ AxisAlignedBB var11 = var9.boundingBox.expand((double) var10, (double) var10, (double) var10);
+ MovingObjectPosition var12 = var11.calculateIntercept(var1, var2);
+
+ if (var12 != null)
+ {
+ double var13 = var1.distanceTo(var12.hitVec);
+
+ if (var13 < var6 || var6 == 0.0D)
+ {
+ var4 = var9;
+ var6 = var13;
+ }
+ }
+ }
+ }
+
+ for (var8 = (int) (this.posX - 3.0D); (double) var8 <= this.posX + 3.0D; ++var8)
+ {
+ for (int var24 = (int) (this.posY - 3.0D); (double) var24 <= this.posY + 3.0D; ++var24)
+ {
+ for (int var17 = (int) (this.posZ - 3.0D); (double) var17 <= this.posZ + 3.0D; ++var17)
+ {
+ if (Block.blocksList[this.worldObj.getBlockId(var8, var24, var17)] instanceof BlockFlower && this.thrower != null && this.thrower instanceof EntityPlayer)
+ {
+ int var16 = this.worldObj.getBlockId(var8, var24, var17);
+ int var15 = this.worldObj.getBlockMetadata(var8, var24, var17);
+
+ if (!this.harvestBlockBans.contains(Integer.valueOf(this.worldObj.getBlockId(var8, var24, var17))))
+ {
+ Block.blocksList[this.worldObj.getBlockId(var8, var24, var17)].harvestBlock(this.thrower.worldObj, (EntityPlayer) this.thrower, var8, var24, var17, this.worldObj.getBlockMetadata(var8, var24, var17));
+
+ if (this.worldObj.getBlockId(var8, var24, var17) == var16 && this.worldObj.getBlockMetadata(var8, var24, var17) == var15)
+ {
+ Block.blocksList[this.worldObj.getBlockId(var8, var24, var17)].removeBlockByPlayer(this.thrower.worldObj, (EntityPlayer) this.thrower, var8, var24, var17);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (var4 != null)
+ {
+ var3 = new MovingObjectPosition(var4);
+ }
+ }
+
+ int var7;
+
+ if (var3 != null)
+ {
+ int var18;
+
+ for (var18 = (int) (this.posX - 3.0D); (double) var18 <= this.posX + 3.0D; ++var18)
+ {
+ for (int var21 = (int) (this.posY - 3.0D); (double) var21 <= this.posY + 3.0D; ++var21)
+ {
+ for (int var19 = (int) (this.posZ - 3.0D); (double) var19 <= this.posZ + 3.0D; ++var19)
+ {
+ if (Block.blocksList[this.worldObj.getBlockId(var18, var21, var19)] instanceof BlockFlower && this.thrower != null && this.thrower instanceof EntityPlayer)
+ {
+ var7 = this.worldObj.getBlockId(var18, var21, var19);
+ var8 = this.worldObj.getBlockMetadata(var18, var21, var19);
+
+ if (!this.harvestBlockBans.contains(Integer.valueOf(this.worldObj.getBlockId(var18, var21, var19))))
+ {
+ Block.blocksList[this.worldObj.getBlockId(var18, var21, var19)].harvestBlock(this.thrower.worldObj, (EntityPlayer) this.thrower, var18, var21, var19, this.worldObj.getBlockMetadata(var18, var21, var19));
+
+ if (this.worldObj.getBlockId(var18, var21, var19) == var7 && this.worldObj.getBlockMetadata(var18, var21, var19) == var8)
+ {
+ Block.blocksList[this.worldObj.getBlockId(var18, var21, var19)].removeBlockByPlayer(this.thrower.worldObj, (EntityPlayer) this.thrower, var18, var21, var19);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if ((var3.entityHit == null || (!(var3.entityHit instanceof EntityPhyg) || ((EntityPhyg) var3.entityHit).getSaddled()) && (!(var3.entityHit instanceof EntityMoa) || ((EntityMoa) var3.entityHit).getSaddled()) && (!(var3.entityHit instanceof EntityAerbunny) || !(((EntityAerbunny) var3.entityHit).riddenByEntity instanceof EntityPlayer))) && var3.entityHit != null && var3.entityHit != this.thrower)
+ {
+ if (!var3.entityHit.attackEntityFrom(DamageSource.causeMobDamage(this.thrower), 0))
+ {
+ ;
+ }
+
+ var3.entityHit.addVelocity(this.motionX, 0.6D, this.motionZ);
+ }
+
+ for (var18 = 0; var18 < 8; ++var18)
+ {
+ this.worldObj.spawnParticle("explode", this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
+ this.worldObj.spawnParticle("explode", this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
+ this.worldObj.spawnParticle("smoke", this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
+ this.worldObj.spawnParticle("largesmoke", this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
+ this.worldObj.spawnParticle("flame", this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
+ }
+
+ this.setDead();
+ }
+
+ this.posX += this.motionX;
+ this.posY += this.motionY;
+ this.posZ += this.motionZ;
+ float var22 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
+ this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
+
+ for (this.rotationPitch = (float) (Math.atan2(this.motionY, (double) var22) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F)
+ {
+ ;
+ }
+
+ while (this.rotationPitch - this.prevRotationPitch >= 180.0F)
+ {
+ this.prevRotationPitch += 360.0F;
+ }
+
+ while (this.rotationYaw - this.prevRotationYaw < -180.0F)
+ {
+ this.prevRotationYaw -= 360.0F;
+ }
+
+ while (this.rotationYaw - this.prevRotationYaw >= 180.0F)
+ {
+ this.prevRotationYaw += 360.0F;
+ }
+
+ this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F;
+ this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F;
+ float var23 = 0.99F;
+ float var20 = 0.03F;
+
+ if (this.isInWater())
+ {
+ for (var7 = 0; var7 < 4; ++var7)
+ {
+ float var25 = 0.25F;
+ this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double) var25, this.posY - this.motionY * (double) var25, this.posZ - this.motionZ * (double) var25, this.motionX, this.motionY, this.motionZ);
+ }
+
+ var23 = 0.8F;
+ }
+
+ this.motionX *= (double) var23;
+ this.motionY *= (double) var23;
+ this.motionZ *= (double) var23;
+ this.setPositionAndRotation(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ var1.setShort("xTile", (short) this.xTileSnowball);
+ var1.setShort("yTile", (short) this.yTileSnowball);
+ var1.setShort("zTile", (short) this.zTileSnowball);
+ var1.setByte("inTile", (byte) this.inTileSnowball);
+ var1.setByte("shake", (byte) this.shakeSnowball);
+ var1.setByte("inGround", (byte) (this.inGroundSnowball ? 1 : 0));
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ this.xTileSnowball = var1.getShort("xTile");
+ this.yTileSnowball = var1.getShort("yTile");
+ this.zTileSnowball = var1.getShort("zTile");
+ this.inTileSnowball = var1.getByte("inTile") & 255;
+ this.shakeSnowball = var1.getByte("shake") & 255;
+ this.inGroundSnowball = var1.getByte("inGround") == 1;
+ }
+
+ /**
+ * Called by a player entity when they collide with an entity
+ */
+ public void onCollideWithPlayer(EntityPlayer var1)
+ {
+ if (this.inGroundSnowball && this.thrower == var1 && this.shakeSnowball <= 0 && var1.inventory.addItemStackToInventory(new ItemStack(Item.arrow, 1)))
+ {
+ this.worldObj.playSoundAtEntity(this, "random.pop", 0.2F, ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
+ var1.onItemPickup(this, 1);
+ this.setDead();
+ }
+ }
+
+ public float getShadowSize()
+ {
+ return 0.0F;
+ }
+
+ /**
+ * Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction.
+ */
+ public void setThrowableHeading(double var1, double var3, double var5, float var7, float var8)
+ {}
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityPoisonNeedle.java b/src/main/java/net/aetherteam/aether/entities/EntityPoisonNeedle.java
new file mode 100644
index 0000000..477cca3
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityPoisonNeedle.java
@@ -0,0 +1,37 @@
+package net.aetherteam.aether.entities;
+
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.world.World;
+
+public class EntityPoisonNeedle extends EntityDartPoison
+{
+ public EntityPoisonNeedle(World var1)
+ {
+ super(var1);
+ }
+
+ public EntityPoisonNeedle(World var1, double var2, double var4, double var6)
+ {
+ super(var1, var2, var4, var6);
+ }
+
+ public EntityPoisonNeedle(World var1, EntityLiving var2)
+ {
+ super(var1, var2);
+ }
+
+ public void entityInit()
+ {
+ super.entityInit();
+ this.dmg = 0;
+ this.speed = 1.5F;
+ this.curvature = 0.03F;
+ }
+
+ public boolean onHitBlock()
+ {
+ this.curvature = 0.03F;
+ this.worldObj.playSoundAtEntity(this, "random.drr", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F));
+ return this.victim == null;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityProjectileBase.java b/src/main/java/net/aetherteam/aether/entities/EntityProjectileBase.java
new file mode 100644
index 0000000..90d0aff
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityProjectileBase.java
@@ -0,0 +1,478 @@
+package net.aetherteam.aether.entities;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.Iterator;
+import java.util.List;
+
+import net.minecraft.block.Block;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.MovingObjectPosition;
+import net.minecraft.util.Vec3;
+import net.minecraft.world.World;
+
+public abstract class EntityProjectileBase extends Entity
+{
+ public float speed;
+ public float slowdown;
+ public float curvature;
+ public float precision;
+ public float hitBox;
+ public int dmg;
+ public ItemStack item;
+ public int ttlInGround;
+ public int xTile;
+ public int yTile;
+ public int zTile;
+ public int inTile;
+ public int inData;
+ public boolean inGround;
+ public int arrowShake;
+ public EntityLiving shooter;
+ public int ticksInGround;
+ public int ticksFlying;
+ public boolean shotByPlayer;
+ public int canBePickedUp;
+
+ public EntityProjectileBase(World var1)
+ {
+ super(var1);
+ this.xTile = -1;
+ this.yTile = -1;
+ this.zTile = -1;
+ }
+
+ public EntityProjectileBase(World var1, double var2, double var4, double var6)
+ {
+ this(var1);
+ this.setPositionAndRotation(var2, var4 - 1.0D, var6, this.rotationYaw, this.rotationPitch);
+ }
+
+ public EntityProjectileBase(World var1, EntityLiving var2)
+ {
+ this(var1);
+ this.shooter = var2;
+ this.shotByPlayer = var2 instanceof EntityPlayer;
+ this.setLocationAndAngles(var2.posX, var2.posY + (double) var2.getEyeHeight(), var2.posZ, var2.rotationYaw, var2.rotationPitch);
+ this.posX -= (double) (MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F);
+ this.posY -= 0.10000000149011612D;
+ this.posZ -= (double) (MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F);
+ this.setPositionAndRotation(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
+ this.motionX = (double) (-MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI));
+ this.motionZ = (double) (MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI));
+ this.motionY = (double) (-MathHelper.sin(this.rotationPitch / 180.0F * (float) Math.PI));
+ this.setArrowHeading(this.motionX, this.motionY, this.motionZ, this.speed, this.precision);
+ }
+
+ protected void entityInit()
+ {
+ this.xTile = -1;
+ this.yTile = -1;
+ this.zTile = -1;
+ this.inTile = 0;
+ this.inGround = false;
+ this.arrowShake = 0;
+ this.ticksFlying = 0;
+ this.setSize(0.5F, 0.5F);
+ this.yOffset = 0.0F;
+ this.hitBox = 0.3F;
+ this.speed = 1.0F;
+ this.slowdown = 0.99F;
+ this.curvature = 0.03F;
+ this.dmg = 4;
+ this.precision = 1.0F;
+ this.ttlInGround = 1200;
+ this.item = null;
+ }
+
+ /**
+ * Will get destroyed next tick.
+ */
+ public void setDead()
+ {
+ this.shooter = null;
+ super.setDead();
+ }
+
+ public void setArrowHeading(double var1, double var3, double var5, float var7, float var8)
+ {
+ float var9 = MathHelper.sqrt_double(var1 * var1 + var3 * var3 + var5 * var5);
+ var1 /= (double) var9;
+ var3 /= (double) var9;
+ var5 /= (double) var9;
+ var1 += this.rand.nextGaussian() * 0.007499999832361937D * (double) var8;
+ var3 += this.rand.nextGaussian() * 0.007499999832361937D * (double) var8;
+ var5 += this.rand.nextGaussian() * 0.007499999832361937D * (double) var8;
+ var1 *= (double) var7;
+ var3 *= (double) var7;
+ var5 *= (double) var7;
+ this.motionX = var1;
+ this.motionY = var3;
+ this.motionZ = var5;
+ float var10 = MathHelper.sqrt_double(var1 * var1 + var5 * var5);
+ this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(var1, var5) * 180.0D / Math.PI);
+ this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(var3, (double) var10) * 180.0D / Math.PI);
+ this.ticksInGround = 0;
+ }
+
+ @SideOnly(Side.CLIENT)
+
+ /**
+ * Sets the velocity to the args. Args: x, y, z
+ */
+ public void setVelocity(double var1, double var3, double var5)
+ {
+ this.motionX = var1;
+ this.motionY = var3;
+ this.motionZ = var5;
+
+ if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
+ {
+ float var7 = MathHelper.sqrt_double(var1 * var1 + var5 * var5);
+ this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(var1, var5) * 180.0D / Math.PI);
+ this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(var3, (double) var7) * 180.0D / Math.PI);
+ this.prevRotationYaw = this.rotationYaw;
+ this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
+ this.ticksInGround = 0;
+ }
+ }
+
+ /**
+ * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to
+ * prevent them from trampling crops
+ */
+ protected boolean canTriggerWalking()
+ {
+ return false;
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+
+ if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
+ {
+ float var1 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
+ this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
+ this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(this.motionY, (double) var1) * 180.0D / Math.PI);
+ }
+
+ int var16 = this.worldObj.getBlockId(this.xTile, this.yTile, this.zTile);
+
+ if (var16 > 0)
+ {
+ Block.blocksList[var16].setBlockBoundsBasedOnState(this.worldObj, this.xTile, this.yTile, this.zTile);
+ AxisAlignedBB var2 = Block.blocksList[var16].getCollisionBoundingBoxFromPool(this.worldObj, this.xTile, this.yTile, this.zTile);
+
+ if (var2 != null && var2.isVecInside(this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ)))
+ {
+ this.inGround = true;
+ }
+ }
+
+ if (this.arrowShake > 0)
+ {
+ --this.arrowShake;
+ }
+
+ if (this.inGround)
+ {
+ int var19 = this.worldObj.getBlockId(this.xTile, this.yTile, this.zTile);
+ int var3 = this.worldObj.getBlockMetadata(this.xTile, this.yTile, this.zTile);
+
+ if (var19 == this.inTile && var3 == this.inData)
+ {
+ ++this.ticksInGround;
+
+ if (this.ticksInGround == 1200 && !this.worldObj.isRemote)
+ {
+ this.setDead();
+ }
+ } else
+ {
+ this.inGround = false;
+ this.motionX *= (double) (this.rand.nextFloat() * 0.2F);
+ this.motionY *= (double) (this.rand.nextFloat() * 0.2F);
+ this.motionZ *= (double) (this.rand.nextFloat() * 0.2F);
+ this.ticksInGround = 0;
+ this.ticksFlying = 0;
+ }
+ } else
+ {
+ ++this.ticksFlying;
+ Vec3 var18 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ);
+ Vec3 var17 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
+ MovingObjectPosition var4 = this.worldObj.rayTraceBlocks_do_do(var18, var17, false, true);
+ var18 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ);
+ var17 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
+
+ if (var4 != null)
+ {
+ var17 = this.worldObj.getWorldVec3Pool().getVecFromPool(var4.hitVec.xCoord, var4.hitVec.yCoord, var4.hitVec.zCoord);
+ }
+
+ Entity var5 = null;
+ List var6 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D));
+ double var7 = 0.0D;
+ Iterator var9 = var6.iterator();
+ float var10;
+ MovingObjectPosition var13;
+
+ while (var9.hasNext())
+ {
+ Entity var11 = (Entity) var9.next();
+
+ if (var11.canBeCollidedWith() && (var11 != this.shooter || this.ticksFlying >= 5))
+ {
+ var10 = 0.3F;
+ AxisAlignedBB var12 = var11.boundingBox.expand((double) var10, (double) var10, (double) var10);
+ var13 = var12.calculateIntercept(var18, var17);
+
+ if (var13 != null)
+ {
+ double var14 = var18.distanceTo(var13.hitVec);
+
+ if (var14 < var7 || var7 == 0.0D)
+ {
+ var5 = var11;
+ var7 = var14;
+ }
+ }
+ }
+ }
+
+ if (var5 != null)
+ {
+ var4 = new MovingObjectPosition(var5);
+ }
+
+ if (var4 != null)
+ {
+ float var22;
+
+ if (var4.entityHit != null && this.onHitTarget(var4.entityHit))
+ {
+ if (this.shooter != null && var4.entityHit == this.shooter)
+ {
+ return;
+ }
+
+ var22 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
+ int var21 = MathHelper.ceiling_double_int((double) var22 * (double) this.dmg);
+ var13 = null;
+ DamageSource var25;
+
+ if (this.shooter == null)
+ {
+ var25 = (new CustomDamageSource("dart", this, this)).setDeathMessage(" died covered in darts.").setProjectile();
+ } else
+ {
+ var25 = (new CustomDamageSource("dart", this, this.shooter)).setDeathMessage(" died covered in " + this.shooter.getEntityName() + "\'s darts.").setProjectile();
+ }
+
+ if (this.isBurning())
+ {
+ var4.entityHit.setFire(5);
+ }
+
+ if (var4.entityHit.attackEntityFrom(var25, var21))
+ {
+ this.worldObj.playSoundAtEntity(this, "random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F));
+
+ if (!this.worldObj.isRemote)
+ {
+ this.setDead();
+ }
+ }
+ } else if (this.onHitBlock(var4))
+ {
+ this.xTile = var4.blockX;
+ this.yTile = var4.blockY;
+ this.zTile = var4.blockZ;
+ this.inTile = this.worldObj.getBlockId(this.xTile, this.yTile, this.zTile);
+ this.inData = this.worldObj.getBlockMetadata(this.xTile, this.yTile, this.zTile);
+ this.motionX = (double) ((float) (var4.hitVec.xCoord - this.posX));
+ this.motionY = (double) ((float) (var4.hitVec.yCoord - this.posY));
+ this.motionZ = (double) ((float) (var4.hitVec.zCoord - this.posZ));
+ var22 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
+ this.posX -= this.motionX / (double) var22 * 0.05000000074505806D;
+ this.posY -= this.motionY / (double) var22 * 0.05000000074505806D;
+ this.posZ -= this.motionZ / (double) var22 * 0.05000000074505806D;
+ this.worldObj.playSoundAtEntity(this, "random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F));
+ this.inGround = true;
+ this.arrowShake = 7;
+ }
+ }
+
+ this.handleMotionUpdate();
+ float var20 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
+ this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
+
+ for (this.rotationPitch = (float) (Math.atan2(this.motionY, (double) var20) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F)
+ {
+ ;
+ }
+
+ while (this.rotationPitch - this.prevRotationPitch >= 180.0F)
+ {
+ this.prevRotationPitch += 360.0F;
+ }
+
+ while (this.rotationYaw - this.prevRotationYaw < -180.0F)
+ {
+ this.prevRotationYaw -= 360.0F;
+ }
+
+ while (this.rotationYaw - this.prevRotationYaw >= 180.0F)
+ {
+ this.prevRotationYaw += 360.0F;
+ }
+
+ this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F;
+ this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F;
+ float var23 = 0.99F;
+ var10 = 0.05F;
+
+ if (this.isInWater())
+ {
+ for (int var24 = 0; var24 < 4; ++var24)
+ {
+ float var15 = 0.25F;
+ this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double) var15, this.posY - this.motionY * (double) var15, this.posZ - this.motionZ * (double) var15, this.motionX, this.motionY, this.motionZ);
+ }
+
+ var23 = 0.8F;
+ }
+
+ this.posX += this.motionX;
+ this.posY += this.motionY;
+ this.posZ += this.motionZ;
+ this.handleMotionUpdate();
+ this.setPositionAndRotation(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
+ this.doBlockCollisions();
+ }
+ }
+
+ public void handleMotionUpdate()
+ {
+ float var1 = this.slowdown;
+
+ if (this.handleWaterMovement())
+ {
+ for (int var2 = 0; var2 < 4; ++var2)
+ {
+ float var3 = 0.25F;
+ this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double) var3, this.posY - this.motionY * (double) var3, this.posZ - this.motionZ * (double) var3, this.motionX, this.motionY, this.motionZ);
+ }
+
+ var1 *= 0.8F;
+ }
+
+ this.motionX *= (double) var1;
+ this.motionY *= (double) var1;
+ this.motionZ *= (double) var1;
+ this.motionY -= (double) this.curvature;
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ var1.setShort("xTile", (short) this.xTile);
+ var1.setShort("yTile", (short) this.yTile);
+ var1.setShort("zTile", (short) this.zTile);
+ var1.setByte("inTile", (byte) this.inTile);
+ var1.setByte("inData", (byte) this.inData);
+ var1.setByte("shake", (byte) this.arrowShake);
+ var1.setByte("inGround", (byte) (this.inGround ? 1 : 0));
+ var1.setBoolean("player", this.shotByPlayer);
+ var1.setByte("pickup", (byte) this.canBePickedUp);
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ this.xTile = var1.getShort("xTile");
+ this.yTile = var1.getShort("yTile");
+ this.zTile = var1.getShort("zTile");
+ this.inTile = var1.getByte("inTile") & 255;
+ this.inData = var1.getByte("inData") & 255;
+ this.arrowShake = var1.getByte("shake") & 255;
+ this.inGround = var1.getByte("inGround") == 1;
+ this.shotByPlayer = var1.getBoolean("player");
+ this.canBePickedUp = var1.getByte("pickup");
+ }
+
+ /**
+ * Called by a player entity when they collide with an entity
+ */
+ public void onCollideWithPlayer(EntityPlayer var1)
+ {
+ if (!this.worldObj.isRemote && this.inGround && this.arrowShake <= 0)
+ {
+ boolean var2 = this.canBePickedUp == 1 || this.canBePickedUp == 2 && var1.capabilities.isCreativeMode;
+
+ if (this.canBePickedUp == 1 && !var1.inventory.addItemStackToInventory(this.item.copy()))
+ {
+ var2 = false;
+ }
+
+ if (var2)
+ {
+ this.worldObj.playSoundAtEntity(this, "random.pop", 0.2F, ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
+ var1.onItemPickup(this, 1);
+ this.setDead();
+ }
+ }
+ }
+
+ public boolean canBeShot(Entity var1)
+ {
+ return var1 instanceof EntityLiving && (EntityLiving) var1 == this.shooter ? false : var1.canBeCollidedWith() && (!(var1 instanceof EntityLiving) || ((EntityLiving) var1).deathTime <= 0);
+ }
+
+ public boolean onHit()
+ {
+ return true;
+ }
+
+ public boolean onHitTarget(Entity var1)
+ {
+ this.worldObj.playSoundAtEntity(this, "random.drr", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F));
+ return true;
+ }
+
+ public void tickFlying() {}
+
+ public void tickInGround() {}
+
+ public boolean onHitBlock(MovingObjectPosition var1)
+ {
+ return this.onHitBlock();
+ }
+
+ public boolean onHitBlock()
+ {
+ this.worldObj.playSoundAtEntity(this, "random.drr", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F));
+ return true;
+ }
+
+ public float getShadowSize()
+ {
+ return 0.0F;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityProjectileSentry.java b/src/main/java/net/aetherteam/aether/entities/EntityProjectileSentry.java
new file mode 100644
index 0000000..1ef531c
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityProjectileSentry.java
@@ -0,0 +1,52 @@
+package net.aetherteam.aether.entities;
+
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.projectile.EntityThrowable;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.MovingObjectPosition;
+import net.minecraft.world.World;
+
+public class EntityProjectileSentry extends EntityThrowable
+{
+ public EntityLiving victim;
+ public float renderYawOffset;
+ public static int texfxindex = 94;
+
+ public EntityProjectileSentry(World var1)
+ {
+ super(var1);
+ }
+
+ public EntityProjectileSentry(World var1, double var2, double var4, double var6)
+ {
+ super(var1, var2, var4, var6);
+ }
+
+ public EntityProjectileSentry(World var1, double var2, double var4, double var6, EntityLiving var8)
+ {
+ super(var1, var2, var4, var6);
+ }
+
+ public EntityProjectileSentry(World var1, EntityLiving var2)
+ {
+ super(var1, var2);
+ }
+
+ /**
+ * Called when this EntityThrowable hits a block or entity.
+ */
+ protected void onImpact(MovingObjectPosition var1)
+ {
+ if (var1.entityHit == null || var1.entityHit != this.getThrower())
+ {
+ this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 0.5F, false);
+
+ if (var1.entityHit != null)
+ {
+ var1.entityHit.attackEntityFrom(DamageSource.generic.setExplosion(), 2);
+ }
+
+ this.setDead();
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntitySentry.java b/src/main/java/net/aetherteam/aether/entities/EntitySentry.java
new file mode 100644
index 0000000..46e5961
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntitySentry.java
@@ -0,0 +1,379 @@
+package net.aetherteam.aether.entities;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.entities.bosses.EntitySlider;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.pathfinding.PathEntity;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class EntitySentry extends EntityDungeonMob
+{
+ public String dir = "/net/aetherteam/aether/client/sprites";
+
+ /**
+ * Reference to the World object.
+ */
+ private World worldObj;
+ private boolean shouldExplode = false;
+ public float field_100021_a;
+ public float field_100020_b;
+ private int jcount;
+ public int size;
+ public int counter;
+ public int lostyou;
+
+ public EntitySentry(World var1)
+ {
+ super(var1);
+ this.texture = this.dir + "/mobs/sentry/sentry.png";
+ this.size = 2;
+ this.yOffset = 0.0F;
+ this.moveSpeed = 1.0F;
+ this.field_100021_a = 1.0F;
+ this.field_100020_b = 1.0F;
+ this.jcount = this.rand.nextInt(20) + 10;
+ this.func_100019_e(this.size);
+ this.worldObj = var1;
+ }
+
+ public EntitySentry(World var1, double var2, double var4, double var6)
+ {
+ super(var1);
+ this.texture = this.dir + "/mobs/sentry/sentry.png";
+ this.size = 2;
+ this.yOffset = 0.0F;
+ this.moveSpeed = 1.0F;
+ this.field_100021_a = 1.0F;
+ this.field_100020_b = 1.0F;
+ this.jcount = this.rand.nextInt(20) + 10;
+ this.func_100019_e(this.size);
+ this.setPosition(var2, var4, var6);
+ this.worldObj = var1;
+ }
+
+ public void func_100019_e(int var1)
+ {
+ this.setEntityHealth(10);
+ this.width = 0.85F;
+ this.height = 0.85F;
+ this.setPosition(this.posX, this.posY, this.posZ);
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ super.writeEntityToNBT(var1);
+ var1.setInteger("Size", this.size - 1);
+ var1.setInteger("LostYou", this.lostyou);
+ var1.setInteger("Counter", this.counter);
+ var1.setBoolean("Awake", this.getAwake());
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ super.readEntityFromNBT(var1);
+ this.size = var1.getInteger("Size") + 1;
+ this.lostyou = var1.getInteger("LostYou");
+ this.counter = var1.getInteger("Counter");
+ this.setAwake(var1.getBoolean("Awake"));
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ boolean var1 = this.onGround;
+ super.onUpdate();
+
+ if (this.onGround && !var1)
+ {
+ this.worldObj.playSoundAtEntity(this, "mob.slime.small", this.getSoundVolume(), ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F) / 0.8F);
+ } else if (!this.onGround && var1 && this.entityToAttack != null)
+ {
+ this.motionX *= 3.0D;
+ this.motionZ *= 3.0D;
+ }
+
+ if (this.entityToAttack != null && this.entityToAttack.isDead)
+ {
+ this.entityToAttack = null;
+ }
+
+ if (this.shouldExplode && !this.worldObj.isRemote)
+ {
+ this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 0.1F, false);
+ this.setEntityHealth(0);
+ this.setDead();
+ }
+ }
+
+ /**
+ * Called when the entity is attacked.
+ */
+ public boolean attackEntityFrom(DamageSource var1, int var2)
+ {
+ boolean var3 = super.attackEntityFrom(var1, var2);
+
+ if (var3 && var1.getEntity() instanceof EntityLiving)
+ {
+ this.setAwake(true);
+ this.lostyou = 0;
+ this.entityToAttack = var1.getEntity();
+ this.texture = this.dir + "/mobs/sentry/sentry_lit.png";
+ }
+
+ return var3;
+ }
+
+ public void setArrowHeading(double var1, double var3, double var5, float var7, float var8)
+ {
+ float var9 = MathHelper.sqrt_double(var1 * var1 + var3 * var3 + var5 * var5);
+ var1 /= (double) var9;
+ var3 /= (double) var9;
+ var5 /= (double) var9;
+ var1 += this.rand.nextGaussian() * 0.007499999832361937D * (double) var8;
+ var3 += this.rand.nextGaussian() * 0.007499999832361937D * (double) var8;
+ var5 += this.rand.nextGaussian() * 0.007499999832361937D * (double) var8;
+ var1 *= (double) var7;
+ var3 *= (double) var7;
+ var5 *= (double) var7;
+ this.motionX = var1;
+ this.motionY = var3;
+ this.motionZ = var5;
+ float var10 = MathHelper.sqrt_double(var1 * var1 + var5 * var5);
+ this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(var1, var5) * 180.0D / Math.PI);
+ this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(var3, (double) var10) * 180.0D / Math.PI);
+ }
+
+ public void shutdown()
+ {
+ this.counter = -64;
+ this.setAwake(false);
+ this.entityToAttack = null;
+ this.texture = this.dir + "/mobs/sentry/sentry.png";
+ this.setPathToEntity((PathEntity) null);
+ this.moveStrafing = 0.0F;
+ this.moveForward = 0.0F;
+ this.isJumping = false;
+ this.motionX = 0.0D;
+ this.motionZ = 0.0D;
+ }
+
+ /**
+ * Applies a velocity to each of the entities pushing them away from each other. Args: entity
+ */
+ public void applyEntityCollision(Entity var1)
+ {
+ if (!this.worldObj.isRemote && !this.isDead && this.entityToAttack != null && var1 != null && this.entityToAttack == var1)
+ {
+ if (var1 instanceof EntityPlayer && !((EntityPlayer) var1).capabilities.isCreativeMode)
+ {
+ ;
+ }
+
+ if (var1 instanceof EntitySlider)
+ {
+ return;
+ }
+
+ this.shouldExplode = true;
+ var1.attackEntityFrom(DamageSource.causeMobDamage(this), 2);
+
+ if (var1 instanceof EntityLiving)
+ {
+ EntityLiving var2 = (EntityLiving) var1;
+ double var3 = var2.posX - this.posX;
+ double var5;
+
+ for (var5 = var2.posZ - this.posZ; var3 * var3 + var5 * var5 < 1.0E-4D; var5 = (Math.random() - Math.random()) * 0.01D)
+ {
+ var3 = (Math.random() - Math.random()) * 0.01D;
+ }
+
+ if (var1 instanceof EntityPlayerMP)
+ {
+ var2.knockBack(this, 5, -var3, -var5);
+ var2.addVelocity(4.0D, 0.0D, 0.0D);
+ var2.addVelocity(0.0D, 4.0D, 0.0D);
+ var2.addVelocity(0.0D, 0.0D, 4.0D);
+ } else
+ {
+ var2.knockBack(this, 5, -var3, -var5);
+ var2.addVelocity(4.0D, 0.0D, 0.0D);
+ var2.addVelocity(0.0D, 4.0D, 0.0D);
+ var2.addVelocity(0.0D, 0.0D, 4.0D);
+ }
+ }
+
+ float var12 = 0.01745329F;
+
+ for (int var11 = 0; var11 < 40; ++var11)
+ {
+ double var4 = (double) ((float) this.posX + this.rand.nextFloat() * 0.25F);
+ double var6 = (double) ((float) this.posY + 0.5F);
+ double var8 = (double) ((float) this.posZ + this.rand.nextFloat() * 0.25F);
+ float var10 = this.rand.nextFloat() * 360.0F;
+ this.worldObj.spawnParticle("explode", var4, var6, var8, -Math.sin((double) (var12 * var10)) * 0.75D, 0.125D, Math.cos((double) (var12 * var10)) * 0.75D);
+ }
+ }
+ }
+
+ protected void updateEntityActionState()
+ {
+ EntityPlayer var1 = this.worldObj.getClosestPlayerToEntity(this, 8.0D);
+
+ if (!this.getAwake() && this.counter >= 8)
+ {
+ if (var1 != null && this.canEntityBeSeen(var1) && !var1.capabilities.isCreativeMode)
+ {
+ this.faceEntity(var1, 10.0F, 10.0F);
+ this.entityToAttack = var1;
+ this.setAwake(true);
+ this.lostyou = 0;
+ this.texture = this.dir + "/mobs/sentry/sentry_lit.png";
+ }
+
+ this.counter = 0;
+ } else if (this.getAwake() && this.counter >= 8)
+ {
+ if (this.entityToAttack == null)
+ {
+ if (var1 != null && this.canEntityBeSeen(var1))
+ {
+ this.entityToAttack = var1;
+ this.setAwake(true);
+ this.lostyou = 0;
+ } else
+ {
+ ++this.lostyou;
+
+ if (this.lostyou >= 4)
+ {
+ this.shutdown();
+ }
+ }
+ } else if (this.canEntityBeSeen(this.entityToAttack) && this.getDistanceToEntity(this.entityToAttack) < 16.0F)
+ {
+ this.lostyou = 0;
+ } else
+ {
+ ++this.lostyou;
+
+ if (this.lostyou >= 4)
+ {
+ this.shutdown();
+ }
+ }
+
+ this.counter = 0;
+ } else
+ {
+ ++this.counter;
+ }
+
+ if (this.getAwake())
+ {
+ if (this.entityToAttack != null)
+ {
+ this.faceEntity(this.entityToAttack, 10.0F, 10.0F);
+ }
+
+ if (this.onGround && this.jcount-- <= 0)
+ {
+ this.jcount = this.rand.nextInt(20) + 10;
+ this.isJumping = true;
+ this.moveStrafing = 0.5F - this.rand.nextFloat();
+ this.moveForward = 1.0F;
+ this.worldObj.playSoundAtEntity(this, "mob.slime.small", this.getSoundVolume(), ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F) * 0.8F);
+
+ if (this.entityToAttack != null)
+ {
+ this.jcount /= 2;
+ this.moveForward = 1.0F;
+ }
+ } else
+ {
+ this.isJumping = false;
+
+ if (this.onGround)
+ {
+ this.moveStrafing = this.moveForward = 0.0F;
+ }
+ }
+ }
+ }
+
+ /**
+ * Returns the sound this mob makes when it is hurt.
+ */
+ protected String getHurtSound()
+ {
+ return "mob.slime.small";
+ }
+
+ /**
+ * Returns the sound this mob makes on death.
+ */
+ protected String getDeathSound()
+ {
+ return "mob.slime.small";
+ }
+
+ /**
+ * Checks if the entity's current position is a valid location to spawn this entity.
+ */
+ public boolean getCanSpawnHere()
+ {
+ return super.getCanSpawnHere();
+ }
+
+ /**
+ * Returns the volume for the sounds this mob makes.
+ */
+ protected float getSoundVolume()
+ {
+ return 0.6F;
+ }
+
+ /**
+ * Returns the item ID for the item the mob drops on death.
+ */
+ protected int getDropItemId()
+ {
+ return this.rand.nextInt(5) == 0 ? AetherBlocks.LightDungeonStone.blockID : AetherBlocks.DungeonStone.blockID;
+ }
+
+ public void entityInit()
+ {
+ super.entityInit();
+ this.dataWatcher.addObject(16, Byte.valueOf((byte) 0));
+ }
+
+ public boolean getAwake()
+ {
+ return (this.dataWatcher.getWatchableObjectByte(16) & 1) != 0;
+ }
+
+ public void setAwake(boolean var1)
+ {
+ if (var1)
+ {
+ this.dataWatcher.updateObject(16, Byte.valueOf((byte) 1));
+ } else
+ {
+ this.dataWatcher.updateObject(16, Byte.valueOf((byte) 0));
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntitySentryGolem.java b/src/main/java/net/aetherteam/aether/entities/EntitySentryGolem.java
new file mode 100644
index 0000000..9573b2c
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntitySentryGolem.java
@@ -0,0 +1,235 @@
+package net.aetherteam.aether.entities;
+
+import net.aetherteam.aether.entities.ai.AIEntityArrowAttackSentry;
+import net.aetherteam.aether.interfaces.IAetherMob;
+import net.aetherteam.aether.party.Party;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.IRangedAttackMob;
+import net.minecraft.entity.ai.EntityAIHurtByTarget;
+import net.minecraft.entity.ai.EntityAILookIdle;
+import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
+import net.minecraft.entity.ai.EntityAIWatchClosest;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class EntitySentryGolem extends EntityDungeonMob implements IAetherMob, IRangedAttackMob
+{
+ private String bossName;
+ private Party fightingParty;
+ public EntityLiving target;
+ public int timeTilToss = 50;
+ public int tossCoolDown = 25;
+ public float progress = 0.0F;
+ public float sizeBlockThrowing = 0.0F;
+
+ public EntitySentryGolem(World var1)
+ {
+ super(var1);
+ this.setSize(1.0F, 2.0F);
+ this.moveSpeed = 0.25F;
+ this.texture = "/net/aetherteam/aether/client/sprites/mobs/sentrygolem/sentryGolemGreen.png";
+ this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
+ this.tasks.addTask(6, new EntityAILookIdle(this));
+ this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 16.0F, 0, true));
+ this.tasks.addTask(4, new AIEntityArrowAttackSentry(this, this.moveSpeed, 60, 10.0F));
+ this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false));
+ }
+
+ /**
+ * Returns true if the newer Entity AI code should be run
+ */
+ public boolean isAIEnabled()
+ {
+ return true;
+ }
+
+ protected void entityInit()
+ {
+ super.entityInit();
+ this.dataWatcher.addObject(18, new Byte((byte) 2));
+ this.dataWatcher.addObject(19, new Integer(0));
+ }
+
+ public byte getHandState()
+ {
+ return this.dataWatcher.getWatchableObjectByte(18);
+ }
+
+ public void setHandState(byte var1)
+ {
+ this.dataWatcher.updateObject(18, Byte.valueOf(var1));
+ }
+
+ public int getFire()
+ {
+ return this.dataWatcher.getWatchableObjectInt(19);
+ }
+
+ /**
+ * Sets entity to burn for x amount of seconds, cannot lower amount of existing fire.
+ */
+ public void setFire(int var1)
+ {
+ this.dataWatcher.updateObject(19, Integer.valueOf(var1));
+ }
+
+ /**
+ * Returns the sound this mob makes while it's alive.
+ */
+ protected String getLivingSound()
+ {
+ return "aemob.sentryGolem.say";
+ }
+
+ /**
+ * Returns the sound this mob makes when it is hurt.
+ */
+ protected String getHurtSound()
+ {
+ return "aemob.sentryGolem.say";
+ }
+
+ /**
+ * Returns the sound this mob makes on death.
+ */
+ protected String getDeathSound()
+ {
+ return "aemob.sentryGolem.death";
+ }
+
+ /**
+ * Plays step sound at given x, y, z for the entity
+ */
+ protected void playStepSound(int var1, int var2, int var3, int var4)
+ {
+ this.worldObj.playSoundAtEntity(this, "mob.cow.step", 0.15F, 1.0F);
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+
+ if (this.timeTilToss == 50 && this.tossCoolDown == 0 && this.entityToAttack != null)
+ {
+ ;
+ }
+
+ if (this.timeTilToss != 0 && this.tossCoolDown == 0)
+ {
+ --this.timeTilToss;
+ } else if (this.tossCoolDown == 0)
+ {
+ this.timeTilToss = 50;
+ this.tossCoolDown = 25;
+ }
+ }
+
+ /**
+ * Basic mob attack. Default to touch of death in EntityCreature. Overridden by each mob to define their attack.
+ */
+ protected void attackEntity(Entity var1, float var2)
+ {
+ this.target = (EntityLiving) var1;
+
+ if (var2 < 10.0F)
+ {
+ double var3 = var1.posX - this.posX;
+ double var5 = var1.posZ - this.posZ;
+
+ if (this.target != null)
+ {
+ if (this.target.isDead || (double) this.target.getDistanceToEntity(this) > 12.0D)
+ {
+ this.target = null;
+ this.attackTime = 0;
+ }
+
+ if (this.attackTime >= 20 && this.canEntityBeSeen(this.target))
+ {
+ this.attackTime = -10;
+ }
+
+ if (this.attackTime < 20)
+ {
+ this.attackTime += 2;
+ }
+ }
+
+ this.rotationYaw = (float) (Math.atan2(var5, var3) * 180.0D / Math.PI) - 90.0F;
+ }
+ }
+
+ /**
+ * Checks if the entity's current position is a valid location to spawn this entity.
+ */
+ public boolean getCanSpawnHere()
+ {
+ int var1 = MathHelper.floor_double(this.posX);
+ int var2 = MathHelper.floor_double(this.boundingBox.minY);
+ int var3 = MathHelper.floor_double(this.posZ);
+ return this.rand.nextInt(25) == 0 && this.getBlockPathWeight(var1, var2, var3) >= 0.0F && this.worldObj.checkNoEntityCollision(this.boundingBox) && this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).size() == 0 && !this.worldObj.isAnyLiquid(this.boundingBox) && this.worldObj.difficultySetting > 0;
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ super.writeEntityToNBT(var1);
+ var1.setByte("armState", this.getHandState());
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ super.readEntityFromNBT(var1);
+
+ if (var1.hasKey("armState"))
+ {
+ this.setHandState(var1.getByte("armState"));
+ }
+ }
+
+ public int getMaxHealth()
+ {
+ return 20;
+ }
+
+ /**
+ * Attack the specified entity using a ranged attack.
+ */
+ public void attackEntityWithRangedAttack(EntityLiving var1, float var2)
+ {
+ if (this.entityToAttack != null)
+ {
+ double var3 = this.entityToAttack.posX - this.posX;
+ double var5 = this.entityToAttack.posZ - this.posZ;
+ double var7 = Math.sqrt(var3 * var3 + var5 * var5) + (this.posY - this.entityToAttack.posY);
+ double var10000 = var3 * var7;
+ var10000 = var5 * var7;
+ EntityProjectileSentry var9 = new EntityProjectileSentry(this.worldObj, this.posX - 0.25D, this.posY + 2.35D, this.posZ - 0.25D, this);
+ var9.rotationYaw = this.renderYawOffset;
+ var9.renderYawOffset = this.renderYawOffset;
+ var9.rotationPitch = this.rotationPitch;
+ double var10 = this.entityToAttack.posX + this.entityToAttack.motionX - this.posX;
+ double var12 = this.entityToAttack.posY + -this.posY;
+ double var14 = this.entityToAttack.posZ + this.entityToAttack.motionZ - this.posZ;
+ float var16 = MathHelper.sqrt_double(var10 * var10 + var14 * var14);
+
+ if (!this.worldObj.isRemote)
+ {
+ float var17 = var16 * 0.075F;
+ var9.setThrowableHeading(var10, var12 + (double) (var16 * 0.2F), var14, var17, 0.0F);
+ this.worldObj.spawnEntityInWorld(var9);
+ }
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntitySheepuff.java b/src/main/java/net/aetherteam/aether/entities/EntitySheepuff.java
new file mode 100644
index 0000000..8507e17
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntitySheepuff.java
@@ -0,0 +1,300 @@
+package net.aetherteam.aether.entities;
+
+import java.util.Random;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockCloth;
+import net.minecraft.entity.EntityAgeable;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.passive.EntityAnimal;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class EntitySheepuff extends EntityAetherAnimal
+{
+ public static final float[][] fleeceColorTable = new float[][]{{1.0F, 1.0F, 1.0F}, {0.975F, 0.85F, 0.6F}, {0.95F, 0.75F, 0.925F}, {0.8F, 0.85F, 0.975F}, {0.95F, 0.95F, 0.6F}, {0.75F, 0.9F, 0.55F}, {0.975F, 0.85F, 0.9F}, {0.65F, 0.65F, 0.65F}, {0.8F, 0.8F, 0.8F}, {0.65F, 0.8F, 0.85F}, {0.85F, 0.7F, 0.95F}, {0.6F, 0.7F, 0.9F}, {0.75F, 0.7F, 0.65F}, {0.7F, 0.75F, 0.6F}, {0.9F, 0.65F, 0.65F}, {0.55F, 0.55F, 0.55F}};
+ private int amountEaten;
+
+ public EntitySheepuff(World var1)
+ {
+ super(var1);
+ this.texture = this.dir + "/mobs/sheepuff/sheepuff.png";
+ this.setSize(0.9F, 1.3F);
+ this.setFleeceColor(getRandomFleeceColor(this.rand));
+ this.amountEaten = 0;
+ }
+
+ protected void entityInit()
+ {
+ super.entityInit();
+ this.dataWatcher.addObject(16, new Byte((byte) 0));
+ }
+
+ /**
+ * Drop 0-2 items of this living's type. @param par1 - Whether this entity has recently been hit by a player. @param
+ * par2 - Level of Looting used to kill this mob.
+ */
+ protected void dropFewItems(boolean var1, int var2)
+ {
+ if (!this.getSheared())
+ {
+ this.entityDropItem(new ItemStack(Block.cloth.blockID, 1 + this.rand.nextInt(2), this.getFleeceColor()), 0.0F);
+ }
+ }
+
+ public EntityAnimal spawnBabyAnimal(EntityAnimal var1)
+ {
+ return new EntitySheepuff(this.worldObj);
+ }
+
+ public boolean isWheat(ItemStack var1)
+ {
+ return var1.itemID == Item.wheat.itemID;
+ }
+
+ /**
+ * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig.
+ */
+ public boolean interact(EntityPlayer var1)
+ {
+ ItemStack var2 = var1.inventory.getCurrentItem();
+
+ if (var2 != null && this.isWheat(var2))
+ {
+ return super.interact(var1);
+ } else
+ {
+ int var3;
+
+ if (var2 != null && var2.itemID == Item.shears.itemID && !this.getSheared())
+ {
+ if (!this.worldObj.isRemote)
+ {
+ int var4;
+ EntityItem var5;
+
+ if (this.getPuffed())
+ {
+ this.setPuffed(false);
+ var3 = 2 + this.rand.nextInt(3);
+
+ for (var4 = 0; var4 < var3; ++var4)
+ {
+ var5 = this.entityDropItem(new ItemStack(Block.cloth.blockID, 1, this.getFleeceColor()), 1.0F);
+ var5.motionY += (double) (this.rand.nextFloat() * 0.05F);
+ var5.motionX += (double) ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.1F);
+ var5.motionZ += (double) ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.1F);
+ }
+ } else
+ {
+ this.setSheared(true);
+ var3 = 2 + this.rand.nextInt(3);
+
+ for (var4 = 0; var4 < var3; ++var4)
+ {
+ var5 = this.entityDropItem(new ItemStack(Block.cloth.blockID, 1, this.getFleeceColor()), 1.0F);
+ var5.motionY += (double) (this.rand.nextFloat() * 0.05F);
+ var5.motionX += (double) ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.1F);
+ var5.motionZ += (double) ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.1F);
+ }
+ }
+ }
+
+ var2.damageItem(1, var1);
+ }
+
+ if (var2 != null && var2.itemID == Item.dyePowder.itemID && !this.getSheared())
+ {
+ var3 = BlockCloth.getBlockFromDye(var2.getItemDamage());
+
+ if (this.getFleeceColor() != var3)
+ {
+ if (this.getPuffed() && var2.stackSize >= 2)
+ {
+ this.setFleeceColor(var3);
+ var2.stackSize -= 2;
+ } else if (!this.getPuffed())
+ {
+ this.setFleeceColor(var3);
+ --var2.stackSize;
+ }
+ }
+ }
+
+ return false;
+ }
+ }
+
+ /**
+ * Causes this entity to do an upwards motion (jumping).
+ */
+ protected void jump()
+ {
+ if (this.getPuffed())
+ {
+ this.motionY = 1.8D;
+ this.motionX += this.rand.nextGaussian() * 0.5D;
+ this.motionZ += this.rand.nextGaussian() * 0.5D;
+ } else
+ {
+ this.motionY = 0.41999998688697815D;
+ }
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+
+ if (this.getPuffed())
+ {
+ this.fallDistance = 0.0F;
+
+ if (this.motionY < -0.05D)
+ {
+ this.motionY = -0.05D;
+ }
+ }
+
+ if (this.rand.nextInt(100) == 0)
+ {
+ int var1 = MathHelper.floor_double(this.posX);
+ int var2 = MathHelper.floor_double(this.posY);
+ int var3 = MathHelper.floor_double(this.posZ);
+
+ if (this.worldObj.getBlockId(var1, var2 - 1, var3) == Block.grass.blockID)
+ {
+ this.worldObj.setBlock(var1, var2 - 1, var3, Block.dirt.blockID);
+ ++this.amountEaten;
+ }
+ }
+
+ if (this.amountEaten == 5 && !this.getSheared() && !this.getPuffed())
+ {
+ this.setPuffed(true);
+ this.amountEaten = 0;
+ }
+
+ if (this.amountEaten == 10 && this.getSheared() && !this.getPuffed())
+ {
+ this.setSheared(false);
+ this.setFleeceColor(0);
+ this.amountEaten = 0;
+ }
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ super.writeEntityToNBT(var1);
+ var1.setBoolean("Sheared", this.getSheared());
+ var1.setBoolean("Puffed", this.getPuffed());
+ var1.setByte("Color", (byte) this.getFleeceColor());
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ super.readEntityFromNBT(var1);
+ this.setSheared(var1.getBoolean("Sheared"));
+ this.setPuffed(var1.getBoolean("Puffed"));
+ this.setFleeceColor(var1.getByte("Color"));
+ }
+
+ /**
+ * Returns the sound this mob makes while it's alive.
+ */
+ protected String getLivingSound()
+ {
+ return "mob.sheep.say";
+ }
+
+ /**
+ * Returns the sound this mob makes when it is hurt.
+ */
+ protected String getHurtSound()
+ {
+ return "mob.sheep.say";
+ }
+
+ /**
+ * Returns the sound this mob makes on death.
+ */
+ protected String getDeathSound()
+ {
+ return "mob.sheep.say";
+ }
+
+ public int getFleeceColor()
+ {
+ return this.dataWatcher.getWatchableObjectByte(16) & 15;
+ }
+
+ public void setFleeceColor(int var1)
+ {
+ byte var2 = this.dataWatcher.getWatchableObjectByte(16);
+ this.dataWatcher.updateObject(16, Byte.valueOf((byte) (var2 & 240 | var1 & 15)));
+ }
+
+ public boolean getSheared()
+ {
+ return (this.dataWatcher.getWatchableObjectByte(16) & 16) != 0;
+ }
+
+ public void setSheared(boolean var1)
+ {
+ byte var2 = this.dataWatcher.getWatchableObjectByte(16);
+
+ if (var1)
+ {
+ this.dataWatcher.updateObject(16, Byte.valueOf((byte) (var2 | 16)));
+ } else
+ {
+ this.dataWatcher.updateObject(16, Byte.valueOf((byte) (var2 & -17)));
+ }
+ }
+
+ public boolean getPuffed()
+ {
+ return (this.dataWatcher.getWatchableObjectByte(16) & 32) != 0;
+ }
+
+ public void setPuffed(boolean var1)
+ {
+ byte var2 = this.dataWatcher.getWatchableObjectByte(16);
+
+ if (var1)
+ {
+ this.dataWatcher.updateObject(16, Byte.valueOf((byte) (var2 | 32)));
+ } else
+ {
+ this.dataWatcher.updateObject(16, Byte.valueOf((byte) (var2 & -33)));
+ }
+ }
+
+ public static int getRandomFleeceColor(Random var0)
+ {
+ int var1 = var0.nextInt(100);
+ return var1 < 5 ? 3 : (var1 < 10 ? 9 : (var1 < 15 ? 5 : (var1 < 18 ? 6 : (var0.nextInt(500) != 0 ? 0 : 10))));
+ }
+
+ public int getMaxHealth()
+ {
+ return 20;
+ }
+
+ public EntityAgeable createChild(EntityAgeable var1)
+ {
+ return this;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntitySprite.java b/src/main/java/net/aetherteam/aether/entities/EntitySprite.java
new file mode 100644
index 0000000..64abb67
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntitySprite.java
@@ -0,0 +1,194 @@
+package net.aetherteam.aether.entities;
+
+import net.aetherteam.aether.entities.util.Pos;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.monster.EntityMob;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.DamageSource;
+import net.minecraft.world.World;
+
+public class EntitySprite extends EntityMob
+{
+ boolean isAnnoyed = false;
+ Pos targetPos;
+ Entity Holding;
+
+ public EntitySprite(World var1)
+ {
+ super(var1);
+ }
+
+ public void entityInit()
+ {
+ super.entityInit();
+ this.dataWatcher.addObject(16, Byte.valueOf((byte) 0));
+ }
+
+ public boolean isSitting()
+ {
+ return this.dataWatcher.getWatchableObjectByte(16) == 0;
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+
+ if (this.isAnnoyed)
+ {
+ this.setSitting(false);
+ }
+
+ if (this.isSitting())
+ {
+ this.motionX = 0.0D;
+ this.motionZ = 0.0D;
+ this.jumpMovementFactor = 0.0F;
+ this.renderYawOffset = this.rotationPitch = this.rotationYaw = 0.0F;
+ } else if (this.Holding != null)
+ {
+ this.motionY = 0.0D;
+ this.motionX = 0.0D;
+ this.motionZ = 0.0D;
+ boolean var1 = true;
+
+ if ((double) this.targetPos.y > this.posY)
+ {
+ this.motionY = 0.5D;
+ var1 = false;
+ }
+
+ if ((double) this.targetPos.x < this.posX - 4.0D)
+ {
+ this.motionX = 0.5D;
+ var1 = false;
+ }
+
+ if ((double) this.targetPos.x > this.posX + 4.0D)
+ {
+ this.motionX = -0.5D;
+ var1 = false;
+ }
+
+ if ((double) this.targetPos.z < this.posZ - 4.0D)
+ {
+ this.motionZ = 0.5D;
+ var1 = false;
+ }
+
+ if ((double) this.targetPos.z < this.posZ + 4.0D)
+ {
+ this.motionZ = -0.5D;
+ var1 = false;
+ }
+
+ if (var1)
+ {
+ this.Holding.mountEntity(this.Holding);
+ this.Holding = null;
+ this.isAnnoyed = false;
+ this.entityToAttack = null;
+ this.setSitting(true);
+ } else
+ {
+ this.Holding.mountEntity(this);
+ }
+ }
+ }
+
+ Pos findLowestPoint(World var1)
+ {
+ Pos var2 = new Pos((int) this.posX, (int) this.posY + 10, (int) this.posZ);
+ int var3 = 128;
+
+ for (int var4 = (int) this.posX - 8; (double) var4 < this.posX + 8.0D; ++var4)
+ {
+ for (int var5 = (int) this.posX - 8; (double) var5 < this.posX + 8.0D; ++var5)
+ {
+ if (var3 > var1.getHeightValue(var4, var5))
+ {
+ var3 = var1.getHeightValue(var4, var5);
+ var2.x = var4;
+ var2.z = var5;
+ }
+ }
+ }
+
+ if (var3 + 10 > var2.y)
+ {
+ var2.y = var3 + 10;
+ }
+
+ return var2;
+ }
+
+ /**
+ * Basic mob attack. Default to touch of death in EntityCreature. Overridden by each mob to define their attack.
+ */
+ protected void attackEntity(Entity var1, float var2)
+ {
+ EntityLiving var3 = (EntityLiving) var1;
+
+ if (var2 < 1.0F && this.canEntityBeSeen(var3) && this.Holding == null && this.isAnnoyed)
+ {
+ this.targetPos = this.findLowestPoint(this.worldObj);
+ this.Holding = var3;
+ }
+ }
+
+ /**
+ * Called when the entity is attacked.
+ */
+ public boolean attackEntityFrom(DamageSource var1, int var2)
+ {
+ this.isAnnoyed = true;
+ return super.attackEntityFrom(var1, var2);
+ }
+
+ public void setSitting(boolean var1)
+ {
+ if (var1)
+ {
+ this.dataWatcher.updateObject(16, Byte.valueOf((byte) 0));
+ } else
+ {
+ this.dataWatcher.updateObject(16, Byte.valueOf((byte) 1));
+ }
+ }
+
+ /**
+ * Determines if an entity can be despawned, used on idle far away entities
+ */
+ public boolean canDespawn()
+ {
+ return false;
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ super.writeEntityToNBT(var1);
+ this.isAnnoyed = var1.getBoolean("IsAnnoyed");
+ this.setSitting(var1.getBoolean("IsSitting"));
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ super.readEntityFromNBT(var1);
+ var1.setBoolean("IsAnnoyed", this.isAnnoyed);
+ var1.setBoolean("IsSitting", this.isSitting());
+ }
+
+ public int getMaxHealth()
+ {
+ return 10;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityTNTPresent.java b/src/main/java/net/aetherteam/aether/entities/EntityTNTPresent.java
new file mode 100644
index 0000000..b0d2fc8
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityTNTPresent.java
@@ -0,0 +1,114 @@
+package net.aetherteam.aether.entities;
+
+import net.minecraft.entity.Entity;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class EntityTNTPresent extends Entity
+{
+ public int fuse;
+
+ public EntityTNTPresent(World var1)
+ {
+ super(var1);
+ this.fuse = 0;
+ this.preventEntitySpawning = true;
+ this.setSize(0.98F, 0.98F);
+ this.yOffset = this.height / 2.0F;
+ }
+
+ public EntityTNTPresent(World var1, double var2, double var4, double var6)
+ {
+ this(var1);
+ this.setPosition(var2, var4, var6);
+ float var8 = (float) (Math.random() * Math.PI * 2.0D);
+ this.motionX = (double) (-MathHelper.sin(var8 * (float) Math.PI / 180.0F) * 0.02F);
+ this.motionY = 0.20000000298023224D;
+ this.motionZ = (double) (-MathHelper.cos(var8 * (float) Math.PI / 180.0F) * 0.02F);
+ this.fuse = 80;
+ this.prevPosX = var2;
+ this.prevPosY = var4;
+ this.prevPosZ = var6;
+ }
+
+ protected void entityInit() {}
+
+ /**
+ * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to
+ * prevent them from trampling crops
+ */
+ protected boolean canTriggerWalking()
+ {
+ return false;
+ }
+
+ /**
+ * Returns true if other Entities should be prevented from moving through this Entity.
+ */
+ public boolean canBeCollidedWith()
+ {
+ return !this.isDead;
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ this.prevPosX = this.posX;
+ this.prevPosY = this.posY;
+ this.prevPosZ = this.posZ;
+ this.motionY -= 0.03999999910593033D;
+ this.moveEntity(this.motionX, this.motionY, this.motionZ);
+ this.motionX *= 0.9800000190734863D;
+ this.motionY *= 0.9800000190734863D;
+ this.motionZ *= 0.9800000190734863D;
+
+ if (this.onGround)
+ {
+ this.motionX *= 0.699999988079071D;
+ this.motionZ *= 0.699999988079071D;
+ this.motionY *= -0.5D;
+ }
+
+ if (this.fuse-- <= 0)
+ {
+ if (!this.worldObj.isRemote)
+ {
+ this.setDead();
+ this.explode();
+ }
+ } else
+ {
+ this.worldObj.spawnParticle("smoke", this.posX, this.posY + 0.5D, this.posZ, 0.0D, 0.0D, 0.0D);
+ }
+ }
+
+ private void explode()
+ {
+ float var1 = 0.5F;
+ this.worldObj.createExplosion((Entity) null, this.posX, this.posY, this.posZ, var1, false);
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ protected void writeEntityToNBT(NBTTagCompound var1)
+ {
+ var1.setByte("Fuse", (byte) this.fuse);
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ protected void readEntityFromNBT(NBTTagCompound var1)
+ {
+ this.fuse = var1.getByte("Fuse");
+ }
+
+ public float getShadowSize()
+ {
+ return 0.0F;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityTempest.java b/src/main/java/net/aetherteam/aether/entities/EntityTempest.java
new file mode 100644
index 0000000..1251144
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityTempest.java
@@ -0,0 +1,239 @@
+package net.aetherteam.aether.entities;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.monster.IMob;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class EntityTempest extends EntityAetherMob implements IMob
+{
+ public String dir = "/net/aetherteam/aether/client/sprites";
+ private int heightOffsetUpdateTime;
+ private float heightOffset = 1.5F;
+ private int attackTimer;
+ public float sinage;
+ public int timeUntilShoot = 30;
+
+ public EntityTempest(World var1)
+ {
+ super(var1);
+ this.texture = this.dir + "/mobs/tempest/tempest.png";
+ this.setSize(1.25F, 1.5F);
+ this.isImmuneToFire = true;
+ this.attackTime = this.timeUntilShoot;
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+ this.jumpMovementFactor = 0.0F;
+
+ if (this.health > 0)
+ {
+ double var1 = (double) (this.rand.nextFloat() - 0.5F);
+ double var3 = (double) this.rand.nextFloat();
+ double var5 = (double) (this.rand.nextFloat() - 0.5F);
+ double var7 = this.posX + var1 * var3;
+ double var9 = this.boundingBox.minY + var3 - 0.30000001192092896D;
+ double var11 = this.posZ + var5 * var3;
+ this.worldObj.spawnParticle("reddust", var7, var9, var11, 1.0D, 1.0D, 1.0D);
+ }
+
+ if (this.entityToAttack != null)
+ {
+ this.attackEntity(this.entityToAttack, this.getDistanceToEntity(this.entityToAttack));
+ }
+ }
+
+ /**
+ * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons
+ * use this to react to sunlight and start to burn.
+ */
+ public void onLivingUpdate()
+ {
+ if (this.worldObj.isDaytime() && !this.worldObj.isRemote)
+ {
+ this.damageEntity(DamageSource.drown, 1);
+ }
+
+ if (this.attackTimer > 0)
+ {
+ --this.attackTimer;
+ }
+
+ if (!this.worldObj.isRemote)
+ {
+ --this.heightOffsetUpdateTime;
+
+ if (this.heightOffsetUpdateTime <= 0)
+ {
+ this.heightOffsetUpdateTime = 100;
+ this.heightOffset = 1.5F + (float) this.rand.nextGaussian() * 3.0F;
+ }
+
+ if (this.getEntityToAttack() != null && this.getEntityToAttack().posY + (double) this.getEntityToAttack().getEyeHeight() > this.posY + (double) this.getEyeHeight() + (double) this.heightOffset)
+ {
+ this.motionY += (0.700000011920929D - this.motionY) * 0.700000011920929D;
+ }
+ }
+
+ if (!this.onGround && this.motionY < 0.0D)
+ {
+ this.motionY *= 0.8D;
+ }
+
+ if (this.hurtTime > 0)
+ {
+ this.sinage += 0.9F;
+ } else
+ {
+ this.sinage += 0.2F;
+ }
+
+ if (this.sinage > ((float) Math.PI * 2F))
+ {
+ this.sinage -= ((float) Math.PI * 2F);
+ }
+
+ super.onLivingUpdate();
+ }
+
+ /**
+ * Basic mob attack. Default to touch of death in EntityCreature. Overridden by each mob to define their attack.
+ */
+ protected void attackEntity(Entity var1, float var2)
+ {
+ EntityLiving var3 = (EntityLiving) var1;
+
+ if (var2 < 10.0F)
+ {
+ double var4 = var1.posX - this.posX;
+ double var6 = var1.posZ - this.posZ;
+
+ if (var3 != null)
+ {
+ if (var3.isDead || (double) var3.getDistanceToEntity(this) > 12.0D || var3 instanceof EntityNewZephyr || var3 instanceof EntityTempest)
+ {
+ var3 = null;
+ this.entityToAttack = null;
+ return;
+ }
+
+ if (this.attackTime >= this.timeUntilShoot)
+ {
+ this.shootTarget(var3);
+ }
+
+ if (this.attackTime >= this.timeUntilShoot && this.canEntityBeSeen(var3))
+ {
+ this.attackTime = -10;
+ }
+
+ if (this.attackTime < this.timeUntilShoot)
+ {
+ ++this.attackTime;
+ }
+ }
+
+ this.rotationYaw = (float) (Math.atan2(var6, var4) * 180.0D / Math.PI) - 90.0F;
+ }
+ }
+
+ public void shootTarget(EntityLiving var1)
+ {
+ if (this.worldObj.difficultySetting != 0)
+ {
+ double var2 = var1.posX - this.posX;
+ double var4 = var1.boundingBox.minY + (double) (var1.height / 2.0F) - (this.posY + (double) (this.height / 2.0F));
+ double var6 = var1.posZ - this.posZ;
+ double var8 = var1.posX - this.posX;
+ double var10 = var1.posZ - this.posZ;
+ double var12 = 1.5D / Math.sqrt(var8 * var8 + var10 * var10 + 0.1D);
+ double var14 = 0.1D + Math.sqrt(var8 * var8 + var10 * var10 + 0.1D) * 0.5D + (this.posY - var1.posY) * 0.25D;
+ double var10000 = var8 * var12;
+ var10000 = var10 * var12;
+ EntityTempestBall var16 = new EntityTempestBall(this.worldObj, this, var2, var4, var6);
+ var16.posY = this.posY + 1.0D;
+ this.worldObj.playSoundAtEntity(this, "aemob.zephyr.shoot", 2.0F, (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F);
+
+ if (!this.worldObj.isRemote)
+ {
+ this.worldObj.spawnEntityInWorld(var16);
+ }
+ }
+ }
+
+ /**
+ * Called when the mob is falling. Calculates and applies fall damage.
+ */
+ protected void fall(float var1)
+ {}
+
+ /**
+ * Causes this entity to do an upwards motion (jumping).
+ */
+ protected void jump()
+ {}
+
+ public int getMaxHealth()
+ {
+ return 15;
+ }
+
+ /**
+ * Returns the sound this mob makes while it's alive.
+ */
+ protected String getLivingSound()
+ {
+ return "aemob.zephyr.say";
+ }
+
+ /**
+ * Returns the sound this mob makes when it is hurt.
+ */
+ protected String getHurtSound()
+ {
+ return "aemob.zephyr.say";
+ }
+
+ /**
+ * Returns the sound this mob makes on death.
+ */
+ protected String getDeathSound()
+ {
+ return "aemob.zephyr.say";
+ }
+
+ /**
+ * Determines if an entity can be despawned, used on idle far away entities
+ */
+ public boolean canDespawn()
+ {
+ return true;
+ }
+
+ /**
+ * Checks if the entity's current position is a valid location to spawn this entity.
+ */
+ public boolean getCanSpawnHere()
+ {
+ int var1 = MathHelper.floor_double(this.posX);
+ int var2 = MathHelper.floor_double(this.boundingBox.minY);
+ int var3 = MathHelper.floor_double(this.posZ);
+ return this.rand.nextInt(25) == 0 && this.getBlockPathWeight(var1, var2, var3) >= 0.0F && this.worldObj.checkNoEntityCollision(this.boundingBox) && this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).size() == 0 && !this.worldObj.isAnyLiquid(this.boundingBox) && this.worldObj.getBlockId(var1, var2 - 1, var3) != AetherBlocks.DungeonStone.blockID && this.worldObj.getBlockId(var1, var2 - 1, var3) != AetherBlocks.LightDungeonStone.blockID && this.worldObj.getBlockId(var1, var2 - 1, var3) != AetherBlocks.LockedDungeonStone.blockID && this.worldObj.getBlockId(var1, var2 - 1, var3) != AetherBlocks.LockedLightDungeonStone.blockID && this.worldObj.getBlockId(var1, var2 - 1, var3) != AetherBlocks.Holystone.blockID && this.worldObj.difficultySetting > 0 && !this.worldObj.isDaytime();
+ }
+
+ /**
+ * Will return how many at most can spawn in a chunk at once.
+ */
+ public int getMaxSpawnedInChunk()
+ {
+ return 1;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityTempestBall.java b/src/main/java/net/aetherteam/aether/entities/EntityTempestBall.java
new file mode 100644
index 0000000..d2bbe1d
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityTempestBall.java
@@ -0,0 +1,335 @@
+package net.aetherteam.aether.entities;
+
+import cpw.mods.fml.common.registry.IThrowableEntity;
+
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.MovingObjectPosition;
+import net.minecraft.util.Vec3;
+import net.minecraft.world.World;
+
+public class EntityTempestBall extends EntityLiving implements IThrowableEntity
+{
+ public String dir = "/net/aetherteam/aether/client/sprites";
+ public float[] sinage = new float[3];
+ private static final double topSpeed = 0.125D;
+ private static final float sponge = (180F / (float) Math.PI);
+ public Random random = new Random();
+ private int xTile = -1;
+ private int yTile = -1;
+ private int zTile = -1;
+ private int inTile = 0;
+ protected boolean inGround = false;
+ public int field_9406_a = 0;
+ protected EntityLiving shootingEntity;
+ private int ticksAlive;
+ private int ticksInAir = 0;
+ public double accelerationX;
+ public double accelerationY;
+ public double accelerationZ;
+
+ public EntityTempestBall(World var1)
+ {
+ super(var1);
+ this.setSize(0.25F, 0.25F);
+ }
+
+ public EntityTempestBall(World var1, EntityLiving var2, double var3, double var5, double var7)
+ {
+ super(var1);
+ this.shootingEntity = var2;
+ this.setSize(0.25F, 0.25F);
+ this.setLocationAndAngles(var2.posX, var2.posY, var2.posZ, var2.rotationYaw, var2.rotationPitch);
+ this.setPositionAndRotation(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
+ this.yOffset = 0.0F;
+ this.motionX = this.motionY = this.motionZ = 0.0D;
+ var3 += this.rand.nextGaussian() * 0.4D;
+ var5 += this.rand.nextGaussian() * 0.4D;
+ var7 += this.rand.nextGaussian() * 0.4D;
+ double var9 = (double) MathHelper.sqrt_double(var3 * var3 + var5 * var5 + var7 * var7);
+ this.accelerationX = var3 / var9 * 0.08000000000000002D;
+ this.accelerationY = var5 / var9 * 0.08000000000000002D;
+ this.accelerationZ = var7 / var9 * 0.08000000000000002D;
+ }
+
+ public void updateAnims()
+ {
+ for (int var1 = 0; var1 < 3; ++var1)
+ {
+ this.sinage[var1] += 0.3F + (float) var1 * 0.13F;
+
+ if (this.sinage[var1] > ((float) Math.PI * 2F))
+ {
+ this.sinage[var1] -= ((float) Math.PI * 2F);
+ }
+ }
+ }
+
+ /**
+ * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons
+ * use this to react to sunlight and start to burn.
+ */
+ public void onLivingUpdate()
+ {}
+
+ /**
+ * Gets called every tick from main Entity class
+ */
+ public void onEntityUpdate()
+ {
+ super.onEntityUpdate();
+ this.updateAnims();
+
+ if (this.motionX * this.motionY * this.motionZ < 0.1D && this.ticksInAir > 40 && !this.worldObj.isRemote)
+ {
+ this.setDead();
+ }
+
+ if (this.ticksInAir > 200 && !this.worldObj.isRemote)
+ {
+ this.setDead();
+ }
+
+ if (this.field_9406_a > 0)
+ {
+ --this.field_9406_a;
+ }
+
+ if (this.inGround)
+ {
+ int var1 = this.worldObj.getBlockId(this.xTile, this.yTile, this.zTile);
+
+ if (var1 == this.inTile)
+ {
+ ++this.ticksAlive;
+ return;
+ }
+
+ this.inGround = false;
+ this.motionX *= (double) (this.rand.nextFloat() * 0.2F);
+ this.motionY *= (double) (this.rand.nextFloat() * 0.2F);
+ this.motionZ *= (double) (this.rand.nextFloat() * 0.2F);
+ this.ticksAlive = 0;
+ this.ticksInAir = 0;
+ } else
+ {
+ ++this.ticksInAir;
+ }
+
+ Vec3 var15 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
+ Vec3 var2 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
+ MovingObjectPosition var3 = this.worldObj.rayTraceBlocks(var15, var2);
+ var15 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
+ var2 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
+
+ if (var3 != null)
+ {
+ var2 = Vec3.createVectorHelper(var3.hitVec.xCoord, var3.hitVec.yCoord, var3.hitVec.zCoord);
+ }
+
+ Entity var4 = null;
+ List var5 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D));
+ double var6 = 0.0D;
+
+ for (int var8 = 0; var8 < var5.size(); ++var8)
+ {
+ Entity var9 = (Entity) var5.get(var8);
+
+ if (var9.canBeCollidedWith() && (var9 != this.shootingEntity || this.ticksInAir >= 25))
+ {
+ float var10 = 0.3F;
+ AxisAlignedBB var11 = var9.boundingBox.expand((double) var10, (double) var10, (double) var10);
+ MovingObjectPosition var12 = var11.calculateIntercept(var15, var2);
+
+ if (var12 != null)
+ {
+ double var13 = var15.distanceTo(var12.hitVec);
+
+ if (var13 < var6 || var6 == 0.0D)
+ {
+ var4 = var9;
+ var6 = var13;
+ }
+ }
+ }
+ }
+
+ if (var4 != null)
+ {
+ var3 = new MovingObjectPosition(var4);
+ }
+
+ if (var3 != null)
+ {
+ if (var3.entityHit != null && var3.entityHit != this.shootingEntity)
+ {
+ if (var3.entityHit instanceof EntityPlayer && ((EntityPlayer) var3.entityHit).inventory.armorInventory[0] != null && ((EntityPlayer) var3.entityHit).inventory.armorInventory[0].itemID == AetherItems.SentryBoots.itemID)
+ {
+ this.setDead();
+ } else if (var3.entityHit instanceof EntityPlayer && ((EntityPlayer) var3.entityHit).capabilities.isCreativeMode)
+ {
+ this.setDead();
+ }
+ }
+
+ EntityColdLightningBolt var18 = new EntityColdLightningBolt(this.worldObj, this.posX, this.posY, this.posZ);
+ var18.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, 0.0F);
+ this.worldObj.spawnEntityInWorld(var18);
+
+ if (!this.worldObj.isRemote)
+ {
+ this.setDead();
+ }
+ }
+
+ this.posX += this.motionX;
+ this.posY += this.motionY;
+ this.posZ += this.motionZ;
+ float var17 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
+ this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
+
+ for (this.rotationPitch = (float) (Math.atan2(this.motionY, (double) var17) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F)
+ {
+ ;
+ }
+
+ while (this.rotationPitch - this.prevRotationPitch >= 180.0F)
+ {
+ this.prevRotationPitch += 360.0F;
+ }
+
+ while (this.rotationYaw - this.prevRotationYaw < -180.0F)
+ {
+ this.prevRotationYaw -= 360.0F;
+ }
+
+ while (this.rotationYaw - this.prevRotationYaw >= 180.0F)
+ {
+ this.prevRotationYaw += 360.0F;
+ }
+
+ this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F;
+ this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F;
+ float var16 = 0.95F;
+
+ if (this.handleWaterMovement())
+ {
+ for (int var20 = 0; var20 < 4; ++var20)
+ {
+ float var19 = 0.25F;
+ this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double) var19, this.posY - this.motionY * (double) var19, this.posZ - this.motionZ * (double) var19, this.motionX, this.motionY, this.motionZ);
+ }
+
+ var16 = 0.8F;
+ }
+
+ this.motionX += this.accelerationX;
+ this.motionY += this.accelerationY;
+ this.motionZ += this.accelerationZ;
+ this.motionX *= (double) var16;
+ this.motionY *= (double) var16;
+ this.motionZ *= (double) var16;
+ this.worldObj.spawnParticle("smoke", this.posX, this.posY + 0.5D, this.posZ, 0.0D, 0.0D, 0.0D);
+ this.setPositionAndRotation(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ var1.setShort("xTile", (short) this.xTile);
+ var1.setShort("yTile", (short) this.yTile);
+ var1.setShort("zTile", (short) this.zTile);
+ var1.setByte("inTile", (byte) this.inTile);
+ var1.setByte("shake", (byte) this.field_9406_a);
+ var1.setByte("inGround", (byte) (this.inGround ? 1 : 0));
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ this.xTile = var1.getShort("xTile");
+ this.yTile = var1.getShort("yTile");
+ this.zTile = var1.getShort("zTile");
+ this.inTile = var1.getByte("inTile") & 255;
+ this.field_9406_a = var1.getByte("shake") & 255;
+ this.inGround = var1.getByte("inGround") == 1;
+ }
+
+ public float getCollisionBorderSize()
+ {
+ return 0.25F;
+ }
+
+ /**
+ * Called when the entity is attacked.
+ */
+ public boolean attackEntityFrom(DamageSource var1, int var2)
+ {
+ this.setBeenAttacked();
+
+ if (var1.getEntity() == null)
+ {
+ return false;
+ } else
+ {
+ Vec3 var3 = var1.getEntity().getLookVec();
+
+ if (var3 != null)
+ {
+ this.motionX = var3.xCoord;
+ this.motionY = var3.yCoord;
+ this.motionZ = var3.zCoord;
+ this.accelerationX = this.motionX * 0.1D;
+ this.accelerationY = this.motionY * 0.1D;
+ this.accelerationZ = this.motionZ * 0.1D;
+
+ for (int var4 = 0; var4 < 10; ++var4)
+ {
+ double var5 = this.rand.nextGaussian() * 0.02D;
+ double var7 = this.rand.nextGaussian() * 0.02D;
+ double var9 = this.rand.nextGaussian() * 0.02D;
+ double var11 = 5.0D;
+ this.shootingEntity.worldObj.spawnParticle("flame", this.shootingEntity.posX + (double) (this.rand.nextFloat() * this.shootingEntity.width * 2.0F) - (double) this.shootingEntity.width - var5 * var11, this.shootingEntity.posY + (double) (this.rand.nextFloat() * (this.shootingEntity.height - 0.6F)) - var7 * var11, this.shootingEntity.posZ + (double) (this.rand.nextFloat() * this.shootingEntity.width * 2.0F) - (double) this.shootingEntity.width - var9 * var11, var5, var7, var9);
+ this.shootingEntity.worldObj.spawnParticle("largeexplode", this.shootingEntity.posX + (double) (this.rand.nextFloat() * this.shootingEntity.width * 2.0F) - (double) this.shootingEntity.width - var5 * var11, this.shootingEntity.posY + (double) (this.rand.nextFloat() * (this.shootingEntity.height - 0.6F)) - var7 * var11, this.shootingEntity.posZ + (double) (this.rand.nextFloat() * this.shootingEntity.width * 2.0F) - (double) this.shootingEntity.width - var9 * var11, var5, var7, var9);
+ }
+
+ this.shootingEntity.attackEntityFrom(var1, 2);
+ }
+
+ return true;
+ }
+ }
+
+ public float getShadowSize()
+ {
+ return 0.0F;
+ }
+
+ public Entity getThrower()
+ {
+ return this.shootingEntity;
+ }
+
+ public void setThrower(Entity var1)
+ {
+ this.shootingEntity = (EntityLiving) var1;
+ }
+
+ public int getMaxHealth()
+ {
+ return 0;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityTrackingGolem.java b/src/main/java/net/aetherteam/aether/entities/EntityTrackingGolem.java
new file mode 100644
index 0000000..89c27f8
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityTrackingGolem.java
@@ -0,0 +1,177 @@
+package net.aetherteam.aether.entities;
+
+import net.aetherteam.aether.AetherNameGen;
+import net.aetherteam.aether.interfaces.IAetherMob;
+import net.aetherteam.aether.party.Party;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.potion.Potion;
+import net.minecraft.potion.PotionEffect;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class EntityTrackingGolem extends EntityDungeonMob implements IAetherMob
+{
+ private String bossName = AetherNameGen.gen();
+ private Party fightingParty;
+ private static final int START = 0;
+ private static final int MIDDLE = 1;
+ private static final int END = 2;
+
+ public EntityTrackingGolem(World var1)
+ {
+ super(var1);
+ this.setSize(1.0F, 2.0F);
+ this.moveSpeed = 1.2F;
+
+ if (!this.getSeenEnemy())
+ {
+ this.texture = "/net/aetherteam/aether/client/sprites/mobs/sentrygolem/sentryGolem.png";
+ } else
+ {
+ this.texture = "/net/aetherteam/aether/client/sprites/mobs/sentrygolem/sentryGolem_red.png";
+ }
+ }
+
+ public void entityInit()
+ {
+ super.entityInit();
+ this.dataWatcher.addObject(16, Byte.valueOf((byte) 0));
+ }
+
+ public boolean getSeenEnemy()
+ {
+ return this.dataWatcher.getWatchableObjectByte(16) == 1;
+ }
+
+ public void setSeenEnemy(boolean var1)
+ {
+ if (var1)
+ {
+ this.worldObj.playSoundAtEntity(this, "aemob.sentryGolem.seenEnemy", 5.0F, this.rand.nextFloat() * 0.4F + 0.8F);
+ this.dataWatcher.updateObject(16, Byte.valueOf((byte) 1));
+ } else
+ {
+ this.dataWatcher.updateObject(16, Byte.valueOf((byte) 0));
+ }
+ }
+
+ /**
+ * Returns the sound this mob makes while it's alive.
+ */
+ protected String getLivingSound()
+ {
+ return "aemob.sentryGolem.say";
+ }
+
+ /**
+ * Returns the sound this mob makes when it is hurt.
+ */
+ protected String getHurtSound()
+ {
+ return "aemob.sentryGolem.say";
+ }
+
+ /**
+ * Returns the sound this mob makes on death.
+ */
+ protected String getDeathSound()
+ {
+ return "aemob.sentryGolem.death";
+ }
+
+ /**
+ * Plays step sound at given x, y, z for the entity
+ */
+ protected void playStepSound(int var1, int var2, int var3, int var4)
+ {
+ this.worldObj.playSoundAtEntity(this, "mob.cow.step", 0.15F, 1.0F);
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+ EntityPlayer var1 = this.worldObj.getClosestPlayerToEntity(this, 8.0D);
+
+ if (this.entityToAttack == null && var1 != null && this.canEntityBeSeen(var1) && !var1.isDead && !var1.capabilities.isCreativeMode)
+ {
+ this.entityToAttack = var1;
+ var1.faceEntity(this, 3.5F, (float) var1.getVerticalFaceSpeed());
+ }
+
+ if (this.entityToAttack != null && this.entityToAttack instanceof EntityLiving && this.canEntityBeSeen(this.entityToAttack) && !this.entityToAttack.isDead)
+ {
+ ((EntityLiving) this.entityToAttack).faceEntity(this, 3.5F, (float) ((EntityLiving) this.entityToAttack).getVerticalFaceSpeed());
+ this.faceEntity(this.entityToAttack, 10.0F, 10.0F);
+
+ if (!this.getSeenEnemy())
+ {
+ this.setSeenEnemy(true);
+ }
+
+ if (!this.worldObj.isRemote)
+ {
+ ((EntityLiving) this.entityToAttack).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 10, 3));
+ ((EntityLiving) this.entityToAttack).addPotionEffect(new PotionEffect(Potion.confusion.id, 100, 3));
+ }
+ } else
+ {
+ this.entityToAttack = null;
+ this.setSeenEnemy(false);
+ }
+
+ if (!this.getSeenEnemy())
+ {
+ this.texture = "/net/aetherteam/aether/client/sprites/mobs/sentrygolem/sentryGolem.png";
+ } else
+ {
+ this.texture = "/net/aetherteam/aether/client/sprites/mobs/sentrygolem/sentryGolem_red.png";
+ }
+ }
+
+ /**
+ * Checks if the entity's current position is a valid location to spawn this entity.
+ */
+ public boolean getCanSpawnHere()
+ {
+ int var1 = MathHelper.floor_double(this.posX);
+ int var2 = MathHelper.floor_double(this.boundingBox.minY);
+ int var3 = MathHelper.floor_double(this.posZ);
+ return this.rand.nextInt(25) == 0 && this.getBlockPathWeight(var1, var2, var3) >= 0.0F && this.worldObj.checkNoEntityCollision(this.boundingBox) && this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).size() == 0 && !this.worldObj.isAnyLiquid(this.boundingBox) && this.worldObj.difficultySetting > 0;
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ super.writeEntityToNBT(var1);
+ var1.setBoolean("seen", this.getSeenEnemy());
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ super.readEntityFromNBT(var1);
+ this.setSeenEnemy(var1.getBoolean("seen"));
+ }
+
+ /**
+ * Returns the texture's file path as a String.
+ */
+ public String getTexture()
+ {
+ return !this.getSeenEnemy() ? (this.texture = "/net/aetherteam/aether/client/sprites/mobs/sentrygolem/sentryGolem.png") : (this.texture = "/net/aetherteam/aether/client/sprites/mobs/sentrygolem/sentryGolem_red.png");
+ }
+
+ public int getMaxHealth()
+ {
+ return 20;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityValkyrie.java b/src/main/java/net/aetherteam/aether/entities/EntityValkyrie.java
new file mode 100644
index 0000000..9ff444c
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityValkyrie.java
@@ -0,0 +1,712 @@
+package net.aetherteam.aether.entities;
+
+import net.aetherteam.aether.AetherNameGen;
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.enums.EnumBossType;
+import net.aetherteam.aether.interfaces.IAetherBoss;
+import net.aetherteam.aether.items.AetherItems;
+import net.aetherteam.aether.oldcode.EntityHomeShot;
+import net.minecraft.block.Block;
+import net.minecraft.client.Minecraft;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.NBTTagDouble;
+import net.minecraft.nbt.NBTTagList;
+import net.minecraft.pathfinding.PathEntity;
+import net.minecraft.src.ModLoader;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class EntityValkyrie extends EntityDungeonMob implements IAetherBoss
+{
+ private String optPrefix;
+ public boolean hasMet;
+ public boolean talking;
+ public boolean isSwinging;
+ public boolean boss;
+ public boolean duel;
+ public boolean hasDungeon;
+ public int teleTimer;
+ public int angerLevel;
+ public int timeLeft;
+ public int chatTime;
+ public int dungeonX;
+ public int dungeonY;
+ public int dungeonZ;
+ public int dungeonEntranceZ;
+ public double safeX;
+ public double safeY;
+ public double safeZ;
+ public float sinage;
+ public double lastMotionY;
+ public String name;
+ Minecraft mc = ModLoader.getMinecraftInstance();
+
+ public EntityValkyrie(World var1)
+ {
+ super(var1);
+ this.setSize(0.8F, 1.6F);
+ this.texture = "/aether/mobs/valkyrie.png";
+ this.teleTimer = this.rand.nextInt(250);
+ this.health = 50;
+ this.moveSpeed = 0.5F;
+ this.timeLeft = 1200;
+ this.attackStrength = 7;
+ this.safeX = this.posX;
+ this.safeY = this.posY;
+ this.safeZ = this.posZ;
+ }
+
+ public EntityValkyrie(World var1, double var2, double var4, double var6, boolean var8)
+ {
+ super(var1);
+
+ if (var8)
+ {
+ this.texture = "/aether/mobs/valkyrie2.png";
+ this.health = 500;
+ this.boss = true;
+ } else
+ {
+ this.texture = "/aether/mobs/valkyrie.png";
+ this.health = 50;
+ }
+
+ this.setSize(0.8F, 1.6F);
+ this.name = AetherNameGen.valkGen();
+ this.teleTimer = this.rand.nextInt(250);
+ this.moveSpeed = 0.5F;
+ this.timeLeft = 1200;
+ this.attackStrength = 7;
+ this.safeX = this.posX = var2;
+ this.safeY = this.posY = var4;
+ this.safeZ = this.posZ = var6;
+ this.hasDungeon = false;
+ }
+
+ public void swingArm()
+ {
+ if (!this.isSwinging)
+ {
+ this.isSwinging = true;
+ this.prevSwingProgress = 0.0F;
+ this.swingProgress = 0.0F;
+ }
+ }
+
+ private void becomeAngryAt(Entity var1)
+ {
+ this.entityToAttack = var1;
+ this.angerLevel = 200 + this.rand.nextInt(200);
+
+ if (this.boss)
+ {
+ for (int var2 = this.dungeonZ + 2; var2 < this.dungeonZ + 23; var2 += 7)
+ {
+ if (this.worldObj.getBlockId(this.dungeonX - 1, this.dungeonY, var2) == 0)
+ {
+ this.dungeonEntranceZ = var2;
+ this.worldObj.setBlock(this.dungeonX - 1, this.dungeonY, var2, AetherBlocks.LockedDungeonStone.blockID, 1, 4);
+ this.worldObj.setBlock(this.dungeonX - 1, this.dungeonY, var2 + 1, AetherBlocks.LockedDungeonStone.blockID, 1, 4);
+ this.worldObj.setBlock(this.dungeonX - 1, this.dungeonY + 1, var2 + 1, AetherBlocks.LockedDungeonStone.blockID, 1, 4);
+ this.worldObj.setBlock(this.dungeonX - 1, this.dungeonY + 1, var2, AetherBlocks.LockedDungeonStone.blockID, 1, 4);
+ return;
+ }
+ }
+ }
+ }
+
+ public void setDungeon(int var1, int var2, int var3)
+ {
+ this.hasDungeon = true;
+ this.dungeonX = var1;
+ this.dungeonY = var2;
+ this.dungeonZ = var3;
+ }
+
+ private void unlockDoor()
+ {
+ this.worldObj.setBlock(this.dungeonX - 1, this.dungeonY, this.dungeonEntranceZ, 0);
+ this.worldObj.setBlock(this.dungeonX - 1, this.dungeonY, this.dungeonEntranceZ + 1, 0);
+ this.worldObj.setBlock(this.dungeonX - 1, this.dungeonY + 1, this.dungeonEntranceZ + 1, 0);
+ this.worldObj.setBlock(this.dungeonX - 1, this.dungeonY + 1, this.dungeonEntranceZ, 0);
+ }
+
+ private void unlockTreasure()
+ {
+ this.worldObj.setBlock(this.dungeonX + 16, this.dungeonY + 1, this.dungeonZ + 9, Block.trapdoor.blockID, 3, 4);
+ this.worldObj.setBlock(this.dungeonX + 17, this.dungeonY + 1, this.dungeonZ + 9, Block.trapdoor.blockID, 2, 4);
+ this.worldObj.setBlock(this.dungeonX + 16, this.dungeonY + 1, this.dungeonZ + 10, Block.trapdoor.blockID, 3, 4);
+ this.worldObj.setBlock(this.dungeonX + 17, this.dungeonY + 1, this.dungeonZ + 10, Block.trapdoor.blockID, 2, 4);
+
+ for (int var1 = this.dungeonX - 26; var1 < this.dungeonX + 29; ++var1)
+ {
+ for (int var2 = this.dungeonY - 1; var2 < this.dungeonY + 22; ++var2)
+ {
+ for (int var3 = this.dungeonZ - 5; var3 < this.dungeonZ + 25; ++var3)
+ {
+ int var4 = this.worldObj.getBlockId(var1, var2, var3);
+
+ if (var4 == AetherBlocks.LockedDungeonStone.blockID)
+ {
+ this.worldObj.setBlock(var1, var2, var3, AetherBlocks.DungeonStone.blockID, this.worldObj.getBlockMetadata(var1, var2, var3), 4);
+ }
+
+ if (var4 == AetherBlocks.Trap.blockID)
+ {
+ this.worldObj.setBlock(var1, var2, var3, AetherBlocks.DungeonStone.blockID, this.worldObj.getBlockMetadata(var1, var2, var3), 4);
+ }
+
+ if (var4 == AetherBlocks.LockedLightDungeonStone.blockID)
+ {
+ this.worldObj.setBlock(var1, var2, var3, AetherBlocks.LightDungeonStone.blockID, this.worldObj.getBlockMetadata(var1, var2, var3), 4);
+ }
+ }
+ }
+ }
+ }
+
+ private void chatItUp(String var1)
+ {
+ if (this.chatTime <= 0 && this.otherDimension())
+ {
+ this.chatTime = 60;
+ }
+ }
+
+ public void teleport(double var1, double var3, double var5, int var7)
+ {
+ int var8 = this.rand.nextInt(var7 + 1);
+ int var9 = this.rand.nextInt(var7 / 2);
+ int var10 = var7 - var8;
+ var8 *= this.rand.nextInt(2) * 2 - 1;
+ var9 *= this.rand.nextInt(2) * 2 - 1;
+ var10 *= this.rand.nextInt(2) * 2 - 1;
+ var1 += (double) var8;
+ var3 += (double) var9;
+ var5 += (double) var10;
+ int var11 = (int) Math.floor(var1 - 0.5D);
+ int var12 = (int) Math.floor(var3 - 0.5D);
+ int var13 = (int) Math.floor(var5 - 0.5D);
+ boolean var14 = false;
+
+ for (int var15 = 0; var15 < 32 && !var14; ++var15)
+ {
+ int var16 = var11 + (this.rand.nextInt(var7 / 2) - this.rand.nextInt(var7 / 2));
+ int var17 = var12 + (this.rand.nextInt(var7 / 2) - this.rand.nextInt(var7 / 2));
+ int var18 = var13 + (this.rand.nextInt(var7 / 2) - this.rand.nextInt(var7 / 2));
+
+ if (var17 <= 124 && var17 >= 5 && this.isAirySpace(var16, var17, var18) && this.isAirySpace(var16, var17 + 1, var18) && !this.isAirySpace(var16, var17 - 1, var18) && (!this.hasDungeon || var16 > this.dungeonX && var16 < this.dungeonX + 20 && var17 > this.dungeonY && var17 < this.dungeonY + 12 && var18 > this.dungeonZ && var18 < this.dungeonZ + 20))
+ {
+ var11 = var16;
+ var12 = var17;
+ var13 = var18;
+ var14 = true;
+ }
+ }
+
+ if (!var14)
+ {
+ this.teleFail();
+ } else
+ {
+ this.spawnExplosionParticle();
+ this.setPosition((double) var11 + 0.5D, (double) var12 + 0.5D, (double) var13 + 0.5D);
+ this.motionX = 0.0D;
+ this.motionY = 0.0D;
+ this.motionZ = 0.0D;
+ this.moveForward = 0.0F;
+ this.moveStrafing = 0.0F;
+ this.isJumping = false;
+ this.rotationPitch = 0.0F;
+ this.rotationYaw = 0.0F;
+ this.setPathToEntity((PathEntity) null);
+ this.renderYawOffset = this.rand.nextFloat() * 360.0F;
+ this.spawnExplosionParticle();
+ this.teleTimer = this.rand.nextInt(40);
+ }
+ }
+
+ public void makeHomeShot(int var1, EntityLiving var2)
+ {
+ for (int var3 = 0; var3 < var1; ++var3)
+ {
+ EntityHomeShot var4 = new EntityHomeShot(this.worldObj, this.posX - this.motionX / 2.0D, this.posY, this.posZ - this.motionZ / 2.0D, var2);
+ this.worldObj.spawnEntityInWorld(var4);
+ }
+ }
+
+ public void teleFail()
+ {
+ this.teleTimer -= this.rand.nextInt(40) + 40;
+
+ if (this.posY <= 0.0D)
+ {
+ this.teleTimer = 446;
+ }
+ }
+
+ /**
+ * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig.
+ */
+ public boolean interact(EntityPlayer var1)
+ {
+ if (!this.duel && !this.talking && this.boss)
+ {
+ ;
+ }
+
+ if (!this.hasMet)
+ {
+ this.hasMet = true;
+ }
+
+ return true;
+ }
+
+ public void updateEntityActionState()
+ {
+ if (this.talking)
+ {
+ this.moveStrafing = 0.0F;
+ this.motionY *= 0.5D;
+ this.moveForward = 0.0F;
+ this.faceEntity(this.mc.thePlayer, 15.0F, 180.0F);
+ } else
+ {
+ super.updateEntityActionState();
+ ++this.teleTimer;
+
+ if (this.teleTimer >= 450)
+ {
+ if (this.entityToAttack != null)
+ {
+ if (this.boss && this.onGround && this.rand.nextInt(2) == 0 && this.entityToAttack != null && this.entityToAttack instanceof EntityLiving)
+ {
+ this.makeHomeShot(1, (EntityLiving) this.entityToAttack);
+ this.teleTimer = -100;
+ } else
+ {
+ this.teleport(this.entityToAttack.posX, this.entityToAttack.posY, this.entityToAttack.posZ, 7);
+ }
+ } else if (this.onGround && !this.boss)
+ {
+ this.teleport(this.posX, this.posY, this.posZ, 12 + this.rand.nextInt(12));
+ } else
+ {
+ this.teleport(this.safeX, this.safeY, this.safeZ, 6);
+ }
+ } else if (this.teleTimer < 446 && (this.posY <= 0.0D || this.posY <= this.safeY - 16.0D))
+ {
+ this.teleTimer = 446;
+ } else if (this.teleTimer % 5 == 0 && this.entityToAttack != null && !this.canEntityBeSeen(this.entityToAttack))
+ {
+ this.teleTimer += 100;
+ }
+ }
+
+ if (this.onGround && this.teleTimer % 10 == 0 && !this.boss)
+ {
+ this.safeX = this.posX;
+ this.safeY = this.posY;
+ this.safeZ = this.posZ;
+ }
+
+ if (this.entityToAttack != null && this.entityToAttack.isDead)
+ {
+ this.entityToAttack = null;
+
+ if (this.boss)
+ {
+ this.unlockDoor();
+ }
+
+ this.angerLevel = 0;
+ }
+
+ if (this.chatTime > 0)
+ {
+ --this.chatTime;
+ }
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ this.lastMotionY = this.motionY;
+ super.onUpdate();
+
+ if (!this.onGround && this.entityToAttack != null && this.lastMotionY >= 0.0D && this.motionY < 0.0D && this.getDistanceToEntity(this.entityToAttack) <= 16.0F && this.canEntityBeSeen(this.entityToAttack))
+ {
+ double var1 = this.entityToAttack.posX - this.posX;
+ double var3 = this.entityToAttack.posZ - this.posZ;
+ double var5 = Math.atan2(var1, var3);
+ this.motionX = Math.sin(var5) * 0.25D;
+ this.motionZ = Math.cos(var5) * 0.25D;
+ }
+
+ if (!this.onGround && !this.isOnLadder() && Math.abs(this.motionY - this.lastMotionY) > 0.07D && Math.abs(this.motionY - this.lastMotionY) < 0.09D)
+ {
+ this.motionY += 0.054999999701976776D;
+
+ if (this.motionY < -0.2750000059604645D)
+ {
+ this.motionY = -0.2750000059604645D;
+ }
+ }
+
+ this.moveSpeed = this.entityToAttack == null ? 0.5F : 1.0F;
+
+ if (this.worldObj.difficultySetting <= 0 && (this.entityToAttack != null || this.angerLevel > 0))
+ {
+ this.angerLevel = 0;
+ this.entityToAttack = null;
+ }
+
+ if (this.isSwinging)
+ {
+ this.prevSwingProgress += 0.15F;
+ this.swingProgress += 0.15F;
+
+ if (this.prevSwingProgress > 1.0F || this.swingProgress > 1.0F)
+ {
+ this.isSwinging = false;
+ this.prevSwingProgress = 0.0F;
+ this.swingProgress = 0.0F;
+ }
+ }
+
+ if (!this.onGround)
+ {
+ this.sinage += 0.75F;
+ } else
+ {
+ this.sinage += 0.15F;
+ }
+
+ if (this.sinage > ((float) Math.PI * 2F))
+ {
+ this.sinage -= ((float) Math.PI * 2F);
+ }
+
+ if (!this.otherDimension())
+ {
+ --this.timeLeft;
+
+ if (this.timeLeft <= 0)
+ {
+ this.isDead = true;
+ this.spawnExplosionParticle();
+ }
+ }
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ super.writeEntityToNBT(var1);
+ var1.setShort("Anger", (short) this.angerLevel);
+ var1.setShort("TeleTimer", (short) this.teleTimer);
+ var1.setShort("TimeLeft", (short) this.timeLeft);
+ var1.setBoolean("Boss", this.boss);
+ var1.setBoolean("Duel", this.duel);
+ var1.setInteger("DungeonX", this.dungeonX);
+ var1.setInteger("DungeonY", this.dungeonY);
+ var1.setInteger("DungeonZ", this.dungeonZ);
+ var1.setInteger("DungeonEntranceZ", this.dungeonEntranceZ);
+ var1.setTag("SafePos", this.newDoubleNBTList(new double[]{this.safeX, this.safeY, this.safeZ}));
+ var1.setString("BossName", this.name);
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ super.readEntityFromNBT(var1);
+ this.angerLevel = var1.getShort("Anger");
+ this.teleTimer = var1.getShort("TeleTimer");
+ this.timeLeft = var1.getShort("TimeLeft");
+ this.duel = var1.getBoolean("Duel");
+ this.boss = var1.getBoolean("Boss");
+ this.dungeonX = var1.getInteger("DungeonX");
+ this.dungeonY = var1.getInteger("DungeonY");
+ this.dungeonZ = var1.getInteger("DungeonZ");
+ this.dungeonEntranceZ = var1.getInteger("DungeonEntranceZ");
+
+ if (this.boss)
+ {
+ this.texture = "/aether/mobs/valkyrie2.png";
+ }
+
+ NBTTagList var2 = var1.getTagList("SafePos");
+ this.safeX = ((NBTTagDouble) var2.tagAt(0)).data;
+ this.safeY = ((NBTTagDouble) var2.tagAt(1)).data;
+ this.safeZ = ((NBTTagDouble) var2.tagAt(2)).data;
+
+ if (var1.getBoolean("IsCurrentBoss"))
+ {
+ this.name = var1.getString("BossName");
+ }
+ }
+
+ /**
+ * Finds the closest player within 16 blocks to attack, or null if this Entity isn't interested in attacking
+ * (Animals, Spiders at day, peaceful PigZombies).
+ */
+ protected Entity findPlayerToAttack()
+ {
+ return this.otherDimension() && (this.worldObj.difficultySetting <= 0 || this.boss && !this.duel || this.angerLevel <= 0) ? null : super.findPlayerToAttack();
+ }
+
+ /**
+ * Called when the entity is attacked.
+ */
+ public boolean attackEntityFrom(DamageSource var1, int var2)
+ {
+ if (var1.getEntity() instanceof EntityPlayer && this.worldObj.difficultySetting > 0)
+ {
+ int var3;
+
+ if (this.boss && (!this.duel || this.worldObj.difficultySetting <= 0))
+ {
+ this.spawnExplosionParticle();
+ var3 = this.rand.nextInt(2);
+
+ if (var3 == 2)
+ {
+ this.chatItUp("Sorry, I don\'t fight with weaklings.");
+ } else
+ {
+ this.chatItUp("Try defeating some weaker valkyries first.");
+ }
+
+ return false;
+ } else
+ {
+ if (this.boss)
+ {
+ if (this.entityToAttack == null)
+ {
+ this.chatTime = 0;
+ this.chatItUp("This will be your final battle!");
+ } else
+ {
+ this.teleTimer += 60;
+ }
+ } else if (this.entityToAttack == null)
+ {
+ this.chatTime = 0;
+ var3 = this.rand.nextInt(3);
+
+ if (var3 == 2)
+ {
+ this.chatItUp("I\'m not going easy on you!");
+ } else if (var3 == 1)
+ {
+ this.chatItUp("You\'re gonna regret that!");
+ } else
+ {
+ this.chatItUp("Now you\'re in for it!");
+ }
+ } else
+ {
+ this.teleTimer -= 10;
+ }
+
+ this.becomeAngryAt(var1.getEntity());
+ boolean var5 = super.attackEntityFrom(var1, var2);
+
+ if (var5 && this.health <= 0)
+ {
+ int var4 = this.rand.nextInt(3);
+ this.isDead = true;
+
+ if (this.boss)
+ {
+ this.isDead = false;
+ this.unlockDoor();
+ this.unlockTreasure();
+ this.chatItUp("You are truly... a mighty warrior...");
+ } else if (var4 == 2)
+ {
+ this.chatItUp("Alright, alright! You win!");
+ } else if (var4 == 1)
+ {
+ this.chatItUp("Okay, I give up! Geez!");
+ } else
+ {
+ this.chatItUp("Oww! Fine, here\'s your medal...");
+ }
+
+ this.spawnExplosionParticle();
+ }
+
+ return var5;
+ }
+ } else
+ {
+ this.teleport(this.posX, this.posY, this.posZ, 8);
+ this.extinguish();
+ return false;
+ }
+ }
+
+ /**
+ * Basic mob attack. Default to touch of death in EntityCreature. Overridden by each mob to define their attack.
+ */
+ protected void attackEntity(Entity var1, float var2)
+ {
+ if (this.attackTime <= 0 && var2 < 2.75F && var1.boundingBox.maxY > this.boundingBox.minY && var1.boundingBox.minY < this.boundingBox.maxY)
+ {
+ this.attackTime = 20;
+ this.swingArm();
+ var1.attackEntityFrom(DamageSource.causeMobDamage(this), this.attackStrength);
+
+ if (var1 != null && this.entityToAttack != null && var1 == this.entityToAttack && var1 instanceof EntityLiving)
+ {
+ EntityLiving var3 = (EntityLiving) var1;
+
+ if (var3.getHealth() <= 0)
+ {
+ this.entityToAttack = null;
+ this.angerLevel = 0;
+ int var4 = this.rand.nextInt(3);
+ this.chatTime = 0;
+
+ if (this.boss)
+ {
+ this.chatItUp("As expected of a human.");
+ this.unlockDoor();
+ } else if (var4 == 2)
+ {
+ this.chatItUp("You want a medallion? Try being less pathetic.");
+ } else if (var4 == 1 && var3 instanceof EntityPlayer)
+ {
+ EntityPlayer var5 = (EntityPlayer) var3;
+ String var6 = var5.username;
+ this.chatItUp("Maybe some day, " + var6 + "... maybe some day.");
+ } else
+ {
+ this.chatItUp("Humans aren\'t nearly as cute when they\'re dead.");
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Drop 0-2 items of this living's type. @param par1 - Whether this entity has recently been hit by a player. @param
+ * par2 - Level of Looting used to kill this mob.
+ */
+ protected void dropFewItems(boolean var1, int var2)
+ {
+ if (this.boss)
+ {
+ this.entityDropItem(new ItemStack(AetherItems.Key, 1, 1), 0.0F);
+ this.dropItem(Item.swordGold.itemID, 1);
+ } else
+ {
+ this.dropItem(AetherItems.VictoryMedal.itemID, 1);
+ }
+ }
+
+ /**
+ * Called when the mob is falling. Calculates and applies fall damage.
+ */
+ public void fall(float var1)
+ {}
+
+ public boolean otherDimension()
+ {
+ return true;
+ }
+
+ public boolean isAirySpace(int var1, int var2, int var3)
+ {
+ int var4 = this.worldObj.getBlockId(var1, var2, var3);
+ return var4 == 0 || Block.blocksList[var4].getCollisionBoundingBoxFromPool(this.worldObj, var1, var2, var3) == null;
+ }
+
+ /**
+ * Determines if an entity can be despawned, used on idle far away entities
+ */
+ public boolean canDespawn()
+ {
+ return !this.boss;
+ }
+
+ public Entity getBossEntity()
+ {
+ return this;
+ }
+
+ /**
+ * Checks if the entity's current position is a valid location to spawn this entity.
+ */
+ public boolean getCanSpawnHere()
+ {
+ int var1 = MathHelper.floor_double(this.posX);
+ int var2 = MathHelper.floor_double(this.boundingBox.minY);
+ int var3 = MathHelper.floor_double(this.posZ);
+ return this.worldObj.getFullBlockLightValue(var1, var2, var3) > 8 && this.worldObj.checkNoEntityCollision(this.boundingBox) && this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).size() == 0 && !this.worldObj.isAnyLiquid(this.boundingBox);
+ }
+
+ public int getMedals()
+ {
+ int var1 = 0;
+ ItemStack[] var2 = this.mc.thePlayer.inventory.mainInventory;
+ int var3 = var2.length;
+
+ for (int var4 = 0; var4 < var3; ++var4)
+ {
+ ItemStack var5 = var2[var4];
+
+ if (var5 != null && var5.itemID == AetherItems.VictoryMedal.itemID)
+ {
+ var1 += var5.stackSize;
+ }
+ }
+
+ return var1;
+ }
+
+ public int getBossHP()
+ {
+ return this.health;
+ }
+
+ public int getBossMaxHP()
+ {
+ return 500;
+ }
+
+ public int getBossEntityID()
+ {
+ return this.entityId;
+ }
+
+ public String getBossTitle()
+ {
+ return this.name + ", the Valkyrie Queen";
+ }
+
+ public int getBossStage()
+ {
+ return 0;
+ }
+
+ public EnumBossType getBossType()
+ {
+ return EnumBossType.BOSS;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityZephyr.java b/src/main/java/net/aetherteam/aether/entities/EntityZephyr.java
new file mode 100644
index 0000000..3cd7d89
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityZephyr.java
@@ -0,0 +1,267 @@
+package net.aetherteam.aether.entities;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityFlying;
+import net.minecraft.entity.monster.IMob;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.Vec3;
+import net.minecraft.world.World;
+
+public class EntityZephyr extends EntityFlying implements IMob
+{
+ public String dir = "/net/aetherteam/aether/client/sprites";
+ private long checkTime = 0L;
+ private final long checkTimeInterval = 3000L;
+ private double checkX = 0.0D;
+ private double checkY = 0.0D;
+ private double checkZ = 0.0D;
+ private final double minTraversalDist = 3.0D;
+ private boolean isStuckWarning = false;
+ public int courseChangeCooldown = 0;
+ public double waypointX;
+ public double waypointY;
+ public double waypointZ;
+ private Entity targetedEntity = null;
+ private int aggroCooldown = 0;
+ public int prevAttackCounter = 0;
+ public int attackCounter = 0;
+
+ public EntityZephyr(World var1)
+ {
+ super(var1);
+ this.texture = this.dir + "/mobs/zephyr/zephyr.png";
+ this.setSize(4.0F, 4.0F);
+ }
+
+ public int getMaxHealth()
+ {
+ return 5;
+ }
+
+ protected void updateEntityActionState()
+ {
+ if (this.posY < -2.0D || this.posY > 130.0D)
+ {
+ this.despawnEntity();
+ }
+
+ this.prevAttackCounter = this.attackCounter;
+ double var1 = this.waypointX - this.posX;
+ double var3 = this.waypointY - this.posY;
+ double var5 = this.waypointZ - this.posZ;
+ double var7 = (double) MathHelper.sqrt_double(var1 * var1 + var3 * var3 + var5 * var5);
+
+ if (var7 < 1.0D || var7 > 60.0D)
+ {
+ this.waypointX = this.posX + (double) ((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F);
+ this.waypointY = this.posY + (double) ((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F);
+ this.waypointZ = this.posZ + (double) ((this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F);
+ }
+
+ if (this.courseChangeCooldown-- <= 0)
+ {
+ this.courseChangeCooldown += this.rand.nextInt(5) + 2;
+
+ if (this.isCourseTraversable(this.waypointX, this.waypointY, this.waypointZ, var7))
+ {
+ this.motionX += var1 / var7 * 0.1D;
+ this.motionY += var3 / var7 * 0.1D;
+ this.motionZ += var5 / var7 * 0.1D;
+ } else
+ {
+ this.waypointX = this.posX;
+ this.waypointY = this.posY;
+ this.waypointZ = this.posZ;
+ }
+ }
+
+ if (this.targetedEntity != null && this.targetedEntity.isDead)
+ {
+ this.targetedEntity = null;
+ }
+
+ if (this.targetedEntity == null || this.aggroCooldown-- <= 0)
+ {
+ this.targetedEntity = this.worldObj.getClosestPlayerToEntity(this, 100.0D);
+
+ if (this.targetedEntity != null)
+ {
+ this.aggroCooldown = 20;
+ }
+ }
+
+ double var9 = 64.0D;
+
+ if (this.targetedEntity != null && this.targetedEntity.getDistanceSqToEntity(this) < var9 * var9)
+ {
+ double var11 = this.targetedEntity.posX - this.posX;
+ double var13 = this.targetedEntity.boundingBox.minY + (double) (this.targetedEntity.height / 2.0F) - (this.posY + (double) (this.height / 2.0F));
+ double var15 = this.targetedEntity.posZ - this.posZ;
+ this.renderYawOffset = this.rotationYaw = -((float) Math.atan2(var11, var15)) * 180.0F / (float) Math.PI;
+
+ if (this.canEntityBeSeen(this.targetedEntity))
+ {
+ if (this.attackCounter == 10)
+ {
+ this.worldObj.playSoundAtEntity(this, "aemob.zephyr.say", this.getSoundVolume(), (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F);
+ }
+
+ ++this.attackCounter;
+
+ if (this.attackCounter == 20)
+ {
+ this.worldObj.playSoundAtEntity(this, "aemob.zephyr.shoot", this.getSoundVolume(), (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F);
+ EntityZephyrSnowball var17 = new EntityZephyrSnowball(this.worldObj, this, var11, var13, var15);
+ double var18 = 4.0D;
+ Vec3 var20 = this.getLook(1.0F);
+ var17.posX = this.posX + var20.xCoord * var18;
+ var17.posY = this.posY + (double) (this.height / 2.0F) + 0.5D;
+ var17.posZ = this.posZ + var20.zCoord * var18;
+
+ if (((EntityPlayer) this.targetedEntity).capabilities.isCreativeMode)
+ {
+ return;
+ }
+
+ if (!this.worldObj.isRemote)
+ {
+ this.worldObj.spawnEntityInWorld(var17);
+ }
+
+ this.attackCounter = -40;
+ }
+ } else if (this.attackCounter > 0)
+ {
+ --this.attackCounter;
+ }
+ } else
+ {
+ this.renderYawOffset = this.rotationYaw = -((float) Math.atan2(this.motionX, this.motionZ)) * 180.0F / (float) Math.PI;
+
+ if (this.attackCounter > 0)
+ {
+ --this.attackCounter;
+ }
+ }
+
+ this.texture = this.attackCounter <= 10 ? "/net/aetherteam/aether/client/sprites/mobs/Zephyr.png" : "/net/aetherteam/aether/client/sprites/mobs/Zephyr.png";
+
+ if (!this.worldObj.isRemote && this.worldObj.difficultySetting == 0)
+ {
+ this.setDead();
+ }
+
+ this.checkForBeingStuck();
+ }
+
+ private boolean isCourseTraversable(double var1, double var3, double var5, double var7)
+ {
+ double var9 = (this.waypointX - this.posX) / var7;
+ double var11 = (this.waypointY - this.posY) / var7;
+ double var13 = (this.waypointZ - this.posZ) / var7;
+ AxisAlignedBB var15 = this.boundingBox.copy();
+
+ for (int var16 = 1; (double) var16 < var7; ++var16)
+ {
+ var15.offset(var9, var11, var13);
+
+ if (this.worldObj.getCollidingBoundingBoxes(this, var15).size() > 0)
+ {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Returns the sound this mob makes while it's alive.
+ */
+ protected String getLivingSound()
+ {
+ return "aemob.zephyr.say";
+ }
+
+ /**
+ * Returns the sound this mob makes when it is hurt.
+ */
+ protected String getHurtSound()
+ {
+ return "aemob.zephyr.say";
+ }
+
+ /**
+ * Returns the sound this mob makes on death.
+ */
+ protected String getDeathSound()
+ {
+ return "aemob.zephyr.say";
+ }
+
+ /**
+ * Determines if an entity can be despawned, used on idle far away entities
+ */
+ public boolean canDespawn()
+ {
+ return true;
+ }
+
+ /**
+ * Returns the volume for the sounds this mob makes.
+ */
+ protected float getSoundVolume()
+ {
+ return 3.0F;
+ }
+
+ private void checkForBeingStuck()
+ {
+ long var1 = System.currentTimeMillis();
+
+ if (var1 > this.checkTime + 3000L)
+ {
+ double var3 = this.posX - this.checkX;
+ double var5 = this.posY - this.checkY;
+ double var7 = this.posZ - this.checkZ;
+ double var9 = Math.sqrt(var3 * var3 + var5 * var5 + var7 * var7);
+
+ if (var9 < 3.0D)
+ {
+ if (!this.isStuckWarning)
+ {
+ this.isStuckWarning = true;
+ } else
+ {
+ this.setDead();
+ }
+ }
+
+ this.checkX = this.posX;
+ this.checkY = this.posY;
+ this.checkZ = this.posZ;
+ this.checkTime = var1;
+ }
+ }
+
+ /**
+ * Checks if the entity's current position is a valid location to spawn this entity.
+ */
+ public boolean getCanSpawnHere()
+ {
+ int var1 = MathHelper.floor_double(this.posX);
+ int var2 = MathHelper.floor_double(this.boundingBox.minY);
+ int var3 = MathHelper.floor_double(this.posZ);
+ return this.rand.nextInt(65) == 0 && this.worldObj.checkNoEntityCollision(this.boundingBox) && this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).size() == 0 && !this.worldObj.isAnyLiquid(this.boundingBox) && this.worldObj.getBlockId(var1, var2 - 1, var3) == AetherBlocks.AetherGrass.blockID && this.worldObj.getBlockId(var1, var2 - 1, var3) != AetherBlocks.Holystone.blockID && this.worldObj.difficultySetting > 0;
+ }
+
+ /**
+ * Will return how many at most can spawn in a chunk at once.
+ */
+ public int getMaxSpawnedInChunk()
+ {
+ return 1;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityZephyrSnowball.java b/src/main/java/net/aetherteam/aether/entities/EntityZephyrSnowball.java
new file mode 100644
index 0000000..3e39e00
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityZephyrSnowball.java
@@ -0,0 +1,301 @@
+package net.aetherteam.aether.entities;
+
+import cpw.mods.fml.common.registry.IThrowableEntity;
+
+import java.util.List;
+
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.MovingObjectPosition;
+import net.minecraft.util.Vec3;
+import net.minecraft.world.World;
+
+public class EntityZephyrSnowball extends Entity implements IThrowableEntity
+{
+ private int xTile = -1;
+ private int yTile = -1;
+ private int zTile = -1;
+ private int inTile = 0;
+ protected boolean inGround = false;
+ public int field_9406_a = 0;
+ protected EntityLiving shootingEntity;
+ private int ticksAlive;
+ private int ticksInAir = 0;
+ public double accelerationX;
+ public double accelerationY;
+ public double accelerationZ;
+
+ public EntityZephyrSnowball(World var1)
+ {
+ super(var1);
+ this.setSize(1.0F, 1.0F);
+ }
+
+ protected void entityInit() {}
+
+ public EntityZephyrSnowball(World var1, EntityLiving var2, double var3, double var5, double var7)
+ {
+ super(var1);
+ this.shootingEntity = var2;
+ this.setSize(0.5F, 0.5F);
+ this.setLocationAndAngles(var2.posX, var2.posY, var2.posZ, var2.rotationYaw, var2.rotationPitch);
+ this.setPositionAndRotation(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
+ this.yOffset = 0.0F;
+ this.motionX = this.motionY = this.motionZ = 0.0D;
+ var3 += this.rand.nextGaussian() * 0.4D;
+ var5 += this.rand.nextGaussian() * 0.4D;
+ var7 += this.rand.nextGaussian() * 0.4D;
+ double var9 = (double) MathHelper.sqrt_double(var3 * var3 + var5 * var5 + var7 * var7);
+ this.accelerationX = var3 / var9 * 0.08000000000000002D;
+ this.accelerationY = var5 / var9 * 0.08000000000000002D;
+ this.accelerationZ = var7 / var9 * 0.08000000000000002D;
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+
+ if (this.motionX * this.motionY * this.motionZ < 0.1D && this.ticksInAir > 40 && !this.worldObj.isRemote)
+ {
+ this.setDead();
+ }
+
+ if (this.ticksInAir > 200 && !this.worldObj.isRemote)
+ {
+ this.setDead();
+ }
+
+ if (this.field_9406_a > 0)
+ {
+ --this.field_9406_a;
+ }
+
+ if (this.inGround)
+ {
+ int var1 = this.worldObj.getBlockId(this.xTile, this.yTile, this.zTile);
+
+ if (var1 == this.inTile)
+ {
+ ++this.ticksAlive;
+ return;
+ }
+
+ this.inGround = false;
+ this.motionX *= (double) (this.rand.nextFloat() * 0.2F);
+ this.motionY *= (double) (this.rand.nextFloat() * 0.2F);
+ this.motionZ *= (double) (this.rand.nextFloat() * 0.2F);
+ this.ticksAlive = 0;
+ this.ticksInAir = 0;
+ } else
+ {
+ ++this.ticksInAir;
+ }
+
+ Vec3 var17 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
+ Vec3 var2 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
+ MovingObjectPosition var3 = this.worldObj.rayTraceBlocks(var17, var2);
+ var17 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
+ var2 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
+
+ if (var3 != null)
+ {
+ var2 = Vec3.createVectorHelper(var3.hitVec.xCoord, var3.hitVec.yCoord, var3.hitVec.zCoord);
+ }
+
+ Entity var4 = null;
+ List var5 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D));
+ double var6 = 0.0D;
+
+ for (int var8 = 0; var8 < var5.size(); ++var8)
+ {
+ Entity var9 = (Entity) var5.get(var8);
+
+ if (var9.canBeCollidedWith() && (var9 != this.shootingEntity || this.ticksInAir >= 25))
+ {
+ float var10 = 0.3F;
+ AxisAlignedBB var11 = var9.boundingBox.expand((double) var10, (double) var10, (double) var10);
+ MovingObjectPosition var12 = var11.calculateIntercept(var17, var2);
+
+ if (var12 != null)
+ {
+ double var13 = var17.distanceTo(var12.hitVec);
+
+ if (var13 < var6 || var6 == 0.0D)
+ {
+ var4 = var9;
+ var6 = var13;
+ }
+ }
+ }
+ }
+
+ if (var4 != null)
+ {
+ var3 = new MovingObjectPosition(var4);
+ }
+
+ if (var3 != null)
+ {
+ if (var3.entityHit != null && var3.entityHit != this.shootingEntity)
+ {
+ if (var3.entityHit instanceof EntityPlayer && ((EntityPlayer) var3.entityHit).inventory.armorInventory[0] != null && ((EntityPlayer) var3.entityHit).inventory.armorInventory[0].itemID == AetherItems.SentryBoots.itemID)
+ {
+ this.setDead();
+ } else if (var3.entityHit instanceof EntityPlayer && ((EntityPlayer) var3.entityHit).capabilities.isCreativeMode)
+ {
+ this.setDead();
+ } else if (var3.entityHit != null && !(var3.entityHit instanceof EntityNewZephyr) && !(var3.entityHit instanceof EntityTempest))
+ {
+ var3.entityHit.motionX += this.motionX;
+ var3.entityHit.motionY += 0.5D;
+ var3.entityHit.motionZ += this.motionZ;
+ }
+ }
+
+ if (!this.worldObj.isRemote)
+ {
+ this.setDead();
+ }
+ }
+
+ this.posX += this.motionX;
+ this.posY += this.motionY;
+ this.posZ += this.motionZ;
+ float var16 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
+ this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
+
+ for (this.rotationPitch = (float) (Math.atan2(this.motionY, (double) var16) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F)
+ {
+ ;
+ }
+
+ while (this.rotationPitch - this.prevRotationPitch >= 180.0F)
+ {
+ this.prevRotationPitch += 360.0F;
+ }
+
+ while (this.rotationYaw - this.prevRotationYaw < -180.0F)
+ {
+ this.prevRotationYaw -= 360.0F;
+ }
+
+ while (this.rotationYaw - this.prevRotationYaw >= 180.0F)
+ {
+ this.prevRotationYaw += 360.0F;
+ }
+
+ this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F;
+ this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F;
+ float var15 = 0.95F;
+
+ if (this.handleWaterMovement())
+ {
+ for (int var18 = 0; var18 < 4; ++var18)
+ {
+ float var19 = 0.25F;
+ this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double) var19, this.posY - this.motionY * (double) var19, this.posZ - this.motionZ * (double) var19, this.motionX, this.motionY, this.motionZ);
+ }
+
+ var15 = 0.8F;
+ }
+
+ this.motionX += this.accelerationX;
+ this.motionY += this.accelerationY;
+ this.motionZ += this.accelerationZ;
+ this.motionX *= (double) var15;
+ this.motionY *= (double) var15;
+ this.motionZ *= (double) var15;
+ this.worldObj.spawnParticle("smoke", this.posX, this.posY + 0.5D, this.posZ, 0.0D, 0.0D, 0.0D);
+ this.setPositionAndRotation(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ var1.setShort("xTile", (short) this.xTile);
+ var1.setShort("yTile", (short) this.yTile);
+ var1.setShort("zTile", (short) this.zTile);
+ var1.setByte("inTile", (byte) this.inTile);
+ var1.setByte("shake", (byte) this.field_9406_a);
+ var1.setByte("inGround", (byte) (this.inGround ? 1 : 0));
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ this.xTile = var1.getShort("xTile");
+ this.yTile = var1.getShort("yTile");
+ this.zTile = var1.getShort("zTile");
+ this.inTile = var1.getByte("inTile") & 255;
+ this.field_9406_a = var1.getByte("shake") & 255;
+ this.inGround = var1.getByte("inGround") == 1;
+ }
+
+ public float getCollisionBorderSize()
+ {
+ return 1.0F;
+ }
+
+ /**
+ * Called when the entity is attacked.
+ */
+ public boolean attackEntityFrom(DamageSource var1, int var2)
+ {
+ this.setBeenAttacked();
+
+ if (var1.getEntity() == null)
+ {
+ return false;
+ } else
+ {
+ Vec3 var3 = var1.getEntity().getLookVec();
+
+ if (var3 != null)
+ {
+ this.motionX = var3.xCoord;
+ this.motionY = var3.yCoord;
+ this.motionZ = var3.zCoord;
+ this.accelerationX = this.motionX * 0.1D;
+ this.accelerationY = this.motionY * 0.1D;
+ this.accelerationZ = this.motionZ * 0.1D;
+
+ for (int var4 = 0; var4 < 10; ++var4)
+ {
+ double var5 = this.rand.nextGaussian() * 0.02D;
+ double var7 = this.rand.nextGaussian() * 0.02D;
+ double var9 = this.rand.nextGaussian() * 0.02D;
+ double var11 = 5.0D;
+ this.shootingEntity.worldObj.spawnParticle("flame", this.shootingEntity.posX + (double) (this.rand.nextFloat() * this.shootingEntity.width * 2.0F) - (double) this.shootingEntity.width - var5 * var11, this.shootingEntity.posY + (double) (this.rand.nextFloat() * (this.shootingEntity.height - 0.6F)) - var7 * var11, this.shootingEntity.posZ + (double) (this.rand.nextFloat() * this.shootingEntity.width * 2.0F) - (double) this.shootingEntity.width - var9 * var11, var5, var7, var9);
+ this.shootingEntity.worldObj.spawnParticle("largeexplode", this.shootingEntity.posX + (double) (this.rand.nextFloat() * this.shootingEntity.width * 2.0F) - (double) this.shootingEntity.width - var5 * var11, this.shootingEntity.posY + (double) (this.rand.nextFloat() * (this.shootingEntity.height - 0.6F)) - var7 * var11, this.shootingEntity.posZ + (double) (this.rand.nextFloat() * this.shootingEntity.width * 2.0F) - (double) this.shootingEntity.width - var9 * var11, var5, var7, var9);
+ }
+ }
+
+ return true;
+ }
+ }
+
+ public float getShadowSize()
+ {
+ return 0.0F;
+ }
+
+ public Entity getThrower()
+ {
+ return null;
+ }
+
+ public void setThrower(Entity var1) {}
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/EntityZephyroo.java b/src/main/java/net/aetherteam/aether/entities/EntityZephyroo.java
new file mode 100644
index 0000000..cc87212
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/EntityZephyroo.java
@@ -0,0 +1,157 @@
+package net.aetherteam.aether.entities;
+
+import java.util.Iterator;
+import java.util.List;
+
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityAgeable;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.world.World;
+
+public class EntityZephyroo extends EntityAetherAnimal
+{
+ private int timeTilJump = 10;
+
+ public EntityZephyroo(World var1)
+ {
+ super(var1);
+ this.texture = this.dir + "/mobs/Zephyroo.png";
+ this.moveSpeed = 5.0F;
+ this.setSize(0.2F, 2.0F);
+ }
+
+ /**
+ * This method returns a value to be applied directly to entity speed, this factor is less than 1 when a slowdown
+ * potion effect is applied, more than 1 when a haste potion effect is applied and 2 for fleeing entities.
+ */
+ public float getSpeedModifier()
+ {
+ return 3.0F;
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+ List var1 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.expand(5.5D, 1.75D, 5.5D));
+ boolean var2 = false;
+ Iterator var3 = var1.iterator();
+
+ while (var3.hasNext())
+ {
+ Entity var4 = (Entity) var3.next();
+
+ if (var4 instanceof EntityPlayer)
+ {
+ EntityPlayer var5 = (EntityPlayer) var4;
+
+ if (var5.username.equalsIgnoreCase("ClashJTM"))
+ {
+ var2 = true;
+ this.makeLoveToClash(true);
+ this.inLove = 1;
+ this.attackEntity(var5, 20.0F);
+ this.faceEntity(var5, 5.5F, (float) this.getVerticalFaceSpeed());
+ } else
+ {
+ this.makeLoveToClash(false);
+ this.inLove = 0;
+ this.entityToAttack = null;
+ }
+ }
+ }
+
+ if (!var2)
+ {
+ this.makeLoveToClash(false);
+ this.inLove = 0;
+ this.entityToAttack = null;
+ }
+ }
+
+ /**
+ * Basic mob attack. Default to touch of death in EntityCreature. Overridden by each mob to define their attack.
+ */
+ protected void attackEntity(Entity var1, float var2)
+ {
+ if (var1 instanceof EntityPlayer)
+ {
+ if (var2 < 3.0F)
+ {
+ double var3 = var1.posX - this.posX;
+ double var5 = var1.posZ - this.posZ;
+ this.rotationYaw = (float) (Math.atan2(var5, var3) * 180.0D / Math.PI) - 90.0F;
+ this.hasAttacked = true;
+ }
+
+ EntityPlayer var7 = (EntityPlayer) var1;
+ this.entityToAttack = var1;
+ } else
+ {
+ super.attackEntity(var1, var2);
+ }
+ }
+
+ protected void entityInit()
+ {
+ super.entityInit();
+ this.dataWatcher.addObject(16, new Integer(0));
+ this.dataWatcher.addObject(17, new Byte((byte) 0));
+ }
+
+ public boolean isLovingClash()
+ {
+ return this.dataWatcher.getWatchableObjectByte(17) >= 1;
+ }
+
+ public void makeLoveToClash(boolean var1)
+ {
+ this.dataWatcher.updateObject(17, Byte.valueOf((byte) (var1 ? 1 : 0)));
+ }
+
+ public EntityAgeable createChild(EntityAgeable var1)
+ {
+ return new EntityZephyroo(this.worldObj);
+ }
+
+ public int getMaxHealth()
+ {
+ return 20;
+ }
+
+ protected void updateEntityActionState()
+ {
+ super.updateEntityActionState();
+ this.fallDistance = 0.0F;
+
+ if (this.onGround && (this.motionX > 1.0E-4D || this.motionZ > 1.0E-4D))
+ {
+ this.hop();
+ } else
+ {
+ if (this.timeTilJump != 0)
+ {
+ --this.timeTilJump;
+ }
+
+ if (this.timeTilJump == 0)
+ {
+ this.timeTilJump = 10;
+ }
+ }
+
+ this.dataWatcher.updateObject(16, Integer.valueOf(this.timeTilJump));
+ }
+
+ public float getTimeTilJump()
+ {
+ return (float) this.dataWatcher.getWatchableObjectInt(16);
+ }
+
+ protected void hop()
+ {
+ super.jump();
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/ai/AIEntityAerbunnyHop.java b/src/main/java/net/aetherteam/aether/entities/ai/AIEntityAerbunnyHop.java
new file mode 100644
index 0000000..38f8b16
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/ai/AIEntityAerbunnyHop.java
@@ -0,0 +1,31 @@
+package net.aetherteam.aether.entities.ai;
+
+import net.aetherteam.aether.entities.mounts.EntityAerbunny;
+import net.minecraft.entity.ai.EntityAIBase;
+
+public class AIEntityAerbunnyHop extends EntityAIBase
+{
+ private EntityAerbunny theEntity;
+
+ public AIEntityAerbunnyHop(EntityAerbunny var1)
+ {
+ this.setMutexBits(8);
+ this.theEntity = var1;
+ }
+
+ /**
+ * Returns whether the EntityAIBase should begin execution.
+ */
+ public boolean shouldExecute()
+ {
+ return this.theEntity.motionZ > 0.0D || this.theEntity.motionX > 0.0D || this.theEntity.onGround;
+ }
+
+ /**
+ * Updates the task
+ */
+ public void updateTask()
+ {
+ this.theEntity.getJumpHelper().setJumping();
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/ai/AIEntityArrowAttackCog.java b/src/main/java/net/aetherteam/aether/entities/ai/AIEntityArrowAttackCog.java
new file mode 100644
index 0000000..3ebd730
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/ai/AIEntityArrowAttackCog.java
@@ -0,0 +1,129 @@
+package net.aetherteam.aether.entities.ai;
+
+import net.aetherteam.aether.entities.bosses.EntityLabyrinthEye;
+import net.minecraft.entity.EntityCreature;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.ai.EntityAIBase;
+import net.minecraft.entity.ai.RandomPositionGenerator;
+import net.minecraft.util.Vec3;
+
+public class AIEntityArrowAttackCog extends EntityAIBase
+{
+ private final EntityLiving entityHost;
+
+ /**
+ * The entity (as a RangedAttackMob) the AI instance has been applied to.
+ */
+ private final EntityLabyrinthEye rangedAttackEntityHost;
+ private EntityLiving attackTarget;
+ private int rangedAttackTime = 0;
+ private float entityMoveSpeed;
+ private int seeTimer = 0;
+ private int maxRangedAttackTime;
+ private float maxAttackRange;
+ private float minAttackRange;
+ private float runRange;
+ double i = 0.0D;
+ double j = 0.0D;
+ double k = 0.0D;
+ boolean running = false;
+
+ public AIEntityArrowAttackCog(EntityLabyrinthEye var1, float var2, int var3, float var4)
+ {
+ if (!(var1 instanceof EntityLiving))
+ {
+ throw new IllegalArgumentException("ArrowAttackGoal requires Mob implements RangedAttackMob");
+ } else
+ {
+ this.rangedAttackEntityHost = var1;
+ this.entityHost = var1;
+ this.entityMoveSpeed = var2;
+ this.maxRangedAttackTime = var3;
+ this.maxAttackRange = var4 * var4;
+ this.minAttackRange = 49.0F;
+ this.runRange = 16.0F;
+ this.setMutexBits(3);
+ }
+ }
+
+ /**
+ * Returns whether the EntityAIBase should begin execution.
+ */
+ public boolean shouldExecute()
+ {
+ EntityLiving var1 = this.entityHost.getAttackTarget();
+
+ if (var1 == null)
+ {
+ return false;
+ } else
+ {
+ this.attackTarget = var1;
+ return true;
+ }
+ }
+
+ /**
+ * Returns whether an in-progress EntityAIBase should continue executing
+ */
+ public boolean continueExecuting()
+ {
+ return this.shouldExecute() || !this.entityHost.getNavigator().noPath();
+ }
+
+ /**
+ * Resets the task
+ */
+ public void resetTask()
+ {
+ this.attackTarget = null;
+ this.seeTimer = 0;
+ }
+
+ /**
+ * Updates the task
+ */
+ public void updateTask()
+ {
+ double var1 = this.entityHost.getDistanceSq(this.attackTarget.posX, this.attackTarget.boundingBox.minY, this.attackTarget.posZ);
+ boolean var3 = this.entityHost.getEntitySenses().canSee(this.attackTarget);
+
+ if (var3)
+ {
+ ++this.seeTimer;
+ } else
+ {
+ this.seeTimer = 0;
+ }
+
+ if (var1 <= (double) this.runRange && this.seeTimer >= 20)
+ {
+ this.running = true;
+ }
+
+ if (this.running && var1 <= (double) this.minAttackRange && this.seeTimer >= 20)
+ {
+ Vec3 var4 = RandomPositionGenerator.findRandomTargetBlockAwayFrom((EntityCreature) this.entityHost, 16, 7, this.entityHost.worldObj.getWorldVec3Pool().getVecFromPool(this.attackTarget.posX, this.attackTarget.posY, this.attackTarget.posZ));
+
+ if (var4 != null)
+ {
+ this.i = var4.xCoord;
+ this.j = var4.yCoord;
+ this.k = var4.zCoord;
+ }
+
+ this.entityHost.getNavigator().tryMoveToXYZ(this.i, this.j, this.k, this.entityMoveSpeed);
+ } else if (var1 <= (double) this.maxAttackRange && this.seeTimer >= 20)
+ {
+ this.running = false;
+ this.entityHost.getNavigator().clearPathEntity();
+ } else
+ {
+ this.running = false;
+ this.entityHost.getNavigator().tryMoveToEntityLiving(this.attackTarget, this.entityMoveSpeed);
+ }
+
+ this.entityHost.getLookHelper().setLookPositionWithEntity(this.attackTarget, 30.0F, 30.0F);
+ this.rangedAttackTime = Math.max(this.rangedAttackTime - 1, 0);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/ai/AIEntityArrowAttackSentry.java b/src/main/java/net/aetherteam/aether/entities/ai/AIEntityArrowAttackSentry.java
new file mode 100644
index 0000000..ced38b6
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/ai/AIEntityArrowAttackSentry.java
@@ -0,0 +1,157 @@
+package net.aetherteam.aether.entities.ai;
+
+import net.aetherteam.aether.entities.EntitySentryGolem;
+import net.minecraft.entity.EntityCreature;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.ai.EntityAIBase;
+import net.minecraft.entity.ai.RandomPositionGenerator;
+import net.minecraft.util.Vec3;
+
+public class AIEntityArrowAttackSentry extends EntityAIBase
+{
+ private final EntityLiving entityHost;
+
+ /**
+ * The entity (as a RangedAttackMob) the AI instance has been applied to.
+ */
+ private final EntitySentryGolem rangedAttackEntityHost;
+ private EntityLiving attackTarget;
+ private int rangedAttackTime = 0;
+ private float entityMoveSpeed;
+ private int seeTimer = 0;
+ private int maxRangedAttackTime;
+ private float maxAttackRange;
+ private float minAttackRange;
+ private float runRange;
+ double i = 0.0D;
+ double j = 0.0D;
+ double k = 0.0D;
+ boolean running = false;
+
+ public AIEntityArrowAttackSentry(EntitySentryGolem var1, float var2, int var3, float var4)
+ {
+ if (!(var1 instanceof EntityLiving))
+ {
+ throw new IllegalArgumentException("ArrowAttackGoal requires Mob implements RangedAttackMob");
+ } else
+ {
+ this.rangedAttackEntityHost = var1;
+ this.entityHost = var1;
+ this.entityMoveSpeed = var2;
+ this.maxRangedAttackTime = var3;
+ this.maxAttackRange = var4 * var4;
+ this.minAttackRange = 49.0F;
+ this.runRange = 16.0F;
+ this.setMutexBits(3);
+ }
+ }
+
+ /**
+ * Returns whether the EntityAIBase should begin execution.
+ */
+ public boolean shouldExecute()
+ {
+ EntityLiving var1 = this.entityHost.getAttackTarget();
+
+ if (var1 == null)
+ {
+ return false;
+ } else
+ {
+ this.attackTarget = var1;
+ return true;
+ }
+ }
+
+ /**
+ * Returns whether an in-progress EntityAIBase should continue executing
+ */
+ public boolean continueExecuting()
+ {
+ return this.shouldExecute() || !this.entityHost.getNavigator().noPath();
+ }
+
+ /**
+ * Resets the task
+ */
+ public void resetTask()
+ {
+ this.attackTarget = null;
+ this.seeTimer = 0;
+ }
+
+ /**
+ * Updates the task
+ */
+ public void updateTask()
+ {
+ double var1 = this.entityHost.getDistanceSq(this.attackTarget.posX, this.attackTarget.boundingBox.minY, this.attackTarget.posZ);
+ boolean var3 = this.entityHost.getEntitySenses().canSee(this.attackTarget);
+
+ if (var3)
+ {
+ ++this.seeTimer;
+ } else
+ {
+ this.seeTimer = 0;
+ }
+
+ if (var1 <= (double) this.runRange && this.seeTimer >= 20)
+ {
+ this.running = true;
+ }
+
+ if (this.running && var1 <= (double) this.minAttackRange && this.seeTimer >= 20)
+ {
+ Vec3 var4 = RandomPositionGenerator.findRandomTargetBlockAwayFrom((EntityCreature) this.entityHost, 16, 7, this.entityHost.worldObj.getWorldVec3Pool().getVecFromPool(this.attackTarget.posX, this.attackTarget.posY, this.attackTarget.posZ));
+
+ if (var4 != null)
+ {
+ this.i = var4.xCoord;
+ this.j = var4.yCoord;
+ this.k = var4.zCoord;
+ }
+
+ this.entityHost.getNavigator().tryMoveToXYZ(this.i, this.j, this.k, this.entityMoveSpeed);
+ } else if (var1 <= (double) this.maxAttackRange && this.seeTimer >= 20)
+ {
+ this.running = false;
+ this.entityHost.getNavigator().clearPathEntity();
+ } else
+ {
+ this.running = false;
+ this.entityHost.getNavigator().tryMoveToEntityLiving(this.attackTarget, this.entityMoveSpeed);
+ }
+
+ this.entityHost.getLookHelper().setLookPositionWithEntity(this.attackTarget, 30.0F, 30.0F);
+ this.rangedAttackTime = Math.max(this.rangedAttackTime - 1, 0);
+ this.rangedAttackEntityHost.setFire(this.rangedAttackTime);
+
+ if (this.rangedAttackTime <= 60)
+ {
+ ;
+ }
+
+ if (this.rangedAttackTime <= 30)
+ {
+ this.rangedAttackEntityHost.setHandState((byte) 1);
+ }
+
+ if (this.rangedAttackTime <= 20)
+ {
+ this.rangedAttackEntityHost.setHandState((byte) 1);
+ }
+
+ if (this.rangedAttackTime <= 10)
+ {
+ this.rangedAttackEntityHost.setHandState((byte) 1);
+ }
+
+ if (this.rangedAttackTime <= 0 && var1 <= (double) this.maxAttackRange && var3)
+ {
+ this.rangedAttackEntityHost.attackEntityWithRangedAttack(this.attackTarget, 1.0F);
+ this.rangedAttackTime = this.maxRangedAttackTime;
+ this.rangedAttackEntityHost.setHandState((byte) 2);
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/ai/AIEntityControlledByPlayerPhyg.java b/src/main/java/net/aetherteam/aether/entities/ai/AIEntityControlledByPlayerPhyg.java
new file mode 100644
index 0000000..13775bb
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/ai/AIEntityControlledByPlayerPhyg.java
@@ -0,0 +1,226 @@
+package net.aetherteam.aether.entities.ai;
+
+import net.minecraft.block.Block;
+import net.minecraft.entity.EntityCreature;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.ai.EntityAIBase;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.pathfinding.PathFinder;
+import net.minecraft.pathfinding.PathPoint;
+import net.minecraft.util.MathHelper;
+
+public class AIEntityControlledByPlayerPhyg extends EntityAIBase
+{
+ private final EntityLiving thisEntity;
+ private final float maxSpeed;
+ private float currentSpeed = 0.0F;
+
+ /**
+ * Whether the entity's speed is boosted.
+ */
+ private boolean speedBoosted = false;
+
+ /**
+ * Counter for speed boosting, upon reaching maxSpeedBoostTime the speed boost will be disabled
+ */
+ private int speedBoostTime = 0;
+
+ /**
+ * Maximum time the entity's speed should be boosted for.
+ */
+ private int maxSpeedBoostTime = 0;
+
+ public AIEntityControlledByPlayerPhyg(EntityLiving var1, float var2)
+ {
+ this.thisEntity = var1;
+ this.maxSpeed = var2;
+ this.setMutexBits(1);
+ }
+
+ /**
+ * Execute a one shot task or start executing a continuous task
+ */
+ public void startExecuting()
+ {
+ this.currentSpeed = 0.0F;
+ }
+
+ /**
+ * Resets the task
+ */
+ public void resetTask()
+ {
+ this.speedBoosted = false;
+ this.currentSpeed = 0.0F;
+ }
+
+ /**
+ * Return whether the entity's speed is boosted.
+ */
+ public boolean isSpeedBoosted()
+ {
+ return this.speedBoosted;
+ }
+
+ /**
+ * Boost the entity's movement speed.
+ */
+ public void boostSpeed()
+ {
+ this.speedBoosted = true;
+ this.speedBoostTime = 0;
+ this.maxSpeedBoostTime = this.thisEntity.getRNG().nextInt(841) + 140;
+ }
+
+ /**
+ * Return whether the entity is being controlled by a player.
+ */
+ public boolean isControlledByPlayer()
+ {
+ return !this.isSpeedBoosted() && this.currentSpeed > this.maxSpeed * 0.3F;
+ }
+
+ /**
+ * Returns whether the EntityAIBase should begin execution.
+ */
+ public boolean shouldExecute()
+ {
+ return this.thisEntity.isEntityAlive() && this.thisEntity.riddenByEntity != null && this.thisEntity.riddenByEntity instanceof EntityPlayer && (this.speedBoosted || this.thisEntity.canBeSteered());
+ }
+
+ /**
+ * Updates the task
+ */
+ public void updateTask()
+ {
+ EntityPlayer var1 = (EntityPlayer) this.thisEntity.riddenByEntity;
+ EntityCreature var2 = (EntityCreature) this.thisEntity;
+ float var3 = MathHelper.wrapAngleTo180_float(var1.rotationYaw - this.thisEntity.rotationYaw) * 0.5F;
+
+ if (var3 > 5.0F)
+ {
+ var3 = 5.0F;
+ }
+
+ if (var3 < -5.0F)
+ {
+ var3 = -5.0F;
+ }
+
+ this.setPositionPlusAngle(var3);
+
+ if (this.currentSpeed < this.maxSpeed)
+ {
+ this.currentSpeed += (this.maxSpeed - this.currentSpeed) * 0.01F;
+ }
+
+ if (this.currentSpeed > this.maxSpeed)
+ {
+ this.currentSpeed = this.maxSpeed;
+ }
+
+ int var4 = MathHelper.floor_double(this.thisEntity.posX);
+ int var5 = MathHelper.floor_double(this.thisEntity.posY);
+ int var6 = MathHelper.floor_double(this.thisEntity.posZ);
+ float var7 = this.currentSpeed;
+
+ if (this.speedBoosted)
+ {
+ if (this.speedBoostTime++ > this.maxSpeedBoostTime)
+ {
+ this.speedBoosted = false;
+ }
+
+ var7 += var7 * 1.15F * MathHelper.sin((float) this.speedBoostTime / (float) this.maxSpeedBoostTime * (float) Math.PI);
+ }
+
+ float var8 = 0.91F;
+
+ if (this.thisEntity.onGround)
+ {
+ var8 = 0.54600006F;
+ int var9 = this.thisEntity.worldObj.getBlockId(MathHelper.floor_float((float) var4), MathHelper.floor_float((float) var5) - 1, MathHelper.floor_float((float) var6));
+
+ if (var9 > 0)
+ {
+ var8 = Block.blocksList[var9].slipperiness * 0.91F;
+ }
+ }
+
+ float var22 = 0.16277136F / (var8 * var8 * var8);
+ float var10 = MathHelper.sin(var2.rotationYaw * (float) Math.PI / 180.0F);
+ float var11 = MathHelper.cos(var2.rotationYaw * (float) Math.PI / 180.0F);
+ float var12 = var2.getAIMoveSpeed() * var22;
+ float var13 = Math.max(var7, 1.0F);
+ var13 = var12 / var13;
+ float var14 = var7 * var13;
+ float var15 = -(var14 * var10);
+ float var16 = var14 * var11;
+
+ if (MathHelper.abs(var15) > MathHelper.abs(var16))
+ {
+ if (var15 < 0.0F)
+ {
+ var15 -= this.thisEntity.width / 2.0F;
+ }
+
+ if (var15 > 0.0F)
+ {
+ var15 += this.thisEntity.width / 2.0F;
+ }
+
+ var16 = 0.0F;
+ } else
+ {
+ var15 = 0.0F;
+
+ if (var16 < 0.0F)
+ {
+ var16 -= this.thisEntity.width / 2.0F;
+ }
+
+ if (var16 > 0.0F)
+ {
+ var16 += this.thisEntity.width / 2.0F;
+ }
+ }
+
+ int var17 = MathHelper.floor_double(this.thisEntity.posX + (double) var15);
+ int var18 = MathHelper.floor_double(this.thisEntity.posZ + (double) var16);
+ PathPoint var19 = new PathPoint(MathHelper.floor_float(this.thisEntity.width + 1.0F), MathHelper.floor_float(this.thisEntity.height + var1.height + 1.0F), MathHelper.floor_float(this.thisEntity.width + 1.0F));
+
+ if ((var4 != var17 || var6 != var18) && PathFinder.func_82565_a(this.thisEntity, var17, var5, var18, var19, false, false, true) == 0 && PathFinder.func_82565_a(this.thisEntity, var4, var5 + 1, var6, var19, false, false, true) == 1 && PathFinder.func_82565_a(this.thisEntity, var17, var5 + 1, var18, var19, false, false, true) == 1)
+ {
+ var2.getJumpHelper().setJumping();
+ }
+
+ boolean var20 = false;
+ byte var21 = 0;
+ int var23;
+
+ if (this.thisEntity.onGround && var1.isJumping)
+ {
+ this.thisEntity.onGround = false;
+ this.thisEntity.motionY = 1.4D;
+ var20 = true;
+ var23 = var21 - 1;
+ } else if (this.thisEntity.handleWaterMovement() && var1.isJumping)
+ {
+ this.thisEntity.motionY = 0.5D;
+ var20 = true;
+ var23 = var21 - 1;
+ } else if (var21 > 0 && !var20 && var1.isJumping)
+ {
+ this.thisEntity.motionY = 1.2D;
+ var20 = true;
+ var23 = var21 - 1;
+ }
+
+ this.thisEntity.moveEntityWithHeading(0.0F, var7);
+ }
+
+ public void setPositionPlusAngle(float var1)
+ {
+ this.thisEntity.rotationYaw = MathHelper.wrapAngleTo180_float(this.thisEntity.rotationYaw + var1);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/ai/AIEntityEatBlock.java b/src/main/java/net/aetherteam/aether/entities/ai/AIEntityEatBlock.java
new file mode 100644
index 0000000..d224ed2
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/ai/AIEntityEatBlock.java
@@ -0,0 +1,100 @@
+package net.aetherteam.aether.entities.ai;
+
+import net.minecraft.block.Block;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.ai.EntityAIBase;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class AIEntityEatBlock extends EntityAIBase
+{
+ private EntityLiving theEntity;
+ private World theWorld;
+ int eatGrassTick = 0;
+ Block blocktoEat;
+ Block blocktoReplace;
+
+ public AIEntityEatBlock(EntityLiving var1, Block var2, Block var3)
+ {
+ this.blocktoEat = var2;
+ this.blocktoReplace = var3;
+ this.theEntity = var1;
+ this.theWorld = var1.worldObj;
+ this.setMutexBits(7);
+ }
+
+ /**
+ * Returns whether the EntityAIBase should begin execution.
+ */
+ public boolean shouldExecute()
+ {
+ if (this.theEntity.getRNG().nextInt(this.theEntity.isChild() ? 50 : 1000) != 0)
+ {
+ return false;
+ } else
+ {
+ int var1 = MathHelper.floor_double(this.theEntity.posX);
+ int var2 = MathHelper.floor_double(this.theEntity.posY);
+ int var3 = MathHelper.floor_double(this.theEntity.posZ);
+ return this.theWorld.getBlockId(var1, var2, var3) == Block.tallGrass.blockID && this.theWorld.getBlockMetadata(var1, var2, var3) == 1 ? true : this.theWorld.getBlockId(var1, var2 - 1, var3) == this.blocktoEat.blockID;
+ }
+ }
+
+ /**
+ * Execute a one shot task or start executing a continuous task
+ */
+ public void startExecuting()
+ {
+ this.eatGrassTick = 40;
+ this.theWorld.setEntityState(this.theEntity, (byte) 10);
+ this.theEntity.getNavigator().clearPathEntity();
+ }
+
+ /**
+ * Resets the task
+ */
+ public void resetTask()
+ {
+ this.eatGrassTick = 0;
+ }
+
+ /**
+ * Returns whether an in-progress EntityAIBase should continue executing
+ */
+ public boolean continueExecuting()
+ {
+ return this.eatGrassTick > 0;
+ }
+
+ public int getEatGrassTick()
+ {
+ return this.eatGrassTick;
+ }
+
+ /**
+ * Updates the task
+ */
+ public void updateTask()
+ {
+ this.eatGrassTick = Math.max(0, this.eatGrassTick - 1);
+
+ if (this.eatGrassTick == 4)
+ {
+ int var1 = MathHelper.floor_double(this.theEntity.posX);
+ int var2 = MathHelper.floor_double(this.theEntity.posY);
+ int var3 = MathHelper.floor_double(this.theEntity.posZ);
+
+ if (this.theWorld.getBlockId(var1, var2, var3) == Block.tallGrass.blockID)
+ {
+ this.theWorld.playAuxSFX(2001, var1, var2, var3, Block.tallGrass.blockID + 4096);
+ this.theWorld.setBlock(var1, var2, var3, 0);
+ this.theEntity.eatGrassBonus();
+ } else if (this.theWorld.getBlockId(var1, var2 - 1, var3) == this.blocktoEat.blockID)
+ {
+ this.theWorld.playAuxSFX(2001, var1, var2 - 1, var3, this.blocktoEat.blockID);
+ this.theWorld.setBlock(var1, var2 - 1, var3, this.blocktoReplace.blockID);
+ this.theEntity.eatGrassBonus();
+ }
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/altar/EntityFakeItem.java b/src/main/java/net/aetherteam/aether/entities/altar/EntityFakeItem.java
new file mode 100644
index 0000000..a85603a
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/altar/EntityFakeItem.java
@@ -0,0 +1,292 @@
+package net.aetherteam.aether.entities.altar;
+
+import java.util.Iterator;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.StatCollector;
+import net.minecraft.world.World;
+
+public class EntityFakeItem extends EntityItem
+{
+ /**
+ * The age of this EntityItem (used to animate it up and down as well as expire it)
+ */
+ public int age;
+ public int delayBeforeCanPickup;
+ private int health;
+
+ /**
+ * The EntityItem's random initial float height.
+ */
+ public float hoverStart;
+
+ public EntityFakeItem(World var1, double var2, double var4, double var6)
+ {
+ super(var1);
+ this.age = 0;
+ this.health = 5;
+ this.hoverStart = (float) (Math.random() * Math.PI * 2.0D);
+ this.setSize(0.25F, 0.25F);
+ this.yOffset = this.height / 2.0F;
+ this.setPosition(var2, var4, var6);
+ this.rotationYaw = 0.0F;
+ }
+
+ public EntityFakeItem(World var1, double var2, double var4, double var6, ItemStack var8)
+ {
+ this(var1, var2, var4, var6);
+ this.setEntityItemStack(var8);
+ }
+
+ /**
+ * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to
+ * prevent them from trampling crops
+ */
+ protected boolean canTriggerWalking()
+ {
+ return false;
+ }
+
+ public EntityFakeItem(World var1)
+ {
+ super(var1);
+ this.age = 0;
+ this.health = 5;
+ this.hoverStart = (float) (Math.random() * Math.PI * 2.0D);
+ this.setSize(0.25F, 0.25F);
+ this.yOffset = this.height / 2.0F;
+ }
+
+ protected void entityInit()
+ {
+ this.getDataWatcher().addObjectByDataType(10, 5);
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ this.prevPosX = this.posX;
+ this.prevPosY = this.posY;
+ this.prevPosZ = this.posZ;
+ this.noClip = true;
+ ++this.age;
+ ItemStack var1 = this.getDataWatcher().getWatchableObjectItemStack(10);
+
+ if (var1 != null && var1.stackSize <= 0)
+ {
+ this.setDead();
+ }
+ }
+
+ private void searchForOtherItemsNearby()
+ {
+ Iterator var1 = this.worldObj.getEntitiesWithinAABB(EntityFakeItem.class, this.boundingBox.expand(0.5D, 0.0D, 0.5D)).iterator();
+
+ while (var1.hasNext())
+ {
+ EntityFakeItem var2 = (EntityFakeItem) var1.next();
+ this.combineItems(var2);
+ }
+ }
+
+ public boolean combineItems(EntityFakeItem var1)
+ {
+ if (var1 == this)
+ {
+ return false;
+ } else if (var1.isEntityAlive() && this.isEntityAlive())
+ {
+ ItemStack var2 = this.getEntityItem();
+ ItemStack var3 = var1.getEntityItem();
+
+ if (var3.getItem() != var2.getItem())
+ {
+ return false;
+ } else if (var3.hasTagCompound() ^ var2.hasTagCompound())
+ {
+ return false;
+ } else if (var3.hasTagCompound() && !var3.getTagCompound().equals(var2.getTagCompound()))
+ {
+ return false;
+ } else if (var3.getItem().getHasSubtypes() && var3.getItemDamage() != var2.getItemDamage())
+ {
+ return false;
+ } else if (var3.stackSize < var2.stackSize)
+ {
+ return var1.combineItems(this);
+ } else if (var3.stackSize + var2.stackSize > var3.getMaxStackSize())
+ {
+ return false;
+ } else
+ {
+ var3.stackSize += var2.stackSize;
+ var1.delayBeforeCanPickup = Math.max(var1.delayBeforeCanPickup, this.delayBeforeCanPickup);
+ var1.age = Math.min(var1.age, this.age);
+ var1.setEntityItemStack(var3);
+ this.setDead();
+ return true;
+ }
+ } else
+ {
+ return false;
+ }
+ }
+
+ /**
+ * sets the age of the item so that it'll despawn one minute after it has been dropped (instead of five). Used when
+ * items are dropped from players in creative mode
+ */
+ public void setAgeToCreativeDespawnTime()
+ {
+ this.age = 4800;
+ }
+
+ /**
+ * Returns if this entity is in water and will end up adding the waters velocity to the entity
+ */
+ public boolean handleWaterMovement()
+ {
+ return this.worldObj.handleMaterialAcceleration(this.boundingBox, Material.water, this);
+ }
+
+ /**
+ * Will deal the specified amount of damage to the entity if the entity isn't immune to fire damage. Args:
+ * amountDamage
+ */
+ protected void dealFireDamage(int var1)
+ {
+ this.attackEntityFrom(DamageSource.inFire, var1);
+ }
+
+ /**
+ * Called when the entity is attacked.
+ */
+ public boolean attackEntityFrom(DamageSource var1, int var2)
+ {
+ if (this.isEntityInvulnerable())
+ {
+ return false;
+ } else if (this.getEntityItem() != null && this.getEntityItem().itemID == Item.netherStar.itemID && var1.isExplosion())
+ {
+ return false;
+ } else
+ {
+ this.setBeenAttacked();
+ this.health -= var2;
+
+ if (this.health <= 0)
+ {
+ this.setDead();
+ }
+
+ return false;
+ }
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ var1.setShort("Health", (short) ((byte) this.health));
+ var1.setShort("Age", (short) this.age);
+
+ if (this.getEntityItem() != null)
+ {
+ var1.setCompoundTag("Item", this.getEntityItem().writeToNBT(new NBTTagCompound()));
+ }
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ this.setDead();
+ this.health = var1.getShort("Health") & 255;
+ this.age = var1.getShort("Age");
+ NBTTagCompound var2 = var1.getCompoundTag("Item");
+ this.setEntityItemStack(ItemStack.loadItemStackFromNBT(var2));
+ ItemStack var3 = this.getDataWatcher().getWatchableObjectItemStack(10);
+
+ if (var3 == null || var3.stackSize <= 0)
+ {
+ this.setDead();
+ }
+ }
+
+ /**
+ * Called by a player entity when they collide with an entity
+ */
+ public void onCollideWithPlayer(EntityPlayer var1)
+ {}
+
+ /**
+ * Gets the username of the entity.
+ */
+ public String getEntityName()
+ {
+ return StatCollector.translateToLocal("item." + this.getEntityItem().getItemName());
+ }
+
+ /**
+ * If returns false, the item will not inflict any damage against entities.
+ */
+ public boolean canAttackWithItem()
+ {
+ return false;
+ }
+
+ /**
+ * Teleports the entity to another dimension. Params: Dimension number to teleport to
+ */
+ public void travelToDimension(int var1)
+ {
+ super.travelToDimension(var1);
+
+ if (!this.worldObj.isRemote)
+ {
+ this.searchForOtherItemsNearby();
+ }
+ }
+
+ /**
+ * Returns the ItemStack corresponding to the Entity (Note: if no item exists, will log an error but still return an
+ * ItemStack containing Block.stone)
+ */
+ public ItemStack getEntityItem()
+ {
+ ItemStack var1 = this.getDataWatcher().getWatchableObjectItemStack(10);
+
+ if (var1 == null)
+ {
+ if (this.worldObj != null)
+ {
+ this.worldObj.getWorldLogAgent().logSevere("Item entity " + this.entityId + " has no item?!");
+ }
+
+ return new ItemStack(Block.stone);
+ } else
+ {
+ return var1;
+ }
+ }
+
+ /**
+ * Sets the ItemStack for this entity
+ */
+ public void setEntityItemStack(ItemStack var1)
+ {
+ this.getDataWatcher().updateObject(10, var1);
+ this.getDataWatcher().setObjectWatched(10);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/bosses/EntityBossMob.java b/src/main/java/net/aetherteam/aether/entities/bosses/EntityBossMob.java
new file mode 100644
index 0000000..6c8ac12
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/bosses/EntityBossMob.java
@@ -0,0 +1,281 @@
+package net.aetherteam.aether.entities.bosses;
+
+import java.util.Random;
+
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.entities.EntityAetherCoin;
+import net.aetherteam.aether.enums.EnumBossType;
+import net.aetherteam.aether.interfaces.IAetherBoss;
+import net.aetherteam.aether.party.Party;
+import net.minecraft.enchantment.EnchantmentHelper;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityCreature;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.monster.IMob;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.potion.Potion;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.EnumSkyBlock;
+import net.minecraft.world.World;
+
+public abstract class EntityBossMob extends EntityCreature implements IMob, IAetherBoss
+{
+ Random random = new Random();
+
+ public EntityBossMob(World var1)
+ {
+ super(var1);
+ this.experienceValue = 5;
+ }
+
+ /**
+ * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons
+ * use this to react to sunlight and start to burn.
+ */
+ public void onLivingUpdate()
+ {
+ this.updateArmSwingProgress();
+ float var1 = this.getBrightness(1.0F);
+
+ if (var1 > 0.5F)
+ {
+ this.entityAge += 2;
+ }
+
+ super.onLivingUpdate();
+ }
+
+ /**
+ * Called when the entity is attacked.
+ */
+ public boolean attackEntityFrom(DamageSource var1, int var2)
+ {
+ Dungeon var3 = DungeonHandler.instance().getInstanceAt(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ));
+
+ if (var3 != null && var3.hasQueuedParty())
+ {
+ Party var8 = var3.getQueuedParty();
+ int var5 = var3.getQueuedMembers().size() + 1;
+ float var6 = (float) (var5 - 1) * 0.075F;
+ int var7 = MathHelper.clamp_int((int) ((float) var2 - (float) var2 * var6), 1, var2);
+ return super.attackEntityFrom(var1, var7);
+ } else if (!super.attackEntityFrom(var1, var2))
+ {
+ return false;
+ } else
+ {
+ Entity var4 = var1.getEntity();
+
+ if (var4 != null)
+ {
+ if (this.riddenByEntity == var4 || this.ridingEntity == var4)
+ {
+ return true;
+ }
+
+ if (var4 != this)
+ {
+ this.entityToAttack = var4;
+ }
+ }
+
+ return true;
+ }
+ }
+
+ /**
+ * handles entity death timer, experience orb and particle creation
+ */
+ protected void onDeathUpdate()
+ {
+ if (this.deathTime == 0 && !this.worldObj.isRemote && (this.recentlyHit > 0 || this.isPlayer()) && !this.isChild())
+ {
+ for (int var1 = 0; var1 < 10 + this.random.nextInt(15); ++var1)
+ {
+ this.worldObj.spawnEntityInWorld(new EntityAetherCoin(this.worldObj, this.posX, this.posY, this.posZ, 1));
+ }
+ }
+
+ super.onDeathUpdate();
+ }
+
+ /**
+ * Determines if an entity can be despawned, used on idle far away entities
+ */
+ public boolean canDespawn()
+ {
+ return false;
+ }
+
+ /**
+ * Finds the closest player within 16 blocks to attack, or null if this Entity isn't interested in attacking
+ * (Animals, Spiders at day, peaceful PigZombies).
+ */
+ protected Entity findPlayerToAttack()
+ {
+ EntityPlayer var1 = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D);
+ return var1 != null && this.canEntityBeSeen(var1) ? var1 : null;
+ }
+
+ public boolean attackEntityAsMob(Entity var1)
+ {
+ int var2 = this.getAttackStrength(var1);
+
+ if (this.isPotionActive(Potion.damageBoost))
+ {
+ var2 += 3 << this.getActivePotionEffect(Potion.damageBoost).getAmplifier();
+ }
+
+ if (this.isPotionActive(Potion.weakness))
+ {
+ var2 -= 2 << this.getActivePotionEffect(Potion.weakness).getAmplifier();
+ }
+
+ int var3 = 0;
+
+ if (var1 instanceof EntityLiving)
+ {
+ var2 += EnchantmentHelper.getEnchantmentModifierLiving(this, (EntityLiving) var1);
+ var3 += EnchantmentHelper.getKnockbackModifier(this, (EntityLiving) var1);
+ }
+
+ boolean var4 = var1.attackEntityFrom(DamageSource.causeMobDamage(this), var2);
+
+ if (var4)
+ {
+ if (var3 > 0)
+ {
+ var1.addVelocity((double) (-MathHelper.sin(this.rotationYaw * (float) Math.PI / 180.0F) * (float) var3 * 0.5F), 0.1D, (double) (MathHelper.cos(this.rotationYaw * (float) Math.PI / 180.0F) * (float) var3 * 0.5F));
+ this.motionX *= 0.6D;
+ this.motionZ *= 0.6D;
+ }
+
+ int var5 = EnchantmentHelper.getFireAspectModifier(this);
+
+ if (var5 > 0)
+ {
+ var1.setFire(var5 * 4);
+ }
+ }
+
+ return var4;
+ }
+
+ /**
+ * Basic mob attack. Default to touch of death in EntityCreature. Overridden by each mob to define their attack.
+ */
+ protected void attackEntity(Entity var1, float var2)
+ {
+ if (this.attackTime <= 0 && var2 < 2.0F && var1.boundingBox.maxY > this.boundingBox.minY && var1.boundingBox.minY < this.boundingBox.maxY)
+ {
+ this.attackTime = 20;
+ this.attackEntityAsMob(var1);
+ }
+ }
+
+ /**
+ * Takes a coordinate in and returns a weight to determine how likely this creature will try to path to the block.
+ * Args: x, y, z
+ */
+ public float getBlockPathWeight(int var1, int var2, int var3)
+ {
+ return 0.5F - this.worldObj.getLightBrightness(var1, var2, var3);
+ }
+
+ protected boolean isValidLightLevel()
+ {
+ int var1 = MathHelper.floor_double(this.posX);
+ int var2 = MathHelper.floor_double(this.boundingBox.minY);
+ int var3 = MathHelper.floor_double(this.posZ);
+
+ if (this.worldObj.getSavedLightValue(EnumSkyBlock.Sky, var1, var2, var3) > this.rand.nextInt(32))
+ {
+ return false;
+ } else
+ {
+ int var4 = this.worldObj.getBlockLightValue(var1, var2, var3);
+
+ if (this.worldObj.isThundering())
+ {
+ int var5 = this.worldObj.skylightSubtracted;
+ this.worldObj.skylightSubtracted = 10;
+ var4 = this.worldObj.getBlockLightValue(var1, var2, var3);
+ this.worldObj.skylightSubtracted = var5;
+ }
+
+ return var4 <= this.rand.nextInt(8);
+ }
+ }
+
+ /**
+ * Checks if the entity's current position is a valid location to spawn this entity.
+ */
+ public boolean getCanSpawnHere()
+ {
+ return this.isValidLightLevel() && super.getCanSpawnHere();
+ }
+
+ /**
+ * Returns the amount of damage a mob should deal.
+ */
+ public int getAttackStrength(Entity var1)
+ {
+ return 2;
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+
+ if (!this.worldObj.isRemote && this.getBossHP() != this.health)
+ {
+ this.setBossHP();
+ }
+ }
+
+ protected void entityInit()
+ {
+ super.entityInit();
+ this.dataWatcher.addObject(26, Integer.valueOf(this.health));
+ }
+
+ public int getBossHP()
+ {
+ return this.dataWatcher.getWatchableObjectInt(26);
+ }
+
+ public void setBossHP()
+ {
+ this.dataWatcher.updateObject(26, Integer.valueOf(this.health));
+ }
+
+ public int getBossEntityID()
+ {
+ return this.entityId;
+ }
+
+ public String getBossTitle()
+ {
+ return "";
+ }
+
+ public Entity getBossEntity()
+ {
+ return this;
+ }
+
+ public int getBossStage()
+ {
+ return 0;
+ }
+
+ public EnumBossType getBossType()
+ {
+ return EnumBossType.MINI;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/bosses/EntityCog.java b/src/main/java/net/aetherteam/aether/entities/bosses/EntityCog.java
new file mode 100644
index 0000000..a05174a
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/bosses/EntityCog.java
@@ -0,0 +1,242 @@
+package net.aetherteam.aether.entities.bosses;
+
+import net.aetherteam.aether.entities.EntityBattleSentry;
+import net.aetherteam.aether.entities.EntitySentry;
+import net.aetherteam.aether.entities.EntitySentryGolem;
+import net.aetherteam.aether.entities.EntityTrackingGolem;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityFlying;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.NBTTagDouble;
+import net.minecraft.nbt.NBTTagList;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.Vec3;
+import net.minecraft.world.World;
+
+public class EntityCog extends EntityFlying
+{
+ public float rotationx;
+ public float rotationy;
+ public float rotationz;
+ private EntityLiving parent;
+ public double smotionX;
+ public double smotionY;
+ public double smotionZ;
+ public int life;
+ public int lifeSpan;
+ private static final double topSpeed = 0.125D;
+ private static final float sponge = (180F / (float) Math.PI);
+
+ public EntityCog(World var1)
+ {
+ super(var1);
+ this.texture = "/aether/mobs/cog.png";
+ this.lifeSpan = 200;
+ this.life = this.lifeSpan;
+ this.setSize(0.9F, 0.9F);
+ this.isImmuneToFire = true;
+ }
+
+ public void entityInit()
+ {
+ super.entityInit();
+ this.dataWatcher.addObject(16, Byte.valueOf((byte) 0));
+ }
+
+ public boolean isLarge()
+ {
+ return this.dataWatcher.getWatchableObjectByte(16) == 1;
+ }
+
+ public void setLarge(boolean var1)
+ {
+ if (var1)
+ {
+ this.dataWatcher.updateObject(16, Byte.valueOf((byte) 1));
+ } else
+ {
+ this.dataWatcher.updateObject(16, Byte.valueOf((byte) 0));
+ }
+ }
+
+ public int getMaxHealth()
+ {
+ return 5;
+ }
+
+ public EntityCog(World var1, double var2, double var4, double var6, boolean var8, EntityLiving var9)
+ {
+ super(var1);
+ this.texture = "/aether/mobs/cog.png";
+ this.lifeSpan = 200;
+ this.life = this.lifeSpan;
+ this.setSize(0.9F, 0.9F);
+ this.setPositionAndRotation(var2, var4, var6, this.rotationYaw, this.rotationPitch);
+ this.isImmuneToFire = true;
+ this.smotionX = (0.2D + (double) this.rand.nextFloat() * 0.15D) * (this.rand.nextInt(2) == 0 ? 1.0D : -1.0D);
+ this.smotionY = (0.2D + (double) this.rand.nextFloat() * 0.15D) * (this.rand.nextInt(2) == 0 ? 1.0D : -1.0D);
+ this.smotionZ = (0.2D + (double) this.rand.nextFloat() * 0.15D) * (this.rand.nextInt(2) == 0 ? 1.0D : -1.0D);
+ this.setLarge(var8);
+ this.parent = var9;
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+ --this.life;
+
+ if (this.life <= 0 && !this.isLarge())
+ {
+ this.isDead = true;
+ }
+
+ if (this.parent != null && this.parent.isDead && this.isLarge())
+ {
+ this.isDead = true;
+ }
+ }
+
+ public void splode()
+ {
+ this.worldObj.playSoundAtEntity(this, "aemob.cog.wallFinal", 2.0F, (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.2F);
+
+ for (int var1 = 0; var1 < 40; ++var1)
+ {
+ double var2 = (double) ((this.rand.nextFloat() - 0.5F) * 0.5F);
+ double var4 = (double) ((this.rand.nextFloat() - 0.5F) * 0.5F);
+ double var6 = (double) ((this.rand.nextFloat() - 0.5F) * 0.5F);
+ this.worldObj.spawnParticle("reddust", this.posX, this.posY, this.posZ, var2, var4, var6);
+ }
+ }
+
+ public void updateEntityActionState()
+ {
+ this.motionX = this.smotionX;
+ this.motionY = this.smotionY;
+ this.motionZ = this.smotionZ;
+
+ if (this.isCollided)
+ {
+ int var1 = MathHelper.floor_double(this.posX);
+ int var2 = MathHelper.floor_double(this.boundingBox.minY);
+ int var3 = MathHelper.floor_double(this.posZ);
+
+ if (this.smotionX > 0.0D && this.worldObj.getBlockId(var1 + 1, var2, var3) != 0)
+ {
+ this.motionX = this.smotionX = -this.smotionX;
+ } else if (this.smotionX < 0.0D && this.worldObj.getBlockId(var1 - 1, var2, var3) != 0)
+ {
+ this.motionX = this.smotionX = -this.smotionX;
+ }
+
+ if (this.smotionY > 0.0D && this.worldObj.getBlockId(var1, var2 + 1, var3) != 0)
+ {
+ this.motionY = this.smotionY = -this.smotionY;
+ } else if (this.smotionY < 0.0D && this.worldObj.getBlockId(var1, var2 - 1, var3) != 0)
+ {
+ this.motionY = this.smotionY = -this.smotionY;
+ }
+
+ if (this.smotionZ > 0.0D && this.worldObj.getBlockId(var1, var2, var3 + 1) != 0)
+ {
+ this.motionZ = this.smotionZ = -this.smotionZ;
+ } else if (this.smotionZ < 0.0D && this.worldObj.getBlockId(var1, var2, var3 - 1) != 0)
+ {
+ this.motionZ = this.smotionZ = -this.smotionZ;
+ }
+
+ this.splode();
+ }
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ super.writeEntityToNBT(var1);
+ var1.setShort("LifeLeft", (short) this.life);
+ var1.setTag("motion", this.newDoubleNBTList(new double[]{this.smotionX, this.smotionY, this.smotionZ}));
+ var1.setBoolean("Large", this.isLarge());
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ super.readEntityFromNBT(var1);
+ this.life = var1.getShort("LifeLeft");
+ NBTTagList var2 = var1.getTagList("motion");
+ this.smotionX = (double) ((float) ((NBTTagDouble) var2.tagAt(0)).data);
+ this.smotionY = (double) ((float) ((NBTTagDouble) var2.tagAt(1)).data);
+ this.smotionZ = (double) ((float) ((NBTTagDouble) var2.tagAt(2)).data);
+ this.setLarge(var1.getBoolean("Large"));
+ }
+
+ /**
+ * Applies a velocity to each of the entities pushing them away from each other. Args: entity
+ */
+ public void applyEntityCollision(Entity var1)
+ {
+ super.applyEntityCollision(var1);
+
+ if (var1 != null && var1 instanceof EntityLiving && !(var1 instanceof EntityCog) && !(var1 instanceof EntityLabyrinthEye))
+ {
+ if (var1 instanceof EntitySentry || var1 instanceof EntityTrackingGolem || var1 instanceof EntitySliderHostMimic || var1 instanceof EntitySentryGuardian || var1 instanceof EntitySentryGolem || var1 instanceof EntityBattleSentry || var1 instanceof EntitySlider || var1 instanceof EntityMiniSlider)
+ {
+ return;
+ }
+
+ var1.attackEntityFrom(DamageSource.causeThrownDamage(this, this.parent), 5);
+ }
+ }
+
+ /**
+ * Called when the entity is attacked.
+ */
+ public boolean attackEntityFrom(DamageSource var1, int var2)
+ {
+ if (var1.getEntity() != null)
+ {
+ Vec3 var3 = var1.getEntity().getLookVec();
+
+ if (var3 != null)
+ {
+ this.smotionX = var3.xCoord;
+ this.smotionY = var3.yCoord;
+ this.smotionZ = var3.zCoord;
+ }
+
+ return true;
+ } else
+ {
+ return false;
+ }
+ }
+
+ public void setThrowableHeading(double var1, double var3, double var5, float var7, float var8)
+ {
+ float var9 = MathHelper.sqrt_double(var1 * var1 + var3 * var3 + var5 * var5);
+ var1 /= (double) var9;
+ var3 /= (double) var9;
+ var5 /= (double) var9;
+ var1 += this.rand.nextGaussian() * 0.007499999832361937D * (double) var8;
+ var3 += this.rand.nextGaussian() * 0.007499999832361937D * (double) var8;
+ var5 += this.rand.nextGaussian() * 0.007499999832361937D * (double) var8;
+ var1 *= (double) var7;
+ var3 *= (double) var7;
+ var5 *= (double) var7;
+ this.motionX = var1;
+ this.motionY = var3;
+ this.motionZ = var5;
+ float var10 = MathHelper.sqrt_double(var1 * var1 + var5 * var5);
+ this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(var1, var5) * 180.0D / Math.PI);
+ this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(var3, (double) var10) * 180.0D / Math.PI);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/bosses/EntityFlyingMiniBoss.java b/src/main/java/net/aetherteam/aether/entities/bosses/EntityFlyingMiniBoss.java
new file mode 100644
index 0000000..0ae81be
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/bosses/EntityFlyingMiniBoss.java
@@ -0,0 +1,116 @@
+package net.aetherteam.aether.entities.bosses;
+
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.enums.EnumBossType;
+import net.aetherteam.aether.interfaces.IAetherBoss;
+import net.aetherteam.aether.party.Party;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityFlying;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class EntityFlyingMiniBoss extends EntityFlying implements IAetherBoss
+{
+ public EntityFlyingMiniBoss(World var1)
+ {
+ super(var1);
+ }
+
+ public int getMaxHealth()
+ {
+ return 200;
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+ DungeonHandler var1 = DungeonHandler.instance();
+ Dungeon var2 = var1.getInstanceAt(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ));
+
+ if (var2 != null && !var2.isActive())
+ {
+ this.setDead();
+ }
+
+ if (!this.worldObj.isRemote && this.getHealthTracked() != this.health)
+ {
+ this.setHealthTracked();
+ }
+ }
+
+ /**
+ * Called when the entity is attacked.
+ */
+ public boolean attackEntityFrom(DamageSource var1, int var2)
+ {
+ Dungeon var3 = DungeonHandler.instance().getInstanceAt(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ));
+
+ if (var3 != null && var3.hasQueuedParty())
+ {
+ Party var4 = var3.getQueuedParty();
+ int var5 = var3.getQueuedMembers().size() + 1;
+ float var6 = (float) (var5 - 1) * 0.075F;
+ int var7 = MathHelper.clamp_int((int) ((float) var2 - (float) var2 * var6), 1, var2);
+ return super.attackEntityFrom(var1, var7);
+ } else
+ {
+ return super.attackEntityFrom(var1, var2);
+ }
+ }
+
+ public void entityInit()
+ {
+ super.entityInit();
+ this.dataWatcher.addObject(26, Integer.valueOf(this.health));
+ }
+
+ public int getHealthTracked()
+ {
+ return this.dataWatcher.getWatchableObjectInt(26);
+ }
+
+ public void setHealthTracked()
+ {
+ this.dataWatcher.updateObject(26, Integer.valueOf(this.health));
+ }
+
+ public int getBossHP()
+ {
+ return this.getHealthTracked();
+ }
+
+ public int getBossMaxHP()
+ {
+ return this.getMaxHealth();
+ }
+
+ public int getBossEntityID()
+ {
+ return this.entityId;
+ }
+
+ public String getBossTitle()
+ {
+ return "";
+ }
+
+ public Entity getBossEntity()
+ {
+ return this;
+ }
+
+ public int getBossStage()
+ {
+ return 0;
+ }
+
+ public EnumBossType getBossType()
+ {
+ return EnumBossType.MINI;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/bosses/EntityHostEye.java b/src/main/java/net/aetherteam/aether/entities/bosses/EntityHostEye.java
new file mode 100644
index 0000000..48586f2
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/bosses/EntityHostEye.java
@@ -0,0 +1,435 @@
+package net.aetherteam.aether.entities.bosses;
+
+import net.aetherteam.aether.entities.EntityBattleSentry;
+import net.aetherteam.aether.entities.EntitySentry;
+import net.aetherteam.aether.entities.EntitySentryGolem;
+import net.aetherteam.aether.entities.EntityTrackingGolem;
+import net.aetherteam.aether.interfaces.IAetherMob;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityCreature;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.DamageSource;
+import net.minecraft.world.World;
+
+public class EntityHostEye extends EntityMiniBoss implements IAetherMob
+{
+ public String dir;
+ public int moveTimer;
+ public int dennis;
+ public int rennis;
+ public int chatTime;
+ public Entity target;
+ public boolean gotMovement;
+ public boolean crushed;
+ public float speedy;
+ public float harvey;
+ public int direction;
+ public EntitySliderHostMimic host;
+
+ public EntityHostEye(World var1)
+ {
+ super(var1);
+ this.dir = "/net/aetherteam/aether/client/sprites";
+ this.setSize(0.4F, 0.4F);
+ this.health = this.getHealth();
+ this.dennis = 1;
+ this.jumpMovementFactor = 0.0F;
+ this.texture = this.dir + "/mobs/host/hosteye.png";
+
+ if (this.target == null)
+ {
+ this.target = this.worldObj.getClosestPlayerToEntity(this, -1.0D);
+ }
+ }
+
+ public EntityHostEye(World var1, double var2, double var4, double var6, float var8, float var9)
+ {
+ this(var1);
+ this.setPositionAndRotation(var2, var4, var6, var8, var9);
+ }
+
+ public EntityHostEye(World var1, double var2, double var4, double var6, float var8, float var9, EntitySliderHostMimic var10, EntityLiving var11)
+ {
+ this(var1, var2, var4, var6, var8, var9);
+ this.host = var10;
+ this.target = var11;
+ }
+
+ public void entityInit()
+ {
+ super.entityInit();
+ }
+
+ /**
+ * Takes in the distance the entity has fallen this tick and whether its on the ground to update the fall distance
+ * and deal fall damage if landing on the ground. Args: distanceFallenThisTick, onGround
+ */
+ protected void updateFallState(double var1, boolean var3)
+ {}
+
+ /**
+ * Called when the mob is falling. Calculates and applies fall damage.
+ */
+ protected void fall(float var1)
+ {}
+
+ /**
+ * Determines if an entity can be despawned, used on idle far away entities
+ */
+ public boolean canDespawn()
+ {
+ return true;
+ }
+
+ /**
+ * Returns the sound this mob makes while it's alive.
+ */
+ protected String getLivingSound()
+ {
+ return null;
+ }
+
+ /**
+ * Returns the sound this mob makes when it is hurt.
+ */
+ protected String getHurtSound()
+ {
+ return null;
+ }
+
+ /**
+ * Returns the sound this mob makes on death.
+ */
+ protected String getDeathSound()
+ {
+ return null;
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ super.writeEntityToNBT(var1);
+ var1.setFloat("Speedy", this.speedy);
+ var1.setShort("MoveTimer", (short) this.moveTimer);
+ var1.setShort("Direction", (short) this.direction);
+ var1.setBoolean("GotMovement", this.gotMovement);
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ super.readEntityFromNBT(var1);
+ this.speedy = var1.getFloat("Speedy");
+ this.moveTimer = var1.getShort("MoveTimer");
+ this.direction = var1.getShort("Direction");
+ this.gotMovement = var1.getBoolean("GotMovement");
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+ this.jumpMovementFactor = 0.0F;
+ this.renderYawOffset = this.rotationPitch = this.rotationYaw = 0.0F;
+
+ if (this.target != null && this.target instanceof EntityLiving)
+ {
+ EntityLiving var1 = (EntityLiving) this.target;
+
+ if (var1.getHealth() <= 0 || !this.canEntityBeSeen(var1))
+ {
+ this.target = null;
+ this.stop();
+ this.moveTimer = 0;
+ return;
+ }
+ } else
+ {
+ if (this.target != null && this.target.isDead)
+ {
+ this.target = null;
+ this.stop();
+ this.moveTimer = 0;
+ return;
+ }
+
+ if (this.target == null)
+ {
+ this.target = this.worldObj.getClosestPlayerToEntity(this, -1.0D);
+
+ if (this.target == null)
+ {
+ this.target = null;
+ this.stop();
+ this.moveTimer = 0;
+
+ if (!this.worldObj.isRemote)
+ {
+ this.setDead();
+ }
+
+ return;
+ }
+ }
+ }
+
+ if (this.host != null && !this.host.isDead)
+ {
+ if (!this.host.canEntityBeSeen(this.target))
+ {
+ this.target = null;
+ this.stop();
+ this.moveTimer = 0;
+
+ if (!this.worldObj.isRemote)
+ {
+ this.setDead();
+ }
+ } else
+ {
+ this.fallDistance = 0.0F;
+ double var3;
+ double var5;
+ double var7;
+
+ if (this.gotMovement)
+ {
+ if (this.isCollided)
+ {
+ var7 = this.posX - 0.5D;
+ var3 = this.boundingBox.minY + 0.75D;
+ var5 = this.posZ - 0.5D;
+
+ if (this.crushed)
+ {
+ this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 3.0F, (0.625F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.2F) * 0.7F);
+ this.worldObj.playSoundAtEntity(this, "aeboss.slider.collide", 2.5F, 1.0F / (this.rand.nextFloat() * 0.2F + 0.9F));
+ }
+
+ this.stop();
+ } else
+ {
+ if (this.speedy < 2.0F)
+ {
+ this.speedy += 0.035F;
+ }
+
+ this.motionX = 0.0D;
+ this.motionY = 0.0D;
+ this.motionZ = 0.0D;
+
+ if (this.direction == 0)
+ {
+ this.motionY = (double) this.speedy;
+
+ if (this.boundingBox.minY > this.target.boundingBox.minY + 0.35D)
+ {
+ this.stop();
+ this.moveTimer = 8;
+ }
+ } else if (this.direction == 1)
+ {
+ this.motionY = (double) (-this.speedy);
+
+ if (this.boundingBox.minY < this.target.boundingBox.minY - 0.25D)
+ {
+ this.stop();
+ this.moveTimer = 8;
+ }
+ } else if (this.direction == 2)
+ {
+ this.motionX = (double) this.speedy;
+
+ if (this.posX > this.target.posX + 0.125D)
+ {
+ this.stop();
+ this.moveTimer = 8;
+ }
+ } else if (this.direction == 3)
+ {
+ this.motionX = (double) (-this.speedy);
+
+ if (this.posX < this.target.posX - 0.125D)
+ {
+ this.stop();
+ this.moveTimer = 8;
+ }
+ } else if (this.direction == 4)
+ {
+ this.motionZ = (double) this.speedy;
+
+ if (this.posZ > this.target.posZ + 0.125D)
+ {
+ this.stop();
+ this.moveTimer = 8;
+ }
+ } else if (this.direction == 5)
+ {
+ this.motionZ = (double) (-this.speedy);
+
+ if (this.posZ < this.target.posZ - 0.125D)
+ {
+ this.stop();
+ this.moveTimer = 8;
+ }
+ }
+ }
+ } else
+ {
+ this.motionY = 0.0D;
+
+ if (this.moveTimer > 0)
+ {
+ --this.moveTimer;
+ this.motionX = 0.0D;
+ this.motionY = 0.0D;
+ this.motionZ = 0.0D;
+ } else
+ {
+ var7 = Math.abs(this.posX - this.target.posX);
+ var3 = Math.abs(this.boundingBox.minY - this.target.boundingBox.minY);
+ var5 = Math.abs(this.posZ - this.target.posZ);
+
+ if (var7 > var5)
+ {
+ this.direction = 2;
+
+ if (this.posX > this.target.posX)
+ {
+ this.direction = 3;
+ }
+ } else
+ {
+ this.direction = 4;
+
+ if (this.posZ > this.target.posZ)
+ {
+ this.direction = 5;
+ }
+ }
+
+ if (var3 > var7 && var3 > var5 || var3 > 0.25D && this.rand.nextInt(5) == 0)
+ {
+ this.direction = 0;
+
+ if (this.posY > this.target.posY)
+ {
+ this.direction = 1;
+ }
+ }
+
+ this.gotMovement = true;
+ }
+ }
+
+ if (this.harvey > 0.01F)
+ {
+ this.harvey *= 0.8F;
+ }
+ }
+ } else
+ {
+ this.target = null;
+ this.stop();
+ this.moveTimer = 0;
+
+ if (!this.worldObj.isRemote)
+ {
+ this.setDead();
+ }
+ }
+ }
+
+ /**
+ * Applies a velocity to each of the entities pushing them away from each other. Args: entity
+ */
+ public void applyEntityCollision(Entity var1)
+ {
+ if (this.gotMovement)
+ {
+ if (var1 instanceof EntitySentry || var1 instanceof EntityTrackingGolem || var1 instanceof EntitySliderHostMimic || var1 instanceof EntitySentryGuardian || var1 instanceof EntitySentryGolem || var1 instanceof EntityBattleSentry)
+ {
+ return;
+ }
+
+ boolean var2 = var1.attackEntityFrom(DamageSource.causeMobDamage(this.host), 6);
+
+ if (var2 && var1 instanceof EntityLiving)
+ {
+ this.worldObj.playSoundAtEntity(this, "aeboss.slider.collide", 2.5F, 1.0F / (this.rand.nextFloat() * 0.2F + 0.9F));
+
+ if (var1 instanceof EntityCreature || var1 instanceof EntityPlayer)
+ {
+ EntityLiving var3 = (EntityLiving) var1;
+ var3.motionY += 0.35D;
+ var3.motionX *= 2.0D;
+ var3.motionZ *= 2.0D;
+ }
+
+ this.stop();
+ }
+ }
+ }
+
+ /**
+ * Drop 0-2 items of this living's type. @param par1 - Whether this entity has recently been hit by a player. @param
+ * par2 - Level of Looting used to kill this mob.
+ */
+ protected void dropFewItems(boolean var1, int var2)
+ {}
+
+ public void stop()
+ {
+ this.gotMovement = false;
+ this.moveTimer = 12;
+ this.direction = 0;
+ this.speedy = 0.0F;
+ this.motionX = 0.0D;
+ this.motionY = 0.0D;
+ this.motionZ = 0.0D;
+ }
+
+ /**
+ * Called when the entity is attacked.
+ */
+ public boolean attackEntityFrom(DamageSource var1, int var2)
+ {
+ return false;
+ }
+
+ /**
+ * Adds to the current velocity of the entity. Args: x, y, z
+ */
+ public void addVelocity(double var1, double var3, double var5)
+ {}
+
+ /**
+ * knocks back this entity
+ */
+ public void knockBack(Entity var1, int var2, double var3, double var5)
+ {}
+
+ public void addSquirrelButts(int var1, int var2, int var3)
+ {
+ if (this.worldObj.isRemote)
+ {
+ double var4 = (double) var1 + 0.5D + (double) (this.rand.nextFloat() - this.rand.nextFloat()) * 0.375D;
+ double var6 = (double) var2 + 0.5D + (double) (this.rand.nextFloat() - this.rand.nextFloat()) * 0.375D;
+ double var8 = (double) var3 + 0.5D + (double) (this.rand.nextFloat() - this.rand.nextFloat()) * 0.375D;
+ this.worldObj.spawnParticle("explode", var4, var6, var8, 0.0D, 0.0D, 0.0D);
+ }
+ }
+
+ public int getMaxHealth()
+ {
+ return 10;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/bosses/EntityKey.java b/src/main/java/net/aetherteam/aether/entities/bosses/EntityKey.java
new file mode 100644
index 0000000..d40dc46
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/bosses/EntityKey.java
@@ -0,0 +1,171 @@
+package net.aetherteam.aether.entities.bosses;
+
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.dungeons.keys.DungeonKey;
+import net.aetherteam.aether.dungeons.keys.EnumKeyType;
+import net.aetherteam.aether.party.PartyController;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.DamageSource;
+import net.minecraft.world.World;
+
+public class EntityKey extends Entity
+{
+ public int age;
+ public int delayBeforeCanPickup;
+ private int health;
+ public float hoverStart;
+ private Dungeon dungeon;
+
+ public EntityKey(World var1, double var2, double var4, double var6)
+ {
+ super(var1);
+ this.age = 0;
+ this.health = 5;
+ this.hoverStart = (float) (Math.random() * Math.PI * 2.0D);
+ this.setSize(0.25F, 0.25F);
+ this.yOffset = this.height / 2.0F;
+ this.setPosition(var2, var4, var6);
+ this.rotationYaw = 0.0F;
+ }
+
+ public EntityKey(World var1, double var2, double var4, double var6, ItemStack var8)
+ {
+ this(var1, var2, var4, var6);
+ }
+
+ /**
+ * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to
+ * prevent them from trampling crops
+ */
+ protected boolean canTriggerWalking()
+ {
+ return false;
+ }
+
+ public EntityKey(World var1)
+ {
+ super(var1);
+ this.age = 0;
+ this.health = 5;
+ this.hoverStart = (float) (Math.random() * Math.PI * 2.0D);
+ this.setSize(0.25F, 0.25F);
+ this.yOffset = this.height / 2.0F;
+ }
+
+ protected void entityInit()
+ {
+ this.getDataWatcher().addObjectByDataType(10, 5);
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ this.prevPosX = this.posX;
+ this.prevPosY = this.posY;
+ this.prevPosZ = this.posZ;
+ this.noClip = true;
+ ++this.age;
+
+ if (this.getDungeon() == null || this.getDungeon() != null && !this.getDungeon().isActive())
+ {
+ this.setDead();
+ }
+ }
+
+ public void setAgeToCreativeDespawnTime()
+ {
+ this.age = 4800;
+ }
+
+ /**
+ * Returns if this entity is in water and will end up adding the waters velocity to the entity
+ */
+ public boolean handleWaterMovement()
+ {
+ return false;
+ }
+
+ /**
+ * Will deal the specified amount of damage to the entity if the entity isn't immune to fire damage. Args:
+ * amountDamage
+ */
+ protected void dealFireDamage(int var1)
+ {}
+
+ /**
+ * Called when the entity is attacked.
+ */
+ public boolean attackEntityFrom(DamageSource var1, int var2)
+ {
+ return false;
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ var1.setShort("Health", (short) ((byte) this.health));
+ var1.setShort("Age", (short) this.age);
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ this.setDead();
+ this.health = var1.getShort("Health") & 255;
+ this.age = var1.getShort("Age");
+ this.setKeyName(var1.getString("KeyName"));
+ }
+
+ /**
+ * Called by a player entity when they collide with an entity
+ */
+ public void onCollideWithPlayer(EntityPlayer var1)
+ {
+ DungeonHandler.instance().getDungeon(PartyController.instance().getParty(var1)).addKey(new DungeonKey(EnumKeyType.getEnumFromItem(this)));
+ }
+
+ /**
+ * If returns false, the item will not inflict any damage against entities.
+ */
+ public boolean canAttackWithItem()
+ {
+ return false;
+ }
+
+ /**
+ * Teleports the entity to another dimension. Params: Dimension number to teleport to
+ */
+ public void travelToDimension(int var1)
+ {}
+
+ public void setKeyName(String var1)
+ {
+ this.getDataWatcher().updateObject(10, var1);
+ this.getDataWatcher().setObjectWatched(10);
+ }
+
+ public String getKeyName()
+ {
+ return this.getDataWatcher().getWatchableObjectString(10);
+ }
+
+ public void setDungeon(Dungeon var1)
+ {
+ this.dungeon = var1;
+ }
+
+ public Dungeon getDungeon()
+ {
+ return this.dungeon;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/bosses/EntityLabyrinthEye.java b/src/main/java/net/aetherteam/aether/entities/bosses/EntityLabyrinthEye.java
new file mode 100644
index 0000000..acd3f0c
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/bosses/EntityLabyrinthEye.java
@@ -0,0 +1,420 @@
+package net.aetherteam.aether.entities.bosses;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.network.PacketDispatcher;
+import cpw.mods.fml.relauncher.Side;
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.AetherCommonPlayerHandler;
+import net.aetherteam.aether.AetherNameGen;
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.dungeons.keys.DungeonKey;
+import net.aetherteam.aether.dungeons.keys.EnumKeyType;
+import net.aetherteam.aether.entities.ai.AIEntityArrowAttackCog;
+import net.aetherteam.aether.interfaces.IAetherBoss;
+import net.aetherteam.aether.packets.AetherPacketHandler;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.IRangedAttackMob;
+import net.minecraft.entity.ai.EntityAIHurtByTarget;
+import net.minecraft.entity.ai.EntityAILookIdle;
+import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
+import net.minecraft.entity.ai.EntityAIWatchClosest;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class EntityLabyrinthEye extends EntityMiniBoss implements IAetherBoss, IRangedAttackMob
+{
+ public boolean isAwake;
+ public String bossName;
+ private EntityLiving target;
+ public int cogTimer;
+ private int heightOffsetUpdateTime;
+ private float heightOffset = 0.5F;
+ private int chatTime;
+ public int timeUntilShoot = 30;
+ private boolean[] stageDone = new boolean[5];
+
+ public EntityLabyrinthEye(World var1)
+ {
+ super(var1);
+ this.isImmuneToFire = true;
+ this.moveSpeed = 0.5F;
+ this.tasks.addTask(4, new AIEntityArrowAttackCog(this, this.moveSpeed, 60, 10.0F));
+ this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
+ this.tasks.addTask(6, new EntityAILookIdle(this));
+ this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 16.0F, 0, true));
+ this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false));
+ this.bossName = AetherNameGen.gen();
+ this.texture = "/net/aetherteam/aether/client/sprites/mobs/cogboss/cogsleep.png";
+ this.stageDone[0] = false;
+ this.stageDone[1] = false;
+ this.stageDone[2] = false;
+ this.stageDone[3] = false;
+ this.stageDone[4] = false;
+ }
+
+ public void entityInit()
+ {
+ super.entityInit();
+ this.dataWatcher.addObject(16, Byte.valueOf((byte) 0));
+ }
+
+ /**
+ * Returns true if the newer Entity AI code should be run
+ */
+ public boolean isAIEnabled()
+ {
+ return true;
+ }
+
+ /**
+ * Determines if an entity can be despawned, used on idle far away entities
+ */
+ public boolean canDespawn()
+ {
+ return false;
+ }
+
+ /**
+ * Basic mob attack. Default to touch of death in EntityCreature. Overridden by each mob to define their attack.
+ */
+ protected void attackEntity(Entity var1, float var2)
+ {
+ this.target = (EntityLiving) var1;
+
+ if (var2 < 10.0F)
+ {
+ double var3 = var1.posX - this.posX;
+ double var5 = var1.posZ - this.posZ;
+
+ if (this.target != null)
+ {
+ if (!this.target.isDead && (double) this.target.getDistanceToEntity(this) <= 12.0D)
+ {
+ if (this.getAwake() && this.attackTime >= this.timeUntilShoot)
+ {
+ for (int var7 = 0; var7 < 4; ++var7)
+ {
+ if (this.isBossStage(var7))
+ {
+ this.spawnLargeCog(this.target, var7);
+ }
+ }
+
+ this.attackEntityWithRangedAttack(this.target);
+ }
+ } else
+ {
+ this.target = null;
+ this.attackTime = 0;
+ }
+
+ if (this.attackTime >= this.timeUntilShoot && this.canEntityBeSeen(this.target))
+ {
+ this.attackTime = -10;
+ }
+
+ if (this.attackTime < this.timeUntilShoot)
+ {
+ this.attackTime += 2;
+ }
+ }
+
+ this.rotationYaw = (float) (Math.atan2(var5, var3) * 180.0D / Math.PI) - 90.0F;
+ }
+ }
+
+ /**
+ * Attack the specified entity using a ranged attack.
+ */
+ public void attackEntityWithRangedAttack(EntityLiving var1)
+ {
+ double var2 = var1.posX - this.posX;
+ double var4 = var1.posZ - this.posZ;
+ double var6 = Math.sqrt(var2 * var2 + var4 * var4) + (this.posY - var1.posY);
+ double var10000 = var2 * var6;
+ var10000 = var4 * var6;
+ EntityCog var8 = new EntityCog(this.worldObj, this.posX - 0.25D, this.posY + 2.35D, this.posZ - 0.25D, false, this);
+ var8.rotationYaw = this.renderYawOffset;
+ var8.renderYawOffset = this.renderYawOffset;
+ var8.rotationPitch = this.rotationPitch;
+ double var9 = var1.posX + var1.motionX - this.posX;
+ double var11 = var1.posY + -this.posY;
+ double var13 = var1.posZ + var1.motionZ - this.posZ;
+ float var15 = MathHelper.sqrt_double(var9 * var9 + var13 * var13);
+
+ if (!this.worldObj.isRemote)
+ {
+ float var16 = var15 * 0.075F;
+ var8.setThrowableHeading(var9, var11 + (double) (var15 * 0.2F), var13, var16, 0.0F);
+ this.worldObj.spawnEntityInWorld(var8);
+ }
+ }
+
+ public void spawnLargeCog(EntityLiving var1, int var2)
+ {
+ if (!this.stageDone[var2])
+ {
+ double var3 = var1.posX - this.posX;
+ double var5 = var1.posZ - this.posZ;
+ double var7 = Math.sqrt(var3 * var3 + var5 * var5) + (this.posY - var1.posY);
+ double var10000 = var3 * var7;
+ var10000 = var5 * var7;
+ EntityCog var9 = new EntityCog(this.worldObj, this.posX - 0.25D, this.posY + 2.35D, this.posZ - 0.25D, true, this);
+ var9.rotationYaw = this.renderYawOffset;
+ var9.renderYawOffset = this.renderYawOffset;
+ var9.rotationPitch = this.rotationPitch;
+ double var10 = var1.posX + var1.motionX - this.posX;
+ double var12 = var1.posY + -this.posY;
+ double var14 = var1.posZ + var1.motionZ - this.posZ;
+ float var16 = MathHelper.sqrt_double(var10 * var10 + var14 * var14);
+
+ if (!this.worldObj.isRemote)
+ {
+ float var17 = var16 * 0.075F;
+ var9.setThrowableHeading(var10, var12 + (double) (var16 * 0.2F), var14, var17, 0.0F);
+ this.worldObj.spawnEntityInWorld(var9);
+ }
+
+ this.stageDone[var2] = true;
+ }
+ }
+
+ /**
+ * Called when the mob's health reaches 0.
+ */
+ public void onDeath(DamageSource var1)
+ {
+ if (var1.getEntity() instanceof EntityPlayer)
+ {
+ EntityPlayer var2 = (EntityPlayer) var1.getEntity();
+ Party var3 = PartyController.instance().getParty(PartyController.instance().getMember(var2));
+ Dungeon var4 = DungeonHandler.instance().getInstanceAt(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ));
+
+ if (var4 != null && var3 != null)
+ {
+ DungeonHandler.instance().addKey(var4, var3, new DungeonKey(EnumKeyType.Eye));
+ PacketDispatcher.sendPacketToAllPlayers(AetherPacketHandler.sendDungeonKey(var4, var3, EnumKeyType.Eye));
+ }
+ }
+
+ this.boss = new EntityLabyrinthEye(this.worldObj);
+ super.onDeath(var1);
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+ this.extinguish();
+
+ if (this.chatTime >= 0)
+ {
+ --this.chatTime;
+ }
+
+ this.fallDistance = 0.0F;
+
+ if (this.getAwake())
+ {
+ this.texture = "/net/aetherteam/aether/client/sprites/mobs/cogboss/cogawake.png";
+ } else
+ {
+ this.texture = "/net/aetherteam/aether/client/sprites/mobs/cogboss/cogsleep.png";
+ }
+
+ if (this.entityToAttack != null && this.getAwake())
+ {
+ this.attackEntity(this.entityToAttack, this.getDistanceToEntity(this.entityToAttack));
+
+ if (this.entityToAttack instanceof EntityPlayer)
+ {
+ ;
+ }
+ } else
+ {
+ this.motionX = this.motionY = this.motionZ = 0.0D;
+ }
+
+ if (!this.worldObj.isRemote)
+ {
+ if (this.rand.nextInt(100) == 1 && this.getEntityToAttack() != null)
+ {
+ ;
+ }
+
+ --this.heightOffsetUpdateTime;
+
+ if (this.heightOffsetUpdateTime <= 0)
+ {
+ this.heightOffsetUpdateTime = 100;
+ this.heightOffset = 0.5F + (float) this.rand.nextGaussian() * 3.0F;
+ }
+
+ if (this.getEntityToAttack() != null && this.getEntityToAttack().posY + (double) this.getEntityToAttack().getEyeHeight() > this.posY + (double) this.getEyeHeight() + (double) this.heightOffset)
+ {
+ this.motionY += (0.700000011920929D - this.motionY) * 0.700000011920929D;
+ }
+ }
+
+ if (!this.onGround && this.motionY < 0.0D)
+ {
+ this.motionY *= 0.8D;
+ }
+ }
+
+ private boolean isBossStage(int var1)
+ {
+ switch (var1)
+ {
+ case 0:
+ return this.getHealth() <= 250 && this.getHealth() >= 200;
+
+ case 1:
+ return this.getHealth() < 200 && this.getHealth() >= 150;
+
+ case 2:
+ return this.getHealth() < 150 && this.getHealth() >= 100;
+
+ case 3:
+ return this.getHealth() < 100 && this.getHealth() >= 50;
+
+ case 4:
+ return this.getHealth() < 50;
+
+ default:
+ return false;
+ }
+ }
+
+ /**
+ * Called when the entity is attacked.
+ */
+ public boolean attackEntityFrom(DamageSource var1, int var2)
+ {
+ Entity var3 = var1.getSourceOfDamage();
+ Entity var4 = var1.getEntity();
+ this.setAwake(true);
+ this.texture = "/net/aetherteam/aether/client/sprites/mobs/cogboss/cogawake.png";
+
+ if (var3 != null && var1.isProjectile())
+ {
+ if (var4 instanceof EntityPlayer && ((EntityPlayer) var4).getCurrentEquippedItem() != null)
+ {
+ this.chatItUp((EntityPlayer) var4, "Better switch to a sword, my " + ((EntityPlayer) var4).getCurrentEquippedItem().getItem().getItemDisplayName(((EntityPlayer) var4).getCurrentEquippedItem()) + " doesn\'t seem to affect it.");
+ this.chatTime = 60;
+ }
+
+ return false;
+ } else
+ {
+ if (var4 instanceof EntityPlayer)
+ {
+ EntityPlayer var5 = (EntityPlayer) var4;
+ AetherCommonPlayerHandler var6 = Aether.getPlayerBase(var5);
+ PartyMember var7 = PartyController.instance().getMember(var5);
+ Party var8 = PartyController.instance().getParty(var7);
+ Side var9 = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (var6 != null)
+ {
+ boolean var10 = true;
+
+ if (!var5.isDead && var10)
+ {
+ var6.setCurrentBoss(this);
+ }
+ }
+ }
+
+ return super.attackEntityFrom(var1, var2);
+ }
+ }
+
+ private void chatItUp(EntityPlayer var1, String var2)
+ {
+ if (this.chatTime <= 0)
+ {
+ Aether.proxy.displayMessage(var1, var2);
+ this.chatTime = 60;
+ }
+ }
+
+ /**
+ * Finds the closest player within 16 blocks to attack, or null if this Entity isn't interested in attacking
+ * (Animals, Spiders at day, peaceful PigZombies).
+ */
+ protected Entity findPlayerToAttack()
+ {
+ if (!this.getAwake())
+ {
+ return null;
+ } else
+ {
+ EntityPlayer var1 = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D);
+ this.texture = "/net/aetherteam/aether/client/sprites/mobs/cogboss/cogawake.png";
+ return var1 != null && this.canEntityBeSeen(var1) ? var1 : null;
+ }
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ super.writeEntityToNBT(var1);
+ var1.setBoolean("Awake", this.getAwake());
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ super.readEntityFromNBT(var1);
+ this.setAwake(var1.getBoolean("Awake"));
+ }
+
+ public boolean getAwake()
+ {
+ return this.dataWatcher.getWatchableObjectByte(16) == 1;
+ }
+
+ public void setAwake(boolean var1)
+ {
+ if (var1)
+ {
+ this.texture = "/net/aetherteam/aether/client/sprites/mobs/cog/cogawake.png";
+ this.dataWatcher.updateObject(16, Byte.valueOf((byte) 1));
+ } else
+ {
+ this.texture = "/net/aetherteam/aether/client/sprites/mobs/cog/cogsleep.png";
+ this.dataWatcher.updateObject(16, Byte.valueOf((byte) 0));
+ }
+ }
+
+ public int getMaxHealth()
+ {
+ return 250;
+ }
+
+ public String getBossTitle()
+ {
+ return this.bossName + ", the Labyrinth\'s Eye";
+ }
+
+ /**
+ * Attack the specified entity using a ranged attack.
+ */
+ public void attackEntityWithRangedAttack(EntityLiving var1, float var2)
+ {}
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/bosses/EntityMiniBoss.java b/src/main/java/net/aetherteam/aether/entities/bosses/EntityMiniBoss.java
new file mode 100644
index 0000000..2b1c0e7
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/bosses/EntityMiniBoss.java
@@ -0,0 +1,79 @@
+package net.aetherteam.aether.entities.bosses;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.relauncher.Side;
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.enums.EnumBossType;
+import net.aetherteam.aether.interfaces.IAetherBoss;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class EntityMiniBoss extends EntityBossMob implements IAetherBoss
+{
+ protected EntityLiving boss;
+ private double spawnX;
+ private double spawnY;
+ private double spawnZ;
+
+ public EntityMiniBoss(World var1)
+ {
+ super(var1);
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+ Side var1 = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (var1.isServer())
+ {
+ Dungeon var2 = DungeonHandler.instance().getInstanceAt(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ));
+
+ if (var2 != null && !var2.isActive())
+ {
+ this.setDead();
+ }
+ }
+ }
+
+ public int getBossMaxHP()
+ {
+ return this.getMaxHealth();
+ }
+
+ public int getBossEntityID()
+ {
+ return this.entityId;
+ }
+
+ public String getBossTitle()
+ {
+ return "";
+ }
+
+ public Entity getBossEntity()
+ {
+ return this;
+ }
+
+ public int getBossStage()
+ {
+ return 0;
+ }
+
+ public EnumBossType getBossType()
+ {
+ return EnumBossType.MINI;
+ }
+
+ public int getMaxHealth()
+ {
+ return 200;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/bosses/EntityMiniSlider.java b/src/main/java/net/aetherteam/aether/entities/bosses/EntityMiniSlider.java
new file mode 100644
index 0000000..905507b
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/bosses/EntityMiniSlider.java
@@ -0,0 +1,576 @@
+package net.aetherteam.aether.entities.bosses;
+
+import java.util.List;
+
+import net.aetherteam.aether.entities.EntityBattleSentry;
+import net.aetherteam.aether.entities.EntitySentry;
+import net.aetherteam.aether.entities.EntitySentryGolem;
+import net.aetherteam.aether.entities.EntityTrackingGolem;
+import net.aetherteam.aether.interfaces.IAetherMob;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityCreature;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.MovingObjectPosition;
+import net.minecraft.util.Vec3;
+import net.minecraft.world.World;
+
+public class EntityMiniSlider extends EntityMiniBoss implements IAetherMob
+{
+ public String dir;
+ public boolean reform;
+ public int moveTimer;
+ public int dennis;
+ public int rennis;
+ public int chatTime;
+ public Entity target;
+ public boolean gotMovement;
+ public boolean crushed;
+ public float speedy;
+ public float harvey;
+ public int direction;
+ public EntitySlider slider;
+
+ public EntityMiniSlider(World var1)
+ {
+ super(var1);
+ this.dir = "/net/aetherteam/aether/client/sprites";
+ this.reform = false;
+ this.setSize(0.4F, 0.4F);
+ this.health = this.getHealth();
+ this.dennis = 1;
+ this.jumpMovementFactor = 0.0F;
+ this.texture = this.dir + "/mobs/cog.png";
+
+ if (this.target == null)
+ {
+ this.target = this.worldObj.getClosestPlayerToEntity(this, -1.0D);
+ }
+ }
+
+ public EntityMiniSlider(World var1, double var2, double var4, double var6, float var8, float var9)
+ {
+ this(var1);
+ this.setPositionAndRotation(var2, var4, var6, var8, var9);
+ }
+
+ public EntityMiniSlider(World var1, double var2, double var4, double var6, float var8, float var9, EntitySlider var10, EntityLiving var11, double var12, double var14, double var16)
+ {
+ this(var1, var2, var4, var6, var8, var9);
+ this.slider = var10;
+ this.target = var11;
+ this.moveTimer = 60;
+ this.dataWatcher.updateObject(16, Integer.valueOf((int) var12));
+ this.dataWatcher.updateObject(17, Integer.valueOf((int) var14));
+ this.dataWatcher.updateObject(18, Integer.valueOf((int) var16));
+ }
+
+ public void entityInit()
+ {
+ super.entityInit();
+ this.dataWatcher.addObject(16, Integer.valueOf((int) this.posX));
+ this.dataWatcher.addObject(17, Integer.valueOf((int) this.posY));
+ this.dataWatcher.addObject(18, Integer.valueOf((int) this.posZ));
+ this.dataWatcher.addObject(19, Byte.valueOf((byte) 0));
+ }
+
+ public int getOrgX()
+ {
+ return this.dataWatcher.getWatchableObjectInt(16);
+ }
+
+ public int getOrgY()
+ {
+ return this.dataWatcher.getWatchableObjectInt(17);
+ }
+
+ public int getOrgZ()
+ {
+ return this.dataWatcher.getWatchableObjectInt(18);
+ }
+
+ public void setOrgX(int var1)
+ {
+ this.dataWatcher.updateObject(20, Integer.valueOf(var1));
+ }
+
+ public void setOrgY(int var1)
+ {
+ this.dataWatcher.updateObject(21, Integer.valueOf(var1));
+ }
+
+ public void setOrgZ(int var1)
+ {
+ this.dataWatcher.updateObject(22, Integer.valueOf(var1));
+ }
+
+ public boolean isReformed()
+ {
+ return (this.dataWatcher.getWatchableObjectByte(19) & 1) != 0;
+ }
+
+ public void setReformed(boolean var1)
+ {
+ if (!this.worldObj.isRemote)
+ {
+ if (var1)
+ {
+ this.dataWatcher.updateObject(19, Byte.valueOf((byte) 1));
+ } else
+ {
+ this.dataWatcher.updateObject(19, Byte.valueOf((byte) 0));
+ }
+ }
+ }
+
+ /**
+ * Takes in the distance the entity has fallen this tick and whether its on the ground to update the fall distance
+ * and deal fall damage if landing on the ground. Args: distanceFallenThisTick, onGround
+ */
+ protected void updateFallState(double var1, boolean var3)
+ {}
+
+ /**
+ * Called when the mob is falling. Calculates and applies fall damage.
+ */
+ protected void fall(float var1)
+ {}
+
+ /**
+ * Determines if an entity can be despawned, used on idle far away entities
+ */
+ public boolean canDespawn()
+ {
+ return true;
+ }
+
+ /**
+ * Returns the sound this mob makes while it's alive.
+ */
+ protected String getLivingSound()
+ {
+ return null;
+ }
+
+ /**
+ * Returns the sound this mob makes when it is hurt.
+ */
+ protected String getHurtSound()
+ {
+ return null;
+ }
+
+ /**
+ * Returns the sound this mob makes on death.
+ */
+ protected String getDeathSound()
+ {
+ return null;
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ super.writeEntityToNBT(var1);
+ var1.setFloat("Speedy", this.speedy);
+ var1.setShort("MoveTimer", (short) this.moveTimer);
+ var1.setShort("Direction", (short) this.direction);
+ var1.setBoolean("GotMovement", this.gotMovement);
+ var1.setBoolean("Reformed", this.isReformed());
+ var1.setInteger("OrgX", this.getOrgX());
+ var1.setInteger("OrgY", this.getOrgY());
+ var1.setInteger("OrgZ", this.getOrgZ());
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ super.readEntityFromNBT(var1);
+ this.speedy = var1.getFloat("Speedy");
+ this.moveTimer = var1.getShort("MoveTimer");
+ this.direction = var1.getShort("Direction");
+ this.gotMovement = var1.getBoolean("GotMovement");
+ this.setReformed(var1.getBoolean("Reformed"));
+ this.setOrgX(var1.getInteger("OrgX"));
+ this.setOrgY(var1.getInteger("OrgY"));
+ this.setOrgZ(var1.getInteger("OrgZ"));
+ }
+
+ public void reform()
+ {
+ this.reform = true;
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+ this.jumpMovementFactor = 0.0F;
+ this.renderYawOffset = this.rotationPitch = this.rotationYaw = 0.0F;
+
+ if (this.target != null && this.target instanceof EntityLiving)
+ {
+ EntityLiving var1 = (EntityLiving) this.target;
+
+ if (var1.getHealth() <= 0 || !this.canEntityBeSeen(var1))
+ {
+ this.target = null;
+ this.stop();
+ this.moveTimer = 0;
+ return;
+ }
+ } else
+ {
+ if (this.target != null && this.target.isDead)
+ {
+ this.target = null;
+ this.stop();
+ this.moveTimer = 0;
+ return;
+ }
+
+ if (this.target == null)
+ {
+ this.target = this.worldObj.getClosestPlayerToEntity(this, -1.0D);
+
+ if (this.target == null)
+ {
+ this.target = null;
+ this.stop();
+ this.moveTimer = 0;
+
+ if (!this.worldObj.isRemote)
+ {
+ this.setDead();
+ }
+
+ return;
+ }
+ }
+ }
+
+ if (this.posX == (double) this.getOrgX() && this.posY == (double) this.getOrgY() && this.posZ == (double) this.getOrgZ())
+ {
+ if (!this.isReformed())
+ {
+ this.setReformed(true);
+ }
+
+ this.stop();
+ this.moveTimer = 0;
+ }
+
+ if (this.slider == null)
+ {
+ Vec3 var16 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
+ Vec3 var2 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
+ MovingObjectPosition var18 = this.worldObj.rayTraceBlocks(var16, var2);
+ var16 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
+ var2 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
+
+ if (var18 != null)
+ {
+ var2 = Vec3.createVectorHelper(var18.hitVec.xCoord, var18.hitVec.yCoord, var18.hitVec.zCoord);
+ }
+
+ if (!this.worldObj.isRemote)
+ {
+ Object var4 = null;
+ List var15 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(4.0D, 4.0D, 4.0D));
+ double var6 = 0.0D;
+
+ for (int var8 = 0; var8 < var15.size(); ++var8)
+ {
+ Entity var9 = (Entity) var15.get(var8);
+
+ if (var9.canBeCollidedWith() && var9 != this)
+ {
+ float var10 = 0.3F;
+
+ if (var9 instanceof EntitySlider)
+ {
+ this.slider = (EntitySlider) var9;
+ var18 = null;
+ }
+
+ AxisAlignedBB var11 = var9.boundingBox.expand((double) var10, (double) var10, (double) var10);
+ MovingObjectPosition var12 = var11.calculateIntercept(var16, var2);
+
+ if (var12 != null)
+ {
+ double var13 = var16.distanceTo(var12.hitVec);
+
+ if (var13 < var6 || var6 == 0.0D)
+ {
+ var6 = var13;
+ }
+ }
+ }
+ }
+ }
+
+ if (this.slider == null || this.slider.isDead)
+ {
+ this.target = null;
+ this.stop();
+ this.moveTimer = 0;
+
+ if (!this.worldObj.isRemote)
+ {
+ this.setDead();
+ }
+ }
+ } else if (this.slider.target != this.target)
+ {
+ this.target = null;
+ this.stop();
+ this.moveTimer = 0;
+
+ if (!this.worldObj.isRemote)
+ {
+ this.setDead();
+ }
+ } else
+ {
+ this.fallDistance = 0.0F;
+ double var17;
+ double var5;
+ double var3;
+
+ if (this.gotMovement)
+ {
+ if (this.isCollided)
+ {
+ var17 = this.posX - 0.5D;
+ var3 = this.boundingBox.minY + 0.75D;
+ var5 = this.posZ - 0.5D;
+
+ if (this.crushed)
+ {
+ this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 3.0F, (0.625F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.2F) * 0.7F);
+ this.worldObj.playSoundAtEntity(this, "aeboss.slider.collide", 2.5F, 1.0F / (this.rand.nextFloat() * 0.2F + 0.9F));
+ }
+
+ this.stop();
+ } else
+ {
+ if (this.speedy < 2.0F)
+ {
+ this.speedy += 0.035F;
+ }
+
+ this.motionX = 0.0D;
+ this.motionY = 0.0D;
+ this.motionZ = 0.0D;
+
+ if (this.direction == 0)
+ {
+ this.motionY = (double) this.speedy;
+
+ if (this.boundingBox.minY > (this.reform ? (double) this.getOrgY() : this.target.boundingBox.minY + 0.35D))
+ {
+ this.stop();
+ this.moveTimer = 8;
+ }
+ } else if (this.direction == 1)
+ {
+ this.motionY = (double) (-this.speedy);
+
+ if (this.boundingBox.minY < (this.reform ? (double) this.getOrgY() : this.target.boundingBox.minY - 0.25D))
+ {
+ this.stop();
+ this.moveTimer = 8;
+ }
+ } else if (this.direction == 2)
+ {
+ this.motionX = (double) this.speedy;
+
+ if (this.posX > (this.reform ? (double) this.getOrgX() - 1.0D : this.target.posX + 0.125D))
+ {
+ this.stop();
+ this.moveTimer = 8;
+ }
+ } else if (this.direction == 3)
+ {
+ this.motionX = (double) (-this.speedy);
+
+ if (this.posX < (this.reform ? (double) this.getOrgX() - 1.0D : this.target.posX - 0.125D))
+ {
+ this.stop();
+ this.moveTimer = 8;
+ }
+ } else if (this.direction == 4)
+ {
+ this.motionZ = (double) this.speedy;
+
+ if (this.posZ > (this.reform ? (double) this.getOrgZ() - 1.0D : this.target.posZ + 0.125D))
+ {
+ this.stop();
+ this.moveTimer = 8;
+ }
+ } else if (this.direction == 5)
+ {
+ this.motionZ = (double) (-this.speedy);
+
+ if (this.posZ < (this.reform ? (double) this.getOrgZ() - 1.0D : this.target.posZ - 0.125D))
+ {
+ this.stop();
+ this.moveTimer = 8;
+ }
+ }
+ }
+ } else
+ {
+ this.motionY = 0.0D;
+
+ if (this.moveTimer > 0)
+ {
+ --this.moveTimer;
+ this.motionX = 0.0D;
+ this.motionY = 0.0D;
+ this.motionZ = 0.0D;
+ } else
+ {
+ var17 = Math.abs(this.posX - (this.reform ? (double) this.getOrgX() : this.target.posX));
+ var3 = Math.abs(this.boundingBox.minY - (this.reform ? (double) this.getOrgY() : this.target.boundingBox.minY));
+ var5 = Math.abs(this.posZ - (this.reform ? (double) this.getOrgZ() : this.target.posZ));
+
+ if (var17 > var5)
+ {
+ this.direction = 2;
+
+ if (this.posX > (this.reform ? (double) this.getOrgX() - 1.0D : this.target.posX))
+ {
+ this.direction = 3;
+ }
+ } else
+ {
+ this.direction = 4;
+
+ if (this.posZ > (this.reform ? (double) this.getOrgZ() - 1.0D : this.target.posZ))
+ {
+ this.direction = 5;
+ }
+ }
+
+ if (var3 > var17 && var3 > var5 || var3 > 0.25D && this.rand.nextInt(5) == 0)
+ {
+ this.direction = 0;
+
+ if (this.posY > (this.reform ? (double) this.getOrgY() : this.target.posY))
+ {
+ this.direction = 1;
+ }
+ }
+
+ this.gotMovement = true;
+ }
+ }
+
+ if (this.harvey > 0.01F)
+ {
+ this.harvey *= 0.8F;
+ }
+ }
+ }
+
+ /**
+ * Applies a velocity to each of the entities pushing them away from each other. Args: entity
+ */
+ public void applyEntityCollision(Entity var1)
+ {
+ if (this.gotMovement)
+ {
+ if (var1 instanceof EntitySentry || var1 instanceof EntityTrackingGolem || var1 instanceof EntitySliderHostMimic || var1 instanceof EntitySentryGuardian || var1 instanceof EntitySentryGolem || var1 instanceof EntityBattleSentry || var1 instanceof EntitySlider || var1 instanceof EntityMiniSlider)
+ {
+ return;
+ }
+
+ boolean var2 = var1.attackEntityFrom(DamageSource.causeMobDamage(this.slider), 6);
+
+ if (var2 && var1 instanceof EntityLiving)
+ {
+ this.worldObj.playSoundAtEntity(this, "aeboss.slider.collide", 2.5F, 1.0F / (this.rand.nextFloat() * 0.2F + 0.9F));
+
+ if (var1 instanceof EntityCreature || var1 instanceof EntityPlayer)
+ {
+ EntityLiving var3 = (EntityLiving) var1;
+ var3.motionY += 0.35D;
+ var3.motionX *= 2.0D;
+ var3.motionZ *= 2.0D;
+ }
+
+ this.stop();
+ }
+ }
+ }
+
+ /**
+ * Drop 0-2 items of this living's type. @param par1 - Whether this entity has recently been hit by a player. @param
+ * par2 - Level of Looting used to kill this mob.
+ */
+ protected void dropFewItems(boolean var1, int var2)
+ {}
+
+ public void stop()
+ {
+ this.gotMovement = false;
+ this.moveTimer = 12;
+ this.direction = 0;
+ this.speedy = 0.0F;
+ this.motionX = 0.0D;
+ this.motionY = 0.0D;
+ this.motionZ = 0.0D;
+ }
+
+ /**
+ * Called when the entity is attacked.
+ */
+ public boolean attackEntityFrom(DamageSource var1, int var2)
+ {
+ if (this.slider != null)
+ {
+ this.slider.attackEntityFrom(DamageSource.causeMobDamage(this), var2);
+ }
+
+ this.heal(var2);
+ return super.attackEntityFrom(var1, var2);
+ }
+
+ /**
+ * Adds to the current velocity of the entity. Args: x, y, z
+ */
+ public void addVelocity(double var1, double var3, double var5)
+ {}
+
+ /**
+ * knocks back this entity
+ */
+ public void knockBack(Entity var1, int var2, double var3, double var5)
+ {}
+
+ public void addSquirrelButts(int var1, int var2, int var3)
+ {
+ if (this.worldObj.isRemote)
+ {
+ double var4 = (double) var1 + 0.5D + (double) (this.rand.nextFloat() - this.rand.nextFloat()) * 0.375D;
+ double var6 = (double) var2 + 0.5D + (double) (this.rand.nextFloat() - this.rand.nextFloat()) * 0.375D;
+ double var8 = (double) var3 + 0.5D + (double) (this.rand.nextFloat() - this.rand.nextFloat()) * 0.375D;
+ this.worldObj.spawnParticle("explode", var4, var6, var8, 0.0D, 0.0D, 0.0D);
+ }
+ }
+
+ public int getMaxHealth()
+ {
+ return 10;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/bosses/EntitySentryGuardian.java b/src/main/java/net/aetherteam/aether/entities/bosses/EntitySentryGuardian.java
new file mode 100644
index 0000000..76cc161
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/bosses/EntitySentryGuardian.java
@@ -0,0 +1,406 @@
+package net.aetherteam.aether.entities.bosses;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.network.PacketDispatcher;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.AetherCommonPlayerHandler;
+import net.aetherteam.aether.AetherNameGen;
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.dungeons.keys.DungeonKey;
+import net.aetherteam.aether.dungeons.keys.EnumKeyType;
+import net.aetherteam.aether.entities.EntitySentry;
+import net.aetherteam.aether.enums.EnumBossType;
+import net.aetherteam.aether.interfaces.IAetherBoss;
+import net.aetherteam.aether.packets.AetherPacketHandler;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.ai.EntityAIMoveTwardsRestriction;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.potion.Potion;
+import net.minecraft.potion.PotionEffect;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class EntitySentryGuardian extends EntityMiniBoss implements IAetherBoss
+{
+ private String bossName;
+ private int heightOffsetUpdateTime;
+ private float heightOffset = 0.5F;
+ public int chatTime;
+ private int attackTimer;
+
+ public EntitySentryGuardian(World var1)
+ {
+ super(var1);
+ this.isImmuneToFire = true;
+ this.jumpMovementFactor = 0.0F;
+ this.tasks.addTask(1, new EntityAIMoveTwardsRestriction(this, this.moveSpeed));
+ this.bossName = AetherNameGen.gen();
+ this.setSize(2.25F, 2.5F);
+ this.moveSpeed = 1.6F;
+ this.health = this.getMaxHealth();
+
+ if (!this.getHasBeenAttacked())
+ {
+ this.texture = "/net/aetherteam/aether/client/sprites/mobs/sentrygolemboss/sentryGolemBoss.png";
+ } else
+ {
+ this.texture = "/net/aetherteam/aether/client/sprites/mobs/sentrygolemboss/sentryGolemBoss_red.png";
+ }
+ }
+
+ public EntitySentryGuardian(World var1, int var2, int var3, int var4, int var5, int var6)
+ {
+ super(var1);
+ this.bossName = AetherNameGen.gen();
+ this.setSize(2.25F, 2.5F);
+ this.setPosition((double) var2 + 0.5D, (double) var3, (double) var4 + 0.5D);
+ this.health = 250;
+
+ if (!this.getHasBeenAttacked())
+ {
+ this.texture = "/net/aetherteam/aether/client/sprites/mobs/sentrygolemboss/sentryGolemBoss.png";
+ } else
+ {
+ this.texture = "/net/aetherteam/aether/client/sprites/mobs/sentrygolemboss/sentryGolemBoss_red.png";
+ }
+ }
+
+ public void entityInit()
+ {
+ super.entityInit();
+ this.dataWatcher.addObject(16, Byte.valueOf((byte) 0));
+ }
+
+ public boolean getHasBeenAttacked()
+ {
+ return this.dataWatcher.getWatchableObjectByte(16) == 1;
+ }
+
+ public void setHasBeenAttacked(boolean var1)
+ {
+ if (var1)
+ {
+ this.texture = "/net/aetherteam/aether/client/sprites/mobs/sentrygolemboss/sentryGolemBoss_red.png";
+ this.dataWatcher.updateObject(16, Byte.valueOf((byte) 1));
+ } else
+ {
+ this.texture = "/net/aetherteam/aether/client/sprites/mobs/sentrygolemboss/sentryGolemBoss.png";
+ this.dataWatcher.updateObject(16, Byte.valueOf((byte) 0));
+ }
+ }
+
+ /**
+ * Finds the closest player within 16 blocks to attack, or null if this Entity isn't interested in attacking
+ * (Animals, Spiders at day, peaceful PigZombies).
+ */
+ protected Entity findPlayerToAttack()
+ {
+ if (!this.getHasBeenAttacked())
+ {
+ return null;
+ } else
+ {
+ EntityPlayer var1 = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D);
+ this.texture = "/net/aetherteam/aether/client/sprites/mobs/sentrygolemboss/sentryGolemBoss_red.png";
+ return var1 != null && this.canEntityBeSeen(var1) ? var1 : null;
+ }
+ }
+
+ public void spawnSentry()
+ {
+ if (!this.worldObj.isRemote)
+ {
+ EntitySentry var1 = new EntitySentry(this.worldObj, this.posX, this.posY, this.posZ);
+ this.worldObj.spawnEntityInWorld(var1);
+ var1.motionY = 1.0D;
+ var1.fallDistance = -100.0F;
+ var1.setAttackTarget(this.getAttackTarget());
+ this.worldObj.playSoundAtEntity(this, "aemob.sentryGuardian.spawn", 2.0F, 1.0F);
+ }
+ }
+
+ /**
+ * Called when the mob's health reaches 0.
+ */
+ public void onDeath(DamageSource var1)
+ {
+ this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 0.3F, false);
+ this.spawnSentry();
+
+ if (var1.getEntity() instanceof EntityPlayer)
+ {
+ EntityPlayer var2 = (EntityPlayer) var1.getEntity();
+ Party var3 = PartyController.instance().getParty(PartyController.instance().getMember(var2));
+ Dungeon var4 = DungeonHandler.instance().getInstanceAt(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ));
+
+ if (var4 != null && var3 != null)
+ {
+ DungeonHandler.instance().addKey(var4, var3, new DungeonKey(EnumKeyType.Guardian));
+ PacketDispatcher.sendPacketToAllPlayers(AetherPacketHandler.sendDungeonKey(var4, var3, EnumKeyType.Guardian));
+ }
+ }
+
+ this.boss = new EntitySentryGuardian(this.worldObj);
+ super.onDeath(var1);
+ }
+
+ /**
+ * Determines if an entity can be despawned, used on idle far away entities
+ */
+ public boolean canDespawn()
+ {
+ return false;
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+ this.extinguish();
+ this.jumpMovementFactor = 0.0F;
+
+ if (this.health > 0)
+ {
+ double var1 = (double) (this.rand.nextFloat() - 0.5F);
+ double var3 = (double) this.rand.nextFloat();
+ double var5 = (double) (this.rand.nextFloat() - 0.5F);
+ double var7 = this.posX + var1 * var3;
+ double var9 = this.boundingBox.minY + var3 - 0.30000001192092896D;
+ double var11 = this.posZ + var5 * var3;
+
+ if (!this.getHasBeenAttacked())
+ {
+ this.worldObj.spawnParticle("reddust", var7, var9, var11, -0.30000001192092896D, 0.800000011920929D, 0.8999999761581421D);
+ } else
+ {
+ this.worldObj.spawnParticle("reddust", var7, var9, var11, 0.0D, 0.0D, 0.0D);
+ }
+ }
+
+ if (this.chatTime > 0)
+ {
+ --this.chatTime;
+ }
+ }
+
+ public boolean attackEntityAsMob(Entity var1)
+ {
+ this.attackTimer = 10;
+ this.worldObj.setEntityState(this, (byte) 4);
+ boolean var2 = var1.attackEntityFrom(DamageSource.causeMobDamage(this), 7 + this.rand.nextInt(15));
+
+ if (var2)
+ {
+ var1.motionY += 0.4000000059604645D;
+ var1.motionZ += 0.4000000059604645D;
+ var1.motionX += 0.4000000059604645D;
+ }
+
+ this.worldObj.playSoundAtEntity(this, "mob.irongolem.throw", 1.0F, 1.0F);
+ return var2;
+ }
+
+ @SideOnly(Side.CLIENT)
+ public int getAttackTimer()
+ {
+ return this.attackTimer;
+ }
+
+ /**
+ * Returns the amount of damage a mob should deal.
+ */
+ public int getAttackStrength(Entity var1)
+ {
+ return 10;
+ }
+
+ public boolean isPotionApplicable(PotionEffect var1)
+ {
+ return var1.getPotionID() == Potion.poison.id ? false : super.isPotionApplicable(var1);
+ }
+
+ /**
+ * Called when the entity is attacked.
+ */
+ public boolean attackEntityFrom(DamageSource var1, int var2)
+ {
+ Entity var3 = var1.getSourceOfDamage();
+ Entity var4 = var1.getEntity();
+
+ if (var3 != null && var1.isProjectile())
+ {
+ if (var4 instanceof EntityPlayer && ((EntityPlayer) var4).getCurrentEquippedItem() != null)
+ {
+ this.chatItUp((EntityPlayer) var4, "Better switch to a sword, my " + ((EntityPlayer) var4).getCurrentEquippedItem().getItem().getItemDisplayName(((EntityPlayer) var4).getCurrentEquippedItem()) + " doesn\'t seem to affect it.");
+ this.chatTime = 60;
+ }
+
+ return false;
+ } else
+ {
+ if (var4 instanceof EntityPlayer)
+ {
+ EntityPlayer var5 = (EntityPlayer) var4;
+ AetherCommonPlayerHandler var6 = Aether.getPlayerBase(var5);
+ PartyMember var7 = PartyController.instance().getMember(var5);
+ Party var8 = PartyController.instance().getParty(var7);
+ Side var9 = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (var6 != null)
+ {
+ boolean var10 = true;
+
+ if (!var5.isDead && var10)
+ {
+ var6.setCurrentBoss(this);
+ }
+ }
+ }
+
+ this.setHasBeenAttacked(true);
+ return super.attackEntityFrom(var1, var2);
+ }
+ }
+
+ private void chatItUp(EntityPlayer var1, String var2)
+ {
+ if (this.chatTime <= 0)
+ {
+ Aether.proxy.displayMessage(var1, var2);
+ this.chatTime = 60;
+ }
+ }
+
+ /**
+ * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons
+ * use this to react to sunlight and start to burn.
+ */
+ public void onLivingUpdate()
+ {
+ if (this.attackTimer > 0)
+ {
+ --this.attackTimer;
+ }
+
+ if (!this.worldObj.isRemote)
+ {
+ if (this.rand.nextInt(100) == 1 && this.getEntityToAttack() != null)
+ {
+ this.spawnSentry();
+ }
+
+ --this.heightOffsetUpdateTime;
+
+ if (this.heightOffsetUpdateTime <= 0)
+ {
+ this.heightOffsetUpdateTime = 100;
+ this.heightOffset = 0.5F + (float) this.rand.nextGaussian() * 3.0F;
+ }
+
+ if (this.getEntityToAttack() != null && this.getEntityToAttack().posY + (double) this.getEntityToAttack().getEyeHeight() > this.posY + (double) this.getEyeHeight() + (double) this.heightOffset)
+ {
+ this.motionY += (0.700000011920929D - this.motionY) * 0.700000011920929D;
+ }
+ }
+
+ if (!this.onGround && this.motionY < 0.0D)
+ {
+ this.motionY *= 0.8D;
+ }
+
+ super.onLivingUpdate();
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ super.readEntityFromNBT(var1);
+ this.setHasBeenAttacked(var1.getBoolean("HasBeenAttacked"));
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ super.writeEntityToNBT(var1);
+ var1.setBoolean("HasBeenAttacked", this.getHasBeenAttacked());
+ }
+
+ /**
+ * Returns the sound this mob makes on death.
+ */
+ protected String getDeathSound()
+ {
+ return "aemob.sentryGuardian.death";
+ }
+
+ /**
+ * Returns the sound this mob makes while it's alive.
+ */
+ protected String getLivingSound()
+ {
+ return "aemob.sentryGuardian.living";
+ }
+
+ /**
+ * Returns the sound this mob makes when it is hurt.
+ */
+ protected String getHurtSound()
+ {
+ return "aemob.sentryGuardian.hit";
+ }
+
+ /**
+ * Called when the mob is falling. Calculates and applies fall damage.
+ */
+ protected void fall(float var1)
+ {}
+
+ public int getMaxHealth()
+ {
+ return 250;
+ }
+
+ public int getBossMaxHP()
+ {
+ return this.getMaxHealth();
+ }
+
+ public int getBossEntityID()
+ {
+ return this.entityId;
+ }
+
+ public String getBossTitle()
+ {
+ return this.bossName + ", the Sentry Guardian";
+ }
+
+ public Entity getBossEntity()
+ {
+ return this;
+ }
+
+ public int getBossStage()
+ {
+ return 0;
+ }
+
+ public EnumBossType getBossType()
+ {
+ return EnumBossType.MINI;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/bosses/EntitySlider.java b/src/main/java/net/aetherteam/aether/entities/bosses/EntitySlider.java
new file mode 100644
index 0000000..8aa7c80
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/bosses/EntitySlider.java
@@ -0,0 +1,1345 @@
+package net.aetherteam.aether.entities.bosses;
+
+import cpw.mods.fml.client.FMLClientHandler;
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.network.PacketDispatcher;
+import cpw.mods.fml.relauncher.Side;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.AetherCommonPlayerHandler;
+import net.aetherteam.aether.AetherLoot;
+import net.aetherteam.aether.AetherNameGen;
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.entities.EntityAetherCoin;
+import net.aetherteam.aether.entities.EntitySentry;
+import net.aetherteam.aether.entities.dungeon.EntityRewardItem;
+import net.aetherteam.aether.enums.EnumBossType;
+import net.aetherteam.aether.interfaces.IAetherBoss;
+import net.aetherteam.aether.items.AetherItems;
+import net.aetherteam.aether.oldcode.NameGenerator;
+import net.aetherteam.aether.packets.AetherPacketHandler;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.block.Block;
+import net.minecraft.client.audio.SoundManager;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityCreature;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.item.ItemPickaxe;
+import net.minecraft.item.ItemStack;
+import net.minecraft.item.ItemTool;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.server.MinecraftServer;
+import net.minecraft.server.management.ServerConfigurationManager;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class EntitySlider extends EntityBossMob implements IAetherBoss
+{
+ public String dir;
+ private boolean[] stageDone;
+ public Random random;
+ public ArrayList queuedMembers;
+ public ArrayList deadMembers;
+ ArrayList activeMembers;
+ public AxisAlignedBB originalAABB;
+ public ArrayList blockBans;
+ public int moveTimer;
+ public int dennis;
+ public int rennis;
+ public int chatTime;
+ public Entity target;
+ public boolean gotMovement;
+ public boolean crushed;
+ public float speedy;
+ public float harvey;
+ public int direction;
+ private int dungeonX;
+ private int dungeonY;
+ private int dungeonZ;
+
+ public EntitySlider(World var1)
+ {
+ super(var1);
+ this.dir = "/net/aetherteam/aether/client/sprites";
+ this.stageDone = new boolean[5];
+ this.random = new Random();
+ this.queuedMembers = new ArrayList();
+ this.deadMembers = new ArrayList();
+ this.activeMembers = new ArrayList();
+ this.blockBans = new ArrayList();
+ this.rotationYaw = 0.0F;
+ this.rotationPitch = 0.0F;
+ this.setSize(2.0F, 2.0F);
+ this.health = this.getMaxHealth();
+ this.dennis = 1;
+ this.jumpMovementFactor = 0.0F;
+ this.chatTime = 60;
+ this.stageDone[0] = false;
+ this.stageDone[1] = false;
+ this.stageDone[2] = false;
+ this.stageDone[3] = false;
+ this.stageDone[4] = false;
+ this.texture = this.dir + "/bosses/slider/sliderSleep.png";
+ this.setBossName(NameGenerator.next(6, 12));
+ this.originalAABB = AxisAlignedBB.getBoundingBox(-7.0D, -1.0D, -7.5D, 7.0D, 9.0D, 7.5D).addCoord(this.posX, this.posY, this.posZ);
+ }
+
+ public EntitySlider(World var1, double var2, double var4, double var6)
+ {
+ this(var1);
+ this.setPosition(var2, var4, var6);
+ }
+
+ public int getMaxHealth()
+ {
+ return 500;
+ }
+
+ /**
+ * Disables a mob's ability to move on its own while true.
+ */
+ protected boolean isMovementCeased()
+ {
+ return true;
+ }
+
+ public void entityInit()
+ {
+ super.entityInit();
+ this.posX = Math.floor(this.posX + 0.5D);
+ this.posY = Math.floor(this.posY + 0.5D);
+ this.posZ = Math.floor(this.posZ + 0.5D);
+ this.dataWatcher.addObject(16, Byte.valueOf((byte) 0));
+ this.dataWatcher.addObject(17, Byte.valueOf((byte) 0));
+ this.dataWatcher.addObject(18, String.valueOf(AetherNameGen.gen()));
+ this.dataWatcher.addObject(19, Byte.valueOf((byte) 0));
+ this.dataWatcher.addObject(20, Byte.valueOf((byte) 0));
+ this.dataWatcher.addObject(21, Byte.valueOf((byte) 0));
+ }
+
+ public boolean getAwake()
+ {
+ return (this.dataWatcher.getWatchableObjectByte(16) & 1) != 0;
+ }
+
+ public void setAwake(boolean var1)
+ {
+ if (!this.worldObj.isRemote)
+ {
+ if (var1)
+ {
+ this.dataWatcher.updateObject(16, Byte.valueOf((byte) 1));
+ } else
+ {
+ this.dataWatcher.updateObject(16, Byte.valueOf((byte) 0));
+ }
+ }
+ }
+
+ /**
+ * Called when the mob's health reaches 0.
+ */
+ public void onDeath(DamageSource var1)
+ {
+ this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 0.3F, false);
+
+ if (var1.getEntity() instanceof EntityPlayer)
+ {
+ EntityPlayer var2 = (EntityPlayer) var1.getEntity();
+ Party var3 = PartyController.instance().getParty(PartyController.instance().getMember(var2));
+ Dungeon var4 = DungeonHandler.instance().getInstanceAt(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ));
+
+ if (var4 != null && var3 != null)
+ {
+ Side var5 = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (var5.isServer())
+ {
+ DungeonHandler.instance().startTimer(var4, var3, 60);
+ PacketDispatcher.sendPacketToAllPlayers(AetherPacketHandler.sendDungeonTimerStart(var4, var3, 60));
+ }
+ }
+ }
+
+ super.onDeath(var1);
+ }
+
+ public boolean getCritical()
+ {
+ return (this.dataWatcher.getWatchableObjectByte(17) & 1) != 0;
+ }
+
+ public void setCritical(boolean var1)
+ {
+ if (!this.worldObj.isRemote)
+ {
+ if (var1)
+ {
+ this.dataWatcher.updateObject(17, Byte.valueOf((byte) 1));
+ } else
+ {
+ this.dataWatcher.updateObject(17, Byte.valueOf((byte) 0));
+ }
+ }
+ }
+
+ public String getBossName()
+ {
+ return this.dataWatcher.getWatchableObjectString(18);
+ }
+
+ public void setBossName(String var1)
+ {
+ if (!this.worldObj.isRemote)
+ {
+ this.dataWatcher.updateObject(18, String.valueOf(var1));
+ }
+ }
+
+ public boolean hasStartedMusic()
+ {
+ return (this.dataWatcher.getWatchableObjectByte(19) & 1) != 0;
+ }
+
+ public void startMusic(boolean var1)
+ {
+ if (var1)
+ {
+ this.dataWatcher.updateObject(19, Byte.valueOf((byte) 1));
+ } else
+ {
+ this.dataWatcher.updateObject(19, Byte.valueOf((byte) 0));
+ }
+ }
+
+ public boolean hasPlayedMusic()
+ {
+ return (this.dataWatcher.getWatchableObjectByte(20) & 1) != 0;
+ }
+
+ public void playMusic(boolean var1)
+ {
+ if (var1)
+ {
+ this.dataWatcher.updateObject(20, Byte.valueOf((byte) 1));
+ } else
+ {
+ this.dataWatcher.updateObject(20, Byte.valueOf((byte) 0));
+ }
+ }
+
+ public boolean hasFinishedSoundtrack()
+ {
+ return (this.dataWatcher.getWatchableObjectByte(21) & 1) != 0;
+ }
+
+ public void finishMusic(boolean var1)
+ {
+ if (var1)
+ {
+ this.dataWatcher.updateObject(21, Byte.valueOf((byte) 1));
+ this.playMusicFile("Slider Finish");
+ } else
+ {
+ this.dataWatcher.updateObject(21, Byte.valueOf((byte) 0));
+ }
+ }
+
+ /**
+ * Takes in the distance the entity has fallen this tick and whether its on the ground to update the fall distance
+ * and deal fall damage if landing on the ground. Args: distanceFallenThisTick, onGround
+ */
+ protected void updateFallState(double var1, boolean var3)
+ {}
+
+ /**
+ * Called when the mob is falling. Calculates and applies fall damage.
+ */
+ protected void fall(float var1)
+ {}
+
+ /**
+ * Determines if an entity can be despawned, used on idle far away entities
+ */
+ public boolean canDespawn()
+ {
+ return false;
+ }
+
+ /**
+ * Returns the sound this mob makes while it's alive.
+ */
+ protected String getLivingSound()
+ {
+ return !this.getAwake() ? "ambient.cave.cave" : null;
+ }
+
+ /**
+ * Returns the sound this mob makes when it is hurt.
+ */
+ protected String getHurtSound()
+ {
+ return "step.stone";
+ }
+
+ /**
+ * Returns the sound this mob makes on death.
+ */
+ protected String getDeathSound()
+ {
+ return "aeboss.slider.die";
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ super.writeEntityToNBT(var1);
+ var1.setFloat("Speedy", this.speedy);
+ var1.setShort("MoveTimer", (short) this.moveTimer);
+ var1.setShort("Direction", (short) this.direction);
+ var1.setBoolean("GotMovement", this.gotMovement);
+ var1.setBoolean("Awake", this.getAwake());
+ var1.setBoolean("Critical", this.getCritical());
+ var1.setInteger("DungeonX", this.dungeonX);
+ var1.setInteger("DungeonY", this.dungeonY);
+ var1.setInteger("DungeonZ", this.dungeonZ);
+ var1.setString("BossName", this.getBossName());
+ var1.setBoolean("PlayedMusic", this.hasPlayedMusic());
+ var1.setBoolean("StartedMusic", this.hasStartedMusic());
+ var1.setBoolean("FinishedMusic", this.hasFinishedSoundtrack());
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ super.readEntityFromNBT(var1);
+ this.speedy = var1.getFloat("Speedy");
+ this.moveTimer = var1.getShort("MoveTimer");
+ this.direction = var1.getShort("Direction");
+ this.gotMovement = var1.getBoolean("GotMovement");
+ this.setAwake(var1.getBoolean("Awake"));
+ this.setCritical(var1.getBoolean("Critical"));
+ this.dungeonX = var1.getInteger("DungeonX");
+ this.dungeonY = var1.getInteger("DungeonY");
+ this.dungeonZ = var1.getInteger("DungeonZ");
+ this.setBossName(var1.getString("BossName"));
+ this.playMusic(var1.getBoolean("PlayedMusic"));
+ this.startMusic(var1.getBoolean("StartedMusic"));
+ this.finishMusic(var1.getBoolean("FinishedMusic"));
+ }
+
+ public boolean isSoundOn()
+ {
+ boolean var1;
+
+ if (this.worldObj.isRemote && this.isClient() && Aether.proxy.getClient().sndManager != null)
+ {
+ SoundManager var10000 = Aether.proxy.getClient().sndManager;
+
+ if (SoundManager.sndSystem != null)
+ {
+ var1 = true;
+ return var1;
+ }
+ }
+
+ var1 = false;
+ return var1;
+ }
+
+ public boolean isClient()
+ {
+ return Aether.proxy.getClient() != null;
+ }
+
+ public boolean isMusicPlaying()
+ {
+ boolean var1;
+
+ if (Aether.proxy.getClient() != null)
+ {
+ SoundManager var10000 = Aether.proxy.getClient().sndManager;
+
+ if (SoundManager.sndSystem != null)
+ {
+ var10000 = Aether.proxy.getClient().sndManager;
+
+ if (SoundManager.sndSystem.playing("streaming"))
+ {
+ var1 = true;
+ return var1;
+ }
+ }
+ }
+
+ var1 = false;
+ return var1;
+ }
+
+ public void turnMusicOff()
+ {
+ if (this.isSoundOn())
+ {
+ ;
+ }
+ }
+
+ public void playMusicFile(String var1)
+ {
+ if (this.isSoundOn())
+ {
+ float var10002 = (float) this.posX;
+ float var10003 = (float) this.posY;
+ Aether.proxy.getClient().sndManager.playStreaming(var1, var10002, var10003, (float) this.posZ);
+ }
+ }
+
+ public boolean isDead()
+ {
+ return this.health <= 0 || this.isDead;
+ }
+
+ public void resetSlider()
+ {
+ this.setAwake(false);
+ this.stop();
+ this.openDoor();
+ this.moveTimer = 0;
+ this.health = 500;
+
+ if (!this.worldObj.isRemote)
+ {
+ this.setPosition((double) ((float) this.dungeonX + 8.0F), (double) ((float) this.dungeonY + 1.0F), (double) ((float) this.dungeonZ + 8.0F));
+ }
+
+ List var1 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.expand(35.0D, 15.0D, 35.0D));
+
+ for (int var2 = 0; var2 < var1.size(); ++var2)
+ {
+ Entity var3 = (Entity) var1.get(var2);
+
+ if (var3 instanceof EntitySentry)
+ {
+ ;
+ }
+ }
+
+ this.target = null;
+ this.deadMembers.clear();
+ this.activeMembers.clear();
+ this.queuedMembers.clear();
+ this.openDoor();
+ this.startMusic(false);
+ this.turnMusicOff();
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+
+ if (!this.worldObj.isRemote && this.getBossHP() != this.health)
+ {
+ this.setBossHP();
+ }
+
+ DungeonHandler var1 = DungeonHandler.instance();
+ Dungeon var2 = var1.getInstanceAt(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ));
+
+ if (var2 != null && this.dungeonX == 0 && this.dungeonY == 0 && this.dungeonZ == 0)
+ {
+ this.setDungeon((int) this.posX - 8, (int) this.posY - 2, (int) this.posZ - 8);
+ }
+
+ if (var2 != null)
+ {
+ if (!var2.isActive())
+ {
+ this.setDead();
+ }
+
+ if (this.getAwake())
+ {
+ this.queuedMembers = var2.getQueuedMembers();
+ }
+ }
+
+ this.jumpMovementFactor = 0.0F;
+ this.renderYawOffset = this.rotationPitch = this.rotationYaw = 0.0F;
+
+ if ((!this.hasPlayedMusic() || !this.isMusicPlaying() && this.hasPlayedMusic()) && this.hasStartedMusic() && !this.hasFinishedSoundtrack() && !this.isDead() && this.getAwake())
+ {
+ if (!this.hasFinishedSoundtrack())
+ {
+ this.playMusicFile("Slider Battle");
+ }
+
+ this.playMusic(true);
+ }
+
+ if (this.hasFinishedSoundtrack() || this.isDead() || this.health <= 0)
+ {
+ this.playMusicFile("Slider Finish");
+ }
+
+ if (this.getCritical())
+ {
+ this.texture = this.dir + "/bosses/slider/sliderAwake_red.png";
+ } else if (this.getAwake())
+ {
+ this.texture = this.dir + "/bosses/slider/sliderAwake.png";
+ } else
+ {
+ this.texture = this.dir + "/bosses/slider/sliderSleep.png";
+ }
+
+ if (this.getAwake())
+ {
+ this.activeMembers.clear();
+ Iterator var3 = this.queuedMembers.iterator();
+ PartyMember var4;
+
+ while (var3.hasNext())
+ {
+ var4 = (PartyMember) var3.next();
+ EntityPlayer var5 = this.worldObj.getPlayerEntityByName(var4.username);
+
+ if (var5 != null && (int) var5.posX >= this.dungeonX && (int) var5.posX < this.dungeonX + 16 && (int) var5.posZ >= this.dungeonZ + 1 && (int) var5.posZ < this.dungeonZ + 16 && !this.activeMembers.contains(var5.username.toLowerCase()))
+ {
+ this.activeMembers.add(var5.username.toLowerCase());
+ }
+ }
+
+ var3 = this.queuedMembers.iterator();
+
+ while (var3.hasNext())
+ {
+ var4 = (PartyMember) var3.next();
+
+ if (!this.activeMembers.contains(var4.username.toLowerCase()) && !this.deadMembers.contains(var4.username.toLowerCase()))
+ {
+ this.deadMembers.add(var4.username.toLowerCase());
+ }
+ }
+
+ boolean var17 = this.deadMembers.size() >= this.queuedMembers.size();
+ this.target = this.worldObj.getClosestPlayerToEntity(this, -1.0D);
+
+ if (this.target != null && this.target instanceof EntityPlayer)
+ {
+ EntityPlayer var16 = (EntityPlayer) this.target;
+
+ if (var17)
+ {
+ this.resetSlider();
+ return;
+ }
+ } else if (this.target == null)
+ {
+ this.target = this.worldObj.getClosestPlayerToEntity(this, -1.0D);
+ }
+
+ if (this.isBossStage(0))
+ {
+ this.spawnSentries(4, 0);
+ }
+
+ if (this.isBossStage(1))
+ {
+ this.spawnSentries(4, 1);
+ }
+
+ if (this.isBossStage(2))
+ {
+ this.spawnSentries(4, 2);
+ }
+
+ if (this.isBossStage(3))
+ {
+ this.spawnSentries(4, 3);
+ }
+
+ if (this.isBossStage(4))
+ {
+ this.spawnSentries(8, 4);
+ this.setCritical(true);
+ } else
+ {
+ this.setCritical(false);
+ }
+
+ this.fallDistance = 0.0F;
+ double var6;
+ double var15;
+ double var8;
+
+ if (this.gotMovement)
+ {
+ if (this.isCollided)
+ {
+ var15 = this.posX - 0.5D;
+ var6 = this.boundingBox.minY + 0.75D;
+ var8 = this.posZ - 0.5D;
+ this.crushed = false;
+
+ if (var6 < 124.0D && var6 > 4.0D)
+ {
+ double var13;
+ int var10;
+ double var11;
+
+ if (this.direction == 0)
+ {
+ for (var10 = 0; var10 < 25; ++var10)
+ {
+ var11 = (double) (var10 / 5 - 2) * 0.75D;
+ var13 = (double) (var10 % 5 - 2) * 0.75D;
+ this.blockCrush((int) (var15 + var11), (int) (var6 + 1.5D), (int) (var8 + var13));
+ }
+ } else if (this.direction == 1)
+ {
+ for (var10 = 0; var10 < 25; ++var10)
+ {
+ var11 = (double) (var10 / 5 - 2) * 0.75D;
+ var13 = (double) (var10 % 5 - 2) * 0.75D;
+ this.blockCrush((int) (var15 + var11), (int) (var6 - 1.5D), (int) (var8 + var13));
+ }
+ } else if (this.direction == 2)
+ {
+ for (var10 = 0; var10 < 25; ++var10)
+ {
+ var11 = (double) (var10 / 5 - 2) * 0.75D;
+ var13 = (double) (var10 % 5 - 2) * 0.75D;
+ this.blockCrush((int) (var15 + 1.5D), (int) (var6 + var11), (int) (var8 + var13));
+ }
+ } else if (this.direction == 3)
+ {
+ for (var10 = 0; var10 < 25; ++var10)
+ {
+ var11 = (double) (var10 / 5 - 2) * 0.75D;
+ var13 = (double) (var10 % 5 - 2) * 0.75D;
+ this.blockCrush((int) (var15 - 1.5D), (int) (var6 + var11), (int) (var8 + var13));
+ }
+ } else if (this.direction == 4)
+ {
+ for (var10 = 0; var10 < 25; ++var10)
+ {
+ var11 = (double) (var10 / 5 - 2) * 0.75D;
+ var13 = (double) (var10 % 5 - 2) * 0.75D;
+ this.blockCrush((int) (var15 + var11), (int) (var6 + var13), (int) (var8 + 1.5D));
+ }
+ } else if (this.direction == 5)
+ {
+ for (var10 = 0; var10 < 25; ++var10)
+ {
+ var11 = (double) (var10 / 5 - 2) * 0.75D;
+ var13 = (double) (var10 % 5 - 2) * 0.75D;
+ this.blockCrush((int) (var15 + var11), (int) (var6 + var13), (int) (var8 - 1.5D));
+ }
+ }
+ }
+
+ if (this.crushed)
+ {
+ this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 3.0F, (0.625F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.2F) * 0.7F);
+ this.worldObj.playSoundAtEntity(this, "aeboss.slider.collide", 2.5F, 1.0F / (this.rand.nextFloat() * 0.2F + 0.9F));
+ }
+
+ this.stop();
+ } else
+ {
+ if (this.speedy < 2.0F)
+ {
+ this.speedy += this.getCritical() ? 0.07F : 0.035F;
+ }
+
+ this.motionX = 0.0D;
+ this.motionY = 0.0D;
+ this.motionZ = 0.0D;
+
+ if (this.direction == 0)
+ {
+ this.motionY = (double) this.speedy;
+
+ if (this.boundingBox.minY > this.target.boundingBox.minY + 0.35D)
+ {
+ this.stop();
+ this.moveTimer = this.getCritical() ? 4 : 8;
+ }
+ } else if (this.direction == 1)
+ {
+ this.motionY = (double) (-this.speedy);
+
+ if (this.boundingBox.minY < this.target.boundingBox.minY - 0.25D)
+ {
+ this.stop();
+ this.moveTimer = this.getCritical() ? 4 : 8;
+ }
+ } else if (this.direction == 2)
+ {
+ this.motionX = (double) this.speedy;
+
+ if (this.posX > this.target.posX + 0.125D)
+ {
+ this.stop();
+ this.moveTimer = this.getCritical() ? 4 : 8;
+ }
+ } else if (this.direction == 3)
+ {
+ this.motionX = (double) (-this.speedy);
+
+ if (this.posX < this.target.posX - 0.125D)
+ {
+ this.stop();
+ this.moveTimer = this.getCritical() ? 4 : 8;
+ }
+ } else if (this.direction == 4)
+ {
+ this.motionZ = (double) this.speedy;
+
+ if (this.posZ > this.target.posZ + 0.125D)
+ {
+ this.stop();
+ this.moveTimer = this.getCritical() ? 4 : 8;
+ }
+ } else if (this.direction == 5)
+ {
+ this.motionZ = (double) (-this.speedy);
+
+ if (this.posZ < this.target.posZ - 0.125D)
+ {
+ this.stop();
+ this.moveTimer = this.getCritical() ? 4 : 8;
+ }
+ }
+ }
+ } else
+ {
+ this.motionY = 0.0D;
+
+ if (this.moveTimer > 0)
+ {
+ --this.moveTimer;
+
+ if (this.getCritical() && this.rand.nextInt(2) == 0)
+ {
+ --this.moveTimer;
+ }
+
+ this.motionX = 0.0D;
+ this.motionY = 0.0D;
+ this.motionZ = 0.0D;
+ } else
+ {
+ var15 = Math.abs(this.posX - this.target.posX);
+ var6 = Math.abs(this.boundingBox.minY - this.target.boundingBox.minY);
+ var8 = Math.abs(this.posZ - this.target.posZ);
+
+ if (var15 > var8)
+ {
+ this.direction = 2;
+
+ if (this.posX > this.target.posX)
+ {
+ this.direction = 3;
+ }
+ } else
+ {
+ this.direction = 4;
+
+ if (this.posZ > this.target.posZ)
+ {
+ this.direction = 5;
+ }
+ }
+
+ if (var6 > var15 && var6 > var8 || var6 > 0.25D && this.rand.nextInt(5) == 0)
+ {
+ this.direction = 0;
+
+ if (this.posY > this.target.posY)
+ {
+ this.direction = 1;
+ }
+ }
+
+ this.worldObj.playSoundAtEntity(this, "aeboss.slider.move", 2.5F, 1.0F / (this.rand.nextFloat() * 0.2F + 0.9F));
+ this.gotMovement = true;
+ }
+ }
+ }
+
+ if (this.harvey > 0.01F)
+ {
+ this.harvey *= 0.8F;
+ }
+
+ if (this.chatTime > 0)
+ {
+ --this.chatTime;
+ }
+ }
+
+ private boolean isBossStage(int var1)
+ {
+ switch (var1)
+ {
+ case 0:
+ return this.getHealth() <= 500 && this.getHealth() >= 400;
+
+ case 1:
+ return this.getHealth() < 400 && this.getHealth() >= 300;
+
+ case 2:
+ return this.getHealth() < 300 && this.getHealth() >= 200;
+
+ case 3:
+ return this.getHealth() < 200 && this.getHealth() >= 125;
+
+ case 4:
+ return this.getHealth() < 125;
+
+ default:
+ return false;
+ }
+ }
+
+ private void spawnSentries(int var1, int var2)
+ {
+ if (!this.stageDone[var2])
+ {
+ if (var1 < 0)
+ {
+ var1 = 0;
+ }
+
+ int var3 = 0;
+
+ for (int var5 = 0; var5 < var1; ++var5)
+ {
+ if (var3 > 3)
+ {
+ var3 = 0;
+ }
+
+ int[] var4 = this.getSpotCoords(var3);
+ EntitySentry var6 = new EntitySentry(this.worldObj);
+ var6.setPosition((double) var4[0] + 0.5D, (double) var4[1] + 1.5D, (double) var4[2] + 0.5D);
+ this.worldObj.spawnEntityInWorld(var6);
+ ++var3;
+ }
+
+ this.stageDone[var2] = true;
+ }
+ }
+
+ private int[] getSpotCoords(int var1)
+ {
+ int[] var2 = new int[3];
+ int var3 = this.dungeonX;
+ int var4 = this.dungeonY;
+ int var5 = this.dungeonZ;
+
+ switch (var1)
+ {
+ case 0:
+ var2[0] = var3 + 13;
+ var2[2] = var5 + 13;
+ break;
+
+ case 1:
+ var2[0] = var3 + 13;
+ var2[2] = var5 + 1;
+ break;
+
+ case 2:
+ var2[0] = var3 + 1;
+ var2[2] = var5 + 13;
+ break;
+
+ case 3:
+ var2[0] = var3 + 1;
+ var2[2] = var5 + 1;
+ }
+
+ var2[1] = var4;
+ return var2;
+ }
+
+ private void openDoor()
+ {
+ int var1 = this.dungeonX - 1;
+
+ for (int var2 = this.dungeonY; var2 < this.dungeonY + 4; ++var2)
+ {
+ for (int var3 = this.dungeonZ + 6; var3 < this.dungeonZ + 10; ++var3)
+ {
+ this.worldObj.setBlock(var1, var2, var3, 0);
+ }
+ }
+ }
+
+ private void finishDoor()
+ {
+ for (int var1 = this.dungeonY; var1 < this.dungeonY + 4; ++var1)
+ {
+ for (int var2 = this.dungeonZ + 5; var2 < this.dungeonZ + 10; ++var2)
+ {
+ this.worldObj.setBlock(this.dungeonX - 1, var1, var2, AetherBlocks.BronzeDoor.blockID);
+ }
+ }
+
+ this.worldObj.setBlock(this.dungeonX - 1, this.dungeonY + 1, this.dungeonZ + 7, AetherBlocks.BronzeDoor.blockID, 1, 2);
+ this.worldObj.setBlock(this.dungeonX, this.dungeonY - 1, this.dungeonZ + 7, AetherBlocks.BronzeDoorController.blockID);
+ }
+
+ /**
+ * Applies a velocity to each of the entities pushing them away from each other. Args: entity
+ */
+ public void applyEntityCollision(Entity var1)
+ {
+ if (this.getAwake() && this.gotMovement)
+ {
+ if (var1 instanceof EntitySentry)
+ {
+ return;
+ }
+
+ if (var1 instanceof EntityLiving)
+ {
+ this.worldObj.playSoundAtEntity(this, "aeboss.slider.collide", 2.5F, 1.0F / (this.rand.nextFloat() * 0.2F + 0.9F));
+
+ if (var1 instanceof EntityCreature || var1 instanceof EntityPlayer)
+ {
+ EntityLiving var2 = (EntityLiving) var1;
+ var2.motionY += 0.35D;
+ var2.motionX *= 2.0D;
+ var2.motionZ *= 2.0D;
+ }
+
+ this.stop();
+ }
+
+ var1.attackEntityFrom(DamageSource.causeMobDamage(this), 6);
+ }
+ }
+
+ /**
+ * Drop 0-2 items of this living's type. @param par1 - Whether this entity has recently been hit by a player. @param
+ * par2 - Level of Looting used to kill this mob.
+ */
+ protected void dropFewItems(boolean var1, int var2)
+ {
+ for (int var3 = 0; var3 < 20 + this.rand.nextInt(10); ++var3)
+ {
+ this.dropItem(AetherBlocks.DungeonStone.blockID, 1);
+ }
+ }
+
+ public void stop()
+ {
+ this.gotMovement = false;
+ this.moveTimer = 12;
+ this.direction = 0;
+ this.speedy = 0.0F;
+ this.motionX = 0.0D;
+ this.motionY = 0.0D;
+ this.motionZ = 0.0D;
+ }
+
+ private void chatItUp(EntityPlayer var1, String var2)
+ {
+ Side var3 = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (this.chatTime <= 0 && Aether.proxy.getClient() != null && var3.isClient())
+ {
+ Aether.proxy.displayMessage(var1, var2);
+ this.chatTime = 60;
+ }
+ }
+
+ public void teleportMembersFromParty(ArrayList var1)
+ {
+ Side var2 = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (var2.isServer())
+ {
+ MinecraftServer var3 = FMLCommonHandler.instance().getMinecraftServerInstance();
+ ServerConfigurationManager var4 = var3.getConfigurationManager();
+
+ for (int var5 = 0; var5 < var4.playerEntityList.size(); ++var5)
+ {
+ Object var6 = var4.playerEntityList.get(var5);
+ Iterator var7 = var1.iterator();
+
+ while (var7.hasNext())
+ {
+ PartyMember var8 = (PartyMember) var7.next();
+
+ if (var6 instanceof EntityPlayerMP && ((EntityPlayerMP) var6).username.equalsIgnoreCase(var8.username))
+ {
+ ((EntityPlayerMP) var6).setPositionAndUpdate((double) ((float) ((double) this.dungeonX + 0.5D)), (double) ((float) this.dungeonY), (double) ((float) ((double) this.dungeonZ + 8.0D)));
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Called when the entity is attacked.
+ */
+ public boolean attackEntityFrom(DamageSource var1, int var2)
+ {
+ if (var1.getEntity() instanceof EntitySentry)
+ {
+ return false;
+ } else if (var1.getEntity() != null && var1.getEntity() instanceof EntityPlayer)
+ {
+ EntityPlayer var3 = (EntityPlayer) var1.getEntity();
+ ItemStack var4 = var3.getCurrentEquippedItem();
+
+ if (var4 != null && var4.getItem() != null)
+ {
+ if (!(var4.getItem() instanceof ItemPickaxe) && !(var4.getItem() instanceof ItemTool))
+ {
+ this.chatItUp(var3, "Hmm. It\'s a rock-solid block. A " + var4.getItem().getItemDisplayName(var4) + " wouldn\'t work on this.");
+ return false;
+ } else
+ {
+ AetherCommonPlayerHandler var5 = Aether.getPlayerBase(var3);
+ Side var6 = FMLCommonHandler.instance().getEffectiveSide();
+ boolean var7;
+
+ if (var5 != null)
+ {
+ var7 = true;
+
+ if (!var3.isDead && var7)
+ {
+ var5.setCurrentBoss(this);
+ }
+ }
+
+ if (this.health > 0 && !this.isDead)
+ {
+ this.startMusic(true);
+ } else
+ {
+ this.finishMusic(true);
+ this.playMusicFile("Slider Finish");
+ }
+
+ Dungeon var8 = DungeonHandler.instance().getInstanceAt(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ));
+ int var10;
+ int var12;
+
+ if (var8 != null && var8.hasQueuedParty())
+ {
+ Party var9 = var8.getQueuedParty();
+ var10 = var8.getQueuedMembers().size();
+ float var11 = (float) (var10 - 1) * 0.045F;
+ var12 = MathHelper.clamp_int((int) ((float) var2 - (float) var2 * var11), 1, var2);
+ var7 = super.attackEntityFrom(var1, var12);
+ } else
+ {
+ var7 = super.attackEntityFrom(var1, Math.max(0, var2));
+ }
+
+ if (var7)
+ {
+ if (var8 != null)
+ {
+ this.queuedMembers = var8.getQueuedMembers();
+ }
+
+ for (int var29 = 0; var29 < (this.health <= 0 ? 16 : 48); ++var29)
+ {
+ double var28 = this.posX + (double) (this.rand.nextFloat() - this.rand.nextFloat()) * 1.5D;
+ double var19 = this.boundingBox.minY + 1.75D + (double) (this.rand.nextFloat() - this.rand.nextFloat()) * 1.5D;
+ double var14 = this.posZ + (double) (this.rand.nextFloat() - this.rand.nextFloat()) * 1.5D;
+
+ if (this.health <= 0)
+ {
+ this.worldObj.spawnParticle("explode", var28, var19, var14, 0.0D, 0.0D, 0.0D);
+ }
+ }
+
+ ArrayList var24;
+
+ if (this.health <= 0)
+ {
+ this.isDead = true;
+
+ if (!this.worldObj.isRemote)
+ {
+ boolean var30 = false;
+
+ if (this.random.nextInt(10) == 0)
+ {
+ var30 = true;
+ }
+
+ for (var10 = 0; var10 < 25 + this.random.nextInt(25); ++var10)
+ {
+ this.worldObj.spawnEntityInWorld(new EntityAetherCoin(this.worldObj, this.posX, this.posY, this.posZ, 1));
+ }
+
+ for (var10 = 0; var10 < 3; ++var10)
+ {
+ this.worldObj.spawnEntityInWorld(new EntityAetherCoin(this.worldObj, this.posX, this.posY, this.posZ, 25));
+ }
+
+ if (var8 != null)
+ {
+ var24 = var8.getQueuedMembers();
+ Iterator var27 = var24.iterator();
+
+ while (var27.hasNext())
+ {
+ PartyMember var21 = (PartyMember) var27.next();
+
+ for (int var13 = 0; var13 < 5 + this.random.nextInt(3); ++var13)
+ {
+ this.worldObj.spawnEntityInWorld(new EntityRewardItem(this.worldObj, this.posX, this.posY, this.posZ, AetherLoot.BRONZE.getRandomItem(this.random), var21.username));
+ }
+
+ this.worldObj.spawnEntityInWorld(new EntityRewardItem(this.worldObj, this.posX, this.posY, this.posZ, new ItemStack(AetherItems.Key, 1, 0), var21.username));
+
+ if (var30)
+ {
+ this.worldObj.spawnEntityInWorld(new EntityRewardItem(this.worldObj, this.posX, this.posY, this.posZ, new ItemStack(AetherItems.LabyrinthMusicDisk, 1, 0), var21.username));
+ }
+ }
+ }
+ }
+
+ this.openDoor();
+ this.finishMusic(true);
+ this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "aemisc.achieveBronzeNew", 1.0F, 1.0F);
+ } else if (!this.getAwake())
+ {
+ Side var25 = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (var25.isServer() && !this.worldObj.isRemote && var8 != null)
+ {
+ var24 = var8.getQueuedMembers();
+ ArrayList var22 = new ArrayList();
+ EntityPlayer var18 = (EntityPlayer) var1.getEntity();
+ Iterator var17 = var24.iterator();
+
+ while (var17.hasNext())
+ {
+ PartyMember var16 = (PartyMember) var17.next();
+
+ if (!var16.username.equalsIgnoreCase(var18.username))
+ {
+ var22.add(var16);
+ }
+ }
+
+ this.teleportMembersFromParty(var22);
+ }
+
+ this.worldObj.playSoundAtEntity(this, "aeboss.slider.awake", 2.5F, 1.0F / (this.rand.nextFloat() * 0.2F + 0.9F));
+ this.setAwake(true);
+ this.target = var1.getEntity();
+ var10 = this.dungeonX - 1;
+
+ for (int var23 = this.dungeonY; var23 < this.dungeonY + 8; ++var23)
+ {
+ for (var12 = this.dungeonZ + 5; var12 < this.dungeonZ + 11; ++var12)
+ {
+ this.worldObj.setBlock(var10, var23, var12, AetherBlocks.LockedDungeonStone.blockID);
+ }
+ }
+ } else if (this.gotMovement)
+ {
+ this.speedy *= 1.5F;
+ }
+
+ double var26 = Math.abs(this.posX - var1.getEntity().posX);
+ double var20 = Math.abs(this.posZ - var1.getEntity().posZ);
+
+ if (var26 > var20)
+ {
+ this.dennis = 1;
+ this.rennis = 0;
+
+ if (this.posX > var1.getEntity().posX)
+ {
+ this.dennis = -1;
+ }
+ } else
+ {
+ this.rennis = 1;
+ this.dennis = 0;
+
+ if (this.posZ > var1.getEntity().posZ)
+ {
+ this.rennis = -1;
+ }
+ }
+
+ this.harvey = 0.7F - (float) this.health / 875.0F;
+ }
+
+ return var7;
+ }
+ } else
+ {
+ this.chatItUp(var3, "Hmm. It\'s a rock-solid block. My fist wouldn\'t work on this.");
+ return false;
+ }
+ } else
+ {
+ return false;
+ }
+ }
+
+ private void unlockBlock(int var1, int var2, int var3)
+ {
+ int var4 = this.worldObj.getBlockId(var1, var2, var3);
+
+ if (var4 == AetherBlocks.LockedDungeonStone.blockID)
+ {
+ this.worldObj.setBlock(var1, var2, var3, AetherBlocks.DungeonStone.blockID, this.worldObj.getBlockMetadata(var1, var2, var3), 4);
+ this.unlockBlock(var1 + 1, var2, var3);
+ this.unlockBlock(var1 - 1, var2, var3);
+ this.unlockBlock(var1, var2 + 1, var3);
+ this.unlockBlock(var1, var2 - 1, var3);
+ this.unlockBlock(var1, var2, var3 + 1);
+ this.unlockBlock(var1, var2, var3 - 1);
+ }
+
+ if (var4 == AetherBlocks.LockedLightDungeonStone.blockID)
+ {
+ this.worldObj.setBlock(var1, var2, var3, AetherBlocks.LightDungeonStone.blockID, this.worldObj.getBlockMetadata(var1, var2, var3), 4);
+ this.unlockBlock(var1 + 1, var2, var3);
+ this.unlockBlock(var1 - 1, var2, var3);
+ this.unlockBlock(var1, var2 + 1, var3);
+ this.unlockBlock(var1, var2 - 1, var3);
+ this.unlockBlock(var1, var2, var3 + 1);
+ this.unlockBlock(var1, var2, var3 - 1);
+ }
+ }
+
+ /**
+ * Adds to the current velocity of the entity. Args: x, y, z
+ */
+ public void addVelocity(double var1, double var3, double var5)
+ {}
+
+ /**
+ * knocks back this entity
+ */
+ public void knockBack(Entity var1, int var2, double var3, double var5)
+ {}
+
+ public void blockCrush(int var1, int var2, int var3)
+ {
+ if (!this.worldObj.isRemote)
+ {
+ int var4 = this.worldObj.getBlockId(var1, var2, var3);
+ int var5 = this.worldObj.getBlockMetadata(var1, var2, var3);
+ Collections.addAll(this.blockBans, new Integer[]{Integer.valueOf(AetherBlocks.LockedDungeonStone.blockID), Integer.valueOf(AetherBlocks.LockedLightDungeonStone.blockID), Integer.valueOf(AetherBlocks.TreasureChest.blockID), Integer.valueOf(AetherBlocks.DungeonHolystone.blockID), Integer.valueOf(AetherBlocks.DungeonEntrance.blockID), Integer.valueOf(AetherBlocks.DungeonEntranceController.blockID), Integer.valueOf(AetherBlocks.BronzeDoor.blockID), Integer.valueOf(AetherBlocks.BronzeDoorController.blockID)});
+
+ if (var4 == 0 || this.blockBans.contains(Integer.valueOf(var4)))
+ {
+ return;
+ }
+
+ Block.blocksList[var4].onBlockDestroyedByPlayer(this.worldObj, var1, var2, var3, 0);
+ Block.blocksList[var4].dropBlockAsItem(this.worldObj, var1, var2, var3, var5, 1);
+ this.worldObj.setBlock(var1, var2, var3, 0);
+ this.crushed = true;
+
+ if (this.worldObj.isRemote)
+ {
+ FMLClientHandler.instance().getClient().effectRenderer.addBlockDestroyEffects(var1, var2, var3, var4, var5);
+ }
+ }
+
+ if (this.worldObj.isRemote && FMLClientHandler.instance().getClient().gameSettings.fancyGraphics)
+ {
+ this.addSquirrelButts(var1, var2, var3);
+ }
+ }
+
+ public void addSquirrelButts(int var1, int var2, int var3)
+ {
+ if (this.worldObj.isRemote)
+ {
+ double var4 = (double) var1 + 0.5D + (double) (this.rand.nextFloat() - this.rand.nextFloat()) * 0.375D;
+ double var6 = (double) var2 + 0.5D + (double) (this.rand.nextFloat() - this.rand.nextFloat()) * 0.375D;
+ double var8 = (double) var3 + 0.5D + (double) (this.rand.nextFloat() - this.rand.nextFloat()) * 0.375D;
+ this.worldObj.spawnParticle("explode", var4, var6, var8, 0.0D, 0.0D, 0.0D);
+ }
+ }
+
+ public void setDungeon(int var1, int var2, int var3)
+ {
+ this.dungeonX = var1;
+ this.dungeonY = var2;
+ this.dungeonZ = var3;
+ }
+
+ public int getBossHP()
+ {
+ return this.dataWatcher.getWatchableObjectInt(26);
+ }
+
+ public void setBossHP()
+ {
+ this.dataWatcher.updateObject(26, Integer.valueOf(this.health));
+ }
+
+ public int getBossMaxHP()
+ {
+ return this.getMaxHealth();
+ }
+
+ public int getBossEntityID()
+ {
+ return this.entityId;
+ }
+
+ public String getBossTitle()
+ {
+ return this.getBossName() + ", the Slider";
+ }
+
+ public Entity getBossEntity()
+ {
+ return this;
+ }
+
+ public int getBossStage()
+ {
+ return 0;
+ }
+
+ public EnumBossType getBossType()
+ {
+ return EnumBossType.BOSS;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/bosses/EntitySliderHostMimic.java b/src/main/java/net/aetherteam/aether/entities/bosses/EntitySliderHostMimic.java
new file mode 100644
index 0000000..cad1b50
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/bosses/EntitySliderHostMimic.java
@@ -0,0 +1,515 @@
+package net.aetherteam.aether.entities.bosses;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.network.PacketDispatcher;
+import cpw.mods.fml.relauncher.Side;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.AetherCommonPlayerHandler;
+import net.aetherteam.aether.AetherNameGen;
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.dungeons.keys.DungeonKey;
+import net.aetherteam.aether.dungeons.keys.EnumKeyType;
+import net.aetherteam.aether.enums.EnumBossType;
+import net.aetherteam.aether.interfaces.IAetherBoss;
+import net.aetherteam.aether.packets.AetherPacketHandler;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class EntitySliderHostMimic extends EntityMiniBoss implements IAetherBoss
+{
+ public boolean hasBeenAttacked;
+ public int eyeCap = 4;
+ public List Eyes = new ArrayList();
+ public int scareTime;
+ public String bossName;
+ public int sendDelay = 15;
+ public int sendRespawnDelay = 10;
+ private int chatTime;
+
+ public EntitySliderHostMimic(World var1)
+ {
+ super(var1);
+ this.setSize(2.0F, 2.5F);
+ this.bossName = AetherNameGen.gen();
+ this.isImmuneToFire = true;
+ this.health = this.getMaxHealth();
+ this.moveSpeed = 1.2F;
+ this.hasBeenAttacked = false;
+ this.scareTime = 0;
+ this.texture = "/net/aetherteam/aether/client/sprites/mobs/host/hostblue.png";
+ }
+
+ public void entityInit()
+ {
+ super.entityInit();
+ this.dataWatcher.addObject(16, Byte.valueOf((byte) 0));
+ this.dataWatcher.addObject(17, Byte.valueOf((byte) 0));
+ }
+
+ public boolean isAwake()
+ {
+ return this.dataWatcher.getWatchableObjectByte(16) == 1;
+ }
+
+ public void setAwake(boolean var1)
+ {
+ if (var1)
+ {
+ this.scareItUp();
+ this.worldObj.playSoundAtEntity(this, "aeboss.slider.awake", 2.5F, 1.0F / (this.rand.nextFloat() * 0.2F + 0.9F));
+ this.dataWatcher.updateObject(16, Byte.valueOf((byte) 1));
+ } else
+ {
+ this.dataWatcher.updateObject(16, Byte.valueOf((byte) 0));
+ }
+ }
+
+ public boolean isSendMode()
+ {
+ return this.dataWatcher.getWatchableObjectByte(17) == 1;
+ }
+
+ public void setSendMode(boolean var1)
+ {
+ if (var1)
+ {
+ this.dataWatcher.updateObject(17, Byte.valueOf((byte) 1));
+ } else
+ {
+ this.dataWatcher.updateObject(17, Byte.valueOf((byte) 0));
+ }
+ }
+
+ /**
+ * Finds the closest player within 16 blocks to attack, or null if this Entity isn't interested in attacking
+ * (Animals, Spiders at day, peaceful PigZombies).
+ */
+ protected Entity findPlayerToAttack()
+ {
+ EntityPlayer var1 = this.worldObj.getClosestVulnerablePlayerToEntity(this, 8.5D);
+ return var1 != null && this.canEntityBeSeen(var1) ? var1 : null;
+ }
+
+ /**
+ * Returns the sound this mob makes while it's alive.
+ */
+ protected String getLivingSound()
+ {
+ return "ambient.cave.cave";
+ }
+
+ /**
+ * Returns the sound this mob makes when it is hurt.
+ */
+ protected String getHurtSound()
+ {
+ return "step.stone";
+ }
+
+ /**
+ * Returns the sound this mob makes on death.
+ */
+ protected String getDeathSound()
+ {
+ return "aeboss.slider.die";
+ }
+
+ /**
+ * Plays step sound at given x, y, z for the entity
+ */
+ protected void playStepSound(int var1, int var2, int var3, int var4)
+ {
+ this.worldObj.playSoundAtEntity(this, "mob.cow.step", 0.15F, 1.0F);
+ }
+
+ /**
+ * Takes in the distance the entity has fallen this tick and whether its on the ground to update the fall distance
+ * and deal fall damage if landing on the ground. Args: distanceFallenThisTick, onGround
+ */
+ protected void updateFallState(double var1, boolean var3)
+ {
+ if (this.isAwake())
+ {
+ super.updateFallState(var1, var3);
+ }
+ }
+
+ /**
+ * Called when the mob is falling. Calculates and applies fall damage.
+ */
+ protected void fall(float var1)
+ {
+ if (this.isAwake())
+ {
+ super.fall(var1);
+ }
+ }
+
+ /**
+ * Determines if an entity can be despawned, used on idle far away entities
+ */
+ public boolean canDespawn()
+ {
+ return false;
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+ this.extinguish();
+
+ if (this.chatTime >= 0)
+ {
+ --this.chatTime;
+ }
+
+ if (!this.isAwake())
+ {
+ this.texture = "/net/aetherteam/aether/client/sprites/bosses/slider/sliderSleep.png";
+ this.motionX = 0.0D;
+ this.motionY = 0.0D;
+ this.motionZ = 0.0D;
+ this.jumpMovementFactor = 0.0F;
+ this.renderYawOffset = this.rotationPitch = this.rotationYaw = 0.0F;
+ }
+
+ EntityPlayer var1 = this.worldObj.getClosestPlayerToEntity(this, 8.5D);
+
+ if (this.entityToAttack == null && var1 != null && this.canEntityBeSeen(var1) && !var1.isDead && !var1.capabilities.isCreativeMode)
+ {
+ this.entityToAttack = var1;
+ this.setSendMode(true);
+ }
+
+ if (this.entityToAttack != null && this.entityToAttack instanceof EntityLiving && this.canEntityBeSeen(this.entityToAttack) && !this.entityToAttack.isDead)
+ {
+ this.faceEntity(this.entityToAttack, 10.0F, 10.0F);
+
+ if (!this.isAwake())
+ {
+ this.setAwake(true);
+ }
+
+ if (!this.hasBeenAttacked)
+ {
+ this.hasBeenAttacked = true;
+ }
+
+ if (this.isSendMode())
+ {
+ this.motionX = 0.0D;
+ this.motionY = 0.0D;
+ this.motionZ = 0.0D;
+ this.jumpMovementFactor = 0.0F;
+ this.renderYawOffset = this.rotationPitch = this.rotationYaw = 0.0F;
+
+ if (this.Eyes.size() < this.eyeCap)
+ {
+ if (this.sendDelay <= 0 && !this.worldObj.isRemote)
+ {
+ this.sendEye((EntityLiving) this.entityToAttack);
+ }
+ } else if (this.sendRespawnDelay <= 0)
+ {
+ if (!this.worldObj.isRemote)
+ {
+ this.sendEye((EntityLiving) this.entityToAttack);
+ this.sendRespawnDelay = 100;
+ }
+ } else
+ {
+ this.setSendMode(false);
+ }
+ }
+ } else
+ {
+ this.entityToAttack = null;
+ this.hasBeenAttacked = false;
+ this.killEyes();
+ this.setAwake(false);
+ this.setSendMode(false);
+ }
+
+ if (!this.hasBeenAttacked && this.isAwake())
+ {
+ this.texture = "/net/aetherteam/aether/client/sprites/mobs/host/hostblue.png";
+ this.killEyes();
+ }
+
+ if (this.Eyes.size() > this.eyeCap)
+ {
+ ((Entity) this.Eyes.remove(0)).setDead();
+ }
+
+ if (this.hasBeenAttacked || this.entityToAttack != null && this.canEntityBeSeen(this.entityToAttack))
+ {
+ this.texture = "/net/aetherteam/aether/client/sprites/mobs/host/hostred.png";
+ }
+
+ if (this.scareTime > 0)
+ {
+ --this.scareTime;
+ }
+
+ if (this.sendDelay > 0)
+ {
+ --this.sendDelay;
+ }
+
+ if (this.sendRespawnDelay > 0)
+ {
+ --this.sendRespawnDelay;
+ }
+ }
+
+ /**
+ * Basic mob attack. Default to touch of death in EntityCreature. Overridden by each mob to define their attack.
+ */
+ protected void attackEntity(Entity var1, float var2)
+ {
+ EntityLiving var3 = (EntityLiving) var1;
+
+ if (var2 < 8.5F && this.canEntityBeSeen(var3))
+ {
+ double var4 = var1.posX - this.posX;
+ double var6 = var1.posZ - this.posZ;
+
+ if (var3 != null)
+ {
+ if (var3.isDead || !this.canEntityBeSeen(var3))
+ {
+ var3 = null;
+ }
+
+ if (this.Eyes.size() <= 0 && this.canEntityBeSeen(var3))
+ {
+ this.setSendMode(true);
+ }
+ }
+
+ this.rotationYaw = (float) (Math.atan2(var6, var4) * 180.0D / Math.PI) - 90.0F;
+ this.hasAttacked = true;
+ }
+ }
+
+ public void sendEye(EntityLiving var1)
+ {
+ while (this.Eyes.size() > this.eyeCap)
+ {
+ ((Entity) this.Eyes.remove(0)).setDead();
+ }
+
+ this.hasBeenAttacked = true;
+
+ if (!this.isAwake())
+ {
+ this.setAwake(true);
+ }
+
+ EntityHostEye var2 = new EntityHostEye(this.worldObj, this.posX - 1.5D, this.posY + 1.5D, this.posZ - 1.5D, this.rotationYaw, this.rotationPitch, this, var1);
+ this.worldObj.spawnEntityInWorld(var2);
+ this.worldObj.playSoundAtEntity(this, "aeboss.slider.awake", 2.5F, 1.0F / (this.rand.nextFloat() * 0.2F + 0.9F));
+ this.Eyes.add(var2);
+ this.sendDelay = 30;
+ }
+
+ public void killEyes()
+ {
+ while (this.Eyes.size() != 0)
+ {
+ ((Entity) this.Eyes.remove(0)).setDead();
+ }
+ }
+
+ private void scareItUp()
+ {
+ if (this.scareTime <= 0)
+ {
+ this.worldObj.playSoundAtEntity(this, "aemob.sentryGolem.creepySeen", 5.0F, 1.0F);
+ this.scareTime = 2000;
+ }
+ }
+
+ /**
+ * Adds to the current velocity of the entity. Args: x, y, z
+ */
+ public void addVelocity(double var1, double var3, double var5)
+ {
+ if (this.isAwake() && !this.isSendMode())
+ {
+ super.addVelocity(var1, var3, var5);
+ }
+ }
+
+ /**
+ * knocks back this entity
+ */
+ public void knockBack(Entity var1, int var2, double var3, double var5)
+ {
+ if (this.isAwake() && !this.isSendMode())
+ {
+ super.knockBack(var1, var2, var3, var5);
+ }
+ }
+
+ /**
+ * Called when the entity is attacked.
+ */
+ public boolean attackEntityFrom(DamageSource var1, int var2)
+ {
+ this.hasBeenAttacked = true;
+ Entity var3 = var1.getSourceOfDamage();
+ Entity var4 = var1.getEntity();
+
+ if (var3 != null && var1.isProjectile())
+ {
+ if (var4 instanceof EntityPlayer && ((EntityPlayer) var4).getCurrentEquippedItem() != null)
+ {
+ this.chatItUp((EntityPlayer) var4, "Better switch to a sword, my " + ((EntityPlayer) var4).getCurrentEquippedItem().getItem().getItemDisplayName(((EntityPlayer) var4).getCurrentEquippedItem()) + " doesn\'t seem to affect it.");
+ this.chatTime = 60;
+ }
+
+ return false;
+ } else
+ {
+ if (var4 instanceof EntityPlayer)
+ {
+ EntityPlayer var5 = (EntityPlayer) var4;
+ AetherCommonPlayerHandler var6 = Aether.getPlayerBase(var5);
+ PartyMember var7 = PartyController.instance().getMember(var5);
+ Party var8 = PartyController.instance().getParty(var7);
+ Side var9 = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (var6 != null)
+ {
+ boolean var10 = true;
+
+ if (!var5.isDead && var10)
+ {
+ var6.setCurrentBoss(this);
+ }
+ }
+ }
+
+ return super.attackEntityFrom(var1, var2);
+ }
+ }
+
+ private void chatItUp(EntityPlayer var1, String var2)
+ {
+ if (this.chatTime <= 0)
+ {
+ Aether.proxy.displayMessage(var1, var2);
+ this.chatTime = 60;
+ }
+ }
+
+ /**
+ * Checks if the entity's current position is a valid location to spawn this entity.
+ */
+ public boolean getCanSpawnHere()
+ {
+ int var1 = MathHelper.floor_double(this.posX);
+ int var2 = MathHelper.floor_double(this.boundingBox.minY);
+ int var3 = MathHelper.floor_double(this.posZ);
+ return this.rand.nextInt(25) == 0 && this.getBlockPathWeight(var1, var2, var3) >= 0.0F && this.worldObj.checkNoEntityCollision(this.boundingBox) && this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).size() == 0 && !this.worldObj.isAnyLiquid(this.boundingBox) && this.worldObj.difficultySetting > 0;
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ super.writeEntityToNBT(var1);
+ this.hasBeenAttacked = var1.getBoolean("HasBeenAttacked");
+ this.killEyes();
+ this.setAwake(var1.getBoolean("Awake"));
+ this.setSendMode(var1.getBoolean("SendMode"));
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ super.readEntityFromNBT(var1);
+ var1.setBoolean("HasBeenAttacked", this.hasBeenAttacked);
+ var1.setBoolean("Awake", this.isAwake());
+ var1.setBoolean("SendMode", this.isSendMode());
+ }
+
+ /**
+ * Called when the mob's health reaches 0.
+ */
+ public void onDeath(DamageSource var1)
+ {
+ this.boss = new EntitySliderHostMimic(this.worldObj);
+
+ if (var1.getEntity() instanceof EntityPlayer)
+ {
+ EntityPlayer var2 = (EntityPlayer) var1.getEntity();
+ Party var3 = PartyController.instance().getParty(PartyController.instance().getMember(var2));
+ Dungeon var4 = DungeonHandler.instance().getInstanceAt(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ));
+
+ if (var4 != null && var3 != null)
+ {
+ DungeonHandler.instance().addKey(var4, var3, new DungeonKey(EnumKeyType.Host));
+ PacketDispatcher.sendPacketToAllPlayers(AetherPacketHandler.sendDungeonKey(var4, var3, EnumKeyType.Host));
+ }
+ }
+
+ this.killEyes();
+ super.onDeath(var1);
+ }
+
+ public int getMaxHealth()
+ {
+ return 175;
+ }
+
+ public int getBossMaxHP()
+ {
+ return 175;
+ }
+
+ public int getBossEntityID()
+ {
+ return this.entityId;
+ }
+
+ public String getBossTitle()
+ {
+ return this.bossName + ", the Slider Host Mimic";
+ }
+
+ public Entity getBossEntity()
+ {
+ return this;
+ }
+
+ public int getBossStage()
+ {
+ return 0;
+ }
+
+ public EnumBossType getBossType()
+ {
+ return EnumBossType.MINI;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/camera/Camera.java b/src/main/java/net/aetherteam/aether/entities/camera/Camera.java
new file mode 100644
index 0000000..20ddb32
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/camera/Camera.java
@@ -0,0 +1,87 @@
+package net.aetherteam.aether.entities.camera;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.World;
+
+public class Camera extends EntityLiving
+{
+ Minecraft mc;
+ Entity entityAttachedTo;
+ double offsetX;
+ double offsetY;
+ double offsetZ;
+
+ public Camera(World var1)
+ {
+ super(var1);
+ this.mc = Minecraft.getMinecraft();
+ }
+
+ public Camera(World var1, Entity var2, double var3, double var5, double var7)
+ {
+ this(var1);
+
+ if (var2 == null)
+ {
+ this.setDead();
+ } else
+ {
+ this.entityAttachedTo = var2;
+
+ if (this.entityAttachedTo != null)
+ {
+ this.mountEntity(this.entityAttachedTo);
+ }
+
+ this.offsetX = var3;
+ this.offsetY = var5;
+ this.offsetZ = var7;
+ }
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ if (this.entityAttachedTo != null)
+ {
+ this.mountEntity(this.entityAttachedTo);
+ this.setRotation(this.entityAttachedTo.rotationYaw, this.entityAttachedTo.rotationPitch);
+ } else
+ {
+ CameraManager.turnOffCamera(this.worldObj);
+ this.setDead();
+ }
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ super.readEntityFromNBT(var1);
+ this.offsetX = var1.getDouble("offsetX");
+ this.offsetY = var1.getDouble("offsetY");
+ this.offsetZ = var1.getDouble("offsetZ");
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ super.writeEntityToNBT(var1);
+ var1.setDouble("offsetX", this.offsetX);
+ var1.setDouble("offsetY", this.offsetY);
+ var1.setDouble("offsetZ", this.offsetZ);
+ }
+
+ public int getMaxHealth()
+ {
+ return 0;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/camera/CameraManager.java b/src/main/java/net/aetherteam/aether/entities/camera/CameraManager.java
new file mode 100644
index 0000000..6387b08
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/camera/CameraManager.java
@@ -0,0 +1,34 @@
+package net.aetherteam.aether.entities.camera;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.world.World;
+
+public class CameraManager
+{
+ private static Minecraft mc = Minecraft.getMinecraft();
+ private static EntityPlayer player = mc.thePlayer;
+ private static Camera activeCamera;
+ private static Entity viewingEntity = mc.renderViewEntity;
+
+ public static void useCamera(World var0, Camera var1)
+ {
+ if (!var0.isRemote)
+ {
+ activeCamera = var1;
+ var0.spawnEntityInWorld(activeCamera);
+ mc.renderViewEntity = var1;
+ }
+ }
+
+ public static void turnOffCamera(World var0)
+ {
+ if (!var0.isRemote)
+ {
+ mc.renderViewEntity = player;
+ activeCamera.setDead();
+ activeCamera = null;
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/dungeon/EntityRewardItem.java b/src/main/java/net/aetherteam/aether/entities/dungeon/EntityRewardItem.java
new file mode 100644
index 0000000..c861640
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/dungeon/EntityRewardItem.java
@@ -0,0 +1,79 @@
+package net.aetherteam.aether.entities.dungeon;
+
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.World;
+
+public class EntityRewardItem extends EntityItem
+{
+ public EntityRewardItem(World var1, double var2, double var4, double var6, String var8)
+ {
+ super(var1);
+ this.setPlayerName(var8);
+ }
+
+ public EntityRewardItem(World var1, double var2, double var4, double var6, ItemStack var8, String var9)
+ {
+ super(var1, var2, var4, var6, var8);
+ this.setPlayerName(var9);
+ }
+
+ public EntityRewardItem(World var1)
+ {
+ super(var1);
+ }
+
+ protected void entityInit()
+ {
+ super.entityInit();
+ this.dataWatcher.addObject(16, String.valueOf(""));
+ }
+
+ public void setPlayerName(String var1)
+ {
+ this.dataWatcher.updateObject(16, var1);
+ }
+
+ public String getPlayerName()
+ {
+ return this.dataWatcher.getWatchableObjectString(16);
+ }
+
+ private void searchForOtherItemsNearby() {}
+
+ public boolean combineItems(EntityRewardItem var1)
+ {
+ return false;
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ super.writeEntityToNBT(var1);
+ var1.setString("PlayerName", this.getPlayerName());
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ super.readEntityFromNBT(var1);
+ this.setPlayerName(var1.getString("PlayerName"));
+ }
+
+ /**
+ * Called by a player entity when they collide with an entity
+ */
+ public void onCollideWithPlayer(EntityPlayer var1)
+ {
+ if (!this.worldObj.isRemote && this.getPlayerName() != null && var1.username.equalsIgnoreCase(this.getPlayerName()))
+ {
+ super.onCollideWithPlayer(var1);
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/mounts/EntityAerbunny.java b/src/main/java/net/aetherteam/aether/entities/mounts/EntityAerbunny.java
new file mode 100644
index 0000000..c5ab207
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/mounts/EntityAerbunny.java
@@ -0,0 +1,330 @@
+package net.aetherteam.aether.entities.mounts;
+
+import java.util.Random;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.entities.EntityAetherAnimal;
+import net.aetherteam.aether.entities.ai.AIEntityAerbunnyHop;
+import net.aetherteam.aether.entities.ai.AIEntityEatBlock;
+import net.aetherteam.aether.entities.mounts_old.Ridable;
+import net.aetherteam.aether.entities.mounts_old.RidingHandler;
+import net.aetherteam.aether.entities.mounts_old.RidingHandlerAerbunny;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityAgeable;
+import net.minecraft.entity.ai.EntityAIAvoidEntity;
+import net.minecraft.entity.ai.EntityAISwimming;
+import net.minecraft.entity.ai.EntityAIWander;
+import net.minecraft.entity.ai.EntityAIWatchClosest;
+import net.minecraft.entity.passive.EntityAnimal;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.DamageSource;
+import net.minecraft.world.World;
+
+public class EntityAerbunny extends EntityAetherAnimal implements Ridable
+{
+ public AIEntityEatBlock aiEatGrass;
+ private int jumpTicks;
+ private int jumps;
+ public RidingHandler ridinghandler;
+ public int age;
+ public int mate;
+ public boolean grab;
+ public boolean fear;
+ public boolean gotrider;
+ public Entity runFrom;
+ public float puffiness;
+
+ public EntityAerbunny(World var1)
+ {
+ super(var1);
+ this.aiEatGrass = new AIEntityEatBlock(this, AetherBlocks.AetherGrass, AetherBlocks.AetherDirt);
+ this.moveSpeed = 2.5F;
+ this.getNavigator().setAvoidsWater(true);
+ this.tasks.addTask(1, new EntityAISwimming(this));
+ this.tasks.addTask(2, new EntityAIAvoidEntity(this, EntityPlayer.class, 16.0F, 2.6F, 2.8F));
+ this.tasks.addTask(3, new EntityAIWander(this, 2.5F));
+ this.tasks.addTask(4, new EntityAIWatchClosest(this, EntityPlayer.class, 10.0F));
+ this.tasks.addTask(5, this.aiEatGrass);
+ this.tasks.addTask(6, new AIEntityAerbunnyHop(this));
+ this.texture = this.dir + "/mobs/aerbunny/aerbunny.png";
+ this.setSize(0.4F, 0.4F);
+ this.health = 6;
+ this.age = this.rand.nextInt(64);
+ this.mate = 0;
+ this.ignoreFrustumCheck = true;
+ this.ridinghandler = new RidingHandlerAerbunny(this);
+ }
+
+ /**
+ * Checks if the entity is in range to render by using the past in distance and comparing it to its average edge
+ * length * 64 * renderDistanceWeight Args: distance
+ */
+ public boolean isInRangeToRenderDist(double var1)
+ {
+ return true;
+ }
+
+ /**
+ * Returns true if the newer Entity AI code should be run
+ */
+ protected boolean isAIEnabled()
+ {
+ return true;
+ }
+
+ /**
+ * Causes this entity to do an upwards motion (jumping).
+ */
+ protected void jump()
+ {
+ for (int var1 = 0; var1 < 5; ++var1)
+ {
+ Aether.proxy.spawnCloudSmoke(this.worldObj, this.posX, this.posY + 0.5D, this.posZ, new Random(), Double.valueOf(0.5D));
+ }
+
+ this.setPuffiness(11);
+ --this.jumps;
+ super.jump();
+ }
+
+ public int getPuffiness()
+ {
+ return this.dataWatcher.getWatchableObjectInt(16);
+ }
+
+ public void setPuffiness(int var1)
+ {
+ Integer var2 = Integer.valueOf(this.dataWatcher.getWatchableObjectInt(16));
+ this.dataWatcher.updateObject(16, Integer.valueOf(var1));
+ }
+
+ protected void entityInit()
+ {
+ super.entityInit();
+ this.dataWatcher.addObject(16, new Integer(0));
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ this.setPuffiness(this.getPuffiness() - 1);
+
+ if (this.getPuffiness() < 0)
+ {
+ this.setPuffiness(0);
+ }
+
+ super.onUpdate();
+ }
+
+ /**
+ * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons
+ * use this to react to sunlight and start to burn.
+ */
+ public void onLivingUpdate()
+ {
+ if (this.onGround)
+ {
+ this.jumps = 1;
+ this.jumpTicks = 10;
+ } else if (this.jumpTicks > 0)
+ {
+ --this.jumpTicks;
+ }
+
+ if (this.isJumping && !this.isInWater() && !this.handleLavaMovement() && !this.onGround && this.jumpTicks == 0 && this.jumps > 0)
+ {
+ this.jump();
+ this.jumpTicks = 10;
+ }
+
+ if (this.motionY < -0.1D)
+ {
+ this.motionY = -0.1D;
+ }
+
+ super.onLivingUpdate();
+ }
+
+ /**
+ * Called when the mob is falling. Calculates and applies fall damage.
+ */
+ protected void fall(float var1)
+ {}
+
+ /**
+ * Checks if this entity is inside of an opaque block
+ */
+ public boolean isEntityInsideOpaqueBlock()
+ {
+ return false;
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ super.writeEntityToNBT(var1);
+ var1.setBoolean("Fear", this.fear);
+ var1.setShort("RepAge", (short) this.age);
+ var1.setShort("RepMate", (short) this.mate);
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ super.readEntityFromNBT(var1);
+ this.fear = var1.getBoolean("Fear");
+ this.age = var1.getShort("RepAge");
+ this.mate = var1.getShort("RepMate");
+ }
+
+ /**
+ * Called when the entity is attacked.
+ */
+ public boolean attackEntityFrom(DamageSource var1, int var2)
+ {
+ return var1.getEntity() instanceof EntityPlayer && this.getRidingHandler().getRider() instanceof EntityPlayer ? false : super.attackEntityFrom(var1, var2);
+ }
+
+ public void cloudPoop()
+ {
+ double var1 = (double) (this.rand.nextFloat() - 0.5F);
+ double var5 = (double) (this.rand.nextFloat() - 0.5F);
+ double var7 = this.posX + var1 * 0.4000000059604645D;
+ double var9 = this.boundingBox.minY;
+ double var11 = this.posZ + var1 * 0.4000000059604645D;
+ this.worldObj.spawnParticle("flame", var7, var9, var11, 0.0D, -0.07500000298023224D, 0.0D);
+ }
+
+ /**
+ * returns true if this entity is by a ladder, false otherwise
+ */
+ public boolean isOnLadder()
+ {
+ return this.moveForward != 0.0F;
+ }
+
+ public EntityAnimal spawnBabyAnimal(EntityAnimal var1)
+ {
+ return new EntityAerbunny(this.worldObj);
+ }
+
+ public boolean isWheat(ItemStack var1)
+ {
+ return var1.itemID == Item.wheat.itemID;
+ }
+
+ /**
+ * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig.
+ */
+ public boolean interact(EntityPlayer var1)
+ {
+ ItemStack var2 = var1.inventory.getCurrentItem();
+
+ if (var2 != null && this.isWheat(var2))
+ {
+ return super.interact(var1);
+ } else
+ {
+ if (this.riddenByEntity == null && !this.getRidingHandler().isBeingRidden())
+ {
+ this.getRidingHandler().setRider(var1);
+ this.worldObj.playSoundAtEntity(this, "aemob.aerbunny.lift", 1.0F, (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F);
+ } else
+ {
+ this.getRidingHandler().onUnMount();
+ }
+
+ return true;
+ }
+ }
+
+ /**
+ * Returns the sound this mob makes while it's alive.
+ */
+ protected String getLivingSound()
+ {
+ return null;
+ }
+
+ /**
+ * Drop 0-2 items of this living's type. @param par1 - Whether this entity has recently been hit by a player. @param
+ * par2 - Level of Looting used to kill this mob.
+ */
+ protected void dropFewItems(boolean var1, int var2)
+ {
+ this.dropItem(Item.silk.itemID, 1);
+ }
+
+ public void proceed()
+ {
+ this.mate = 0;
+ this.age = this.rand.nextInt(64);
+ }
+
+ /**
+ * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to
+ * prevent them from trampling crops
+ */
+ protected boolean canTriggerWalking()
+ {
+ return this.onGround;
+ }
+
+ /**
+ * Returns the sound this mob makes when it is hurt.
+ */
+ protected String getHurtSound()
+ {
+ return "aemob.aerbunny.hurt";
+ }
+
+ /**
+ * Returns the sound this mob makes on death.
+ */
+ protected String getDeathSound()
+ {
+ return "aemob.aerbunny.die";
+ }
+
+ /**
+ * Checks if the entity's current position is a valid location to spawn this entity.
+ */
+ public boolean getCanSpawnHere()
+ {
+ return super.getCanSpawnHere();
+ }
+
+ /**
+ * Returns true if other Entities should be prevented from moving through this Entity.
+ */
+ public boolean canBeCollidedWith()
+ {
+ return this.getRidingHandler().getRider() instanceof EntityPlayer ? false : super.canBeCollidedWith();
+ }
+
+ public int getMaxHealth()
+ {
+ return 5;
+ }
+
+ public RidingHandler getRidingHandler()
+ {
+ return this.ridinghandler;
+ }
+
+ public EntityAgeable createChild(EntityAgeable var1)
+ {
+ return null;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/mounts/EntityFlyingCow.java b/src/main/java/net/aetherteam/aether/entities/mounts/EntityFlyingCow.java
new file mode 100644
index 0000000..911ffd6
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/mounts/EntityFlyingCow.java
@@ -0,0 +1,433 @@
+package net.aetherteam.aether.entities.mounts;
+
+import java.util.ArrayList;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.PlayerBaseAetherServer;
+import net.aetherteam.aether.entities.EntityAetherAnimal;
+import net.aetherteam.aether.entities.ai.AIEntityControlledByPlayerPhyg;
+import net.minecraft.entity.EntityAgeable;
+import net.minecraft.entity.ai.EntityAILookIdle;
+import net.minecraft.entity.ai.EntityAIPanic;
+import net.minecraft.entity.ai.EntityAISwimming;
+import net.minecraft.entity.ai.EntityAIWander;
+import net.minecraft.entity.ai.EntityAIWatchClosest;
+import net.minecraft.entity.passive.EntityAnimal;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.DamageSource;
+import net.minecraft.world.World;
+
+public class EntityFlyingCow extends EntityAetherAnimal implements Mount
+{
+ private AIEntityControlledByPlayerPhyg entityAIControlled;
+ float speed;
+ public float wingFold;
+ public float wingAngle;
+ private float aimingForFold;
+ public int jumps;
+ public int jumpsRemaining;
+ private boolean jpress;
+ private int ticks;
+ public boolean riderJumped;
+
+ public EntityFlyingCow(World var1)
+ {
+ super(var1);
+ this.texture = this.dir + "/mobs/flyingcow/flyingcow.png";
+ this.speed = 0.3F;
+ this.getNavigator().setAvoidsWater(true);
+ this.tasks.addTask(0, new EntityAISwimming(this));
+ this.tasks.addTask(1, new EntityAIPanic(this, 0.38F));
+ this.tasks.addTask(2, new EntityAIWander(this, this.speed));
+ this.tasks.addTask(4, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
+ this.tasks.addTask(5, new EntityAILookIdle(this));
+ this.setSize(0.9F, 1.3F);
+ this.jumpsRemaining = 0;
+ this.jumps = 1;
+ this.ticks = 0;
+ this.stepHeight = 1.0F;
+ this.ignoreFrustumCheck = true;
+ }
+
+ /**
+ * Returns true if the newer Entity AI code should be run
+ */
+ public boolean isAIEnabled()
+ {
+ return this.riddenByEntity == null;
+ }
+
+ /**
+ * Return the AI task for player control.
+ */
+ public AIEntityControlledByPlayerPhyg getAIControlledByPlayer()
+ {
+ return this.entityAIControlled;
+ }
+
+ /**
+ * Determines if an entity can be despawned, used on idle far away entities
+ */
+ protected boolean canDespawn()
+ {
+ return !this.getSaddled();
+ }
+
+ /**
+ * Checks if this entity is inside of an opaque block
+ */
+ public boolean isEntityInsideOpaqueBlock()
+ {
+ return this.riddenByEntity != null ? false : super.isEntityInsideOpaqueBlock();
+ }
+
+ /**
+ * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to
+ * prevent them from trampling crops
+ */
+ protected boolean canTriggerWalking()
+ {
+ return this.onGround;
+ }
+
+ protected void entityInit()
+ {
+ super.entityInit();
+ this.dataWatcher.addObject(16, Byte.valueOf((byte) 0));
+ this.dataWatcher.addObject(17, Integer.valueOf(this.health));
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ super.writeEntityToNBT(var1);
+ var1.setShort("Jumps", (short) this.jumps);
+ var1.setShort("Remaining", (short) this.jumpsRemaining);
+ var1.setBoolean("getSaddled", this.getSaddled());
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ super.readEntityFromNBT(var1);
+ this.jumps = var1.getShort("Jumps");
+ this.jumpsRemaining = var1.getShort("Remaining");
+ this.setSaddled(var1.getBoolean("getSaddled"));
+ }
+
+ /**
+ * Returns the Y offset from the entity's position for any entity riding this one.
+ */
+ public double getMountedYOffset()
+ {
+ return 1.25D;
+ }
+
+ public void updateEntityActionState()
+ {
+ if (!this.worldObj.isRemote)
+ {
+ if (this.riddenByEntity != null && this.riddenByEntity instanceof EntityPlayer)
+ {
+ this.moveForward = 0.0F;
+ this.moveStrafing = 0.0F;
+ this.isJumping = false;
+ this.riddenByEntity.fallDistance = 0.0F;
+ EntityPlayer var1 = (EntityPlayer) this.riddenByEntity;
+ this.setRotation(this.riddenByEntity.rotationYaw, this.riddenByEntity.rotationPitch);
+ double var2 = 0.40499999701976774D;
+
+ if (var1.isSneaking())
+ {
+ var2 = 0.15D;
+ }
+
+ float var4 = (float) Math.PI;
+ float var5 = var4 / 180.0F;
+ PlayerBaseAetherServer var6 = Aether.getServerPlayer(var1);
+
+ if (var6 != null)
+ {
+ ArrayList var7 = var6.mountInput;
+ boolean var8 = var7.contains(MountInput.FORWARD);
+ boolean var9 = var7.contains(MountInput.BACKWARD);
+ boolean var10 = var7.contains(MountInput.LEFT);
+ boolean var11 = var7.contains(MountInput.RIGHT);
+ boolean var12 = var7.contains(MountInput.JUMP);
+ float var13;
+
+ if (var8)
+ {
+ var13 = var1.rotationYaw * var5;
+ this.motionX += -Math.sin((double) var13) * var2;
+ this.motionZ += Math.cos((double) var13) * var2;
+ } else if (var9)
+ {
+ var13 = var1.rotationYaw * var5;
+ this.motionX += Math.sin((double) var13) * var2;
+ this.motionZ += -Math.cos((double) var13) * var2;
+ }
+
+ if (var10)
+ {
+ var13 = var1.rotationYaw * var5;
+ this.motionX += Math.cos((double) var13) * var2;
+ this.motionZ += Math.sin((double) var13) * var2;
+ } else if (var11)
+ {
+ var13 = var1.rotationYaw * var5;
+ this.motionX += -Math.cos((double) var13) * var2;
+ this.motionZ += -Math.sin((double) var13) * var2;
+ }
+
+ if (this.onGround && var12)
+ {
+ this.onGround = false;
+ this.jump();
+ this.riderJumped = true;
+ } else if (this.handleWaterMovement() && var12)
+ {
+ this.jump();
+ this.riderJumped = true;
+ }
+
+ if (this.riderJumped && !var12)
+ {
+ this.riderJumped = false;
+ }
+ }
+
+ double var15 = Math.abs(Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ));
+
+ if (var15 > var2)
+ {
+ double var14 = var2 / var15;
+ this.motionX *= var14;
+ this.motionZ *= var14;
+ }
+ } else
+ {
+ super.updateEntityActionState();
+ }
+ }
+ }
+
+ /**
+ * Called when the entity is attacked.
+ */
+ public boolean attackEntityFrom(DamageSource var1, int var2)
+ {
+ return var1.getEntity() instanceof EntityPlayer && this.riddenByEntity == var1.getEntity() ? false : super.attackEntityFrom(var1, var2);
+ }
+
+ /**
+ * Causes this entity to do an upwards motion (jumping).
+ */
+ protected void jump()
+ {
+ this.motionY = 1.45D;
+ }
+
+ public int getHealthTracked()
+ {
+ return this.dataWatcher.getWatchableObjectInt(17);
+ }
+
+ public boolean shouldRiderFaceForward(EntityPlayer var1)
+ {
+ return true;
+ }
+
+ /**
+ * returns true if all the conditions for steering the entity are met. For pigs, this is true if it is being ridden
+ * by a player and the player is holding a carrot-on-a-stick
+ */
+ public boolean canBeSteered()
+ {
+ return true;
+ }
+
+ public void setHealthTracked()
+ {
+ this.dataWatcher.updateObject(17, Integer.valueOf(this.health));
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+
+ if (!this.worldObj.isRemote && this.getHealthTracked() != this.health)
+ {
+ this.setHealthTracked();
+ }
+
+ if (!this.onGround && this.motionY < 0.0D)
+ {
+ if (this.riddenByEntity != null)
+ {
+ if (this.riddenByEntity instanceof EntityPlayer)
+ {
+ EntityPlayer var1 = (EntityPlayer) this.riddenByEntity;
+
+ if (!var1.isSneaking())
+ {
+ this.motionY *= 0.6375D;
+ }
+ }
+ } else
+ {
+ this.motionY *= 0.6D;
+ }
+ }
+
+ if (this.onGround)
+ {
+ this.wingAngle *= 0.8F;
+ this.aimingForFold = 0.1F;
+ this.jpress = false;
+ this.jumpsRemaining = this.jumps;
+ } else
+ {
+ this.aimingForFold = 1.0F;
+ }
+
+ ++this.ticks;
+ this.wingAngle = this.wingFold * (float) Math.sin((double) ((float) this.ticks / 31.830988F));
+ this.wingFold += (this.aimingForFold - this.wingFold) / 5.0F;
+ this.fallDistance = 0.0F;
+
+ if (this.getSaddled())
+ {
+ this.texture = this.dir + "/mobs/flyingcow/saddle.png";
+ }
+ }
+
+ /**
+ * Returns the sound this mob makes while it's alive.
+ */
+ protected String getLivingSound()
+ {
+ return "mob.cow.say";
+ }
+
+ /**
+ * Returns the sound this mob makes when it is hurt.
+ */
+ protected String getHurtSound()
+ {
+ return "mob.cow.hurt";
+ }
+
+ /**
+ * Returns the sound this mob makes on death.
+ */
+ protected String getDeathSound()
+ {
+ return "mob.cow.hurt";
+ }
+
+ /**
+ * Returns the volume for the sounds this mob makes.
+ */
+ protected float getSoundVolume()
+ {
+ return 0.4F;
+ }
+
+ /**
+ * Plays step sound at given x, y, z for the entity
+ */
+ protected void playStepSound(int var1, int var2, int var3, int var4)
+ {
+ this.worldObj.playSoundAtEntity(this, "mob.cow.step", 0.15F, 1.0F);
+ }
+
+ public EntityAnimal spawnBabyAnimal(EntityAnimal var1)
+ {
+ return new EntityFlyingCow(this.worldObj);
+ }
+
+ /**
+ * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig.
+ */
+ public boolean interact(EntityPlayer var1)
+ {
+ if (!this.getSaddled() && var1.inventory.getCurrentItem() != null && var1.inventory.getCurrentItem().itemID == Item.saddle.itemID && !this.isChild())
+ {
+ var1.inventory.setInventorySlotContents(var1.inventory.currentItem, (ItemStack) null);
+ this.setSaddled(true);
+ this.texture = this.dir + "/mobs/flyingcow/saddle.png";
+ return true;
+ } else if (!this.getSaddled())
+ {
+ return super.interact(var1);
+ } else if (this.getSaddled() && (this.riddenByEntity == null || var1 == this.riddenByEntity))
+ {
+ if (!var1.worldObj.isRemote)
+ {
+ var1.mountEntity(this);
+ var1.prevRotationYaw = var1.rotationYaw = this.rotationYaw;
+ }
+
+ return true;
+ } else
+ {
+ return true;
+ }
+ }
+
+ public boolean getSaddled()
+ {
+ return (this.dataWatcher.getWatchableObjectByte(16) & 1) != 0;
+ }
+
+ public void setSaddled(boolean var1)
+ {
+ if (var1)
+ {
+ this.dataWatcher.updateObject(16, Byte.valueOf((byte) 1));
+ this.health = this.getMaxHealth();
+ } else
+ {
+ this.dataWatcher.updateObject(16, Byte.valueOf((byte) 0));
+ }
+ }
+
+ /**
+ * Drop 0-2 items of this living's type. @param par1 - Whether this entity has recently been hit by a player. @param
+ * par2 - Level of Looting used to kill this mob.
+ */
+ protected void dropFewItems(boolean var1, int var2)
+ {
+ this.dropItem(Item.leather.itemID, 2);
+ this.dropSaddle();
+ }
+
+ protected void dropSaddle()
+ {
+ if (this.getSaddled())
+ {
+ this.dropItem(Item.saddle.itemID, 1);
+ }
+ }
+
+ public int getMaxHealth()
+ {
+ return this.getSaddled() ? 40 : 10;
+ }
+
+ public EntityAgeable createChild(EntityAgeable var1)
+ {
+ return this;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/mounts/EntityMoa.java b/src/main/java/net/aetherteam/aether/entities/mounts/EntityMoa.java
new file mode 100644
index 0000000..96818a9
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/mounts/EntityMoa.java
@@ -0,0 +1,679 @@
+package net.aetherteam.aether.entities.mounts;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.ArrayList;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.AetherMoaColour;
+import net.aetherteam.aether.PlayerBaseAetherServer;
+import net.aetherteam.aether.entities.EntityAetherAnimal;
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.entity.EntityAgeable;
+import net.minecraft.entity.ai.EntityAILookIdle;
+import net.minecraft.entity.ai.EntityAIPanic;
+import net.minecraft.entity.ai.EntityAISwimming;
+import net.minecraft.entity.ai.EntityAIWander;
+import net.minecraft.entity.ai.EntityAIWatchClosest;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.DamageSource;
+import net.minecraft.world.World;
+
+public class EntityMoa extends EntityAetherAnimal implements Mount
+{
+ float speed;
+ public float field_752_b;
+ public float destPos;
+ public float field_757_d;
+ public float field_756_e;
+ public float field_755_h;
+ public boolean riderJumped;
+ public int timeUntilNextEgg;
+ boolean followPlayer;
+
+ public EntityMoa(World var1)
+ {
+ this(var1, false, false, false, (EntityPlayer) null);
+ }
+
+ public EntityMoa(World var1, boolean var2, boolean var3, boolean var4, AetherMoaColour var5, EntityPlayer var6, String var7)
+ {
+ this(var1, var2, var3, var4, var5, var6);
+
+ if (var7 != null && !var7.isEmpty())
+ {
+ this.texture = var7;
+ }
+ }
+
+ public EntityMoa(World var1, boolean var2, boolean var3, boolean var4, AetherMoaColour var5, EntityPlayer var6)
+ {
+ super(var1);
+ this.followPlayer = false;
+ this.destPos = 0.0F;
+ this.field_755_h = 1.0F;
+ this.stepHeight = 1.0F;
+ this.setSaddled(var4);
+ this.setGrown(var3);
+ this.setBaby(var2);
+
+ if (this.isBaby())
+ {
+ this.setSize(0.4F, 0.5F);
+
+ if (var6 != null)
+ {
+ ;
+ }
+ }
+
+ this.setColour(var5);
+ this.texture = this.getColour().getTexture(this.getSaddled());
+ this.setSize(1.0F, 2.0F);
+ this.timeUntilNextEgg = this.rand.nextInt(6000) + 6000;
+ this.speed = 0.3F;
+ this.getNavigator().setAvoidsWater(true);
+ this.tasks.addTask(0, new EntityAISwimming(this));
+ this.tasks.addTask(1, new EntityAIPanic(this, 0.38F));
+ this.tasks.addTask(2, new EntityAIWander(this, this.speed));
+ this.tasks.addTask(4, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
+ this.tasks.addTask(5, new EntityAILookIdle(this));
+ this.ignoreFrustumCheck = true;
+ }
+
+ public EntityMoa(World var1, boolean var2, boolean var3, boolean var4, EntityPlayer var5)
+ {
+ this(var1, var2, var3, var4, AetherMoaColour.pickRandomMoa(), var5);
+ }
+
+ protected void entityInit()
+ {
+ super.entityInit();
+ this.dataWatcher.addObject(16, Byte.valueOf((byte) 0));
+ this.dataWatcher.addObject(17, Byte.valueOf((byte) 0));
+ this.dataWatcher.addObject(18, Byte.valueOf((byte) 0));
+ this.dataWatcher.addObject(19, Integer.valueOf(0));
+ this.dataWatcher.addObject(20, Short.valueOf((short) 0));
+ this.dataWatcher.addObject(21, Byte.valueOf((byte) 0));
+ this.dataWatcher.addObject(22, String.valueOf(this.texture));
+ this.dataWatcher.addObject(23, Integer.valueOf(this.getColour().jumps));
+ this.dataWatcher.addObject(24, Integer.valueOf(this.health));
+ }
+
+ /**
+ * Returns true if the newer Entity AI code should be run
+ */
+ public boolean isAIEnabled()
+ {
+ return !this.getSaddled();
+ }
+
+ public boolean shouldRiderFaceForward(EntityPlayer var1)
+ {
+ return true;
+ }
+
+ /**
+ * Plays step sound at given x, y, z for the entity
+ */
+ protected void playStepSound(int var1, int var2, int var3, int var4)
+ {
+ this.worldObj.playSoundAtEntity(this, "mob.pig.step", 0.15F, 1.0F);
+ }
+
+ /**
+ * Causes this entity to do an upwards motion (jumping).
+ */
+ protected void jump()
+ {
+ this.motionY = 0.6D;
+ }
+
+ /**
+ * returns true if all the conditions for steering the entity are met. For pigs, this is true if it is being ridden
+ * by a player and the player is holding a carrot-on-a-stick
+ */
+ public boolean canBeSteered()
+ {
+ return true;
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+
+ if (!this.worldObj.isRemote && this.getHealthTracked() != this.health)
+ {
+ this.setHealthTracked();
+ }
+
+ if (this.riddenByEntity == null)
+ {
+ this.setTexture(this.getColour().getTexture(this.getSaddled()));
+ } else
+ {
+ this.setTexture(this.getColour().getTexture(this.getSaddled(), (EntityPlayer) this.riddenByEntity));
+ }
+
+ this.fallDistance = 0.0F;
+
+ if (!this.worldObj.isRemote && !this.isBaby() && --this.timeUntilNextEgg <= 0)
+ {
+ this.worldObj.playSoundAtEntity(this, "mob.chickenplop", 1.0F, (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F);
+ boolean var1 = false;
+
+ if (this.rand.nextInt(20) == 0)
+ {
+ var1 = true;
+ }
+
+ if (var1)
+ {
+ this.entityDropItem(new ItemStack(AetherItems.MoaMusicDisk, 1, 0), 0.0F);
+ } else
+ {
+ this.entityDropItem(new ItemStack(AetherItems.MoaEgg, 1, this.getColour().ID), 0.0F);
+ }
+
+ this.timeUntilNextEgg = this.rand.nextInt(6000) + 6000;
+ }
+
+ if (this.isWellFed() && this.rand.nextInt(750) == 0)
+ {
+ this.setWellFed(false);
+ }
+
+ this.updateWingFields();
+
+ if (this.onGround)
+ {
+ this.riderJumped = false;
+ this.setJumpsRemaining(this.getColour().jumps);
+ }
+
+ if (!this.onGround && this.motionY < 0.0D)
+ {
+ if (this.riddenByEntity != null)
+ {
+ if (this.riddenByEntity instanceof EntityPlayer)
+ {
+ EntityPlayer var2 = (EntityPlayer) this.riddenByEntity;
+
+ if (!var2.isSneaking())
+ {
+ this.motionY *= 0.6375D;
+ }
+ }
+ } else
+ {
+ this.motionY *= 0.6D;
+ }
+ }
+ }
+
+ /**
+ * Returns the Y offset from the entity's position for any entity riding this one.
+ */
+ public double getMountedYOffset()
+ {
+ return 1.37D;
+ }
+
+ public void updateEntityActionState()
+ {
+ if (!this.worldObj.isRemote)
+ {
+ if (this.riddenByEntity != null && this.riddenByEntity instanceof EntityPlayer)
+ {
+ this.moveForward = 0.0F;
+ this.moveStrafing = 0.0F;
+ this.isJumping = false;
+ this.riddenByEntity.fallDistance = 0.0F;
+ EntityPlayer var1 = (EntityPlayer) this.riddenByEntity;
+ this.setRotation(this.riddenByEntity.rotationYaw, this.riddenByEntity.rotationPitch);
+ double var2 = 0.40499999701976774D;
+
+ if (var1.isSneaking())
+ {
+ var2 = 0.15D;
+ }
+
+ float var4 = (float) Math.PI;
+ float var5 = var4 / 180.0F;
+ PlayerBaseAetherServer var6 = Aether.getServerPlayer(var1);
+
+ if (var6 != null)
+ {
+ ArrayList var7 = var6.mountInput;
+ boolean var8 = var7.contains(MountInput.FORWARD);
+ boolean var9 = var7.contains(MountInput.BACKWARD);
+ boolean var10 = var7.contains(MountInput.LEFT);
+ boolean var11 = var7.contains(MountInput.RIGHT);
+ boolean var12 = var7.contains(MountInput.JUMP);
+ float var13;
+
+ if (var8)
+ {
+ var13 = var1.rotationYaw * var5;
+ this.motionX += -Math.sin((double) var13) * var2;
+ this.motionZ += Math.cos((double) var13) * var2;
+ } else if (var9)
+ {
+ var13 = var1.rotationYaw * var5;
+ this.motionX += Math.sin((double) var13) * var2;
+ this.motionZ += -Math.cos((double) var13) * var2;
+ }
+
+ if (var10)
+ {
+ var13 = var1.rotationYaw * var5;
+ this.motionX += Math.cos((double) var13) * var2;
+ this.motionZ += Math.sin((double) var13) * var2;
+ } else if (var11)
+ {
+ var13 = var1.rotationYaw * var5;
+ this.motionX += -Math.cos((double) var13) * var2;
+ this.motionZ += -Math.sin((double) var13) * var2;
+ }
+
+ if (this.onGround && var12)
+ {
+ this.onGround = false;
+ this.motionY = 0.875D;
+ this.riderJumped = true;
+ this.setJumpsRemaining(this.getJumpsRemaining() - 1);
+ } else if (this.handleWaterMovement() && var12)
+ {
+ this.motionY = 0.5D;
+ this.riderJumped = true;
+ this.setJumpsRemaining(this.getJumpsRemaining() - 1);
+ } else if (this.getJumpsRemaining() > 0 && !this.riderJumped && var12)
+ {
+ this.motionY = 0.75D;
+ this.riderJumped = true;
+ this.setJumpsRemaining(this.getJumpsRemaining() - 1);
+ }
+
+ if (this.riderJumped && !var12)
+ {
+ this.riderJumped = false;
+ }
+ }
+
+ double var15 = Math.abs(Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ));
+
+ if (var15 > var2)
+ {
+ double var14 = var2 / var15;
+ this.motionX *= var14;
+ this.motionZ *= var14;
+ }
+ } else
+ {
+ super.updateEntityActionState();
+ }
+ }
+ }
+
+ /**
+ * Called when the entity is attacked.
+ */
+ public boolean attackEntityFrom(DamageSource var1, int var2)
+ {
+ return var1.getEntity() instanceof EntityPlayer && this.riddenByEntity == var1.getEntity() ? false : super.attackEntityFrom(var1, var2);
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ super.writeEntityToNBT(var1);
+ var1.setShort("ColourNumber", (short) this.getColour().ID);
+ var1.setBoolean("Saddled", this.getSaddled());
+ var1.setBoolean("Grown", this.isGrown());
+ var1.setBoolean("Baby", this.isBaby());
+ var1.setBoolean("wellFed", this.isWellFed());
+ var1.setInteger("petalsEaten", this.getPetalsEaten());
+ var1.setBoolean("followPlayer", this.followPlayer);
+ var1.setInteger("jumpsRemaining", this.getJumpsRemaining());
+ var1.setBoolean("riderJumped", this.riderJumped);
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ super.readEntityFromNBT(var1);
+ this.setColour(AetherMoaColour.getColour(var1.getShort("ColourNumber")));
+ this.setSaddled(var1.getBoolean("Saddled"));
+ this.setGrown(var1.getBoolean("Grown"));
+ this.setBaby(var1.getBoolean("Baby"));
+ this.setWellFed(var1.getBoolean("wellFed"));
+ this.setPetalsEaten(var1.getInteger("petalsEaten"));
+ this.followPlayer = var1.getBoolean("followPlayer");
+ this.setJumpsRemaining(var1.getInteger("jumpsRemaining"));
+ this.riderJumped = var1.getBoolean("riderJumped");
+ }
+
+ /**
+ * Returns the sound this mob makes while it's alive.
+ */
+ protected String getLivingSound()
+ {
+ return "aemob.moa.say";
+ }
+
+ /**
+ * Returns the sound this mob makes when it is hurt.
+ */
+ protected String getHurtSound()
+ {
+ return "aemob.moa.say";
+ }
+
+ /**
+ * Returns the sound this mob makes on death.
+ */
+ protected String getDeathSound()
+ {
+ return "aemob.moa.say";
+ }
+
+ /**
+ * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig.
+ */
+ public boolean interact(EntityPlayer var1)
+ {
+ if (this.canAddSaddle() && var1.inventory.getCurrentItem() != null && var1.inventory.getCurrentItem().itemID == Item.saddle.itemID)
+ {
+ var1.inventory.setInventorySlotContents(var1.inventory.currentItem, (ItemStack) null);
+
+ if (!this.worldObj.isRemote)
+ {
+ this.setGrown(false);
+ this.setSaddled(true);
+ this.setTexture(this.getColour().getTexture(this.getSaddled()));
+ }
+
+ return true;
+ } else if (this.getSaddled() && (this.riddenByEntity == null || var1 == this.riddenByEntity))
+ {
+ if (!var1.worldObj.isRemote)
+ {
+ if (this.riddenByEntity == null)
+ {
+ this.setTexture(this.getColour().getTexture(this.getSaddled(), var1));
+ } else
+ {
+ this.setTexture(this.getColour().getTexture(this.getSaddled()));
+ }
+
+ var1.mountEntity(this);
+ var1.prevRotationYaw = var1.rotationYaw = this.rotationYaw;
+ }
+
+ return true;
+ } else
+ {
+ ItemStack var2 = var1.inventory.getCurrentItem();
+
+ if (!this.worldObj.isRemote)
+ {
+ if (var2 != null && var2.itemID == AetherItems.AechorPetal.itemID)
+ {
+ if (!this.isWellFed() && this.isBaby())
+ {
+ this.increasePetalsEaten(1);
+ var1.inventory.decrStackSize(var1.inventory.currentItem, 1);
+
+ if (this.getPetalsEaten() >= this.getColour().jumps)
+ {
+ this.setBaby(false);
+ this.setGrown(true);
+ } else
+ {
+ this.setWellFed(true);
+ }
+ }
+
+ return true;
+ }
+
+ if (this.isBaby() || this.isGrown())
+ {
+ if (!this.followPlayer)
+ {
+ this.followPlayer = true;
+ this.entityToAttack = var1;
+ } else
+ {
+ this.followPlayer = false;
+ this.entityToAttack = null;
+ }
+ }
+ }
+
+ return super.interact(var1);
+ }
+ }
+
+ public void updateWingFields()
+ {
+ this.field_756_e = this.field_752_b;
+ this.field_757_d = this.destPos;
+ this.destPos = (float) ((double) this.destPos + (double) (this.onGround ? -1 : 4) * 0.05D);
+
+ if (this.destPos < 0.01F)
+ {
+ this.destPos = 0.01F;
+ }
+
+ if (this.destPos > 1.0F)
+ {
+ this.destPos = 1.0F;
+ }
+
+ if (this.onGround)
+ {
+ this.destPos = 0.0F;
+ }
+
+ if (!this.onGround && this.field_755_h < 1.0F)
+ {
+ this.field_755_h = 1.0F;
+ }
+
+ this.field_755_h = (float) ((double) this.field_755_h * 0.9D);
+ this.field_752_b += this.field_755_h * 2.0F;
+ }
+
+ public boolean getSaddled()
+ {
+ return (this.dataWatcher.getWatchableObjectByte(16) & 1) != 0;
+ }
+
+ public void setSaddled(boolean var1)
+ {
+ if (var1)
+ {
+ this.dataWatcher.updateObject(16, Byte.valueOf((byte) 1));
+ this.health = this.getMaxHealth();
+ } else
+ {
+ this.dataWatcher.updateObject(16, Byte.valueOf((byte) 0));
+ }
+ }
+
+ public boolean isBaby()
+ {
+ return (this.dataWatcher.getWatchableObjectByte(17) & 1) != 0;
+ }
+
+ public void setBaby(boolean var1)
+ {
+ if (var1)
+ {
+ this.dataWatcher.updateObject(17, Byte.valueOf((byte) 1));
+ } else
+ {
+ this.dataWatcher.updateObject(17, Byte.valueOf((byte) 0));
+ }
+ }
+
+ public boolean isGrown()
+ {
+ return (this.dataWatcher.getWatchableObjectByte(18) & 1) != 0;
+ }
+
+ public void setGrown(boolean var1)
+ {
+ if (var1)
+ {
+ this.dataWatcher.updateObject(18, Byte.valueOf((byte) 1));
+ } else
+ {
+ this.dataWatcher.updateObject(18, Byte.valueOf((byte) 0));
+ }
+ }
+
+ public int getPetalsEaten()
+ {
+ return this.dataWatcher.getWatchableObjectInt(19);
+ }
+
+ public void increasePetalsEaten(int var1)
+ {
+ this.dataWatcher.updateObject(19, Integer.valueOf(this.dataWatcher.getWatchableObjectInt(19) + var1));
+ }
+
+ public void setPetalsEaten(int var1)
+ {
+ this.dataWatcher.updateObject(19, Integer.valueOf(var1));
+ }
+
+ public AetherMoaColour getColour()
+ {
+ return AetherMoaColour.getColour(this.dataWatcher.getWatchableObjectShort(20));
+ }
+
+ public void setColour(AetherMoaColour var1)
+ {
+ this.dataWatcher.updateObject(20, Short.valueOf((short) var1.ID));
+ }
+
+ public boolean isWellFed()
+ {
+ return (this.dataWatcher.getWatchableObjectByte(21) & 1) != 0;
+ }
+
+ public void setWellFed(boolean var1)
+ {
+ if (var1)
+ {
+ this.dataWatcher.updateObject(21, Byte.valueOf((byte) 1));
+ } else
+ {
+ this.dataWatcher.updateObject(21, Byte.valueOf((byte) 0));
+ }
+ }
+
+ public int getJumpsRemaining()
+ {
+ return this.dataWatcher.getWatchableObjectInt(23);
+ }
+
+ public void setJumpsRemaining(int var1)
+ {
+ this.dataWatcher.updateObject(23, Integer.valueOf(var1));
+ }
+
+ public int getHealthTracked()
+ {
+ return this.dataWatcher.getWatchableObjectInt(24);
+ }
+
+ public void setHealthTracked()
+ {
+ this.dataWatcher.updateObject(24, Integer.valueOf(this.health));
+ }
+
+ @SideOnly(Side.CLIENT)
+
+ /**
+ * Returns the texture's file path as a String.
+ */
+ public String getTexture()
+ {
+ return this.texture;
+ }
+
+ public void setTexture(String var1)
+ {
+ this.texture = var1;
+ }
+
+ public boolean canAddSaddle()
+ {
+ return this.isGrown();
+ }
+
+ /**
+ * Determines if an entity can be despawned, used on idle far away entities
+ */
+ public boolean canDespawn()
+ {
+ return !this.isBaby() && !this.isGrown() && !this.getSaddled();
+ }
+
+ /**
+ * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to
+ * prevent them from trampling crops
+ */
+ protected boolean canTriggerWalking()
+ {
+ return this.onGround;
+ }
+
+ /**
+ * Drop 0-2 items of this living's type. @param par1 - Whether this entity has recently been hit by a player. @param
+ * par2 - Level of Looting used to kill this mob.
+ */
+ protected void dropFewItems(boolean var1, int var2)
+ {
+ this.dropItem(Item.feather.itemID, 3);
+ this.dropSaddle();
+ }
+
+ protected void dropSaddle()
+ {
+ if (this.getSaddled())
+ {
+ this.dropItem(Item.saddle.itemID, 1);
+ }
+ }
+
+ /**
+ * Called when the mob is falling. Calculates and applies fall damage.
+ */
+ protected void fall(float var1)
+ {}
+
+ public int getMaxHealth()
+ {
+ return this.getSaddled() ? 40 : (!this.isGrown() && !this.isBaby() ? 10 : 20);
+ }
+
+ public EntityAgeable createChild(EntityAgeable var1)
+ {
+ return null;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/mounts/EntityPhyg.java b/src/main/java/net/aetherteam/aether/entities/mounts/EntityPhyg.java
new file mode 100644
index 0000000..6681dba
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/mounts/EntityPhyg.java
@@ -0,0 +1,429 @@
+package net.aetherteam.aether.entities.mounts;
+
+import java.util.ArrayList;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.PlayerBaseAetherServer;
+import net.aetherteam.aether.entities.EntityAetherAnimal;
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.entity.EntityAgeable;
+import net.minecraft.entity.ai.EntityAILookIdle;
+import net.minecraft.entity.ai.EntityAIMate;
+import net.minecraft.entity.ai.EntityAIPanic;
+import net.minecraft.entity.ai.EntityAISwimming;
+import net.minecraft.entity.ai.EntityAITempt;
+import net.minecraft.entity.ai.EntityAIWander;
+import net.minecraft.entity.ai.EntityAIWatchClosest;
+import net.minecraft.entity.passive.EntityAnimal;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.DamageSource;
+import net.minecraft.world.World;
+
+public class EntityPhyg extends EntityAetherAnimal implements Mount
+{
+ float speed = 0.3F;
+ public float wingFold;
+ public float wingAngle;
+ private float aimingForFold;
+ public int jumps;
+ public int jumpsRemaining;
+ private boolean jpress;
+ private int ticks;
+ public boolean riderJumped;
+
+ public EntityPhyg(World var1)
+ {
+ super(var1);
+ this.getNavigator().setAvoidsWater(true);
+ this.tasks.addTask(0, new EntityAISwimming(this));
+ this.tasks.addTask(1, new EntityAIPanic(this, 0.38F));
+ this.tasks.addTask(2, new EntityAIWander(this, this.speed));
+ this.tasks.addTask(6, new EntityAIMate(this, 0.25F));
+ this.tasks.addTask(3, new EntityAITempt(this, 0.25F, AetherItems.EnchantedBerry.itemID, false));
+ this.tasks.addTask(4, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
+ this.tasks.addTask(5, new EntityAILookIdle(this));
+ this.texture = this.dir + "/mobs/phyg/phyg.png";
+ this.setSize(0.9F, 1.3F);
+ this.jumpsRemaining = 0;
+ this.jumps = 1;
+ this.ticks = 0;
+ this.stepHeight = 1.0F;
+ this.ignoreFrustumCheck = true;
+ this.health = this.getMaxHealth();
+ }
+
+ /**
+ * Returns true if the newer Entity AI code should be run
+ */
+ public boolean isAIEnabled()
+ {
+ return this.riddenByEntity == null;
+ }
+
+ /**
+ * Checks if this entity is inside of an opaque block
+ */
+ public boolean isEntityInsideOpaqueBlock()
+ {
+ return this.riddenByEntity != null ? false : super.isEntityInsideOpaqueBlock();
+ }
+
+ /**
+ * Determines if an entity can be despawned, used on idle far away entities
+ */
+ protected boolean canDespawn()
+ {
+ return !this.getSaddled();
+ }
+
+ /**
+ * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to
+ * prevent them from trampling crops
+ */
+ protected boolean canTriggerWalking()
+ {
+ return this.onGround;
+ }
+
+ protected void entityInit()
+ {
+ super.entityInit();
+ this.dataWatcher.addObject(16, Byte.valueOf((byte) 0));
+ this.dataWatcher.addObject(17, Integer.valueOf(this.health));
+ }
+
+ public int getHealthTracked()
+ {
+ return this.dataWatcher.getWatchableObjectInt(17);
+ }
+
+ public boolean shouldRiderFaceForward(EntityPlayer var1)
+ {
+ return true;
+ }
+
+ /**
+ * returns true if all the conditions for steering the entity are met. For pigs, this is true if it is being ridden
+ * by a player and the player is holding a carrot-on-a-stick
+ */
+ public boolean canBeSteered()
+ {
+ return true;
+ }
+
+ public void setHealthTracked()
+ {
+ this.dataWatcher.updateObject(17, Integer.valueOf(this.health));
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ super.writeEntityToNBT(var1);
+ var1.setShort("Jumps", (short) this.jumps);
+ var1.setShort("Remaining", (short) this.jumpsRemaining);
+ var1.setBoolean("getSaddled", this.getSaddled());
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ super.readEntityFromNBT(var1);
+ this.jumps = var1.getShort("Jumps");
+ this.jumpsRemaining = var1.getShort("Remaining");
+ this.setSaddled(var1.getBoolean("getSaddled"));
+ }
+
+ /**
+ * Plays step sound at given x, y, z for the entity
+ */
+ protected void playStepSound(int var1, int var2, int var3, int var4)
+ {
+ this.worldObj.playSoundAtEntity(this, "mob.pig.step", 0.15F, 1.0F);
+ }
+
+ /**
+ * Causes this entity to do an upwards motion (jumping).
+ */
+ protected void jump()
+ {
+ this.motionY = 1.45D;
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+
+ if (!this.worldObj.isRemote && this.getHealthTracked() != this.health)
+ {
+ this.setHealthTracked();
+ }
+
+ if (!this.onGround && this.motionY < 0.0D)
+ {
+ if (this.riddenByEntity != null)
+ {
+ if (this.riddenByEntity instanceof EntityPlayer)
+ {
+ EntityPlayer var1 = (EntityPlayer) this.riddenByEntity;
+
+ if (!var1.isSneaking())
+ {
+ this.motionY *= 0.6375D;
+ }
+ }
+ } else
+ {
+ this.motionY *= 0.6D;
+ }
+ }
+
+ if (this.onGround)
+ {
+ this.wingAngle *= 0.8F;
+ this.aimingForFold = 0.1F;
+ this.jpress = false;
+ this.jumpsRemaining = this.jumps;
+ } else
+ {
+ this.aimingForFold = 1.0F;
+ }
+
+ ++this.ticks;
+ this.wingAngle = this.wingFold * (float) Math.sin((double) ((float) this.ticks / 31.830988F));
+ this.wingFold += (this.aimingForFold - this.wingFold) / 5.0F;
+ this.fallDistance = 0.0F;
+
+ if (this.getSaddled())
+ {
+ this.texture = this.dir + "/mobs/phyg/saddle.png";
+ }
+ }
+
+ public void updateEntityActionState()
+ {
+ if (!this.worldObj.isRemote)
+ {
+ if (this.riddenByEntity != null && this.riddenByEntity instanceof EntityPlayer)
+ {
+ this.moveForward = 0.0F;
+ this.moveStrafing = 0.0F;
+ this.isJumping = false;
+ this.riddenByEntity.fallDistance = 0.0F;
+ EntityPlayer var1 = (EntityPlayer) this.riddenByEntity;
+ this.setRotation(this.riddenByEntity.rotationYaw, this.riddenByEntity.rotationPitch);
+ double var2 = 0.40499999701976774D;
+
+ if (var1.isSneaking())
+ {
+ var2 = 0.15D;
+ }
+
+ float var4 = (float) Math.PI;
+ float var5 = var4 / 180.0F;
+ PlayerBaseAetherServer var6 = Aether.getServerPlayer(var1);
+
+ if (var6 != null)
+ {
+ ArrayList var7 = var6.mountInput;
+ boolean var8 = var7.contains(MountInput.FORWARD);
+ boolean var9 = var7.contains(MountInput.BACKWARD);
+ boolean var10 = var7.contains(MountInput.LEFT);
+ boolean var11 = var7.contains(MountInput.RIGHT);
+ boolean var12 = var7.contains(MountInput.JUMP);
+ float var13;
+
+ if (var8)
+ {
+ var13 = var1.rotationYaw * var5;
+ this.motionX += -Math.sin((double) var13) * var2;
+ this.motionZ += Math.cos((double) var13) * var2;
+ } else if (var9)
+ {
+ var13 = var1.rotationYaw * var5;
+ this.motionX += Math.sin((double) var13) * var2;
+ this.motionZ += -Math.cos((double) var13) * var2;
+ }
+
+ if (var10)
+ {
+ var13 = var1.rotationYaw * var5;
+ this.motionX += Math.cos((double) var13) * var2;
+ this.motionZ += Math.sin((double) var13) * var2;
+ } else if (var11)
+ {
+ var13 = var1.rotationYaw * var5;
+ this.motionX += -Math.cos((double) var13) * var2;
+ this.motionZ += -Math.sin((double) var13) * var2;
+ }
+
+ if (this.onGround && var12)
+ {
+ this.onGround = false;
+ this.jump();
+ this.riderJumped = true;
+ } else if (this.handleWaterMovement() && var12)
+ {
+ this.jump();
+ this.riderJumped = true;
+ }
+
+ if (this.riderJumped && !var12)
+ {
+ this.riderJumped = false;
+ }
+ }
+
+ double var15 = Math.abs(Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ));
+
+ if (var15 > var2)
+ {
+ double var14 = var2 / var15;
+ this.motionX *= var14;
+ this.motionZ *= var14;
+ }
+ } else
+ {
+ super.updateEntityActionState();
+ }
+ }
+ }
+
+ /**
+ * Called when the entity is attacked.
+ */
+ public boolean attackEntityFrom(DamageSource var1, int var2)
+ {
+ return var1.getEntity() instanceof EntityPlayer && this.riddenByEntity == var1.getEntity() ? false : super.attackEntityFrom(var1, var2);
+ }
+
+ /**
+ * Returns the sound this mob makes while it's alive.
+ */
+ protected String getLivingSound()
+ {
+ return "mob.pig.say";
+ }
+
+ /**
+ * Returns the sound this mob makes when it is hurt.
+ */
+ protected String getHurtSound()
+ {
+ return "mob.pig.say";
+ }
+
+ /**
+ * Returns the sound this mob makes on death.
+ */
+ protected String getDeathSound()
+ {
+ return "mob.pig.death";
+ }
+
+ public EntityAnimal spawnBabyAnimal(EntityAnimal var1)
+ {
+ return new EntityPhyg(this.worldObj);
+ }
+
+ /**
+ * Returns the Y offset from the entity's position for any entity riding this one.
+ */
+ public double getMountedYOffset()
+ {
+ return 0.75D;
+ }
+
+ /**
+ * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig.
+ */
+ public boolean interact(EntityPlayer var1)
+ {
+ if (super.interact(var1))
+ {
+ return super.interact(var1);
+ } else if (!this.getSaddled() && var1.inventory.getCurrentItem() != null && var1.inventory.getCurrentItem().itemID == Item.saddle.itemID && !this.isChild())
+ {
+ var1.inventory.setInventorySlotContents(var1.inventory.currentItem, (ItemStack) null);
+ this.setSaddled(true);
+ this.texture = this.dir + "/mobs/phyg/saddle.png";
+ return true;
+ } else if (this.getSaddled() && (this.riddenByEntity == null || var1 == this.riddenByEntity))
+ {
+ if (!var1.worldObj.isRemote)
+ {
+ var1.mountEntity(this);
+ var1.prevRotationYaw = var1.rotationYaw = this.rotationYaw;
+ }
+
+ return true;
+ } else
+ {
+ return true;
+ }
+ }
+
+ /**
+ * Drop 0-2 items of this living's type. @param par1 - Whether this entity has recently been hit by a player. @param
+ * par2 - Level of Looting used to kill this mob.
+ */
+ protected void dropFewItems(boolean var1, int var2)
+ {
+ this.dropItem(this.rand.nextBoolean() ? Item.feather.itemID : Item.porkRaw.itemID, 1);
+ this.dropSaddle();
+ }
+
+ protected void dropSaddle()
+ {
+ if (this.getSaddled())
+ {
+ this.dropItem(Item.saddle.itemID, 1);
+ }
+ }
+
+ public boolean getSaddled()
+ {
+ return (this.dataWatcher.getWatchableObjectByte(16) & 1) != 0;
+ }
+
+ public void setSaddled(boolean var1)
+ {
+ if (var1)
+ {
+ this.dataWatcher.updateObject(16, Byte.valueOf((byte) 1));
+ this.health = this.getMaxHealth();
+ } else
+ {
+ this.dataWatcher.updateObject(16, Byte.valueOf((byte) 0));
+ }
+ }
+
+ public int getMaxHealth()
+ {
+ return this.getSaddled() ? 40 : 10;
+ }
+
+ /**
+ * Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on
+ * the animal type)
+ */
+ public boolean isBreedingItem(ItemStack var1)
+ {
+ return var1 != null && var1.getItem().itemID == AetherItems.EnchantedBerry.itemID;
+ }
+
+ public EntityAgeable createChild(EntityAgeable var1)
+ {
+ return this.spawnBabyAnimal((EntityAnimal) var1);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/mounts/EntitySwet.java b/src/main/java/net/aetherteam/aether/entities/mounts/EntitySwet.java
new file mode 100644
index 0000000..74ab224
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/mounts/EntitySwet.java
@@ -0,0 +1,564 @@
+package net.aetherteam.aether.entities.mounts;
+
+import java.util.List;
+
+import net.aetherteam.aether.entities.EntityAetherAnimal;
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityAgeable;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.monster.EntityMob;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class EntitySwet extends EntityAetherAnimal
+{
+ private int slimeJumpDelay = 0;
+ public int ticker;
+ public int flutter;
+ public int hops;
+ public int textureNum;
+ public boolean textureSet;
+ public boolean gotrider;
+ public boolean kickoff;
+ public boolean friendly;
+
+ public EntitySwet(World var1)
+ {
+ super(var1);
+ this.health = 25;
+
+ if (!this.textureSet)
+ {
+ if (this.rand.nextInt(2) == 0)
+ {
+ this.textureNum = 2;
+ } else
+ {
+ this.textureNum = 1;
+ }
+
+ this.textureSet = true;
+ }
+
+ if (this.textureNum == 1)
+ {
+ this.texture = this.dir + "/mobs/swet/swet_blue.png";
+ this.moveSpeed = 1.5F;
+ } else
+ {
+ this.texture = this.dir + "/mobs/swet/swet_golden.png";
+ this.moveSpeed = 3.0F;
+ }
+
+ this.setSize(0.8F, 0.8F);
+ this.setPosition(this.posX, this.posY, this.posZ);
+ this.hops = 0;
+ this.gotrider = false;
+ this.flutter = 0;
+ this.ticker = 0;
+ this.slimeJumpDelay = this.rand.nextInt(20) + 10;
+ }
+
+ /**
+ * Handles updating while being ridden by an entity
+ */
+ public void updateRidden()
+ {
+ super.updateRidden();
+
+ if (this.riddenByEntity != null && this.kickoff)
+ {
+ this.riddenByEntity.mountEntity(this);
+ this.kickoff = false;
+ }
+ }
+
+ public void updateRiderPosition()
+ {
+ this.riddenByEntity.setPosition(this.posX, this.boundingBox.minY - 0.30000001192092896D + (double) this.riddenByEntity.yOffset, this.posZ);
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ if (this.entityToAttack != null)
+ {
+ for (int var1 = 0; var1 < 3; ++var1)
+ {
+ float var2 = 0.01745278F;
+ double var3 = (double) ((float) this.posX + (this.rand.nextFloat() - this.rand.nextFloat()) * 0.3F);
+ double var5 = (double) ((float) this.posY + this.height);
+ double var7 = (double) ((float) this.posZ + (this.rand.nextFloat() - this.rand.nextFloat()) * 0.3F);
+ this.worldObj.spawnParticle("splash", var3, var5 - 0.25D, var7, 0.0D, 0.0D, 0.0D);
+ }
+ }
+
+ super.onUpdate();
+
+ if (this.gotrider)
+ {
+ if (this.riddenByEntity != null)
+ {
+ return;
+ }
+
+ List var9 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.expand(0.5D, 0.75D, 0.5D));
+ byte var10 = 0;
+
+ if (var10 < var9.size())
+ {
+ Entity var11 = (Entity) var9.get(var10);
+ this.capturePrey(var11);
+ }
+
+ this.gotrider = false;
+ }
+
+ if (this.handleWaterMovement())
+ {
+ this.dissolve();
+ }
+ }
+
+ /**
+ * Determines if an entity can be despawned, used on idle far away entities
+ */
+ protected boolean canDespawn()
+ {
+ return true;
+ }
+
+ /**
+ * Called when the mob is falling. Calculates and applies fall damage.
+ */
+ public void fall(float var1)
+ {
+ if (!this.friendly)
+ {
+ super.fall(var1);
+
+ if (this.hops >= 3 && this.health > 0)
+ {
+ this.dissolve();
+ }
+ }
+ }
+
+ /**
+ * knocks back this entity
+ */
+ public void knockBack(Entity var1, int var2, double var3, double var5)
+ {
+ if (this.riddenByEntity == null || var1 != this.riddenByEntity)
+ {
+ super.knockBack(var1, var2, var3, var5);
+ }
+ }
+
+ public void dissolve()
+ {
+ for (int var1 = 0; var1 < 50; ++var1)
+ {
+ float var2 = this.rand.nextFloat() * (float) Math.PI * 2.0F;
+ float var3 = this.rand.nextFloat() * 0.5F + 0.25F;
+ float var4 = MathHelper.sin(var2) * var3;
+ float var5 = MathHelper.cos(var2) * var3;
+ this.worldObj.spawnParticle("splash", this.posX + (double) var4, this.boundingBox.minY + 1.25D, this.posZ + (double) var5, (double) var4 * 1.5D + this.motionX, 4.0D, (double) var5 * 1.5D + this.motionZ);
+ }
+
+ if (this.riddenByEntity != null)
+ {
+ this.riddenByEntity.posY += (double) (this.riddenByEntity.yOffset - 0.3F);
+ this.riddenByEntity.mountEntity(this);
+ }
+
+ this.setDead();
+ }
+
+ /**
+ * Will get destroyed next tick.
+ */
+ public void setDead()
+ {
+ super.setDead();
+ }
+
+ public void capturePrey(Entity var1)
+ {
+ this.splorch();
+ this.prevPosX = this.posX = var1.posX;
+ this.prevPosY = this.posY = var1.posY + 0.009999999776482582D;
+ this.prevPosZ = this.posZ = var1.posZ;
+ this.prevRotationYaw = this.rotationYaw = var1.rotationYaw;
+ this.prevRotationPitch = this.rotationPitch = var1.rotationPitch;
+ this.motionX = var1.motionX;
+ this.motionY = var1.motionY;
+ this.motionZ = var1.motionZ;
+ this.setSize(var1.width, var1.height);
+ this.setPosition(this.posX, this.posY, this.posZ);
+ var1.mountEntity(this);
+ this.rotationYaw = this.rand.nextFloat() * 360.0F;
+ }
+
+ public boolean attackEntityFrom(EntityLiving var1, int var2)
+ {
+ if (this.hops == 3 && var1 == null && this.health > 1)
+ {
+ this.health = 1;
+ }
+
+ boolean var3 = super.attackEntityFrom(DamageSource.causeMobDamage(var1), var2);
+
+ if (var3 && this.riddenByEntity != null && this.riddenByEntity instanceof EntityLiving)
+ {
+ if (var1 != null && this.riddenByEntity == var1)
+ {
+ if (this.rand.nextInt(3) == 0)
+ {
+ this.kickoff = true;
+ }
+ } else
+ {
+ this.riddenByEntity.attackEntityFrom(DamageSource.causeMobDamage(this), var2);
+
+ if (this.health <= 0)
+ {
+ this.kickoff = true;
+ }
+ }
+ }
+
+ if (var3 && this.health <= 0)
+ {
+ this.dissolve();
+ } else if (var3 && var1 instanceof EntityLiving && var1.getHealth() > 0 && (this.riddenByEntity == null || var1 != this.riddenByEntity))
+ {
+ this.entityToAttack = var1;
+ this.faceEntity(var1, 180.0F, 180.0F);
+ this.kickoff = true;
+ }
+
+ if (this.friendly && this.entityToAttack instanceof EntityPlayer)
+ {
+ this.entityToAttack = null;
+ }
+
+ return var3;
+ }
+
+ public void updateEntityActionState()
+ {
+ ++this.entityAge;
+ this.despawnEntity();
+
+ if (!this.friendly || this.riddenByEntity == null)
+ {
+ if (this.entityToAttack == null && this.riddenByEntity == null && this.health > 0)
+ {
+ if (this.onGround && this.slimeJumpDelay-- <= 0)
+ {
+ this.slimeJumpDelay = this.getJumpDelay();
+ this.isJumping = true;
+ this.worldObj.playSoundAtEntity(this, this.getJumpSound(), this.getSoundVolume(), ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F) * 0.8F);
+ this.moveStrafing = 1.0F - this.rand.nextFloat() * 2.0F;
+ this.moveForward = 16.0F;
+ } else
+ {
+ this.isJumping = false;
+
+ if (this.onGround)
+ {
+ this.moveStrafing = this.moveForward = 0.0F;
+ }
+ }
+ }
+
+ if (!this.onGround && this.isJumping)
+ {
+ this.isJumping = false;
+ } else if (this.onGround)
+ {
+ if (this.moveForward > 0.05F)
+ {
+ this.moveForward *= 0.75F;
+ } else
+ {
+ this.moveForward = 0.0F;
+ }
+ }
+
+ if (this.entityToAttack != null && this.riddenByEntity == null && this.health > 0)
+ {
+ this.faceEntity(this.entityToAttack, 10.0F, 10.0F);
+ }
+
+ if (this.entityToAttack != null && this.entityToAttack.isDead)
+ {
+ this.entityToAttack = null;
+ }
+
+ if (!this.onGround && this.motionY < 0.05000000074505806D && this.flutter > 0)
+ {
+ this.motionY += 0.07000000029802322D;
+ --this.flutter;
+ }
+
+ if (this.ticker < 4)
+ {
+ ++this.ticker;
+ } else
+ {
+ if (this.onGround && this.riddenByEntity == null && this.hops != 0 && this.hops != 3)
+ {
+ this.hops = 0;
+ }
+
+ if (this.entityToAttack == null && this.riddenByEntity == null)
+ {
+ Entity var1 = this.getPrey();
+
+ if (var1 != null)
+ {
+ this.entityToAttack = var1;
+ }
+ } else if (this.entityToAttack != null && this.riddenByEntity == null)
+ {
+ if (this.getDistanceToEntity(this.entityToAttack) <= 9.0F)
+ {
+ if (this.onGround && this.canEntityBeSeen(this.entityToAttack))
+ {
+ this.splotch();
+ this.flutter = 10;
+ this.isJumping = true;
+ this.moveForward = 1.0F;
+ this.rotationYaw += 5.0F * (this.rand.nextFloat() - this.rand.nextFloat());
+ }
+ } else
+ {
+ this.entityToAttack = null;
+ this.isJumping = false;
+ this.moveForward = 0.0F;
+ }
+ } else if (this.riddenByEntity != null && this.onGround)
+ {
+ if (this.hops == 0)
+ {
+ this.splotch();
+ this.onGround = false;
+ this.motionY = 0.3499999940395355D;
+ this.moveForward = 0.8F;
+ this.hops = 1;
+ this.flutter = 5;
+ this.rotationYaw += 20.0F * (this.rand.nextFloat() - this.rand.nextFloat());
+ } else if (this.hops == 1)
+ {
+ this.splotch();
+ this.onGround = false;
+ this.motionY = 0.44999998807907104D;
+ this.moveForward = 0.9F;
+ this.hops = 2;
+ this.flutter = 5;
+ this.rotationYaw += 20.0F * (this.rand.nextFloat() - this.rand.nextFloat());
+ } else if (this.hops == 2)
+ {
+ this.splotch();
+ this.onGround = false;
+ this.motionY = 1.25D;
+ this.moveForward = 1.25F;
+ this.hops = 3;
+ this.flutter = 5;
+ this.rotationYaw += 20.0F * (this.rand.nextFloat() - this.rand.nextFloat());
+ }
+ }
+
+ this.ticker = 0;
+ }
+
+ if (this.onGround && this.hops >= 3)
+ {
+ this.dissolve();
+ }
+ }
+ }
+
+ protected int getJumpDelay()
+ {
+ return this.rand.nextInt(20) + 10;
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ super.writeEntityToNBT(var1);
+ var1.setShort("Hops", (short) this.hops);
+ var1.setShort("Flutter", (short) this.flutter);
+
+ if (this.riddenByEntity != null)
+ {
+ this.gotrider = true;
+ }
+
+ var1.setBoolean("GotRider", this.gotrider);
+ var1.setBoolean("Friendly", this.friendly);
+ var1.setBoolean("textureSet", this.textureSet);
+ var1.setShort("textureNum", (short) this.textureNum);
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ super.readEntityFromNBT(var1);
+ this.hops = var1.getShort("Hops");
+ this.flutter = var1.getShort("Flutter");
+ this.gotrider = var1.getBoolean("GotRider");
+ this.friendly = var1.getBoolean("Friendly");
+ this.textureSet = var1.getBoolean("textureSet");
+ this.textureNum = var1.getShort("textureNum");
+
+ if (this.textureNum == 1)
+ {
+ this.texture = "/aether/mobs/swets.png";
+ this.moveSpeed = 1.5F;
+ } else
+ {
+ this.texture = "/aether/mobs/goldswets.png";
+ this.moveSpeed = 3.0F;
+ }
+ }
+
+ public void splorch()
+ {
+ this.worldObj.playSoundAtEntity(this, "mob.attack", 1.0F, (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F);
+ }
+
+ public void splotch()
+ {
+ this.worldObj.playSoundAtEntity(this, "mob.slime.big", 0.5F, (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F);
+ }
+
+ protected String getJumpSound()
+ {
+ return "mob.slime.big";
+ }
+
+ /**
+ * Returns the sound this mob makes when it is hurt.
+ */
+ protected String getHurtSound()
+ {
+ return "mob.slime.big";
+ }
+
+ /**
+ * Returns the sound this mob makes on death.
+ */
+ protected String getDeathSound()
+ {
+ return "mob.slime.big";
+ }
+
+ /**
+ * Applies a velocity to each of the entities pushing them away from each other. Args: entity
+ */
+ public void applyEntityCollision(Entity var1)
+ {
+ if (this.hops == 0 && this.riddenByEntity == null && this.entityToAttack != null && var1 != null && var1 == this.entityToAttack && (var1.ridingEntity == null || !(var1.ridingEntity instanceof EntitySwet)))
+ {
+ if (var1.riddenByEntity != null)
+ {
+ var1.riddenByEntity.mountEntity(var1);
+ }
+
+ this.capturePrey(var1);
+ }
+
+ super.applyEntityCollision(var1);
+ }
+
+ /**
+ * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig.
+ */
+ public boolean interact(EntityPlayer var1)
+ {
+ if (!this.worldObj.isRemote)
+ {
+ if (!this.friendly)
+ {
+ return true;
+ }
+
+ if ((!this.friendly || this.riddenByEntity != null) && this.riddenByEntity == var1)
+ {
+ ;
+ }
+ }
+
+ return true;
+ }
+
+ protected Entity getPrey()
+ {
+ List var1 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.expand(6.0D, 6.0D, 6.0D));
+ int var2 = 0;
+ Entity var3;
+
+ while (true)
+ {
+ if (var2 >= var1.size())
+ {
+ return null;
+ }
+
+ var3 = (Entity) var1.get(var2);
+
+ if (var3 instanceof EntityLiving && !(var3 instanceof EntitySwet))
+ {
+ if (this.friendly)
+ {
+ if (!(var3 instanceof EntityPlayer))
+ {
+ break;
+ }
+ } else if (!(var3 instanceof EntityMob))
+ {
+ break;
+ }
+ }
+
+ ++var2;
+ }
+
+ return var3;
+ }
+
+ /**
+ * Drop 0-2 items of this living's type. @param par1 - Whether this entity has recently been hit by a player. @param
+ * par2 - Level of Looting used to kill this mob.
+ */
+ protected void dropFewItems(boolean var1, int var2)
+ {
+ ItemStack var3 = new ItemStack(this.textureNum == 1 ? AetherItems.SwettyBall.itemID : AetherItems.SwettyBall.itemID, 6, this.textureNum == 1 ? 1 : 0);
+ this.entityDropItem(var3, 0.0F);
+ }
+
+ public int getMaxHealth()
+ {
+ return 25;
+ }
+
+ public EntityAgeable createChild(EntityAgeable var1)
+ {
+ return this;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/mounts/Mount.java b/src/main/java/net/aetherteam/aether/entities/mounts/Mount.java
new file mode 100644
index 0000000..b433f92
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/mounts/Mount.java
@@ -0,0 +1,8 @@
+package net.aetherteam.aether.entities.mounts;
+
+public interface Mount
+{
+ int getHealthTracked();
+
+ void setHealthTracked();
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/mounts/MountInput.java b/src/main/java/net/aetherteam/aether/entities/mounts/MountInput.java
new file mode 100644
index 0000000..4bdef86
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/mounts/MountInput.java
@@ -0,0 +1,28 @@
+package net.aetherteam.aether.entities.mounts;
+
+public enum MountInput
+{
+ FORWARD,
+ BACKWARD,
+ LEFT,
+ RIGHT,
+ JUMP;
+
+ public static MountInput getInputFromString(String var0)
+ {
+ MountInput[] var1 = values();
+ int var2 = var1.length;
+
+ for (int var3 = 0; var3 < var2; ++var3)
+ {
+ MountInput var4 = var1[var3];
+
+ if (var4.name().equals(var0))
+ {
+ return var4;
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/mounts/MountSystem.java b/src/main/java/net/aetherteam/aether/entities/mounts/MountSystem.java
new file mode 100644
index 0000000..bc41071
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/mounts/MountSystem.java
@@ -0,0 +1,67 @@
+package net.aetherteam.aether.entities.mounts;
+
+import cpw.mods.fml.common.network.PacketDispatcher;
+
+import java.util.ArrayList;
+
+import net.aetherteam.aether.packets.AetherPacketHandler;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.entity.EntityPlayerSP;
+
+public class MountSystem
+{
+ private static Minecraft mc = Minecraft.getMinecraft();
+ private static EntityPlayerSP player;
+ public static ArrayList mountInput = new ArrayList();
+ private static boolean isJumping;
+ private static boolean movingForward;
+ private static boolean movingBackward;
+ private static boolean movingLeft;
+ private static boolean movingRight;
+
+ public static void processDirections()
+ {
+ player = mc.thePlayer;
+
+ if (player != null)
+ {
+ float var0 = player.movementInput.moveForward;
+ float var1 = player.movementInput.moveStrafe;
+ movingForward = var0 > 0.1F;
+ movingBackward = var0 < -0.1F;
+ movingLeft = var1 > 0.1F;
+ movingRight = var1 < -0.1F;
+ isJumping = player.isJumping;
+
+ if (player.ridingEntity != null)
+ {
+ applyInput(MountInput.FORWARD, movingForward);
+ applyInput(MountInput.BACKWARD, movingBackward);
+ applyInput(MountInput.LEFT, movingLeft);
+ applyInput(MountInput.RIGHT, movingRight);
+ applyInput(MountInput.JUMP, isJumping);
+ }
+ }
+ }
+
+ public static void applyInput(MountInput var0, boolean var1)
+ {
+ if (var1)
+ {
+ if (!mountInput.contains(var0))
+ {
+ mountInput.add(var0);
+ sendInputPacket();
+ }
+ } else if (mountInput.contains(var0))
+ {
+ mountInput.remove(var0);
+ sendInputPacket();
+ }
+ }
+
+ private static void sendInputPacket()
+ {
+ PacketDispatcher.sendPacketToServer(AetherPacketHandler.sendPlayerInput(player.username, mountInput, player.isJumping));
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/mounts_old/Ridable.java b/src/main/java/net/aetherteam/aether/entities/mounts_old/Ridable.java
new file mode 100644
index 0000000..6d2e7a8
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/mounts_old/Ridable.java
@@ -0,0 +1,6 @@
+package net.aetherteam.aether.entities.mounts_old;
+
+public interface Ridable
+{
+ RidingHandler getRidingHandler();
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/mounts_old/RidingHandler.java b/src/main/java/net/aetherteam/aether/entities/mounts_old/RidingHandler.java
new file mode 100644
index 0000000..bfd5efd
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/mounts_old/RidingHandler.java
@@ -0,0 +1,102 @@
+package net.aetherteam.aether.entities.mounts_old;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.AetherCommonPlayerHandler;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+
+public class RidingHandler
+{
+ protected Entity mount;
+ protected EntityLiving rider;
+
+ public RidingHandler(Entity var1)
+ {
+ this.mount = var1;
+ }
+
+ public void setRider(EntityPlayer var1)
+ {
+ if (!(this.rider instanceof EntityPlayer) && Aether.getPlayerBase(var1).riddenBy == null)
+ {
+ Aether.getPlayerBase(var1).rideEntity(this.mount, this);
+ this.rider = var1;
+ this.onMount();
+ }
+ }
+
+ public boolean isBeingRidden()
+ {
+ return this.rider != null;
+ }
+
+ public boolean jump(AetherCommonPlayerHandler var1, EntityPlayer var2)
+ {
+ return true;
+ }
+
+ public void update()
+ {
+ if (this.isBeingRidden())
+ {
+ this.mount.setPositionAndRotation(this.rider.posX, this.rider.posY, this.rider.posZ, this.rider.rotationYaw, this.rider.rotationPitch);
+ this.mount.motionY = this.rider.posY - this.mount.posY - 1.63D;
+ this.mount.motionX = this.rider.posX - this.mount.posX;
+ this.mount.motionZ = this.rider.posZ - this.mount.posZ;
+ this.rider.shouldRiderSit();
+ }
+ }
+
+ public float getSpeedModifier()
+ {
+ return -1.0F;
+ }
+
+ public void onMount() {}
+
+ public void onUnMount()
+ {
+ if (this.rider instanceof EntityPlayer)
+ {
+ Aether.getPlayerBase((EntityPlayer) this.rider).rideEntity((Entity) null, this);
+ }
+
+ this.rider = null;
+ }
+
+ public EntityLiving getRider()
+ {
+ return this.rider;
+ }
+
+ public Entity getMount()
+ {
+ return this.mount;
+ }
+
+ public boolean shouldBeSitting()
+ {
+ return false;
+ }
+
+ public boolean animateSitting()
+ {
+ return true;
+ }
+
+ public boolean sprinting()
+ {
+ return true;
+ }
+
+ public double getRiderYOffset()
+ {
+ return 0.0D;
+ }
+
+ public double getAnimalYOffset()
+ {
+ return 0.0D;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/mounts_old/RidingHandlerAerbunny.java b/src/main/java/net/aetherteam/aether/entities/mounts_old/RidingHandlerAerbunny.java
new file mode 100644
index 0000000..0cae6a9
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/mounts_old/RidingHandlerAerbunny.java
@@ -0,0 +1,69 @@
+package net.aetherteam.aether.entities.mounts_old;
+
+import net.aetherteam.aether.entities.ai.AIEntityAerbunnyHop;
+import net.aetherteam.aether.entities.mounts.EntityAerbunny;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.ai.EntityAIAvoidEntity;
+import net.minecraft.entity.ai.EntityAISwimming;
+import net.minecraft.entity.ai.EntityAIWander;
+import net.minecraft.entity.ai.EntityAIWatchClosest;
+import net.minecraft.entity.player.EntityPlayer;
+
+public class RidingHandlerAerbunny extends RidingHandler
+{
+ protected EntityLiving animal;
+
+ public RidingHandlerAerbunny(EntityAerbunny var1)
+ {
+ super(var1);
+ this.animal = (EntityLiving) this.mount;
+ }
+
+ public void update()
+ {
+ if (this.isBeingRidden())
+ {
+ this.rider.fallDistance = 0.0F;
+
+ if (this.rider.motionY < -0.2D && !this.rider.isSneaking())
+ {
+ this.rider.motionY = -0.2D;
+ }
+
+ this.animal.tasks.taskEntries.clear();
+ }
+
+ super.update();
+ }
+
+ public void onUnMount()
+ {
+ this.animal.tasks.addTask(1, new EntityAISwimming(this.animal));
+ this.animal.tasks.addTask(2, new EntityAIAvoidEntity((EntityAerbunny) this.animal, EntityPlayer.class, 16.0F, 2.6F, 2.8F));
+ this.animal.tasks.addTask(3, new EntityAIWander((EntityAerbunny) this.animal, 2.5F));
+ this.animal.tasks.addTask(4, new EntityAIWatchClosest(this.animal, EntityPlayer.class, 10.0F));
+ this.animal.tasks.addTask(5, ((EntityAerbunny) this.animal).aiEatGrass);
+ this.animal.tasks.addTask(6, new AIEntityAerbunnyHop((EntityAerbunny) this.animal));
+ super.onUnMount();
+ }
+
+ public boolean shouldBeSitting()
+ {
+ return this.isBeingRidden();
+ }
+
+ public double getAnimalYOffset()
+ {
+ return 1.65D;
+ }
+
+ public boolean animateSitting()
+ {
+ return false;
+ }
+
+ public boolean sprinting()
+ {
+ return false;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/mounts_old/RidingHandlerFlyingCow.java b/src/main/java/net/aetherteam/aether/entities/mounts_old/RidingHandlerFlyingCow.java
new file mode 100644
index 0000000..bdc282a
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/mounts_old/RidingHandlerFlyingCow.java
@@ -0,0 +1,77 @@
+package net.aetherteam.aether.entities.mounts_old;
+
+import net.aetherteam.aether.AetherCommonPlayerHandler;
+import net.aetherteam.aether.entities.mounts.EntityFlyingCow;
+import net.minecraft.entity.EntityCreature;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.ai.EntityAILookIdle;
+import net.minecraft.entity.ai.EntityAIPanic;
+import net.minecraft.entity.ai.EntityAISwimming;
+import net.minecraft.entity.ai.EntityAIWander;
+import net.minecraft.entity.ai.EntityAIWatchClosest;
+import net.minecraft.entity.player.EntityPlayer;
+
+public class RidingHandlerFlyingCow extends RidingHandler
+{
+ protected EntityLiving animal;
+
+ public RidingHandlerFlyingCow(EntityFlyingCow var1)
+ {
+ super(var1);
+ this.animal = (EntityLiving) this.mount;
+ }
+
+ public void update()
+ {
+ if (this.isBeingRidden())
+ {
+ this.rider.fallDistance = 0.0F;
+
+ if (this.rider.motionY < -0.2D && !this.rider.isSneaking())
+ {
+ this.rider.motionY = -0.2D;
+ }
+
+ this.animal.tasks.taskEntries.clear();
+ this.rider.stepHeight = 1.0F;
+ }
+
+ super.update();
+ }
+
+ public float getSpeedModifier()
+ {
+ return 1.35F;
+ }
+
+ public void onUnMount()
+ {
+ this.rider.stepHeight = 0.5F;
+ this.animal.tasks.addTask(0, new EntityAISwimming(this.animal));
+ this.animal.tasks.addTask(1, new EntityAIPanic((EntityCreature) this.animal, 0.38F));
+ this.animal.tasks.addTask(2, new EntityAIWander((EntityCreature) this.animal, 0.3F));
+ this.animal.tasks.addTask(4, new EntityAIWatchClosest(this.animal, EntityPlayer.class, 6.0F));
+ this.animal.tasks.addTask(5, new EntityAILookIdle(this.animal));
+ super.onUnMount();
+ }
+
+ public boolean jump(AetherCommonPlayerHandler var1, EntityPlayer var2)
+ {
+ if (this.isBeingRidden())
+ {
+ this.rider.motionY = 1.600000023841858D;
+ }
+
+ return false;
+ }
+
+ public boolean shouldBeSitting()
+ {
+ return this.isBeingRidden();
+ }
+
+ public double getRiderYOffset()
+ {
+ return 0.8D;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/mounts_old/RidingHandlerMoa.java b/src/main/java/net/aetherteam/aether/entities/mounts_old/RidingHandlerMoa.java
new file mode 100644
index 0000000..9b8cef2
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/mounts_old/RidingHandlerMoa.java
@@ -0,0 +1,158 @@
+package net.aetherteam.aether.entities.mounts_old;
+
+import java.util.Random;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.donator.Donator;
+import net.aetherteam.aether.donator.EnumChoiceType;
+import net.aetherteam.aether.donator.choices.MoaChoice;
+import net.aetherteam.aether.entities.mounts.EntityMoa;
+import net.minecraft.entity.EntityCreature;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.ai.EntityAILookIdle;
+import net.minecraft.entity.ai.EntityAIPanic;
+import net.minecraft.entity.ai.EntityAISwimming;
+import net.minecraft.entity.ai.EntityAIWander;
+import net.minecraft.entity.ai.EntityAIWatchClosest;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.MathHelper;
+
+public class RidingHandlerMoa extends RidingHandler
+{
+ protected EntityLiving animal;
+ Random random;
+ public int jumpsRemaining;
+ public boolean jpress;
+ public Random rand;
+
+ public RidingHandlerMoa(EntityMoa var1)
+ {
+ super(var1);
+ this.animal = (EntityLiving) this.mount;
+ this.random = new Random();
+ this.jumpsRemaining = 0;
+ this.rand = new Random();
+ }
+
+ public void update()
+ {
+ if (this.isBeingRidden())
+ {
+ this.rider.fallDistance = 0.0F;
+
+ if (this.rider.motionY < -0.2D && !this.rider.isSneaking())
+ {
+ this.rider.motionY = -0.2D;
+ }
+
+ this.animal.tasks.taskEntries.clear();
+
+ if (this.rider.onGround && this.rider.isJumping)
+ {
+ this.rider.onGround = false;
+ this.rider.motionY = 0.875D;
+ this.jpress = true;
+ --this.jumpsRemaining;
+ } else if (this.rider.handleWaterMovement() && this.rider.isJumping)
+ {
+ this.rider.motionY = 0.5D;
+ this.jpress = true;
+ --this.jumpsRemaining;
+ } else if (this.jumpsRemaining > 0 && !this.jpress && this.rider.isJumping)
+ {
+ this.rider.motionY = 0.75D;
+ this.jpress = true;
+ --this.jumpsRemaining;
+ }
+
+ if (this.jpress && !this.rider.isJumping)
+ {
+ this.jpress = false;
+ }
+
+ if (this.rider.onGround || this.rider.worldObj.getBlockId(MathHelper.floor_double(this.rider.posX), MathHelper.floor_double(this.rider.posY - 1.0D), MathHelper.floor_double(this.rider.posZ)) != 0)
+ {
+ this.jpress = false;
+ this.jumpsRemaining = ((EntityMoa) this.animal).getColour().jumps;
+ }
+
+ if (this.rider instanceof EntityPlayer)
+ {
+ String var1 = ((EntityPlayer) this.rider).username;
+
+ if (Aether.syncDonatorList.isDonator(var1))
+ {
+ Aether.getInstance();
+ Donator var2 = Aether.syncDonatorList.getDonator(var1);
+ boolean var3 = var2.containsChoiceType(EnumChoiceType.MOA);
+ MoaChoice var4 = null;
+
+ if (var3)
+ {
+ var4 = (MoaChoice) var2.getChoiceFromType(EnumChoiceType.MOA);
+ ((MoaChoice) var4).spawnParticleEffects(this.random, (EntityPlayer) this.rider);
+ }
+ }
+ }
+
+ this.rider.stepHeight = 1.0F;
+ }
+
+ super.update();
+ }
+
+ public float getSpeedModifier()
+ {
+ return 1.65F;
+ }
+
+ public void onUnMount()
+ {
+ this.rider.stepHeight = 0.5F;
+ this.animal.tasks.addTask(0, new EntityAISwimming(this.animal));
+ this.animal.tasks.addTask(1, new EntityAIPanic((EntityCreature) this.animal, 0.38F));
+ this.animal.tasks.addTask(2, new EntityAIWander((EntityCreature) this.animal, 0.3F));
+ this.animal.tasks.addTask(4, new EntityAIWatchClosest(this.animal, EntityPlayer.class, 6.0F));
+ this.animal.tasks.addTask(5, new EntityAILookIdle(this.animal));
+ super.onUnMount();
+ }
+
+ public boolean shouldBeSitting()
+ {
+ return this.isBeingRidden();
+ }
+
+ public double getRiderYOffset()
+ {
+ return 0.85D;
+ }
+
+ public void onMount()
+ {
+ if (this.rider != null && this.rider instanceof EntityPlayer)
+ {
+ String var1 = ((EntityPlayer) this.rider).username;
+
+ if (Aether.syncDonatorList.isDonator(var1))
+ {
+ Aether.getInstance();
+ Donator var2 = Aether.syncDonatorList.getDonator(var1);
+ boolean var3 = var2.containsChoiceType(EnumChoiceType.MOA);
+ Object var4 = null;
+
+ if (var3)
+ {
+ for (int var5 = 0; var5 < 10; ++var5)
+ {
+ double var6 = this.random.nextGaussian() * 0.02D;
+ double var8 = this.random.nextGaussian() * 0.02D;
+ double var10 = this.random.nextGaussian() * 0.02D;
+ double var12 = 5.0D;
+ this.rider.worldObj.spawnParticle("flame", this.rider.posX + (double) (this.random.nextFloat() * this.rider.width * 2.0F) - (double) this.rider.width - var6 * var12, this.rider.posY + (double) (this.random.nextFloat() * (this.rider.height - 0.6F)) - var8 * var12, this.rider.posZ + (double) (this.random.nextFloat() * this.rider.width * 2.0F) - (double) this.rider.width - var10 * var12, var6, var8, var10);
+ this.rider.worldObj.spawnParticle("largeexplode", this.rider.posX + (double) (this.random.nextFloat() * this.rider.width * 2.0F) - (double) this.rider.width - var6 * var12, this.rider.posY + (double) (this.random.nextFloat() * (this.rider.height - 0.6F)) - var8 * var12, this.rider.posZ + (double) (this.random.nextFloat() * this.rider.width * 2.0F) - (double) this.rider.width - var10 * var12, var6, var8, var10);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/mounts_old/RidingHandlerParachute.java b/src/main/java/net/aetherteam/aether/entities/mounts_old/RidingHandlerParachute.java
new file mode 100644
index 0000000..f062a90
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/mounts_old/RidingHandlerParachute.java
@@ -0,0 +1,41 @@
+package net.aetherteam.aether.entities.mounts_old;
+
+import net.aetherteam.aether.entities.EntityCloudParachute;
+
+public class RidingHandlerParachute extends RidingHandler
+{
+ public RidingHandlerParachute(EntityCloudParachute var1)
+ {
+ super(var1);
+ }
+
+ public void update()
+ {
+ if (this.isBeingRidden())
+ {
+ this.rider.fallDistance = 0.0F;
+
+ if (this.rider.motionY < -0.2D && !this.rider.isSneaking())
+ {
+ this.rider.motionY = -0.2D;
+ }
+ }
+
+ super.update();
+ }
+
+ public boolean shouldBeSitting()
+ {
+ return this.isBeingRidden();
+ }
+
+ public boolean animateSitting()
+ {
+ return false;
+ }
+
+ public boolean sprinting()
+ {
+ return false;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/mounts_old/RidingHandlerPhyg.java b/src/main/java/net/aetherteam/aether/entities/mounts_old/RidingHandlerPhyg.java
new file mode 100644
index 0000000..88f293b
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/mounts_old/RidingHandlerPhyg.java
@@ -0,0 +1,77 @@
+package net.aetherteam.aether.entities.mounts_old;
+
+import net.aetherteam.aether.AetherCommonPlayerHandler;
+import net.aetherteam.aether.entities.mounts.EntityPhyg;
+import net.minecraft.entity.EntityCreature;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.ai.EntityAILookIdle;
+import net.minecraft.entity.ai.EntityAIPanic;
+import net.minecraft.entity.ai.EntityAISwimming;
+import net.minecraft.entity.ai.EntityAIWander;
+import net.minecraft.entity.ai.EntityAIWatchClosest;
+import net.minecraft.entity.player.EntityPlayer;
+
+public class RidingHandlerPhyg extends RidingHandler
+{
+ protected EntityLiving animal;
+
+ public RidingHandlerPhyg(EntityPhyg var1)
+ {
+ super(var1);
+ this.animal = (EntityLiving) this.mount;
+ }
+
+ public void update()
+ {
+ if (this.isBeingRidden())
+ {
+ this.rider.fallDistance = 0.0F;
+
+ if (this.rider.motionY < -0.2D && !this.rider.isSneaking())
+ {
+ this.rider.motionY = -0.2D;
+ }
+
+ this.animal.tasks.taskEntries.clear();
+ this.rider.stepHeight = 1.0F;
+ }
+
+ super.update();
+ }
+
+ public float getSpeedModifier()
+ {
+ return 1.35F;
+ }
+
+ public void onUnMount()
+ {
+ this.rider.stepHeight = 0.5F;
+ this.animal.tasks.addTask(0, new EntityAISwimming(this.animal));
+ this.animal.tasks.addTask(1, new EntityAIPanic((EntityCreature) this.animal, 0.38F));
+ this.animal.tasks.addTask(2, new EntityAIWander((EntityCreature) this.animal, 0.3F));
+ this.animal.tasks.addTask(4, new EntityAIWatchClosest(this.animal, EntityPlayer.class, 6.0F));
+ this.animal.tasks.addTask(5, new EntityAILookIdle(this.animal));
+ super.onUnMount();
+ }
+
+ public boolean jump(AetherCommonPlayerHandler var1, EntityPlayer var2)
+ {
+ if (this.isBeingRidden())
+ {
+ this.rider.motionY = 1.600000023841858D;
+ }
+
+ return false;
+ }
+
+ public boolean shouldBeSitting()
+ {
+ return this.isBeingRidden();
+ }
+
+ public double getRiderYOffset()
+ {
+ return 0.15D;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/entities/util/Pos.java b/src/main/java/net/aetherteam/aether/entities/util/Pos.java
new file mode 100644
index 0000000..e73247d
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/entities/util/Pos.java
@@ -0,0 +1,15 @@
+package net.aetherteam.aether.entities.util;
+
+public class Pos
+{
+ public int x;
+ public int y;
+ public int z;
+
+ public Pos(int var1, int var2, int var3)
+ {
+ this.x = var1;
+ this.y = var2;
+ this.z = var3;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/enums/AetherEnumElement.java b/src/main/java/net/aetherteam/aether/enums/AetherEnumElement.java
new file mode 100644
index 0000000..52b8a3d
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/enums/AetherEnumElement.java
@@ -0,0 +1,11 @@
+package net.aetherteam.aether.enums;
+
+public enum AetherEnumElement
+{
+ Fire, Lightning, Holy;
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.enums.AetherEnumElement
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/enums/EnumBossType.java b/src/main/java/net/aetherteam/aether/enums/EnumBossType.java
new file mode 100644
index 0000000..9d7079a
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/enums/EnumBossType.java
@@ -0,0 +1,11 @@
+package net.aetherteam.aether.enums;
+
+public enum EnumBossType
+{
+ BOSS, MINI;
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.enums.EnumBossType
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/interfaces/AEBlock.java b/src/main/java/net/aetherteam/aether/interfaces/AEBlock.java
new file mode 100644
index 0000000..d642d77
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/interfaces/AEBlock.java
@@ -0,0 +1,20 @@
+package net.aetherteam.aether.interfaces;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import net.minecraft.item.ItemBlock;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.FIELD})
+public @interface AEBlock
+{
+
+ Class itemBlock() default ItemBlock.class;
+
+ String name() default "";
+
+ String[] names() default {};
+}
diff --git a/src/main/java/net/aetherteam/aether/interfaces/AEItem.java b/src/main/java/net/aetherteam/aether/interfaces/AEItem.java
new file mode 100644
index 0000000..f57239c
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/interfaces/AEItem.java
@@ -0,0 +1,16 @@
+package net.aetherteam.aether.interfaces;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.FIELD})
+public @interface AEItem
+{
+
+ String name() default "";
+
+ String[] names() default {};
+}
diff --git a/src/main/java/net/aetherteam/aether/interfaces/IAetherAccessory.java b/src/main/java/net/aetherteam/aether/interfaces/IAetherAccessory.java
new file mode 100644
index 0000000..b9526fd
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/interfaces/IAetherAccessory.java
@@ -0,0 +1,29 @@
+package net.aetherteam.aether.interfaces;
+
+import net.aetherteam.aether.PlayerBaseAetherServer;
+import net.aetherteam.aether.client.PlayerBaseAetherClient;
+import net.minecraft.entity.player.EntityPlayer;
+
+public abstract interface IAetherAccessory
+{
+ public static final int[] damageReduceAmountArray = {3, 8, 6, 3, 0, 1, 0, 0, 0, 0, 2, 0};
+
+ public static final int[] maxDamageArray = {11, 16, 15, 13, 10, 10, 8, 10, 10, 10, 10, 10};
+
+ public abstract boolean isTypeValid(int paramInt);
+
+ public abstract boolean damageType();
+
+ public abstract boolean damageType(int paramInt);
+
+ public abstract void activatePassive(EntityPlayer paramEntityPlayer);
+
+ public abstract void activateServerPassive(EntityPlayer paramEntityPlayer, PlayerBaseAetherServer paramPlayerBaseAetherServer);
+
+ public abstract void activateClientPassive(EntityPlayer paramEntityPlayer, PlayerBaseAetherClient paramPlayerBaseAetherClient);
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.interfaces.IAetherAccessory
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/interfaces/IAetherBoss.java b/src/main/java/net/aetherteam/aether/interfaces/IAetherBoss.java
new file mode 100644
index 0000000..4e8f76f
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/interfaces/IAetherBoss.java
@@ -0,0 +1,26 @@
+package net.aetherteam.aether.interfaces;
+
+import net.aetherteam.aether.enums.EnumBossType;
+import net.minecraft.entity.Entity;
+
+public abstract interface IAetherBoss
+{
+ public abstract int getBossHP();
+
+ public abstract int getBossMaxHP();
+
+ public abstract int getBossEntityID();
+
+ public abstract String getBossTitle();
+
+ public abstract Entity getBossEntity();
+
+ public abstract int getBossStage();
+
+ public abstract EnumBossType getBossType();
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.interfaces.IAetherBoss
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/interfaces/IAetherMob.java b/src/main/java/net/aetherteam/aether/interfaces/IAetherMob.java
new file mode 100644
index 0000000..baba3b2
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/interfaces/IAetherMob.java
@@ -0,0 +1,9 @@
+package net.aetherteam.aether.interfaces;
+
+public abstract interface IAetherMob
+{}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.interfaces.IAetherMob
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/items/AEItem.java b/src/main/java/net/aetherteam/aether/items/AEItem.java
new file mode 100644
index 0000000..fdeff03
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/AEItem.java
@@ -0,0 +1,16 @@
+package net.aetherteam.aether.items;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.FIELD})
+public @interface AEItem
+{
+
+ String name() default "";
+
+ String[] names() default {};
+}
diff --git a/src/main/java/net/aetherteam/aether/items/AetherItems.java b/src/main/java/net/aetherteam/aether/items/AetherItems.java
new file mode 100644
index 0000000..8020f79
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/AetherItems.java
@@ -0,0 +1,560 @@
+package net.aetherteam.aether.items;
+
+import cpw.mods.fml.common.registry.LanguageRegistry;
+
+import java.lang.reflect.Field;
+import java.util.HashMap;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.AetherMoaColour;
+import net.aetherteam.aether.CommonProxy;
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.enums.AetherEnumElement;
+import net.minecraft.block.Block;
+import net.minecraft.item.EnumArmorMaterial;
+import net.minecraft.item.EnumToolMaterial;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.potion.Potion;
+
+public class AetherItems
+{
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Victory Medal")
+ public static Item VictoryMedal;
+ @net.aetherteam.aether.interfaces.AEItem(
+ names = {"Bronze Key", "Silver Key", "Golden Key", "Guardian Key", "Host Key", "Cog Key"})
+ public static Item Key;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Moa Egg")
+ public static Item MoaEgg;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Aether Music Disk")
+ public static Item AetherMusicDisk;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Golden Amber")
+ public static Item GoldenAmber;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Aechor Petal")
+ public static Item AechorPetal;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Skyroot Stick")
+ public static Item SkyrootStick;
+ @net.aetherteam.aether.interfaces.AEItem(
+ names = {"Golden Dart", "Poison Dart", "Enchanted Dart"})
+ public static Item Dart;
+ @net.aetherteam.aether.interfaces.AEItem(
+ names = {"Golden Dart Shooter", "Poison Dart Shooter", "Enchanted Dart Shooter", "Phoenix Dart Shooter"})
+ public static Item DartShooter;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Ambrosium Shard")
+ public static Item AmbrosiumShard;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Zanite Gemstone")
+ public static Item ZaniteGemstone;
+ @net.aetherteam.aether.interfaces.AEItem(
+ names = {"Skyroot Bucket", "Skyroot Milk Bucket", "Skyroot Poison Bucket", "Skyroot Cure Bucket"})
+ public static Item SkyrootBucket;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Skyroot Pickaxe")
+ public static Item SkyrootPickaxe;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Holystone Pickaxe")
+ public static Item HolystonePickaxe;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Zanite Pickaxe")
+ public static Item ZanitePickaxe;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Gravitite Pickaxe")
+ public static Item GravititePickaxe;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Skyroot Shovel")
+ public static Item SkyrootShovel;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Holystone Shovel")
+ public static Item HolystoneShovel;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Zanite Shovel")
+ public static Item ZaniteShovel;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Gravitite Shovel")
+ public static Item GravititeShovel;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Skyroot Axe")
+ public static Item SkyrootAxe;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Holystone Axe")
+ public static Item HolystoneAxe;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Zanite Axe")
+ public static Item ZaniteAxe;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Gravitite Axe")
+ public static Item GravititeAxe;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Skyroot Sword")
+ public static Item SkyrootSword;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Holystone Sword")
+ public static Item HolystoneSword;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Zanite Sword")
+ public static Item ZaniteSword;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Gravitite Sword")
+ public static Item GravititeSword;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Iron Bubble")
+ public static Item IronBubble;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Pig Slayer")
+ public static Item PigSlayer;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Vampire Blade")
+ public static Item VampireBlade;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Flaming Sword")
+ public static Item FlamingSword;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Holy Sword")
+ public static Item HolySword;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Lightning Sword")
+ public static Item LightningSword;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Lightning Knife")
+ public static Item LightningKnife;
+ @net.aetherteam.aether.interfaces.AEItem(
+ names = {"Blue Gummie Swet", "Golden Gummie Swet"})
+ public static Item GummieSwet;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Hammer of Notch")
+ public static Item HammerOfNotch;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Cloud Parachute")
+ public static Item CloudParachute;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Golden Cloud Parachute")
+ public static Item GoldenCloudParachute;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Shard of Life")
+ public static Item ShardOfLife;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Valkyrie Cape")
+ public static Item ValkyrieCape;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Valkyrie Lance")
+ public static Item ValkyrieLance;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Iron Ring")
+ public static Item IronRing;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Golden Ring")
+ public static Item GoldenRing;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Zanite Ring")
+ public static Item ZaniteRing;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Iron Pendant")
+ public static Item IronPendant;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Golden Pendant")
+ public static Item GoldenPendant;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Zanite Pendant")
+ public static Item ZanitePendant;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Swet Cape")
+ public static Item SwetCape;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Leather Gloves")
+ public static Item LeatherGloves;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Iron Gloves")
+ public static Item IronGloves;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Golden Gloves")
+ public static Item GoldenGloves;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Diamond Gloves")
+ public static Item DiamondGloves;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Zanite Gloves")
+ public static Item ZaniteGloves;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Zanite Helmet")
+ public static Item ZaniteHelmet;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Zanite Chestplate")
+ public static Item ZaniteChestplate;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Zanite Leggings")
+ public static Item ZaniteLeggings;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Zanite Boots")
+ public static Item ZaniteBoots;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Gravitite Gloves")
+ public static Item GravititeGloves;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Gravitite Helmet")
+ public static Item GravititeHelmet;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Gravitite Chestplate")
+ public static Item GravititeChestplate;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Gravitite Leggings")
+ public static Item GravititeLeggings;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Gravitite Boots")
+ public static Item GravititeBoots;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Phoenix Gloves")
+ public static Item PhoenixGloves;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Phoenix Helmet")
+ public static Item PhoenixHelmet;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Phoenix Chestplate")
+ public static Item PhoenixChestplate;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Phoenix Leggings")
+ public static Item PhoenixLeggings;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Phoenix Boots")
+ public static Item PhoenixBoots;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Obsidian Gloves")
+ public static Item ObsidianGloves;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Obsidian Chestplate")
+ public static Item ObsidianChestplate;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Obsidian Helmet")
+ public static Item ObsidianHelmet;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Obsidian Leggings")
+ public static Item ObsidianLeggings;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Obsidian Boots")
+ public static Item ObsidianBoots;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Neptune Gloves")
+ public static Item NeptuneGloves;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Neptune Helmet")
+ public static Item NeptuneHelmet;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Neptune Chestplate")
+ public static Item NeptuneChestplate;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Neptune Leggings")
+ public static Item NeptuneLeggings;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Neptune Boots")
+ public static Item NeptuneBoots;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Regeneration Stone")
+ public static Item RegenerationStone;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Invisibility Cloak")
+ public static Item InvisibilityCloak;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Agility Cape")
+ public static Item AgilityCape;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "White Cape")
+ public static Item WhiteCape;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Red Cape")
+ public static Item RedCape;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Yellow Cape")
+ public static Item YellowCape;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Blue Cape")
+ public static Item BlueCape;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Valkyrie Pickaxe")
+ public static Item ValkyriePickaxe;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Valkyrie Axe")
+ public static Item ValkyrieAxe;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Valkyrie Shovel")
+ public static Item ValkyrieShovel;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Healing Stone")
+ public static Item HealingStone;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Ice Ring")
+ public static Item IceRing;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Ice Pendant")
+ public static Item IcePendant;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Blue Berry")
+ public static Item BlueBerry;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Gingerbread Man")
+ public static Item GingerBreadMan;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Candy Cane")
+ public static Item CandyCane;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Candy Cane Sword")
+ public static Item CandyCaneSword;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "White Apple")
+ public static Item WhiteApple;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Swetty Ball")
+ public static Item SwettyBall;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Sentry Boots")
+ public static Item SentryBoots;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Valkyrie Music Disk")
+ public static Item ValkyrieMusicDisk;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Valkyrie Helmet")
+ public static Item ValkyrieHelmet;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Valkyrie Chestplate")
+ public static Item ValkyrieChestplate;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Valkyrie Leggings")
+ public static Item ValkyrieLeggings;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Valkyrie Boots")
+ public static Item ValkyrieBoots;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Valkyrie Gloves")
+ public static Item ValkyrieGloves;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Dexterity Cape")
+ public static Item DexterityCape;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Swetty Pendant")
+ public static Item SwettyPendant;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Deadmau5 Ears")
+ public static Item Deadmau5Ears;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Enchanted Berry")
+ public static Item EnchantedBerry;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Rainbow Strawberry")
+ public static Item Strawberry;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Continuum Orb")
+ public static Item ContinuumOrb;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Orange")
+ public static Item Orange;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Labyrinth Music Disk")
+ public static Item LabyrinthMusicDisk;
+ @net.aetherteam.aether.interfaces.AEItem(
+ name = "Moa Music Disk")
+ public static Item MoaMusicDisk;
+ public static HashMap spritesPath = new HashMap();
+
+ public static void init()
+ {
+ spritesPath.put("ROOT", "/net/aetherteam/aether/client/sprites/");
+ spritesPath.put("ARMOR", "/net/aetherteam/aether/client/sprites/armor/");
+ spritesPath.put("CAPES", "/net/aetherteam/aether/client/sprites/capes/");
+ VictoryMedal = (new ItemAether(makeID("VictoryMedal", 17000))).setIconName("Victory Medal").setMaxStackSize(10).setCreativeTab(Aether.misc);
+ Key = (new ItemAetherKey(makeID("Key", 17001))).setCreativeTab(Aether.misc);
+ MoaEgg = (new ItemMoaEgg(makeID("MoaEgg", 17002))).setIconName("Moa Egg").setCreativeTab(Aether.misc);
+ AetherMusicDisk = (new ItemAetherMusicDisk(makeID("AetherMusicDisk", 17003), "Aether Tune", "Noisestorm", "Aether Tune")).setIconName("Aether Music Disk").setCreativeTab(Aether.misc);
+ GoldenAmber = (new ItemAether(makeID("GoldenAmber", 17004))).setIconName("Golden Amber").setCreativeTab(Aether.materials);
+ AechorPetal = (new ItemAether(makeID("AechorPetal", 17005))).setIconName("Aechor Petal").setCreativeTab(Aether.materials);
+ SkyrootStick = (new ItemAether(makeID("SkyrootStick", 17006))).setIconName("Skyroot Stick").setCreativeTab(Aether.materials);
+ Dart = (new ItemDart(makeID("Dart", 17007))).setCreativeTab(Aether.weapons);
+ DartShooter = (new ItemDartShooter(makeID("DartShooter", 17008))).setIconName("Dart Shooter").setCreativeTab(Aether.weapons);
+ AmbrosiumShard = (new ItemAether(makeID("AmbrosiumShard", 17009))).setIconName("Ambrosium Shard").setCreativeTab(Aether.materials);
+ ZaniteGemstone = (new ItemAether(makeID("ZaniteGemstone", 17010))).setIconName("Zanite Gemstone").setCreativeTab(Aether.materials);
+ SkyrootBucket = (new ItemSkyrootBucket(makeID("SkyrootBucket", 17011))).setCreativeTab(Aether.misc);
+ SkyrootPickaxe = (new ItemSkyrootPickaxe(makeID("SkyrootPickaxe", 17012), EnumToolMaterial.WOOD)).setIconName("Skyroot Pickaxe").setCreativeTab(Aether.tools);
+ HolystonePickaxe = (new ItemHolystonePickaxe(makeID("HolystonePickaxe", 17013), EnumToolMaterial.STONE)).setIconName("Holystone Pickaxe").setCreativeTab(Aether.tools);
+ ZanitePickaxe = (new ItemZanitePickaxe(makeID("ZanitePickaxe", 17014), EnumToolMaterial.IRON)).setIconName("Zanite Pickaxe").setCreativeTab(Aether.tools);
+ GravititePickaxe = (new ItemGravititePickaxe(makeID("GravititePickaxe", 17015), EnumToolMaterial.EMERALD)).setIconName("Gravitite Pickaxe").setCreativeTab(Aether.tools);
+ SkyrootShovel = (new ItemSkyrootShovel(makeID("SkyrootShovel", 17016), EnumToolMaterial.WOOD)).setIconName("Skyroot Shovel").setCreativeTab(Aether.tools);
+ HolystoneShovel = (new ItemHolystoneShovel(makeID("HolystoneShovel", 17017), EnumToolMaterial.STONE)).setIconName("Holystone Shovel").setCreativeTab(Aether.tools);
+ ZaniteShovel = (new ItemZaniteShovel(makeID("ZaniteShovel", 17018), EnumToolMaterial.IRON)).setIconName("Zanite Shovel").setCreativeTab(Aether.tools);
+ GravititeShovel = (new ItemGravititeShovel(makeID("GravititeShovel", 17019), EnumToolMaterial.EMERALD)).setIconName("Gravitite Shovel").setCreativeTab(Aether.tools);
+ SkyrootAxe = (new ItemSkyrootAxe(makeID("SkyrootAxe", 17020), EnumToolMaterial.WOOD)).setIconName("Skyroot Axe").setCreativeTab(Aether.tools);
+ HolystoneAxe = (new ItemHolystoneAxe(makeID("HolystoneAxe", 17021), EnumToolMaterial.STONE)).setIconName("Holystone Axe").setCreativeTab(Aether.tools);
+ ZaniteAxe = (new ItemZaniteAxe(makeID("ZaniteAxe", 17022), EnumToolMaterial.IRON)).setIconName("Zanite Axe").setCreativeTab(Aether.tools);
+ GravititeAxe = (new ItemGravititeAxe(makeID("GravititeAxe", 17023), EnumToolMaterial.EMERALD)).setIconName("Gravitite Axe").setCreativeTab(Aether.tools);
+ SkyrootSword = (new ItemSkyrootSword(makeID("SkyrootSword", 17024), EnumToolMaterial.WOOD)).setIconName("Skyroot Sword").setCreativeTab(Aether.weapons);
+ HolystoneSword = (new ItemHolystoneSword(makeID("HolystoneSword", 17025), EnumToolMaterial.STONE)).setIconName("Holystone Sword").setCreativeTab(Aether.weapons);
+ ZaniteSword = (new ItemZaniteSword(makeID("ZaniteSword", 17026), EnumToolMaterial.IRON)).setIconName("Zanite Sword").setCreativeTab(Aether.weapons);
+ GravititeSword = (new ItemGravititeSword(makeID("GravititeSword", 17027), EnumToolMaterial.EMERALD)).setIconName("Gravitite Sword").setCreativeTab(Aether.weapons);
+ IronBubble = (new ItemIronBubble(makeID("IronBubble", 17028), 0, 0, 7)).setIconName("Iron Bubble").setCreativeTab(Aether.accessories);
+ PigSlayer = (new ItemPigSlayer(makeID("PigSlayer", 17029))).setIconName("Pig Slayer").setCreativeTab(Aether.weapons);
+ VampireBlade = (new ItemVampireBlade(makeID("VampireBlade", 17030))).setIconName("Vampire Blade").setCreativeTab(Aether.weapons);
+ FlamingSword = (new ItemElementalSword(makeID("FlamingSword", 17031), AetherEnumElement.Fire)).setIconName("Flaming Sword").setCreativeTab(Aether.weapons);
+ HolySword = (new ItemElementalSword(makeID("HolySword", 17032), AetherEnumElement.Holy)).setIconName("Holy Sword").setCreativeTab(Aether.weapons);
+ LightningSword = (new ItemElementalSword(makeID("FlamingSword", 17033), AetherEnumElement.Lightning)).setIconName("Lightning Sword").setCreativeTab(Aether.weapons);
+ LightningKnife = (new ItemLightningKnife(makeID("LightningKnife", 17034))).setIconName("Lightning Knife").setCreativeTab(Aether.weapons);
+ GummieSwet = (new ItemGummieSwet(makeID("GummieSwet", 17035))).setIconName("Gummie Swet").setCreativeTab(Aether.food);
+ HammerOfNotch = (new ItemHammerOfNotch(makeID("HammerOfNotch", 17036))).setIconName("Hammer of Notch").setCreativeTab(Aether.weapons);
+ CloudParachute = (new ItemCloudParachute(makeID("CloudParachute", 17038), 0)).setIconName("Cloud Parachute");
+ GoldenCloudParachute = (new ItemCloudParachute(makeID("GoldenCloudParachute", 17039), 20)).setIconName("Golden Cloud Parachute");
+ ShardOfLife = (new ItemShardOfLife(makeID("ShardOfLife", 17041))).setIconName("Shard of Life").setCreativeTab(Aether.misc);
+ ValkyrieCape = (new ItemValkyrieCape(makeID("ValkyrieCape", 17042), 0, (String) spritesPath.get("CAPES") + "cape_valkyrie.png", 5)).setIconName("Valkyrie Cape").setCreativeTab(Aether.capes);
+ ValkyrieLance = (new ItemValkyrieLance(makeID("ValkyrieLance", 17043), EnumToolMaterial.EMERALD)).setIconName("Valkyrie Lance").setCreativeTab(Aether.weapons);
+ IronRing = (new ItemAccessory(makeID("IronRing", 17044), 0, (String) spritesPath.get("ARMOR") + "Accessories.png", 8)).setIconName("Iron Ring").setCreativeTab(Aether.accessories);
+ GoldenRing = (new ItemAccessory(makeID("GoldenRing", 17045), 0, (String) spritesPath.get("ARMOR") + "Accessories.png", 8)).setIconName("Golden Ring").setCreativeTab(Aether.accessories);
+ ZaniteRing = (new ItemAccessory(makeID("ZaniteRing", 17046), 0, (String) spritesPath.get("ARMOR") + "Accessories.png", 8)).setIconName("Zanite Ring").setCreativeTab(Aether.accessories);
+ IronPendant = (new ItemAccessory(makeID("IronPendant", 17047), 0, (String) spritesPath.get("ARMOR") + "Accessories.png", 4)).setIconName("Iron Pendant").setCreativeTab(Aether.accessories);
+ GoldenPendant = (new ItemAccessory(makeID("GoldenPendant", 17048), 0, (String) spritesPath.get("ARMOR") + "Accessories.png", 4)).setIconName("Golden Pendant").setCreativeTab(Aether.accessories);
+ ZanitePendant = (new ItemAccessory(makeID("ZanitePendant", 17049), 0, (String) spritesPath.get("ARMOR") + "Accessories.png", 4)).setIconName("Zanite Pendant").setCreativeTab(Aether.accessories);
+ SwetCape = (new ItemAccessory(makeID("SwetCape", 17051), 0, (String) spritesPath.get("CAPES") + "cape_swet.png", 5)).setIconName("Swet Cape").setCreativeTab(Aether.capes);
+ LeatherGloves = (new ItemAccessory(makeID("LeatherGloves", 17052), 0, (String) spritesPath.get("ARMOR") + "Leather.png", 10)).setIconName("Leather Gloves").setCreativeTab(Aether.armour);
+ IronGloves = (new ItemAccessory(makeID("IronGloves", 17053), 2, (String) spritesPath.get("ARMOR") + "Accessories.png", 10)).setIconName("Iron Gloves").setCreativeTab(Aether.armour);
+ GoldenGloves = (new ItemAccessory(makeID("GoldenGloves", 17054), 1, (String) spritesPath.get("ARMOR") + "Gold.png", 10)).setIconName("Golden Gloves").setCreativeTab(Aether.armour);
+ DiamondGloves = (new ItemAccessory(makeID("DiamondGloves", 17055), 3, (String) spritesPath.get("ARMOR") + "Diamond.png", 10)).setIconName("Diamond Gloves").setCreativeTab(Aether.armour);
+ ZaniteGloves = (new ItemAccessory(makeID("ZaniteGloves", 17056), 2, (String) spritesPath.get("ARMOR") + "Zanite.png", 10)).setIconName("Zanite Gloves").setCreativeTab(Aether.armour);
+ ZaniteHelmet = (new ItemColouredArmor(makeID("ZaniteHelmet", 17057), EnumArmorMaterial.IRON, Aether.proxy.addArmor("Zanite"), 0, 16777215, "Zanite")).setIconName("Zanite Helmet").setCreativeTab(Aether.armour);
+ ZaniteChestplate = (new ItemColouredArmor(makeID("ZaniteChestplate", 17058), EnumArmorMaterial.IRON, Aether.proxy.addArmor("Zanite"), 1, 16777215, "Zanite")).setIconName("Zanite Chestplate").setCreativeTab(Aether.armour);
+ ZaniteLeggings = (new ItemColouredArmor(makeID("ZaniteLeggings", 17059), EnumArmorMaterial.IRON, Aether.proxy.addArmor("Zanite"), 2, 16777215, "Zanite")).setIconName("Zanite Leggings").setCreativeTab(Aether.armour);
+ ZaniteBoots = (new ItemColouredArmor(makeID("ZaniteBoots", 17060), EnumArmorMaterial.IRON, Aether.proxy.addArmor("Zanite"), 3, 16777215, "Zanite")).setIconName("Zanite Boots").setCreativeTab(Aether.armour);
+ GravititeGloves = (new ItemAccessory(makeID("GravititeGloves", 17061), 3, (String) spritesPath.get("ARMOR") + "Gravitite.png", 10, 16777215, false)).setIconName("Gravitite Gloves").setCreativeTab(Aether.armour);
+ GravititeHelmet = (new ItemColouredArmor(makeID("GravititeHelmet", 17062), EnumArmorMaterial.DIAMOND, Aether.proxy.addArmor("Gravitite"), 0, 16777215, "Gravitite")).setIconName("Gravitite Helmet").setCreativeTab(Aether.armour);
+ GravititeChestplate = (new ItemColouredArmor(makeID("GravititeChestplate", 17063), EnumArmorMaterial.DIAMOND, Aether.proxy.addArmor("Gravitite"), 1, 16777215, "Gravitite")).setIconName("Gravitite Chestplate").setCreativeTab(Aether.armour);
+ GravititeLeggings = (new ItemColouredArmor(makeID("GravititeLeggings", 17064), EnumArmorMaterial.DIAMOND, Aether.proxy.addArmor("Gravitite"), 2, 16777215, "Gravitite")).setIconName("Gravitite Leggings").setCreativeTab(Aether.armour);
+ GravititeBoots = (new ItemColouredArmor(makeID("GravititeBoots", 17065), EnumArmorMaterial.DIAMOND, Aether.proxy.addArmor("Gravitite"), 3, 16777215, "Gravitite")).setIconName("Gravitite Boots").setCreativeTab(Aether.armour);
+ PhoenixGloves = (new ItemAccessory(makeID("PhoenixGloves", 17066), 3, (String) spritesPath.get("ARMOR") + "Phoenix.png", 10, 16777215, false)).setIconName("Phoenix Gloves").setCreativeTab(Aether.armour);
+ PhoenixHelmet = (new ItemAetherArmor(makeID("PhoenixHelmet", 17067), EnumArmorMaterial.DIAMOND, Aether.proxy.addArmor("Phoenix"), 0, "Phoenix")).setIconName("Phoenix Helmet").setCreativeTab(Aether.armour);
+ PhoenixChestplate = (new ItemAetherArmor(makeID("PhoenixChestplate", 17068), EnumArmorMaterial.DIAMOND, Aether.proxy.addArmor("Phoenix"), 1, "Phoenix")).setIconName("Phoenix Chestplate").setCreativeTab(Aether.armour);
+ PhoenixLeggings = (new ItemAetherArmor(makeID("PhoenixLeggings", 17069), EnumArmorMaterial.DIAMOND, Aether.proxy.addArmor("Phoenix"), 2, "Phoenix")).setIconName("Phoenix Leggings").setCreativeTab(Aether.armour);
+ PhoenixBoots = (new ItemAetherArmor(makeID("PhoenixBoots", 17070), EnumArmorMaterial.DIAMOND, Aether.proxy.addArmor("Phoenix"), 3, "Phoenix")).setIconName("Phoenix Boots").setCreativeTab(Aether.armour);
+ ObsidianGloves = (new ItemAccessory(makeID("ObsidianGloves", 17071), 4, (String) spritesPath.get("ARMOR") + "Obsidian.png", 10, 16777215, false)).setIconName("Obsidian Gloves").setCreativeTab(Aether.armour);
+ ObsidianHelmet = (new ItemColouredArmor(makeID("ObsidianHelmet", 17072), CommonProxy.OBSIDIAN, Aether.proxy.addArmor("Obsidian"), 0, 16777215, "Obsidian")).setIconName("Obsidian Helmet").setCreativeTab(Aether.armour);
+ ObsidianChestplate = (new ItemColouredArmor(makeID("ObsidianChestplate", 17073), CommonProxy.OBSIDIAN, Aether.proxy.addArmor("Obsidian"), 1, 16777215, "Obsidian")).setIconName("Obsidian Chestplate").setCreativeTab(Aether.armour);
+ ObsidianLeggings = (new ItemColouredArmor(makeID("ObsidianLeggings", 17074), CommonProxy.OBSIDIAN, Aether.proxy.addArmor("Obsidian"), 2, 16777215, "Obsidian")).setIconName("Obsidian Leggings").setCreativeTab(Aether.armour);
+ ObsidianBoots = (new ItemColouredArmor(makeID("ObsidianBoots", 17075), CommonProxy.OBSIDIAN, Aether.proxy.addArmor("Obsidian"), 3, 16777215, "Obsidian")).setIconName("Obsidian Boots").setCreativeTab(Aether.armour);
+ NeptuneGloves = (new ItemAccessory(makeID("NeptuneGloves", 17076), 3, (String) spritesPath.get("ARMOR") + "Neptune.png", 10, 16777215)).setIconName("Neptune Gloves").setCreativeTab(Aether.armour);
+ NeptuneHelmet = (new ItemNeptuneArmor(makeID("NeptuneHelmet", 17077), EnumArmorMaterial.DIAMOND, Aether.proxy.addArmor("Neptune"), 0, 16777215, "Neptune")).setIconName("Neptune Helmet").setCreativeTab(Aether.armour);
+ NeptuneChestplate = (new ItemNeptuneArmor(makeID("NeptuneChestplate", 17078), EnumArmorMaterial.DIAMOND, Aether.proxy.addArmor("Neptune"), 1, 16777215, "Neptune")).setIconName("Neptune Chestplate").setCreativeTab(Aether.armour);
+ NeptuneLeggings = (new ItemNeptuneArmor(makeID("NeptuneLeggings", 17079), EnumArmorMaterial.DIAMOND, Aether.proxy.addArmor("Neptune"), 2, 16777215, "Neptune")).setIconName("Neptune Leggings").setCreativeTab(Aether.armour);
+ NeptuneBoots = (new ItemNeptuneArmor(makeID("NeptuneBoots", 17080), EnumArmorMaterial.DIAMOND, Aether.proxy.addArmor("Neptune"), 3, 16777215, "Neptune")).setIconName("Neptune Boots").setCreativeTab(Aether.armour);
+ RegenerationStone = (new ItemRegenerationStone(makeID("RegenerationStone", 17081), 0, 0, 7)).setIconName("Regeneration Stone").setCreativeTab(Aether.accessories);
+ InvisibilityCloak = (new ItemInvisibilityCloak(makeID("InvisibilityCloak", 17082), 0, 0, 5)).setIconName("Invisibility Cloak").setCreativeTab(Aether.capes);
+ AgilityCape = (new ItemAgilityCape(makeID("AgilityCape", 17083), 0, (String) spritesPath.get("CAPES") + "cape_agility.png", 5)).setIconName("Agility Cape").setCreativeTab(Aether.capes);
+ WhiteCape = (new ItemAccessory(makeID("WhiteCape", 17084), 0, (String) spritesPath.get("CAPES") + "cape_white.png", 5)).setIconName("White Cape").setCreativeTab(Aether.capes);
+ RedCape = (new ItemAccessory(makeID("RedCape", 17085), 0, (String) spritesPath.get("CAPES") + "cape_red.png", 5)).setIconName("Red Cape").setCreativeTab(Aether.capes);
+ YellowCape = (new ItemAccessory(makeID("YellowCape", 17086), 0, (String) spritesPath.get("CAPES") + "cape_yellow.png", 5)).setIconName("Yellow Cape").setCreativeTab(Aether.capes);
+ BlueCape = (new ItemAccessory(makeID("BlueCape", 17087), 0, (String) spritesPath.get("CAPES") + "cape_blue.png", 5)).setIconName("Blue Cape").setCreativeTab(Aether.capes);
+ ValkyriePickaxe = (new ItemValkyriePickaxe(makeID("ValkyriePickaxe", 17088), EnumToolMaterial.EMERALD)).setIconName("Valkyrie Pickaxe").setCreativeTab(Aether.tools);
+ ValkyrieAxe = (new ItemValkyrieAxe(makeID("ValkyrieAxe", 17089), EnumToolMaterial.EMERALD)).setIconName("Valkyrie Axe").setCreativeTab(Aether.tools);
+ ValkyrieShovel = (new ItemValkyrieShovel(makeID("ValkyrieShovel", 17090), EnumToolMaterial.EMERALD)).setIconName("Valkyrie Shovel").setCreativeTab(Aether.tools);
+ HealingStone = (new ItemHealingStone(makeID("HealingStone", 17091), 0, 1.2F, false)).setIconName("Healing Stone").setAlwaysEdible().setPotionEffect(Potion.regeneration.id, 30, 0, 1.0F).setCreativeTab(Aether.food);
+ IceRing = (new ItemIceAccessory(makeID("IceRing", 17092), 0, (String) spritesPath.get("ARMOR") + "Accessories.png", 8, 9823975)).setIconName("Ice Ring").setCreativeTab(Aether.accessories).setMaxDamage(6000);
+ IcePendant = (new ItemIceAccessory(makeID("IcePendant", 17093), 0, (String) spritesPath.get("ARMOR") + "Accessories.png", 4, 9823975)).setIconName("Ice Pendant").setCreativeTab(Aether.accessories).setMaxDamage(6000);
+ BlueBerry = (new ItemAetherFood(makeID("BlueBerry", 17094), 2, false)).setIconName("Blue Berry").setCreativeTab(Aether.food);
+ GingerBreadMan = (new ItemAetherFood(makeID("GingerbreadMan", 17095), 2, false)).setIconName("Gingerbread Man").setCreativeTab(Aether.food);
+ CandyCane = (new ItemAetherFood(makeID("CandyCane", 17096), 2, false)).setIconName("Candy Cane").setCreativeTab(Aether.food);
+ CandyCaneSword = (new ItemCandyCaneSword(makeID("CandyCaneSword", 17097), EnumToolMaterial.WOOD)).setIconName("Candy Cane Sword").setCreativeTab(Aether.weapons);
+ WhiteApple = (new ItemPoisonCure(makeID("WhiteApple", 17098), 0, false)).setIconName("White Apple").setAlwaysEdible().setCreativeTab(Aether.food);
+ SwettyBall = (new ItemAether(makeID("SwettyBall", 17099))).setIconName("Swetty Ball").setCreativeTab(Aether.materials);
+ SentryBoots = (new ItemAetherArmor(makeID("SentryBoots", 17100), EnumArmorMaterial.IRON, Aether.proxy.addArmor("Sentry"), 3, "Sentry")).setIconName("Sentry Boots").setCreativeTab(Aether.armour);
+ ValkyrieMusicDisk = (new ItemAetherMusicDisk(makeID("ValkyrieMusicDisk", 17101), "Ascending Dawn", "Emile van Krieken", "Ascending Dawn")).setIconName("Valkyrie Music Disk").setCreativeTab(Aether.misc);
+ ValkyrieHelmet = (new ItemAetherArmor(makeID("ValkyrieHelmet", 17102), EnumArmorMaterial.DIAMOND, Aether.proxy.addArmor("Valkyrie"), 0, "Valkyrie")).setIconName("Valkyrie Helmet").setCreativeTab(Aether.armour);
+ ValkyrieChestplate = (new ItemAetherArmor(makeID("ValkyrieChestplate", 17103), EnumArmorMaterial.DIAMOND, Aether.proxy.addArmor("Valkyrie"), 1, "Valkyrie")).setIconName("Valkyrie Chestplate").setCreativeTab(Aether.armour);
+ ValkyrieLeggings = (new ItemAetherArmor(makeID("ValkyrieLeggings", 17104), EnumArmorMaterial.DIAMOND, Aether.proxy.addArmor("Valkyrie"), 2, "Valkyrie")).setIconName("Valkyrie Leggings").setCreativeTab(Aether.armour);
+ ValkyrieBoots = (new ItemAetherArmor(makeID("ValkyrieBoots", 17105), EnumArmorMaterial.DIAMOND, Aether.proxy.addArmor("Valkyrie"), 3, "Valkyrie")).setIconName("Valkyrie Boots").setCreativeTab(Aether.armour);
+ ValkyrieGloves = (new ItemAccessory(makeID("ValkyrieGloves", 17106), 3, (String) spritesPath.get("ARMOR") + "Valkyrie.png", 10, 16777215, false)).setIconName("Valkyrie Gloves").setCreativeTab(Aether.armour);
+ DexterityCape = (new ItemDexterityCape(makeID("DexterityCape", 17107), 0, (String) spritesPath.get("CAPES") + "cape_dexterity.png", 5)).setIconName("Dexterity Cape").setCreativeTab(Aether.capes);
+ SwettyPendant = (new ItemAccessory(makeID("SwettyPendant", 17108), 0, (String) spritesPath.get("ARMOR") + "Accessories.png", 4)).setIconName("Swetty Pendant").setCreativeTab(Aether.accessories);
+ Deadmau5Ears = (new ItemAccessory(makeID("Deadmau5Ears", 17109), 0, 0, 7)).setIconName("Deadmau5 Ears").setCreativeTab(Aether.accessories);
+ EnchantedBerry = (new ItemAetherFood(makeID("EnchantedBerry", 17110), 8, false)).setIconName("Enchanted Berry").setCreativeTab(Aether.food);
+ Strawberry = (new ItemAetherFood(makeID("Strawberry", 17112), 4, false)).setIconName("Rainbow Strawberry").setCreativeTab(Aether.food);
+ ContinuumOrb = (new ItemContinuum(makeID("ContinuumOrb", 17113))).setIconName("Continuum Orb").setCreativeTab(Aether.materials);
+ Orange = (new ItemAetherFood(makeID("Orange", 17114), 4, false)).setIconName("Orange").setCreativeTab(Aether.food);
+ LabyrinthMusicDisk = (new ItemAetherMusicDisk(makeID("LabyrinthMusicDisk", 17115), "Demise", "Moorziey", "Demise")).setIconName("Labyrinth Music Disk").setCreativeTab(Aether.misc);
+ MoaMusicDisk = (new ItemAetherMusicDisk(makeID("MoaMusicDisk", 17116), "Approaches", "Emile van Krieken", "Approaches")).setIconName("Moa Music Disk").setCreativeTab(Aether.misc);
+ registerItemNames();
+ ItemContinuum.addBan(Item.map.itemID);
+ ItemContinuum.addBan(Item.enchantedBook.itemID);
+ ItemContinuum.addBan(Item.firework.itemID);
+ ItemContinuum.addBan(Item.fireworkCharge.itemID);
+ ItemContinuum.addBan(Item.monsterPlacer.itemID);
+ ItemContinuum.addBan(AetherBlocks.AetherPortal.blockID);
+ ItemContinuum.addBan(Block.waterMoving.blockID);
+ ItemContinuum.addBan(Block.waterStill.blockID);
+ ItemContinuum.addBan(Block.lavaMoving.blockID);
+ ItemContinuum.addBan(Block.lavaStill.blockID);
+ ItemContinuum.addBan(Block.bedrock.blockID);
+ ItemContinuum.addBan(Block.bed.blockID);
+ ItemContinuum.addBan(Block.pistonExtension.blockID);
+ ItemContinuum.addBan(Block.pistonMoving.blockID);
+ ItemContinuum.addBan(Block.furnaceBurning.blockID);
+ ItemContinuum.addBan(Block.signPost.blockID);
+ ItemContinuum.addBan(Block.endPortal.blockID);
+ ItemContinuum.addBan(Block.endPortalFrame.blockID);
+ ItemContinuum.addBan(Block.portal.blockID);
+ ItemContinuum.addBan(Block.mobSpawner.blockID);
+ ItemContinuum.addBan(Block.redstoneComparatorActive.blockID);
+ ItemContinuum.addBan(Block.redstoneLampActive.blockID);
+ ItemContinuum.addBan(Block.torchRedstoneActive.blockID);
+ ItemContinuum.addBan(Block.redstoneRepeaterActive.blockID);
+ }
+
+ public static int makeID(String var0, int var1)
+ {
+ return Aether.getConfig().getItem(var0, var1).getInt(var1);
+ }
+
+ private static void registerItemNames()
+ {
+ Field[] var0 = AetherItems.class.getDeclaredFields();
+ int var1 = var0.length;
+
+ for (int var2 = 0; var2 < var1; ++var2)
+ {
+ Field var3 = var0[var2];
+ net.aetherteam.aether.interfaces.AEItem var4 = (net.aetherteam.aether.interfaces.AEItem) var3.getAnnotation(net.aetherteam.aether.interfaces.AEItem.class);
+
+ if (var4 != null && Item.class.isAssignableFrom(var3.getType()))
+ {
+ Item var5;
+
+ try
+ {
+ var5 = (Item) var3.get((Object) null);
+ } catch (IllegalAccessException var8)
+ {
+ var8.printStackTrace();
+ continue;
+ }
+
+ String[] var6 = var4.names();
+
+ if (var6.length != 0)
+ {
+ for (int var7 = 0; var7 < var6.length; ++var7)
+ {
+ LanguageRegistry.addName(new ItemStack(var5, 1, var7), var6[var7]);
+ }
+ } else
+ {
+ LanguageRegistry.addName(var5, var4.name());
+ }
+ }
+ }
+
+ String[] var9 = AetherMoaColour.getNames();
+
+ for (var1 = 0; var1 < AetherMoaColour.colours.size(); ++var1)
+ {
+ LanguageRegistry.addName(new ItemStack(MoaEgg, 1, var1), var9[var1] + " Moa Egg");
+ }
+
+ LanguageRegistry.addName(new ItemStack(SkyrootBucket, 1, Block.waterMoving.blockID), "Skyroot Water Bucket");
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemAccessory.java b/src/main/java/net/aetherteam/aether/items/ItemAccessory.java
new file mode 100644
index 0000000..660d017
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemAccessory.java
@@ -0,0 +1,133 @@
+package net.aetherteam.aether.items;
+
+import net.aetherteam.aether.PlayerBaseAetherServer;
+import net.aetherteam.aether.client.PlayerBaseAetherClient;
+import net.aetherteam.aether.interfaces.IAetherAccessory;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.Icon;
+
+public class ItemAccessory extends ItemAether implements IAetherAccessory
+{
+ public int itemColour;
+ public final int armorLevel;
+ public final int armorType;
+ public final int damageReduceAmount;
+ public final int renderIndex;
+ public String texture;
+ public boolean colouriseRender;
+ public static Icon ringSlot;
+ public static Icon pendantSlot;
+ public static Icon capeSlot;
+ public static Icon miscSlot;
+ public static Icon shieldSlot;
+ public static Icon gloveSlot;
+ private static final int[] damageReduceAmountArray = new int[]{3, 7, 5, 3, 0, 0, 0, 0, 0, 0, 0, 0};
+ private static final int[] maxDamageArray = new int[]{11, 16, 15, 13, 10, 10, 8, 10, 10, 10, 10, 10};
+
+ protected ItemAccessory(int var1, int var2, int var3, int var4, int var5)
+ {
+ super(var1);
+ this.itemColour = 16777215;
+ this.armorLevel = var2;
+ this.armorType = var4;
+ this.renderIndex = var3;
+ this.damageReduceAmount = damageReduceAmountArray[var4];
+ this.setMaxDamage(maxDamageArray[var4] * 3 << var2);
+ this.maxStackSize = 1;
+ this.itemColour = var5;
+ this.colouriseRender = true;
+ this.texture = "/armor/Accessories.png";
+ }
+
+ public ItemAccessory(int var1, int var2, int var3, int var4)
+ {
+ this(var1, var2, var3, var4, 16777215);
+ }
+
+ public ItemAccessory(int var1, int var2, String var3, int var4)
+ {
+ this(var1, var2, 0, var4);
+ this.texture = var3;
+ }
+
+ public ItemAccessory(int var1, int var2, String var3, int var4, int var5)
+ {
+ this(var1, var2, 0, var4, var5);
+ this.texture = var3;
+ }
+
+ public ItemAccessory(int var1, int var2, String var3, int var4, int var5, boolean var6)
+ {
+ this(var1, var2, var3, var4, var5);
+ this.colouriseRender = var6;
+ }
+
+ public int getColorFromItemStack(ItemStack var1, int var2)
+ {
+ return this.itemColour;
+ }
+
+ public void registerIcons(IconRegister var1)
+ {
+ ringSlot = var1.registerIcon("Aether:Ring Slot");
+ pendantSlot = var1.registerIcon("Aether:Pendant Slot");
+ capeSlot = var1.registerIcon("Aether:Cape Slot");
+ miscSlot = var1.registerIcon("Aether:Misc Slot");
+ shieldSlot = var1.registerIcon("Aether:Shield Slot");
+ gloveSlot = var1.registerIcon("Aether:Glove Slot");
+ super.registerIcons(var1);
+ }
+
+ public boolean isTypeValid(int var1)
+ {
+ return var1 == this.armorType ? true : ((var1 == 8 || var1 == 9) && (this.armorType == 8 || this.armorType == 9) ? true : (var1 == 7 || var1 == 11) && (this.armorType == 7 || this.armorType == 11));
+ }
+
+ public int[] getSlotType()
+ {
+ int[] var1 = new int[2];
+
+ if (this.armorType != 8 && this.armorType != 9)
+ {
+ if (this.armorType != 7 && this.armorType != 11)
+ {
+ var1[0] = this.armorType - 4;
+ var1[1] = this.armorType - 4;
+ } else
+ {
+ var1[0] = 3;
+ var1[1] = 7;
+ }
+ } else
+ {
+ var1[0] = 4;
+ var1[1] = 5;
+ }
+
+ return var1;
+ }
+
+ public boolean damageType()
+ {
+ return this.damageType(this.armorType);
+ }
+
+ public boolean damageType(int var1)
+ {
+ return var1 < 4 || var1 == 6 || var1 == 10;
+ }
+
+ public void activatePassive(EntityPlayer var1) {}
+
+ public void activateServerPassive(EntityPlayer var1, PlayerBaseAetherServer var2)
+ {
+ this.activatePassive(var1);
+ }
+
+ public void activateClientPassive(EntityPlayer var1, PlayerBaseAetherClient var2)
+ {
+ this.activatePassive(var1);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemAether.java b/src/main/java/net/aetherteam/aether/items/ItemAether.java
new file mode 100644
index 0000000..3836b83
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemAether.java
@@ -0,0 +1,16 @@
+package net.aetherteam.aether.items;
+
+import net.minecraft.item.Item;
+
+public class ItemAether extends Item
+{
+ protected ItemAether(int var1)
+ {
+ super(var1);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemAetherArmor.java b/src/main/java/net/aetherteam/aether/items/ItemAetherArmor.java
new file mode 100644
index 0000000..0c7a138
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemAetherArmor.java
@@ -0,0 +1,35 @@
+package net.aetherteam.aether.items;
+
+import java.util.ArrayList;
+
+import net.minecraft.item.EnumArmorMaterial;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemArmor;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.common.IArmorTextureProvider;
+
+public class ItemAetherArmor extends ItemArmor implements IArmorTextureProvider
+{
+ public String armorName;
+
+ public ItemAetherArmor(int var1, EnumArmorMaterial var2, int var3, int var4, String var5)
+ {
+ super(var1, var2, var3, var4);
+ this.armorName = var5;
+ }
+
+ public void addCreativeItems(ArrayList var1)
+ {
+ var1.add(new ItemStack(this));
+ }
+
+ public String getArmorTextureFile(ItemStack var1)
+ {
+ return var1.getItemName().contains(" Leggings") ? "/net/aetherteam/aether/client/sprites/armor/" + this.armorName + "_2.png" : "/net/aetherteam/aether/client/sprites/armor/" + this.armorName + "_1.png";
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemAetherBucket.java b/src/main/java/net/aetherteam/aether/items/ItemAetherBucket.java
new file mode 100644
index 0000000..45140a7
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemAetherBucket.java
@@ -0,0 +1,121 @@
+package net.aetherteam.aether.items;
+
+import java.util.ArrayList;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemBucket;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.MovingObjectPosition;
+import net.minecraft.world.World;
+
+public class ItemAetherBucket extends ItemBucket
+{
+ private int contents;
+
+ public ItemAetherBucket(int var1, int var2)
+ {
+ super(var1, var2);
+ this.contents = var2;
+ }
+
+ public void addCreativeItems(ArrayList var1)
+ {
+ var1.add(new ItemStack(this));
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
+ */
+ public ItemStack onItemRightClick(ItemStack var1, World var2, EntityPlayer var3)
+ {
+ if (this.contents == 0)
+ {
+ return super.onItemRightClick(var1, var2, var3);
+ } else
+ {
+ float var4 = 1.0F;
+ double var5 = var3.prevPosX + (var3.posX - var3.prevPosX) * (double) var4;
+ double var7 = var3.prevPosY + (var3.posY - var3.prevPosY) * (double) var4 + 1.62D - (double) var3.yOffset;
+ double var9 = var3.prevPosZ + (var3.posZ - var3.prevPosZ) * (double) var4;
+ MovingObjectPosition var11 = this.getMovingObjectPositionFromPlayer(var2, var3, false);
+
+ if (var11 == null)
+ {
+ return var1;
+ } else
+ {
+ int var12 = var11.blockX;
+ int var13 = var11.blockY;
+ int var14 = var11.blockZ;
+
+ if (var11.sideHit == 0)
+ {
+ --var13;
+ }
+
+ if (var11.sideHit == 1)
+ {
+ ++var13;
+ }
+
+ if (var11.sideHit == 2)
+ {
+ --var14;
+ }
+
+ if (var11.sideHit == 3)
+ {
+ ++var14;
+ }
+
+ if (var11.sideHit == 4)
+ {
+ --var12;
+ }
+
+ if (var11.sideHit == 5)
+ {
+ ++var12;
+ }
+
+ if (!var3.canCurrentToolHarvestBlock(var12, var13, var14))
+ {
+ return var1;
+ } else if (!var2.isAirBlock(var12, var13, var14) && var2.getBlockMaterial(var12, var13, var14).isSolid())
+ {
+ return var1;
+ } else
+ {
+ if (var2.provider.isHellWorld && this.contents == Block.waterMoving.blockID)
+ {
+ var2.playSoundEffect(var5 + 0.5D, var7 + 0.5D, var9 + 0.5D, "random.fizz", 0.5F, 2.6F + (var2.rand.nextFloat() - var2.rand.nextFloat()) * 0.8F);
+
+ for (int var15 = 0; var15 < 8; ++var15)
+ {
+ var2.spawnParticle("largesmoke", (double) var12 + Math.random(), (double) var13 + Math.random(), (double) var14 + Math.random(), 0.0D, 0.0D, 0.0D);
+ }
+ } else if (!var2.isRemote && var2.provider.terrainType.getWorldTypeID() == 2 && this.contents == Block.lavaMoving.blockID)
+ {
+ var2.setBlock(var12, var13, var14, AetherBlocks.Aerogel.blockID, 0, 4);
+ } else if (!var2.isRemote && var2.getBlockId(var11.blockX, var11.blockY, var11.blockZ) == Block.glowStone.blockID && AetherBlocks.AetherPortal.tryToCreatePortal(var2, var12, var13, var14))
+ {
+ var2.setBlock(var12, var13, var14, AetherBlocks.AetherPortal.blockID, 0, 4);
+ } else
+ {
+ var2.setBlock(var12, var13, var14, this.contents, 0, 4);
+ }
+
+ return var3.capabilities.isCreativeMode ? var1 : new ItemStack(Item.bucketEmpty);
+ }
+ }
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemAetherFood.java b/src/main/java/net/aetherteam/aether/items/ItemAetherFood.java
new file mode 100644
index 0000000..61d372a
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemAetherFood.java
@@ -0,0 +1,17 @@
+package net.aetherteam.aether.items;
+
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemFood;
+
+public class ItemAetherFood extends ItemFood
+{
+ public ItemAetherFood(int var1, int var2, boolean var3)
+ {
+ super(var1, var2, var3);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemAetherKey.java b/src/main/java/net/aetherteam/aether/items/ItemAetherKey.java
new file mode 100644
index 0000000..de2609d
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemAetherKey.java
@@ -0,0 +1,76 @@
+package net.aetherteam.aether.items;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.List;
+
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.Icon;
+import net.minecraft.util.MathHelper;
+
+public class ItemAetherKey extends ItemAether
+{
+ public static final String[] keyNames = new String[]{"Bronze Key", "Silver Key", "Golden Key", "Guardian Key", "Host Key", "Cog Key"};
+ public static final int bronzeKey = 0;
+ public static final int silverKey = 1;
+ public static final int goldenKey = 2;
+ public static final int guardianKey = 3;
+ public static final int hostKey = 4;
+ public static final int cogKey = 5;
+ @SideOnly(Side.CLIENT)
+ private Icon[] keyIcons;
+
+ protected ItemAetherKey(int var1)
+ {
+ super(var1);
+ this.setHasSubtypes(true);
+ this.maxStackSize = 1;
+ }
+
+ @SideOnly(Side.CLIENT)
+
+ /**
+ * returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
+ */
+ public void getSubItems(int var1, CreativeTabs var2, List var3)
+ {
+ for (int var4 = 0; var4 < 6; ++var4)
+ {
+ var3.add(new ItemStack(var1, 1, var4));
+ }
+ }
+
+ @SideOnly(Side.CLIENT)
+ public void registerIcons(IconRegister var1)
+ {
+ this.keyIcons = new Icon[keyNames.length];
+
+ for (int var2 = 0; var2 < keyNames.length; ++var2)
+ {
+ this.keyIcons[var2] = var1.registerIcon("Aether:" + keyNames[var2]);
+ }
+ }
+
+ @SideOnly(Side.CLIENT)
+
+ /**
+ * Gets an icon index based on an item's damage value
+ */
+ public Icon getIconFromDamage(int var1)
+ {
+ return this.keyIcons[var1];
+ }
+
+ /**
+ * Returns the unlocalized name of this item. This version accepts an ItemStack so different stacks can have
+ * different names based on their damage or NBT.
+ */
+ public String getUnlocalizedName(ItemStack var1)
+ {
+ int var2 = MathHelper.clamp_int(var1.getItemDamage(), 0, 5);
+ return "Aether:" + keyNames[var2];
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemAetherMusicDisk.java b/src/main/java/net/aetherteam/aether/items/ItemAetherMusicDisk.java
new file mode 100644
index 0000000..7ced374
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemAetherMusicDisk.java
@@ -0,0 +1,39 @@
+package net.aetherteam.aether.items;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemRecord;
+
+public class ItemAetherMusicDisk extends ItemRecord
+{
+ public String artistName;
+ public String songName;
+
+ protected ItemAetherMusicDisk(int var1, String var2, String var3, String var4)
+ {
+ super(var1, var2);
+ this.artistName = var3;
+ this.songName = var4;
+ }
+
+ /**
+ * Return the title for this record.
+ */
+ public String getRecordTitle()
+ {
+ return this.artistName + " - " + this.songName;
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ @SideOnly(Side.CLIENT)
+ public void registerIcons(IconRegister var1)
+ {
+ this.itemIcon = var1.registerIcon(this.getUnlocalizedName().replace("item.", ""));
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemAgilityCape.java b/src/main/java/net/aetherteam/aether/items/ItemAgilityCape.java
new file mode 100644
index 0000000..6471190
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemAgilityCape.java
@@ -0,0 +1,59 @@
+package net.aetherteam.aether.items;
+
+import net.aetherteam.aether.PlayerBaseAetherServer;
+import net.aetherteam.aether.client.PlayerBaseAetherClient;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+
+public class ItemAgilityCape extends ItemAccessory
+{
+ public ItemAgilityCape(int var1, int var2, int var3, int var4)
+ {
+ super(var1, var2, var3, var4, 16777215);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ public ItemAgilityCape(int var1, int var2, String var3, int var4)
+ {
+ super(var1, var2, 0, var4);
+ this.texture = var3;
+ }
+
+ public ItemAgilityCape(int var1, int var2, String var3, int var4, int var5)
+ {
+ super(var1, var2, 0, var4, var5);
+ this.texture = var3;
+ }
+
+ public ItemAgilityCape(int var1, int var2, String var3, int var4, int var5, boolean var6)
+ {
+ super(var1, var2, var3, var4, var5);
+ this.colouriseRender = var6;
+ }
+
+ public void activateServerPassive(EntityPlayer var1, PlayerBaseAetherServer var2)
+ {
+ if (var2.wearingAccessory(this.itemID))
+ {
+ var1.stepHeight = 1.0F;
+ } else
+ {
+ var1.stepHeight = var2.prevStepHeight;
+ }
+ }
+
+ public void activateClientPassive(EntityPlayer var1, PlayerBaseAetherClient var2)
+ {
+ if (var2.wearingAccessory(this.itemID))
+ {
+ var1.stepHeight = 1.0F;
+ } else
+ {
+ var1.stepHeight = var2.prevStepHeight;
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemAmbrosium.java b/src/main/java/net/aetherteam/aether/items/ItemAmbrosium.java
new file mode 100644
index 0000000..654d4fa
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemAmbrosium.java
@@ -0,0 +1,32 @@
+package net.aetherteam.aether.items;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
+public class ItemAmbrosium extends ItemAether
+{
+ private int healAmount;
+
+ public ItemAmbrosium(int var1, int var2)
+ {
+ super(var1);
+ this.healAmount = var2;
+ this.maxStackSize = 64;
+ }
+
+ public int getHealAmount()
+ {
+ return this.healAmount;
+ }
+
+ /**
+ * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
+ */
+ public ItemStack onItemRightClick(ItemStack var1, World var2, EntityPlayer var3)
+ {
+ --var1.stackSize;
+ var3.heal(this.healAmount);
+ return var1;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemBlockAercloud.java b/src/main/java/net/aetherteam/aether/items/ItemBlockAercloud.java
new file mode 100644
index 0000000..37869d6
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemBlockAercloud.java
@@ -0,0 +1,43 @@
+package net.aetherteam.aether.items;
+
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemBlock;
+import net.minecraft.item.ItemStack;
+
+public class ItemBlockAercloud extends ItemBlock
+{
+ public ItemBlockAercloud(int var1)
+ {
+ super(var1);
+ this.setHasSubtypes(true);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Returns the unlocalized name of this item. This version accepts an ItemStack so different stacks can have
+ * different names based on their damage or NBT.
+ */
+ public String getUnlocalizedName(ItemStack var1)
+ {
+ int var2 = var1.getItemDamage();
+
+ if (var2 > 5)
+ {
+ var2 = 5;
+ }
+
+ return this.getUnlocalizedName() + var2;
+ }
+
+ /**
+ * Returns the metadata of the block which this Item (ItemBlock) can place
+ */
+ public int getMetadata(int var1)
+ {
+ return var1;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemBlockAetherGrass.java b/src/main/java/net/aetherteam/aether/items/ItemBlockAetherGrass.java
new file mode 100644
index 0000000..f50110b
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemBlockAetherGrass.java
@@ -0,0 +1,48 @@
+package net.aetherteam.aether.items;
+
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemBlock;
+import net.minecraft.item.ItemStack;
+
+public class ItemBlockAetherGrass extends ItemBlock
+{
+ public ItemBlockAetherGrass(int var1)
+ {
+ super(var1);
+ this.setHasSubtypes(true);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Returns the unlocalized name of this item. This version accepts an ItemStack so different stacks can have
+ * different names based on their damage or NBT.
+ */
+ public String getUnlocalizedName(ItemStack var1)
+ {
+ int var2 = var1.getItemDamage();
+
+ if (var2 == 1)
+ {
+ var2 = 1;
+ }
+
+ if (var2 == 0)
+ {
+ var2 = 0;
+ }
+
+ return this.getUnlocalizedName() + var2;
+ }
+
+ /**
+ * Returns the metadata of the block which this Item (ItemBlock) can place
+ */
+ public int getMetadata(int var1)
+ {
+ return var1 == 1 ? 1 : 0;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemBlockAetherLog.java b/src/main/java/net/aetherteam/aether/items/ItemBlockAetherLog.java
new file mode 100644
index 0000000..7a681b9
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemBlockAetherLog.java
@@ -0,0 +1,48 @@
+package net.aetherteam.aether.items;
+
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemBlock;
+import net.minecraft.item.ItemStack;
+
+public class ItemBlockAetherLog extends ItemBlock
+{
+ public ItemBlockAetherLog(int var1)
+ {
+ super(var1);
+ this.setHasSubtypes(true);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Returns the unlocalized name of this item. This version accepts an ItemStack so different stacks can have
+ * different names based on their damage or NBT.
+ */
+ public String getUnlocalizedName(ItemStack var1)
+ {
+ int var2 = var1.getItemDamage();
+
+ if (var2 > 2)
+ {
+ var2 = 2;
+ }
+
+ if (var2 == 1)
+ {
+ var2 = 0;
+ }
+
+ return this.getUnlocalizedName() + var2;
+ }
+
+ /**
+ * Returns the metadata of the block which this Item (ItemBlock) can place
+ */
+ public int getMetadata(int var1)
+ {
+ return var1 <= 1 ? 1 : 3;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemBlockBronzeDoor.java b/src/main/java/net/aetherteam/aether/items/ItemBlockBronzeDoor.java
new file mode 100644
index 0000000..42222d4
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemBlockBronzeDoor.java
@@ -0,0 +1,37 @@
+package net.aetherteam.aether.items;
+
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemBlock;
+import net.minecraft.item.ItemStack;
+
+public class ItemBlockBronzeDoor extends ItemBlock
+{
+ public ItemBlockBronzeDoor(int var1)
+ {
+ super(var1);
+ this.setHasSubtypes(true);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Returns the unlocalized name of this item. This version accepts an ItemStack so different stacks can have
+ * different names based on their damage or NBT.
+ */
+ public String getUnlocalizedName(ItemStack var1)
+ {
+ int var2 = var1.getItemDamage();
+ return var2 <= 0 ? "Bronze Door" : (var2 > 0 ? "Bronze Door Lock" : this.getUnlocalizedName() + var2);
+ }
+
+ /**
+ * Returns the metadata of the block which this Item (ItemBlock) can place
+ */
+ public int getMetadata(int var1)
+ {
+ return var1 <= 0 ? 0 : 1;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemBlockChristmasLeaves.java b/src/main/java/net/aetherteam/aether/items/ItemBlockChristmasLeaves.java
new file mode 100644
index 0000000..370714c
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemBlockChristmasLeaves.java
@@ -0,0 +1,43 @@
+package net.aetherteam.aether.items;
+
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemBlock;
+import net.minecraft.item.ItemStack;
+
+public class ItemBlockChristmasLeaves extends ItemBlock
+{
+ public ItemBlockChristmasLeaves(int var1)
+ {
+ super(var1);
+ this.setHasSubtypes(true);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Returns the unlocalized name of this item. This version accepts an ItemStack so different stacks can have
+ * different names based on their damage or NBT.
+ */
+ public String getUnlocalizedName(ItemStack var1)
+ {
+ int var2 = var1.getItemDamage();
+
+ if (var2 > 1)
+ {
+ var2 = 1;
+ }
+
+ return this.getUnlocalizedName() + var2;
+ }
+
+ /**
+ * Returns the metadata of the block which this Item (ItemBlock) can place
+ */
+ public int getMetadata(int var1)
+ {
+ return var1;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemBlockCrystalLeaves.java b/src/main/java/net/aetherteam/aether/items/ItemBlockCrystalLeaves.java
new file mode 100644
index 0000000..149880a
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemBlockCrystalLeaves.java
@@ -0,0 +1,43 @@
+package net.aetherteam.aether.items;
+
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemBlock;
+import net.minecraft.item.ItemStack;
+
+public class ItemBlockCrystalLeaves extends ItemBlock
+{
+ public ItemBlockCrystalLeaves(int var1)
+ {
+ super(var1);
+ this.setHasSubtypes(true);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Returns the unlocalized name of this item. This version accepts an ItemStack so different stacks can have
+ * different names based on their damage or NBT.
+ */
+ public String getUnlocalizedName(ItemStack var1)
+ {
+ int var2 = var1.getItemDamage();
+
+ if (var2 > 1)
+ {
+ var2 = 1;
+ }
+
+ return this.getUnlocalizedName() + var2;
+ }
+
+ /**
+ * Returns the metadata of the block which this Item (ItemBlock) can place
+ */
+ public int getMetadata(int var1)
+ {
+ return var1;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemBlockDungeon.java b/src/main/java/net/aetherteam/aether/items/ItemBlockDungeon.java
new file mode 100644
index 0000000..901be38
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemBlockDungeon.java
@@ -0,0 +1,43 @@
+package net.aetherteam.aether.items;
+
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemBlock;
+import net.minecraft.item.ItemStack;
+
+public class ItemBlockDungeon extends ItemBlock
+{
+ public ItemBlockDungeon(int var1)
+ {
+ super(var1);
+ this.setHasSubtypes(true);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Returns the unlocalized name of this item. This version accepts an ItemStack so different stacks can have
+ * different names based on their damage or NBT.
+ */
+ public String getUnlocalizedName(ItemStack var1)
+ {
+ int var2 = var1.getItemDamage();
+
+ if (var2 > 2)
+ {
+ var2 = 2;
+ }
+
+ return this.getUnlocalizedName() + var2;
+ }
+
+ /**
+ * Returns the metadata of the block which this Item (ItemBlock) can place
+ */
+ public int getMetadata(int var1)
+ {
+ return var1;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemBlockDungeonHolystone.java b/src/main/java/net/aetherteam/aether/items/ItemBlockDungeonHolystone.java
new file mode 100644
index 0000000..cd135f6
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemBlockDungeonHolystone.java
@@ -0,0 +1,37 @@
+package net.aetherteam.aether.items;
+
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemBlock;
+import net.minecraft.item.ItemStack;
+
+public class ItemBlockDungeonHolystone extends ItemBlock
+{
+ public ItemBlockDungeonHolystone(int var1)
+ {
+ super(var1);
+ this.setHasSubtypes(true);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Returns the unlocalized name of this item. This version accepts an ItemStack so different stacks can have
+ * different names based on their damage or NBT.
+ */
+ public String getUnlocalizedName(ItemStack var1)
+ {
+ int var2 = var1.getItemDamage();
+ return var2 >= 2 ? "Dungeon Mossy Holystone" : (var2 >= 0 ? "Dungeon Holystone" : this.getUnlocalizedName() + var2);
+ }
+
+ /**
+ * Returns the metadata of the block which this Item (ItemBlock) can place
+ */
+ public int getMetadata(int var1)
+ {
+ return var1 <= 1 ? 1 : 3;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemBlockEntrance.java b/src/main/java/net/aetherteam/aether/items/ItemBlockEntrance.java
new file mode 100644
index 0000000..d2104b2
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemBlockEntrance.java
@@ -0,0 +1,37 @@
+package net.aetherteam.aether.items;
+
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemBlock;
+import net.minecraft.item.ItemStack;
+
+public class ItemBlockEntrance extends ItemBlock
+{
+ public ItemBlockEntrance(int var1)
+ {
+ super(var1);
+ this.setHasSubtypes(true);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Returns the unlocalized name of this item. This version accepts an ItemStack so different stacks can have
+ * different names based on their damage or NBT.
+ */
+ public String getUnlocalizedName(ItemStack var1)
+ {
+ int var2 = var1.getItemDamage();
+ return var2 >= 1 ? "Dungeon Entrance Lock" : (var2 >= 0 ? "Dungeon Entrance" : this.getUnlocalizedName() + var2);
+ }
+
+ /**
+ * Returns the metadata of the block which this Item (ItemBlock) can place
+ */
+ public int getMetadata(int var1)
+ {
+ return var1 > 1 ? 1 : 0;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemBlockHolystone.java b/src/main/java/net/aetherteam/aether/items/ItemBlockHolystone.java
new file mode 100644
index 0000000..1ee4a28
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemBlockHolystone.java
@@ -0,0 +1,48 @@
+package net.aetherteam.aether.items;
+
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemBlock;
+import net.minecraft.item.ItemStack;
+
+public class ItemBlockHolystone extends ItemBlock
+{
+ public ItemBlockHolystone(int var1)
+ {
+ super(var1);
+ this.setHasSubtypes(true);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Returns the unlocalized name of this item. This version accepts an ItemStack so different stacks can have
+ * different names based on their damage or NBT.
+ */
+ public String getUnlocalizedName(ItemStack var1)
+ {
+ int var2 = var1.getItemDamage();
+
+ if (var2 > 2)
+ {
+ var2 = 2;
+ }
+
+ if (var2 == 1)
+ {
+ var2 = 0;
+ }
+
+ return this.getUnlocalizedName() + var2;
+ }
+
+ /**
+ * Returns the metadata of the block which this Item (ItemBlock) can place
+ */
+ public int getMetadata(int var1)
+ {
+ return var1 <= 1 ? 1 : 3;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemBlockQuicksoil.java b/src/main/java/net/aetherteam/aether/items/ItemBlockQuicksoil.java
new file mode 100644
index 0000000..a572ccf
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemBlockQuicksoil.java
@@ -0,0 +1,36 @@
+package net.aetherteam.aether.items;
+
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemBlock;
+import net.minecraft.item.ItemStack;
+
+public class ItemBlockQuicksoil extends ItemBlock
+{
+ public ItemBlockQuicksoil(int var1)
+ {
+ super(var1);
+ this.setHasSubtypes(true);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Returns the unlocalized name of this item. This version accepts an ItemStack so different stacks can have
+ * different names based on their damage or NBT.
+ */
+ public String getUnlocalizedName(ItemStack var1)
+ {
+ return this.getUnlocalizedName();
+ }
+
+ /**
+ * Returns the metadata of the block which this Item (ItemBlock) can place
+ */
+ public int getMetadata(int var1)
+ {
+ return 1;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemBlockTrap.java b/src/main/java/net/aetherteam/aether/items/ItemBlockTrap.java
new file mode 100644
index 0000000..f0f2c1d
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemBlockTrap.java
@@ -0,0 +1,43 @@
+package net.aetherteam.aether.items;
+
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemBlock;
+import net.minecraft.item.ItemStack;
+
+public class ItemBlockTrap extends ItemBlock
+{
+ public ItemBlockTrap(int var1)
+ {
+ super(var1);
+ this.setHasSubtypes(true);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Returns the unlocalized name of this item. This version accepts an ItemStack so different stacks can have
+ * different names based on their damage or NBT.
+ */
+ public String getUnlocalizedName(ItemStack var1)
+ {
+ int var2 = var1.getItemDamage();
+
+ if (var2 > 2)
+ {
+ var2 = 2;
+ }
+
+ return this.getUnlocalizedName() + var2;
+ }
+
+ /**
+ * Returns the metadata of the block which this Item (ItemBlock) can place
+ */
+ public int getMetadata(int var1)
+ {
+ return var1;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemCandyCaneSword.java b/src/main/java/net/aetherteam/aether/items/ItemCandyCaneSword.java
new file mode 100644
index 0000000..98103e4
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemCandyCaneSword.java
@@ -0,0 +1,39 @@
+package net.aetherteam.aether.items;
+
+import java.util.Random;
+
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.EnumToolMaterial;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.item.ItemSword;
+
+public class ItemCandyCaneSword extends ItemSword
+{
+ public ItemCandyCaneSword(int var1, EnumToolMaterial var2)
+ {
+ super(var1, var2);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Current implementations of this method in child classes do not use the entry argument beside ev. They just raise
+ * the damage on the stack.
+ */
+ public boolean hitEntity(ItemStack var1, EntityLiving var2, EntityLiving var3)
+ {
+ if ((new Random()).nextInt(25) == 0 && var3 != null && var3 instanceof EntityPlayer && (var2.hurtTime > 0 || var2.deathTime > 0))
+ {
+ var2.dropItemWithOffset(AetherItems.CandyCane.itemID, 1, 0.0F);
+ var1.damageItem(1, var3);
+ }
+
+ var1.damageItem(1, var3);
+ return true;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemCloudParachute.java b/src/main/java/net/aetherteam/aether/items/ItemCloudParachute.java
new file mode 100644
index 0000000..cbafec8
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemCloudParachute.java
@@ -0,0 +1,38 @@
+package net.aetherteam.aether.items;
+
+import net.aetherteam.aether.entities.EntityCloudParachute;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
+public class ItemCloudParachute extends ItemAether
+{
+ public ItemCloudParachute(int var1, int var2)
+ {
+ super(var1);
+ this.maxStackSize = 1;
+ this.setMaxDamage(var2);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
+ */
+ public ItemStack onItemRightClick(ItemStack var1, World var2, EntityPlayer var3)
+ {
+ EntityCloudParachute var4 = new EntityCloudParachute(var2, var3, this.itemID == AetherItems.GoldenCloudParachute.itemID);
+
+ if (!var2.isRemote)
+ {
+ var2.spawnEntityInWorld(var4);
+ }
+
+ var1.damageItem(1, var3);
+ return var1;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemColouredArmor.java b/src/main/java/net/aetherteam/aether/items/ItemColouredArmor.java
new file mode 100644
index 0000000..8df9397
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemColouredArmor.java
@@ -0,0 +1,35 @@
+package net.aetherteam.aether.items;
+
+import net.minecraft.item.EnumArmorMaterial;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemArmor;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.common.IArmorTextureProvider;
+
+public class ItemColouredArmor extends ItemArmor implements IArmorTextureProvider
+{
+ private int colour;
+ public String armorName;
+
+ public ItemColouredArmor(int var1, EnumArmorMaterial var2, int var3, int var4, int var5, String var6)
+ {
+ super(var1, var2, var3, var4);
+ this.colour = var5;
+ this.armorName = var6;
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ public int getColorFromItemStack(ItemStack var1, int var2)
+ {
+ return this.colour;
+ }
+
+ public String getArmorTextureFile(ItemStack var1)
+ {
+ return var1.getItemName().contains(" Leggings") ? "/net/aetherteam/aether/client/sprites/armor/" + this.armorName + "_2.png" : "/net/aetherteam/aether/client/sprites/armor/" + this.armorName + "_1.png";
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemContinuum.java b/src/main/java/net/aetherteam/aether/items/ItemContinuum.java
new file mode 100644
index 0000000..3839cad
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemContinuum.java
@@ -0,0 +1,47 @@
+package net.aetherteam.aether.items;
+
+import java.util.ArrayList;
+import java.util.Random;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
+public class ItemContinuum extends ItemAether
+{
+ private static ArrayList banList = new ArrayList();
+ private static Random random = new Random();
+
+ protected ItemContinuum(int var1)
+ {
+ super(var1);
+ this.setMaxStackSize(1);
+ }
+
+ /**
+ * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
+ */
+ public ItemStack onItemRightClick(ItemStack var1, World var2, EntityPlayer var3)
+ {
+ int var4;
+
+ do
+ {
+ var4 = 256 + random.nextInt(31744);
+ } while (Item.itemsList[var4] == null || banList.contains(Integer.valueOf(var4)));
+
+ var1.itemID = var4;
+ return var1;
+ }
+
+ public static void addBan(int var0)
+ {
+ banList.add(Integer.valueOf(var0));
+ }
+
+ public static void removeBan(int var0)
+ {
+ banList.remove(var0);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemDart.java b/src/main/java/net/aetherteam/aether/items/ItemDart.java
new file mode 100644
index 0000000..094b4b5
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemDart.java
@@ -0,0 +1,73 @@
+package net.aetherteam.aether.items;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.List;
+
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.Icon;
+import net.minecraft.util.MathHelper;
+
+public class ItemDart extends ItemAether
+{
+ public static final String[] dartNames = new String[]{"Golden Dart", "Poison Dart", "Enchanted Dart"};
+ @SideOnly(Side.CLIENT)
+ private Icon[] icons;
+
+ protected ItemDart(int var1)
+ {
+ super(var1);
+ this.setHasSubtypes(true);
+ }
+
+ /**
+ * Gets an icon index based on an item's damage value
+ */
+ public Icon getIconFromDamage(int var1)
+ {
+ return this.icons[var1];
+ }
+
+ /**
+ * Gets an icon index based on an item's damage value and the given render pass
+ */
+ public Icon getIconFromDamageForRenderPass(int var1, int var2)
+ {
+ return this.icons[var1];
+ }
+
+ /**
+ * Returns the unlocalized name of this item. This version accepts an ItemStack so different stacks can have
+ * different names based on their damage or NBT.
+ */
+ public String getUnlocalizedName(ItemStack var1)
+ {
+ int var2 = MathHelper.clamp_int(var1.getItemDamage(), 0, 2);
+ return "Aether:" + dartNames[var2];
+ }
+
+ @SideOnly(Side.CLIENT)
+ public void registerIcons(IconRegister var1)
+ {
+ this.icons = new Icon[dartNames.length];
+
+ for (int var2 = 0; var2 < dartNames.length; ++var2)
+ {
+ this.icons[var2] = var1.registerIcon("Aether:" + dartNames[var2]);
+ }
+ }
+
+ /**
+ * returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
+ */
+ public void getSubItems(int var1, CreativeTabs var2, List var3)
+ {
+ for (int var4 = 0; var4 < 3; ++var4)
+ {
+ var3.add(new ItemStack(var1, 1, var4));
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemDartShooter.java b/src/main/java/net/aetherteam/aether/items/ItemDartShooter.java
new file mode 100644
index 0000000..45427bd
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemDartShooter.java
@@ -0,0 +1,185 @@
+package net.aetherteam.aether.items;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.List;
+
+import net.aetherteam.aether.entities.EntityDartEnchanted;
+import net.aetherteam.aether.entities.EntityDartGolden;
+import net.aetherteam.aether.entities.EntityDartPhoenix;
+import net.aetherteam.aether.entities.EntityDartPoison;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.Icon;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class ItemDartShooter extends ItemAether
+{
+ public static final String[] names = new String[]{"Golden Dart Shooter", "Poison Dart Shooter", "Enchanted Dart Shooter", "Phoenix Dart Shooter"};
+ @SideOnly(Side.CLIENT)
+ private Icon[] icons;
+
+ public ItemDartShooter(int var1)
+ {
+ super(var1);
+ this.setHasSubtypes(true);
+ this.maxStackSize = 1;
+ }
+
+ /**
+ * Returns True is the item is renderer in full 3D when hold.
+ */
+ public boolean isFull3D()
+ {
+ return false;
+ }
+
+ /**
+ * returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
+ */
+ public void getSubItems(int var1, CreativeTabs var2, List var3)
+ {
+ for (int var4 = 0; var4 < 4; ++var4)
+ {
+ var3.add(new ItemStack(var1, 1, var4));
+ }
+ }
+
+ private int consumeItem(EntityPlayer var1, int var2, int var3)
+ {
+ InventoryPlayer var4 = var1.inventory;
+
+ for (int var5 = 0; var5 < var4.getSizeInventory(); ++var5)
+ {
+ ItemStack var6 = var4.getStackInSlot(var5);
+
+ if (var6 != null)
+ {
+ int var7 = var6.getItemDamage();
+
+ if (var3 != 3 && var6.itemID == var2 && var6.getItemDamage() == var3)
+ {
+ if (!var1.capabilities.isCreativeMode)
+ {
+ --var6.stackSize;
+ }
+
+ if (var6.stackSize == 0)
+ {
+ var6 = null;
+ }
+
+ var4.setInventorySlotContents(var5, var6);
+ return var7;
+ }
+
+ if (var3 == 3 && var6.itemID == var2)
+ {
+ if (!var1.capabilities.isCreativeMode)
+ {
+ --var6.stackSize;
+ }
+
+ if (var6.stackSize == 0)
+ {
+ var6 = null;
+ }
+
+ var4.setInventorySlotContents(var5, var6);
+ return 3;
+ }
+ }
+ }
+
+ return -1;
+ }
+
+ /**
+ * Gets an icon index based on an item's damage value
+ */
+ public Icon getIconFromDamage(int var1)
+ {
+ return this.icons[var1];
+ }
+
+ /**
+ * Returns the unlocalized name of this item. This version accepts an ItemStack so different stacks can have
+ * different names based on their damage or NBT.
+ */
+ public String getUnlocalizedName(ItemStack var1)
+ {
+ int var2 = MathHelper.clamp_int(var1.getItemDamage(), 0, 3);
+ return "Aether:" + names[var2];
+ }
+
+ @SideOnly(Side.CLIENT)
+ public void registerIcons(IconRegister var1)
+ {
+ this.icons = new Icon[names.length];
+
+ for (int var2 = 0; var2 < names.length; ++var2)
+ {
+ this.icons[var2] = var1.registerIcon("Aether:" + names[var2]);
+ }
+ }
+
+ /**
+ * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
+ */
+ public ItemStack onItemRightClick(ItemStack var1, World var2, EntityPlayer var3)
+ {
+ int var4;
+
+ if (!var3.capabilities.isCreativeMode)
+ {
+ var4 = this.consumeItem(var3, AetherItems.Dart.itemID, var1.getItemDamage());
+ } else
+ {
+ var4 = var1.getItemDamage();
+ }
+
+ if (var4 != -1)
+ {
+ var2.playSoundAtEntity(var3, "aemisc.shootDart", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 0.2F));
+ Object var5 = null;
+
+ if (var4 == 1)
+ {
+ var5 = new EntityDartPoison(var2, var3);
+ } else if (var4 == 2)
+ {
+ var5 = new EntityDartEnchanted(var2, var3);
+ } else if (var4 == 0)
+ {
+ var5 = new EntityDartGolden(var2, var3);
+ } else if (var4 == 3)
+ {
+ var5 = new EntityDartPhoenix(var2, var3, new ItemStack(AetherItems.Dart.itemID, 1, var4));
+ var2.playSoundAtEntity(var3, "mob.ghast.fireball", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 0.4F));
+ }
+
+ if (!var2.isRemote)
+ {
+ var2.spawnEntityInWorld((Entity) var5);
+
+ if (!var3.capabilities.isCreativeMode)
+ {
+ ((EntityDartGolden) var5).canBePickedUp = 1;
+ }
+
+ if (var3.capabilities.isCreativeMode)
+ {
+ ((EntityDartGolden) var5).canBePickedUp = 2;
+ }
+ }
+ }
+
+ return var1;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemDexterityCape.java b/src/main/java/net/aetherteam/aether/items/ItemDexterityCape.java
new file mode 100644
index 0000000..447a496
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemDexterityCape.java
@@ -0,0 +1,42 @@
+package net.aetherteam.aether.items;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.potion.Potion;
+import net.minecraft.potion.PotionEffect;
+
+public class ItemDexterityCape extends ItemAccessory
+{
+ public ItemDexterityCape(int var1, int var2, int var3, int var4)
+ {
+ super(var1, var2, var3, var4, 16777215);
+ }
+
+ public ItemDexterityCape(int var1, int var2, String var3, int var4)
+ {
+ super(var1, var2, 0, var4);
+ this.texture = var3;
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ public ItemDexterityCape(int var1, int var2, String var3, int var4, int var5)
+ {
+ super(var1, var2, 0, var4, var5);
+ this.texture = var3;
+ }
+
+ public ItemDexterityCape(int var1, int var2, String var3, int var4, int var5, boolean var6)
+ {
+ super(var1, var2, var3, var4, var5);
+ this.colouriseRender = var6;
+ }
+
+ public void activatePassive(EntityPlayer var1)
+ {
+ var1.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 10, 0));
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemElementalSword.java b/src/main/java/net/aetherteam/aether/items/ItemElementalSword.java
new file mode 100644
index 0000000..5d3bba0
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemElementalSword.java
@@ -0,0 +1,114 @@
+package net.aetherteam.aether.items;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import net.aetherteam.aether.entities.EntityAetherLightning;
+import net.aetherteam.aether.enums.AetherEnumElement;
+import net.minecraft.block.Block;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.monster.EntityPigZombie;
+import net.minecraft.entity.monster.EntitySkeleton;
+import net.minecraft.entity.monster.EntityZombie;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.EnumToolMaterial;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.item.ItemSword;
+
+public class ItemElementalSword extends ItemSword
+{
+ public static ArrayList undead = new ArrayList();
+ private int weaponDamage;
+ private int holyDamage;
+ private AetherEnumElement element;
+ private int colour;
+
+ public ItemElementalSword(int var1, AetherEnumElement var2)
+ {
+ super(var1, EnumToolMaterial.EMERALD);
+ this.maxStackSize = 1;
+ this.setMaxDamage(502);
+ this.weaponDamage = 4;
+ this.holyDamage = 20;
+ this.element = var2;
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
+ * sword
+ */
+ public float getStrVsBlock(ItemStack var1, Block var2)
+ {
+ return 1.5F;
+ }
+
+ public boolean onBlockDestroyed(ItemStack var1, int var2, int var3, int var4, int var5, EntityLiving var6)
+ {
+ var1.damageItem(2, var6);
+ return true;
+ }
+
+ /**
+ * Current implementations of this method in child classes do not use the entry argument beside ev. They just raise
+ * the damage on the stack.
+ */
+ public boolean hitEntity(ItemStack var1, EntityLiving var2, EntityLiving var3)
+ {
+ if (this.element == AetherEnumElement.Fire)
+ {
+ var2.setFire(30);
+ } else if (this.element == AetherEnumElement.Lightning && !var2.worldObj.isRemote)
+ {
+ var2.worldObj.addWeatherEffect(new EntityAetherLightning(var2.worldObj, (double) ((int) var2.posX), (double) ((int) var2.posY), (double) ((int) var2.posZ), (EntityPlayer) var3));
+ }
+
+ var1.damageItem(1, var3);
+ return true;
+ }
+
+ /**
+ * Returns the damage against a given entity.
+ */
+ public int getDamageVsEntity(Entity var1)
+ {
+ if (this.element == AetherEnumElement.Holy && var1 instanceof EntityLiving)
+ {
+ EntityLiving var2 = (EntityLiving) var1;
+ Iterator var3 = undead.iterator();
+
+ while (var3.hasNext())
+ {
+ Class var4 = (Class) var3.next();
+
+ if (var2.getClass().isAssignableFrom(var4))
+ {
+ return this.holyDamage;
+ }
+ }
+ }
+
+ return this.weaponDamage;
+ }
+
+ /**
+ * Returns True is the item is renderer in full 3D when hold.
+ */
+ public boolean isFull3D()
+ {
+ return true;
+ }
+
+ static
+ {
+ undead.add(EntityZombie.class);
+ undead.add(EntitySkeleton.class);
+ undead.add(EntityPigZombie.class);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemGravititeAxe.java b/src/main/java/net/aetherteam/aether/items/ItemGravititeAxe.java
new file mode 100644
index 0000000..6e1aa7e
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemGravititeAxe.java
@@ -0,0 +1,84 @@
+package net.aetherteam.aether.items;
+
+import java.util.Random;
+
+import net.aetherteam.aether.entities.EntityFloatingBlock;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.EnumToolMaterial;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemAxe;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.EnumMovingObjectType;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.MovingObjectPosition;
+import net.minecraft.util.Vec3;
+import net.minecraft.world.World;
+
+public class ItemGravititeAxe extends ItemAxe
+{
+ private static Random random = new Random();
+
+ protected ItemGravititeAxe(int var1, EnumToolMaterial var2)
+ {
+ super(var1, var2);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
+ */
+ public ItemStack onItemRightClick(ItemStack var1, World var2, EntityPlayer var3)
+ {
+ float var4 = var3.rotationPitch;
+ float var5 = var3.rotationYaw;
+ double var6 = var3.posX;
+ double var8 = var3.posY + 1.62D - (double) var3.yOffset;
+ double var10 = var3.posZ;
+ Vec3 var12 = Vec3.createVectorHelper(var6, var8, var10);
+ float var13 = MathHelper.cos(-var5 * 0.01745329F - (float) Math.PI);
+ float var14 = MathHelper.sin(-var5 * 0.01745329F - (float) Math.PI);
+ float var15 = -MathHelper.cos(-var4 * 0.01745329F);
+ float var16 = MathHelper.sin(-var4 * 0.01745329F);
+ float var17 = var14 * var15;
+ float var19 = var13 * var15;
+ double var20 = 5.0D;
+ Vec3 var22 = var12.addVector((double) var17 * var20, (double) var16 * var20, (double) var19 * var20);
+ MovingObjectPosition var23 = var2.rayTraceBlocks_do(var12, var22, false);
+
+ if (var23 == null)
+ {
+ return var1;
+ } else
+ {
+ if (var23.typeOfHit == EnumMovingObjectType.TILE)
+ {
+ int var24 = var23.blockX;
+ int var25 = var23.blockY;
+ int var26 = var23.blockZ;
+ int var27 = var2.getBlockId(var24, var25, var26);
+ int var28 = var2.getBlockMetadata(var24, var25, var26);
+
+ for (int var29 = 0; var29 < blocksEffectiveAgainst.length; ++var29)
+ {
+ if (var27 == blocksEffectiveAgainst[var29].blockID)
+ {
+ EntityFloatingBlock var30 = new EntityFloatingBlock(var2, (double) ((float) var24 + 0.5F), (double) ((float) var25 + 0.5F), (double) ((float) var26 + 0.5F), var27, var28);
+
+ if (!var2.isRemote)
+ {
+ var2.spawnEntityInWorld(var30);
+ }
+
+ var1.damageItem(4, var3);
+ }
+ }
+ }
+
+ return var1;
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemGravititePickaxe.java b/src/main/java/net/aetherteam/aether/items/ItemGravititePickaxe.java
new file mode 100644
index 0000000..df79202
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemGravititePickaxe.java
@@ -0,0 +1,84 @@
+package net.aetherteam.aether.items;
+
+import java.util.Random;
+
+import net.aetherteam.aether.entities.EntityFloatingBlock;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.EnumToolMaterial;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemPickaxe;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.EnumMovingObjectType;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.MovingObjectPosition;
+import net.minecraft.util.Vec3;
+import net.minecraft.world.World;
+
+public class ItemGravititePickaxe extends ItemPickaxe
+{
+ private static Random random = new Random();
+
+ protected ItemGravititePickaxe(int var1, EnumToolMaterial var2)
+ {
+ super(var1, var2);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
+ */
+ public ItemStack onItemRightClick(ItemStack var1, World var2, EntityPlayer var3)
+ {
+ float var4 = var3.rotationPitch;
+ float var5 = var3.rotationYaw;
+ double var6 = var3.posX;
+ double var8 = var3.posY + 1.62D - (double) var3.yOffset;
+ double var10 = var3.posZ;
+ Vec3 var12 = Vec3.createVectorHelper(var6, var8, var10);
+ float var13 = MathHelper.cos(-var5 * 0.01745329F - (float) Math.PI);
+ float var14 = MathHelper.sin(-var5 * 0.01745329F - (float) Math.PI);
+ float var15 = -MathHelper.cos(-var4 * 0.01745329F);
+ float var16 = MathHelper.sin(-var4 * 0.01745329F);
+ float var17 = var14 * var15;
+ float var19 = var13 * var15;
+ double var20 = 5.0D;
+ Vec3 var22 = var12.addVector((double) var17 * var20, (double) var16 * var20, (double) var19 * var20);
+ MovingObjectPosition var23 = var2.rayTraceBlocks_do(var12, var22, false);
+
+ if (var23 == null)
+ {
+ return var1;
+ } else
+ {
+ if (var23.typeOfHit == EnumMovingObjectType.TILE)
+ {
+ int var24 = var23.blockX;
+ int var25 = var23.blockY;
+ int var26 = var23.blockZ;
+ int var27 = var2.getBlockId(var24, var25, var26);
+ int var28 = var2.getBlockMetadata(var24, var25, var26);
+
+ for (int var29 = 0; var29 < blocksEffectiveAgainst.length; ++var29)
+ {
+ if (var27 == blocksEffectiveAgainst[var29].blockID)
+ {
+ EntityFloatingBlock var30 = new EntityFloatingBlock(var2, (double) ((float) var24 + 0.5F), (double) ((float) var25 + 0.5F), (double) ((float) var26 + 0.5F), var27, var28);
+
+ if (!var2.isRemote)
+ {
+ var2.spawnEntityInWorld(var30);
+ }
+
+ var1.damageItem(4, var3);
+ }
+ }
+ }
+
+ return var1;
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemGravititeShovel.java b/src/main/java/net/aetherteam/aether/items/ItemGravititeShovel.java
new file mode 100644
index 0000000..546c9fa
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemGravititeShovel.java
@@ -0,0 +1,109 @@
+package net.aetherteam.aether.items;
+
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.entities.EntityFloatingBlock;
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.EnumToolMaterial;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemSpade;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.EnumMovingObjectType;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.MovingObjectPosition;
+import net.minecraft.util.Vec3;
+import net.minecraft.world.World;
+
+public class ItemGravititeShovel extends ItemSpade
+{
+ private static Random random = new Random();
+ public static final Block[] blocksEffectiveAgainst = new Block[]{Block.grass, Block.dirt, Block.sand, Block.gravel, Block.snow, Block.blockSnow, Block.blockClay, Block.tilledField, Block.slowSand, Block.mycelium, AetherBlocks.AetherDirt, AetherBlocks.AetherGrass};
+
+ public ItemGravititeShovel(int var1, EnumToolMaterial var2)
+ {
+ super(var1, var2);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
+ * sword
+ */
+ public float getStrVsBlock(ItemStack var1, Block var2)
+ {
+ for (int var3 = 0; var3 < blocksEffectiveAgainst.length; ++var3)
+ {
+ if (blocksEffectiveAgainst[var3] == var2)
+ {
+ return this.efficiencyOnProperMaterial;
+ }
+ }
+
+ return 1.0F;
+ }
+
+ /**
+ * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
+ */
+ public ItemStack onItemRightClick(ItemStack var1, World var2, EntityPlayer var3)
+ {
+ float var4 = var3.rotationPitch;
+ float var5 = var3.rotationYaw;
+ double var6 = var3.posX;
+ double var8 = var3.posY + 1.62D - (double) var3.yOffset;
+ double var10 = var3.posZ;
+ Vec3 var12 = Vec3.createVectorHelper(var6, var8, var10);
+ float var13 = MathHelper.cos(-var5 * 0.01745329F - (float) Math.PI);
+ float var14 = MathHelper.sin(-var5 * 0.01745329F - (float) Math.PI);
+ float var15 = -MathHelper.cos(-var4 * 0.01745329F);
+ float var16 = MathHelper.sin(-var4 * 0.01745329F);
+ float var17 = var14 * var15;
+ float var19 = var13 * var15;
+ double var20 = 5.0D;
+ Vec3 var22 = var12.addVector((double) var17 * var20, (double) var16 * var20, (double) var19 * var20);
+ MovingObjectPosition var23 = var2.rayTraceBlocks_do(var12, var22, false);
+
+ if (var23 == null)
+ {
+ return var1;
+ } else
+ {
+ if (var23.typeOfHit == EnumMovingObjectType.TILE)
+ {
+ int var24 = var23.blockX;
+ int var25 = var23.blockY;
+ int var26 = var23.blockZ;
+ int var27 = var2.getBlockId(var24, var25, var26);
+ int var28 = var2.getBlockMetadata(var24, var25, var26);
+
+ for (int var29 = 0; var29 < blocksEffectiveAgainst.length; ++var29)
+ {
+ if (var27 == blocksEffectiveAgainst[var29].blockID)
+ {
+ if (var27 == AetherBlocks.AetherGrass.blockID)
+ {
+ var27 = AetherBlocks.AetherDirt.blockID;
+ }
+
+ EntityFloatingBlock var30 = new EntityFloatingBlock(var2, (double) ((float) var24 + 0.5F), (double) ((float) var25 + 0.5F), (double) ((float) var26 + 0.5F), var27, var28);
+
+ if (!var2.isRemote)
+ {
+ var2.spawnEntityInWorld(var30);
+ }
+
+ var1.damageItem(4, var3);
+ }
+ }
+ }
+
+ return var1;
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemGravititeSword.java b/src/main/java/net/aetherteam/aether/items/ItemGravititeSword.java
new file mode 100644
index 0000000..1bf905d
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemGravititeSword.java
@@ -0,0 +1,36 @@
+package net.aetherteam.aether.items;
+
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.EnumToolMaterial;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.item.ItemSword;
+
+public class ItemGravititeSword extends ItemSword
+{
+ public ItemGravititeSword(int var1, EnumToolMaterial var2)
+ {
+ super(var1, var2);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Current implementations of this method in child classes do not use the entry argument beside ev. They just raise
+ * the damage on the stack.
+ */
+ public boolean hitEntity(ItemStack var1, EntityLiving var2, EntityLiving var3)
+ {
+ if (var3 != null && var3 instanceof EntityPlayer && (var2.hurtTime > 0 || var2.deathTime > 0))
+ {
+ var2.addVelocity(0.0D, 1.0D, 0.0D);
+ var1.damageItem(1, var3);
+ }
+
+ return true;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemGummieSwet.java b/src/main/java/net/aetherteam/aether/items/ItemGummieSwet.java
new file mode 100644
index 0000000..9500e2e
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemGummieSwet.java
@@ -0,0 +1,96 @@
+package net.aetherteam.aether.items;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.List;
+
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.potion.Potion;
+import net.minecraft.potion.PotionEffect;
+import net.minecraft.util.Icon;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class ItemGummieSwet extends ItemAetherFood
+{
+ public static final String[] names = new String[]{"Blue Gummie Swet", "Golden Gummie Swet"};
+ @SideOnly(Side.CLIENT)
+ private Icon[] icons;
+ private int healAmount;
+ private boolean damZero;
+ private boolean damOne;
+
+ public ItemGummieSwet(int var1)
+ {
+ super(var1, 20, false);
+ this.setMaxStackSize(64);
+ this.damZero = false;
+ this.damOne = false;
+ this.healAmount = 20;
+ this.setHasSubtypes(true);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
+ */
+ public void getSubItems(int var1, CreativeTabs var2, List var3)
+ {
+ for (int var4 = 0; var4 < 2; ++var4)
+ {
+ var3.add(new ItemStack(var1, 1, var4));
+ }
+ }
+
+ /**
+ * Gets an icon index based on an item's damage value
+ */
+ public Icon getIconFromDamage(int var1)
+ {
+ return this.icons[var1];
+ }
+
+ /**
+ * Returns the unlocalized name of this item. This version accepts an ItemStack so different stacks can have
+ * different names based on their damage or NBT.
+ */
+ public String getUnlocalizedName(ItemStack var1)
+ {
+ int var2 = MathHelper.clamp_int(var1.getItemDamage(), 0, names.length - 1);
+ return super.getUnlocalizedName() + "." + names[var2];
+ }
+
+ @SideOnly(Side.CLIENT)
+ public void registerIcons(IconRegister var1)
+ {
+ this.icons = new Icon[names.length];
+
+ for (int var2 = 0; var2 < names.length; ++var2)
+ {
+ this.icons[var2] = var1.registerIcon("Aether:" + names[var2]);
+ }
+ }
+
+ public ItemStack onEaten(ItemStack var1, World var2, EntityPlayer var3)
+ {
+ if (!var2.isRemote)
+ {
+ var3.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 100, 1));
+ }
+
+ --var1.stackSize;
+ var3.getFoodStats().addStats(this);
+ var2.playSoundAtEntity(var3, "random.burp", 0.5F, var2.rand.nextFloat() * 0.1F + 0.9F);
+ this.onFoodEaten(var1, var2, var3);
+ return var1;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemHammerOfNotch.java b/src/main/java/net/aetherteam/aether/items/ItemHammerOfNotch.java
new file mode 100644
index 0000000..ee328d8
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemHammerOfNotch.java
@@ -0,0 +1,69 @@
+package net.aetherteam.aether.items;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.entities.EntityNotchWave;
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.EnumToolMaterial;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.item.ItemSword;
+import net.minecraft.world.World;
+
+public class ItemHammerOfNotch extends ItemSword
+{
+ private int weaponDamage;
+ public EntityNotchWave notchwave;
+
+ public ItemHammerOfNotch(int var1)
+ {
+ super(var1, EnumToolMaterial.IRON);
+ this.weaponDamage = 4 + EnumToolMaterial.IRON.getDamageVsEntity() * 2;
+ }
+
+ /**
+ * Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
+ * sword
+ */
+ public float getStrVsBlock(ItemStack var1, Block var2)
+ {
+ return 1.5F;
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
+ */
+ public ItemStack onItemRightClick(ItemStack var1, World var2, EntityPlayer var3)
+ {
+ if (Aether.getServerPlayer(var3) == null)
+ {
+ return var1;
+ } else
+ {
+ if (Aether.getServerPlayer(var3).getPlayer().capabilities.isCreativeMode)
+ {
+ var2.playSoundAtEntity(var3, "mob.ghast.fireball", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 0.8F));
+ this.notchwave = new EntityNotchWave(var2, var3);
+ var2.spawnEntityInWorld(this.notchwave);
+ } else if (Aether.getServerPlayer(var3).setGeneralCooldown(200, var1.getDisplayName()))
+ {
+ if (Aether.proxy.getClientPlayer() != null)
+ {
+ Aether.getClientPlayer(Aether.proxy.getClientPlayer()).updateGeneralCooldown();
+ }
+
+ var1.damageItem(1, var3);
+ var2.playSoundAtEntity(var3, "mob.ghast.fireball", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 0.8F));
+ this.notchwave = new EntityNotchWave(var2, var3);
+ var2.spawnEntityInWorld(this.notchwave);
+ }
+
+ return var1;
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemHealingStone.java b/src/main/java/net/aetherteam/aether/items/ItemHealingStone.java
new file mode 100644
index 0000000..e4e0fb3
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemHealingStone.java
@@ -0,0 +1,29 @@
+package net.aetherteam.aether.items;
+
+import java.util.List;
+
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.ItemAppleGold;
+import net.minecraft.item.ItemStack;
+
+public class ItemHealingStone extends ItemAppleGold
+{
+ public ItemHealingStone(int var1, int var2, float var3, boolean var4)
+ {
+ super(var1, var2, var3, var4);
+ }
+
+ /**
+ * returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
+ */
+ public void getSubItems(int var1, CreativeTabs var2, List var3)
+ {
+ var3.add(new ItemStack(var1, 1, 0));
+ }
+
+ public ItemAppleGold setIconName(String var1)
+ {
+ this.setUnlocalizedName("Aether:" + var1);
+ return this;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemHolystoneAxe.java b/src/main/java/net/aetherteam/aether/items/ItemHolystoneAxe.java
new file mode 100644
index 0000000..4d25021
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemHolystoneAxe.java
@@ -0,0 +1,35 @@
+package net.aetherteam.aether.items;
+
+import java.util.Random;
+
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.item.EnumToolMaterial;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemAxe;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
+public class ItemHolystoneAxe extends ItemAxe
+{
+ private static Random random = new Random();
+
+ protected ItemHolystoneAxe(int var1, EnumToolMaterial var2)
+ {
+ super(var1, var2);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ public boolean onBlockDestroyed(ItemStack var1, World var2, int var3, int var4, int var5, int var6, EntityLiving var7)
+ {
+ if (random.nextInt(50) == 0)
+ {
+ var7.dropItemWithOffset(AetherItems.AmbrosiumShard.itemID, 1, 0.0F);
+ }
+
+ return super.onBlockDestroyed(var1, var2, var3, var4, var5, var6, var7);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemHolystonePickaxe.java b/src/main/java/net/aetherteam/aether/items/ItemHolystonePickaxe.java
new file mode 100644
index 0000000..9ed310c
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemHolystonePickaxe.java
@@ -0,0 +1,38 @@
+package net.aetherteam.aether.items;
+
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.minecraft.block.Block;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.item.EnumToolMaterial;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemPickaxe;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
+public class ItemHolystonePickaxe extends ItemPickaxe
+{
+ private static Random random = new Random();
+ public static final Block[] blocksEffectiveAgainst = new Block[]{Block.cobblestone, Block.stoneDoubleSlab, Block.stoneSingleSlab, Block.stone, Block.sandStone, Block.cobblestoneMossy, Block.oreIron, Block.blockIron, Block.oreCoal, Block.blockGold, Block.oreGold, Block.oreDiamond, Block.blockDiamond, Block.ice, Block.netherrack, Block.oreLapis, Block.blockLapis, Block.oreRedstone, Block.oreRedstoneGlowing, Block.rail, Block.railDetector, Block.railPowered, Block.railActivator, AetherBlocks.Holystone, AetherBlocks.HolystoneBrick, AetherBlocks.HolystoneStairs, AetherBlocks.HolystoneWall};
+
+ protected ItemHolystonePickaxe(int var1, EnumToolMaterial var2)
+ {
+ super(var1, var2);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ public boolean onBlockDestroyed(ItemStack var1, World var2, int var3, int var4, int var5, int var6, EntityLiving var7)
+ {
+ if (random.nextInt(20) == 0 && !var2.isRemote)
+ {
+ var7.dropItemWithOffset(AetherItems.AmbrosiumShard.itemID, 1, 0.0F);
+ }
+
+ return super.onBlockDestroyed(var1, var2, var3, var4, var5, var6, var7);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemHolystoneShovel.java b/src/main/java/net/aetherteam/aether/items/ItemHolystoneShovel.java
new file mode 100644
index 0000000..3417627
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemHolystoneShovel.java
@@ -0,0 +1,55 @@
+package net.aetherteam.aether.items;
+
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.minecraft.block.Block;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.item.EnumToolMaterial;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemSpade;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
+public class ItemHolystoneShovel extends ItemSpade
+{
+ private static Random random = new Random();
+ public static final Block[] blocksEffectiveAgainst = new Block[]{Block.grass, Block.dirt, Block.sand, Block.gravel, Block.snow, Block.blockSnow, Block.blockClay, Block.tilledField, Block.slowSand, Block.mycelium, AetherBlocks.AetherDirt, AetherBlocks.AetherGrass};
+
+ public ItemHolystoneShovel(int var1, EnumToolMaterial var2)
+ {
+ super(var1, var2);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ public boolean onBlockDestroyed(ItemStack var1, World var2, int var3, int var4, int var5, int var6, EntityLiving var7)
+ {
+ if (random.nextInt(20) == 0 && !var2.isRemote)
+ {
+ var7.dropItemWithOffset(AetherItems.AmbrosiumShard.itemID, 1, 0.0F);
+ }
+
+ return super.onBlockDestroyed(var1, var2, var3, var4, var5, var6, var7);
+ }
+
+ /**
+ * Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
+ * sword
+ */
+ public float getStrVsBlock(ItemStack var1, Block var2)
+ {
+ for (int var3 = 0; var3 < blocksEffectiveAgainst.length; ++var3)
+ {
+ if (blocksEffectiveAgainst[var3] == var2)
+ {
+ return this.efficiencyOnProperMaterial;
+ }
+ }
+
+ return 1.0F;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemHolystoneSword.java b/src/main/java/net/aetherteam/aether/items/ItemHolystoneSword.java
new file mode 100644
index 0000000..0705c3a
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemHolystoneSword.java
@@ -0,0 +1,43 @@
+package net.aetherteam.aether.items;
+
+import java.util.Random;
+
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.EnumToolMaterial;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.item.ItemSword;
+
+public class ItemHolystoneSword extends ItemSword
+{
+ public ItemHolystoneSword(int var1, EnumToolMaterial var2)
+ {
+ super(var1, var2);
+ }
+
+ /**
+ * Current implementations of this method in child classes do not use the entry argument beside ev. They just raise
+ * the damage on the stack.
+ */
+ public boolean hitEntity(ItemStack var1, EntityLiving var2, EntityLiving var3)
+ {
+ if ((new Random()).nextInt(20) == 0 && var3 != null && var3 instanceof EntityPlayer && var2.hurtTime > 0 && var2.deathTime <= 0)
+ {
+ if (!var2.worldObj.isRemote)
+ {
+ var2.dropItemWithOffset(AetherItems.AmbrosiumShard.itemID, 1, 0.0F);
+ }
+
+ var1.damageItem(1, var3);
+ }
+
+ var1.damageItem(1, var3);
+ return true;
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemIceAccessory.java b/src/main/java/net/aetherteam/aether/items/ItemIceAccessory.java
new file mode 100644
index 0000000..f9ee3d9
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemIceAccessory.java
@@ -0,0 +1,227 @@
+package net.aetherteam.aether.items;
+
+import net.aetherteam.aether.PlayerBaseAetherServer;
+import net.aetherteam.aether.client.PlayerBaseAetherClient;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.MathHelper;
+
+public class ItemIceAccessory extends ItemAccessory
+{
+ public ItemIceAccessory(int var1, int var2, int var3, int var4)
+ {
+ super(var1, var2, var3, var4, 16777215);
+ }
+
+ public ItemIceAccessory(int var1, int var2, String var3, int var4)
+ {
+ super(var1, var2, 0, var4);
+ this.texture = var3;
+ }
+
+ public ItemIceAccessory(int var1, int var2, String var3, int var4, int var5)
+ {
+ super(var1, var2, 0, var4, var5);
+ this.texture = var3;
+ }
+
+ public ItemIceAccessory(int var1, int var2, String var3, int var4, int var5, boolean var6)
+ {
+ super(var1, var2, var3, var4, var5);
+ this.colouriseRender = var6;
+ }
+
+ public void activateServerPassive(EntityPlayer var1, PlayerBaseAetherServer var2)
+ {
+ int var3 = MathHelper.floor_double(var1.posX);
+ int var4 = MathHelper.floor_double(var1.boundingBox.minY);
+ int var5 = MathHelper.floor_double(var1.posZ);
+ double var10000 = var1.posY - (double) var4;
+ var1.worldObj.getBlockMaterial(var3, var4, var5);
+ var1.worldObj.getBlockMaterial(var3, var4 - 1, var5);
+
+ for (int var10 = var3 - 1; var10 <= var3 + 1; ++var10)
+ {
+ for (int var11 = var4 - 1; var11 <= var4 + 1; ++var11)
+ {
+ for (int var12 = var5 - 1; var12 <= var5 + 1; ++var12)
+ {
+ if (var1.worldObj.getBlockId(var10, var11, var12) == 8)
+ {
+ if (var1.worldObj.getBlockMetadata(var10, var11, var12) == 0)
+ {
+ var1.worldObj.setBlock(var10, var11, var12, 79);
+ } else
+ {
+ var1.worldObj.setBlock(var10, var11, var12, 0);
+ }
+
+ if (var2.getSlotStack(this.itemID) != null)
+ {
+ var2.getSlotStack(this.itemID).damageItem(1, var1);
+
+ if (var2.getSlotStack(this.itemID).stackSize < 1)
+ {
+ var2.setSlotStack(var2.getSlotIndex(this.itemID), (ItemStack) null);
+ }
+ }
+ } else if (var1.worldObj.getBlockId(var10, var11, var12) == 9)
+ {
+ if (var1.worldObj.getBlockMetadata(var10, var11, var12) == 0)
+ {
+ var1.worldObj.setBlock(var10, var11, var12, 79);
+ } else
+ {
+ var1.worldObj.setBlock(var10, var11, var12, 0);
+ }
+
+ if (var2.getSlotStack(this.itemID) != null)
+ {
+ var2.getSlotStack(this.itemID).damageItem(1, var1);
+
+ if (var2.getSlotStack(this.itemID).stackSize < 1)
+ {
+ var2.setSlotStack(var2.getSlotIndex(this.itemID), (ItemStack) null);
+ }
+ }
+ } else if (var1.worldObj.getBlockId(var10, var11, var12) == 10)
+ {
+ if (var1.worldObj.getBlockMetadata(var10, var11, var12) == 0)
+ {
+ var1.worldObj.setBlock(var10, var11, var12, 49);
+ } else
+ {
+ var1.worldObj.setBlock(var10, var11, var12, 0);
+ }
+
+ if (var2.getSlotStack(this.itemID) != null)
+ {
+ var2.getSlotStack(this.itemID).damageItem(1, var1);
+
+ if (var2.getSlotStack(this.itemID).stackSize < 1)
+ {
+ var2.setSlotStack(var2.getSlotIndex(this.itemID), (ItemStack) null);
+ }
+ }
+ } else if (var1.worldObj.getBlockId(var10, var11, var12) == 11)
+ {
+ if (var1.worldObj.getBlockMetadata(var10, var11, var12) == 0)
+ {
+ var1.worldObj.setBlock(var10, var11, var12, 49);
+ } else
+ {
+ var1.worldObj.setBlock(var10, var11, var12, 0);
+ }
+
+ if (var2.getSlotStack(this.itemID) != null)
+ {
+ var2.getSlotStack(this.itemID).damageItem(1, var1);
+
+ if (var2.getSlotStack(this.itemID).stackSize < 1)
+ {
+ var2.setSlotStack(var2.getSlotIndex(this.itemID), (ItemStack) null);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public void activateClientPassive(EntityPlayer var1, PlayerBaseAetherClient var2)
+ {
+ int var3 = MathHelper.floor_double(var1.posX);
+ int var4 = MathHelper.floor_double(var1.boundingBox.minY);
+ int var5 = MathHelper.floor_double(var1.posZ);
+ double var10000 = var1.posY - (double) var4;
+ var1.worldObj.getBlockMaterial(var3, var4, var5);
+ var1.worldObj.getBlockMaterial(var3, var4 - 1, var5);
+
+ for (int var10 = var3 - 1; var10 <= var3 + 1; ++var10)
+ {
+ for (int var11 = var4 - 1; var11 <= var4 + 1; ++var11)
+ {
+ for (int var12 = var5 - 1; var12 <= var5 + 1; ++var12)
+ {
+ if (var1.worldObj.getBlockId(var10, var11, var12) == 8)
+ {
+ if (var1.worldObj.getBlockMetadata(var10, var11, var12) == 0)
+ {
+ var1.worldObj.setBlock(var10, var11, var12, 79);
+ } else
+ {
+ var1.worldObj.setBlock(var10, var11, var12, 0);
+ }
+
+ if (var2.getSlotStack(this.itemID) != null)
+ {
+ var2.getSlotStack(this.itemID).damageItem(1, var1);
+
+ if (var2.getSlotStack(this.itemID).stackSize < 1)
+ {
+ var2.setSlotStack(var2.getSlotIndex(this.itemID), (ItemStack) null);
+ }
+ }
+ } else if (var1.worldObj.getBlockId(var10, var11, var12) == 9)
+ {
+ if (var1.worldObj.getBlockMetadata(var10, var11, var12) == 0)
+ {
+ var1.worldObj.setBlock(var10, var11, var12, 79);
+ } else
+ {
+ var1.worldObj.setBlock(var10, var11, var12, 0);
+ }
+
+ if (var2.getSlotStack(this.itemID) != null)
+ {
+ var2.getSlotStack(this.itemID).damageItem(1, var1);
+
+ if (var2.getSlotStack(this.itemID).stackSize < 1)
+ {
+ var2.setSlotStack(var2.getSlotIndex(this.itemID), (ItemStack) null);
+ }
+ }
+ } else if (var1.worldObj.getBlockId(var10, var11, var12) == 10)
+ {
+ if (var1.worldObj.getBlockMetadata(var10, var11, var12) == 0)
+ {
+ var1.worldObj.setBlock(var10, var11, var12, 49);
+ } else
+ {
+ var1.worldObj.setBlock(var10, var11, var12, 0);
+ }
+
+ if (var2.getSlotStack(this.itemID) != null)
+ {
+ var2.getSlotStack(this.itemID).damageItem(1, var1);
+
+ if (var2.getSlotStack(this.itemID).stackSize < 1)
+ {
+ var2.setSlotStack(var2.getSlotIndex(this.itemID), (ItemStack) null);
+ }
+ }
+ } else if (var1.worldObj.getBlockId(var10, var11, var12) == 11)
+ {
+ if (var1.worldObj.getBlockMetadata(var10, var11, var12) == 0)
+ {
+ var1.worldObj.setBlock(var10, var11, var12, 49);
+ } else
+ {
+ var1.worldObj.setBlock(var10, var11, var12, 0);
+ }
+
+ if (var2.getSlotStack(this.itemID) != null)
+ {
+ var2.getSlotStack(this.itemID).damageItem(1, var1);
+
+ if (var2.getSlotStack(this.itemID).stackSize < 1)
+ {
+ var2.setSlotStack(var2.getSlotIndex(this.itemID), (ItemStack) null);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemInvisibilityCloak.java b/src/main/java/net/aetherteam/aether/items/ItemInvisibilityCloak.java
new file mode 100644
index 0000000..87928ef
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemInvisibilityCloak.java
@@ -0,0 +1,36 @@
+package net.aetherteam.aether.items;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.potion.Potion;
+import net.minecraft.potion.PotionEffect;
+
+public class ItemInvisibilityCloak extends ItemAccessory
+{
+ public ItemInvisibilityCloak(int var1, int var2, int var3, int var4)
+ {
+ super(var1, var2, var3, var4, 16777215);
+ }
+
+ public ItemInvisibilityCloak(int var1, int var2, String var3, int var4)
+ {
+ super(var1, var2, 0, var4);
+ this.texture = var3;
+ }
+
+ public ItemInvisibilityCloak(int var1, int var2, String var3, int var4, int var5)
+ {
+ super(var1, var2, 0, var4, var5);
+ this.texture = var3;
+ }
+
+ public ItemInvisibilityCloak(int var1, int var2, String var3, int var4, int var5, boolean var6)
+ {
+ super(var1, var2, var3, var4, var5);
+ this.colouriseRender = var6;
+ }
+
+ public void activatePassive(EntityPlayer var1)
+ {
+ var1.addPotionEffect(new PotionEffect(Potion.invisibility.id, 10, 0));
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemIronBubble.java b/src/main/java/net/aetherteam/aether/items/ItemIronBubble.java
new file mode 100644
index 0000000..45d4b13
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemIronBubble.java
@@ -0,0 +1,41 @@
+package net.aetherteam.aether.items;
+
+import net.aetherteam.aether.PlayerBaseAetherServer;
+import net.aetherteam.aether.client.PlayerBaseAetherClient;
+import net.minecraft.entity.player.EntityPlayer;
+
+public class ItemIronBubble extends ItemAccessory
+{
+ public ItemIronBubble(int var1, int var2, int var3, int var4)
+ {
+ super(var1, var2, var3, var4, 16777215);
+ }
+
+ public ItemIronBubble(int var1, int var2, String var3, int var4)
+ {
+ super(var1, var2, 0, var4);
+ this.texture = var3;
+ }
+
+ public ItemIronBubble(int var1, int var2, String var3, int var4, int var5)
+ {
+ super(var1, var2, 0, var4, var5);
+ this.texture = var3;
+ }
+
+ public ItemIronBubble(int var1, int var2, String var3, int var4, int var5, boolean var6)
+ {
+ super(var1, var2, var3, var4, var5);
+ this.colouriseRender = var6;
+ }
+
+ public void activateServerPassive(EntityPlayer var1, PlayerBaseAetherServer var2)
+ {
+ var1.setAir(0);
+ }
+
+ public void activateClientPassive(EntityPlayer var1, PlayerBaseAetherClient var2)
+ {
+ var1.setAir(0);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemLightningKnife.java b/src/main/java/net/aetherteam/aether/items/ItemLightningKnife.java
new file mode 100644
index 0000000..1f71277
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemLightningKnife.java
@@ -0,0 +1,31 @@
+package net.aetherteam.aether.items;
+
+import net.aetherteam.aether.entities.EntityLightningKnife;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
+public class ItemLightningKnife extends ItemAether
+{
+ public ItemLightningKnife(int var1)
+ {
+ super(var1);
+ this.maxStackSize = 16;
+ }
+
+ /**
+ * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
+ */
+ public ItemStack onItemRightClick(ItemStack var1, World var2, EntityPlayer var3)
+ {
+ --var1.stackSize;
+ var2.playSoundAtEntity(var3, "mob.aether.dartshoot", 2.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 0.8F));
+
+ if (!var2.isRemote)
+ {
+ var2.spawnEntityInWorld(new EntityLightningKnife(var2, var3));
+ }
+
+ return var1;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemLoreBook.java b/src/main/java/net/aetherteam/aether/items/ItemLoreBook.java
new file mode 100644
index 0000000..a38151d
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemLoreBook.java
@@ -0,0 +1,65 @@
+package net.aetherteam.aether.items;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.ArrayList;
+
+import net.aetherteam.aether.client.gui.GuiLore;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.src.ModLoader;
+import net.minecraft.util.Icon;
+import net.minecraft.world.World;
+
+public class ItemLoreBook extends ItemAether
+{
+ public static final String[] names = new String[]{"Golden Gummie Swet", "Blue Gummie Swet"};
+ @SideOnly(Side.CLIENT)
+ private Icon[] icons;
+
+ public ItemLoreBook(int var1)
+ {
+ super(var1);
+ this.maxStackSize = 1;
+ this.setHasSubtypes(true);
+ this.setMaxDamage(0);
+ }
+
+ public void addCreativeItems(ArrayList var1)
+ {
+ var1.add(new ItemStack(this, 1, 0));
+ var1.add(new ItemStack(this, 1, 1));
+ var1.add(new ItemStack(this, 1, 2));
+ }
+
+ public int getColorFromDamage(int var1, int var2)
+ {
+ return var1 == 0 ? 8388479 : (var1 == 1 ? 16744319 : 8355839);
+ }
+
+ /**
+ * Returns the unlocalized name of this item. This version accepts an ItemStack so different stacks can have
+ * different names based on their damage or NBT.
+ */
+ public String getUnlocalizedName(ItemStack var1)
+ {
+ int var2 = var1.getItemDamage();
+
+ if (var2 > 2)
+ {
+ var2 = 2;
+ }
+
+ return super.getUnlocalizedName() + "." + var2;
+ }
+
+ /**
+ * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
+ */
+ public ItemStack onItemRightClick(ItemStack var1, World var2, EntityPlayer var3)
+ {
+ ModLoader.openGUI(var3, new GuiLore(var3.inventory, var3, var1.getItemDamage()));
+ return var1;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemMoaEgg.java b/src/main/java/net/aetherteam/aether/items/ItemMoaEgg.java
new file mode 100644
index 0000000..6fc216f
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemMoaEgg.java
@@ -0,0 +1,48 @@
+package net.aetherteam.aether.items;
+
+import java.util.List;
+
+import net.aetherteam.aether.AetherMoaColour;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.ItemStack;
+
+public class ItemMoaEgg extends ItemAether
+{
+ protected ItemMoaEgg(int var1)
+ {
+ super(var1);
+ this.setHasSubtypes(true);
+ }
+
+ /**
+ * returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
+ */
+ public void getSubItems(int var1, CreativeTabs var2, List var3)
+ {
+ for (int var4 = 0; var4 < AetherMoaColour.colours.size(); ++var4)
+ {
+ var3.add(new ItemStack(var1, 1, var4));
+ }
+ }
+
+ public int getColorFromItemStack(ItemStack var1, int var2)
+ {
+ return AetherMoaColour.getColour(var1.getItemDamage()).colour;
+ }
+
+ /**
+ * Returns the unlocalized name of this item. This version accepts an ItemStack so different stacks can have
+ * different names based on their damage or NBT.
+ */
+ public String getUnlocalizedName(ItemStack var1)
+ {
+ int var2 = var1.getItemDamage();
+
+ if (var2 > AetherMoaColour.colours.size() - 1)
+ {
+ var2 = AetherMoaColour.colours.size() - 1;
+ }
+
+ return this.getUnlocalizedName() + var2;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemMoreArmor.java b/src/main/java/net/aetherteam/aether/items/ItemMoreArmor.java
new file mode 100644
index 0000000..95aa1ae
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemMoreArmor.java
@@ -0,0 +1,89 @@
+package net.aetherteam.aether.items;
+
+import net.minecraft.item.ItemStack;
+
+public class ItemMoreArmor extends ItemAether implements net.aetherteam.aether.interfaces.AEItem
+{
+ public int itemColour;
+ public final int armorLevel;
+ public final int armorType;
+ public final int damageReduceAmount;
+ public final int renderIndex;
+ public String texture;
+ public boolean colouriseRender;
+ private static final int[] damageReduceAmountArray = new int[]{3, 8, 6, 3, 0, 1, 0, 0, 0, 0, 2, 0};
+ private static final int[] maxDamageArray = new int[]{11, 16, 15, 13, 10, 10, 8, 10, 10, 10, 10, 10};
+
+ protected ItemMoreArmor(int var1, int var2, int var3, int var4, int var5)
+ {
+ super(var1);
+ this.itemColour = 16777215;
+ this.armorLevel = var2;
+ this.armorType = var4;
+ this.renderIndex = var3;
+ this.damageReduceAmount = damageReduceAmountArray[var4];
+ this.setMaxDamage(maxDamageArray[var4] * 3 << var2);
+ this.maxStackSize = 1;
+ this.itemColour = var5;
+ this.colouriseRender = true;
+ this.texture = "/armor/Accessories.png";
+ }
+
+ public ItemMoreArmor(int var1, int var2, int var3, int var4)
+ {
+ this(var1, var2, var3, var4, 16777215);
+ }
+
+ public ItemMoreArmor(int var1, int var2, String var3, int var4)
+ {
+ this(var1, var2, 0, var4);
+ this.texture = var3;
+ }
+
+ public ItemMoreArmor(int var1, int var2, String var3, int var4, int var5)
+ {
+ this(var1, var2, 0, var4, var5);
+ this.texture = var3;
+ }
+
+ public ItemMoreArmor(int var1, int var2, String var3, int var4, int var5, boolean var6)
+ {
+ this(var1, var2, var3, var4, var5);
+ this.colouriseRender = var6;
+ }
+
+ public int getColorFromItemStack(ItemStack var1, int var2)
+ {
+ return this.itemColour;
+ }
+
+ public Class annotationType()
+ {
+ return null;
+ }
+
+ public String name()
+ {
+ return null;
+ }
+
+ public String[] names()
+ {
+ return null;
+ }
+
+ public boolean isTypeValid(int var1)
+ {
+ return var1 == this.armorType ? true : ((var1 == 8 || var1 == 9) && (this.armorType == 8 || this.armorType == 9) ? true : (var1 == 7 || var1 == 11) && (this.armorType == 7 || this.armorType == 11));
+ }
+
+ public boolean damageType()
+ {
+ return this.damageType(this.armorType);
+ }
+
+ public boolean damageType(int var1)
+ {
+ return var1 < 4 || var1 == 6 || var1 == 10;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemNeptuneArmor.java b/src/main/java/net/aetherteam/aether/items/ItemNeptuneArmor.java
new file mode 100644
index 0000000..9defef9
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemNeptuneArmor.java
@@ -0,0 +1,35 @@
+package net.aetherteam.aether.items;
+
+import net.minecraft.item.EnumArmorMaterial;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemArmor;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.common.IArmorTextureProvider;
+
+public class ItemNeptuneArmor extends ItemArmor implements IArmorTextureProvider
+{
+ private int colour;
+ public String armorName;
+
+ public ItemNeptuneArmor(int var1, EnumArmorMaterial var2, int var3, int var4, int var5, String var6)
+ {
+ super(var1, var2, var3, var4);
+ this.colour = var5;
+ this.armorName = var6;
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ public int getColorFromItemStack(ItemStack var1, int var2)
+ {
+ return this.colour;
+ }
+
+ public String getArmorTextureFile(ItemStack var1)
+ {
+ return var1.getItemName().contains(" Leggings") ? "/net/aetherteam/aether/client/sprites/armor/" + this.armorName + "_2.png" : "/net/aetherteam/aether/client/sprites/armor/" + this.armorName + "_1.png";
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemOrangeSeeds.java b/src/main/java/net/aetherteam/aether/items/ItemOrangeSeeds.java
new file mode 100644
index 0000000..b179ed6
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemOrangeSeeds.java
@@ -0,0 +1,92 @@
+package net.aetherteam.aether.items;
+
+import net.minecraft.block.Block;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
+public class ItemOrangeSeeds extends ItemAether
+{
+ public static int spawnID;
+
+ public ItemOrangeSeeds(int var1, int var2)
+ {
+ super(var1);
+ spawnID = var2;
+ }
+
+ /**
+ * Callback for item usage. If the item does something special on right clicking, he will have one of those. Return
+ * True if something happen and false if it don't. This is for ITEMS, not BLOCKS
+ */
+ public boolean onItemUse(ItemStack var1, EntityPlayer var2, World var3, int var4, int var5, int var6, int var7, float var8, float var9, float var10)
+ {
+ int var11 = var3.getBlockId(var4, var5, var6);
+
+ if (var11 == Block.snow.blockID && (var3.getBlockMetadata(var4, var5, var6) & 7) < 1)
+ {
+ var7 = 1;
+ } else if (var11 != Block.vine.blockID && var11 != Block.tallGrass.blockID && var11 != Block.deadBush.blockID)
+ {
+ if (var7 == 0)
+ {
+ --var5;
+ }
+
+ if (var7 == 1)
+ {
+ ++var5;
+ }
+
+ if (var7 == 2)
+ {
+ --var6;
+ }
+
+ if (var7 == 3)
+ {
+ ++var6;
+ }
+
+ if (var7 == 4)
+ {
+ --var4;
+ }
+
+ if (var7 == 5)
+ {
+ ++var4;
+ }
+ }
+
+ if (!var2.canPlayerEdit(var4, var5, var6, var7, var1))
+ {
+ return false;
+ } else if (var1.stackSize == 0)
+ {
+ return false;
+ } else
+ {
+ if (var3.canPlaceEntityOnSide(spawnID, var4, var5, var6, false, var7, (Entity) null, var1))
+ {
+ Block var12 = Block.blocksList[spawnID];
+ int var13 = var12.onBlockPlaced(var3, var4, var5, var6, var7, var8, var9, var10, 0);
+
+ if (var3.setBlock(var4, var5, var6, spawnID, var13, 3))
+ {
+ if (var3.getBlockId(var4, var5, var6) == spawnID)
+ {
+ Block.blocksList[spawnID].onBlockPlacedBy(var3, var4, var5, var6, var2, var1);
+ Block.blocksList[spawnID].onPostBlockPlaced(var3, var4, var5, var6, var13);
+ }
+
+ var3.playSoundEffect((double) ((float) var4 + 0.5F), (double) ((float) var5 + 0.5F), (double) ((float) var6 + 0.5F), var12.stepSound.getPlaceSound(), (var12.stepSound.getVolume() + 1.0F) / 2.0F, var12.stepSound.getPitch() * 0.8F);
+ --var1.stackSize;
+ }
+ }
+
+ return true;
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemPigSlayer.java b/src/main/java/net/aetherteam/aether/items/ItemPigSlayer.java
new file mode 100644
index 0000000..44d2bc4
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemPigSlayer.java
@@ -0,0 +1,81 @@
+package net.aetherteam.aether.items;
+
+import java.util.Random;
+
+import net.minecraft.enchantment.EnchantmentHelper;
+import net.minecraft.entity.EntityList;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.EnumToolMaterial;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.item.ItemSword;
+import net.minecraft.util.DamageSource;
+
+public class ItemPigSlayer extends ItemSword
+{
+ Random rand = new Random();
+
+ public ItemPigSlayer(int var1)
+ {
+ super(var1, EnumToolMaterial.IRON);
+ this.setMaxDamage(0);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Current implementations of this method in child classes do not use the entry argument beside ev. They just raise
+ * the damage on the stack.
+ */
+ public boolean hitEntity(ItemStack var1, EntityLiving var2, EntityLiving var3)
+ {
+ if (var2 != null && var3 != null)
+ {
+ String var4 = EntityList.getEntityString(var2);
+
+ if (var4 != null && !var4.equals("") && (var4.toLowerCase().contains("pig") || var4.toLowerCase().contains("phyg")))
+ {
+ if (var2.getHealth() > 0)
+ {
+ var2.setEntityHealth(1);
+ var2.hurtTime = 0;
+ var2.attackEntityFrom(DamageSource.causeMobDamage(var3), 9999);
+ }
+
+ int var5;
+
+ for (var5 = 0; var5 < 20; ++var5)
+ {
+ double var6 = this.rand.nextGaussian() * 0.02D;
+ double var8 = this.rand.nextGaussian() * 0.02D;
+ double var10 = this.rand.nextGaussian() * 0.02D;
+ double var12 = 5.0D;
+ var2.worldObj.spawnParticle("flame", var2.posX + (double) (this.rand.nextFloat() * var2.width * 2.0F) - (double) var2.width - var6 * var12, var2.posY + (double) (this.rand.nextFloat() * var2.height) - var8 * var12, var2.posZ + (double) (this.rand.nextFloat() * var2.width * 2.0F) - (double) var2.width - var10 * var12, var6, var8, var10);
+ }
+
+ boolean var14 = false;
+
+ if (var3 instanceof EntityPlayer)
+ {
+ var5 = EnchantmentHelper.getLootingModifier(var3);
+ }
+
+ var2.isDead = true;
+ }
+
+ return true;
+ } else
+ {
+ return false;
+ }
+ }
+
+ public boolean onBlockDestroyed(ItemStack var1, int var2, int var3, int var4, int var5, EntityLiving var6)
+ {
+ return true;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemPoisonCure.java b/src/main/java/net/aetherteam/aether/items/ItemPoisonCure.java
new file mode 100644
index 0000000..db6e9a1
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemPoisonCure.java
@@ -0,0 +1,32 @@
+package net.aetherteam.aether.items;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemFood;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
+public class ItemPoisonCure extends ItemFood
+{
+ public ItemPoisonCure(int var1, int var2, boolean var3)
+ {
+ super(var1, var2, var3);
+ }
+
+ public ItemFood setIconName(String var1)
+ {
+ this.setUnlocalizedName("Aether:" + var1);
+ return this;
+ }
+
+ public void onFoodEaten(ItemStack var1, World var2, EntityPlayer var3)
+ {
+ if (!var2.isRemote)
+ {
+ var3.curePotionEffects(new ItemStack(Item.bucketMilk));
+ }
+
+ --var1.stackSize;
+ var2.playSoundAtEntity(var3, "random.burp", 0.5F, var2.rand.nextFloat() * 0.1F + 0.9F);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemRegenerationStone.java b/src/main/java/net/aetherteam/aether/items/ItemRegenerationStone.java
new file mode 100644
index 0000000..2b14e36
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemRegenerationStone.java
@@ -0,0 +1,53 @@
+package net.aetherteam.aether.items;
+
+import net.aetherteam.aether.PlayerBaseAetherServer;
+import net.aetherteam.aether.client.PlayerBaseAetherClient;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+
+public class ItemRegenerationStone extends ItemAccessory
+{
+ public ItemRegenerationStone(int var1, int var2, int var3, int var4)
+ {
+ super(var1, var2, var3, var4, 16777215);
+ }
+
+ public ItemRegenerationStone(int var1, int var2, String var3, int var4)
+ {
+ super(var1, var2, 0, var4);
+ this.texture = var3;
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ public ItemRegenerationStone(int var1, int var2, String var3, int var4, int var5)
+ {
+ super(var1, var2, 0, var4, var5);
+ this.texture = var3;
+ }
+
+ public ItemRegenerationStone(int var1, int var2, String var3, int var4, int var5, boolean var6)
+ {
+ super(var1, var2, var3, var4, var5);
+ this.colouriseRender = var6;
+ }
+
+ public void activateServerPassive(EntityPlayer var1, PlayerBaseAetherServer var2)
+ {
+ if (var1.ticksExisted % 200 == 0 && var1.getHealth() < var2.maxHealth)
+ {
+ var1.heal(2);
+ }
+ }
+
+ public void activateClientPassive(EntityPlayer var1, PlayerBaseAetherClient var2)
+ {
+ if (var1.ticksExisted % 200 == 0 && var1.getHealth() < var2.maxHealth)
+ {
+ var1.heal(2);
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemShardOfLife.java b/src/main/java/net/aetherteam/aether/items/ItemShardOfLife.java
new file mode 100644
index 0000000..2160274
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemShardOfLife.java
@@ -0,0 +1,35 @@
+package net.aetherteam.aether.items;
+
+import net.aetherteam.aether.Aether;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
+public class ItemShardOfLife extends ItemAether
+{
+ public ItemShardOfLife(int var1)
+ {
+ super(var1);
+ this.maxStackSize = 1;
+ }
+
+ /**
+ * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
+ */
+ public ItemStack onItemRightClick(ItemStack var1, World var2, EntityPlayer var3)
+ {
+ if (Aether.getServerPlayer(var3) == null)
+ {
+ return var1;
+ } else if (Aether.getServerPlayer(var3).maxHealth >= 40)
+ {
+ Aether.proxy.displayMessage(var3, "You cannot add anymore hearts.");
+ return var1;
+ } else
+ {
+ Aether.getServerPlayer(var3).increaseMaxHP(2);
+ --var1.stackSize;
+ return var1;
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemSkyrootAxe.java b/src/main/java/net/aetherteam/aether/items/ItemSkyrootAxe.java
new file mode 100644
index 0000000..5825c17
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemSkyrootAxe.java
@@ -0,0 +1,22 @@
+package net.aetherteam.aether.items;
+
+import java.util.Random;
+
+import net.minecraft.item.EnumToolMaterial;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemAxe;
+
+public class ItemSkyrootAxe extends ItemAxe
+{
+ private static Random random = new Random();
+
+ protected ItemSkyrootAxe(int var1, EnumToolMaterial var2)
+ {
+ super(var1, var2);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemSkyrootBucket.java b/src/main/java/net/aetherteam/aether/items/ItemSkyrootBucket.java
new file mode 100644
index 0000000..6a54e96
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemSkyrootBucket.java
@@ -0,0 +1,211 @@
+package net.aetherteam.aether.items;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.List;
+
+import net.aetherteam.aether.entities.EntityAechorPlant;
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.passive.EntityCow;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.potion.Potion;
+import net.minecraft.potion.PotionEffect;
+import net.minecraft.util.EnumMovingObjectType;
+import net.minecraft.util.Icon;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.MovingObjectPosition;
+import net.minecraft.util.Vec3;
+import net.minecraft.world.World;
+
+public class ItemSkyrootBucket extends ItemAether
+{
+ public static final String[] names = new String[]{"Skyroot Bucket", "Skyroot Milk Bucket", "Skyroot Poison Bucket", "Skyroot Remedy Bucket", "Skyroot Water Bucket"};
+ @SideOnly(Side.CLIENT)
+ private Icon[] icons;
+ private int waterMoving = 4;
+
+ public ItemSkyrootBucket(int var1)
+ {
+ super(var1);
+ this.setHasSubtypes(true);
+ this.maxStackSize = 16;
+ }
+
+ /**
+ * returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
+ */
+ public void getSubItems(int var1, CreativeTabs var2, List var3)
+ {
+ var3.add(new ItemStack(this, 1, 0));
+ var3.add(new ItemStack(this, 1, 1));
+ var3.add(new ItemStack(this, 1, 2));
+ var3.add(new ItemStack(this, 1, 3));
+ var3.add(new ItemStack(this, 1, this.waterMoving));
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Gets an icon index based on an item's damage value
+ */
+ public Icon getIconFromDamage(int var1)
+ {
+ return this.icons[var1];
+ }
+
+ /**
+ * Returns the unlocalized name of this item. This version accepts an ItemStack so different stacks can have
+ * different names based on their damage or NBT.
+ */
+ public String getUnlocalizedName(ItemStack var1)
+ {
+ int var2 = MathHelper.clamp_int(var1.getItemDamage(), 0, names.length - 1);
+ return super.getUnlocalizedName() + "." + names[var2];
+ }
+
+ @SideOnly(Side.CLIENT)
+ public void registerIcons(IconRegister var1)
+ {
+ this.icons = new Icon[names.length];
+
+ for (int var2 = 0; var2 < names.length; ++var2)
+ {
+ this.icons[var2] = var1.registerIcon("Aether:" + names[var2]);
+ }
+ }
+
+ /**
+ * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
+ */
+ public ItemStack onItemRightClick(ItemStack var1, World var2, EntityPlayer var3)
+ {
+ float var4 = 1.0F;
+ float var5 = var3.prevRotationPitch + (var3.rotationPitch - var3.prevRotationPitch) * var4;
+ float var6 = var3.prevRotationYaw + (var3.rotationYaw - var3.prevRotationYaw) * var4;
+ double var7 = var3.prevPosX + (var3.posX - var3.prevPosX) * (double) var4;
+ double var9 = var3.prevPosY + (var3.posY - var3.prevPosY) * (double) var4 + 1.62D - (double) var3.yOffset;
+ double var11 = var3.prevPosZ + (var3.posZ - var3.prevPosZ) * (double) var4;
+ Vec3 var13 = Vec3.createVectorHelper(var7, var9, var11);
+ float var14 = MathHelper.cos(-var6 * 0.01745329F - (float) Math.PI);
+ float var15 = MathHelper.sin(-var6 * 0.01745329F - (float) Math.PI);
+ float var16 = -MathHelper.cos(-var5 * 0.01745329F);
+ float var17 = MathHelper.sin(-var5 * 0.01745329F);
+ float var18 = var15 * var16;
+ float var20 = var14 * var16;
+ double var21 = 5.0D;
+ Vec3 var23 = var13.addVector((double) var18 * var21, (double) var17 * var21, (double) var20 * var21);
+ MovingObjectPosition var24 = var2.rayTraceBlocks_do(var13, var23, var1.getItemDamage() == 0);
+
+ if (var1.getItemDamage() == 2 && (var24 == null || var24.entityHit == null || !(var24.entityHit instanceof EntityAechorPlant)))
+ {
+ if (!var2.isRemote)
+ {
+ var3.addPotionEffect(new PotionEffect(Potion.poison.id, 200, 0));
+ var3.addPotionEffect(new PotionEffect(Potion.confusion.id, 200, 3));
+ }
+
+ var1.setItemDamage(0);
+ return var1;
+ } else if (var1.getItemDamage() == 3)
+ {
+ if (!var2.isRemote)
+ {
+ var3.curePotionEffects(new ItemStack(Item.bucketMilk));
+ }
+
+ return new ItemStack(AetherItems.SkyrootBucket);
+ } else
+ {
+ if (var24 != null && var24.typeOfHit == EnumMovingObjectType.TILE && (var1.getItemDamage() == 0 || var1.getItemDamage() == this.waterMoving))
+ {
+ int var25 = var24.blockX;
+ int var26 = var24.blockY;
+ int var27 = var24.blockZ;
+
+ if (!var2.canMineBlock(var3, var25, var26, var27))
+ {
+ return var1;
+ }
+
+ if (var1.getItemDamage() == 0)
+ {
+ if (var2.getBlockMaterial(var25, var26, var27) == Material.water && var2.getBlockMetadata(var25, var26, var27) == 0)
+ {
+ var2.setBlock(var25, var26, var27, 0);
+ var1.setItemDamage(this.waterMoving);
+ return var1;
+ }
+ } else
+ {
+ if (var1.getItemDamage() <= 3 && var1.getItemDamage() != 0)
+ {
+ return new ItemStack(AetherItems.SkyrootBucket);
+ }
+
+ if (var24.sideHit == 0)
+ {
+ --var26;
+ }
+
+ if (var24.sideHit == 1)
+ {
+ ++var26;
+ }
+
+ if (var24.sideHit == 2)
+ {
+ --var27;
+ }
+
+ if (var24.sideHit == 3)
+ {
+ ++var27;
+ }
+
+ if (var24.sideHit == 4)
+ {
+ --var25;
+ }
+
+ if (var24.sideHit == 5)
+ {
+ ++var25;
+ }
+
+ if (var2.isAirBlock(var25, var26, var27) || !var2.getBlockMaterial(var25, var26, var27).isSolid())
+ {
+ if (var2.provider.isHellWorld && var1.getItemDamage() == this.waterMoving)
+ {
+ var2.playSoundEffect(var7 + 0.5D, var9 + 0.5D, var11 + 0.5D, "random.fizz", 0.5F, 2.6F + (var2.rand.nextFloat() - var2.rand.nextFloat()) * 0.8F);
+
+ for (int var28 = 0; var28 < 8; ++var28)
+ {
+ var2.spawnParticle("largesmoke", (double) var25 + Math.random(), (double) var26 + Math.random(), (double) var27 + Math.random(), 0.0D, 0.0D, 0.0D);
+ }
+ } else
+ {
+ var2.setBlock(var25, var26, var27, Block.waterMoving.blockID, 0, 4);
+ }
+
+ return new ItemStack(AetherItems.SkyrootBucket);
+ }
+ }
+ } else if (var1.getItemDamage() == 0 && var24 != null && var24.entityHit != null && var24.entityHit instanceof EntityCow)
+ {
+ var1.setItemDamage(1);
+ return var1;
+ }
+
+ return var1;
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemSkyrootPickaxe.java b/src/main/java/net/aetherteam/aether/items/ItemSkyrootPickaxe.java
new file mode 100644
index 0000000..f51ab07
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemSkyrootPickaxe.java
@@ -0,0 +1,22 @@
+package net.aetherteam.aether.items;
+
+import java.util.Random;
+
+import net.minecraft.item.EnumToolMaterial;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemPickaxe;
+
+public class ItemSkyrootPickaxe extends ItemPickaxe
+{
+ private static Random random = new Random();
+
+ protected ItemSkyrootPickaxe(int var1, EnumToolMaterial var2)
+ {
+ super(var1, var2);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemSkyrootShovel.java b/src/main/java/net/aetherteam/aether/items/ItemSkyrootShovel.java
new file mode 100644
index 0000000..753c338
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemSkyrootShovel.java
@@ -0,0 +1,43 @@
+package net.aetherteam.aether.items;
+
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.minecraft.block.Block;
+import net.minecraft.item.EnumToolMaterial;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemSpade;
+import net.minecraft.item.ItemStack;
+
+public class ItemSkyrootShovel extends ItemSpade
+{
+ private static Random random = new Random();
+ public static final Block[] blocksEffectiveAgainst = new Block[]{Block.grass, Block.dirt, Block.sand, Block.gravel, Block.snow, Block.blockSnow, Block.blockClay, Block.tilledField, Block.slowSand, Block.mycelium, AetherBlocks.AetherDirt, AetherBlocks.AetherGrass};
+
+ public ItemSkyrootShovel(int var1, EnumToolMaterial var2)
+ {
+ super(var1, var2);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
+ * sword
+ */
+ public float getStrVsBlock(ItemStack var1, Block var2)
+ {
+ for (int var3 = 0; var3 < blocksEffectiveAgainst.length; ++var3)
+ {
+ if (blocksEffectiveAgainst[var3] == var2)
+ {
+ return this.efficiencyOnProperMaterial;
+ }
+ }
+
+ return 1.0F;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemSkyrootSword.java b/src/main/java/net/aetherteam/aether/items/ItemSkyrootSword.java
new file mode 100644
index 0000000..c9d4587
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemSkyrootSword.java
@@ -0,0 +1,18 @@
+package net.aetherteam.aether.items;
+
+import net.minecraft.item.EnumToolMaterial;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemSword;
+
+public class ItemSkyrootSword extends ItemSword
+{
+ public ItemSkyrootSword(int var1, EnumToolMaterial var2)
+ {
+ super(var1, var2);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemValkyrieAxe.java b/src/main/java/net/aetherteam/aether/items/ItemValkyrieAxe.java
new file mode 100644
index 0000000..f1f9ff8
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemValkyrieAxe.java
@@ -0,0 +1,125 @@
+package net.aetherteam.aether.items;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Random;
+
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.EnumAction;
+import net.minecraft.item.EnumToolMaterial;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemAxe;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.Vec3;
+import net.minecraft.world.World;
+
+public class ItemValkyrieAxe extends ItemAxe
+{
+ private int weaponDamage = 1;
+ private static Random random = new Random();
+
+ protected ItemValkyrieAxe(int var1, EnumToolMaterial var2)
+ {
+ super(var1, var2);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Returns the damage against a given entity.
+ */
+ public int getDamageVsEntity(Entity var1)
+ {
+ return 0;
+ }
+
+ /**
+ * returns the action that specifies what animation to play when the items is being used
+ */
+ public EnumAction getItemUseAction(ItemStack var1)
+ {
+ return EnumAction.none;
+ }
+
+ /**
+ * Current implementations of this method in child classes do not use the entry argument beside ev. They just raise
+ * the damage on the stack.
+ */
+ public boolean hitEntity(ItemStack var1, EntityLiving var2, EntityLiving var3)
+ {
+ return false;
+ }
+
+ /**
+ * Called each tick as long the item is on a player inventory. Uses by maps to check if is on a player hand and
+ * update it's contents.
+ */
+ public void onUpdate(ItemStack var1, World var2, Entity var3, int var4, boolean var5)
+ {
+ if (var5)
+ {
+ if (var3 instanceof EntityPlayer)
+ {
+ EntityPlayer var6 = (EntityPlayer) var3;
+
+ if (var6.swingProgressInt == -1)
+ {
+ Vec3 var7 = var6.getLookVec();
+ double var8 = 8.0D;
+ AxisAlignedBB var10 = var6.boundingBox.expand(var8, var8, var8);
+ List var11 = var2.getEntitiesWithinAABB(Entity.class, var10);
+ Entity var12 = null;
+ double var13 = 0.0D;
+ Iterator var15 = var11.iterator();
+
+ while (var15.hasNext())
+ {
+ Object var16 = var15.next();
+
+ if (var16 != var6)
+ {
+ Entity var17 = (Entity) var16;
+
+ if (var17.canBeCollidedWith())
+ {
+ Vec3 var18 = Vec3.createVectorHelper(var17.posX - var6.posX, var17.boundingBox.minY + (double) (var17.height / 2.0F) - var6.posY - (double) var6.getEyeHeight(), var17.posZ - var6.posZ);
+ double var19 = var18.lengthVector();
+
+ if (var19 <= var8)
+ {
+ var18 = var18.normalize();
+ double var21 = var7.dotProduct(var18);
+
+ if (var21 >= 1.0D - 0.125D / var19 && var6.canEntityBeSeen(var17) && (var13 == 0.0D || var19 < var13))
+ {
+ var12 = var17;
+ var13 = var19;
+ }
+ }
+ }
+ }
+ }
+
+ if (var12 == null)
+ {
+ return;
+ }
+
+ var12.attackEntityFrom(DamageSource.causePlayerDamage(var6), this.weaponDamage);
+
+ if (var12 instanceof EntityLiving)
+ {
+ var1.damageItem(1, (EntityLiving) var12);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemValkyrieCape.java b/src/main/java/net/aetherteam/aether/items/ItemValkyrieCape.java
new file mode 100644
index 0000000..174024d
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemValkyrieCape.java
@@ -0,0 +1,45 @@
+package net.aetherteam.aether.items;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+
+public class ItemValkyrieCape extends ItemAccessory
+{
+ public ItemValkyrieCape(int var1, int var2, int var3, int var4)
+ {
+ super(var1, var2, var3, var4, 16777215);
+ }
+
+ public ItemValkyrieCape(int var1, int var2, String var3, int var4)
+ {
+ super(var1, var2, 0, var4);
+ this.texture = var3;
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ public ItemValkyrieCape(int var1, int var2, String var3, int var4, int var5)
+ {
+ super(var1, var2, 0, var4, var5);
+ this.texture = var3;
+ }
+
+ public ItemValkyrieCape(int var1, int var2, String var3, int var4, int var5, boolean var6)
+ {
+ super(var1, var2, var3, var4, var5);
+ this.colouriseRender = var6;
+ }
+
+ public void activatePassive(EntityPlayer var1)
+ {
+ if (!var1.onGround && var1.motionY < 0.0D && !var1.isInWater() && !var1.isSneaking())
+ {
+ var1.motionY *= 0.6D;
+ }
+
+ var1.fallDistance = -1.0F;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemValkyrieLance.java b/src/main/java/net/aetherteam/aether/items/ItemValkyrieLance.java
new file mode 100644
index 0000000..14a9f21
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemValkyrieLance.java
@@ -0,0 +1,130 @@
+package net.aetherteam.aether.items;
+
+import java.util.Iterator;
+import java.util.List;
+
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.EnumAction;
+import net.minecraft.item.EnumToolMaterial;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.item.ItemSword;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.Vec3;
+import net.minecraft.world.World;
+
+public class ItemValkyrieLance extends ItemSword
+{
+ private int weaponDamage;
+
+ public ItemValkyrieLance(int var1, EnumToolMaterial var2)
+ {
+ super(var1, var2);
+ this.weaponDamage = 4 + var2.getDamageVsEntity() * 2;
+ }
+
+ /**
+ * Returns the damage against a given entity.
+ */
+ public int getDamageVsEntity(Entity var1)
+ {
+ return 0;
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * returns the action that specifies what animation to play when the items is being used
+ */
+ public EnumAction getItemUseAction(ItemStack var1)
+ {
+ return EnumAction.none;
+ }
+
+ /**
+ * Current implementations of this method in child classes do not use the entry argument beside ev. They just raise
+ * the damage on the stack.
+ */
+ public boolean hitEntity(ItemStack var1, EntityLiving var2, EntityLiving var3)
+ {
+ return false;
+ }
+
+ public boolean onBlockDestroyed(ItemStack var1, int var2, int var3, int var4, int var5, EntityLiving var6)
+ {
+ var1.damageItem(2, var6);
+ return true;
+ }
+
+ /**
+ * Called each tick as long the item is on a player inventory. Uses by maps to check if is on a player hand and
+ * update it's contents.
+ */
+ public void onUpdate(ItemStack var1, World var2, Entity var3, int var4, boolean var5)
+ {
+ if (var5)
+ {
+ if (var3 instanceof EntityPlayer)
+ {
+ EntityPlayer var6 = (EntityPlayer) var3;
+
+ if (var6.swingProgressInt == -1)
+ {
+ Vec3 var7 = var6.getLookVec();
+ double var8 = 8.0D;
+ AxisAlignedBB var10 = var6.boundingBox.expand(var8, var8, var8);
+ List var11 = var2.getEntitiesWithinAABB(Entity.class, var10);
+ Entity var12 = null;
+ double var13 = 0.0D;
+ Iterator var15 = var11.iterator();
+
+ while (var15.hasNext())
+ {
+ Object var16 = var15.next();
+
+ if (var16 != var6)
+ {
+ Entity var17 = (Entity) var16;
+
+ if (var17.canBeCollidedWith())
+ {
+ Vec3 var18 = Vec3.createVectorHelper(var17.posX - var6.posX, var17.boundingBox.minY + (double) (var17.height / 2.0F) - var6.posY - (double) var6.getEyeHeight(), var17.posZ - var6.posZ);
+ double var19 = var18.lengthVector();
+
+ if (var19 <= var8)
+ {
+ var18 = var18.normalize();
+ double var21 = var7.dotProduct(var18);
+
+ if (var21 >= 1.0D - 0.125D / var19 && var6.canEntityBeSeen(var17) && (var13 == 0.0D || var19 < var13))
+ {
+ var12 = var17;
+ var13 = var19;
+ }
+ }
+ }
+ }
+ }
+
+ if (var12 == null)
+ {
+ return;
+ }
+
+ var12.attackEntityFrom(DamageSource.causePlayerDamage(var6), this.weaponDamage);
+
+ if (var12 instanceof EntityLiving)
+ {
+ var1.damageItem(1, (EntityLiving) var12);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemValkyriePickaxe.java b/src/main/java/net/aetherteam/aether/items/ItemValkyriePickaxe.java
new file mode 100644
index 0000000..5059718
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemValkyriePickaxe.java
@@ -0,0 +1,125 @@
+package net.aetherteam.aether.items;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Random;
+
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.EnumAction;
+import net.minecraft.item.EnumToolMaterial;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemPickaxe;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.Vec3;
+import net.minecraft.world.World;
+
+public class ItemValkyriePickaxe extends ItemPickaxe
+{
+ private int weaponDamage = 1;
+ private static Random random = new Random();
+
+ protected ItemValkyriePickaxe(int var1, EnumToolMaterial var2)
+ {
+ super(var1, var2);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Returns the damage against a given entity.
+ */
+ public int getDamageVsEntity(Entity var1)
+ {
+ return 0;
+ }
+
+ /**
+ * returns the action that specifies what animation to play when the items is being used
+ */
+ public EnumAction getItemUseAction(ItemStack var1)
+ {
+ return EnumAction.none;
+ }
+
+ /**
+ * Current implementations of this method in child classes do not use the entry argument beside ev. They just raise
+ * the damage on the stack.
+ */
+ public boolean hitEntity(ItemStack var1, EntityLiving var2, EntityLiving var3)
+ {
+ return false;
+ }
+
+ /**
+ * Called each tick as long the item is on a player inventory. Uses by maps to check if is on a player hand and
+ * update it's contents.
+ */
+ public void onUpdate(ItemStack var1, World var2, Entity var3, int var4, boolean var5)
+ {
+ if (var5)
+ {
+ if (var3 instanceof EntityPlayer)
+ {
+ EntityPlayer var6 = (EntityPlayer) var3;
+
+ if (var6.swingProgressInt == -1)
+ {
+ Vec3 var7 = var6.getLookVec();
+ double var8 = 8.0D;
+ AxisAlignedBB var10 = var6.boundingBox.expand(var8, var8, var8);
+ List var11 = var2.getEntitiesWithinAABB(Entity.class, var10);
+ Entity var12 = null;
+ double var13 = 0.0D;
+ Iterator var15 = var11.iterator();
+
+ while (var15.hasNext())
+ {
+ Object var16 = var15.next();
+
+ if (var16 != var6)
+ {
+ Entity var17 = (Entity) var16;
+
+ if (var17.canBeCollidedWith())
+ {
+ Vec3 var18 = Vec3.createVectorHelper(var17.posX - var6.posX, var17.boundingBox.minY + (double) (var17.height / 2.0F) - var6.posY - (double) var6.getEyeHeight(), var17.posZ - var6.posZ);
+ double var19 = var18.lengthVector();
+
+ if (var19 <= var8)
+ {
+ var18 = var18.normalize();
+ double var21 = var7.dotProduct(var18);
+
+ if (var21 >= 1.0D - 0.125D / var19 && var6.canEntityBeSeen(var17) && (var13 == 0.0D || var19 < var13))
+ {
+ var12 = var17;
+ var13 = var19;
+ }
+ }
+ }
+ }
+ }
+
+ if (var12 == null)
+ {
+ return;
+ }
+
+ var12.attackEntityFrom(DamageSource.causePlayerDamage(var6), this.weaponDamage);
+
+ if (var12 instanceof EntityLiving)
+ {
+ var1.damageItem(1, (EntityLiving) var12);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemValkyrieShovel.java b/src/main/java/net/aetherteam/aether/items/ItemValkyrieShovel.java
new file mode 100644
index 0000000..9ed71a4
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemValkyrieShovel.java
@@ -0,0 +1,125 @@
+package net.aetherteam.aether.items;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Random;
+
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.EnumAction;
+import net.minecraft.item.EnumToolMaterial;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemSpade;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.Vec3;
+import net.minecraft.world.World;
+
+public class ItemValkyrieShovel extends ItemSpade
+{
+ private int weaponDamage = 1;
+ private static Random random = new Random();
+
+ public ItemValkyrieShovel(int var1, EnumToolMaterial var2)
+ {
+ super(var1, var2);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Returns the damage against a given entity.
+ */
+ public int getDamageVsEntity(Entity var1)
+ {
+ return 0;
+ }
+
+ /**
+ * returns the action that specifies what animation to play when the items is being used
+ */
+ public EnumAction getItemUseAction(ItemStack var1)
+ {
+ return EnumAction.none;
+ }
+
+ /**
+ * Current implementations of this method in child classes do not use the entry argument beside ev. They just raise
+ * the damage on the stack.
+ */
+ public boolean hitEntity(ItemStack var1, EntityLiving var2, EntityLiving var3)
+ {
+ return false;
+ }
+
+ /**
+ * Called each tick as long the item is on a player inventory. Uses by maps to check if is on a player hand and
+ * update it's contents.
+ */
+ public void onUpdate(ItemStack var1, World var2, Entity var3, int var4, boolean var5)
+ {
+ if (var5)
+ {
+ if (var3 instanceof EntityPlayer)
+ {
+ EntityPlayer var6 = (EntityPlayer) var3;
+
+ if (var6.swingProgressInt == -1)
+ {
+ Vec3 var7 = var6.getLookVec();
+ double var8 = 8.0D;
+ AxisAlignedBB var10 = var6.boundingBox.expand(var8, var8, var8);
+ List var11 = var2.getEntitiesWithinAABB(Entity.class, var10);
+ Entity var12 = null;
+ double var13 = 0.0D;
+ Iterator var15 = var11.iterator();
+
+ while (var15.hasNext())
+ {
+ Object var16 = var15.next();
+
+ if (var16 != var6)
+ {
+ Entity var17 = (Entity) var16;
+
+ if (var17.canBeCollidedWith())
+ {
+ Vec3 var18 = Vec3.createVectorHelper(var17.posX - var6.posX, var17.boundingBox.minY + (double) (var17.height / 2.0F) - var6.posY - (double) var6.getEyeHeight(), var17.posZ - var6.posZ);
+ double var19 = var18.lengthVector();
+
+ if (var19 <= var8)
+ {
+ var18 = var18.normalize();
+ double var21 = var7.dotProduct(var18);
+
+ if (var21 >= 1.0D - 0.125D / var19 && var6.canEntityBeSeen(var17) && (var13 == 0.0D || var19 < var13))
+ {
+ var12 = var17;
+ var13 = var19;
+ }
+ }
+ }
+ }
+ }
+
+ if (var12 == null)
+ {
+ return;
+ }
+
+ var12.attackEntityFrom(DamageSource.causePlayerDamage(var6), this.weaponDamage);
+
+ if (var12 instanceof EntityLiving)
+ {
+ var1.damageItem(1, (EntityLiving) var12);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemVampireBlade.java b/src/main/java/net/aetherteam/aether/items/ItemVampireBlade.java
new file mode 100644
index 0000000..6e6c004
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemVampireBlade.java
@@ -0,0 +1,86 @@
+package net.aetherteam.aether.items;
+
+import java.util.Random;
+
+import net.aetherteam.aether.Aether;
+import net.minecraft.block.Block;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.EnumToolMaterial;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.item.ItemSword;
+
+public class ItemVampireBlade extends ItemSword
+{
+ private int weaponDamage;
+ private static Random random = new Random();
+
+ public ItemVampireBlade(int var1)
+ {
+ super(var1, EnumToolMaterial.EMERALD);
+ this.maxStackSize = 1;
+ this.setMaxDamage(EnumToolMaterial.EMERALD.getMaxUses());
+ this.weaponDamage = 4 + EnumToolMaterial.EMERALD.getDamageVsEntity() * 2;
+ }
+
+ /**
+ * Returns the damage against a given entity.
+ */
+ public int getDamageVsEntity(Entity var1)
+ {
+ return this.weaponDamage;
+ }
+
+ /**
+ * Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
+ * sword
+ */
+ public float getStrVsBlock(ItemStack var1, Block var2)
+ {
+ return 1.5F;
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Current implementations of this method in child classes do not use the entry argument beside ev. They just raise
+ * the damage on the stack.
+ */
+ public boolean hitEntity(ItemStack var1, EntityLiving var2, EntityLiving var3)
+ {
+ EntityPlayer var4 = (EntityPlayer) var3;
+
+ if (Aether.getServerPlayer(var4) == null)
+ {
+ return true;
+ } else
+ {
+ if (var4.getHealth() < Aether.getServerPlayer(var4).maxHealth && var2.hurtTime > 0 && var2.deathTime <= 0)
+ {
+ var4.heal(1);
+ }
+
+ var1.damageItem(1, var3);
+ return true;
+ }
+ }
+
+ /**
+ * Returns True is the item is renderer in full 3D when hold.
+ */
+ public boolean isFull3D()
+ {
+ return true;
+ }
+
+ public boolean onBlockDestroyed(ItemStack var1, int var2, int var3, int var4, int var5, EntityLiving var6)
+ {
+ var1.damageItem(2, var6);
+ return true;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemZaniteAxe.java b/src/main/java/net/aetherteam/aether/items/ItemZaniteAxe.java
new file mode 100644
index 0000000..d5c01e8
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemZaniteAxe.java
@@ -0,0 +1,29 @@
+package net.aetherteam.aether.items;
+
+import net.minecraft.block.Block;
+import net.minecraft.item.EnumToolMaterial;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemAxe;
+import net.minecraft.item.ItemStack;
+
+public class ItemZaniteAxe extends ItemAxe
+{
+ protected ItemZaniteAxe(int var1, EnumToolMaterial var2)
+ {
+ super(var1, var2);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
+ * sword
+ */
+ public float getStrVsBlock(ItemStack var1, Block var2)
+ {
+ return super.getStrVsBlock(var1, var2) * (2.0F * (float) var1.getItemDamage() / (float) var1.getItem().getMaxDamage() + 0.5F);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemZanitePickaxe.java b/src/main/java/net/aetherteam/aether/items/ItemZanitePickaxe.java
new file mode 100644
index 0000000..3dc86aa
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemZanitePickaxe.java
@@ -0,0 +1,29 @@
+package net.aetherteam.aether.items;
+
+import net.minecraft.block.Block;
+import net.minecraft.item.EnumToolMaterial;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemPickaxe;
+import net.minecraft.item.ItemStack;
+
+public class ItemZanitePickaxe extends ItemPickaxe
+{
+ protected ItemZanitePickaxe(int var1, EnumToolMaterial var2)
+ {
+ super(var1, var2);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ /**
+ * Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
+ * sword
+ */
+ public float getStrVsBlock(ItemStack var1, Block var2)
+ {
+ return super.getStrVsBlock(var1, var2) * (2.0F * (float) var1.getItemDamage() / (float) var1.getItem().getMaxDamage() + 0.5F);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemZaniteShovel.java b/src/main/java/net/aetherteam/aether/items/ItemZaniteShovel.java
new file mode 100644
index 0000000..a1cdf43
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemZaniteShovel.java
@@ -0,0 +1,45 @@
+package net.aetherteam.aether.items;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.minecraft.block.Block;
+import net.minecraft.item.EnumToolMaterial;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemSpade;
+import net.minecraft.item.ItemStack;
+
+public class ItemZaniteShovel extends ItemSpade
+{
+ public static final Block[] blocksEffectiveAgainst = new Block[]{Block.grass, Block.dirt, Block.sand, Block.gravel, Block.snow, Block.blockSnow, Block.blockClay, Block.tilledField, Block.slowSand, Block.mycelium, AetherBlocks.AetherDirt, AetherBlocks.AetherGrass};
+
+ public ItemZaniteShovel(int var1, EnumToolMaterial var2)
+ {
+ super(var1, var2);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ public float getStrVsBlocks(ItemStack var1, Block var2)
+ {
+ for (int var3 = 0; var3 < blocksEffectiveAgainst.length; ++var3)
+ {
+ if (blocksEffectiveAgainst[var3] == var2)
+ {
+ return this.efficiencyOnProperMaterial;
+ }
+ }
+
+ return 1.0F;
+ }
+
+ /**
+ * Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
+ * sword
+ */
+ public float getStrVsBlock(ItemStack var1, Block var2)
+ {
+ return this.getStrVsBlocks(var1, var2) * ((float) (var1.getItemDamage() / var1.getItem().getMaxDamage()) + 0.5F);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/items/ItemZaniteSword.java b/src/main/java/net/aetherteam/aether/items/ItemZaniteSword.java
new file mode 100644
index 0000000..18e8ba6
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/items/ItemZaniteSword.java
@@ -0,0 +1,29 @@
+package net.aetherteam.aether.items;
+
+import net.minecraft.block.Block;
+import net.minecraft.item.EnumToolMaterial;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.item.ItemSword;
+
+public class ItemZaniteSword extends ItemSword
+{
+ public ItemZaniteSword(int var1, EnumToolMaterial var2)
+ {
+ super(var1, var2);
+ }
+
+ /**
+ * Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
+ * sword
+ */
+ public float getStrVsBlock(ItemStack var1, Block var2)
+ {
+ return super.getStrVsBlock(var1, var2) * (2.0F * (float) var1.getItemDamage() / (float) var1.getItem().getMaxDamage() + 0.5F);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/notifications/Notification.java b/src/main/java/net/aetherteam/aether/notifications/Notification.java
new file mode 100644
index 0000000..8165c18
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/notifications/Notification.java
@@ -0,0 +1,71 @@
+package net.aetherteam.aether.notifications;
+
+import net.aetherteam.aether.notifications.actions.NotificationAction;
+import net.aetherteam.aether.notifications.description.NotificationContents;
+
+public class Notification
+{
+ private String headerText;
+ private String senderName;
+ private String receiverName;
+ private NotificationType type;
+
+ public Notification(NotificationType type, String senderName, String receiverName)
+ {
+ this.headerText = "Notification Received!";
+ this.senderName = senderName;
+ this.receiverName = receiverName;
+ this.type = type;
+ }
+
+ public Notification(NotificationType type, String headerText, String senderName, String receiverName)
+ {
+ this.headerText = headerText;
+ this.senderName = senderName;
+ this.receiverName = receiverName;
+ this.type = type;
+ }
+
+ public String getHeaderText()
+ {
+ return this.headerText;
+ }
+
+ public String getSenderName()
+ {
+ return this.senderName;
+ }
+
+ public String getReceiverName()
+ {
+ return this.receiverName;
+ }
+
+ public String getTypeName()
+ {
+ return this.type.typeName;
+ }
+
+ public NotificationContents getTypeContents()
+ {
+ return this.type.typeContents;
+ }
+
+ public NotificationType getType()
+ {
+ return this.type;
+ }
+
+ public void executeAction(boolean accept)
+ {
+ if (accept)
+ {
+ this.type.action.executeAccept(this);
+ } else this.type.action.executeDecline(this);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.notifications.Notification
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/notifications/NotificationHandler.java b/src/main/java/net/aetherteam/aether/notifications/NotificationHandler.java
new file mode 100644
index 0000000..372aa9d
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/notifications/NotificationHandler.java
@@ -0,0 +1,151 @@
+package net.aetherteam.aether.notifications;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.network.PacketDispatcher;
+import cpw.mods.fml.relauncher.Side;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import net.aetherteam.aether.notifications.client.ClientNotificationHandler;
+import net.aetherteam.aether.packets.AetherPacketHandler;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+
+public class NotificationHandler
+{
+ private ArrayList receivedList = new ArrayList();
+ private ArrayList sentList = new ArrayList();
+
+ private static NotificationHandler clientNotifications = new NotificationHandler();
+ private static NotificationHandler serverNotifications = new NotificationHandler();
+
+ public static NotificationHandler instance()
+ {
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (side.isClient())
+ {
+ return clientNotifications;
+ }
+ return serverNotifications;
+ }
+
+ public void sendNotification(Notification notification)
+ {
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (!hasSentToBefore(notification.getReceiverName(), notification.getType(), notification.getSenderName()))
+ {
+ this.sentList.add(notification);
+
+ if (side.isClient())
+ {
+ PacketDispatcher.sendPacketToServer(AetherPacketHandler.sendNotificationChange(notification, true));
+ ClientNotificationHandler.queueReceivedNotification(new Notification(NotificationType.GENERIC, "Request Sent!", "", notification.getReceiverName()));
+ }
+ }
+ }
+
+ public void receiveNotification(Notification notification)
+ {
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (!hasReceivedFromBefore(notification.getSenderName(), notification.getType()))
+ {
+ this.receivedList.add(notification);
+
+ if (side.isClient())
+ {
+ ClientNotificationHandler.queueReceivedNotification(notification);
+ }
+ }
+ }
+
+ public void removeNotification(Notification notification)
+ {
+ this.receivedList.remove(notification);
+ }
+
+ public void removeSentNotification(Notification notification, boolean sendPackets)
+ {
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ for (Notification notif : this.sentList)
+ {
+ if ((notif.getType() == notification.getType()) && (notif.getReceiverName().equalsIgnoreCase(notification.getReceiverName())) && (notif.getSenderName().equalsIgnoreCase(notification.getSenderName())))
+ {
+ this.sentList.remove(notif);
+ }
+ }
+
+ if ((sendPackets) && (side == Side.CLIENT))
+ {
+ PacketDispatcher.sendPacketToServer(AetherPacketHandler.sendNotificationChange(notification, false));
+ }
+ }
+
+ public boolean hasSentToBefore(String receivingPlayer, NotificationType type, String sendingPlayer)
+ {
+ for (Notification notification : this.sentList)
+ {
+ if ((notification.getType() == type) && (notification.getReceiverName().equalsIgnoreCase(receivingPlayer)) && (notification.getSenderName().equalsIgnoreCase(sendingPlayer)))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public boolean hasReceivedFromBefore(String sendingPlayer, NotificationType type)
+ {
+ for (Notification notification : this.receivedList)
+ {
+ if ((notification.getType() == type) && (notification.getSenderName().equalsIgnoreCase(sendingPlayer)))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public boolean isEmpty()
+ {
+ return this.receivedList.isEmpty();
+ }
+
+ public ArrayList getNotifications()
+ {
+ return this.receivedList;
+ }
+
+ public void clearNotifications()
+ {
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if ((side.isClient()) && (getNotifications().size() > 0))
+ {
+ Iterator it = getNotifications().iterator();
+ while (it.hasNext())
+ {
+ Notification notification = (Notification) it.next();
+
+ PartyMember recruiter = PartyController.instance().getMember(notification.getSenderName());
+ Party party = PartyController.instance().getParty(recruiter);
+
+ removeSentNotification(notification, true);
+ PartyController.instance().removePlayerRequest(party, recruiter, notification.getReceiverName(), true);
+
+ it.remove();
+ }
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.notifications.NotificationHandler
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/notifications/NotificationType.java b/src/main/java/net/aetherteam/aether/notifications/NotificationType.java
new file mode 100644
index 0000000..bb6ddb7
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/notifications/NotificationType.java
@@ -0,0 +1,52 @@
+package net.aetherteam.aether.notifications;
+
+import net.aetherteam.aether.notifications.actions.DungeonRequestAction;
+import net.aetherteam.aether.notifications.actions.NotificationAction;
+import net.aetherteam.aether.notifications.actions.PartyRequestAction;
+import net.aetherteam.aether.notifications.description.DungeonRequestContents;
+import net.aetherteam.aether.notifications.description.GenericContents;
+import net.aetherteam.aether.notifications.description.NotificationContents;
+import net.aetherteam.aether.notifications.description.PartyRequestContents;
+
+public enum NotificationType
+{
+ GENERIC("Request sent!", null),
+ DUNGEON("Dungeon Request", new DungeonRequestAction(), new DungeonRequestContents()),
+ PARTY_REQUEST("Party Request", new PartyRequestAction(), new PartyRequestContents());
+
+ public String typeName;
+ public NotificationContents typeContents;
+ public NotificationAction action;
+
+ private NotificationType(String typeName, NotificationAction action)
+ {
+ this.typeName = typeName;
+ this.action = action;
+ this.typeContents = new GenericContents();
+ }
+
+ private NotificationType(String typeName, NotificationAction action, NotificationContents typeContents)
+ {
+ this.typeName = typeName;
+ this.action = action;
+ this.typeContents = typeContents;
+ }
+
+ public static NotificationType getTypeFromString(String name)
+ {
+ for (NotificationType type : values())
+ {
+ if (type.name().equalsIgnoreCase(name))
+ {
+ return type;
+ }
+ }
+
+ return null;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.notifications.NotificationType
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/notifications/actions/DungeonRequestAction.java b/src/main/java/net/aetherteam/aether/notifications/actions/DungeonRequestAction.java
new file mode 100644
index 0000000..7489269
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/notifications/actions/DungeonRequestAction.java
@@ -0,0 +1,83 @@
+package net.aetherteam.aether.notifications.actions;
+
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.notifications.Notification;
+import net.aetherteam.aether.notifications.NotificationHandler;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+
+public class DungeonRequestAction extends NotificationAction
+{
+ public boolean executeAccept(Notification notification)
+ {
+ PartyMember requester = PartyController.instance().getMember(notification.getSenderName());
+ Party party = PartyController.instance().getParty(requester);
+ PartyMember member = PartyController.instance().getMember(notification.getReceiverName());
+
+ Dungeon dungeon = DungeonHandler.instance().getDungeon(party);
+
+ boolean dungeonQueued = false;
+
+ if (party.hasMember(member))
+ {
+ if (requester != null)
+ {
+ if (requester.canRecruit())
+ {
+ DungeonHandler.instance().queueMember(dungeon, member, true);
+ dungeonQueued = true;
+ }
+ }
+ }
+
+ NotificationHandler.instance().removeNotification(notification);
+ NotificationHandler.instance().removeSentNotification(notification, true);
+
+ return dungeonQueued;
+ }
+
+ public boolean executeDecline(Notification notification)
+ {
+ PartyMember requester = PartyController.instance().getMember(notification.getSenderName());
+ Party party = PartyController.instance().getParty(requester);
+ PartyMember member = PartyController.instance().getMember(notification.getReceiverName());
+
+ Dungeon dungeon = DungeonHandler.instance().getDungeon(party);
+
+ if (dungeon != null)
+ {
+ if (party.hasMember(member))
+ {
+ if (requester != null)
+ {
+ if (requester.canRecruit())
+ {
+ DungeonHandler.instance().disbandQueue(dungeon, party, dungeon.getControllerX(), dungeon.getControllerY(), dungeon.getControllerZ(), member, true);
+ }
+ }
+ }
+ }
+
+ NotificationHandler.instance().removeNotification(notification);
+ NotificationHandler.instance().removeSentNotification(notification, true);
+
+ return true;
+ }
+
+ public String acceptMessage(Notification notification)
+ {
+ return "You have been queued into the Dungeon raid!";
+ }
+
+ public String failedMessage(Notification notification)
+ {
+ return "Sorry, the dungeon raid request no longer exists :(";
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.notifications.actions.DungeonRequestAction
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/notifications/actions/NotificationAction.java b/src/main/java/net/aetherteam/aether/notifications/actions/NotificationAction.java
new file mode 100644
index 0000000..d77a46d
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/notifications/actions/NotificationAction.java
@@ -0,0 +1,23 @@
+package net.aetherteam.aether.notifications.actions;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.relauncher.Side;
+import net.aetherteam.aether.notifications.Notification;
+
+public abstract class NotificationAction
+{
+ protected Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ public abstract boolean executeAccept(Notification paramNotification);
+
+ public abstract boolean executeDecline(Notification paramNotification);
+
+ public abstract String acceptMessage(Notification paramNotification);
+
+ public abstract String failedMessage(Notification paramNotification);
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.notifications.actions.NotificationAction
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/notifications/actions/PartyRequestAction.java b/src/main/java/net/aetherteam/aether/notifications/actions/PartyRequestAction.java
new file mode 100644
index 0000000..6c835f9
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/notifications/actions/PartyRequestAction.java
@@ -0,0 +1,66 @@
+package net.aetherteam.aether.notifications.actions;
+
+import net.aetherteam.aether.notifications.Notification;
+import net.aetherteam.aether.notifications.NotificationHandler;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+
+public class PartyRequestAction extends NotificationAction
+{
+ public boolean executeAccept(Notification notification)
+ {
+ PartyMember recruiter = PartyController.instance().getMember(notification.getSenderName());
+ Party party = PartyController.instance().getParty(recruiter);
+
+ boolean partyJoined = false;
+
+ if (PartyController.instance().getMember(notification.getReceiverName()) == null)
+ {
+ if (recruiter != null)
+ {
+ if (recruiter.canRecruit())
+ {
+ PartyController.instance().joinParty(party, new PartyMember(notification.getReceiverName(), ""), true);
+ partyJoined = true;
+ }
+ }
+ }
+
+ NotificationHandler.instance().removeNotification(notification);
+ NotificationHandler.instance().removeSentNotification(notification, true);
+ PartyController.instance().removePlayerRequest(party, recruiter, notification.getReceiverName(), true);
+
+ return partyJoined;
+ }
+
+ public boolean executeDecline(Notification notification)
+ {
+ PartyMember recruiter = PartyController.instance().getMember(notification.getSenderName());
+ Party party = PartyController.instance().getParty(recruiter);
+
+ NotificationHandler.instance().removeNotification(notification);
+ NotificationHandler.instance().removeSentNotification(notification, true);
+ PartyController.instance().removePlayerRequest(party, recruiter, notification.getReceiverName(), true);
+
+ return true;
+ }
+
+ public String acceptMessage(Notification notification)
+ {
+ PartyMember recruiter = PartyController.instance().getMember(notification.getSenderName());
+ Party party = PartyController.instance().getParty(recruiter);
+
+ return "You have joined the " + (party != null ? '"' + party.getName() + '"' + " " : "") + "party!";
+ }
+
+ public String failedMessage(Notification notification)
+ {
+ return "Sorry, the requested party no longer exists :(";
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.notifications.actions.PartyRequestAction
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/notifications/client/ClientNotificationHandler.java b/src/main/java/net/aetherteam/aether/notifications/client/ClientNotificationHandler.java
new file mode 100644
index 0000000..7a2ecdc
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/notifications/client/ClientNotificationHandler.java
@@ -0,0 +1,64 @@
+package net.aetherteam.aether.notifications.client;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.aetherteam.aether.client.gui.social.dialogue.GuiDialogueBox;
+import net.aetherteam.aether.notifications.Notification;
+import net.aetherteam.aether.notifications.NotificationType;
+import net.minecraft.client.Minecraft;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.server.integrated.IntegratedServer;
+
+public class ClientNotificationHandler
+{
+
+ @SideOnly(Side.CLIENT)
+ private static GuiNotification notificationGui = new GuiNotification(Minecraft.getMinecraft());
+
+ @SideOnly(Side.CLIENT)
+ public static void updateNotifications()
+ {
+ notificationGui.updateNotificationWindow();
+ }
+
+ @SideOnly(Side.CLIENT)
+ public static void queueReceivedNotification(Notification notification)
+ {
+ notificationGui.queueReceivedNotification(notification);
+ }
+
+ @SideOnly(Side.CLIENT)
+ public static void createGeneric(String header, String lower, String toPlayer)
+ {
+ queueReceivedNotification(new Notification(NotificationType.GENERIC, header, lower, toPlayer));
+ }
+
+ @SideOnly(Side.CLIENT)
+ public static String clientUsername()
+ {
+ return Minecraft.getMinecraft().thePlayer.username;
+ }
+
+ @SideOnly(Side.CLIENT)
+ public static void openDialogueBox(String trueText, String falseText, boolean flag)
+ {
+ Minecraft.getMinecraft().displayGuiScreen(new GuiDialogueBox(null, trueText, falseText, flag));
+ }
+
+ @SideOnly(Side.CLIENT)
+ public static void openDialogueBox(String text)
+ {
+ Minecraft.getMinecraft().displayGuiScreen(new GuiDialogueBox(null, text, "", true));
+ }
+
+ @SideOnly(Side.CLIENT)
+ public static boolean isOpenToLAN()
+ {
+ return (Minecraft.getMinecraft().getIntegratedServer() != null) && (Minecraft.getMinecraft().getIntegratedServer().getPublic());
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.notifications.client.ClientNotificationHandler
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/notifications/client/GuiNotification.java b/src/main/java/net/aetherteam/aether/notifications/client/GuiNotification.java
new file mode 100644
index 0000000..157524f
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/notifications/client/GuiNotification.java
@@ -0,0 +1,144 @@
+package net.aetherteam.aether.notifications.client;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.aetherteam.aether.data.AetherOptions;
+import net.aetherteam.aether.notifications.Notification;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.Gui;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.renderer.RenderHelper;
+import net.minecraft.client.renderer.entity.RenderItem;
+import org.lwjgl.opengl.GL11;
+
+@SideOnly(Side.CLIENT)
+public class GuiNotification extends Gui
+{
+ private Minecraft theGame;
+ private int gameWindowWidth;
+ private int gameWindowHeight;
+ private String headerText;
+ private String senderName;
+ private Notification theNotification;
+ private long notificationTime;
+ private RenderItem itemRender;
+ private boolean haveNotification;
+
+ public GuiNotification(Minecraft mc)
+ {
+ this.theGame = mc;
+ this.itemRender = new RenderItem();
+ }
+
+ public void queueReceivedNotification(Notification notification)
+ {
+ if (AetherOptions.getShowNotifications())
+ {
+ this.headerText = notification.getHeaderText();
+ this.senderName = ("From " + notification.getSenderName());
+ this.notificationTime = Minecraft.getSystemTime();
+ this.theNotification = notification;
+ this.haveNotification = false;
+ }
+ }
+
+ public void queueAchievementInformation(Notification notification)
+ {
+ this.headerText = notification.getHeaderText();
+ this.senderName = ("From " + notification.getSenderName());
+ this.notificationTime = (Minecraft.getSystemTime() - 2500L);
+ this.theNotification = notification;
+ this.haveNotification = true;
+ }
+
+ private void updateAchievementWindowScale()
+ {
+ GL11.glViewport(0, 0, this.theGame.displayWidth, this.theGame.displayHeight);
+ GL11.glMatrixMode(5889);
+ GL11.glLoadIdentity();
+ GL11.glMatrixMode(5888);
+ GL11.glLoadIdentity();
+ this.gameWindowWidth = this.theGame.displayWidth;
+ this.gameWindowHeight = this.theGame.displayHeight;
+ ScaledResolution scaledresolution = new ScaledResolution(this.theGame.gameSettings, this.theGame.displayWidth, this.theGame.displayHeight);
+ this.gameWindowWidth = scaledresolution.getScaledWidth();
+ this.gameWindowHeight = scaledresolution.getScaledHeight();
+ GL11.glClear(256);
+ GL11.glMatrixMode(5889);
+ GL11.glLoadIdentity();
+ GL11.glOrtho(0.0D, this.gameWindowWidth, this.gameWindowHeight, 0.0D, 1000.0D, 3000.0D);
+ GL11.glMatrixMode(5888);
+ GL11.glLoadIdentity();
+ GL11.glTranslatef(0.0F, 0.0F, -2000.0F);
+ }
+
+ public void updateNotificationWindow()
+ {
+ if ((this.theNotification != null) && (this.notificationTime != 0L))
+ {
+ double d0 = (Minecraft.getSystemTime() - this.notificationTime) / 3000.0D;
+
+ if ((!this.haveNotification) && ((d0 < 0.0D) || (d0 > 1.0D)))
+ {
+ this.notificationTime = 0L;
+ } else
+ {
+ updateAchievementWindowScale();
+ GL11.glDisable(2929);
+ GL11.glDepthMask(false);
+ double d1 = d0 * 2.0D;
+
+ if (d1 > 1.0D)
+ {
+ d1 = 2.0D - d1;
+ }
+
+ d1 *= 4.0D;
+ d1 = 1.0D - d1;
+
+ if (d1 < 0.0D)
+ {
+ d1 = 0.0D;
+ }
+
+ d1 *= d1;
+ d1 *= d1;
+ int i = 0;
+ int j = 0 - (int) (d1 * 36.0D);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glEnable(3553);
+ this.theGame.renderEngine.bindTexture("/net/aetherteam/aether/client/sprites/gui/notification/notifications.png");
+ GL11.glDisable(2896);
+ drawTexturedModalRect(i, j, 96, 202, 160, 32);
+
+ int textOffsetX = 45;
+
+ if (this.haveNotification)
+ {
+ this.theGame.fontRenderer.drawSplitString(this.senderName, i + textOffsetX, j + 7, 120, -1);
+ } else
+ {
+ this.theGame.fontRenderer.drawString(this.headerText, i + textOffsetX, j + 7, -256);
+ this.theGame.fontRenderer.drawString(this.senderName, i + textOffsetX, j + 18, -1);
+ }
+
+ RenderHelper.enableGUIStandardItemLighting();
+ GL11.glDisable(2896);
+ GL11.glEnable(32826);
+ GL11.glEnable(2903);
+ GL11.glEnable(2896);
+
+ GL11.glDisable(2896);
+ GL11.glDepthMask(true);
+ GL11.glEnable(2929);
+ }
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.notifications.client.GuiNotification
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/notifications/client/GuiNotificationList.java b/src/main/java/net/aetherteam/aether/notifications/client/GuiNotificationList.java
new file mode 100644
index 0000000..d80f752
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/notifications/client/GuiNotificationList.java
@@ -0,0 +1,271 @@
+package net.aetherteam.aether.notifications.client;
+
+import cpw.mods.fml.client.FMLClientHandler;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import net.aetherteam.aether.client.gui.social.GuiYSlider;
+import net.aetherteam.aether.notifications.Notification;
+import net.aetherteam.aether.notifications.NotificationHandler;
+import net.aetherteam.aether.notifications.NotificationType;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.audio.SoundManager;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.settings.GameSettings;
+import net.minecraft.client.settings.KeyBinding;
+import net.minecraft.entity.player.EntityPlayer;
+import org.lwjgl.input.Keyboard;
+import org.lwjgl.input.Mouse;
+import org.lwjgl.opengl.GL11;
+
+public class GuiNotificationList extends GuiScreen
+{
+ private GuiYSlider sbar;
+ private float sbarVal = 0.0F;
+ private int backgroundTexture;
+ private int dialogueTexture;
+ private int xParty;
+ private int yParty;
+ private int wParty;
+ private int hParty;
+ private GuiScreen parent;
+ private ArrayList notificationSlots = new ArrayList();
+ Minecraft f;
+ private int totalHeight;
+ private GuiNotificationSlot selectedNotificationSlot;
+ private boolean slotsCreated = false;
+ private boolean slotIsSelected = false;
+ private GuiButton joinButton;
+ private EntityPlayer player;
+
+ public GuiNotificationList(EntityPlayer player, GuiScreen parent)
+ {
+ this.player = player;
+ this.mc = FMLClientHandler.instance().getClient();
+ this.backgroundTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/party.png");
+ this.dialogueTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/dialogue.png");
+ this.wParty = 256;
+ this.hParty = 256;
+ this.parent = parent;
+ updateScreen();
+ }
+
+ protected void keyTyped(char charTyped, int keyTyped)
+ {
+ super.keyTyped(charTyped, keyTyped);
+
+ if (keyTyped == Minecraft.getMinecraft().gameSettings.keyBindInventory.keyCode)
+ {
+ this.mc.displayGuiScreen((GuiScreen) null);
+ this.mc.setIngameFocus();
+ }
+ }
+
+ public void initGui()
+ {
+ Keyboard.enableRepeatEvents(true);
+ updateScreen();
+ if (this.sbar != null) this.sbarVal = this.sbar.sliderValue;
+ this.sbar = new GuiYSlider(-1, this.xParty + 46, this.yParty - 54, 10, 103);
+ this.sbar.sliderValue = this.sbarVal;
+ }
+
+ protected void mouseClicked(int par1, int par2, int par3)
+ {
+ if (par3 == 0)
+ {
+ if (this.totalHeight > 103)
+ {
+ this.sbar.mousePressed(this.mc, par1, par2);
+ }
+ for (int l = 0; l < this.notificationSlots.size(); l++)
+ {
+ int y = (int) (par2 + this.sbar.sliderValue * (this.totalHeight - 103));
+
+ GuiNotificationSlot notificationSlot = (GuiNotificationSlot) this.notificationSlots.get(l);
+
+ if ((notificationSlot.mousePressed(this.mc, par1, y)) && (par2 < this.yParty + 50))
+ {
+ notificationSlot.selected = true;
+ this.slotIsSelected = true;
+ this.selectedNotificationSlot = notificationSlot;
+ this.mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
+
+ for (int rr = 0; rr < this.notificationSlots.size(); rr++)
+ {
+ GuiNotificationSlot notificationSlot2 = (GuiNotificationSlot) this.notificationSlots.get(rr);
+
+ if (notificationSlot2 != notificationSlot)
+ {
+ notificationSlot2.selected = false;
+ }
+ }
+
+ return;
+ }
+ notificationSlot.selected = false;
+ this.slotIsSelected = false;
+ }
+
+ }
+
+ super.mouseClicked(par1, par2, par3);
+ }
+
+ protected void mouseMovedOrUp(int par1, int par2, int par3)
+ {
+ if (par3 == 0)
+ {
+ this.sbar.mouseReleased(par1, par2);
+ }
+
+ super.mouseMovedOrUp(par1, par2, par3);
+ }
+
+ protected void actionPerformed(GuiButton button)
+ {
+ switch (button.id)
+ {
+ case 0:
+ this.mc.displayGuiScreen(this.parent);
+ break;
+ case 1:
+ if (this.selectedNotificationSlot != null)
+ {
+ Notification notification = this.selectedNotificationSlot.notification;
+ NotificationType type = notification.getType();
+
+ this.mc.displayGuiScreen(new GuiViewNotification(this.player, notification, this));
+ }
+ break;
+ }
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ public void drawScreen(int x, int y, float partialTick)
+ {
+ this.buttonList.clear();
+
+ ArrayList notificationList = NotificationHandler.instance().getNotifications();
+
+ if (notificationList.size() != this.notificationSlots.size())
+ {
+ this.notificationSlots.clear();
+ this.slotsCreated = false;
+ }
+
+ drawDefaultBackground();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+ int dmsy = Mouse.getDWheel();
+ this.sbar.sliderValue -= dmsy / 1000.0F;
+ if (this.sbar.sliderValue > 1.0F) this.sbar.sliderValue = 1.0F;
+ if (this.sbar.sliderValue < 0.0F) this.sbar.sliderValue = 0.0F;
+ int centerX = this.xParty - 70;
+ int centerY = this.yParty - 84;
+
+ ScaledResolution sr = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ drawTexturedModalRect(centerX, centerY, 0, 0, 141, this.hParty);
+ this.totalHeight = 0;
+ int slotW = 100;
+ int slotH = 20;
+ int gutter = 2;
+ GL11.glEnable(3089);
+ GL11.glScissor((centerX + 14) * sr.getScaleFactor(), (centerY + 35) * sr.getScaleFactor(), slotW * sr.getScaleFactor(), 103 * sr.getScaleFactor());
+ GL11.glPushMatrix();
+ this.totalHeight = (notificationList.size() * (slotH + gutter));
+ float sVal = -this.sbar.sliderValue * (this.totalHeight - 105);
+ if (this.totalHeight > 103)
+ {
+ GL11.glTranslatef(0.0F, sVal, 0.0F);
+ }
+ this.totalHeight = 0;
+
+ if (!this.slotsCreated)
+ {
+ for (int i = 0; i < notificationList.size(); i++)
+ {
+ this.notificationSlots.add(new GuiNotificationSlot((Notification) notificationList.get(i), this.notificationSlots.size(), centerX + 15, centerY + this.totalHeight + 30, slotW, slotH));
+
+ this.totalHeight += slotH + gutter;
+ }
+
+ this.slotsCreated = true;
+ }
+
+ for (int i = 0; i < this.notificationSlots.size(); i++)
+ {
+ ((GuiNotificationSlot) this.notificationSlots.get(i)).drawPartySlot(centerX + 15, centerY + this.totalHeight + 30, slotW, slotH);
+
+ this.totalHeight += slotH + gutter;
+ }
+
+ GL11.glPopMatrix();
+ GL11.glDisable(3089);
+
+ if (this.totalHeight > 103)
+ {
+ this.sbar.drawButton(this.mc, x, y);
+ }
+
+ this.mc.renderEngine.resetBoundTexture();
+ drawString(this.fontRenderer, "Notification List", centerX + 70 - this.fontRenderer.getStringWidth("Notification List") / 2, centerY + 10, 16777215);
+ if (this.notificationSlots.size() == 0)
+ {
+ GL11.glPushMatrix();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, this.dialogueTexture);
+
+ float scaleFactor = 1.3F;
+ float scaleFactorY = scaleFactor - 0.4F;
+
+ GL11.glTranslatef(this.xParty - 100.0F * scaleFactor, this.yParty - (this.hParty - 201) / 2 * scaleFactorY, 0.0F);
+
+ GL11.glScalef(scaleFactor, scaleFactorY, scaleFactor);
+
+ drawTexturedModalRect(0, 0, 0, 0, 201, this.hParty - 201);
+ GL11.glPopMatrix();
+ this.mc.renderEngine.resetBoundTexture();
+
+ String warningLabel = "There are no notifications to display at this time.";
+
+ drawString(this.fontRenderer, warningLabel, centerX + 70 - this.fontRenderer.getStringWidth(warningLabel) / 2, (int) (this.yParty - (this.hParty - 241) / 2 * scaleFactorY), 16777215);
+ }
+
+ this.joinButton = new GuiButton(1, this.xParty + 3, this.yParty + 85 - 28, 58, 20, "View");
+
+ if ((this.selectedNotificationSlot != null) && (this.slotIsSelected))
+ {
+ this.joinButton.enabled = true;
+ } else this.joinButton.enabled = false;
+
+ this.buttonList.add(new GuiButton(0, this.xParty - 60, this.yParty + 85 - 28, 58, 20, "Back"));
+ this.buttonList.add(this.joinButton);
+
+ super.drawScreen(x, y, partialTick);
+ }
+
+ public void updateScreen()
+ {
+ super.updateScreen();
+ ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+ this.xParty = (width / 2);
+ this.yParty = (height / 2);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.notifications.client.GuiNotificationList
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/notifications/client/GuiNotificationSlot.java b/src/main/java/net/aetherteam/aether/notifications/client/GuiNotificationSlot.java
new file mode 100644
index 0000000..3cb7f1c
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/notifications/client/GuiNotificationSlot.java
@@ -0,0 +1,69 @@
+package net.aetherteam.aether.notifications.client;
+
+import net.aetherteam.aether.notifications.Notification;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.Gui;
+import net.minecraft.client.renderer.RenderEngine;
+import org.lwjgl.opengl.GL11;
+
+public class GuiNotificationSlot extends Gui
+{
+ protected int width;
+ protected int height;
+ public int xPosition;
+ public int yPosition;
+ public String displayString;
+ public int id;
+ public boolean enabled;
+ public boolean drawButton;
+ protected boolean field_82253_i;
+ public boolean selected;
+ private static final int LEADER_TEXT_COLOR = 9430585;
+ public Notification notification;
+
+ public GuiNotificationSlot(Notification notification, int id, int x, int y, int width, int height)
+ {
+ this.selected = false;
+ this.width = width;
+ this.height = height;
+ this.enabled = true;
+ this.drawButton = true;
+ this.id = id;
+ this.xPosition = x;
+ this.yPosition = y;
+ this.notification = notification;
+ }
+
+ public void drawPartySlot(int x, int y, int width, int height)
+ {
+ this.xPosition = x;
+ this.yPosition = y;
+
+ Minecraft mc = Minecraft.getMinecraft();
+
+ drawGradientRect(this.xPosition, this.yPosition, this.xPosition + width, this.yPosition + height, this.selected ? -10439830 : -13421773, this.selected ? -11563178 : -11184811);
+
+ FontRenderer fontRenderer = mc.fontRenderer;
+
+ mc.renderEngine.resetBoundTexture();
+
+ fontRenderer.drawStringWithShadow(this.notification.getTypeName(), x + height - 19, y + 2, 15066597);
+ GL11.glPushMatrix();
+ GL11.glScalef(0.75F, 0.75F, 1.0F);
+ fontRenderer.drawString("From: ", (int) ((x + height) / 0.75F - 36.0F + this.notification.getTypeName().length()), (int) ((y + 12.0F) / 0.75F), 16777215);
+ fontRenderer.drawString(this.notification.getSenderName(), (int) ((x + height) / 0.75F - 6.0F + this.notification.getTypeName().length()), (int) ((y + 12.0F) / 0.75F), 9430585);
+
+ GL11.glPopMatrix();
+ }
+
+ public boolean mousePressed(Minecraft par1Minecraft, int par2, int par3)
+ {
+ return (this.enabled) && (this.drawButton) && (par2 >= this.xPosition) && (par3 >= this.yPosition) && (par2 < this.xPosition + this.width) && (par3 < this.yPosition + this.height);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.notifications.client.GuiNotificationSlot
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/notifications/client/GuiPlayerRequestSlot.java b/src/main/java/net/aetherteam/aether/notifications/client/GuiPlayerRequestSlot.java
new file mode 100644
index 0000000..e5fd6ad
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/notifications/client/GuiPlayerRequestSlot.java
@@ -0,0 +1,142 @@
+package net.aetherteam.aether.notifications.client;
+
+import java.util.ArrayList;
+
+import net.aetherteam.aether.notifications.NotificationHandler;
+import net.aetherteam.aether.notifications.NotificationType;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.Gui;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.StringUtils;
+import org.lwjgl.opengl.GL11;
+
+public class GuiPlayerRequestSlot extends Gui
+{
+ protected static final String AVAILABLE_TEXT = "AVAILABLE";
+ protected static final String INPARTY_TEXT = "ALREADY IN PARTY";
+ protected static final String PENDING_TEXT = "REQUEST PENDING";
+ private static final int AVAILABLE_COLOUR = 6750054;
+ private static final int INPARTY_COLOUR = 16711680;
+ private static final int PENDING_COLOUR = 16756516;
+ protected int width;
+ protected int height;
+ public int xPosition;
+ public int yPosition;
+ public String displayString;
+ public int id;
+ public boolean enabled;
+ public boolean drawButton;
+ protected boolean field_82253_i;
+ public boolean selected;
+ private static final int LEADER_TEXT_COLOR = 26367;
+ public String username;
+ public String skinURL;
+
+ public GuiPlayerRequestSlot(String username, String skinURL, int id, int x, int y, int width, int height)
+ {
+ this.skinURL = skinURL;
+ this.username = username;
+ this.selected = false;
+ this.width = width;
+ this.height = height;
+ this.enabled = true;
+ this.drawButton = true;
+ this.id = id;
+ this.xPosition = x;
+ this.yPosition = y;
+ }
+
+ public void drawPlayerSlot(int x, int y, int width, int height)
+ {
+ this.xPosition = x;
+ this.yPosition = y;
+
+ drawGradientRect(this.xPosition, this.yPosition, this.xPosition + width, this.yPosition + height, this.selected ? -10439830 : -13421773, this.selected ? -11563178 : -11184811);
+
+ Minecraft mc = Minecraft.getMinecraft();
+ FontRenderer fontRenderer = mc.fontRenderer;
+
+ ArrayList partyList = PartyController.instance().getParties();
+ ArrayList playerStringList = new ArrayList();
+
+ for (int i = 0; i < partyList.size(); i++)
+ {
+ PartyMember member = PartyController.instance().getMember(this.username);
+
+ if (((Party) partyList.get(i)).hasMember(member))
+ {
+ playerStringList.add(this.username);
+ }
+ }
+
+ int icon = mc.renderEngine.getTextureForDownloadableImage("http://skins.minecraft.net/MinecraftSkins/" + StringUtils.stripControlCodes(this.username) + ".png", "/mob/char.png");
+
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, icon);
+ GL11.glEnable(3553);
+
+ float u = 0.125F;
+ float v = 0.25F;
+ float u1 = 0.25F;
+ float v1 = 0.5F;
+ GL11.glBegin(7);
+ GL11.glTexCoord2f(u, v);
+ GL11.glVertex2f(x + 2, y + 2);
+ GL11.glTexCoord2f(u, v1);
+ GL11.glVertex2f(x + 2, y + 18);
+ GL11.glTexCoord2f(u1, v1);
+ GL11.glVertex2f(x + 18, y + 18);
+ GL11.glTexCoord2f(u1, v);
+ GL11.glVertex2f(x + 18, y + 2);
+ GL11.glEnd();
+
+ mc.renderEngine.resetBoundTexture();
+
+ fontRenderer.drawStringWithShadow(this.username, x + height, y + 2, 15066597);
+
+ GL11.glPushMatrix();
+ GL11.glScalef(0.75F, 0.75F, 1.0F);
+
+ boolean inParty = PartyController.instance().inParty(this.username);
+
+ String subText = "";
+ int textColour = 0;
+
+ Party party = PartyController.instance().getParty(this.username);
+
+ boolean pending = NotificationHandler.instance().hasSentToBefore(this.username, NotificationType.PARTY_REQUEST, mc.thePlayer.username);
+
+ if (inParty)
+ {
+ subText = "ALREADY IN PARTY";
+ textColour = 16711680;
+ } else if (pending)
+ {
+ subText = "REQUEST PENDING";
+ textColour = 16756516;
+ } else
+ {
+ subText = "AVAILABLE";
+ textColour = 6750054;
+ }
+
+ fontRenderer.drawString(subText, (int) ((x + height) / 0.75F), (int) ((y + 12.0F) / 0.75F), textColour);
+
+ GL11.glPopMatrix();
+ }
+
+ public boolean mousePressed(Minecraft par1Minecraft, int par2, int par3)
+ {
+ return (this.enabled) && (this.drawButton) && (par2 >= this.xPosition) && (par3 >= this.yPosition) && (par2 < this.xPosition + this.width) && (par3 < this.yPosition + this.height);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.notifications.client.GuiPlayerRequestSlot
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/notifications/client/GuiRequestPlayer.java b/src/main/java/net/aetherteam/aether/notifications/client/GuiRequestPlayer.java
new file mode 100644
index 0000000..fb022ea
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/notifications/client/GuiRequestPlayer.java
@@ -0,0 +1,299 @@
+package net.aetherteam.aether.notifications.client;
+
+import cpw.mods.fml.client.FMLClientHandler;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import net.aetherteam.aether.client.gui.social.GuiYSlider;
+import net.aetherteam.aether.notifications.Notification;
+import net.aetherteam.aether.notifications.NotificationHandler;
+import net.aetherteam.aether.notifications.NotificationType;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.audio.SoundManager;
+import net.minecraft.client.entity.EntityClientPlayerMP;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiPlayerInfo;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.multiplayer.NetClientHandler;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.settings.GameSettings;
+import net.minecraft.client.settings.KeyBinding;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.StringUtils;
+import org.lwjgl.input.Keyboard;
+import org.lwjgl.input.Mouse;
+import org.lwjgl.opengl.GL11;
+
+public class GuiRequestPlayer extends GuiScreen
+{
+ protected static final String ONLINE_TEXT = "ONLINE";
+ protected static final String OFFLINE_TEXT = "OFFLINE";
+ private static final int ONLINE_TEXT_COLOR = 6750054;
+ private static final int OFFLINE_TEXT_COLOR = 16711680;
+ private GuiYSlider sbar;
+ private float sbarVal = 0.0F;
+ private int backgroundTexture;
+ private int dialogueTexture;
+ private int xMember;
+ private int yMember;
+ private int wMember;
+ private int hMember;
+ Minecraft f;
+ private int totalHeight;
+ private ArrayList playerSlots = new ArrayList();
+ private GuiPlayerRequestSlot selectedPlayerSlot;
+ private boolean slotsCreated = false;
+ private boolean slotIsSelected = false;
+ private GuiScreen parent;
+ private EntityPlayer player;
+ private GuiButton kickButton;
+
+ public GuiRequestPlayer(EntityPlayer player, GuiScreen parent)
+ {
+ this.player = player;
+ this.parent = parent;
+ this.mc = FMLClientHandler.instance().getClient();
+ this.backgroundTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/party.png");
+ this.dialogueTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/dialogue.png");
+ this.wMember = 256;
+ this.hMember = 256;
+ updateScreen();
+ }
+
+ public void initGui()
+ {
+ Keyboard.enableRepeatEvents(true);
+ updateScreen();
+ this.buttonList.clear();
+ if (this.sbar != null) this.sbarVal = this.sbar.sliderValue;
+ this.sbar = new GuiYSlider(-1, this.xMember + 46, this.yMember - 54, 10, 103);
+ this.sbar.sliderValue = this.sbarVal;
+
+ this.buttonList.add(new GuiButton(0, this.xMember - 58, this.yMember + 85 - 28, 120, 20, "Back"));
+ this.buttonList.add(new GuiButton(0, this.xMember - 58, this.yMember + 85 - 28, 120, 20, "Back"));
+ }
+
+ protected void keyTyped(char charTyped, int keyTyped)
+ {
+ super.keyTyped(charTyped, keyTyped);
+
+ if (keyTyped == Minecraft.getMinecraft().gameSettings.keyBindInventory.keyCode)
+ {
+ this.mc.displayGuiScreen((GuiScreen) null);
+ this.mc.setIngameFocus();
+ }
+ }
+
+ protected void mouseClicked(int par1, int par2, int par3)
+ {
+ if (par3 == 0)
+ {
+ if (this.totalHeight > 103)
+ {
+ this.sbar.mousePressed(this.mc, par1, par2);
+ }
+ for (int l = 0; l < this.playerSlots.size(); l++)
+ {
+ int y = (int) (par2 + this.sbar.sliderValue * (this.totalHeight - 103));
+
+ GuiPlayerRequestSlot playerSlot = (GuiPlayerRequestSlot) this.playerSlots.get(l);
+
+ if ((playerSlot.mousePressed(this.mc, par1, y)) && (par2 < this.yMember + 50))
+ {
+ boolean pending = false;
+
+ if (playerSlot != null)
+ {
+ pending = NotificationHandler.instance().hasSentToBefore(playerSlot.username, NotificationType.PARTY_REQUEST, this.player.username);
+ }
+
+ if ((!pending) && (!PartyController.instance().inParty(playerSlot.username)))
+ {
+ playerSlot.selected = true;
+ this.slotIsSelected = true;
+
+ this.selectedPlayerSlot = playerSlot;
+ this.mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
+
+ for (int rr = 0; rr < this.playerSlots.size(); rr++)
+ {
+ GuiPlayerRequestSlot playerSlot2 = (GuiPlayerRequestSlot) this.playerSlots.get(rr);
+
+ if (playerSlot2 != playerSlot)
+ {
+ playerSlot2.selected = false;
+ }
+ }
+ } else
+ {
+ if (this.selectedPlayerSlot != null)
+ {
+ this.selectedPlayerSlot.selected = false;
+ }
+
+ this.selectedPlayerSlot = null;
+ this.slotIsSelected = false;
+ this.mc.sndManager.playSoundFX("random.click", 1.0F, 1.5F);
+ return;
+ }
+
+ return;
+ }
+ playerSlot.selected = false;
+ this.slotIsSelected = false;
+ }
+
+ }
+
+ super.mouseClicked(par1, par2, par3);
+ }
+
+ protected void mouseMovedOrUp(int par1, int par2, int par3)
+ {
+ if (par3 == 0) this.sbar.mouseReleased(par1, par2);
+ super.mouseMovedOrUp(par1, par2, par3);
+ }
+
+ protected void actionPerformed(GuiButton btn)
+ {
+ switch (btn.id)
+ {
+ case 0:
+ this.mc.displayGuiScreen(this.parent);
+ break;
+ case 1:
+ if (this.selectedPlayerSlot != null)
+ {
+ Party party = PartyController.instance().getParty(this.player);
+ PartyMember member = PartyController.instance().getMember(this.player);
+
+ PartyController.instance().requestPlayer(party, member, this.selectedPlayerSlot.username, true);
+ NotificationHandler.instance().sendNotification(new Notification(NotificationType.PARTY_REQUEST, this.player.username, this.selectedPlayerSlot.username));
+ }
+ break;
+ }
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ public void drawScreen(int x, int y, float partialTick)
+ {
+ this.buttonList.clear();
+
+ List playerList = this.mc.thePlayer.sendQueue.playerInfoList;
+
+ if (playerList.size() != this.playerSlots.size())
+ {
+ this.playerSlots.clear();
+ this.slotsCreated = false;
+ }
+
+ drawDefaultBackground();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+ int dmsy = Mouse.getDWheel();
+ this.sbar.sliderValue -= dmsy / 1000.0F;
+ if (this.sbar.sliderValue > 1.0F) this.sbar.sliderValue = 1.0F;
+ if (this.sbar.sliderValue < 0.0F) this.sbar.sliderValue = 0.0F;
+ int centerX = this.xMember - 70;
+ int centerY = this.yMember - 84;
+
+ ScaledResolution sr = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ drawTexturedModalRect(centerX, centerY, 0, 0, 141, this.hMember);
+ this.totalHeight = 0;
+ int slotW = 100;
+ int slotH = 20;
+ int gutter = 2;
+ GL11.glEnable(3089);
+ GL11.glScissor((centerX + 14) * sr.getScaleFactor(), (centerY + 35) * sr.getScaleFactor(), slotW * sr.getScaleFactor(), 103 * sr.getScaleFactor());
+ GL11.glPushMatrix();
+ this.totalHeight = (playerList.size() * (slotH + gutter));
+ float sVal = -this.sbar.sliderValue * (this.totalHeight - 105);
+
+ if (this.totalHeight > 103)
+ {
+ GL11.glTranslatef(0.0F, sVal, 0.0F);
+ }
+
+ this.totalHeight = 0;
+
+ if (!this.slotsCreated)
+ {
+ for (int i = 0; i < playerList.size(); i++)
+ {
+ GuiPlayerInfo guiplayerinfo = (GuiPlayerInfo) playerList.get(i);
+
+ String name = guiplayerinfo.name;
+
+ String skinUrl = "http://skins.minecraft.net/MinecraftSkins/" + StringUtils.stripControlCodes(name) + ".png";
+
+ this.playerSlots.add(new GuiPlayerRequestSlot(name, skinUrl, this.playerSlots.size(), centerX + 15, centerY + this.totalHeight + 30, slotW, slotH));
+
+ this.totalHeight += slotH + gutter;
+ }
+
+ this.slotsCreated = true;
+ }
+
+ for (int i = 0; i < this.playerSlots.size(); i++)
+ {
+ ((GuiPlayerRequestSlot) this.playerSlots.get(i)).drawPlayerSlot(centerX + 15, centerY + this.totalHeight + 30, slotW, slotH);
+
+ this.totalHeight += slotH + gutter;
+ }
+
+ GL11.glPopMatrix();
+ GL11.glDisable(3089);
+
+ if (this.totalHeight > 103)
+ {
+ this.sbar.drawButton(this.mc, x, y);
+ }
+
+ drawString(this.fontRenderer, "Player List", centerX + 40, centerY + 10, 16777215);
+
+ String kickName = "Request";
+
+ this.kickButton = new GuiButton(1, this.xMember + 3, this.yMember + 85 - 28, 58, 20, kickName);
+
+ boolean pending = false;
+
+ if (this.selectedPlayerSlot != null)
+ {
+ pending = NotificationHandler.instance().hasSentToBefore(this.selectedPlayerSlot.username, NotificationType.PARTY_REQUEST, this.player.username);
+ }
+
+ if ((this.selectedPlayerSlot != null) && (this.slotIsSelected) && ((!PartyController.instance().inParty(this.selectedPlayerSlot.username)) || (this.playerSlots.size() == 1)) && (!pending))
+ {
+ this.kickButton.enabled = true;
+ } else this.kickButton.enabled = false;
+
+ this.buttonList.add(new GuiButton(0, this.xMember - 60, this.yMember + 85 - 28, 58, 20, "Back"));
+ this.buttonList.add(this.kickButton);
+
+ super.drawScreen(x, y, partialTick);
+ }
+
+ public void updateScreen()
+ {
+ super.updateScreen();
+ ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+ this.xMember = (width / 2);
+ this.yMember = (height / 2);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.notifications.client.GuiRequestPlayer
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/notifications/client/GuiViewNotification.java b/src/main/java/net/aetherteam/aether/notifications/client/GuiViewNotification.java
new file mode 100644
index 0000000..67491c7
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/notifications/client/GuiViewNotification.java
@@ -0,0 +1,165 @@
+package net.aetherteam.aether.notifications.client;
+
+import cpw.mods.fml.client.FMLClientHandler;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import net.aetherteam.aether.client.gui.social.PartyData;
+import net.aetherteam.aether.client.gui.social.dialogue.GuiDialogueBox;
+import net.aetherteam.aether.notifications.Notification;
+import net.aetherteam.aether.notifications.NotificationType;
+import net.aetherteam.aether.notifications.actions.NotificationAction;
+import net.aetherteam.aether.notifications.description.NotificationContents;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.settings.GameSettings;
+import net.minecraft.client.settings.KeyBinding;
+import net.minecraft.entity.player.EntityPlayer;
+import org.lwjgl.opengl.GL11;
+
+public class GuiViewNotification extends GuiScreen
+{
+ private final PartyData pm;
+ private int backgroundTexture;
+ private int xParty;
+ private int yParty;
+ private int wParty;
+ private int hParty;
+ Minecraft f;
+ private Notification notification;
+ private GuiScreen parent;
+ private EntityPlayer player;
+ private GuiButton acceptButton;
+ private GuiButton denyButton;
+ private GuiButton backButton;
+
+ public GuiViewNotification(EntityPlayer player, Notification notification, GuiScreen parent)
+ {
+ this(new PartyData(), player, notification, parent);
+ }
+
+ public GuiViewNotification(PartyData pm, EntityPlayer player, Notification notification, GuiScreen parent)
+ {
+ this.parent = parent;
+ this.notification = notification;
+ this.player = player;
+ this.mc = FMLClientHandler.instance().getClient();
+ this.pm = pm;
+ this.backgroundTexture = this.mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/notification/view.png");
+ this.wParty = 256;
+ this.hParty = 126;
+ updateScreen();
+ }
+
+ protected void keyTyped(char charTyped, int keyTyped)
+ {
+ super.keyTyped(charTyped, keyTyped);
+
+ if (keyTyped == Minecraft.getMinecraft().gameSettings.keyBindInventory.keyCode)
+ {
+ this.mc.displayGuiScreen((GuiScreen) null);
+ this.mc.setIngameFocus();
+ }
+ }
+
+ public void initGui()
+ {
+ updateScreen();
+ this.buttonList.clear();
+
+ this.acceptButton = new GuiButton(0, this.xParty - 30, this.yParty + 34, 60, 20, "Accept");
+ this.denyButton = new GuiButton(1, this.xParty - 100, this.yParty + 34, 60, 20, "Decline");
+ this.backButton = new GuiButton(2, this.xParty + 40, this.yParty + 34, 60, 20, "Back");
+
+ this.buttonList.add(this.acceptButton);
+ this.buttonList.add(this.denyButton);
+ this.buttonList.add(this.backButton);
+ }
+
+ protected void actionPerformed(GuiButton button)
+ {
+ NotificationType type = this.notification.getType();
+
+ switch (button.id)
+ {
+ case 0:
+ PartyMember recruiter = PartyController.instance().getMember(this.notification.getSenderName());
+ Party party = PartyController.instance().getParty(recruiter);
+
+ this.mc.displayGuiScreen(new GuiDialogueBox(this.parent, type.action.acceptMessage(this.notification), type.action.failedMessage(this.notification), type.action.executeAccept(this.notification)));
+ break;
+ case 1:
+ type.action.executeDecline(this.notification);
+
+ this.mc.displayGuiScreen(this.parent);
+ break;
+ case 2:
+ this.mc.displayGuiScreen(this.parent);
+ }
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ public void drawScreen(int x, int y, float partialTick)
+ {
+ drawDefaultBackground();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+ int centerX = this.xParty - 128;
+ int centerY = this.yParty - 63;
+
+ ScaledResolution sr = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ drawTexturedModalRect(centerX, centerY, 0, 0, 256, this.hParty);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+
+ String name = "Viewing Notification";
+
+ this.mc.renderEngine.resetBoundTexture();
+ drawString(this.fontRenderer, name, this.width / 2 - this.fontRenderer.getStringWidth(name) / 2, centerY + 7, 16777215);
+
+ String title = this.notification.getTypeContents().getTitle(this.notification);
+
+ this.mc.renderEngine.resetBoundTexture();
+ drawString(this.fontRenderer, title, this.width / 2 - this.fontRenderer.getStringWidth(title) / 2, centerY + 27, 16777215);
+
+ String description = this.notification.getTypeContents().getDescription(this.notification);
+
+ ArrayList descriptions = new StringBox(description, 45).getStringList();
+
+ for (int count = 0; count < descriptions.size(); count++)
+ {
+ String newLine = (String) descriptions.get(count);
+
+ this.mc.renderEngine.resetBoundTexture();
+ drawString(this.fontRenderer, newLine, this.width / 2 - this.fontRenderer.getStringWidth(newLine) / 2, centerY + 45 + count * 10, 16777215);
+ }
+
+ super.drawScreen(x, y, partialTick);
+ }
+
+ public void updateScreen()
+ {
+ super.updateScreen();
+ ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+ this.xParty = (width / 2);
+ this.yParty = (height / 2);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.notifications.client.GuiViewNotification
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/notifications/client/StringBox.java b/src/main/java/net/aetherteam/aether/notifications/client/StringBox.java
new file mode 100644
index 0000000..5b9a2d4
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/notifications/client/StringBox.java
@@ -0,0 +1,40 @@
+package net.aetherteam.aether.notifications.client;
+
+import java.util.ArrayList;
+
+public class StringBox
+{
+ String text = new String();
+ int boxCharWidth = 10;
+
+ public StringBox(String text, int boxCharWidth)
+ {
+ this.text = text;
+ this.boxCharWidth = boxCharWidth;
+ }
+
+ public ArrayList getStringList()
+ {
+ ArrayList strings = new ArrayList();
+
+ while (this.text.length() > this.boxCharWidth)
+ {
+ String subDescription = this.text.substring(0, this.boxCharWidth);
+ this.text = this.text.replace(this.text.substring(0, this.boxCharWidth), "");
+
+ strings.add(subDescription);
+ }
+
+ if ((this.text.length() > 0) && (this.text.length() <= this.boxCharWidth))
+ {
+ strings.add(this.text);
+ }
+
+ return strings;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.notifications.client.StringBox
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/notifications/description/DungeonRequestContents.java b/src/main/java/net/aetherteam/aether/notifications/description/DungeonRequestContents.java
new file mode 100644
index 0000000..d378dae
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/notifications/description/DungeonRequestContents.java
@@ -0,0 +1,37 @@
+package net.aetherteam.aether.notifications.description;
+
+import net.aetherteam.aether.notifications.Notification;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+
+public class DungeonRequestContents extends NotificationContents
+{
+ public String getTitle(Notification notification)
+ {
+ return "§r§n" + notification.getTypeName() + "§r - " + new StringBuilder().append("§r§ofrom ").append(notification.getSenderName()).toString();
+ }
+
+ public String getDescription(Notification notification)
+ {
+ PartyMember recruiter = PartyController.instance().getMember(notification.getSenderName());
+ Party party = PartyController.instance().getParty(recruiter);
+
+ String description = null;
+
+ if (party != null)
+ {
+ description = "Would you like to raid a dungeon with us?" + " My party is called " + new StringBuilder().append('"').append(party.getName()).append('"').toString() + ". WARNING: Dungeons can be a very dangerous place, resulting in the loss of precious items.";
+ } else
+ {
+ description = "Sorry, but I am no longer in a party. You can deny this dungeon raid request.";
+ }
+
+ return description;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.notifications.description.DungeonRequestContents
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/notifications/description/GenericContents.java b/src/main/java/net/aetherteam/aether/notifications/description/GenericContents.java
new file mode 100644
index 0000000..f9baf43
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/notifications/description/GenericContents.java
@@ -0,0 +1,21 @@
+package net.aetherteam.aether.notifications.description;
+
+import net.aetherteam.aether.notifications.Notification;
+
+public class GenericContents extends NotificationContents
+{
+ public String getTitle(Notification notification)
+ {
+ return "Generic Request:";
+ }
+
+ public String getDescription(Notification notification)
+ {
+ return "This is a generic description!";
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.notifications.description.GenericContents
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/notifications/description/NotificationContents.java b/src/main/java/net/aetherteam/aether/notifications/description/NotificationContents.java
new file mode 100644
index 0000000..d4e32e6
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/notifications/description/NotificationContents.java
@@ -0,0 +1,15 @@
+package net.aetherteam.aether.notifications.description;
+
+import net.aetherteam.aether.notifications.Notification;
+
+public abstract class NotificationContents
+{
+ public abstract String getTitle(Notification paramNotification);
+
+ public abstract String getDescription(Notification paramNotification);
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.notifications.description.NotificationContents
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/notifications/description/PartyRequestContents.java b/src/main/java/net/aetherteam/aether/notifications/description/PartyRequestContents.java
new file mode 100644
index 0000000..f764529
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/notifications/description/PartyRequestContents.java
@@ -0,0 +1,37 @@
+package net.aetherteam.aether.notifications.description;
+
+import net.aetherteam.aether.notifications.Notification;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+
+public class PartyRequestContents extends NotificationContents
+{
+ public String getTitle(Notification notification)
+ {
+ return "§r§n" + notification.getTypeName() + "§r - " + new StringBuilder().append("§r§ofrom ").append(notification.getSenderName()).toString();
+ }
+
+ public String getDescription(Notification notification)
+ {
+ PartyMember recruiter = PartyController.instance().getMember(notification.getSenderName());
+ Party party = PartyController.instance().getParty(recruiter);
+
+ String description = null;
+
+ if (party != null)
+ {
+ description = "Would you like to join my party?" + " My party is called " + new StringBuilder().append('"').append(party.getName()).append('"').toString() + ".";
+ } else
+ {
+ description = "Sorry, but I am no longer in a party. You can deny this party request.";
+ }
+
+ return description;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.notifications.description.PartyRequestContents
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/oldcode/AetherGenBuildings.java b/src/main/java/net/aetherteam/aether/oldcode/AetherGenBuildings.java
new file mode 100644
index 0000000..84c3fc4
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/oldcode/AetherGenBuildings.java
@@ -0,0 +1,258 @@
+package net.aetherteam.aether.oldcode;
+
+import java.util.Random;
+
+import net.minecraft.world.World;
+import net.minecraft.world.gen.feature.WorldGenerator;
+
+public class AetherGenBuildings extends WorldGenerator
+{
+ public int blockID1;
+ public int blockID2;
+ public int meta1;
+ public int meta2;
+ public int chance;
+ public boolean replaceAir;
+ public boolean replaceSolid;
+
+ public boolean generate(World var1, Random var2, int var3, int var4, int var5)
+ {
+ return false;
+ }
+
+ public void setBlocks(int var1, int var2, int var3)
+ {
+ this.blockID1 = var1;
+ this.blockID2 = var2;
+ this.chance = var3;
+
+ if (this.chance < 1)
+ {
+ this.chance = 1;
+ }
+ }
+
+ public void setMetadata(int var1, int var2)
+ {
+ this.meta1 = var1;
+ this.meta2 = var2;
+ }
+
+ public void addLineX(World var1, Random var2, int var3, int var4, int var5, int var6)
+ {
+ for (int var7 = var3; var7 < var3 + var6; ++var7)
+ {
+ if ((this.replaceAir || var1.getBlockId(var7, var4, var5) != 0) && (this.replaceSolid || var1.getBlockId(var7, var4, var5) == 0))
+ {
+ if (var2.nextInt(this.chance) == 0)
+ {
+ var1.setBlock(var7, var4, var5, this.blockID2, this.meta2, 2);
+ } else
+ {
+ var1.setBlock(var7, var4, var5, this.blockID1, this.meta1, 2);
+ }
+ }
+ }
+ }
+
+ public void addLineY(World var1, Random var2, int var3, int var4, int var5, int var6)
+ {
+ for (int var7 = var4; var7 < var4 + var6; ++var7)
+ {
+ if ((this.replaceAir || var1.getBlockId(var3, var7, var5) != 0) && (this.replaceSolid || var1.getBlockId(var3, var7, var5) == 0))
+ {
+ if (var2.nextInt(this.chance) == 0)
+ {
+ var1.setBlock(var3, var7, var5, this.blockID2, this.meta2, 2);
+ } else
+ {
+ var1.setBlock(var3, var7, var5, this.blockID1, this.meta1, 2);
+ }
+ }
+ }
+ }
+
+ public void addLineZ(World var1, Random var2, int var3, int var4, int var5, int var6)
+ {
+ for (int var7 = var5; var7 < var5 + var6; ++var7)
+ {
+ if ((this.replaceAir || var1.getBlockId(var3, var4, var7) != 0) && (this.replaceSolid || var1.getBlockId(var3, var4, var7) == 0))
+ {
+ if (var2.nextInt(this.chance) == 0)
+ {
+ var1.setBlock(var3, var4, var7, this.blockID2, this.meta2, 2);
+ } else
+ {
+ var1.setBlock(var3, var4, var7, this.blockID1, this.meta1, 2);
+ }
+ }
+ }
+ }
+
+ public void addPlaneX(World var1, Random var2, int var3, int var4, int var5, int var6, int var7)
+ {
+ for (int var8 = var4; var8 < var4 + var6; ++var8)
+ {
+ for (int var9 = var5; var9 < var5 + var7; ++var9)
+ {
+ if ((this.replaceAir || var1.getBlockId(var3, var8, var9) != 0) && (this.replaceSolid || var1.getBlockId(var3, var8, var9) == 0))
+ {
+ if (var2.nextInt(this.chance) == 0)
+ {
+ var1.setBlock(var3, var8, var9, this.blockID2, this.meta2, 2);
+ } else
+ {
+ var1.setBlock(var3, var8, var9, this.blockID1, this.meta1, 2);
+ }
+ }
+ }
+ }
+ }
+
+ public void addPlaneY(World var1, Random var2, int var3, int var4, int var5, int var6, int var7)
+ {
+ for (int var8 = var3; var8 < var3 + var6; ++var8)
+ {
+ for (int var9 = var5; var9 < var5 + var7; ++var9)
+ {
+ if ((this.replaceAir || var1.getBlockId(var8, var4, var9) != 0) && (this.replaceSolid || var1.getBlockId(var8, var4, var9) == 0))
+ {
+ if (var2.nextInt(this.chance) == 0)
+ {
+ var1.setBlock(var8, var4, var9, this.blockID2, this.meta2, 2);
+ } else
+ {
+ var1.setBlock(var8, var4, var9, this.blockID1, this.meta1, 2);
+ }
+ }
+ }
+ }
+ }
+
+ public void addPlaneZ(World var1, Random var2, int var3, int var4, int var5, int var6, int var7)
+ {
+ for (int var8 = var3; var8 < var3 + var6; ++var8)
+ {
+ for (int var9 = var4; var9 < var4 + var7; ++var9)
+ {
+ if ((this.replaceAir || var1.getBlockId(var8, var9, var5) != 0) && (this.replaceSolid || var1.getBlockId(var8, var9, var5) == 0))
+ {
+ if (var2.nextInt(this.chance) == 0)
+ {
+ var1.setBlock(var8, var9, var5, this.blockID2, this.meta2, 2);
+ } else
+ {
+ var1.setBlock(var8, var9, var5, this.blockID1, this.meta1, 2);
+ }
+ }
+ }
+ }
+ }
+
+ public void addHollowBox(World var1, Random var2, int var3, int var4, int var5, int var6, int var7, int var8)
+ {
+ int var9 = this.blockID1;
+ int var10 = this.blockID2;
+ this.setBlocks(0, 0, this.chance);
+ this.addSolidBox(var1, var2, var3, var4, var5, var6, var7, var8);
+ this.setBlocks(var9, var10, this.chance);
+ this.addPlaneY(var1, var2, var3, var4, var5, var6, var8);
+ this.addPlaneY(var1, var2, var3, var4 + var7 - 1, var5, var6, var8);
+ this.addPlaneX(var1, var2, var3, var4, var5, var7, var8);
+ this.addPlaneX(var1, var2, var3 + var6 - 1, var4, var5, var7, var8);
+ this.addPlaneZ(var1, var2, var3, var4, var5, var6, var7);
+ this.addPlaneZ(var1, var2, var3, var4, var5 + var8 - 1, var6, var7);
+ }
+
+ public void addSquareTube(World var1, Random var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9)
+ {
+ int var10 = this.blockID1;
+ int var11 = this.blockID2;
+ this.setBlocks(0, 0, this.chance);
+ this.addSolidBox(var1, var2, var3, var4, var5, var6, var7, var8);
+ this.setBlocks(var10, var11, this.chance);
+
+ if (var9 == 0 || var9 == 2)
+ {
+ this.addPlaneY(var1, var2, var3, var4, var5, var6, var8);
+ this.addPlaneY(var1, var2, var3, var4 + var7 - 1, var5, var6, var8);
+ }
+
+ if (var9 == 1 || var9 == 2)
+ {
+ this.addPlaneX(var1, var2, var3, var4, var5, var7, var8);
+ this.addPlaneX(var1, var2, var3 + var6 - 1, var4, var5, var7, var8);
+ }
+
+ if (var9 == 0 || var9 == 1)
+ {
+ this.addPlaneZ(var1, var2, var3, var4, var5, var6, var7);
+ this.addPlaneZ(var1, var2, var3, var4, var5 + var8 - 1, var6, var7);
+ }
+ }
+
+ public void addSolidBox(World var1, Random var2, int var3, int var4, int var5, int var6, int var7, int var8)
+ {
+ for (int var9 = var3; var9 < var3 + var6; ++var9)
+ {
+ for (int var10 = var4; var10 < var4 + var7; ++var10)
+ {
+ for (int var11 = var5; var11 < var5 + var8; ++var11)
+ {
+ if ((this.replaceAir || var1.getBlockId(var9, var10, var11) != 0) && (this.replaceSolid || var1.getBlockId(var9, var10, var11) == 0))
+ {
+ if (var2.nextInt(this.chance) == 0)
+ {
+ var1.setBlock(var9, var10, var11, this.blockID2, this.meta2, 2);
+ } else
+ {
+ var1.setBlock(var9, var10, var11, this.blockID1, this.meta1, 2);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public boolean isBoxSolid(World var1, int var2, int var3, int var4, int var5, int var6, int var7)
+ {
+ boolean var8 = true;
+
+ for (int var9 = var2; var9 < var2 + var5; ++var9)
+ {
+ for (int var10 = var3; var10 < var3 + var6; ++var10)
+ {
+ for (int var11 = var4; var11 < var4 + var7; ++var11)
+ {
+ if (var1.getBlockId(var9, var10, var11) == 0)
+ {
+ var8 = false;
+ }
+ }
+ }
+ }
+
+ return var8;
+ }
+
+ public boolean isBoxEmpty(World var1, int var2, int var3, int var4, int var5, int var6, int var7)
+ {
+ boolean var8 = true;
+
+ for (int var9 = var2; var9 < var2 + var5; ++var9)
+ {
+ for (int var10 = var3; var10 < var3 + var6; ++var10)
+ {
+ for (int var11 = var4; var11 < var4 + var7; ++var11)
+ {
+ if (var1.getBlockId(var9, var10, var11) != 0)
+ {
+ var8 = false;
+ }
+ }
+ }
+ }
+
+ return var8;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/oldcode/AetherGenDungeonBronze.java b/src/main/java/net/aetherteam/aether/oldcode/AetherGenDungeonBronze.java
new file mode 100644
index 0000000..2f44e55
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/oldcode/AetherGenDungeonBronze.java
@@ -0,0 +1,445 @@
+package net.aetherteam.aether.oldcode;
+
+import java.util.Random;
+
+import net.aetherteam.aether.AetherLoot;
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.entities.bosses.EntitySlider;
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.block.Block;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntityChest;
+import net.minecraft.world.World;
+
+public class AetherGenDungeonBronze extends AetherGenBuildings
+{
+ private int corridorMeta1;
+ private int corridorMeta2;
+ private int lockedBlockID1;
+ private int lockedBlockID2;
+ private int wallBlockID1;
+ private int wallBlockID2;
+ private int corridorBlockID1;
+ private int corridorBlockID2;
+ private int numRooms;
+ private int n;
+ private boolean finished;
+ private boolean flat;
+
+ public AetherGenDungeonBronze(int var1, int var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9, boolean var10)
+ {
+ this.lockedBlockID1 = var1;
+ this.lockedBlockID2 = var2;
+ this.wallBlockID1 = var3;
+ this.wallBlockID2 = var4;
+ this.corridorBlockID1 = var5;
+ this.corridorMeta1 = var6;
+ this.corridorBlockID2 = var7;
+ this.corridorMeta2 = var8;
+ this.numRooms = var9;
+ this.flat = var10;
+ this.finished = false;
+ }
+
+ public boolean generate(World var1, Random var2, int var3, int var4, int var5)
+ {
+ this.replaceAir = true;
+ this.replaceSolid = true;
+ this.n = 0;
+
+ if (this.isBoxSolid(var1, var3, var4, var5, 16, 12, 16) && this.isBoxSolid(var1, var3 + 20, var4, var5 + 2, 12, 12, 12))
+ {
+ this.setBlocks(this.lockedBlockID1, this.lockedBlockID2, 20);
+ this.addHollowBox(var1, var2, var3, var4, var5, 16, 12, 16);
+ this.addHollowBox(var1, var2, var3 + 6, var4 - 2, var5 + 6, 4, 4, 4);
+ EntitySlider var6 = new EntitySlider(var1, (double) (var3 + 8), (double) (var4 + 2), (double) (var5 + 8));
+ var6.setDungeon(var3, var4, var5);
+ var1.spawnEntityInWorld(var6);
+ int var7 = var3 + 7 + var2.nextInt(2);
+ int var8 = var4 - 1;
+ int var9 = var5 + 7 + var2.nextInt(2);
+ var1.setBlock(var7, var8, var9, AetherBlocks.TreasureChest.blockID);
+ TileEntityChest var10 = (TileEntityChest) ((TileEntityChest) var1.getBlockTileEntity(var7, var8, var9));
+ var7 = var3 + 20;
+ var9 = var5 + 2;
+
+ if (!this.isBoxSolid(var1, var7, var4, var9, 12, 12, 12))
+ {
+ return true;
+ } else
+ {
+ this.setBlocks(this.wallBlockID1, this.wallBlockID2, 20);
+ this.addHollowBox(var1, var2, var7, var4, var9, 12, 12, 12);
+ this.setBlocks(this.corridorBlockID2, this.corridorBlockID1, 5);
+ this.setMetadata(this.corridorMeta2, this.corridorMeta1);
+ this.addSquareTube(var1, var2, var7 - 5, var4, var9 + 3, 6, 6, 6, 0);
+
+ for (int var11 = var7 + 2; var11 < var7 + 10; var11 += 3)
+ {
+ for (int var12 = var9 + 2; var12 < var9 + 10; var12 += 3)
+ {
+ var1.setBlock(var11, var4, var12, AetherBlocks.Trap.blockID, 0, 2);
+ }
+ }
+
+ ++this.n;
+ this.generateNextRoom(var1, var2, var7, var4, var9);
+ this.generateNextRoom(var1, var2, var7, var4, var9);
+
+ if (this.n > this.numRooms || !this.finished)
+ {
+ this.endCorridor(var1, var2, var7, var4, var9);
+ }
+
+ return true;
+ }
+ } else
+ {
+ return false;
+ }
+ }
+
+ public boolean generateNextRoom(World var1, Random var2, int var3, int var4, int var5)
+ {
+ if (this.n > this.numRooms && !this.finished)
+ {
+ this.endCorridor(var1, var2, var3, var4, var5);
+ return false;
+ } else
+ {
+ int var6 = var2.nextInt(4);
+ int var7 = var3;
+ int var8 = var4;
+ int var9 = var5;
+
+ if (var6 == 0)
+ {
+ var7 = var3 + 16;
+ var9 = var5 + 0;
+ }
+
+ if (var6 == 1)
+ {
+ var7 += 0;
+ var9 += 16;
+ }
+
+ if (var6 == 2)
+ {
+ var7 -= 16;
+ var9 += 0;
+ }
+
+ if (var6 == 3)
+ {
+ var7 += 0;
+ var9 -= 16;
+ }
+
+ if (!this.isBoxSolid(var1, var7, var4, var9, 12, 8, 12))
+ {
+ return false;
+ } else
+ {
+ this.setBlocks(this.wallBlockID1, this.wallBlockID2, 20);
+ this.setMetadata(0, 0);
+ this.addHollowBox(var1, var2, var7, var4, var9, 12, 8, 12);
+ int var12;
+ int var11;
+ int var10;
+
+ for (var10 = var7; var10 < var7 + 12; ++var10)
+ {
+ for (var11 = var8; var11 < var8 + 8; ++var11)
+ {
+ for (var12 = var9; var12 < var9 + 12; ++var12)
+ {
+ if (var1.getBlockId(var10, var11, var12) == this.wallBlockID1 && var2.nextInt(100) == 0)
+ {
+ var1.setBlock(var10, var11, var12, AetherBlocks.Trap.blockID);
+ }
+ }
+ }
+ }
+
+ for (var10 = var7 + 2; var10 < var7 + 10; var10 += 7)
+ {
+ for (var11 = var9 + 2; var11 < var9 + 10; var11 += 7)
+ {
+ var1.setBlock(var10, var4, var11, AetherBlocks.Trap.blockID, 0, 2);
+ }
+ }
+
+ this.addPlaneY(var1, var2, var7 + 4, var8 + 1, var9 + 4, 4, 4);
+ var10 = var2.nextInt(2);
+ var11 = var7 + 5 + var2.nextInt(2);
+ var12 = var9 + 5 + var2.nextInt(2);
+
+ switch (var10)
+ {
+ case 0:
+ var1.setBlock(var11, var8 + 2, var12, AetherBlocks.SkyrootChestMimic.blockID);
+ break;
+
+ case 1:
+ if (var1.getBlockId(var11, var8 + 2, var12) == 0)
+ {
+ var1.setBlock(var11, var8 + 2, var12, Block.chest.blockID);
+ TileEntityChest var13 = (TileEntityChest) var1.getBlockTileEntity(var11, var8 + 2, var12);
+
+ for (var11 = 0; var11 < 3 + var2.nextInt(3); ++var11)
+ {
+ var13.setInventorySlotContents(var2.nextInt(var13.getSizeInventory()), AetherLoot.NORMAL.getRandomItem(var2));
+ }
+ }
+ }
+
+ this.setBlocks(this.corridorBlockID2, this.corridorBlockID1, 5);
+ this.setMetadata(this.corridorMeta2, this.corridorMeta1);
+
+ switch (var6)
+ {
+ case 0:
+ this.addSquareTube(var1, var2, var7 - 5, var8, var9 + 3, 6, 6, 6, 0);
+ break;
+
+ case 1:
+ this.addSquareTube(var1, var2, var7 + 3, var8, var9 - 5, 6, 6, 6, 2);
+ break;
+
+ case 2:
+ this.addSquareTube(var1, var2, var7 + 11, var8, var9 + 3, 6, 6, 6, 0);
+ break;
+
+ case 3:
+ this.addSquareTube(var1, var2, var7 + 3, var8, var9 + 11, 6, 6, 6, 2);
+ }
+
+ ++this.n;
+
+ if (!this.generateNextRoom(var1, var2, var7, var8, var9))
+ {
+ return false;
+ } else
+ {
+ return this.generateNextRoom(var1, var2, var7, var8, var9);
+ }
+ }
+ }
+ }
+
+ public void endCorridor(World var1, Random var2, int var3, int var4, int var5)
+ {
+ this.replaceAir = false;
+ boolean var6 = true;
+ int var8 = var2.nextInt(3);
+ int var9 = var3;
+ int var10 = var4;
+ int var11 = var5;
+ boolean var7;
+
+ if (var8 == 0)
+ {
+ var9 = var3 + 11;
+
+ for (var11 = var5 + 3; var6; ++var9)
+ {
+ if (this.isBoxEmpty(var1, var9, var10, var11, 1, 8, 6) || var9 - var3 > 100)
+ {
+ var6 = false;
+ }
+
+ var7 = true;
+
+ while (var7 && (var1.getBlockId(var9, var10, var11) == this.wallBlockID1 || var1.getBlockId(var9, var10, var11) == this.wallBlockID2 || var1.getBlockId(var9, var10, var11) == this.lockedBlockID1 || var1.getBlockId(var9, var10, var11) == this.lockedBlockID2))
+ {
+ if (var1.getBlockId(var9 + 1, var10, var11) != this.wallBlockID1 && var1.getBlockId(var9 + 1, var10, var11) != this.wallBlockID2 && var1.getBlockId(var9 + 1, var10, var11) != this.lockedBlockID1 && var1.getBlockId(var9 + 1, var10, var11) != this.lockedBlockID2)
+ {
+ var7 = false;
+ } else
+ {
+ ++var9;
+ }
+ }
+
+ this.setBlocks(this.corridorBlockID2, this.corridorBlockID1, 5);
+ this.setMetadata(this.corridorMeta2, this.corridorMeta1);
+ this.addPlaneX(var1, var2, var9, var10, var11, 8, 6);
+ this.setBlocks(0, 0, 1);
+ this.addPlaneX(var1, var2, var9, var10 + 1, var11 + 1, 6, 4);
+ }
+ }
+
+ if (var8 == 1)
+ {
+ var9 += 3;
+
+ for (var11 += 11; var6; ++var11)
+ {
+ if (this.isBoxEmpty(var1, var9, var10, var11, 6, 8, 1) || var11 - var5 > 100)
+ {
+ var6 = false;
+ }
+
+ var7 = true;
+
+ while (var7 && (var1.getBlockId(var9, var10, var11) == this.wallBlockID1 || var1.getBlockId(var9, var10, var11) == this.wallBlockID2 || var1.getBlockId(var9, var10, var11) == this.lockedBlockID1 || var1.getBlockId(var9, var10, var11) == this.lockedBlockID2))
+ {
+ if (var1.getBlockId(var9, var10, var11 + 1) != this.wallBlockID1 && var1.getBlockId(var9, var10, var11 + 1) != this.wallBlockID2 && var1.getBlockId(var9, var10, var11 + 1) != this.lockedBlockID1 && var1.getBlockId(var9, var10, var11 + 1) != this.lockedBlockID2)
+ {
+ var7 = false;
+ } else
+ {
+ ++var11;
+ }
+ }
+
+ this.setBlocks(this.corridorBlockID2, this.corridorBlockID1, 5);
+ this.setMetadata(this.corridorMeta2, this.corridorMeta1);
+ this.addPlaneZ(var1, var2, var9, var10, var11, 6, 8);
+ this.setBlocks(0, 0, 1);
+ this.addPlaneZ(var1, var2, var9 + 1, var10 + 1, var11, 4, 6);
+ }
+ }
+
+ if (var8 == 2)
+ {
+ var9 += 3;
+
+ for (var11 += 0; var6; --var11)
+ {
+ if (this.isBoxEmpty(var1, var9, var10, var11, 6, 8, 1) || var4 - var11 > 100)
+ {
+ var6 = false;
+ }
+
+ var7 = true;
+
+ while (var7 && (var1.getBlockId(var9, var10, var11) == this.wallBlockID1 || var1.getBlockId(var9, var10, var11) == this.wallBlockID2 || var1.getBlockId(var9, var10, var11) == this.lockedBlockID1 || var1.getBlockId(var9, var10, var11) == this.lockedBlockID2))
+ {
+ if (var1.getBlockId(var9, var10, var11 - 1) != this.wallBlockID1 && var1.getBlockId(var9, var10, var11 - 1) != this.wallBlockID2 && var1.getBlockId(var9, var10, var11 - 1) != this.lockedBlockID1 && var1.getBlockId(var9, var10, var11 - 1) != this.lockedBlockID2)
+ {
+ var7 = false;
+ } else
+ {
+ --var11;
+ }
+ }
+
+ this.setBlocks(this.corridorBlockID2, this.corridorBlockID1, 5);
+ this.setMetadata(this.corridorMeta2, this.corridorMeta1);
+ this.addPlaneZ(var1, var2, var9, var10, var11, 6, 8);
+ this.setBlocks(0, 0, 1);
+ this.addPlaneZ(var1, var2, var9 + 1, var10 + 1, var11, 4, 6);
+ }
+ }
+
+ this.finished = true;
+ }
+
+ private ItemStack getNormalLoot(Random var1)
+ {
+ int var2 = var1.nextInt(14);
+
+ switch (var2)
+ {
+ case 0:
+ return new ItemStack(AetherItems.ZanitePickaxe);
+
+ case 1:
+ return new ItemStack(AetherItems.ZaniteAxe);
+
+ case 2:
+ return new ItemStack(AetherItems.ZaniteSword);
+
+ case 3:
+ return new ItemStack(AetherItems.ZaniteShovel);
+
+ case 4:
+ return new ItemStack(AetherItems.SwetCape);
+
+ case 5:
+ return new ItemStack(AetherItems.AmbrosiumShard, var1.nextInt(10) + 1);
+
+ case 6:
+ return new ItemStack(AetherItems.Dart, var1.nextInt(5) + 1, 0);
+
+ case 7:
+ return new ItemStack(AetherItems.Dart, var1.nextInt(3) + 1, 1);
+
+ case 8:
+ return new ItemStack(AetherItems.Dart, var1.nextInt(3) + 1, 2);
+
+ case 9:
+ if (var1.nextInt(20) == 0)
+ {
+ return new ItemStack(AetherItems.AetherMusicDisk);
+ }
+
+ break;
+
+ case 10:
+ return new ItemStack(AetherItems.SkyrootBucket);
+
+ case 11:
+ if (var1.nextInt(10) == 0)
+ {
+ return new ItemStack(Item.itemsList[Item.record13.itemID + var1.nextInt(2)]);
+ }
+
+ break;
+
+ case 12:
+ if (var1.nextInt(4) == 0)
+ {
+ return new ItemStack(AetherItems.IronRing);
+ }
+
+ break;
+
+ case 13:
+ if (var1.nextInt(10) == 0)
+ {
+ return new ItemStack(AetherItems.GoldenRing);
+ }
+ }
+
+ return new ItemStack(AetherBlocks.AmbrosiumTorch);
+ }
+
+ private ItemStack getBronzeLoot(Random var1)
+ {
+ int var2 = var1.nextInt(8);
+
+ switch (var2)
+ {
+ case 0:
+ return new ItemStack(AetherItems.GummieSwet, var1.nextInt(7) + 1, var1.nextInt(2));
+
+ case 1:
+ return new ItemStack(AetherItems.DartShooter, 1, 3);
+
+ case 2:
+ return new ItemStack(AetherItems.FlamingSword);
+
+ case 3:
+ return new ItemStack(AetherItems.HammerOfNotch);
+
+ case 4:
+ return new ItemStack(AetherItems.LightningKnife, var1.nextInt(15) + 1);
+
+ case 5:
+ return new ItemStack(AetherItems.ValkyrieLance);
+
+ case 6:
+ return new ItemStack(AetherItems.AgilityCape);
+
+ case 7:
+ return new ItemStack(AetherItems.SentryBoots);
+
+ default:
+ return new ItemStack(AetherItems.SkyrootStick);
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/oldcode/BlockSunAltar.java b/src/main/java/net/aetherteam/aether/oldcode/BlockSunAltar.java
new file mode 100644
index 0000000..8c7d942
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/oldcode/BlockSunAltar.java
@@ -0,0 +1,34 @@
+package net.aetherteam.aether.oldcode;
+
+import net.aetherteam.aether.blocks.BlockAether;
+import net.aetherteam.aether.blocks.IAetherBlock;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.Minecraft;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.world.World;
+
+public class BlockSunAltar extends BlockAether implements IAetherBlock
+{
+ Minecraft mc = Minecraft.getMinecraft();
+
+ protected BlockSunAltar(int var1)
+ {
+ super(var1, Material.wood);
+ this.setHardness(2.0F);
+ }
+
+ /**
+ * Called upon block activation (right click on the block.)
+ */
+ public boolean onBlockActivated(World var1, int var2, int var3, int var4, EntityPlayer var5, int var6, float var7, float var8, float var9)
+ {
+ if (var5.dimension != 3)
+ {
+ var5.addChatMessage("block.SunAltar.notPossibleHere");
+ return true;
+ } else
+ {
+ return true;
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/oldcode/EntityElectricBall.java b/src/main/java/net/aetherteam/aether/oldcode/EntityElectricBall.java
new file mode 100644
index 0000000..49af168
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/oldcode/EntityElectricBall.java
@@ -0,0 +1,340 @@
+package net.aetherteam.aether.oldcode;
+
+import cpw.mods.fml.common.registry.IThrowableEntity;
+
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.entities.EntityNewZephyr;
+import net.aetherteam.aether.entities.EntityTempest;
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.effect.EntityLightningBolt;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.MovingObjectPosition;
+import net.minecraft.util.Vec3;
+import net.minecraft.world.World;
+
+public class EntityElectricBall extends EntityLiving implements IThrowableEntity
+{
+ public float[] sinage = new float[3];
+ private static final double topSpeed = 0.125D;
+ private static final float sponge = (180F / (float) Math.PI);
+ public Random random = new Random();
+ private int xTile;
+ private int yTile;
+ private int zTile;
+ private int inTile;
+ protected boolean inGround;
+ public int field_9406_a;
+ protected EntityLiving shootingEntity;
+ private int ticksAlive;
+ private int ticksInAir;
+ public double accelerationX;
+ public double accelerationY;
+ public double accelerationZ;
+
+ public EntityElectricBall(World var1)
+ {
+ super(var1);
+ this.texture = "/net/aetherteam/aether/client/sprites/projectiles/electroball/electroball.png";
+ this.xTile = -1;
+ this.yTile = -1;
+ this.zTile = -1;
+ this.inTile = 0;
+ this.inGround = false;
+ this.field_9406_a = 0;
+ this.ticksInAir = 0;
+ this.setSize(1.0F, 1.0F);
+
+ for (int var2 = 0; var2 < 3; ++var2)
+ {
+ this.sinage[var2] = this.random.nextFloat() * 6.0F;
+ }
+ }
+
+ public void updateAnims()
+ {
+ for (int var1 = 0; var1 < 3; ++var1)
+ {
+ this.sinage[var1] += 0.3F + (float) var1 * 0.13F;
+
+ if (this.sinage[var1] > ((float) Math.PI * 2F))
+ {
+ this.sinage[var1] -= ((float) Math.PI * 2F);
+ }
+ }
+ }
+
+ public EntityElectricBall(World var1, EntityLiving var2, double var3, double var5, double var7)
+ {
+ super(var1);
+ this.xTile = -1;
+ this.yTile = -1;
+ this.zTile = -1;
+ this.inTile = 0;
+ this.inGround = false;
+ this.field_9406_a = 0;
+ this.ticksInAir = 0;
+ this.shootingEntity = var2;
+ this.setSize(0.5F, 0.5F);
+ this.setLocationAndAngles(var2.posX, var2.posY, var2.posZ, var2.rotationYaw, var2.rotationPitch);
+ this.setPositionAndRotation(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
+ this.yOffset = 0.0F;
+ this.motionX = this.motionY = this.motionZ = 0.0D;
+ var3 += this.rand.nextGaussian() * 0.4D;
+ var5 += this.rand.nextGaussian() * 0.4D;
+ var7 += this.rand.nextGaussian() * 0.4D;
+ double var9 = (double) MathHelper.sqrt_double(var3 * var3 + var5 * var5 + var7 * var7);
+ this.accelerationX = var3 / var9 * 0.15000000000000002D;
+ this.accelerationY = var5 / var9 * 0.1D;
+ this.accelerationZ = var7 / var9 * 0.15000000000000002D;
+ }
+
+ /**
+ * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons
+ * use this to react to sunlight and start to burn.
+ */
+ public void onLivingUpdate()
+ {}
+
+ /**
+ * Gets called every tick from main Entity class
+ */
+ public void onEntityUpdate()
+ {
+ super.onEntityUpdate();
+ this.updateAnims();
+
+ if (this.motionX * this.motionY * this.motionZ < 0.1D && this.ticksInAir > 40 && !this.worldObj.isRemote)
+ {
+ this.setDead();
+ }
+
+ if (this.ticksInAir > 200 && !this.worldObj.isRemote)
+ {
+ this.setDead();
+ }
+
+ if (this.field_9406_a > 0)
+ {
+ --this.field_9406_a;
+ }
+
+ if (this.inGround)
+ {
+ int var1 = this.worldObj.getBlockId(this.xTile, this.yTile, this.zTile);
+
+ if (var1 == this.inTile)
+ {
+ ++this.ticksAlive;
+ return;
+ }
+
+ this.inGround = false;
+ this.motionX *= (double) (this.rand.nextFloat() * 0.2F);
+ this.motionY *= (double) (this.rand.nextFloat() * 0.2F);
+ this.motionZ *= (double) (this.rand.nextFloat() * 0.2F);
+ this.ticksAlive = 0;
+ this.ticksInAir = 0;
+ } else
+ {
+ ++this.ticksInAir;
+ }
+
+ Vec3 var15 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
+ Vec3 var2 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
+ MovingObjectPosition var3 = this.worldObj.rayTraceBlocks(var15, var2);
+ var15 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
+ var2 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
+
+ if (var3 != null)
+ {
+ var2 = Vec3.createVectorHelper(var3.hitVec.xCoord, var3.hitVec.yCoord, var3.hitVec.zCoord);
+ }
+
+ Entity var4 = null;
+ List var5 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D));
+ double var6 = 0.0D;
+ int var8;
+
+ for (var8 = 0; var8 < var5.size(); ++var8)
+ {
+ Entity var9 = (Entity) var5.get(var8);
+
+ if (var9.canBeCollidedWith() && (var9 != this.shootingEntity || this.ticksInAir >= 25))
+ {
+ float var10 = 0.3F;
+ AxisAlignedBB var11 = var9.boundingBox.expand((double) var10, (double) var10, (double) var10);
+ MovingObjectPosition var12 = var11.calculateIntercept(var15, var2);
+
+ if (var12 != null)
+ {
+ double var13 = var15.distanceTo(var12.hitVec);
+
+ if (var13 < var6 || var6 == 0.0D)
+ {
+ var4 = var9;
+ var6 = var13;
+ }
+ }
+ }
+ }
+
+ if (var4 != null)
+ {
+ var3 = new MovingObjectPosition(var4);
+ }
+
+ int var20;
+
+ if (var3 != null)
+ {
+ int var17;
+ EntityLightningBolt var19;
+
+ if (var3.entityHit != null)
+ {
+ if (var3.entityHit != this.shootingEntity)
+ {
+ if (!var3.entityHit.attackEntityFrom(DamageSource.causeMobDamage(this.shootingEntity), 0))
+ {
+ ;
+ }
+
+ if (var3.entityHit instanceof EntityPlayer && ((EntityPlayer) var3.entityHit).inventory.armorInventory[0] != null && ((EntityPlayer) var3.entityHit).inventory.armorInventory[0].itemID == AetherItems.SentryBoots.itemID)
+ {
+ this.setDead();
+ } else if (var3.entityHit instanceof EntityPlayer && ((EntityPlayer) var3.entityHit).capabilities.isCreativeMode)
+ {
+ this.setDead();
+ } else if (var3.entityHit != null && !(var3.entityHit instanceof EntityNewZephyr) && !(var3.entityHit instanceof EntityTempest))
+ {
+ var8 = MathHelper.floor_double(var3.entityHit.boundingBox.minX);
+ var17 = MathHelper.floor_double(var3.entityHit.boundingBox.minY);
+ var20 = MathHelper.floor_double(var3.entityHit.boundingBox.minZ);
+ var19 = new EntityLightningBolt(this.worldObj, (double) var8, (double) var17, (double) var20);
+ var19.setLocationAndAngles((double) var8, (double) var17, (double) var20, this.rotationYaw, 0.0F);
+ this.worldObj.spawnEntityInWorld(var19);
+ }
+ }
+ } else
+ {
+ var8 = MathHelper.floor_double(this.posX);
+ var17 = MathHelper.floor_double(this.posY);
+ var20 = MathHelper.floor_double(this.posZ);
+ var19 = new EntityLightningBolt(this.worldObj, this.posX, this.posY, this.posZ);
+ var19.setLocationAndAngles((double) var8, (double) var17, (double) var20, this.rotationYaw, 0.0F);
+ this.worldObj.spawnEntityInWorld(var19);
+ }
+
+ if (!this.worldObj.isRemote)
+ {
+ this.setDead();
+ }
+ }
+
+ this.posX += this.motionX;
+ this.posY += this.motionY;
+ this.posZ += this.motionZ;
+ float var16 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
+ this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
+
+ for (this.rotationPitch = (float) (Math.atan2(this.motionY, (double) var16) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F)
+ {
+ ;
+ }
+
+ while (this.rotationPitch - this.prevRotationPitch >= 180.0F)
+ {
+ this.prevRotationPitch += 360.0F;
+ }
+
+ while (this.rotationYaw - this.prevRotationYaw < -180.0F)
+ {
+ this.prevRotationYaw -= 360.0F;
+ }
+
+ while (this.rotationYaw - this.prevRotationYaw >= 180.0F)
+ {
+ this.prevRotationYaw += 360.0F;
+ }
+
+ this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F;
+ this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F;
+ float var18 = 0.95F;
+
+ if (this.handleWaterMovement())
+ {
+ for (var20 = 0; var20 < 4; ++var20)
+ {
+ float var21 = 0.25F;
+ this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double) var21, this.posY - this.motionY * (double) var21, this.posZ - this.motionZ * (double) var21, this.motionX, this.motionY, this.motionZ);
+ }
+
+ var18 = 0.8F;
+ }
+
+ this.motionX += this.accelerationX;
+ this.motionY += this.accelerationY;
+ this.motionZ += this.accelerationZ;
+ this.motionX *= (double) var18;
+ this.motionY *= (double) var18;
+ this.motionZ *= (double) var18;
+ this.worldObj.spawnParticle("smoke", this.posX, this.posY + 0.5D, this.posZ, 0.0D, 0.0D, 0.0D);
+ this.setPositionAndRotation(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ var1.setShort("xTile", (short) this.xTile);
+ var1.setShort("yTile", (short) this.yTile);
+ var1.setShort("zTile", (short) this.zTile);
+ var1.setByte("inTile", (byte) this.inTile);
+ var1.setByte("shake", (byte) this.field_9406_a);
+ var1.setByte("inGround", (byte) (this.inGround ? 1 : 0));
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ this.xTile = var1.getShort("xTile");
+ this.yTile = var1.getShort("yTile");
+ this.zTile = var1.getShort("zTile");
+ this.inTile = var1.getByte("inTile") & 255;
+ this.field_9406_a = var1.getByte("shake") & 255;
+ this.inGround = var1.getByte("inGround") == 1;
+ }
+
+ public float getCollisionBorderSize()
+ {
+ return 1.0F;
+ }
+
+ public float getShadowSize()
+ {
+ return 0.0F;
+ }
+
+ public Entity getThrower()
+ {
+ return null;
+ }
+
+ public void setThrower(Entity var1) {}
+
+ public int getMaxHealth()
+ {
+ return 0;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/oldcode/EntityFireMinion.java b/src/main/java/net/aetherteam/aether/oldcode/EntityFireMinion.java
new file mode 100644
index 0000000..99706e4
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/oldcode/EntityFireMinion.java
@@ -0,0 +1,42 @@
+package net.aetherteam.aether.oldcode;
+
+import net.minecraft.entity.monster.EntityMob;
+import net.minecraft.world.World;
+
+public class EntityFireMinion extends EntityMob
+{
+ public EntityFireMinion(World var1)
+ {
+ super(var1);
+ this.texture = "/aether/mobs/firemonster.png";
+ this.health = this.getMaxHealth();
+ this.isImmuneToFire = true;
+ }
+
+ public int getMaxHealth()
+ {
+ return 40;
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+
+ if (this.health > 0)
+ {
+ for (int var1 = 0; var1 < 4; ++var1)
+ {
+ double var2 = (double) (this.rand.nextFloat() - 0.5F);
+ double var4 = (double) this.rand.nextFloat();
+ double var6 = (double) (this.rand.nextFloat() - 0.5F);
+ double var8 = this.posX + var2 * var4;
+ double var10 = this.boundingBox.minY + var4 - 0.5D;
+ double var12 = this.posZ + var6 * var4;
+ this.worldObj.spawnParticle("flame", var8, var10, var12, 0.0D, -0.07500000298023224D, 0.0D);
+ }
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/oldcode/EntityFireMonster.java b/src/main/java/net/aetherteam/aether/oldcode/EntityFireMonster.java
new file mode 100644
index 0000000..dbc5e24
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/oldcode/EntityFireMonster.java
@@ -0,0 +1,605 @@
+package net.aetherteam.aether.oldcode;
+
+import java.util.List;
+
+import net.aetherteam.aether.AetherNameGen;
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.enums.EnumBossType;
+import net.aetherteam.aether.interfaces.IAetherBoss;
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityFlying;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class EntityFireMonster extends EntityFlying implements IAetherBoss
+{
+ public int wideness;
+ public int orgX;
+ public int orgY;
+ public int orgZ;
+ public int motionTimer;
+ public int entCount;
+ public int flameCount;
+ public int ballCount;
+ public int chatLog;
+ public int chatCount;
+ public int hurtness;
+ public int direction;
+ public double rotary;
+ public double speedness;
+ public Entity target;
+ public boolean gotTarget;
+ public String bossName;
+ public static final float jimz = (180F / (float) Math.PI);
+
+ public EntityFireMonster(World var1)
+ {
+ super(var1);
+ this.texture = "/aether/mobs/firemonster.png";
+ this.setSize(2.25F, 2.5F);
+ this.noClip = true;
+ this.orgX = MathHelper.floor_double(this.posX);
+ this.orgY = MathHelper.floor_double(this.boundingBox.minY) + 1;
+ this.orgZ = MathHelper.floor_double(this.posZ);
+ this.wideness = 10;
+ this.health = this.getMaxHealth();
+ this.speedness = 0.5D - (double) this.health / 70.0D * 0.2D;
+ this.direction = 0;
+ this.entCount = this.rand.nextInt(6);
+ this.bossName = AetherNameGen.gen();
+ }
+
+ public int getMaxHealth()
+ {
+ return 50;
+ }
+
+ public EntityFireMonster(World var1, int var2, int var3, int var4, int var5, int var6)
+ {
+ super(var1);
+ this.texture = "/aether/mobs/firemonster.png";
+ this.setSize(2.25F, 2.5F);
+ this.setPosition((double) var2 + 0.5D, (double) var3, (double) var4 + 0.5D);
+ this.wideness = var5 - 2;
+ this.orgX = var2;
+ this.orgY = var3;
+ this.orgZ = var4;
+ this.noClip = true;
+ this.rotary = (double) this.rand.nextFloat() * 360.0D;
+ this.health = 50;
+ this.speedness = 0.5D - (double) this.health / 70.0D * 0.2D;
+ this.direction = var6;
+ this.entCount = this.rand.nextInt(6);
+ this.bossName = AetherNameGen.gen();
+ }
+
+ /**
+ * Determines if an entity can be despawned, used on idle far away entities
+ */
+ public boolean canDespawn()
+ {
+ return false;
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+
+ if (this.health > 0)
+ {
+ double var1 = (double) (this.rand.nextFloat() - 0.5F);
+ double var3 = (double) this.rand.nextFloat();
+ double var5 = (double) (this.rand.nextFloat() - 0.5F);
+ double var7 = this.posX + var1 * var3;
+ double var9 = this.boundingBox.minY + var3 - 0.5D;
+ double var11 = this.posZ + var5 * var3;
+ this.worldObj.spawnParticle("flame", var7, var9, var11, 0.0D, -0.07500000298023224D, 0.0D);
+ ++this.entCount;
+
+ if (this.entCount >= 3)
+ {
+ this.burnEntities();
+ this.evapWater();
+ this.entCount = 0;
+ }
+
+ if (this.hurtness > 0)
+ {
+ --this.hurtness;
+
+ if (this.hurtness == 0)
+ {
+ this.texture = "/aether/mobs/firemonster.png";
+ }
+ }
+ }
+
+ if (this.chatCount > 0)
+ {
+ --this.chatCount;
+ }
+ }
+
+ protected Entity findPlayerToAttack()
+ {
+ EntityPlayer var1 = this.worldObj.getClosestPlayerToEntity(this, 32.0D);
+ return var1 != null && this.canEntityBeSeen(var1) ? var1 : null;
+ }
+
+ public void updateEntityActionState()
+ {
+ super.updateEntityActionState();
+
+ if (this.gotTarget && this.target == null)
+ {
+ this.target = this.findPlayerToAttack();
+ this.gotTarget = false;
+ }
+
+ if (this.target == null)
+ {
+ this.setPosition((double) this.orgX + 0.5D, (double) this.orgY, (double) this.orgZ + 0.5D);
+ this.setDoor(0);
+ } else
+ {
+ this.renderYawOffset = this.rotationYaw;
+ this.setPosition(this.posX, (double) this.orgY, this.posZ);
+ this.motionY = 0.0D;
+ boolean var1 = false;
+
+ if (this.motionX > 0.0D && (int) Math.floor(this.posX) > this.orgX + this.wideness)
+ {
+ this.rotary = 360.0D - this.rotary;
+ var1 = true;
+ } else if (this.motionX < 0.0D && (int) Math.floor(this.posX) < this.orgX - this.wideness)
+ {
+ this.rotary = 360.0D - this.rotary;
+ var1 = true;
+ }
+
+ if (this.motionZ > 0.0D && (int) Math.floor(this.posZ) > this.orgZ + this.wideness)
+ {
+ this.rotary = 180.0D - this.rotary;
+ var1 = true;
+ } else if (this.motionZ < 0.0D && (int) Math.floor(this.posZ) < this.orgZ - this.wideness)
+ {
+ this.rotary = 180.0D - this.rotary;
+ var1 = true;
+ }
+
+ if (this.rotary > 360.0D)
+ {
+ this.rotary -= 360.0D;
+ } else if (this.rotary < 0.0D)
+ {
+ this.rotary += 360.0D;
+ }
+
+ if (this.target != null)
+ {
+ this.faceEntity(this.target, 20.0F, 20.0F);
+ }
+
+ double var2 = this.rotary / (180D / Math.PI);
+ this.motionX = Math.sin(var2) * this.speedness;
+ this.motionZ = Math.cos(var2) * this.speedness;
+ ++this.motionTimer;
+
+ if (this.motionTimer >= 20 || var1)
+ {
+ this.motionTimer = 0;
+
+ if (this.rand.nextInt(3) == 0)
+ {
+ this.rotary += (double) (this.rand.nextFloat() - this.rand.nextFloat()) * 60.0D;
+ }
+ }
+
+ ++this.flameCount;
+
+ if (this.flameCount == 40 && this.rand.nextInt(2) == 0)
+ {
+ this.poopFire();
+ } else if (this.flameCount >= 55 + this.health / 2 && this.target != null && this.target instanceof EntityLiving)
+ {
+ this.makeFireBall(1);
+ this.flameCount = 0;
+ }
+
+ if (this.target != null && this.target.isDead)
+ {
+ this.setPosition((double) this.orgX + 0.5D, (double) this.orgY, (double) this.orgZ + 0.5D);
+ this.motionX = 0.0D;
+ this.motionY = 0.0D;
+ this.motionZ = 0.0D;
+ this.target = null;
+ this.chatLine("\u00a7cSuch is the fate of a being who opposes the might of the sun.");
+ this.setDoor(0);
+ this.gotTarget = false;
+ }
+ }
+ }
+
+ public void burnEntities()
+ {
+ List var1 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.expand(0.0D, 4.0D, 0.0D));
+
+ for (int var2 = 0; var2 < var1.size(); ++var2)
+ {
+ Entity var3 = (Entity) var1.get(var2);
+
+ if (var3 instanceof EntityLiving && !var3.isImmuneToFire())
+ {
+ var3.attackEntityFrom(DamageSource.causeMobDamage(this), 10);
+ var3.setFire(15);
+ }
+ }
+ }
+
+ public void evapWater()
+ {
+ int var1 = MathHelper.floor_double(this.boundingBox.minX + (this.boundingBox.maxX - this.boundingBox.minX) / 2.0D);
+ int var2 = MathHelper.floor_double(this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2.0D);
+ byte var3 = 10;
+
+ for (int var4 = var1 - var3; var4 <= var1 + var3; ++var4)
+ {
+ for (int var5 = var2 - var3; var5 <= var2 + var3; ++var5)
+ {
+ for (int var6 = 0; var6 < 8; ++var6)
+ {
+ int var7 = this.orgY - 2 + var6;
+
+ if (this.worldObj.getBlockMaterial(var4, var7, var5) == Material.water)
+ {
+ this.worldObj.setBlock(var4, var7, var5, 0);
+ this.worldObj.playSoundEffect((double) ((float) var4 + 0.5F), (double) ((float) var7 + 0.5F), (double) ((float) var5 + 0.5F), "random.fizz", 0.5F, 2.6F + (this.rand.nextFloat() - this.rand.nextFloat()) * 0.8F);
+
+ for (int var8 = 0; var8 < 8; ++var8)
+ {
+ this.worldObj.spawnParticle("largesmoke", (double) var4 + Math.random(), (double) var7 + 0.75D, (double) var5 + Math.random(), 0.0D, 0.0D, 0.0D);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public void makeFireBall(int var1)
+ {
+ this.worldObj.playSoundAtEntity(this, "mob.ghast.fireball", 5.0F, (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F);
+ boolean var2 = false;
+ ++this.ballCount;
+
+ if (this.ballCount >= 3 + this.rand.nextInt(3))
+ {
+ var2 = true;
+ this.ballCount = 0;
+ }
+
+ for (int var3 = 0; var3 < var1; ++var3)
+ {
+ EntityFiroBall var4 = new EntityFiroBall(this.worldObj, this.posX - this.motionX / 2.0D, this.posY, this.posZ - this.motionZ / 2.0D, var2);
+ this.worldObj.spawnEntityInWorld(var4);
+ }
+ }
+
+ public void poopFire()
+ {
+ int var1 = MathHelper.floor_double(this.posX);
+ int var2 = MathHelper.floor_double(this.posZ);
+ int var3 = this.orgY - 2;
+
+ if (AetherBlocks.isGood(this.worldObj.getBlockId(var1, var3, var2), this.worldObj.getBlockMetadata(var1, var3, var2)))
+ {
+ this.worldObj.setBlock(var1, var3, var2, Block.fire.blockID);
+ }
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ super.writeEntityToNBT(var1);
+ var1.setShort("OriginX", (short) this.orgX);
+ var1.setShort("OriginY", (short) this.orgY);
+ var1.setShort("OriginZ", (short) this.orgZ);
+ var1.setShort("Wideness", (short) this.wideness);
+ var1.setShort("FlameCount", (short) this.flameCount);
+ var1.setShort("BallCount", (short) this.ballCount);
+ var1.setShort("ChatLog", (short) this.chatLog);
+ var1.setShort("Direction", (short) this.direction);
+ var1.setFloat("Rotary", (float) this.rotary);
+ this.gotTarget = this.target != null;
+ var1.setBoolean("GotTarget", this.gotTarget);
+ var1.setString("BossName", this.bossName);
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ super.readEntityFromNBT(var1);
+ this.orgX = var1.getShort("OriginX");
+ this.orgY = var1.getShort("OriginY");
+ this.orgZ = var1.getShort("OriginZ");
+ this.wideness = var1.getShort("Wideness");
+ this.flameCount = var1.getShort("FlameCount");
+ this.ballCount = var1.getShort("BallCount");
+ this.chatLog = var1.getShort("ChatLog");
+ this.direction = var1.getShort("Direction");
+ this.rotary = (double) var1.getFloat("Rotary");
+ this.gotTarget = var1.getBoolean("GotTarget");
+ this.speedness = 0.5D - (double) this.health / 70.0D * 0.2D;
+ this.bossName = var1.getString("BossName");
+ }
+
+ public void chatLine(String var1) {}
+
+ public boolean chatWithMe()
+ {
+ if (this.chatCount <= 0)
+ {
+ if (this.chatLog == 0)
+ {
+ this.chatLine("\u00a7cYou are certainly a brave soul to have entered this chamber.");
+ this.chatLog = 1;
+ this.chatCount = 100;
+ } else if (this.chatLog == 1)
+ {
+ this.chatLine("\u00a7cBegone human, you serve no purpose here.");
+ this.chatLog = 2;
+ this.chatCount = 100;
+ } else if (this.chatLog == 2)
+ {
+ this.chatLine("\u00a7cYour presence annoys me. Do you not fear my burning aura?");
+ this.chatLog = 3;
+ this.chatCount = 100;
+ } else if (this.chatLog == 3)
+ {
+ this.chatLine("\u00a7cI have nothing to offer you, fool. Leave me at peace.");
+ this.chatLog = 4;
+ this.chatCount = 100;
+ } else if (this.chatLog == 4)
+ {
+ this.chatLine("\u00a7cPerhaps you are ignorant. Do you wish to know who I am?");
+ this.chatLog = 5;
+ this.chatCount = 100;
+ } else if (this.chatLog == 5)
+ {
+ this.chatLine("\u00a7cI am a sun spirit, embodiment of Aether\'s eternal daylight.");
+ this.chatLine("\u00a7cAs long as I am alive, the sun will never set on this world.");
+ this.chatLog = 6;
+ this.chatCount = 100;
+ } else if (this.chatLog == 6)
+ {
+ this.chatLine("\u00a7cMy body burns with the anger of a thousand beasts.");
+ this.chatLine("\u00a7cNo man, hero, or villain can harm me. You are no exception.");
+ this.chatLog = 7;
+ this.chatCount = 100;
+ } else if (this.chatLog == 7)
+ {
+ this.chatLine("\u00a7cYou wish to challenge the might of the sun? You are mad.");
+ this.chatLine("\u00a7cDo not further insult me or you will feel my wrath.");
+ this.chatLog = 8;
+ this.chatCount = 100;
+ } else if (this.chatLog == 8)
+ {
+ this.chatLine("\u00a7cThis is your final warning. Leave now, or prepare to burn.");
+ this.chatLog = 9;
+ this.chatCount = 100;
+ } else
+ {
+ if (this.chatLog == 9)
+ {
+ this.chatLine("\u00a76As you wish, your death will be slow and agonizing.");
+ this.chatLog = 10;
+ return true;
+ }
+
+ if (this.chatLog == 10 && this.target == null)
+ {
+ this.chatLine("\u00a7cDid your previous death not satisfy your curiosity, human?");
+ this.chatLog = 9;
+ this.chatCount = 100;
+ }
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig.
+ */
+ public boolean interact(EntityPlayer var1)
+ {
+ if (this.chatWithMe())
+ {
+ this.rotary = (180D / Math.PI) * Math.atan2(this.posX - var1.posX, this.posZ - var1.posZ);
+ this.target = var1;
+ this.setDoor(AetherBlocks.LockedDungeonStone.blockID);
+ return true;
+ } else
+ {
+ return false;
+ }
+ }
+
+ /**
+ * Adds to the current velocity of the entity. Args: x, y, z
+ */
+ public void addVelocity(double var1, double var3, double var5)
+ {}
+
+ /**
+ * knocks back this entity
+ */
+ public void knockBack(Entity var1, int var2, double var3, double var5)
+ {}
+
+ /**
+ * Called when the entity is attacked.
+ */
+ public boolean attackEntityFrom(DamageSource var1, int var2)
+ {
+ if (var1.getEntity() != null && var1.getEntity() instanceof EntityFiroBall)
+ {
+ this.speedness = 0.5D - (double) this.health / 70.0D * 0.2D;
+ boolean var3 = super.attackEntityFrom(var1, var2);
+
+ if (var3)
+ {
+ this.hurtness = 15;
+ this.texture = "/aether/mobs/firemonsterHurt.png";
+ EntityFireMinion var4 = new EntityFireMinion(this.worldObj);
+ var4.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, 0.0F);
+ this.worldObj.spawnEntityInWorld(var4);
+ this.worldObj.spawnEntityInWorld(var4);
+ this.worldObj.spawnEntityInWorld(var4);
+
+ if (this.health <= 0)
+ {
+ this.chatLine("\u00a7bSuch bitter cold... is this the feeling... of pain?");
+ this.setDoor(0);
+ this.unlockTreasure();
+ }
+ }
+
+ return var3;
+ } else
+ {
+ return false;
+ }
+ }
+
+ /**
+ * Drop 0-2 items of this living's type. @param par1 - Whether this entity has recently been hit by a player. @param
+ * par2 - Level of Looting used to kill this mob.
+ */
+ protected void dropFewItems(boolean var1, int var2)
+ {
+ this.entityDropItem(new ItemStack(AetherItems.Key, 1, 2), 0.0F);
+ }
+
+ private void setDoor(int var1)
+ {
+ int var3;
+ int var2;
+
+ if (this.direction / 2 == 0)
+ {
+ for (var2 = this.orgY - 1; var2 < this.orgY + 2; ++var2)
+ {
+ for (var3 = this.orgZ - 1; var3 < this.orgZ + 2; ++var3)
+ {
+ this.worldObj.setBlock(this.orgX + (this.direction == 0 ? -11 : 11), var2, var3, var1, 2, 4);
+ }
+ }
+ } else
+ {
+ for (var2 = this.orgY - 1; var2 < this.orgY + 2; ++var2)
+ {
+ for (var3 = this.orgX - 1; var3 < this.orgX + 2; ++var3)
+ {
+ this.worldObj.setBlock(var3, var2, this.orgZ + (this.direction == 3 ? 11 : -11), var1, 2, 4);
+ }
+ }
+ }
+ }
+
+ private void unlockTreasure()
+ {
+ int var1;
+ int var2;
+
+ if (this.direction / 2 == 0)
+ {
+ for (var1 = this.orgY - 1; var1 < this.orgY + 2; ++var1)
+ {
+ for (var2 = this.orgZ - 1; var2 < this.orgZ + 2; ++var2)
+ {
+ this.worldObj.setBlock(this.orgX + (this.direction == 0 ? 11 : -11), var1, var2, 0);
+ }
+ }
+ } else
+ {
+ for (var1 = this.orgY - 1; var1 < this.orgY + 2; ++var1)
+ {
+ for (var2 = this.orgX - 1; var2 < this.orgX + 2; ++var2)
+ {
+ this.worldObj.setBlock(var2, var1, this.orgZ + (this.direction == 3 ? -11 : 11), 0);
+ }
+ }
+ }
+
+ for (var1 = this.orgX - 20; var1 < this.orgX + 20; ++var1)
+ {
+ for (var2 = this.orgY - 3; var2 < this.orgY + 6; ++var2)
+ {
+ for (int var3 = this.orgZ - 20; var3 < this.orgZ + 20; ++var3)
+ {
+ int var4 = this.worldObj.getBlockId(var1, var2, var3);
+
+ if (var4 == AetherBlocks.LockedDungeonStone.blockID)
+ {
+ this.worldObj.setBlock(var1, var2, var3, AetherBlocks.DungeonStone.blockID, this.worldObj.getBlockMetadata(var1, var2, var3), 4);
+ }
+
+ if (var4 == AetherBlocks.LockedLightDungeonStone.blockID)
+ {
+ this.worldObj.setBlock(var1, var2, var3, AetherBlocks.LightDungeonStone.blockID, this.worldObj.getBlockMetadata(var1, var2, var3), 4);
+ }
+ }
+ }
+ }
+ }
+
+ public int getBossHP()
+ {
+ return this.health;
+ }
+
+ public int getBossMaxHP()
+ {
+ return 50;
+ }
+
+ public int getBossEntityID()
+ {
+ return this.entityId;
+ }
+
+ public String getBossTitle()
+ {
+ return this.bossName + ", the Sun Spirit";
+ }
+
+ public Entity getBossEntity()
+ {
+ return this;
+ }
+
+ public int getBossStage()
+ {
+ return 0;
+ }
+
+ public EnumBossType getBossType()
+ {
+ return EnumBossType.BOSS;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/oldcode/EntityFiroBall.java b/src/main/java/net/aetherteam/aether/oldcode/EntityFiroBall.java
new file mode 100644
index 0000000..062ed11
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/oldcode/EntityFiroBall.java
@@ -0,0 +1,332 @@
+package net.aetherteam.aether.oldcode;
+
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityFlying;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.NBTTagDouble;
+import net.minecraft.nbt.NBTTagList;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.Vec3;
+import net.minecraft.world.World;
+
+public class EntityFiroBall extends EntityFlying
+{
+ public float[] sinage;
+ public double smotionX;
+ public double smotionY;
+ public double smotionZ;
+ public int life;
+ public int lifeSpan;
+ public boolean frosty;
+ public boolean smacked;
+ public boolean fromCloud;
+ private static final double topSpeed = 0.125D;
+ private static final float sponge = (180F / (float) Math.PI);
+
+ public EntityFiroBall(World var1)
+ {
+ super(var1);
+ this.texture = "/aether/mobs/firoball.png";
+ this.lifeSpan = 300;
+ this.life = this.lifeSpan;
+ this.setSize(0.9F, 0.9F);
+ this.sinage = new float[3];
+ this.isImmuneToFire = true;
+
+ for (int var2 = 0; var2 < 3; ++var2)
+ {
+ this.sinage[var2] = this.rand.nextFloat() * 6.0F;
+ }
+ }
+
+ public int getMaxHealth()
+ {
+ return 5;
+ }
+
+ public EntityFiroBall(World var1, double var2, double var4, double var6, boolean var8)
+ {
+ super(var1);
+ this.texture = "/aether/mobs/firoball.png";
+ this.lifeSpan = 300;
+ this.life = this.lifeSpan;
+ this.setSize(0.9F, 0.9F);
+ this.setPositionAndRotation(var2, var4, var6, this.rotationYaw, this.rotationPitch);
+ this.sinage = new float[3];
+ this.isImmuneToFire = true;
+
+ for (int var9 = 0; var9 < 3; ++var9)
+ {
+ this.sinage[var9] = this.rand.nextFloat() * 6.0F;
+ }
+
+ this.smotionX = (0.2D + (double) this.rand.nextFloat() * 0.15D) * (this.rand.nextInt(2) == 0 ? 1.0D : -1.0D);
+ this.smotionY = (0.2D + (double) this.rand.nextFloat() * 0.15D) * (this.rand.nextInt(2) == 0 ? 1.0D : -1.0D);
+ this.smotionZ = (0.2D + (double) this.rand.nextFloat() * 0.15D) * (this.rand.nextInt(2) == 0 ? 1.0D : -1.0D);
+
+ if (var8)
+ {
+ this.frosty = true;
+ this.texture = "/aether/mobs/iceyball.png";
+ this.smotionX /= 3.0D;
+ this.smotionY = 0.0D;
+ this.smotionZ /= 3.0D;
+ }
+ }
+
+ public EntityFiroBall(World var1, double var2, double var4, double var6, boolean var8, boolean var9)
+ {
+ super(var1);
+ this.texture = "/aether/mobs/firoball.png";
+ this.lifeSpan = 300;
+ this.life = this.lifeSpan;
+ this.setSize(0.9F, 0.9F);
+ this.setPositionAndRotation(var2, var4, var6, this.rotationYaw, this.rotationPitch);
+ this.sinage = new float[3];
+ this.isImmuneToFire = true;
+
+ for (int var10 = 0; var10 < 3; ++var10)
+ {
+ this.sinage[var10] = this.rand.nextFloat() * 6.0F;
+ }
+
+ this.smotionX = (0.2D + (double) this.rand.nextFloat() * 0.15D) * (this.rand.nextInt(2) == 0 ? 1.0D : -1.0D);
+ this.smotionY = (0.2D + (double) this.rand.nextFloat() * 0.15D) * (this.rand.nextInt(2) == 0 ? 1.0D : -1.0D);
+ this.smotionZ = (0.2D + (double) this.rand.nextFloat() * 0.15D) * (this.rand.nextInt(2) == 0 ? 1.0D : -1.0D);
+
+ if (var8)
+ {
+ this.frosty = true;
+ this.texture = "/aether/mobs/iceyball.png";
+ this.smotionX /= 3.0D;
+ this.smotionY = 0.0D;
+ this.smotionZ /= 3.0D;
+ }
+
+ this.fromCloud = var9;
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+ --this.life;
+
+ if (this.life <= 0)
+ {
+ this.fizzle();
+ this.isDead = true;
+ }
+ }
+
+ public void fizzle()
+ {
+ if (this.frosty)
+ {
+ this.worldObj.playSoundAtEntity(this, "random.glass", 2.0F, (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.2F);
+ } else
+ {
+ this.worldObj.playSoundAtEntity(this, "random.fizz", 2.0F, (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.2F);
+ }
+
+ for (int var1 = 0; var1 < 16; ++var1)
+ {
+ double var2 = this.posX + (double) (this.rand.nextFloat() - this.rand.nextFloat()) * 0.25D;
+ double var4 = this.posY + (double) (this.rand.nextFloat() - this.rand.nextFloat()) * 0.25D;
+ double var6 = this.posZ + (double) (this.rand.nextFloat() - this.rand.nextFloat()) * 0.25D;
+
+ if (!this.frosty)
+ {
+ this.worldObj.spawnParticle("largesmoke", var2, var4, var6, 0.0D, 0.0D, 0.0D);
+ }
+ }
+ }
+
+ public void splode()
+ {
+ if (this.frosty)
+ {
+ this.worldObj.playSoundAtEntity(this, "random.glass", 2.0F, (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.2F);
+ } else
+ {
+ this.worldObj.playSoundAtEntity(this, "random.explode", 2.0F, (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.2F);
+ }
+
+ for (int var1 = 0; var1 < 40; ++var1)
+ {
+ double var2 = (double) ((this.rand.nextFloat() - 0.5F) * 0.5F);
+ double var4 = (double) ((this.rand.nextFloat() - 0.5F) * 0.5F);
+ double var6 = (double) ((this.rand.nextFloat() - 0.5F) * 0.5F);
+
+ if (this.frosty)
+ {
+ var2 *= 0.5D;
+ var4 *= 0.5D;
+ var6 *= 0.5D;
+ this.worldObj.spawnParticle("snowshovel", this.posX, this.posY, this.posZ, var2, var4 + 0.125D, var6);
+ } else
+ {
+ this.worldObj.spawnParticle("flame", this.posX, this.posY, this.posZ, var2, var4, var6);
+ }
+ }
+ }
+
+ public void updateAnims()
+ {
+ if (!this.frosty)
+ {
+ for (int var1 = 0; var1 < 3; ++var1)
+ {
+ this.sinage[var1] += 0.3F + (float) var1 * 0.13F;
+
+ if (this.sinage[var1] > ((float) Math.PI * 2F))
+ {
+ this.sinage[var1] -= ((float) Math.PI * 2F);
+ }
+ }
+ }
+ }
+
+ public void updateEntityActionState()
+ {
+ this.motionX = this.smotionX;
+ this.motionY = this.smotionY;
+ this.motionZ = this.smotionZ;
+
+ if (this.isCollided)
+ {
+ if (this.frosty && this.smacked)
+ {
+ this.splode();
+ this.fizzle();
+ this.isDead = true;
+ } else
+ {
+ int var1 = MathHelper.floor_double(this.posX);
+ int var2 = MathHelper.floor_double(this.boundingBox.minY);
+ int var3 = MathHelper.floor_double(this.posZ);
+
+ if (this.smotionX > 0.0D && this.worldObj.getBlockId(var1 + 1, var2, var3) != 0)
+ {
+ this.motionX = this.smotionX = -this.smotionX;
+ } else if (this.smotionX < 0.0D && this.worldObj.getBlockId(var1 - 1, var2, var3) != 0)
+ {
+ this.motionX = this.smotionX = -this.smotionX;
+ }
+
+ if (this.smotionY > 0.0D && this.worldObj.getBlockId(var1, var2 + 1, var3) != 0)
+ {
+ this.motionY = this.smotionY = -this.smotionY;
+ } else if (this.smotionY < 0.0D && this.worldObj.getBlockId(var1, var2 - 1, var3) != 0)
+ {
+ this.motionY = this.smotionY = -this.smotionY;
+ }
+
+ if (this.smotionZ > 0.0D && this.worldObj.getBlockId(var1, var2, var3 + 1) != 0)
+ {
+ this.motionZ = this.smotionZ = -this.smotionZ;
+ } else if (this.smotionZ < 0.0D && this.worldObj.getBlockId(var1, var2, var3 - 1) != 0)
+ {
+ this.motionZ = this.smotionZ = -this.smotionZ;
+ }
+ }
+ }
+
+ this.updateAnims();
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ super.writeEntityToNBT(var1);
+ var1.setShort("LifeLeft", (short) this.life);
+ var1.setTag("SeriousKingVampire", this.newDoubleNBTList(new double[]{this.smotionX, this.smotionY, this.smotionZ}));
+ var1.setBoolean("Frosty", this.frosty);
+ var1.setBoolean("FromCloud", this.fromCloud);
+ var1.setBoolean("Smacked", this.smacked);
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ super.readEntityFromNBT(var1);
+ this.life = var1.getShort("LifeLeft");
+ this.frosty = var1.getBoolean("Frosty");
+ this.fromCloud = var1.getBoolean("FromCloud");
+
+ if (this.frosty)
+ {
+ this.texture = "/aether/mobs/iceyball.png";
+ }
+
+ this.smacked = var1.getBoolean("Smacked");
+ NBTTagList var2 = var1.getTagList("SeriousKingVampire");
+ this.smotionX = (double) ((float) ((NBTTagDouble) var2.tagAt(0)).data);
+ this.smotionY = (double) ((float) ((NBTTagDouble) var2.tagAt(1)).data);
+ this.smotionZ = (double) ((float) ((NBTTagDouble) var2.tagAt(2)).data);
+ }
+
+ /**
+ * Applies a velocity to each of the entities pushing them away from each other. Args: entity
+ */
+ public void applyEntityCollision(Entity var1)
+ {
+ super.applyEntityCollision(var1);
+ boolean var2 = false;
+
+ if (var1 != null && var1 instanceof EntityLiving && !(var1 instanceof EntityFiroBall))
+ {
+ if (this.frosty && (!(var1 instanceof EntityFireMonster) || this.smacked && !this.fromCloud) && !(var1 instanceof EntityFireMinion))
+ {
+ var2 = var1.attackEntityFrom(DamageSource.causeMobDamage(this), 5);
+ } else if (!this.frosty && !(var1 instanceof EntityFireMonster) && !(var1 instanceof EntityFireMinion))
+ {
+ var2 = var1.attackEntityFrom(DamageSource.causeMobDamage(this), 5);
+
+ if (var2)
+ {
+ this.setFire(100);
+ }
+ }
+ }
+
+ if (var2)
+ {
+ this.splode();
+ this.fizzle();
+ this.isDead = true;
+ }
+ }
+
+ /**
+ * Called when the entity is attacked.
+ */
+ public boolean attackEntityFrom(DamageSource var1, int var2)
+ {
+ if (var1.getEntity() != null)
+ {
+ Vec3 var3 = var1.getEntity().getLookVec();
+
+ if (var3 != null)
+ {
+ this.smotionX = var3.xCoord;
+ this.smotionY = var3.yCoord;
+ this.smotionZ = var3.zCoord;
+ }
+
+ this.smacked = true;
+ return true;
+ } else
+ {
+ return false;
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/oldcode/EntityFlamingArrow.java b/src/main/java/net/aetherteam/aether/oldcode/EntityFlamingArrow.java
new file mode 100644
index 0000000..5608d10
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/oldcode/EntityFlamingArrow.java
@@ -0,0 +1,365 @@
+package net.aetherteam.aether.oldcode;
+
+import java.util.List;
+
+import net.minecraft.block.Block;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.MovingObjectPosition;
+import net.minecraft.util.Vec3;
+import net.minecraft.world.World;
+
+public class EntityFlamingArrow extends Entity
+{
+ private int xTile = -1;
+ private int yTile = -1;
+ private int zTile = -1;
+ private int inTile = 0;
+ private int inData = 0;
+ private boolean inGround = false;
+ public boolean doesArrowBelongToPlayer = false;
+ public int arrowShake = 0;
+ public EntityLiving owner;
+ private int ticksInGround;
+ private int ticksInAir = 0;
+
+ public EntityFlamingArrow(World var1)
+ {
+ super(var1);
+ this.setSize(0.5F, 0.5F);
+ this.setFire(1);
+ }
+
+ public EntityFlamingArrow(World var1, double var2, double var4, double var6)
+ {
+ super(var1);
+ this.setSize(0.5F, 0.5F);
+ this.setPositionAndRotation(var2, var4, var6, this.rotationYaw, this.rotationPitch);
+ this.yOffset = 0.0F;
+ }
+
+ public EntityFlamingArrow(World var1, EntityLiving var2)
+ {
+ super(var1);
+ this.owner = var2;
+ this.doesArrowBelongToPlayer = var2 instanceof EntityPlayer;
+ this.setSize(0.5F, 0.5F);
+ this.setLocationAndAngles(var2.posX, var2.posY + (double) var2.getEyeHeight(), var2.posZ, var2.rotationYaw, var2.rotationPitch);
+ this.posX -= (double) (MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F);
+ this.posY -= 0.10000000149011612D;
+ this.posZ -= (double) (MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * 0.16F);
+ this.setPositionAndRotation(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
+ this.yOffset = 0.0F;
+ this.motionX = (double) (-MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI));
+ this.motionZ = (double) (MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI));
+ this.motionY = (double) (-MathHelper.sin(this.rotationPitch / 180.0F * (float) Math.PI));
+ this.setArrowHeading(this.motionX, this.motionY, this.motionZ, 1.5F, 1.0F);
+ }
+
+ protected void entityInit() {}
+
+ public void setArrowHeading(double var1, double var3, double var5, float var7, float var8)
+ {
+ float var9 = MathHelper.sqrt_double(var1 * var1 + var3 * var3 + var5 * var5);
+ var1 /= (double) var9;
+ var3 /= (double) var9;
+ var5 /= (double) var9;
+ var1 += this.rand.nextGaussian() * 0.007499999832361937D * (double) var8;
+ var3 += this.rand.nextGaussian() * 0.007499999832361937D * (double) var8;
+ var5 += this.rand.nextGaussian() * 0.007499999832361937D * (double) var8;
+ var1 *= (double) var7;
+ var3 *= (double) var7;
+ var5 *= (double) var7;
+ this.motionX = var1;
+ this.motionY = var3;
+ this.motionZ = var5;
+ float var10 = MathHelper.sqrt_double(var1 * var1 + var5 * var5);
+ this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(var1, var5) * 180.0D / Math.PI);
+ this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(var3, (double) var10) * 180.0D / Math.PI);
+ this.ticksInGround = 0;
+ }
+
+ /**
+ * Sets the velocity to the args. Args: x, y, z
+ */
+ public void setVelocity(double var1, double var3, double var5)
+ {
+ this.motionX = var1;
+ this.motionY = var3;
+ this.motionZ = var5;
+
+ if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
+ {
+ float var7 = MathHelper.sqrt_double(var1 * var1 + var5 * var5);
+ this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(var1, var5) * 180.0D / Math.PI);
+ this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(var3, (double) var7) * 180.0D / Math.PI);
+ this.prevRotationPitch = this.rotationPitch;
+ this.prevRotationYaw = this.rotationYaw;
+ this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
+ this.ticksInGround = 0;
+ }
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+
+ if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
+ {
+ float var1 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
+ this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
+ this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(this.motionY, (double) var1) * 180.0D / Math.PI);
+ }
+
+ int var21 = this.worldObj.getBlockId(this.xTile, this.yTile, this.zTile);
+
+ if (var21 > 0)
+ {
+ Block.blocksList[var21].setBlockBoundsBasedOnState(this.worldObj, this.xTile, this.yTile, this.zTile);
+ AxisAlignedBB var2 = Block.blocksList[var21].getCollisionBoundingBoxFromPool(this.worldObj, this.xTile, this.yTile, this.zTile);
+
+ if (var2 != null && var2.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ)))
+ {
+ this.inGround = true;
+ }
+ }
+
+ if (this.arrowShake > 0)
+ {
+ --this.arrowShake;
+ }
+
+ if (this.inGround)
+ {
+ int var23 = this.worldObj.getBlockId(this.xTile, this.yTile, this.zTile);
+ int var22 = this.worldObj.getBlockMetadata(this.xTile, this.yTile, this.zTile);
+
+ if (var23 == this.inTile && var22 == this.inData)
+ {
+ ++this.ticksInGround;
+
+ if (this.ticksInGround == 1200)
+ {
+ this.setDead();
+ }
+ } else
+ {
+ this.inGround = false;
+ this.motionX *= (double) (this.rand.nextFloat() * 0.2F);
+ this.motionY *= (double) (this.rand.nextFloat() * 0.2F);
+ this.motionZ *= (double) (this.rand.nextFloat() * 0.2F);
+ this.ticksInGround = 0;
+ this.ticksInAir = 0;
+ }
+ } else
+ {
+ this.worldObj.spawnParticle(this.rand.nextBoolean() ? "flame" : "smoke", this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
+ ++this.ticksInAir;
+ Vec3 var24 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
+ Vec3 var3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
+ MovingObjectPosition var4 = this.worldObj.rayTraceBlocks_do_do(var24, var3, false, true);
+ var24 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
+ var3 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
+
+ if (var4 != null)
+ {
+ var3 = Vec3.createVectorHelper(var4.hitVec.xCoord, var4.hitVec.yCoord, var4.hitVec.zCoord);
+ }
+
+ Entity var5 = null;
+ List var6 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D));
+ double var7 = 0.0D;
+ float var11;
+ int var9;
+
+ for (var9 = 0; var9 < var6.size(); ++var9)
+ {
+ Entity var10 = (Entity) var6.get(var9);
+
+ if (var10.canBeCollidedWith() && (var10 != this.owner || this.ticksInAir >= 5))
+ {
+ var11 = 0.3F;
+ AxisAlignedBB var12 = var10.boundingBox.expand((double) var11, (double) var11, (double) var11);
+ MovingObjectPosition var13 = var12.calculateIntercept(var24, var3);
+
+ if (var13 != null)
+ {
+ double var14 = var24.distanceTo(var13.hitVec);
+
+ if (var14 < var7 || var7 == 0.0D)
+ {
+ var5 = var10;
+ var7 = var14;
+ }
+ }
+ }
+ }
+
+ if (var5 != null)
+ {
+ var4 = new MovingObjectPosition(var5);
+ }
+
+ int var16;
+ float var25;
+
+ if (var4 != null)
+ {
+ int var19;
+ int var17;
+
+ if (var4.entityHit != null)
+ {
+ if (var4.entityHit.attackEntityFrom(DamageSource.causeMobDamage(this.owner), 4))
+ {
+ this.worldObj.playSoundAtEntity(this, "random.drr", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F));
+ var4.entityHit.setFire(100);
+ var9 = MathHelper.floor_double(var4.entityHit.boundingBox.minX);
+ var17 = MathHelper.floor_double(var4.entityHit.boundingBox.minY);
+ var19 = MathHelper.floor_double(var4.entityHit.boundingBox.minZ);
+ this.worldObj.setBlock(var9, var17, var19, 51);
+ this.setDead();
+ } else
+ {
+ this.motionX *= -0.10000000149011612D;
+ this.motionY *= -0.10000000149011612D;
+ this.motionZ *= -0.10000000149011612D;
+ this.rotationYaw += 180.0F;
+ this.prevRotationYaw += 180.0F;
+ this.ticksInAir = 0;
+ }
+ } else
+ {
+ this.xTile = var4.blockX;
+ this.yTile = var4.blockY;
+ this.zTile = var4.blockZ;
+ this.inTile = this.worldObj.getBlockId(this.xTile, this.yTile, this.zTile);
+ this.inData = this.worldObj.getBlockMetadata(this.xTile, this.yTile, this.zTile);
+ this.motionX = (double) ((float) (var4.hitVec.xCoord - this.posX));
+ this.motionY = (double) ((float) (var4.hitVec.yCoord - this.posY));
+ this.motionZ = (double) ((float) (var4.hitVec.zCoord - this.posZ));
+ var25 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
+ this.posX -= this.motionX / (double) var25 * 0.05000000074505806D;
+ this.posY -= this.motionY / (double) var25 * 0.05000000074505806D;
+ this.posZ -= this.motionZ / (double) var25 * 0.05000000074505806D;
+ this.worldObj.playSoundAtEntity(this, "random.drr", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F));
+ var17 = MathHelper.floor_double(this.posX);
+ var19 = MathHelper.floor_double(this.posY);
+ var16 = MathHelper.floor_double(this.posZ);
+ this.worldObj.setBlock(var17, var19, var16, 51);
+ this.inGround = true;
+ this.arrowShake = 7;
+ }
+ }
+
+ this.posX += this.motionX;
+ this.posY += this.motionY;
+ this.posZ += this.motionZ;
+ var25 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
+ this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
+
+ for (this.rotationPitch = (float) (Math.atan2(this.motionY, (double) var25) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F)
+ {
+ ;
+ }
+
+ while (this.rotationPitch - this.prevRotationPitch >= 180.0F)
+ {
+ this.prevRotationPitch += 360.0F;
+ }
+
+ while (this.rotationYaw - this.prevRotationYaw < -180.0F)
+ {
+ this.prevRotationYaw -= 360.0F;
+ }
+
+ while (this.rotationYaw - this.prevRotationYaw >= 180.0F)
+ {
+ this.prevRotationYaw += 360.0F;
+ }
+
+ this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F;
+ this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F;
+ float var18 = 0.99F;
+ var11 = 0.03F;
+
+ if (this.isInWater())
+ {
+ for (var16 = 0; var16 < 4; ++var16)
+ {
+ float var20 = 0.25F;
+ this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double) var20, this.posY - this.motionY * (double) var20, this.posZ - this.motionZ * (double) var20, this.motionX, this.motionY, this.motionZ);
+ }
+
+ var18 = 0.8F;
+ }
+
+ this.motionX *= (double) var18;
+ this.motionY *= (double) var18;
+ this.motionZ *= (double) var18;
+ this.motionY -= (double) var11;
+ this.setPositionAndRotation(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
+ }
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ var1.setShort("xTile", (short) this.xTile);
+ var1.setShort("yTile", (short) this.yTile);
+ var1.setShort("zTile", (short) this.zTile);
+ var1.setByte("inTile", (byte) this.inTile);
+ var1.setByte("inData", (byte) this.inData);
+ var1.setByte("shake", (byte) this.arrowShake);
+ var1.setByte("inGround", (byte) (this.inGround ? 1 : 0));
+ var1.setBoolean("player", this.doesArrowBelongToPlayer);
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ this.xTile = var1.getShort("xTile");
+ this.yTile = var1.getShort("yTile");
+ this.zTile = var1.getShort("zTile");
+ this.inTile = var1.getByte("inTile") & 255;
+ this.inData = var1.getByte("inData") & 255;
+ this.arrowShake = var1.getByte("shake") & 255;
+ this.inGround = var1.getByte("inGround") == 1;
+ this.doesArrowBelongToPlayer = var1.getBoolean("player");
+ }
+
+ /**
+ * Called by a player entity when they collide with an entity
+ */
+ public void onCollideWithPlayer(EntityPlayer var1)
+ {
+ if (!this.worldObj.isRemote)
+ {
+ if (this.inGround && this.doesArrowBelongToPlayer && this.arrowShake <= 0 && var1.inventory.addItemStackToInventory(new ItemStack(Item.arrow, 1)))
+ {
+ this.worldObj.playSoundAtEntity(this, "random.pop", 0.2F, ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
+ var1.onItemPickup(this, 1);
+ this.setDead();
+ }
+ }
+ }
+
+ public float getShadowSize()
+ {
+ return 0.0F;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/oldcode/EntityHomeShot.java b/src/main/java/net/aetherteam/aether/oldcode/EntityHomeShot.java
new file mode 100644
index 0000000..2c80b7d
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/oldcode/EntityHomeShot.java
@@ -0,0 +1,204 @@
+package net.aetherteam.aether.oldcode;
+
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityFlying;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.DamageSource;
+import net.minecraft.world.World;
+
+public class EntityHomeShot extends EntityFlying
+{
+ public float[] sinage;
+ public EntityLiving target;
+ public boolean firstRun;
+ public int life;
+ public int lifeSpan;
+ private static final double topSpeed = 0.125D;
+ private static final float sponge = (180F / (float) Math.PI);
+
+ public EntityHomeShot(World var1)
+ {
+ super(var1);
+ this.texture = "/aether/mobs/electroball.png";
+ this.lifeSpan = 200;
+ this.life = this.lifeSpan;
+ this.setSize(0.7F, 0.7F);
+ this.firstRun = true;
+ this.sinage = new float[3];
+ this.isImmuneToFire = true;
+
+ for (int var2 = 0; var2 < 3; ++var2)
+ {
+ this.sinage[var2] = this.rand.nextFloat() * 6.0F;
+ }
+ }
+
+ public int getMaxHealth()
+ {
+ return 20;
+ }
+
+ public EntityHomeShot(World var1, double var2, double var4, double var6, EntityLiving var8)
+ {
+ super(var1);
+ this.texture = "/aether/mobs/electroball.png";
+ this.lifeSpan = 200;
+ this.life = this.lifeSpan;
+ this.setSize(0.7F, 0.7F);
+ this.setPosition(var2, var4, var6);
+ this.target = var8;
+ this.sinage = new float[3];
+ this.isImmuneToFire = true;
+
+ for (int var9 = 0; var9 < 3; ++var9)
+ {
+ this.sinage[var9] = this.rand.nextFloat() * 6.0F;
+ }
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+ --this.life;
+
+ if (this.firstRun && this.target == null)
+ {
+ this.target = (EntityLiving) this.findPlayerToAttack();
+ this.firstRun = false;
+ }
+
+ if (this.target != null && !this.target.isDead && this.target.getHealth() > 0)
+ {
+ if (this.life <= 0)
+ {
+ this.isDead = true;
+ } else
+ {
+ this.updateAnims();
+ this.faceIt();
+ this.moveIt(this.target, 0.02D);
+ }
+ } else
+ {
+ this.isDead = true;
+ }
+ }
+
+ public void moveIt(Entity var1, double var2)
+ {
+ double var4 = (double) (this.rotationYaw / (180F / (float) Math.PI));
+ this.motionX -= Math.sin(var4) * var2;
+ this.motionZ += Math.cos(var4) * var2;
+ double var6 = var1.posY - 0.75D;
+
+ if (var6 < this.boundingBox.minY - 0.5D)
+ {
+ this.motionY -= var2 / 2.0D;
+ } else if (var6 > this.boundingBox.minY + 0.5D)
+ {
+ this.motionY += var2 / 2.0D;
+ } else
+ {
+ this.motionY += (var6 - this.boundingBox.minY) * (var2 / 2.0D);
+ }
+
+ if (this.onGround)
+ {
+ this.onGround = false;
+ this.motionY = 0.10000000149011612D;
+ }
+ }
+
+ public void faceIt()
+ {
+ this.faceEntity(this.target, 10.0F, 10.0F);
+ }
+
+ public void updateAnims()
+ {
+ for (int var1 = 0; var1 < 3; ++var1)
+ {
+ this.sinage[var1] += 0.3F + (float) var1 * 0.13F;
+
+ if (this.sinage[var1] > ((float) Math.PI * 2F))
+ {
+ this.sinage[var1] -= ((float) Math.PI * 2F);
+ }
+ }
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ super.writeEntityToNBT(var1);
+ var1.setShort("LifeLeft", (short) this.life);
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ super.readEntityFromNBT(var1);
+ this.life = var1.getShort("LifeLeft");
+ }
+
+ public void checkOverLimit()
+ {
+ double var1 = this.target.posX - this.posX;
+ double var3 = this.target.posY - this.posY;
+ double var5 = this.target.posZ - this.posZ;
+ double var7 = Math.sqrt(var1 * var1 + var3 * var3 + var5 * var5);
+
+ if (var7 > 0.125D)
+ {
+ double var9 = 0.125D / var7;
+ this.motionX *= var9;
+ this.motionY *= var9;
+ this.motionZ *= var9;
+ }
+ }
+
+ public Entity findPlayerToAttack()
+ {
+ EntityPlayer var1 = this.worldObj.getClosestPlayerToEntity(this, 16.0D);
+ return var1 != null && this.canEntityBeSeen(var1) ? var1 : null;
+ }
+
+ /**
+ * Applies a velocity to each of the entities pushing them away from each other. Args: entity
+ */
+ public void applyEntityCollision(Entity var1)
+ {
+ super.applyEntityCollision(var1);
+
+ if (var1 != null && this.target != null && var1 == this.target)
+ {
+ boolean var2 = var1.attackEntityFrom(DamageSource.causeMobDamage(this), 1);
+
+ if (var2)
+ {
+ this.moveIt(var1, -0.1D);
+ }
+ }
+ }
+
+ public boolean attackEntityFrom(Entity var1, int var2)
+ {
+ if (var1 != null)
+ {
+ this.moveIt(var1, -0.15D - (double) var2 / 8.0D);
+ return true;
+ } else
+ {
+ return false;
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/oldcode/EntityMiniCloud.java b/src/main/java/net/aetherteam/aether/oldcode/EntityMiniCloud.java
new file mode 100644
index 0000000..2c2b307
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/oldcode/EntityMiniCloud.java
@@ -0,0 +1,211 @@
+package net.aetherteam.aether.oldcode;
+
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityFlying;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.Vec3;
+import net.minecraft.world.World;
+
+public class EntityMiniCloud extends EntityFlying
+{
+ public String dir = "/net/aetherteam/aether/client/sprites";
+ public int shotTimer;
+ public int lifeSpan;
+ public boolean gotPlayer;
+ public boolean toLeft;
+ public EntityLiving dude;
+ public double targetX;
+ public double targetY;
+ public double targetZ;
+
+ public EntityMiniCloud(World var1)
+ {
+ super(var1);
+ this.texture = this.dir + "/mobs/cloudsentry/cloudsentry.png";
+ this.setSize(0.0F, 0.0F);
+ this.noClip = true;
+ this.entityCollisionReduction = 1.75F;
+ }
+
+ public int getMaxHealth()
+ {
+ return 5;
+ }
+
+ public EntityMiniCloud(World var1, EntityPlayer var2, boolean var3)
+ {
+ super(var1);
+ this.texture = this.dir + "/mobs/cloudsentry/cloudsentry.png";
+ this.setSize(0.5F, 0.45F);
+ this.dude = var2;
+ this.toLeft = var3;
+ this.lifeSpan = 3600;
+ this.getTargetPos();
+ this.setPosition(this.targetX, this.targetY, this.targetZ);
+ this.rotationPitch = this.dude.rotationPitch;
+ this.rotationYaw = this.dude.rotationYaw;
+ this.entityCollisionReduction = 1.75F;
+ this.spawnExplosionParticle();
+ }
+
+ /**
+ * Checks if the entity is in range to render by using the past in distance and comparing it to its average edge
+ * length * 64 * renderDistanceWeight Args: distance
+ */
+ public boolean isInRangeToRenderDist(double var1)
+ {
+ return true;
+ }
+
+ public void getTargetPos()
+ {
+ if (this.getDistanceToEntity(this.dude) > 2.0F)
+ {
+ this.targetX = this.dude.posX;
+ this.targetY = this.dude.posY - 0.10000000149011612D;
+ this.targetZ = this.dude.posZ;
+ } else
+ {
+ double var1 = (double) this.dude.rotationYaw;
+
+ if (this.toLeft)
+ {
+ var1 -= 90.0D;
+ } else
+ {
+ var1 += 90.0D;
+ }
+
+ var1 /= -(180D / Math.PI);
+ this.targetX = this.dude.posX + Math.sin(var1) * 1.05D;
+ this.targetY = this.dude.posY - 0.10000000149011612D;
+ this.targetZ = this.dude.posZ + Math.cos(var1) * 1.05D;
+ }
+ }
+
+ public boolean atShoulder()
+ {
+ double var1 = this.posX - this.targetX;
+ double var3 = this.posY - this.targetY;
+ double var5 = this.posZ - this.targetZ;
+ return Math.sqrt(var1 * var1 + var3 * var3 + var5 * var5) < 0.3D;
+ }
+
+ public void approachTarget()
+ {
+ double var1 = this.targetX - this.posX;
+ double var3 = this.targetY - this.posY;
+ double var5 = this.targetZ - this.posZ;
+ double var7 = Math.sqrt(var1 * var1 + var3 * var3 + var5 * var5) * 3.25D;
+ this.motionX = (this.motionX + var1 / var7) / 2.0D;
+ this.motionY = (this.motionY + var3 / var7) / 2.0D;
+ this.motionZ = (this.motionZ + var5 / var7) / 2.0D;
+ Math.atan2(var1, var5);
+ }
+
+ protected Entity findPlayer()
+ {
+ EntityPlayer var1 = this.worldObj.getClosestPlayerToEntity(this, 16.0D);
+ return var1 != null && this.canEntityBeSeen(var1) ? var1 : null;
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound var1)
+ {
+ super.writeEntityToNBT(var1);
+ var1.setShort("LifeSpan", (short) this.lifeSpan);
+ var1.setShort("ShotTimer", (short) this.shotTimer);
+ this.gotPlayer = this.dude != null;
+ var1.setBoolean("GotPlayer", this.gotPlayer);
+ var1.setBoolean("ToLeft", this.toLeft);
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound var1)
+ {
+ super.readEntityFromNBT(var1);
+ this.lifeSpan = var1.getShort("LifeSpan");
+ this.shotTimer = var1.getShort("ShotTimer");
+ this.gotPlayer = var1.getBoolean("GotPlayer");
+ this.toLeft = var1.getBoolean("ToLeft");
+ }
+
+ public void updateEntityActionState()
+ {
+ super.updateEntityActionState();
+ --this.lifeSpan;
+
+ if (this.lifeSpan <= 0)
+ {
+ this.spawnExplosionParticle();
+ this.isDead = true;
+ } else
+ {
+ if (this.shotTimer > 0)
+ {
+ --this.shotTimer;
+ }
+
+ if (this.gotPlayer && this.dude == null)
+ {
+ this.gotPlayer = false;
+ this.dude = (EntityLiving) this.findPlayer();
+ }
+
+ if (this.dude != null && !this.dude.isDead)
+ {
+ this.getTargetPos();
+
+ if (this.atShoulder())
+ {
+ this.motionX *= 0.65D;
+ this.motionY *= 0.65D;
+ this.motionZ *= 0.65D;
+ this.rotationYaw = this.dude.rotationYaw + (this.toLeft ? 1.0F : -1.0F);
+ this.rotationPitch = this.dude.rotationPitch;
+
+ if (this.shotTimer <= 0 && this.dude instanceof EntityPlayer && ((EntityPlayer) this.dude).swingProgress > 0.0F)
+ {
+ float var7 = this.rotationYaw - (this.toLeft ? 1.0F : -1.0F);
+ double var1 = this.posX + Math.sin((double) var7 / -(180D / Math.PI)) * 1.6D;
+ double var3 = this.posY - 0.25D;
+ double var5 = this.posZ + Math.cos((double) var7 / -(180D / Math.PI)) * 1.6D;
+ EntityFiroBall var8 = new EntityFiroBall(this.worldObj, var1, var3, var5, true, true);
+ this.worldObj.spawnEntityInWorld(var8);
+ Vec3 var9 = this.getLookVec();
+
+ if (var9 != null)
+ {
+ var8.smotionX = var9.xCoord * 1.5D;
+ var8.smotionY = var9.yCoord * 1.5D;
+ var8.smotionZ = var9.zCoord * 1.5D;
+ }
+
+ var8.smacked = true;
+ this.worldObj.playSoundAtEntity(this, "mob.zephyr.zephyrshoot", 0.75F, (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F);
+ this.shotTimer = 40;
+ }
+ } else
+ {
+ this.approachTarget();
+ }
+ } else
+ {
+ this.spawnExplosionParticle();
+ this.isDead = true;
+ }
+ }
+ }
+
+ public boolean attackEntityFrom(EntityLiving var1, int var2)
+ {
+ return var1 != null && var1 == this.dude ? false : super.attackEntityFrom(DamageSource.causeMobDamage(var1), var2);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/oldcode/GuiSunAltar.java b/src/main/java/net/aetherteam/aether/oldcode/GuiSunAltar.java
new file mode 100644
index 0000000..31fcedf
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/oldcode/GuiSunAltar.java
@@ -0,0 +1,58 @@
+package net.aetherteam.aether.oldcode;
+
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.util.StringTranslate;
+import net.minecraft.world.World;
+import org.lwjgl.opengl.GL11;
+
+public class GuiSunAltar extends GuiScreen
+{
+ private World worldObj;
+ private GuiSunAltarSlider slider;
+
+ public GuiSunAltar(World var1)
+ {
+ this.worldObj = var1;
+ }
+
+ /**
+ * Adds the buttons (and other controls) to the screen in question.
+ */
+ public void initGui()
+ {
+ super.initGui();
+ StringTranslate var1 = StringTranslate.getInstance();
+ this.slider = new GuiSunAltarSlider(this.worldObj, 1, this.width / 2 - 75, this.height / 2, var1.translateKey("block.SunAltar.time"), 0.0F);
+ this.buttonList.add(this.slider);
+ }
+
+ /**
+ * Draws the screen and all the components in it.
+ */
+ public void drawScreen(int var1, int var2, float var3)
+ {
+ this.drawDefaultBackground();
+ this.drawBackgroundLayer(var3, var1, var2);
+ super.drawScreen(var1, var2, var3);
+ }
+
+ protected void drawBackgroundLayer(float var1, int var2, int var3)
+ {
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.renderEngine.bindTexture("/aether/gui/sunaltar.png");
+ short var4 = 175;
+ byte var5 = 78;
+ int var6 = (this.width - var4) / 2;
+ int var7 = (this.height - var5) / 2;
+ this.drawTexturedModalRect(var6, var7, 0, 0, var4, var5);
+ this.fontRenderer.drawString("Sun Altar", (this.width - this.fontRenderer.getStringWidth("Sun Altar")) / 2, var7 + 20, 4210752);
+ }
+
+ /**
+ * Returns true if this GUI should pause the game when it is displayed in single-player
+ */
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/oldcode/GuiSunAltarSlider.java b/src/main/java/net/aetherteam/aether/oldcode/GuiSunAltarSlider.java
new file mode 100644
index 0000000..db113f2
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/oldcode/GuiSunAltarSlider.java
@@ -0,0 +1,114 @@
+package net.aetherteam.aether.oldcode;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.world.World;
+import org.lwjgl.opengl.GL11;
+
+public class GuiSunAltarSlider extends GuiButton
+{
+ public float sliderValue = 1.0F;
+ public boolean dragging = false;
+ private World worldObj;
+
+ public GuiSunAltarSlider(World var1, int var2, int var3, int var4, String var5, float var6)
+ {
+ super(var2, var3, var4, 150, 20, var5);
+ this.worldObj = var1;
+ this.sliderValue = var6;
+ }
+
+ /**
+ * Returns 0 if the button is disabled, 1 if the mouse is NOT hovering over this button and 2 if it IS hovering over
+ * this button.
+ */
+ protected int getHoverState(boolean var1)
+ {
+ return 0;
+ }
+
+ public void setTime()
+ {
+ long var1 = (long) (24000.0F * this.sliderValue);
+ long var3 = this.worldObj.getWorldInfo().getWorldTime();
+ long var5 = var3 % 24000L;
+ long var7 = var1 > var5 ? var1 - var5 : var1 + 24000L - var5;
+ this.worldObj.getWorldInfo().setWorldTime(var3 + var7);
+ }
+
+ /**
+ * Fired when the mouse button is dragged. Equivalent of MouseListener.mouseDragged(MouseEvent e).
+ */
+ protected void mouseDragged(Minecraft var1, int var2, int var3)
+ {
+ if (this.drawButton)
+ {
+ if (this.dragging)
+ {
+ this.sliderValue = (float) (var2 - (this.xPosition + 4)) / (float) (this.width - 8);
+
+ if (this.sliderValue < 0.0F)
+ {
+ this.sliderValue = 0.0F;
+ }
+
+ if (this.sliderValue > 1.0F)
+ {
+ this.sliderValue = 1.0F;
+ }
+
+ this.setTime();
+ }
+
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ this.drawTexturedModalRect(this.xPosition + (int) (this.sliderValue * (float) (this.width - 8)), this.yPosition, 0, 66, 4, 20);
+ this.drawTexturedModalRect(this.xPosition + (int) (this.sliderValue * (float) (this.width - 8)) + 4, this.yPosition, 196, 66, 4, 20);
+ }
+ }
+
+ /**
+ * Draws this button to the screen.
+ */
+ public void drawButton(Minecraft var1, int var2, int var3)
+ {
+ this.sliderValue = (float) (this.worldObj.getWorldInfo().getWorldTime() % 24000L) / 24000.0F;
+ super.drawButton(var1, var2, var3);
+ }
+
+ /**
+ * Returns true if the mouse has been pressed on this control. Equivalent of MouseListener.mousePressed(MouseEvent
+ * e).
+ */
+ public boolean mousePressed(Minecraft var1, int var2, int var3)
+ {
+ if (super.mousePressed(var1, var2, var3))
+ {
+ this.sliderValue = (float) (var2 - (this.xPosition + 4)) / (float) (this.width - 8);
+
+ if (this.sliderValue < 0.0F)
+ {
+ this.sliderValue = 0.0F;
+ }
+
+ if (this.sliderValue > 1.0F)
+ {
+ this.sliderValue = 1.0F;
+ }
+
+ this.setTime();
+ this.dragging = true;
+ return true;
+ } else
+ {
+ return false;
+ }
+ }
+
+ /**
+ * Fired when the mouse button is released. Equivalent of MouseListener.mouseReleased(MouseEvent e).
+ */
+ public void mouseReleased(int var1, int var2)
+ {
+ this.dragging = false;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/oldcode/ItemAetherBanBlock.java b/src/main/java/net/aetherteam/aether/oldcode/ItemAetherBanBlock.java
new file mode 100644
index 0000000..fe0dcd2
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/oldcode/ItemAetherBanBlock.java
@@ -0,0 +1,38 @@
+package net.aetherteam.aether.oldcode;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemBlock;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
+public class ItemAetherBanBlock extends ItemBlock
+{
+ private int dimensionToBan;
+
+ public ItemAetherBanBlock(int var1)
+ {
+ super(var1);
+ this.dimensionToBan = 3;
+ }
+
+ public ItemAetherBanBlock(int var1, int var2)
+ {
+ this(var1);
+ this.dimensionToBan = var2;
+ }
+
+ /**
+ * Callback for item usage. If the item does something special on right clicking, he will have one of those. Return
+ * True if something happen and false if it don't. This is for ITEMS, not BLOCKS
+ */
+ public boolean onItemUse(ItemStack var1, EntityPlayer var2, World var3, int var4, int var5, int var6, int var7, float var8, float var9, float var10)
+ {
+ return var2.dimension != this.dimensionToBan ? super.onItemUse(var1, var2, var3, var4, var5, var6, var7, var8, var9, var10) : false;
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/oldcode/ItemCloudStaff.java b/src/main/java/net/aetherteam/aether/oldcode/ItemCloudStaff.java
new file mode 100644
index 0000000..c8f0e72
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/oldcode/ItemCloudStaff.java
@@ -0,0 +1,59 @@
+package net.aetherteam.aether.oldcode;
+
+import java.util.List;
+
+import net.aetherteam.aether.items.ItemAether;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
+public class ItemCloudStaff extends ItemAether
+{
+ public ItemCloudStaff(int var1)
+ {
+ super(var1);
+ this.maxStackSize = 1;
+ this.setMaxDamage(60);
+ }
+
+ public Item setIconName(String var1)
+ {
+ return this.setUnlocalizedName("Aether:" + var1);
+ }
+
+ private boolean cloudsExist(World var1, EntityPlayer var2)
+ {
+ List var3 = var1.getEntitiesWithinAABBExcludingEntity(var2, var2.boundingBox.expand(128.0D, 128.0D, 128.0D));
+
+ for (int var4 = 0; var4 < var3.size(); ++var4)
+ {
+ Entity var5 = (Entity) var3.get(var4);
+
+ if (var5 instanceof EntityMiniCloud)
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
+ */
+ public ItemStack onItemRightClick(ItemStack var1, World var2, EntityPlayer var3)
+ {
+ if (!this.cloudsExist(var2, var3))
+ {
+ EntityMiniCloud var4 = new EntityMiniCloud(var2, var3, false);
+ EntityMiniCloud var5 = new EntityMiniCloud(var2, var3, true);
+ var2.spawnEntityInWorld(var4);
+ var2.spawnEntityInWorld(var5);
+ var1.damageItem(1, var3);
+ }
+
+ return var1;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/oldcode/ItemPhoenixBow.java b/src/main/java/net/aetherteam/aether/oldcode/ItemPhoenixBow.java
new file mode 100644
index 0000000..fbe8a68
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/oldcode/ItemPhoenixBow.java
@@ -0,0 +1,34 @@
+package net.aetherteam.aether.oldcode;
+
+import net.aetherteam.aether.items.ItemAether;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
+public class ItemPhoenixBow extends ItemAether
+{
+ public ItemPhoenixBow(int var1)
+ {
+ super(var1);
+ this.maxStackSize = 1;
+ }
+
+ /**
+ * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
+ */
+ public ItemStack onItemRightClick(ItemStack var1, World var2, EntityPlayer var3)
+ {
+ if (var3.inventory.consumeInventoryItem(Item.arrow.itemID))
+ {
+ var2.playSoundAtEntity(var3, "mob.ghast.fireball", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 0.8F));
+
+ if (!var2.isRemote)
+ {
+ ;
+ }
+ }
+
+ return var1;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/oldcode/NameGenerator.java b/src/main/java/net/aetherteam/aether/oldcode/NameGenerator.java
new file mode 100644
index 0000000..082ed58
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/oldcode/NameGenerator.java
@@ -0,0 +1,69 @@
+package net.aetherteam.aether.oldcode;
+
+import java.util.Random;
+
+public class NameGenerator
+{
+ private static final Random rand = new Random();
+ private static final Object[][] vowels = new Object[][]{a("a", 7), a("e", 7), a("i", 7), a("o", 7), a("u", 7), a("a", 7), a("e", 7), a("i", 7), a("o", 7), a("u", 7), a("a", 7), a("e", 7), a("i", 7), a("o", 7), a("u", 7), a("a", 7), a("e", 7), a("i", 7), a("o", 7), a("u", 7), a("a", 7), a("e", 7), a("i", 7), a("o", 7), a("u", 7), a("a", 7), a("e", 7), a("i", 7), a("o", 7), a("u", 7), a("a", 7), a("e", 7), a("i", 7), a("o", 7), a("u", 7), a("a", 7), a("e", 7), a("i", 7), a("o", 7), a("u", 7), a("a", 7), a("e", 7), a("i", 7), a("o", 7), a("u", 7), a("a", 7), a("e", 7), a("i", 7), a("o", 7), a("u", 7), a("a", 7), a("e", 7), a("i", 7), a("o", 7), a("u", 7), a("a", 7), a("e", 7), a("i", 7), a("o", 7), a("u", 7), a("ae", 7), a("ai", 7), a("ao", 7), a("au", 7), a("aa", 7), a("ea", 7), a("eo", 7), a("eu", 7), a("ee", 7), a("ia", 7), a("io", 7), a("iu", 7), a("ii", 7), a("oa", 7), a("oe", 7), a("oi", 7), a("ou", 7), a("oo", 7), a("eau", 7), a("\'", 4), a("y", 7)};
+ private static final Object[][] consonants = new Object[][]{a("b", 7), a("c", 7), a("d", 7), a("f", 7), a("g", 7), a("h", 7), a("j", 7), a("k", 7), a("l", 7), a("m", 7), a("n", 7), a("p", 7), a("qu", 6), a("r", 7), a("s", 7), a("t", 7), a("v", 7), a("w", 7), a("x", 7), a("y", 7), a("z", 7), a("sc", 7), a("ch", 7), a("gh", 7), a("ph", 7), a("sh", 7), a("th", 7), a("wh", 6), a("ck", 5), a("nk", 5), a("rk", 5), a("sk", 7), a("wk", 0), a("cl", 3), a("fl", 3), a("gl", 3), a("kl", 3), a("ll", 3), a("pl", 3), a("sl", 3), a("br", 3), a("cr", 3), a("dr", 3), a("fr", 3), a("gr", 3), a("kr", 3), a("pr", 3), a("sr", 3), a("tr", 3), a("ss", 5), a("st", 7), a("str", 3), a("b", 7), a("c", 7), a("d", 7), a("f", 7), a("g", 7), a("h", 7), a("j", 7), a("k", 7), a("l", 7), a("m", 7), a("n", 7), a("p", 7), a("r", 7), a("s", 7), a("t", 7), a("v", 7), a("w", 7), a("b", 7), a("c", 7), a("d", 7), a("f", 7), a("g", 7), a("h", 7), a("j", 7), a("k", 7), a("l", 7), a("m", 7), a("n", 7), a("p", 7), a("r", 7), a("s", 7), a("t", 7), a("v", 7), a("w", 7), a("br", 3), a("dr", 3), a("fr", 3), a("gr", 3), a("kr", 3)};
+
+ private static int rand(int var0, int var1)
+ {
+ return var0 + (int) (Math.random() * (double) (var1 - var0 + 1));
+ }
+
+ private static Object[] a(String var0, int var1)
+ {
+ return new Object[]{var0, Integer.valueOf(var1)};
+ }
+
+ public static String next(int var0, int var1)
+ {
+ Object[] var2 = null;
+ String var3 = "";
+ int var4 = rand(var0, var1);
+ boolean var5 = rand.nextBoolean();
+ boolean var6 = false;
+
+ for (int var7 = 1; var7 <= var4; ++var7)
+ {
+ while (!var6)
+ {
+ if (var5)
+ {
+ var2 = vowels[rand(0, vowels.length - 1)];
+ } else
+ {
+ var2 = consonants[rand(0, consonants.length - 1)];
+ }
+
+ int var8 = ((Integer) var2[1]).intValue();
+
+ if (var7 == 1)
+ {
+ if ((var8 & 2) > 0)
+ {
+ var6 = true;
+ }
+ } else if (var7 == var4)
+ {
+ if ((var8 & 1) > 0)
+ {
+ var6 = true;
+ }
+ } else if ((var8 & 4) > 0)
+ {
+ var6 = true;
+ }
+ }
+
+ var3 = var3 + (String) var2[0];
+ var5 = !var5;
+ var6 = false;
+ }
+
+ var3 = var3.substring(0, 1).toUpperCase() + var3.substring(1);
+ return var3;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/oldcode/RenderElectricBall.java b/src/main/java/net/aetherteam/aether/oldcode/RenderElectricBall.java
new file mode 100644
index 0000000..427e97a
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/oldcode/RenderElectricBall.java
@@ -0,0 +1,31 @@
+package net.aetherteam.aether.oldcode;
+
+import net.aetherteam.aether.client.models.ModelBall;
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.renderer.entity.RenderLiving;
+import net.minecraft.entity.EntityLiving;
+
+public class RenderElectricBall extends RenderLiving
+{
+ private ModelBall shotty;
+
+ public RenderElectricBall(ModelBase var1, float var2)
+ {
+ super(var1, var2);
+ this.shotty = (ModelBall) var1;
+ }
+
+ /**
+ * Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
+ * entityLiving, partialTickTime
+ */
+ public void preRenderCallback(EntityLiving var1, float var2)
+ {
+ EntityElectricBall var3 = (EntityElectricBall) var1;
+
+ for (int var4 = 0; var4 < 3; ++var4)
+ {
+ this.shotty.sinage[var4] = var3.sinage[var4];
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/oldcode/RenderFlamingArrow.java b/src/main/java/net/aetherteam/aether/oldcode/RenderFlamingArrow.java
new file mode 100644
index 0000000..51bf17b
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/oldcode/RenderFlamingArrow.java
@@ -0,0 +1,86 @@
+package net.aetherteam.aether.oldcode;
+
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.entity.Render;
+import net.minecraft.entity.Entity;
+import net.minecraft.util.MathHelper;
+import org.lwjgl.opengl.GL11;
+import org.lwjgl.opengl.GL12;
+
+public class RenderFlamingArrow extends Render
+{
+ public void renderArrow(EntityFlamingArrow var1, double var2, double var4, double var6, float var8, float var9)
+ {
+ if (var1.prevRotationYaw != 0.0F || var1.prevRotationPitch != 0.0F)
+ {
+ this.loadTexture("/aether/other/FlamingArrows.png");
+ GL11.glPushMatrix();
+ GL11.glTranslatef((float) var2, (float) var4, (float) var6);
+ GL11.glRotatef(var1.prevRotationYaw + (var1.rotationYaw - var1.prevRotationYaw) * var9 - 90.0F, 0.0F, 1.0F, 0.0F);
+ GL11.glRotatef(var1.prevRotationPitch + (var1.rotationPitch - var1.prevRotationPitch) * var9, 0.0F, 0.0F, 1.0F);
+ Tessellator var10 = Tessellator.instance;
+ byte var11 = 0;
+ float var12 = 0.0F;
+ float var13 = 0.5F;
+ float var14 = (float) (0 + var11 * 10) / 32.0F;
+ float var15 = (float) (5 + var11 * 10) / 32.0F;
+ float var16 = 0.0F;
+ float var17 = 0.15625F;
+ float var18 = (float) (5 + var11 * 10) / 32.0F;
+ float var19 = (float) (10 + var11 * 10) / 32.0F;
+ float var20 = 0.05625F;
+ GL11.glEnable(GL12.GL_RESCALE_NORMAL);
+ float var21 = (float) var1.arrowShake - var9;
+
+ if (var21 > 0.0F)
+ {
+ float var22 = -MathHelper.sin(var21 * 3.0F) * var21;
+ GL11.glRotatef(var22, 0.0F, 0.0F, 1.0F);
+ }
+
+ GL11.glRotatef(45.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glScalef(var20, var20, var20);
+ GL11.glTranslatef(-4.0F, 0.0F, 0.0F);
+ GL11.glNormal3f(var20, 0.0F, 0.0F);
+ var10.startDrawingQuads();
+ var10.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double) var16, (double) var18);
+ var10.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double) var17, (double) var18);
+ var10.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double) var17, (double) var19);
+ var10.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double) var16, (double) var19);
+ var10.draw();
+ GL11.glNormal3f(-var20, 0.0F, 0.0F);
+ var10.startDrawingQuads();
+ var10.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double) var16, (double) var18);
+ var10.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double) var17, (double) var18);
+ var10.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double) var17, (double) var19);
+ var10.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double) var16, (double) var19);
+ var10.draw();
+
+ for (int var23 = 0; var23 < 4; ++var23)
+ {
+ GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glNormal3f(0.0F, 0.0F, var20);
+ var10.startDrawingQuads();
+ var10.addVertexWithUV(-8.0D, -2.0D, 0.0D, (double) var12, (double) var14);
+ var10.addVertexWithUV(8.0D, -2.0D, 0.0D, (double) var13, (double) var14);
+ var10.addVertexWithUV(8.0D, 2.0D, 0.0D, (double) var13, (double) var15);
+ var10.addVertexWithUV(-8.0D, 2.0D, 0.0D, (double) var12, (double) var15);
+ var10.draw();
+ }
+
+ GL11.glDisable(GL12.GL_RESCALE_NORMAL);
+ GL11.glPopMatrix();
+ }
+ }
+
+ /**
+ * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
+ * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
+ * (Render 0 ? var1.toString() : "Unable to fetch line.";
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/overlays/AetherOverlays.java b/src/main/java/net/aetherteam/aether/overlays/AetherOverlays.java
new file mode 100644
index 0000000..6174560
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/overlays/AetherOverlays.java
@@ -0,0 +1,915 @@
+package net.aetherteam.aether.overlays;
+
+import cpw.mods.fml.client.FMLClientHandler;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.AetherCommonPlayerHandler;
+import net.aetherteam.aether.AetherMoaColour;
+import net.aetherteam.aether.CommonProxy;
+import net.aetherteam.aether.client.PlayerBaseAetherClient;
+import net.aetherteam.aether.data.AetherOptions;
+import net.aetherteam.aether.data.PlayerClientInfo;
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.dungeons.keys.EnumKeyType;
+import net.aetherteam.aether.entities.bosses.EntityBossMob;
+import net.aetherteam.aether.entities.mounts.EntityMoa;
+import net.aetherteam.aether.entities.mounts.Mount;
+import net.aetherteam.aether.enums.EnumBossType;
+import net.aetherteam.aether.interfaces.IAetherBoss;
+import net.aetherteam.aether.items.AetherItems;
+import net.aetherteam.aether.notifications.NotificationHandler;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.entity.EntityClientPlayerMP;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.multiplayer.NetClientHandler;
+import net.minecraft.client.multiplayer.PlayerControllerMP;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.util.StringUtils;
+import net.minecraftforge.common.ForgeHooks;
+import org.lwjgl.opengl.GL11;
+
+@SideOnly(Side.CLIENT)
+public class AetherOverlays
+{
+ private static long slideTime;
+ private static boolean hasSlided;
+ private static float scale = 1.0F;
+
+ private static int partyAmount = 0;
+ private static boolean dirty;
+ private static float bossStaticHP;
+ private static float linearDecrement;
+ private static int bossPrevHP;
+ private static int diff;
+ private static int init;
+ private static int bossHPTimer;
+
+ public static void renderIronBubbles(Minecraft mc, Random rand)
+ {
+ ScaledResolution scaledresolution = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+
+ PlayerBaseAetherClient base = Aether.getClientPlayer(FMLClientHandler.instance().getClient().thePlayer);
+ AetherCommonPlayerHandler handler = base.getPlayerHandler();
+
+ EntityPlayer player = base.getPlayer();
+
+ GL11.glEnable(3042);
+ GL11.glDisable(2929);
+ GL11.glDepthMask(false);
+ GL11.glBlendFunc(770, 771);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glDisable(3008);
+ GL11.glBindTexture(3553, mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/aethericons.png"));
+
+ int bubbleAmount = base.getAccessoryCount(AetherItems.IronBubble.itemID);
+
+ if ((mc.playerController.shouldDrawHUD()) && (player.isInWater()) && (player.isInsideOfMaterial(Material.water)))
+ {
+ for (int i = 0; i < bubbleAmount; i++)
+ {
+ drawTexturedModalRect(width / 2 - 8 * i + 81, height - 49, 16.0F, 18.0F, 9.0F, 9.0F);
+ }
+ }
+
+ GL11.glDepthMask(true);
+ GL11.glEnable(2929);
+ GL11.glEnable(3008);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ }
+
+ public static void renderCooldown(Minecraft mc)
+ {
+ PlayerBaseAetherClient base = Aether.getClientPlayer(FMLClientHandler.instance().getClient().thePlayer);
+ AetherCommonPlayerHandler handler = base.getPlayerHandler();
+
+ if (base.generalcooldown != 0)
+ {
+ ScaledResolution scaledresolution = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+
+ EntityPlayer player = base.getPlayer();
+
+ mc.renderEngine.resetBoundTexture();
+
+ mc.fontRenderer.drawStringWithShadow(Aether.proxy.getClientCooldownName().get(player.username) + " Cooldown", width / 2 - mc.fontRenderer.getStringWidth(Aether.proxy.getClientCooldownName().get(player.username) + " Cooldown") / 2, 32 + (handler.getCurrentBoss() != null ? 20 : 0), -1);
+
+ GL11.glEnable(3042);
+ GL11.glDisable(2929);
+ GL11.glDepthMask(false);
+ GL11.glBlendFunc(770, 771);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glDisable(3008);
+ GL11.glBindTexture(3553, mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/cooldownBar.png"));
+
+ drawTexturedModalRect(width / 2 - 64, 42 + (handler.getCurrentBoss() != null ? 20 : 0), 0.0F, 8.0F, 128.0F, 8.0F);
+ int w = (int) (base.generalcooldown / base.generalcooldownmax * 128.0F);
+ drawTexturedModalRect(width / 2 - 64, 42 + (handler.getCurrentBoss() != null ? 20 : 0), 0.0F, 0.0F, w, 8.0F);
+
+ GL11.glDepthMask(true);
+ GL11.glEnable(2929);
+ GL11.glEnable(3008);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ }
+ }
+
+ public static void renderDungeonQueue(Minecraft mc)
+ {
+ PartyMember member = PartyController.instance().getMember(mc.thePlayer.username);
+ Party party = PartyController.instance().getParty(member);
+ Dungeon dungeon = DungeonHandler.instance().getDungeon(party);
+
+ EntityPlayer player = FMLClientHandler.instance().getClient().thePlayer;
+
+ if ((dungeon != null) && (party != null) && (!dungeon.hasStarted()))
+ {
+ ScaledResolution scaledresolution = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+
+ mc.renderEngine.resetBoundTexture();
+
+ String dungeonQueue = "Dungeon Queue: " + dungeon.getAmountQueued() + "/" + party.getMembers().size();
+
+ mc.fontRenderer.drawStringWithShadow(dungeonQueue, width / 2 - mc.fontRenderer.getStringWidth(dungeonQueue) / 2, 16 + ((player.ridingEntity instanceof Mount) ? 16 : 0), -1);
+ }
+ }
+
+ public static void renderDungeonTimer(Minecraft mc)
+ {
+ PartyMember member = PartyController.instance().getMember(mc.thePlayer.username);
+ Party party = PartyController.instance().getParty(member);
+ Dungeon dungeon = DungeonHandler.instance().getDungeon(party);
+
+ EntityPlayer player = FMLClientHandler.instance().getClient().thePlayer;
+
+ if ((dungeon != null) && (party != null) && (dungeon.timerStarted()) && (dungeon.hasMember(PartyController.instance().getMember(mc.thePlayer))))
+ {
+ ScaledResolution scaledresolution = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+
+ if (!dungeon.timerFinished())
+ {
+ mc.renderEngine.resetBoundTexture();
+
+ int minutes = (dungeon.getTimerLength() - dungeon.getTimerSeconds()) / 60;
+ int seconds = dungeon.getTimerLength() - dungeon.getTimerSeconds() - minutes * 60;
+
+ String timer = String.valueOf(minutes + ":" + String.format("%02d", new Object[]{Integer.valueOf(seconds)}));
+ String dungeonTimer = "Dungeon Ends In: " + timer;
+
+ mc.fontRenderer.drawStringWithShadow(dungeonTimer, width / 2 - mc.fontRenderer.getStringWidth(dungeonTimer) / 2, 16 + ((player.ridingEntity instanceof Mount) ? 16 : 0), -1);
+ }
+ }
+ }
+
+ public static void renderMountHealth(Minecraft mc)
+ {
+ PlayerBaseAetherClient base = Aether.getClientPlayer(FMLClientHandler.instance().getClient().thePlayer);
+ AetherCommonPlayerHandler handler = base.getPlayerHandler();
+
+ EntityPlayer player = FMLClientHandler.instance().getClient().thePlayer;
+
+ if ((!(player.ridingEntity instanceof Mount)) || (!(player.ridingEntity instanceof EntityLiving)))
+ {
+ return;
+ }
+
+ EntityLiving mount = (EntityLiving) player.ridingEntity;
+
+ if (mount != null)
+ {
+ ScaledResolution scaledresolution = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
+
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+
+ float textureWidth = 77.0F;
+ float textureHeight = 6.0F;
+
+ int healthBarYOffset = 16;
+
+ GL11.glEnable(3042);
+ GL11.glDisable(2929);
+ GL11.glDepthMask(false);
+ GL11.glBlendFunc(770, 771);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glDisable(3008);
+ GL11.glBindTexture(3553, mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/mountHealthBar.png"));
+
+ drawTexturedModalRect(width / 2 - textureWidth / 2.0F, healthBarYOffset, 0.0F, textureHeight, textureWidth, textureHeight);
+
+ float mountMaxHealth = mount.getMaxHealth();
+ float mountHealth = ((Mount) mount).getHealthTracked();
+
+ int healthProgress = (int) (mountHealth / mountMaxHealth * textureWidth);
+
+ drawTexturedModalRect(width / 2 - textureWidth / 2.0F, healthBarYOffset, 0.0F, 0.0F, healthProgress, textureHeight);
+
+ GL11.glDepthMask(true);
+ GL11.glEnable(2929);
+ GL11.glEnable(3008);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ }
+ }
+
+ public static void queueCoinbarSlide()
+ {
+ slideTime = Minecraft.getSystemTime();
+ hasSlided = false;
+ }
+
+ public static void renderCoinbar(Minecraft mc)
+ {
+ PlayerBaseAetherClient base = Aether.getClientPlayer(FMLClientHandler.instance().getClient().thePlayer);
+ AetherCommonPlayerHandler handler = base.getPlayerHandler();
+ ScaledResolution scaledresolution = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+
+ if (slideTime != 0L)
+ {
+ double d0 = (Minecraft.getSystemTime() - slideTime) / 3000.0D;
+
+ if ((!hasSlided) && ((d0 < 0.0D) || (d0 > 1.0D)))
+ {
+ slideTime = 0L;
+ } else
+ {
+ hasSlided = true;
+ double d1 = d0 * 2.0D;
+
+ if (d1 > 1.0D)
+ {
+ d1 = 2.0D - d1;
+ }
+
+ d1 *= 4.0D;
+ d1 = 1.0D - d1;
+
+ if (d1 < 0.0D)
+ {
+ d1 = 0.0D;
+ }
+
+ d1 *= d1;
+ d1 *= d1;
+
+ int dynamicY = (AetherOptions.getSlideCoinbar()) && (mc.currentScreen == null) ? 0 - (int) (d1 * 36.0D) : 0;
+
+ GL11.glPushMatrix();
+ GL11.glEnable(3042);
+ GL11.glDisable(2929);
+ GL11.glDepthMask(false);
+ GL11.glBlendFunc(770, 771);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glDisable(3008);
+
+ int coinAmount = base.getCoins();
+ ArrayList notificationList = NotificationHandler.instance().getNotifications();
+
+ GL11.glBindTexture(3553, mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/coinbar.png"));
+ drawTexturedModalRect(width / 2 - 35, dynamicY, 0.0F, 0.0F, 71.0F, 15.0F);
+ drawTexturedModalRect(width / 2 - (mc.fontRenderer.getStringWidth("x" + String.valueOf(coinAmount)) / 2 + 3) - 5, dynamicY + 1, 0.0F, 15.0F, 10.0F, 10.0F);
+
+ mc.renderEngine.resetBoundTexture();
+
+ mc.fontRenderer.drawStringWithShadow("x", width / 2 - (mc.fontRenderer.getStringWidth("x" + String.valueOf(coinAmount)) / 2 + 2) + 6, dynamicY + 1, -1);
+ mc.fontRenderer.drawStringWithShadow(String.valueOf(coinAmount), width / 2 - (mc.fontRenderer.getStringWidth("x" + String.valueOf(coinAmount)) / 2 + 2) + 13, dynamicY + 2, -1);
+
+ GL11.glDepthMask(true);
+ GL11.glEnable(2929);
+ GL11.glEnable(3008);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glPopMatrix();
+ }
+ }
+ }
+
+ public static void renderPartyHUD(Minecraft mc)
+ {
+ PlayerBaseAetherClient base = Aether.getClientPlayer(FMLClientHandler.instance().getClient().thePlayer);
+ AetherCommonPlayerHandler handler = base.getPlayerHandler();
+
+ boolean minimalistic = AetherOptions.getMinimalPartyHUD();
+ boolean renderHead = AetherOptions.getRenderHead();
+ boolean showHUD = AetherOptions.getShowPartyHUD();
+ boolean showName = AetherOptions.getShowPartyName();
+
+ ScaledResolution scaledresolution = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+
+ int notificationSize = NotificationHandler.instance().getNotifications().size();
+
+ GL11.glPushMatrix();
+ GL11.glEnable(3042);
+ GL11.glDisable(2929);
+ GL11.glDepthMask(false);
+ GL11.glBlendFunc(770, 771);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glDisable(3008);
+
+ if (notificationSize > 0)
+ {
+ GL11.glBindTexture(3553, mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/coinbar.png"));
+ drawTexturedModalRect(width / 2 + 37, 2.0F, 20.0F, 25.0F, 31.0F, 9.0F);
+ mc.renderEngine.resetBoundTexture();
+ }
+
+ Party possibleParty = PartyController.instance().getParty(PartyController.instance().getMember(mc.thePlayer));
+ Dungeon dungeon = DungeonHandler.instance().getDungeon(possibleParty);
+
+ if ((possibleParty != null) && (dungeon != null) && (dungeon.hasStarted()) && (dungeon.hasMember(PartyController.instance().getMember(mc.thePlayer))))
+ {
+ int keyWidth = 14;
+ int keyLength = 14;
+
+ String guardianAmount = "x" + String.valueOf(dungeon.getKeyAmount(EnumKeyType.Guardian));
+ String hostAmount = "x" + String.valueOf(dungeon.getKeyAmount(EnumKeyType.Host));
+ String eyeAmount = "x" + String.valueOf(dungeon.getKeyAmount(EnumKeyType.Eye));
+
+ FontRenderer font = mc.fontRenderer;
+
+ int centerOffset = (keyWidth * 3 / 2 + (font.getStringWidth(guardianAmount) + font.getStringWidth(hostAmount) + font.getStringWidth(eyeAmount)) / 2) / 3;
+
+ drawIcon(0.6F, width - 35 - 20 - centerOffset, 10.0F, 39.0F, 0.0F, keyWidth, keyLength);
+ drawIcon(0.6F, width - 35 - centerOffset, 10.0F, 53.0F, 0.0F, keyWidth, keyLength);
+ drawIcon(0.6F, width - 35 + 20 - centerOffset, 10.0F, 67.0F, 0.0F, keyWidth, keyLength);
+
+ GL11.glPushMatrix();
+ mc.renderEngine.resetBoundTexture();
+
+ GL11.glTranslatef(width - 35 - 12 - centerOffset, 12.0F, 1.0F);
+ GL11.glScalef(0.7F, 0.7F, 1.0F);
+
+ mc.fontRenderer.drawStringWithShadow(guardianAmount, 0, 0, 15066597);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ mc.renderEngine.resetBoundTexture();
+
+ GL11.glTranslatef(width - 35 + 8 - centerOffset, 12.0F, 1.0F);
+ GL11.glScalef(0.7F, 0.7F, 1.0F);
+
+ mc.fontRenderer.drawStringWithShadow(hostAmount, 0, 0, 15066597);
+ GL11.glPopMatrix();
+
+ GL11.glPushMatrix();
+ mc.renderEngine.resetBoundTexture();
+
+ GL11.glTranslatef(width - 35 + 28 - centerOffset, 12.0F, 1.0F);
+ GL11.glScalef(0.7F, 0.7F, 1.0F);
+
+ mc.fontRenderer.drawStringWithShadow(eyeAmount, 0, 0, 15066597);
+ GL11.glPopMatrix();
+ }
+
+ GL11.glDepthMask(true);
+ GL11.glEnable(2929);
+ GL11.glEnable(3008);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glPopMatrix();
+
+ if (showHUD)
+ {
+ int xNegOffset = renderHead ? 0 : -18;
+
+ GL11.glPushMatrix();
+ GL11.glEnable(3042);
+ GL11.glDisable(2929);
+ GL11.glDepthMask(false);
+ GL11.glBlendFunc(770, 771);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glDisable(3008);
+
+ int coinAmount = base.getCoins();
+
+ mc.renderEngine.resetBoundTexture();
+
+ Party party = PartyController.instance().getParty(base.getPlayer());
+
+ boolean inDungeon = (party != null) && (dungeon != null) && (dungeon.hasStarted()) && (dungeon.isQueuedParty(party)) && (dungeon.hasMember(PartyController.instance().getMember(Minecraft.getMinecraft().thePlayer)));
+
+ ArrayList members = party != null ? party.getMembers() : inDungeon ? dungeon.getQueuedMembers() : null;
+
+ if ((party != null) && (members != null))
+ {
+ int j = 0;
+
+ partyAmount = party.getMembers().size();
+
+ GL11.glPushMatrix();
+ mc.renderEngine.resetBoundTexture();
+
+ GL11.glScalef(0.75F, 0.75F, 1.0F);
+
+ int serverPlayerAmount = mc.thePlayer.sendQueue.playerInfoList.size();
+
+ if ((showName) && (serverPlayerAmount > 1))
+ mc.fontRenderer.drawStringWithShadow("§n" + (inDungeon ? "Dungeon Group" : "Party") + ":§r " + party.getName(), 2, 59, 15066597);
+ GL11.glPopMatrix();
+
+ int count = 0;
+
+ for (PartyMember member : members)
+ {
+ if ((count + 1 < party.getMemberSizeLimit()) && (!member.username.equalsIgnoreCase(mc.thePlayer.username)))
+ {
+ drawPlayerSlot(member.username, xNegOffset, 50 + 20 * count + 2 * partyAmount, mc, minimalistic, renderHead);
+
+ count++;
+ }
+ }
+ mc.renderEngine.resetBoundTexture();
+ }
+
+ GL11.glDepthMask(true);
+ GL11.glEnable(2929);
+ GL11.glEnable(3008);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glPopMatrix();
+ }
+ }
+
+ public static void drawPlayerSlot(String playername, int x, int y, Minecraft mc, boolean minimalistic, boolean renderHead)
+ {
+ PlayerClientInfo playerClientInfo = (PlayerClientInfo) Aether.proxy.getPlayerClientInfo().get(playername);
+
+ if (playerClientInfo != null)
+ {
+ int icon = mc.renderEngine.getTextureForDownloadableImage("http://skins.minecraft.net/MinecraftSkins/" + StringUtils.stripControlCodes(playername) + ".png", "/mob/char.png");
+
+ scale = 1.35F - 0.025F * partyAmount;
+
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, icon);
+ GL11.glEnable(3553);
+
+ GL11.glPushMatrix();
+
+ if (renderHead)
+ {
+ float u = 0.125F;
+ float v = 0.25F;
+ float u1 = 0.25F;
+ float v1 = 0.5F;
+ GL11.glScalef(0.8F * scale, 0.8F * scale, 1.0F);
+ GL11.glBegin(7);
+ GL11.glTexCoord2f(u, v);
+ GL11.glVertex2f(x + 2, y + 2);
+ GL11.glTexCoord2f(u, v1);
+ GL11.glVertex2f(x + 2, y + 18);
+ GL11.glTexCoord2f(u1, v1);
+ GL11.glVertex2f(x + 18, y + 18);
+ GL11.glTexCoord2f(u1, v);
+ GL11.glVertex2f(x + 18, y + 2);
+ GL11.glEnd();
+ }
+
+ if (!minimalistic)
+ {
+ drawHealthBar(x + 21, y + 8, playerClientInfo.getHalfHearts(), playerClientInfo.getMaxHealth());
+ }
+
+ GL11.glPushMatrix();
+ mc.renderEngine.resetBoundTexture();
+
+ GL11.glTranslatef(x + 22, y + 2, 1.0F);
+ GL11.glScalef(0.5F * scale, 0.5F * scale, 1.0F);
+
+ String coins = String.valueOf(playerClientInfo.getAetherCoins());
+ int hungerPercent = (int) (playerClientInfo.getHunger() / 20.0D * 100.0D);
+ String armour = playerClientInfo.getArmourValue() + "/" + 20;
+
+ mc.fontRenderer.drawStringWithShadow(playername, 0, 0, PartyController.instance().isLeader(playername) ? 16763904 : 15066597);
+
+ GL11.glPushMatrix();
+ if (!minimalistic)
+ {
+ GL11.glTranslatef(4.5F, 4.0F, 1.0F);
+ GL11.glScalef(0.8F, 0.8F, 1.0F);
+ }
+
+ String hearts = playerClientInfo.getHalfHearts() + "/" + playerClientInfo.getMaxHealth();
+
+ mc.fontRenderer.drawStringWithShadow(hearts, minimalistic ? 12 : 44 - mc.fontRenderer.getStringWidth(hearts) / 2, minimalistic ? 10 : 7, 15066597);
+ mc.fontRenderer.drawStringWithShadow(String.valueOf(hungerPercent) + "%", minimalistic ? 11 : 45, minimalistic ? 20 : 17, 15066597);
+
+ if (!minimalistic) mc.fontRenderer.drawStringWithShadow(armour, 7, 17, 15066597);
+ GL11.glPopMatrix();
+
+ mc.fontRenderer.drawStringWithShadow(coins, minimalistic ? 49 : mc.fontRenderer.getStringWidth(playername) + 17, minimalistic ? 20 : 0, 15066597);
+
+ if (minimalistic) mc.fontRenderer.drawStringWithShadow(armour, 56, 10, 15066597);
+
+ if (minimalistic)
+ {
+ drawIcon(1.1F, 0.0F, 10.0F, 18.0F, 0.0F, 9.0F, 9.0F);
+ drawIcon(1.1F, 44.0F, 10.0F, 9.0F, 0.0F, 9.0F, 9.0F);
+ drawIcon(1.1F, 0.0F, 20.0F, 0.0F, 0.0F, 9.0F, 9.0F);
+
+ drawIcon(0.75F, 38.0F, 20.0F, 27.0F, 0.0F, 12.0F, 12.0F);
+ } else
+ {
+ drawIcon(0.85F, 32.0F, 17.0F, 0.0F, 0.0F, 9.0F, 9.0F);
+ drawIcon(0.85F, 0.0F, 17.0F, 9.0F, 0.0F, 9.0F, 9.0F);
+ drawIcon(0.75F, mc.fontRenderer.getStringWidth(playername) + 6, 0.0F, 27.0F, 0.0F, 12.0F, 12.0F);
+ }
+
+ GL11.glPopMatrix();
+ GL11.glPopMatrix();
+ }
+ }
+
+ public static void drawIcon(float scale, float x, float y, float u, float v, float width, float height)
+ {
+ Minecraft mc = Minecraft.getMinecraft();
+ ScaledResolution scaledresolution = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
+
+ int scaledWidth = scaledresolution.getScaledWidth();
+ int scaledHeight = scaledresolution.getScaledHeight();
+
+ GL11.glPushMatrix();
+ GL11.glEnable(3042);
+ GL11.glDisable(2929);
+ GL11.glDepthMask(false);
+ GL11.glBlendFunc(770, 771);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glDisable(3008);
+ GL11.glBindTexture(3553, mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/partyicons.png"));
+
+ GL11.glTranslatef(x, y - 0.5F, 1.0F);
+ GL11.glScalef(scale, scale, 1.0F);
+
+ drawTexturedModalRect(0.0F, 0.0F, u, v, width, height);
+
+ GL11.glDepthMask(true);
+ GL11.glEnable(2929);
+ GL11.glEnable(3008);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glPopMatrix();
+ }
+
+ public static void drawHealthBar(float x, float y, int health, int maxHealth)
+ {
+ Minecraft mc = Minecraft.getMinecraft();
+ ScaledResolution scaledresolution = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
+
+ int scaledWidth = scaledresolution.getScaledWidth();
+ int scaledHeight = scaledresolution.getScaledHeight();
+
+ float textureWidth = 77.0F;
+ float textureHeight = 6.0F;
+
+ GL11.glPushMatrix();
+ GL11.glEnable(3042);
+ GL11.glDisable(2929);
+ GL11.glDepthMask(false);
+ GL11.glBlendFunc(770, 771);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glDisable(3008);
+ GL11.glBindTexture(3553, mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/mountHealthBar.png"));
+
+ GL11.glTranslatef(x, y, 1.0F);
+ GL11.glScalef(0.525F * scale, 0.525F * scale, 1.0F);
+
+ drawTexturedModalRect(0.0F, 0.0F, 0.0F, textureHeight, textureWidth, textureHeight);
+
+ float mountMaxHealth = maxHealth;
+ float mountHealth = health;
+
+ int healthProgress = (int) (mountHealth / mountMaxHealth * textureWidth);
+
+ drawTexturedModalRect(0.0F, 0.0F, 0.0F, 0.0F, healthProgress, textureHeight);
+
+ GL11.glDepthMask(true);
+ GL11.glEnable(2929);
+ GL11.glEnable(3008);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glPopMatrix();
+ }
+
+ public static void drawArmorBar(int x, int y, int armour, int maxArmour)
+ {
+ Minecraft mc = Minecraft.getMinecraft();
+ ScaledResolution scaledresolution = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
+
+ int scaledWidth = scaledresolution.getScaledWidth();
+ int scaledHeight = scaledresolution.getScaledHeight();
+
+ float textureWidth = 81.0F;
+ float textureHeight = 9.0F;
+
+ GL11.glPushMatrix();
+ GL11.glEnable(3042);
+ GL11.glDisable(2929);
+ GL11.glDepthMask(false);
+ GL11.glBlendFunc(770, 771);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glDisable(3008);
+ GL11.glBindTexture(3553, mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/armourBar.png"));
+
+ GL11.glTranslatef(x, y - 0.5F, 1.0F);
+ GL11.glScalef(0.315F * scale, 0.35F * scale, 1.0F);
+
+ drawTexturedModalRect(0.0F, 0.0F, 0.0F, textureHeight, textureWidth, textureHeight);
+
+ float playerMaxArmour = maxArmour;
+ float playerArmour = armour;
+
+ int healthProgress = (int) (playerArmour / playerMaxArmour * textureWidth);
+
+ drawTexturedModalRect(0.0F, 0.0F, 0.0F, 0.0F, healthProgress, textureHeight);
+
+ GL11.glDepthMask(true);
+ GL11.glEnable(2929);
+ GL11.glEnable(3008);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glPopMatrix();
+ }
+
+ @SideOnly(Side.CLIENT)
+ public static void renderBossHP(Minecraft mc)
+ {
+ PlayerBaseAetherClient base = Aether.getClientPlayer(FMLClientHandler.instance().getClient().thePlayer);
+ AetherCommonPlayerHandler handler = base.getPlayerHandler();
+
+ IAetherBoss boss = handler.getCurrentBoss();
+
+ if ((handler == null) || (boss == null) || (boss.getBossEntity() == null) || (boss.getBossEntity().isDead) || (!(boss.getBossEntity() instanceof EntityBossMob)) || (((EntityBossMob) boss.getBossEntity()).getBossHP() <= 0))
+ {
+ return;
+ }
+
+ EntityBossMob bossMob = (EntityBossMob) boss.getBossEntity();
+
+ ScaledResolution scaledresolution = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+
+ String bossTitle = "§o" + boss.getBossTitle();
+ int nameOffset = mc.fontRenderer.getStringWidth(bossTitle) / 2;
+ String bossTypeString = "";
+
+ GL11.glBindTexture(3553, mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/bossHPBar.png"));
+
+ GL11.glEnable(3042);
+ GL11.glBlendFunc(770, 771);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+
+ float health = bossMob.getBossHP() / bossMob.getMaxHealth() * 256.0F;
+
+ int offset1 = 0;
+ int offset2 = 0;
+ int offset3 = 0;
+ int offset4 = 0;
+
+ int x = 0;
+ int y = 0;
+ int u = 0;
+ int v = 0;
+
+ if (boss.getBossType() != null)
+ {
+ boolean isFinal = boss.getBossType() == EnumBossType.BOSS;
+
+ if (isFinal)
+ {
+ drawTexturedModalRect(width / 2 - 49, 10.0F, 1.0F, 57.0F, 96.0F, 58.0F);
+ }
+
+ bossTypeString = "§o" + (isFinal ? "Final" : "Mini") + " Boss";
+
+ offset1 = isFinal ? 45 : 24;
+ offset2 = isFinal ? -10 : 11;
+ offset3 = isFinal ? 7 : 0;
+ offset4 = mc.fontRenderer.getStringWidth(bossTypeString) / 2;
+
+ y = isFinal ? 0 : 14;
+ }
+
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+
+ drawTexturedModalRect(width / 2 - 128, 32 - offset2, x, 28.0F, 256.0F, 14.0F);
+
+ if ((bossMob.getBossHP() != bossPrevHP) && (!dirty))
+ {
+ dirty = true;
+ bossStaticHP = bossPrevHP;
+ diff = bossPrevHP - bossMob.getBossHP();
+ linearDecrement = diff;
+ bossPrevHP = bossMob.getBossHP();
+ }
+
+ if (dirty)
+ {
+ float staticHealth = bossStaticHP / bossMob.getMaxHealth() * 256.0F;
+
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+
+ drawTexturedModalRect(width / 2 - 128, 32 - offset2, x, 42.0F, staticHealth, 14.0F);
+
+ if (init > 25)
+ {
+ if (bossStaticHP > bossPrevHP)
+ {
+ bossStaticHP -= linearDecrement / 50.0F;
+ linearDecrement -= diff / 5;
+ diff /= 5;
+ } else
+ {
+ dirty = false;
+ diff = 0;
+ init = 0;
+ }
+ } else init += 1;
+
+ }
+
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ drawTexturedModalRect(width / 2 - 128, 32 - offset2, x, y, health, 14.0F);
+
+ mc.renderEngine.resetBoundTexture();
+
+ mc.fontRenderer.drawStringWithShadow(bossTitle, width / 2 - nameOffset, offset1, 1744830463);
+ mc.fontRenderer.drawStringWithShadow(bossTypeString, width / 2 - offset4, offset1 + 14, 1744830463);
+
+ bossPrevHP = bossMob.getBossHP();
+
+ GL11.glDisable(3042);
+ }
+
+ public static void renderJumps(Minecraft mc)
+ {
+ EntityPlayer player = FMLClientHandler.instance().getClient().thePlayer;
+
+ PlayerBaseAetherClient base = Aether.getClientPlayer(player);
+ AetherCommonPlayerHandler handler = base.getPlayerHandler();
+
+ if ((base.getPlayer() == null) || (base.getPlayer().ridingEntity == null) || (!(base.getPlayer().ridingEntity instanceof EntityMoa)))
+ {
+ return;
+ }
+ ScaledResolution scaledresolution = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
+
+ EntityMoa moa = (EntityMoa) player.ridingEntity;
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+
+ GL11.glPushMatrix();
+ GL11.glBindTexture(3553, mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/jumps.png"));
+ GL11.glEnable(3042);
+ GL11.glBlendFunc(775, 769);
+ GL11.glColor3f(1.0F, 1.0F, 1.0F);
+ GL11.glDisable(3042);
+
+ for (int jump = 0; jump < moa.getColour().jumps; jump++)
+ {
+ int yPos = 18;
+ int xPos = width / 2 + jump * 8 - moa.getColour().jumps * 8 / 2;
+
+ if (jump < moa.getJumpsRemaining())
+ {
+ drawTexturedModalRect(xPos, yPos, 0.0F, 0.0F, 9.0F, 11.0F);
+ } else
+ {
+ drawTexturedModalRect(xPos, yPos, 10.0F, 0.0F, 9.0F, 11.0F);
+ }
+ }
+
+ GL11.glDisable(3042);
+ GL11.glPopMatrix();
+ }
+
+ public static void renderHearts(Minecraft mc, Random rand)
+ {
+ PlayerBaseAetherClient base = Aether.getClientPlayer(FMLClientHandler.instance().getClient().thePlayer);
+ AetherCommonPlayerHandler handler = base.getPlayerHandler();
+
+ ScaledResolution scaledresolution = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+
+ EntityPlayer player = base.getPlayer();
+
+ GL11.glEnable(3042);
+ GL11.glDisable(2929);
+ GL11.glDepthMask(false);
+ GL11.glBlendFunc(770, 771);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glDisable(3008);
+ GL11.glBindTexture(3553, mc.renderEngine.getTexture("/net/aetherteam/aether/client/sprites/gui/aethericons.png"));
+
+ int heartsLife = player.getHealth() / 2;
+ boolean flag1 = player.hurtResistantTime / 3 % 2 == 1;
+
+ if (player.hurtResistantTime < 10)
+ {
+ flag1 = false;
+ }
+
+ int halfHearts = player.getHealth() - player.getMaxHealth();
+ int prevHalfHearts = player.prevHealth - player.getMaxHealth();
+ rand.setSeed(base.updateCounter * 312871);
+
+ if (mc.playerController.shouldDrawHUD())
+ {
+ for (int heart = 0; heart < base.maxHealth / 2 - 10; heart++)
+ {
+ int yPos = height - 50;
+
+ if (ForgeHooks.getTotalArmorValue(player) > 0)
+ {
+ yPos -= 8;
+ }
+
+ int k5 = 0;
+
+ if (flag1)
+ {
+ k5 = 1;
+ }
+
+ int xPos = width / 2 - 91 + heart * 8;
+
+ if (player.getHealth() <= 4)
+ {
+ yPos += rand.nextInt(2);
+ }
+
+ drawTexturedModalRect(xPos, yPos, 16 + k5 * 9, 0.0F, 9.0F, 9.0F);
+
+ if (flag1)
+ {
+ if (heart * 2 + 1 < prevHalfHearts)
+ {
+ drawTexturedModalRect(xPos, yPos, 70.0F, 0.0F, 9.0F, 9.0F);
+ }
+
+ if (heart * 2 + 1 == prevHalfHearts)
+ {
+ drawTexturedModalRect(xPos, yPos, 79.0F, 0.0F, 9.0F, 9.0F);
+ }
+ }
+
+ if (heart * 2 + 1 < halfHearts)
+ {
+ drawTexturedModalRect(xPos, yPos, 52.0F, 0.0F, 9.0F, 9.0F);
+ }
+
+ if (heart * 2 + 1 == halfHearts)
+ {
+ drawTexturedModalRect(xPos, yPos, 61.0F, 0.0F, 9.0F, 9.0F);
+ }
+ }
+ }
+
+ GL11.glDepthMask(true);
+ GL11.glEnable(2929);
+ GL11.glEnable(3008);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ }
+
+ public static void drawTexturedModalRect(float x, float y, float u, float v, float width, float height)
+ {
+ PlayerBaseAetherClient base = Aether.getClientPlayer(FMLClientHandler.instance().getClient().thePlayer);
+ AetherCommonPlayerHandler handler = base.getPlayerHandler();
+
+ float var7 = 0.0039063F;
+ float var8 = 0.0039063F;
+ Tessellator var9 = Tessellator.instance;
+ var9.startDrawingQuads();
+ var9.addVertexWithUV(x + 0.0F, y + height, base.zLevel, (u + 0.0F) * var7, (v + height) * var8);
+ var9.addVertexWithUV(x + width, y + height, base.zLevel, (u + width) * var7, (v + height) * var8);
+ var9.addVertexWithUV(x + width, y + 0.0F, base.zLevel, (u + width) * var7, (v + 0.0F) * var8);
+ var9.addVertexWithUV(x + 0.0F, y + 0.0F, base.zLevel, (u + 0.0F) * var7, (v + 0.0F) * var8);
+ var9.draw();
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.overlays.AetherOverlays
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/packets/AetherPacket.java b/src/main/java/net/aetherteam/aether/packets/AetherPacket.java
new file mode 100644
index 0000000..eebca04
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/packets/AetherPacket.java
@@ -0,0 +1,59 @@
+package net.aetherteam.aether.packets;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.network.PacketDispatcher;
+import cpw.mods.fml.common.network.Player;
+import cpw.mods.fml.relauncher.Side;
+
+import java.util.Iterator;
+import java.util.List;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.network.packet.Packet;
+import net.minecraft.network.packet.Packet250CustomPayload;
+import net.minecraft.server.MinecraftServer;
+import net.minecraft.server.management.ServerConfigurationManager;
+
+public abstract class AetherPacket
+{
+ public byte packetID;
+
+ public AetherPacket(int packetID)
+ {
+ this.packetID = Byte.valueOf((byte) packetID).byteValue();
+
+ RegisteredPackets.registerPacket(this);
+ }
+
+ public abstract void onPacketReceived(Packet250CustomPayload paramPacket250CustomPayload, Player paramPlayer);
+
+ public void sendPacketToAllExcept(Packet packet, Player player)
+ {
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+ Iterator i$;
+ if (side.isServer())
+ {
+ MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
+
+ if (server != null)
+ {
+ ServerConfigurationManager configManager = server.getConfigurationManager();
+
+ for (i$ = configManager.playerEntityList.iterator(); i$.hasNext(); )
+ {
+ Object playerObj = i$.next();
+
+ if (((playerObj instanceof EntityPlayer)) && ((Player) playerObj != player))
+ {
+ PacketDispatcher.sendPacketToPlayer(packet, (Player) playerObj);
+ }
+ }
+ }
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.packets.AetherPacket
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/packets/AetherPacketHandler.java b/src/main/java/net/aetherteam/aether/packets/AetherPacketHandler.java
new file mode 100644
index 0000000..1215ec6
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/packets/AetherPacketHandler.java
@@ -0,0 +1,826 @@
+package net.aetherteam.aether.packets;
+
+import cpw.mods.fml.common.network.IPacketHandler;
+import cpw.mods.fml.common.network.Player;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Set;
+
+import net.aetherteam.aether.data.PlayerClientInfo;
+import net.aetherteam.aether.donator.Donator;
+import net.aetherteam.aether.donator.DonatorChoice;
+import net.aetherteam.aether.donator.EnumChoiceType;
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonType;
+import net.aetherteam.aether.dungeons.keys.EnumKeyType;
+import net.aetherteam.aether.entities.mounts.MountInput;
+import net.aetherteam.aether.notifications.Notification;
+import net.aetherteam.aether.notifications.NotificationType;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyType;
+import net.aetherteam.aether.party.members.MemberType;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.aetherteam.aether.tile_entities.TileEntityBronzeDoorController;
+import net.aetherteam.aether.tile_entities.TileEntityEntranceController;
+import net.aetherteam.aether.worldgen.StructureBoundingBoxSerial;
+import net.minecraft.entity.Entity;
+import net.minecraft.nbt.NBTTagList;
+import net.minecraft.network.INetworkManager;
+import net.minecraft.network.packet.Packet;
+import net.minecraft.network.packet.Packet250CustomPayload;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.MathHelper;
+
+public class AetherPacketHandler implements IPacketHandler
+{
+ public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player)
+ {
+ DataInputStream dat = new DataInputStream(new ByteArrayInputStream(packet.data));
+ try
+ {
+ byte packetType = dat.readByte();
+
+ ArrayList packetList = RegisteredPackets.getPackets();
+
+ for (AetherPacket aetherPacket : packetList)
+ {
+ if (aetherPacket.packetID == packetType)
+ {
+ aetherPacket.onPacketReceived(packet, player);
+ return;
+ }
+ }
+ } catch (IOException e)
+ {
+ byte packetType;
+ e.printStackTrace();
+ }
+ }
+
+ public static Packet sendRidingPacket(Entity animal)
+ {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream(8);
+ DataOutputStream outputStream = new DataOutputStream(bos);
+ try
+ {
+ outputStream.writeByte(RegisteredPackets.riding.packetID);
+ outputStream.writeInt(animal == null ? -1 : animal.entityId);
+ } catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+
+ Packet250CustomPayload packet = new Packet250CustomPayload();
+ packet.channel = "Aether";
+ packet.data = bos.toByteArray();
+ packet.length = bos.size();
+
+ return packet;
+ }
+
+ public static Packet sendDonatorChange(String name, Donator donator)
+ {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ DataOutputStream dos = new DataOutputStream(bos);
+ try
+ {
+ dos.writeByte(RegisteredPackets.donatorChange.packetID);
+ dos.writeUTF(name.toLowerCase());
+ dos.writeUTF(donator.getRSA());
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ Packet250CustomPayload pkt = new Packet250CustomPayload();
+ pkt.channel = "Aether";
+ pkt.data = bos.toByteArray();
+ pkt.length = bos.size();
+ pkt.isChunkDataPacket = true;
+
+ return pkt;
+ }
+
+ public static Packet sendDonatorChoice(String donator, DonatorChoice choice, boolean adding, byte proxy)
+ {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ DataOutputStream dos = new DataOutputStream(bos);
+ try
+ {
+ dos.writeByte(RegisteredPackets.donatorChoice.packetID);
+ dos.writeUTF(donator);
+ dos.writeUTF(choice.name);
+ dos.writeBoolean(adding);
+ dos.writeByte(proxy);
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ Packet250CustomPayload pkt = new Packet250CustomPayload();
+ pkt.channel = "Aether";
+ pkt.data = bos.toByteArray();
+ pkt.length = bos.size();
+ pkt.isChunkDataPacket = true;
+
+ return pkt;
+ }
+
+ public static Packet sendDonatorTypeRemoval(String donator, EnumChoiceType type, byte proxy)
+ {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ DataOutputStream dos = new DataOutputStream(bos);
+ try
+ {
+ dos.writeByte(RegisteredPackets.donatorTypeRemoval.packetID);
+ dos.writeUTF(donator);
+ dos.writeUTF(type.name);
+ dos.writeByte(proxy);
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ Packet250CustomPayload pkt = new Packet250CustomPayload();
+ pkt.channel = "Aether";
+ pkt.data = bos.toByteArray();
+ pkt.length = bos.size();
+ pkt.isChunkDataPacket = true;
+
+ return pkt;
+ }
+
+ public static Packet sendAccessoryChange(NBTTagList nbttaglist, boolean clearFirst, boolean adding, Set inventories, byte proxy)
+ {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ DataOutputStream dos = new DataOutputStream(bos);
+ try
+ {
+ dos.writeByte(RegisteredPackets.accessoryChange.packetID);
+ NBTTagList.writeNamedTag(nbttaglist, dos);
+ dos.writeBoolean(clearFirst);
+ dos.writeBoolean(adding);
+ dos.writeShort(inventories.size());
+ dos.writeByte(proxy);
+ for (String username : inventories)
+ dos.writeUTF(username);
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ Packet250CustomPayload pkt = new Packet250CustomPayload();
+ pkt.channel = "Aether";
+ pkt.data = bos.toByteArray();
+ pkt.length = bos.size();
+ pkt.isChunkDataPacket = true;
+ return pkt;
+ }
+
+ public static Packet sendHeartChange(boolean clearFirst, boolean adding, int maxHealth, Set extraHearts)
+ {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ DataOutputStream dos = new DataOutputStream(bos);
+ try
+ {
+ dos.writeByte(RegisteredPackets.heartChange.packetID);
+ dos.writeBoolean(clearFirst);
+ dos.writeBoolean(adding);
+ dos.writeShort(extraHearts.size());
+ dos.writeInt(maxHealth);
+ for (String username : extraHearts)
+ dos.writeUTF(username);
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ Packet250CustomPayload pkt = new Packet250CustomPayload();
+ pkt.channel = "Aether";
+ pkt.data = bos.toByteArray();
+ pkt.length = bos.size();
+ pkt.isChunkDataPacket = true;
+ return pkt;
+ }
+
+ public static Packet sendCooldown(boolean clearFirst, boolean adding, int cooldown, int cooldownMax, String stackName, Set playerCooldowns)
+ {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ DataOutputStream dos = new DataOutputStream(bos);
+ try
+ {
+ dos.writeByte(RegisteredPackets.cooldown.packetID);
+ dos.writeBoolean(clearFirst);
+ dos.writeBoolean(adding);
+ dos.writeShort(playerCooldowns.size());
+ dos.writeInt(cooldown);
+ dos.writeInt(cooldownMax);
+ dos.writeUTF(stackName);
+
+ for (String username : playerCooldowns)
+ dos.writeUTF(username);
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ Packet250CustomPayload pkt = new Packet250CustomPayload();
+ pkt.channel = "Aether";
+ pkt.data = bos.toByteArray();
+ pkt.length = bos.size();
+ pkt.isChunkDataPacket = true;
+ return pkt;
+ }
+
+ public static Packet sendCoinChange(boolean clearFirst, boolean adding, int coinAmount, Set playerCoins)
+ {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ DataOutputStream dos = new DataOutputStream(bos);
+ try
+ {
+ dos.writeByte(RegisteredPackets.coinChange.packetID);
+ dos.writeBoolean(clearFirst);
+ dos.writeBoolean(adding);
+ dos.writeShort(playerCoins.size());
+ dos.writeInt(coinAmount);
+
+ for (String username : playerCoins)
+ dos.writeUTF(username);
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ Packet250CustomPayload pkt = new Packet250CustomPayload();
+ pkt.channel = "Aether";
+ pkt.data = bos.toByteArray();
+ pkt.length = bos.size();
+ pkt.isChunkDataPacket = true;
+ return pkt;
+ }
+
+ public static Packet sendPartyChange(boolean adding, String partyName, String potentialLeader, String skinUrl)
+ {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ DataOutputStream dos = new DataOutputStream(bos);
+ try
+ {
+ dos.writeByte(RegisteredPackets.partyChange.packetID);
+ dos.writeBoolean(adding);
+
+ dos.writeUTF(partyName);
+ dos.writeUTF(potentialLeader);
+ dos.writeUTF(skinUrl);
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ Packet250CustomPayload pkt = new Packet250CustomPayload();
+ pkt.channel = "Aether";
+ pkt.data = bos.toByteArray();
+ pkt.length = bos.size();
+ pkt.isChunkDataPacket = true;
+ return pkt;
+ }
+
+ public static Packet sendPartyNameChange(String partyName, String newPartyName)
+ {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ DataOutputStream dos = new DataOutputStream(bos);
+ try
+ {
+ dos.writeByte(RegisteredPackets.partyNameChange.packetID);
+
+ dos.writeUTF(partyName);
+ dos.writeUTF(newPartyName);
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ Packet250CustomPayload pkt = new Packet250CustomPayload();
+ pkt.channel = "Aether";
+ pkt.data = bos.toByteArray();
+ pkt.length = bos.size();
+ pkt.isChunkDataPacket = true;
+ return pkt;
+ }
+
+ public static Packet sendPartyMemberChange(boolean adding, String partyName, String username, String skinURL)
+ {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ DataOutputStream dos = new DataOutputStream(bos);
+ try
+ {
+ dos.writeByte(RegisteredPackets.memberChange.packetID);
+
+ dos.writeBoolean(adding);
+ dos.writeUTF(partyName);
+
+ dos.writeUTF(username);
+ dos.writeUTF(skinURL);
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ Packet250CustomPayload pkt = new Packet250CustomPayload();
+ pkt.channel = "Aether";
+ pkt.data = bos.toByteArray();
+ pkt.length = bos.size();
+ pkt.isChunkDataPacket = true;
+ return pkt;
+ }
+
+ public static Packet sendPartyTypeChange(String partyName, PartyType type)
+ {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ DataOutputStream dos = new DataOutputStream(bos);
+ try
+ {
+ dos.writeByte(RegisteredPackets.partyTypeChange.packetID);
+
+ dos.writeUTF(partyName);
+ dos.writeUTF(type.name());
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ Packet250CustomPayload pkt = new Packet250CustomPayload();
+ pkt.channel = "Aether";
+ pkt.data = bos.toByteArray();
+ pkt.length = bos.size();
+ pkt.isChunkDataPacket = true;
+ return pkt;
+ }
+
+ public static Packet sendNotificationChange(Notification notification, boolean adding)
+ {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ DataOutputStream dos = new DataOutputStream(bos);
+ try
+ {
+ dos.writeByte(RegisteredPackets.notification.packetID);
+
+ dos.writeBoolean(adding);
+
+ dos.writeUTF(notification.getType().name());
+ dos.writeUTF(notification.getHeaderText());
+ dos.writeUTF(notification.getSenderName());
+ dos.writeUTF(notification.getReceiverName());
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ Packet250CustomPayload pkt = new Packet250CustomPayload();
+ pkt.channel = "Aether";
+ pkt.data = bos.toByteArray();
+ pkt.length = bos.size();
+ pkt.isChunkDataPacket = true;
+ return pkt;
+ }
+
+ public static Packet sendPlayerInput(String username, ArrayList directions, boolean isJumping)
+ {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ DataOutputStream dos = new DataOutputStream(bos);
+ try
+ {
+ dos.writeByte(RegisteredPackets.playerInput.packetID);
+ dos.writeUTF(username);
+
+ dos.writeInt(directions.size());
+
+ for (MountInput direction : directions)
+ {
+ dos.writeUTF(direction.name());
+ }
+
+ dos.writeBoolean(isJumping);
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ Packet250CustomPayload pkt = new Packet250CustomPayload();
+ pkt.channel = "Aether";
+ pkt.data = bos.toByteArray();
+ pkt.length = bos.size();
+ pkt.isChunkDataPacket = true;
+ return pkt;
+ }
+
+ public static Packet sendAllParties(ArrayList parties)
+ {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ DataOutputStream dos = new DataOutputStream(bos);
+ try
+ {
+ dos.writeByte(RegisteredPackets.allParties.packetID);
+
+ dos.writeInt(parties.size());
+
+ for (Party party : parties)
+ {
+ dos.writeUTF(party.getName());
+ dos.writeUTF(party.getLeader().username);
+
+ dos.writeUTF(party.getType().name());
+ dos.writeInt(party.getMemberSizeLimit());
+
+ dos.writeInt(party.getMembers().size());
+
+ for (PartyMember member : party.getMembers())
+ {
+ dos.writeUTF(member.username);
+
+ dos.writeUTF(member.getType().name());
+ }
+ }
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ Packet250CustomPayload pkt = new Packet250CustomPayload();
+ pkt.channel = "Aether";
+ pkt.data = bos.toByteArray();
+ pkt.length = bos.size();
+ pkt.isChunkDataPacket = true;
+ return pkt;
+ }
+
+ public static Packet sendRequestPlayer(boolean adding, String partyName, String leaderName, String leaderSkinUrl, String requestedPlayer)
+ {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ DataOutputStream dos = new DataOutputStream(bos);
+ try
+ {
+ dos.writeByte(RegisteredPackets.requestPlayer.packetID);
+
+ dos.writeBoolean(adding);
+ dos.writeUTF(partyName);
+
+ dos.writeUTF(leaderName);
+ dos.writeUTF(leaderSkinUrl);
+ dos.writeUTF(requestedPlayer);
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ Packet250CustomPayload pkt = new Packet250CustomPayload();
+ pkt.channel = "Aether";
+ pkt.data = bos.toByteArray();
+ pkt.length = bos.size();
+ pkt.isChunkDataPacket = true;
+ return pkt;
+ }
+
+ public static Packet sendPlayerClientInfo(boolean clearFirst, boolean adding, String username, PlayerClientInfo playerClientInfo)
+ {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ DataOutputStream dos = new DataOutputStream(bos);
+ try
+ {
+ dos.writeByte(RegisteredPackets.playerClientInfo.packetID);
+ dos.writeBoolean(clearFirst);
+ dos.writeBoolean(adding);
+
+ dos.writeUTF(username);
+
+ dos.writeShort(playerClientInfo.getHalfHearts());
+ dos.writeShort(playerClientInfo.getMaxHealth());
+ dos.writeShort(playerClientInfo.getHunger());
+ dos.writeShort(playerClientInfo.getArmourValue());
+ dos.writeInt(playerClientInfo.getAetherCoins());
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ Packet250CustomPayload pkt = new Packet250CustomPayload();
+ pkt.channel = "Aether";
+ pkt.data = bos.toByteArray();
+ pkt.length = bos.size();
+ pkt.isChunkDataPacket = true;
+ return pkt;
+ }
+
+ public static Packet sendMemberTypeChange(String username, MemberType type)
+ {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ DataOutputStream dos = new DataOutputStream(bos);
+ try
+ {
+ dos.writeByte(RegisteredPackets.memberTypeChange.packetID);
+
+ dos.writeUTF(username);
+
+ dos.writeUTF(type.name());
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ Packet250CustomPayload pkt = new Packet250CustomPayload();
+ pkt.channel = "Aether";
+ pkt.data = bos.toByteArray();
+ pkt.length = bos.size();
+ pkt.isChunkDataPacket = true;
+ return pkt;
+ }
+
+ public static Packet sendDungeonQueueChange(boolean adding, Dungeon dungeon, int tileX, int tileY, int tileZ, Party party)
+ {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ DataOutputStream dos = new DataOutputStream(bos);
+ try
+ {
+ dos.writeByte(RegisteredPackets.dungeonQueueChange.packetID);
+ dos.writeBoolean(adding);
+
+ dos.writeInt(dungeon.getID());
+
+ dos.writeUTF(party.getName());
+
+ dos.writeInt(tileX);
+ dos.writeInt(tileY);
+ dos.writeInt(tileZ);
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ Packet250CustomPayload pkt = new Packet250CustomPayload();
+ pkt.channel = "Aether";
+ pkt.data = bos.toByteArray();
+ pkt.length = bos.size();
+ pkt.isChunkDataPacket = true;
+ return pkt;
+ }
+
+ public static Packet sendDungeonChange(boolean adding, Dungeon dungeon)
+ {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ DataOutputStream dos = new DataOutputStream(bos);
+ try
+ {
+ dos.writeByte(RegisteredPackets.dungeonChange.packetID);
+ dos.writeBoolean(adding);
+
+ dos.writeInt(dungeon.getID());
+
+ if (adding)
+ {
+ dos.writeUTF(dungeon.getType().name());
+ dos.writeInt(dungeon.centerX);
+ dos.writeInt(dungeon.centerZ);
+
+ dos.writeInt(dungeon.boundingBoxes.size());
+
+ dos.writeInt(dungeon.boundingBox.minX);
+ dos.writeInt(dungeon.boundingBox.minY);
+ dos.writeInt(dungeon.boundingBox.minZ);
+ dos.writeInt(dungeon.boundingBox.maxX);
+ dos.writeInt(dungeon.boundingBox.maxY);
+ dos.writeInt(dungeon.boundingBox.maxZ);
+
+ for (StructureBoundingBoxSerial box : dungeon.boundingBoxes)
+ {
+ dos.writeInt(box.minX);
+ dos.writeInt(box.minY);
+ dos.writeInt(box.minZ);
+ dos.writeInt(box.maxX);
+ dos.writeInt(box.maxY);
+ dos.writeInt(box.maxZ);
+ }
+ }
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ Packet250CustomPayload pkt = new Packet250CustomPayload();
+ pkt.channel = "Aether";
+ pkt.data = bos.toByteArray();
+ pkt.length = bos.size();
+ pkt.isChunkDataPacket = true;
+ return pkt;
+ }
+
+ public static Packet sendDungeonMemberQueue(Dungeon dungeon, PartyMember queuedMember)
+ {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ DataOutputStream dos = new DataOutputStream(bos);
+ try
+ {
+ dos.writeByte(RegisteredPackets.dungeonMemberQueue.packetID);
+
+ dos.writeInt(dungeon.getID());
+
+ dos.writeUTF(queuedMember.username);
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ Packet250CustomPayload pkt = new Packet250CustomPayload();
+ pkt.channel = "Aether";
+ pkt.data = bos.toByteArray();
+ pkt.length = bos.size();
+ pkt.isChunkDataPacket = true;
+ return pkt;
+ }
+
+ public static Packet sendDungeonFinish(Dungeon dungeon, TileEntityEntranceController controller, Party party)
+ {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ DataOutputStream dos = new DataOutputStream(bos);
+ try
+ {
+ dos.writeByte(RegisteredPackets.dungeonFinish.packetID);
+
+ dos.writeInt(dungeon.getID());
+
+ dos.writeUTF(party.getName());
+
+ dos.writeInt(controller.xCoord);
+ dos.writeInt(controller.yCoord);
+ dos.writeInt(controller.zCoord);
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ Packet250CustomPayload pkt = new Packet250CustomPayload();
+ pkt.channel = "Aether";
+ pkt.data = bos.toByteArray();
+ pkt.length = bos.size();
+ pkt.isChunkDataPacket = true;
+ return pkt;
+ }
+
+ public static Packet sendDungeonTimerStart(Dungeon dungeon, Party party, int timerLength)
+ {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ DataOutputStream dos = new DataOutputStream(bos);
+ try
+ {
+ dos.writeByte(RegisteredPackets.dungeonTimerStart.packetID);
+
+ dos.writeInt(dungeon.getID());
+ dos.writeUTF(party.getName());
+
+ dos.writeInt(timerLength);
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ Packet250CustomPayload pkt = new Packet250CustomPayload();
+ pkt.channel = "Aether";
+ pkt.data = bos.toByteArray();
+ pkt.length = bos.size();
+ pkt.isChunkDataPacket = true;
+ return pkt;
+ }
+
+ public static Packet removeDungeonKey(Dungeon dungeon, Party party, EnumKeyType keyType, TileEntityBronzeDoorController bronzeDoor)
+ {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ DataOutputStream dos = new DataOutputStream(bos);
+ try
+ {
+ dos.writeByte(RegisteredPackets.dungeonKey.packetID);
+ dos.writeBoolean(false);
+
+ dos.writeInt(dungeon.getID());
+ dos.writeUTF(party.getName());
+
+ dos.writeUTF(keyType.name());
+
+ dos.writeInt(MathHelper.floor_double(bronzeDoor.xCoord));
+ dos.writeInt(MathHelper.floor_double(bronzeDoor.yCoord));
+ dos.writeInt(MathHelper.floor_double(bronzeDoor.zCoord));
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ Packet250CustomPayload pkt = new Packet250CustomPayload();
+ pkt.channel = "Aether";
+ pkt.data = bos.toByteArray();
+ pkt.length = bos.size();
+ pkt.isChunkDataPacket = true;
+ return pkt;
+ }
+
+ public static Packet sendDungeonKey(Dungeon dungeon, Party party, EnumKeyType keyType)
+ {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ DataOutputStream dos = new DataOutputStream(bos);
+ try
+ {
+ dos.writeByte(RegisteredPackets.dungeonKey.packetID);
+ dos.writeBoolean(true);
+
+ dos.writeInt(dungeon.getID());
+ dos.writeUTF(party.getName());
+
+ dos.writeUTF(keyType.name());
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ Packet250CustomPayload pkt = new Packet250CustomPayload();
+ pkt.channel = "Aether";
+ pkt.data = bos.toByteArray();
+ pkt.length = bos.size();
+ pkt.isChunkDataPacket = true;
+ return pkt;
+ }
+
+ public static Packet sendDungeonRespawn(Dungeon dungeon, Party party)
+ {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ DataOutputStream dos = new DataOutputStream(bos);
+ try
+ {
+ dos.writeByte(RegisteredPackets.dungeonRespawn.packetID);
+
+ dos.writeInt(dungeon.getID());
+ dos.writeUTF(party.getName());
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ Packet250CustomPayload pkt = new Packet250CustomPayload();
+ pkt.channel = "Aether";
+ pkt.data = bos.toByteArray();
+ pkt.length = bos.size();
+ pkt.isChunkDataPacket = true;
+ return pkt;
+ }
+
+ public static Packet sendDungeonDisbandMember(Dungeon dungeon, PartyMember member)
+ {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ DataOutputStream dos = new DataOutputStream(bos);
+ try
+ {
+ dos.writeByte(RegisteredPackets.dungeonDisbandMember.packetID);
+
+ dos.writeInt(dungeon.getID());
+
+ dos.writeUTF(member.username);
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ Packet250CustomPayload pkt = new Packet250CustomPayload();
+ pkt.channel = "Aether";
+ pkt.data = bos.toByteArray();
+ pkt.length = bos.size();
+ pkt.isChunkDataPacket = true;
+ return pkt;
+ }
+
+ public static Packet sendDungeonQueueCheck(Dungeon dungeon)
+ {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ DataOutputStream dos = new DataOutputStream(bos);
+ try
+ {
+ dos.writeByte(RegisteredPackets.dungeonQueueCheck.packetID);
+
+ dos.writeInt(dungeon.getID());
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ Packet250CustomPayload pkt = new Packet250CustomPayload();
+ pkt.channel = "Aether";
+ pkt.data = bos.toByteArray();
+ pkt.length = bos.size();
+ pkt.isChunkDataPacket = true;
+ return pkt;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.packets.AetherPacketHandler
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/packets/PacketAccessoryChange.java b/src/main/java/net/aetherteam/aether/packets/PacketAccessoryChange.java
new file mode 100644
index 0000000..ca6fdc2
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/packets/PacketAccessoryChange.java
@@ -0,0 +1,79 @@
+package net.aetherteam.aether.packets;
+
+import cpw.mods.fml.common.network.PacketDispatcher;
+import cpw.mods.fml.common.network.Player;
+
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Set;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.CommonProxy;
+import net.aetherteam.aether.containers.InventoryAether;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.nbt.NBTTagList;
+import net.minecraft.network.packet.Packet250CustomPayload;
+
+public class PacketAccessoryChange extends AetherPacket
+{
+ public PacketAccessoryChange(int packetID)
+ {
+ super(packetID);
+ }
+
+ public void onPacketReceived(Packet250CustomPayload packet, Player player)
+ {
+ DataInputStream dat = new DataInputStream(new ByteArrayInputStream(packet.data));
+ try
+ {
+ byte packetType = dat.readByte();
+ NBTTagList nbttaglist = (NBTTagList) NBTTagList.readNamedTag(dat);
+ boolean clearFirst = dat.readBoolean();
+ boolean adding = dat.readBoolean();
+ short length = dat.readShort();
+ byte proxy = dat.readByte();
+
+ if (proxy == 1)
+ {
+ HashMap inventories = Aether.proxy.getClientInventories();
+
+ if (clearFirst)
+ {
+ inventories.clear();
+ }
+
+ InventoryAether inv = new InventoryAether((EntityPlayer) player);
+ inv.readFromNBT(nbttaglist);
+
+ for (int i = 0; i < length; i++)
+ {
+ String username = dat.readUTF();
+ if (adding) inventories.put(username, inv);
+ else inventories.remove(username);
+ }
+ } else
+ {
+ Set set = new HashSet();
+
+ for (int i = 0; i < length; i++)
+ {
+ String username = dat.readUTF();
+
+ set.add(username);
+ }
+
+ PacketDispatcher.sendPacketToAllPlayers(AetherPacketHandler.sendAccessoryChange(nbttaglist, clearFirst, adding, set, (byte) 1));
+ }
+ } catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.packets.PacketAccessoryChange
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/packets/PacketCoinChange.java b/src/main/java/net/aetherteam/aether/packets/PacketCoinChange.java
new file mode 100644
index 0000000..e8e94ec
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/packets/PacketCoinChange.java
@@ -0,0 +1,65 @@
+package net.aetherteam.aether.packets;
+
+import cpw.mods.fml.common.network.Player;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.InputStreamReader;
+import java.util.HashMap;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.CommonProxy;
+import net.aetherteam.aether.client.PlayerBaseAetherClient;
+import net.minecraft.client.entity.EntityPlayerSP;
+import net.minecraft.network.packet.Packet250CustomPayload;
+
+public class PacketCoinChange extends AetherPacket
+{
+ public PacketCoinChange(int packetID)
+ {
+ super(packetID);
+ }
+
+ public void onPacketReceived(Packet250CustomPayload packet, Player player)
+ {
+ DataInputStream dat = new DataInputStream(new ByteArrayInputStream(packet.data));
+ BufferedReader buf = new BufferedReader(new InputStreamReader(dat));
+ try
+ {
+ byte packetType = dat.readByte();
+ boolean clearFirst = dat.readBoolean();
+ boolean adding = dat.readBoolean();
+ short length = dat.readShort();
+ int coinAmount = dat.readInt();
+
+ HashMap playerCoins = Aether.proxy.getClientCoins();
+
+ if (clearFirst)
+ {
+ playerCoins.clear();
+ }
+
+ for (int i = 0; i < length; i++)
+ {
+ String username = dat.readUTF();
+ if (adding)
+ {
+ playerCoins.put(username, Integer.valueOf(coinAmount));
+ Aether.getClientPlayer((EntityPlayerSP) player).updateCoinAmount();
+ } else
+ {
+ playerCoins.remove(username);
+ }
+ }
+ } catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.packets.PacketCoinChange
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/packets/PacketCooldown.java b/src/main/java/net/aetherteam/aether/packets/PacketCooldown.java
new file mode 100644
index 0000000..7998cf1
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/packets/PacketCooldown.java
@@ -0,0 +1,75 @@
+package net.aetherteam.aether.packets;
+
+import cpw.mods.fml.common.network.Player;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.InputStreamReader;
+import java.util.HashMap;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.CommonProxy;
+import net.aetherteam.aether.client.PlayerBaseAetherClient;
+import net.minecraft.client.entity.EntityPlayerSP;
+import net.minecraft.network.packet.Packet250CustomPayload;
+
+public class PacketCooldown extends AetherPacket
+{
+ public PacketCooldown(int packetID)
+ {
+ super(packetID);
+ }
+
+ public void onPacketReceived(Packet250CustomPayload packet, Player player)
+ {
+ DataInputStream dat = new DataInputStream(new ByteArrayInputStream(packet.data));
+ BufferedReader buf = new BufferedReader(new InputStreamReader(dat));
+ try
+ {
+ byte packetType = dat.readByte();
+ boolean clearFirst = dat.readBoolean();
+ boolean adding = dat.readBoolean();
+ short length = dat.readShort();
+ int cooldown = dat.readInt();
+ int cooldownMax = dat.readInt();
+ String stackName = dat.readUTF();
+
+ HashMap playerCooldowns = Aether.proxy.getClientCooldown();
+ HashMap playerMaxCooldowns = Aether.proxy.getClientMaxCooldown();
+ HashMap playerCooldownName = Aether.proxy.getClientCooldownName();
+
+ if (clearFirst)
+ {
+ playerCooldowns.clear();
+ playerMaxCooldowns.clear();
+ playerCooldownName.clear();
+ }
+
+ for (int i = 0; i < length; i++)
+ {
+ String username = dat.readUTF();
+ if (adding)
+ {
+ playerCooldowns.put(username, Integer.valueOf(cooldown));
+ playerMaxCooldowns.put(username, Integer.valueOf(cooldownMax));
+ playerCooldownName.put(username, stackName);
+ Aether.getClientPlayer((EntityPlayerSP) player).updateGeneralCooldown();
+ } else
+ {
+ playerCooldowns.remove(username);
+ playerMaxCooldowns.remove(username);
+ playerCooldownName.remove(username);
+ }
+ }
+ } catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.packets.PacketCooldown
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/packets/PacketDonatorChange.java b/src/main/java/net/aetherteam/aether/packets/PacketDonatorChange.java
new file mode 100644
index 0000000..05b3010
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/packets/PacketDonatorChange.java
@@ -0,0 +1,42 @@
+package net.aetherteam.aether.packets;
+
+import cpw.mods.fml.common.network.Player;
+
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.IOException;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.donator.Donator;
+import net.aetherteam.aether.donator.SyncDonatorList;
+import net.minecraft.network.packet.Packet250CustomPayload;
+
+public class PacketDonatorChange extends AetherPacket
+{
+ public PacketDonatorChange(int packetID)
+ {
+ super(packetID);
+ }
+
+ public void onPacketReceived(Packet250CustomPayload packet, Player player)
+ {
+ DataInputStream dat = new DataInputStream(new ByteArrayInputStream(packet.data));
+ try
+ {
+ byte packetType = dat.readByte();
+ String username = dat.readUTF();
+ String RSA = dat.readUTF();
+
+ Aether.getInstance();
+ Aether.syncDonatorList.addDonator(username, new Donator(username, RSA));
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.packets.PacketDonatorChange
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/packets/PacketDonatorChoice.java b/src/main/java/net/aetherteam/aether/packets/PacketDonatorChoice.java
new file mode 100644
index 0000000..cf0b26c
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/packets/PacketDonatorChoice.java
@@ -0,0 +1,72 @@
+package net.aetherteam.aether.packets;
+
+import cpw.mods.fml.common.network.PacketDispatcher;
+import cpw.mods.fml.common.network.Player;
+
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.donator.Donator;
+import net.aetherteam.aether.donator.DonatorChoice;
+import net.aetherteam.aether.donator.SyncDonatorList;
+import net.minecraft.network.packet.Packet250CustomPayload;
+
+public class PacketDonatorChoice extends AetherPacket
+{
+ public PacketDonatorChoice(int packetID)
+ {
+ super(packetID);
+ }
+
+ public void onPacketReceived(Packet250CustomPayload packet, Player player)
+ {
+ DataInputStream dat = new DataInputStream(new ByteArrayInputStream(packet.data));
+ try
+ {
+ byte packetType = dat.readByte();
+ String username = dat.readUTF();
+ String choiceName = dat.readUTF();
+ boolean adding = dat.readBoolean();
+ byte proxy = dat.readByte();
+
+ if (proxy >= 1)
+ {
+ DonatorChoice choice = DonatorChoice.getChoiceFromString(choiceName);
+
+ if (choice == null)
+ {
+ System.out.println("Choice was null! Packet handling unsuccessful.");
+ return;
+ }
+
+ System.out.println("Choice transferred!");
+
+ if (adding)
+ {
+ Aether.getInstance();
+ Aether.syncDonatorList.getDonator(username).addChoice(choice);
+ } else
+ {
+ Aether.getInstance();
+ Aether.syncDonatorList.getDonator(username).removeChoiceType(choice.type);
+ }
+ } else
+ {
+ SyncDonatorList donators = Aether.syncDonatorList;
+ PacketDispatcher.sendPacketToAllPlayers(AetherPacketHandler.sendDonatorChoice(username, DonatorChoice.getChoiceFromString(choiceName), adding, (byte) 1));
+ System.out.println("Server received packet, dispatching to players!");
+ }
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.packets.PacketDonatorChoice
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/packets/PacketDonatorTypeRemoval.java b/src/main/java/net/aetherteam/aether/packets/PacketDonatorTypeRemoval.java
new file mode 100644
index 0000000..1b3d7a8
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/packets/PacketDonatorTypeRemoval.java
@@ -0,0 +1,64 @@
+package net.aetherteam.aether.packets;
+
+import cpw.mods.fml.common.network.PacketDispatcher;
+import cpw.mods.fml.common.network.Player;
+
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.donator.Donator;
+import net.aetherteam.aether.donator.EnumChoiceType;
+import net.aetherteam.aether.donator.SyncDonatorList;
+import net.minecraft.network.packet.Packet250CustomPayload;
+
+public class PacketDonatorTypeRemoval extends AetherPacket
+{
+ public PacketDonatorTypeRemoval(int packetID)
+ {
+ super(packetID);
+ }
+
+ public void onPacketReceived(Packet250CustomPayload packet, Player player)
+ {
+ DataInputStream dat = new DataInputStream(new ByteArrayInputStream(packet.data));
+ try
+ {
+ byte packetType = dat.readByte();
+ String username = dat.readUTF();
+ String typeName = dat.readUTF();
+ byte proxy = dat.readByte();
+
+ if (proxy >= 1)
+ {
+ EnumChoiceType type = EnumChoiceType.getTypeFromString(typeName);
+
+ if (type == null)
+ {
+ System.out.println("Choice type was null! Packet handling unsuccessful.");
+ return;
+ }
+
+ System.out.println("Choice type transferred!");
+
+ Aether.getInstance();
+ Aether.syncDonatorList.getDonator(username).removeChoiceType(type);
+ } else
+ {
+ SyncDonatorList donators = Aether.syncDonatorList;
+ PacketDispatcher.sendPacketToAllPlayers(AetherPacketHandler.sendDonatorTypeRemoval(username, EnumChoiceType.getTypeFromString(typeName), (byte) 1));
+ System.out.println("Server received 'Remove Type' packet, dispatching to players!");
+ }
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.packets.PacketDonatorTypeRemoval
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/packets/PacketDungeonChange.java b/src/main/java/net/aetherteam/aether/packets/PacketDungeonChange.java
new file mode 100644
index 0000000..38c7301
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/packets/PacketDungeonChange.java
@@ -0,0 +1,90 @@
+package net.aetherteam.aether.packets;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.network.Player;
+import cpw.mods.fml.relauncher.Side;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.dungeons.DungeonType;
+import net.aetherteam.aether.worldgen.StructureBoundingBoxSerial;
+import net.minecraft.network.packet.Packet250CustomPayload;
+
+public class PacketDungeonChange extends AetherPacket
+{
+ public PacketDungeonChange(int packetID)
+ {
+ super(packetID);
+ }
+
+ public void onPacketReceived(Packet250CustomPayload packet, Player player)
+ {
+ DataInputStream dat = new DataInputStream(new ByteArrayInputStream(packet.data));
+ BufferedReader buf = new BufferedReader(new InputStreamReader(dat));
+ try
+ {
+ byte packetType = dat.readByte();
+ boolean adding = dat.readBoolean();
+
+ int dungeonID = dat.readInt();
+
+ DungeonType dungeonType = null;
+ int x = -1;
+ int z = -1;
+ int amountBoxes = 0;
+ StructureBoundingBoxSerial boundingBox = null;
+ ArrayList boundingBoxes = null;
+
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (adding)
+ {
+ dungeonType = DungeonType.getTypeFromString(dat.readUTF());
+ x = dat.readInt();
+ z = dat.readInt();
+
+ amountBoxes = dat.readShort();
+
+ boundingBox = new StructureBoundingBoxSerial(dat.readInt(), dat.readInt(), dat.readInt(), dat.readInt(), dat.readInt(), dat.readInt());
+ boundingBoxes = new ArrayList();
+
+ for (int i = 0; i < amountBoxes; i++)
+ {
+ boundingBoxes.add(new StructureBoundingBoxSerial(dat.readInt(), dat.readInt(), dat.readInt(), dat.readInt(), dat.readInt(), dat.readInt()));
+ }
+ }
+
+ if (side.isClient())
+ {
+ Dungeon dungeon = DungeonHandler.instance().getDungeon(dungeonID);
+
+ if (adding)
+ {
+ if (dungeon != null)
+ {
+ DungeonHandler.instance().removeInstance(dungeon);
+ }
+
+ DungeonHandler.instance().addInstance(new Dungeon(dungeonType, x, z, boundingBox, boundingBoxes));
+ } else if (dungeon != null)
+ {
+ DungeonHandler.instance().removeInstance(dungeon);
+ }
+ }
+ } catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.packets.PacketDungeonChange
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/packets/PacketDungeonDisbandMember.java b/src/main/java/net/aetherteam/aether/packets/PacketDungeonDisbandMember.java
new file mode 100644
index 0000000..7a76d75
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/packets/PacketDungeonDisbandMember.java
@@ -0,0 +1,77 @@
+package net.aetherteam.aether.packets;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.network.Player;
+import cpw.mods.fml.relauncher.Side;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.InputStreamReader;
+
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.network.packet.Packet250CustomPayload;
+
+public class PacketDungeonDisbandMember extends AetherPacket
+{
+ public PacketDungeonDisbandMember(int packetID)
+ {
+ super(packetID);
+ }
+
+ public void onPacketReceived(Packet250CustomPayload packet, Player player)
+ {
+ DataInputStream dat = new DataInputStream(new ByteArrayInputStream(packet.data));
+ BufferedReader buf = new BufferedReader(new InputStreamReader(dat));
+ try
+ {
+ byte packetType = dat.readByte();
+
+ int dungeonID = dat.readInt();
+ String memberName = dat.readUTF();
+
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (side.isClient())
+ {
+ Dungeon dungeon = DungeonHandler.instance().getDungeon(dungeonID);
+
+ PartyMember leavingMember = PartyController.instance().getMember(memberName);
+
+ if ((dungeon != null) && (leavingMember != null))
+ {
+ DungeonHandler.instance().disbandMember(dungeon, leavingMember, false);
+ }
+ } else
+ {
+ PartyMember leavingMember = PartyController.instance().getMember(memberName);
+
+ EntityPlayer actualMember = (EntityPlayer) player;
+
+ Dungeon dungeon = DungeonHandler.instance().getDungeon(dungeonID);
+
+ if ((dungeon != null) && (dungeon.isActive()))
+ {
+ if ((leavingMember != null) && (leavingMember.username.equalsIgnoreCase(actualMember.username)))
+ {
+ DungeonHandler.instance().disbandMember(dungeon, leavingMember, false);
+
+ sendPacketToAllExcept(AetherPacketHandler.sendDungeonDisbandMember(dungeon, leavingMember), player);
+ }
+ }
+ }
+ } catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.packets.PacketDungeonDisbandMember
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/packets/PacketDungeonFinish.java b/src/main/java/net/aetherteam/aether/packets/PacketDungeonFinish.java
new file mode 100644
index 0000000..514561d
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/packets/PacketDungeonFinish.java
@@ -0,0 +1,76 @@
+package net.aetherteam.aether.packets;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.network.Player;
+import cpw.mods.fml.relauncher.Side;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.InputStreamReader;
+
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.aetherteam.aether.tile_entities.TileEntityEntranceController;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.network.packet.Packet250CustomPayload;
+import net.minecraft.world.World;
+
+public class PacketDungeonFinish extends AetherPacket
+{
+ public PacketDungeonFinish(int packetID)
+ {
+ super(packetID);
+ }
+
+ public void onPacketReceived(Packet250CustomPayload packet, Player player)
+ {
+ DataInputStream dat = new DataInputStream(new ByteArrayInputStream(packet.data));
+ BufferedReader buf = new BufferedReader(new InputStreamReader(dat));
+ try
+ {
+ byte packetType = dat.readByte();
+
+ int dungeonID = dat.readInt();
+ String partyName = dat.readUTF();
+
+ int tileX = dat.readInt();
+ int tileY = dat.readInt();
+ int tileZ = dat.readInt();
+
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (side.isClient())
+ {
+ Party party = PartyController.instance().getParty(partyName);
+ Dungeon dungeon = DungeonHandler.instance().getDungeon(dungeonID);
+
+ PartyMember potentialLeader = PartyController.instance().getMember((EntityPlayer) player);
+
+ EntityPlayer entityPlayer = (EntityPlayer) player;
+
+ TileEntityEntranceController controller = (TileEntityEntranceController) entityPlayer.worldObj.getBlockTileEntity(tileX, tileY, tileZ);
+
+ if ((party != null) && (dungeon != null))
+ {
+ if (controller != null)
+ {
+ DungeonHandler.instance().finishDungeon(dungeon, party, controller, false);
+ }
+ }
+ }
+ } catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.packets.PacketDungeonFinish
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/packets/PacketDungeonKey.java b/src/main/java/net/aetherteam/aether/packets/PacketDungeonKey.java
new file mode 100644
index 0000000..d0a3205
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/packets/PacketDungeonKey.java
@@ -0,0 +1,93 @@
+package net.aetherteam.aether.packets;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.network.PacketDispatcher;
+import cpw.mods.fml.common.network.Player;
+import cpw.mods.fml.relauncher.Side;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.InputStreamReader;
+
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.dungeons.keys.DungeonKey;
+import net.aetherteam.aether.dungeons.keys.EnumKeyType;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.tile_entities.TileEntityBronzeDoorController;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.network.packet.Packet250CustomPayload;
+import net.minecraft.world.World;
+
+public class PacketDungeonKey extends AetherPacket
+{
+ public PacketDungeonKey(int packetID)
+ {
+ super(packetID);
+ }
+
+ public void onPacketReceived(Packet250CustomPayload packet, Player player)
+ {
+ DataInputStream dat = new DataInputStream(new ByteArrayInputStream(packet.data));
+ BufferedReader buf = new BufferedReader(new InputStreamReader(dat));
+ try
+ {
+ byte packetType = dat.readByte();
+ boolean adding = dat.readBoolean();
+
+ int dungeonID = dat.readInt();
+ String partyName = dat.readUTF();
+
+ DungeonKey key = new DungeonKey(EnumKeyType.getTypeFromString(dat.readUTF()));
+
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (side.isClient())
+ {
+ Party party = PartyController.instance().getParty(partyName);
+ Dungeon dungeon = DungeonHandler.instance().getDungeon(dungeonID);
+
+ if ((party != null) && (dungeon != null) && (key != null))
+ {
+ if (adding)
+ {
+ DungeonHandler.instance().addKey(dungeon, party, key);
+ } else DungeonHandler.instance().removeKey(dungeon, party, key);
+ }
+ } else if (!adding)
+ {
+ Party party = PartyController.instance().getParty(partyName);
+ Dungeon dungeon = DungeonHandler.instance().getDungeon(dungeonID);
+
+ EntityPlayer sendingPlayer = (EntityPlayer) player;
+
+ int x = dat.readInt();
+ int y = dat.readInt();
+ int z = dat.readInt();
+
+ TileEntityBronzeDoorController bronzeDoor = (TileEntityBronzeDoorController) sendingPlayer.worldObj.getBlockTileEntity(x, y, z);
+
+ if ((party != null) && (dungeon != null) && (key != null))
+ {
+ if (dungeon.getQueuedParty().hasMember(PartyController.instance().getMember(sendingPlayer)))
+ {
+ DungeonHandler.instance().removeKey(dungeon, party, key);
+
+ PacketDispatcher.sendPacketToAllPlayers(AetherPacketHandler.removeDungeonKey(dungeon, party, key.getType(), bronzeDoor));
+ }
+ }
+ }
+ } catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.packets.PacketDungeonKey
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/packets/PacketDungeonMemberQueue.java b/src/main/java/net/aetherteam/aether/packets/PacketDungeonMemberQueue.java
new file mode 100644
index 0000000..93abcf6
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/packets/PacketDungeonMemberQueue.java
@@ -0,0 +1,87 @@
+package net.aetherteam.aether.packets;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.network.Player;
+import cpw.mods.fml.relauncher.Side;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.InputStreamReader;
+import java.io.PrintStream;
+
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.network.packet.Packet250CustomPayload;
+
+public class PacketDungeonMemberQueue extends AetherPacket
+{
+ public PacketDungeonMemberQueue(int packetID)
+ {
+ super(packetID);
+ }
+
+ public void onPacketReceived(Packet250CustomPayload packet, Player player)
+ {
+ DataInputStream dat = new DataInputStream(new ByteArrayInputStream(packet.data));
+ BufferedReader buf = new BufferedReader(new InputStreamReader(dat));
+ try
+ {
+ byte packetType = dat.readByte();
+
+ int dungeonID = dat.readInt();
+ String memberName = dat.readUTF();
+
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (side.isClient())
+ {
+ PartyMember potentialMember = PartyController.instance().getMember(memberName);
+ Party party = PartyController.instance().getParty(potentialMember);
+
+ Dungeon dungeon = DungeonHandler.instance().getDungeon(dungeonID);
+
+ if ((party != null) && (dungeon != null))
+ {
+ DungeonHandler.instance().queueMember(dungeon, potentialMember, false);
+ }
+ } else
+ {
+ PartyMember potentialMember = PartyController.instance().getMember(memberName);
+ Party party = PartyController.instance().getParty(potentialMember);
+
+ EntityPlayerMP entityPlayer = (EntityPlayerMP) player;
+
+ Dungeon dungeon = DungeonHandler.instance().getDungeon(dungeonID);
+
+ if ((party != null) && (dungeon != null))
+ {
+ if (entityPlayer.username.equalsIgnoreCase(memberName))
+ {
+ System.out.println("No validation needed, adding party member '" + memberName + "' to the Dungeon.");
+
+ DungeonHandler.instance().queueMember(dungeon, potentialMember, false);
+
+ sendPacketToAllExcept(AetherPacketHandler.sendDungeonMemberQueue(dungeon, potentialMember), player);
+ } else
+ {
+ System.out.println("Something went wrong, the validation of the leader was incorrect. Party not added/removed from Dungeon Instance.");
+ }
+ }
+ }
+ } catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.packets.PacketDungeonMemberQueue
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/packets/PacketDungeonQueueChange.java b/src/main/java/net/aetherteam/aether/packets/PacketDungeonQueueChange.java
new file mode 100644
index 0000000..ff1f057
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/packets/PacketDungeonQueueChange.java
@@ -0,0 +1,145 @@
+package net.aetherteam.aether.packets;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.network.PacketDispatcher;
+import cpw.mods.fml.common.network.Player;
+import cpw.mods.fml.relauncher.Side;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.InputStreamReader;
+import java.io.PrintStream;
+import java.util.Iterator;
+import java.util.List;
+
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.aetherteam.aether.tile_entities.TileEntityEntranceController;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.network.packet.Packet250CustomPayload;
+import net.minecraft.server.MinecraftServer;
+import net.minecraft.server.management.ServerConfigurationManager;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+import net.minecraft.world.WorldProvider;
+
+public class PacketDungeonQueueChange extends AetherPacket
+{
+ public PacketDungeonQueueChange(int packetID)
+ {
+ super(packetID);
+ }
+
+ public void onPacketReceived(Packet250CustomPayload packet, Player player)
+ {
+ DataInputStream dat = new DataInputStream(new ByteArrayInputStream(packet.data));
+ BufferedReader buf = new BufferedReader(new InputStreamReader(dat));
+ try
+ {
+ byte packetType = dat.readByte();
+ boolean adding = dat.readBoolean();
+
+ int dungeonID = dat.readInt();
+ String partyName = dat.readUTF();
+
+ int tileX = dat.readInt();
+ int tileY = dat.readInt();
+ int tileZ = dat.readInt();
+
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (side.isClient())
+ {
+ Party party = PartyController.instance().getParty(partyName);
+ Dungeon dungeon = DungeonHandler.instance().getDungeon(dungeonID);
+
+ PartyMember potentialLeader = PartyController.instance().getMember((EntityPlayer) player);
+
+ EntityPlayer entityPlayer = (EntityPlayer) player;
+
+ if ((party != null) && (dungeon != null))
+ {
+ if (adding)
+ {
+ DungeonHandler.instance().queueParty(dungeon, party, tileX, tileY, tileZ, false);
+ } else
+ DungeonHandler.instance().disbandQueue(dungeon, party, tileX, tileY, tileZ, potentialLeader, false);
+ }
+ } else
+ {
+ Party party = PartyController.instance().getParty(partyName);
+ PartyMember potentialLeader = PartyController.instance().getMember((EntityPlayer) player);
+
+ EntityPlayerMP entityPlayer = (EntityPlayerMP) player;
+
+ Dungeon dungeon = DungeonHandler.instance().getDungeon(dungeonID);
+
+ TileEntityEntranceController controller = (TileEntityEntranceController) entityPlayer.worldObj.getBlockTileEntity(MathHelper.floor_double(tileX), MathHelper.floor_double(tileY), MathHelper.floor_double(tileZ));
+ MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
+ ServerConfigurationManager configManager = server.getConfigurationManager();
+ for (Iterator i$ = configManager.playerEntityList.iterator(); i$.hasNext(); )
+ {
+ Object obj = i$.next();
+
+ if ((obj instanceof EntityPlayer))
+ {
+ EntityPlayer entityPlayer1 = (EntityPlayer) obj;
+ if ((!entityPlayer1.equals(entityPlayer)) && (PartyController.instance().getParty(entityPlayer).hasMember(PartyController.instance().getMember(entityPlayer1))) &&
+ (entityPlayer1.worldObj.provider.dimensionId != 3))
+ {
+ PacketDispatcher.sendPacketToPlayer(AetherPacketHandler.sendDungeonQueueChange(false, dungeon, tileX, tileY, tileZ, party), player);
+ entityPlayer.addChatMessage("§o All of your party members aren't in the Aether!");
+ return;
+ }
+ }
+
+ }
+
+ if ((party != null) && (dungeon != null) && (potentialLeader != null))
+ {
+ if ((party.isLeader(potentialLeader)) && (adding) && (controller != null) && (!dungeon.hasAnyConqueredDungeon(party.getMembers())))
+ {
+ int x = MathHelper.floor_double(controller.xCoord);
+ int y = MathHelper.floor_double(controller.yCoord);
+ int z = MathHelper.floor_double(controller.zCoord);
+
+ System.out.println("Leader was validated, adding the party " + party.getName() + " to the Dungeon's queue.");
+
+ DungeonHandler.instance().queueParty(dungeon, party, x, y, z, false);
+
+ sendPacketToAllExcept(AetherPacketHandler.sendDungeonQueueChange(adding, dungeon, x, y, z, party), player);
+ } else if (!adding)
+ {
+ int x = MathHelper.floor_double(controller.xCoord);
+ int y = MathHelper.floor_double(controller.yCoord);
+ int z = MathHelper.floor_double(controller.zCoord);
+
+ System.out.println("No validation needed, removing party " + partyName + " from the Dungeon queue.");
+
+ DungeonHandler.instance().disbandQueue(dungeon, party, x, y, z, potentialLeader, false);
+
+ sendPacketToAllExcept(AetherPacketHandler.sendDungeonQueueChange(adding, dungeon, x, y, z, party), player);
+ } else
+ {
+ System.out.println("Something went wrong, the validation of the leader was incorrect. Party not added/removed from Dungeon Instance.");
+ }
+ }
+ }
+ } catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.packets.PacketDungeonQueueChange
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/packets/PacketDungeonQueueCheck.java b/src/main/java/net/aetherteam/aether/packets/PacketDungeonQueueCheck.java
new file mode 100644
index 0000000..ac39e03
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/packets/PacketDungeonQueueCheck.java
@@ -0,0 +1,54 @@
+package net.aetherteam.aether.packets;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.network.Player;
+import cpw.mods.fml.relauncher.Side;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.InputStreamReader;
+
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.minecraft.network.packet.Packet250CustomPayload;
+
+public class PacketDungeonQueueCheck extends AetherPacket
+{
+ public PacketDungeonQueueCheck(int packetID)
+ {
+ super(packetID);
+ }
+
+ public void onPacketReceived(Packet250CustomPayload packet, Player player)
+ {
+ DataInputStream dat = new DataInputStream(new ByteArrayInputStream(packet.data));
+ BufferedReader buf = new BufferedReader(new InputStreamReader(dat));
+ try
+ {
+ byte packetType = dat.readByte();
+
+ int dungeonID = dat.readInt();
+
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (side.isClient())
+ {
+ Dungeon dungeon = DungeonHandler.instance().getDungeon(dungeonID);
+
+ if (dungeon != null)
+ {
+ DungeonHandler.instance().checkForQueue(dungeon);
+ }
+ }
+ } catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.packets.PacketDungeonQueueCheck
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/packets/PacketDungeonRespawn.java b/src/main/java/net/aetherteam/aether/packets/PacketDungeonRespawn.java
new file mode 100644
index 0000000..06ab249
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/packets/PacketDungeonRespawn.java
@@ -0,0 +1,59 @@
+package net.aetherteam.aether.packets;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.network.Player;
+import cpw.mods.fml.relauncher.Side;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.InputStreamReader;
+
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.notifications.client.ClientNotificationHandler;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.minecraft.network.packet.Packet250CustomPayload;
+
+public class PacketDungeonRespawn extends AetherPacket
+{
+ public PacketDungeonRespawn(int packetID)
+ {
+ super(packetID);
+ }
+
+ public void onPacketReceived(Packet250CustomPayload packet, Player player)
+ {
+ DataInputStream dat = new DataInputStream(new ByteArrayInputStream(packet.data));
+ BufferedReader buf = new BufferedReader(new InputStreamReader(dat));
+ try
+ {
+ byte packetType = dat.readByte();
+
+ int dungeonID = dat.readInt();
+ String partyName = dat.readUTF();
+
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (side.isClient())
+ {
+ Party party = PartyController.instance().getParty(partyName);
+ Dungeon dungeon = DungeonHandler.instance().getDungeon(dungeonID);
+
+ if ((party != null) && (dungeon != null))
+ {
+ ClientNotificationHandler.openDialogueBox("You have respawned!");
+ }
+ }
+ } catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.packets.PacketDungeonRespawn
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/packets/PacketDungeonTimerStart.java b/src/main/java/net/aetherteam/aether/packets/PacketDungeonTimerStart.java
new file mode 100644
index 0000000..0e66be4
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/packets/PacketDungeonTimerStart.java
@@ -0,0 +1,60 @@
+package net.aetherteam.aether.packets;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.network.Player;
+import cpw.mods.fml.relauncher.Side;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.InputStreamReader;
+
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.minecraft.network.packet.Packet250CustomPayload;
+
+public class PacketDungeonTimerStart extends AetherPacket
+{
+ public PacketDungeonTimerStart(int packetID)
+ {
+ super(packetID);
+ }
+
+ public void onPacketReceived(Packet250CustomPayload packet, Player player)
+ {
+ DataInputStream dat = new DataInputStream(new ByteArrayInputStream(packet.data));
+ BufferedReader buf = new BufferedReader(new InputStreamReader(dat));
+ try
+ {
+ byte packetType = dat.readByte();
+
+ int dungeonID = dat.readInt();
+ String partyName = dat.readUTF();
+
+ int timerLength = dat.readInt();
+
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (side.isClient())
+ {
+ Party party = PartyController.instance().getParty(partyName);
+ Dungeon dungeon = DungeonHandler.instance().getDungeon(dungeonID);
+
+ if ((party != null) && (dungeon != null))
+ {
+ DungeonHandler.instance().startTimer(dungeon, party, timerLength);
+ }
+ }
+ } catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.packets.PacketDungeonTimerStart
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/packets/PacketHeartChange.java b/src/main/java/net/aetherteam/aether/packets/PacketHeartChange.java
new file mode 100644
index 0000000..cf8c26f
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/packets/PacketHeartChange.java
@@ -0,0 +1,54 @@
+package net.aetherteam.aether.packets;
+
+import cpw.mods.fml.common.network.Player;
+
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.util.HashMap;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.CommonProxy;
+import net.minecraft.network.packet.Packet250CustomPayload;
+
+public class PacketHeartChange extends AetherPacket
+{
+ public PacketHeartChange(int packetID)
+ {
+ super(packetID);
+ }
+
+ public void onPacketReceived(Packet250CustomPayload packet, Player player)
+ {
+ DataInputStream dat = new DataInputStream(new ByteArrayInputStream(packet.data));
+ try
+ {
+ byte packetType = dat.readByte();
+ boolean clearFirst = dat.readBoolean();
+ boolean adding = dat.readBoolean();
+ short length = dat.readShort();
+ int maxHealth = dat.readInt();
+
+ HashMap extraHearts = Aether.proxy.getClientExtraHearts();
+
+ if (clearFirst)
+ {
+ extraHearts.clear();
+ }
+
+ for (int i = 0; i < length; i++)
+ {
+ String username = dat.readUTF();
+ if (adding) extraHearts.put(username, Integer.valueOf(maxHealth));
+ else extraHearts.remove(username);
+ }
+ } catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.packets.PacketHeartChange
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/packets/PacketNotificationChange.java b/src/main/java/net/aetherteam/aether/packets/PacketNotificationChange.java
new file mode 100644
index 0000000..69b5a0d
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/packets/PacketNotificationChange.java
@@ -0,0 +1,136 @@
+package net.aetherteam.aether.packets;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.network.PacketDispatcher;
+import cpw.mods.fml.common.network.Player;
+import cpw.mods.fml.relauncher.Side;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.InputStreamReader;
+import java.io.PrintStream;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import net.aetherteam.aether.notifications.Notification;
+import net.aetherteam.aether.notifications.NotificationHandler;
+import net.aetherteam.aether.notifications.NotificationType;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.network.packet.Packet250CustomPayload;
+import net.minecraft.server.MinecraftServer;
+import net.minecraft.server.management.ServerConfigurationManager;
+
+public class PacketNotificationChange extends AetherPacket
+{
+ public PacketNotificationChange(int packetID)
+ {
+ super(packetID);
+ }
+
+ public void onPacketReceived(Packet250CustomPayload packet, Player player)
+ {
+ DataInputStream dat = new DataInputStream(new ByteArrayInputStream(packet.data));
+ BufferedReader buf = new BufferedReader(new InputStreamReader(dat));
+ try
+ {
+ byte packetType = dat.readByte();
+ boolean adding = dat.readBoolean();
+
+ String notificationType = dat.readUTF();
+ String headerText = dat.readUTF();
+
+ String sendingPlayer = dat.readUTF();
+ String receivingPlayer = dat.readUTF();
+
+ NotificationType type = NotificationType.getTypeFromString(notificationType);
+
+ EntityPlayer realSendingPlayer = (EntityPlayer) player;
+
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (side.isClient())
+ {
+ Notification notification = new Notification(type, "Notification Received!", sendingPlayer, receivingPlayer);
+
+ if ((!NotificationHandler.instance().hasReceivedFromBefore(sendingPlayer, type)) && (adding))
+ {
+ NotificationHandler.instance().receiveNotification(notification);
+ } else if (!adding) NotificationHandler.instance().removeSentNotification(notification, false);
+ } else
+ {
+ MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
+ ServerConfigurationManager configManager = server.getConfigurationManager();
+
+ ArrayList playerList = new ArrayList();
+
+ for (Iterator i$ = configManager.playerEntityList.iterator(); i$.hasNext(); )
+ {
+ Object obj = i$.next();
+
+ if ((obj instanceof EntityPlayer))
+ {
+ playerList.add((EntityPlayer) obj);
+ }
+ }
+
+ EntityPlayer realReceivingPlayer = null;
+
+ for (EntityPlayer iteratedPlayer : playerList)
+ {
+ if (iteratedPlayer.username.toLowerCase().equalsIgnoreCase(adding ? receivingPlayer : sendingPlayer))
+ {
+ realReceivingPlayer = iteratedPlayer;
+ }
+ }
+
+ PartyMember recruiter = PartyController.instance().getMember(realSendingPlayer);
+ Party party = PartyController.instance().getParty(recruiter);
+
+ System.out.println("Trying!");
+
+ if ((party != null) && (recruiter != null))
+ {
+ System.out.println("Party: " + party);
+ System.out.println("Recruiter: " + recruiter.username);
+ }
+
+ if ((!NotificationHandler.instance().hasSentToBefore(receivingPlayer, type, sendingPlayer)) && (realSendingPlayer.username.toLowerCase().equalsIgnoreCase(sendingPlayer)) && (realReceivingPlayer != null))
+ {
+ System.out.println("Validated!");
+
+ if ((party != null) && (!party.isLeader(recruiter)))
+ {
+ System.out.println("Oops! :(");
+ return;
+ }
+
+ Notification notification = new Notification(type, "Notification Received!", sendingPlayer, receivingPlayer);
+
+ NotificationHandler.instance().receiveNotification(notification);
+
+ PacketDispatcher.sendPacketToPlayer(AetherPacketHandler.sendNotificationChange(notification, adding), (Player) realReceivingPlayer);
+ } else if (!adding)
+ {
+ Notification notification = new Notification(type, "Notification Received!", sendingPlayer, receivingPlayer);
+
+ NotificationHandler.instance().removeSentNotification(notification, false);
+
+ PacketDispatcher.sendPacketToPlayer(AetherPacketHandler.sendNotificationChange(notification, adding), (Player) realReceivingPlayer);
+ }
+ }
+ } catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.packets.PacketNotificationChange
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/packets/PacketPartyChange.java b/src/main/java/net/aetherteam/aether/packets/PacketPartyChange.java
new file mode 100644
index 0000000..73ddcdd
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/packets/PacketPartyChange.java
@@ -0,0 +1,90 @@
+package net.aetherteam.aether.packets;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.network.Player;
+import cpw.mods.fml.relauncher.Side;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.InputStreamReader;
+import java.io.PrintStream;
+
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.network.packet.Packet250CustomPayload;
+
+public class PacketPartyChange extends AetherPacket
+{
+ public PacketPartyChange(int packetID)
+ {
+ super(packetID);
+ }
+
+ public void onPacketReceived(Packet250CustomPayload packet, Player player)
+ {
+ DataInputStream dat = new DataInputStream(new ByteArrayInputStream(packet.data));
+ BufferedReader buf = new BufferedReader(new InputStreamReader(dat));
+ try
+ {
+ byte packetType = dat.readByte();
+ boolean adding = dat.readBoolean();
+
+ String partyName = dat.readUTF();
+ String potentialLeaderName = dat.readUTF();
+ String skinUrl = dat.readUTF();
+
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (side.isClient())
+ {
+ Party party = PartyController.instance().getParty(partyName);
+
+ if ((adding) && (party == null))
+ {
+ PartyController.instance().addParty(new Party(partyName, new PartyMember(potentialLeaderName, skinUrl)), false);
+
+ System.out.println(partyName + " created!");
+ } else
+ {
+ PartyController.instance().removeParty(party, false);
+
+ System.out.println(partyName + " removed!");
+ }
+ } else
+ {
+ Party party = PartyController.instance().getParty(partyName);
+ PartyMember potentialLeader = PartyController.instance().getMember((EntityPlayer) player);
+
+ EntityPlayer entityPlayer = (EntityPlayer) player;
+
+ if ((adding) && (party == null) && (potentialLeader == null))
+ {
+ System.out.println("No validation needed, creating and adding party " + partyName);
+
+ PartyController.instance().addParty(new Party(partyName, new PartyMember((EntityPlayer) player)), false);
+ sendPacketToAllExcept(AetherPacketHandler.sendPartyChange(adding, partyName, potentialLeaderName, skinUrl), player);
+ } else if ((potentialLeader != null) && (party != null) && (party.isLeader(potentialLeader)) && (entityPlayer.username.equalsIgnoreCase(potentialLeaderName)) && (!adding))
+ {
+ System.out.println("Leader was validated, removing the party " + party.getName());
+
+ PartyController.instance().removeParty(party, false);
+ sendPacketToAllExcept(AetherPacketHandler.sendPartyChange(adding, partyName, potentialLeaderName, skinUrl), player);
+ } else
+ {
+ System.out.println("Something went wrong, the validation of the leader was incorrect. Party not added/removed.");
+ }
+ }
+ } catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.packets.PacketPartyChange
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/packets/PacketPartyMemberChange.java b/src/main/java/net/aetherteam/aether/packets/PacketPartyMemberChange.java
new file mode 100644
index 0000000..d2ba368
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/packets/PacketPartyMemberChange.java
@@ -0,0 +1,112 @@
+package net.aetherteam.aether.packets;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.network.PacketDispatcher;
+import cpw.mods.fml.common.network.Player;
+import cpw.mods.fml.relauncher.Side;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.InputStreamReader;
+import java.io.PrintStream;
+
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.PartyType;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.network.packet.Packet250CustomPayload;
+
+public class PacketPartyMemberChange extends AetherPacket
+{
+ public PacketPartyMemberChange(int packetID)
+ {
+ super(packetID);
+ }
+
+ public void onPacketReceived(Packet250CustomPayload packet, Player player)
+ {
+ DataInputStream dat = new DataInputStream(new ByteArrayInputStream(packet.data));
+ BufferedReader buf = new BufferedReader(new InputStreamReader(dat));
+ try
+ {
+ byte packetType = dat.readByte();
+ boolean adding = dat.readBoolean();
+
+ String partyName = dat.readUTF();
+ String username = dat.readUTF();
+ String skinURL = dat.readUTF();
+
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (side.isClient())
+ {
+ Party party = PartyController.instance().getParty(partyName);
+
+ if (party != null)
+ {
+ if (adding)
+ {
+ PartyMember newMember = new PartyMember(username, skinURL);
+
+ PartyController.instance().joinParty(party, newMember, false);
+
+ System.out.println("Added Player '" + username + "' to the Party: " + partyName + "!");
+ } else
+ {
+ PartyMember partyMember = PartyController.instance().getMember(username);
+
+ PartyController.instance().leaveParty(party, partyMember, false);
+
+ System.out.println("Removed Player '" + username + "' from the Party: " + partyName + "!");
+ }
+ }
+ } else
+ {
+ Party party = PartyController.instance().getParty(partyName);
+ PartyMember potentialLeader = PartyController.instance().getMember((EntityPlayer) player);
+ PartyMember affectedMember = PartyController.instance().getMember(username);
+
+ if (party != null)
+ {
+ if ((party.isLeader(potentialLeader)) || (party.getType() == PartyType.OPEN) || ((potentialLeader != null) && (potentialLeader.username.toLowerCase().equalsIgnoreCase(affectedMember.username)) && (!adding)) || (party.isRequestedPlayer(username)))
+ {
+ if ((adding) && (affectedMember == null))
+ {
+ PartyController.instance().joinParty(party, new PartyMember(username, ""), false);
+ } else
+ {
+ Dungeon dungeon = DungeonHandler.instance().getDungeon(party);
+
+ PartyController.instance().leaveParty(party, affectedMember, false);
+
+ if ((dungeon != null) && (!dungeon.hasStarted()))
+ {
+ DungeonHandler.instance().checkForQueue(dungeon);
+
+ PacketDispatcher.sendPacketToAllPlayers(AetherPacketHandler.sendDungeonQueueCheck(dungeon));
+ }
+ }
+
+ sendPacketToAllExcept(AetherPacketHandler.sendPartyMemberChange(adding, partyName, username, skinURL), player);
+ } else
+ {
+ System.out.println("A player (" + potentialLeader.username + ") tried to add/kick a member (" + affectedMember.username + ") but didn't have permission or the party was not 'open'.");
+ }
+ } else if (affectedMember != null)
+ System.out.println("Something went wrong! The player " + affectedMember.username + " tried to join/leave a null party!");
+ }
+ } catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.packets.PacketPartyMemberChange
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/packets/PacketPartyMemberTypeChange.java b/src/main/java/net/aetherteam/aether/packets/PacketPartyMemberTypeChange.java
new file mode 100644
index 0000000..b5ff852
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/packets/PacketPartyMemberTypeChange.java
@@ -0,0 +1,87 @@
+package net.aetherteam.aether.packets;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.network.Player;
+import cpw.mods.fml.relauncher.Side;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.InputStreamReader;
+import java.io.PrintStream;
+
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.MemberType;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.network.packet.Packet250CustomPayload;
+
+public class PacketPartyMemberTypeChange extends AetherPacket
+{
+ public PacketPartyMemberTypeChange(int packetID)
+ {
+ super(packetID);
+ }
+
+ public void onPacketReceived(Packet250CustomPayload packet, Player player)
+ {
+ DataInputStream dat = new DataInputStream(new ByteArrayInputStream(packet.data));
+ BufferedReader buf = new BufferedReader(new InputStreamReader(dat));
+ try
+ {
+ byte packetType = dat.readByte();
+
+ String username = dat.readUTF();
+ MemberType newType = MemberType.getTypeFromString(dat.readUTF());
+
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (side.isClient())
+ {
+ PartyController.instance();
+ PartyMember affectedMember = PartyController.instance().getMember(username);
+
+ PartyController.instance();
+ Party party = PartyController.instance().getParty(affectedMember);
+
+ if (party != null)
+ {
+ PartyController.instance();
+ PartyController.instance().promoteMember(affectedMember, newType, false);
+ }
+ } else
+ {
+ PartyController.instance();
+ PartyMember affectedMember = PartyController.instance().getMember(username);
+ PartyController.instance();
+ PartyMember potentialLeader = PartyController.instance().getMember((EntityPlayer) player);
+
+ PartyController.instance();
+ Party party = PartyController.instance().getParty(potentialLeader);
+
+ if ((party != null) && (potentialLeader != null))
+ {
+ if (party.isLeader(potentialLeader))
+ {
+ PartyController.instance();
+ PartyController.instance().promoteMember(affectedMember, newType, false);
+
+ sendPacketToAllExcept(AetherPacketHandler.sendMemberTypeChange(username, newType), player);
+ } else
+ {
+ System.out.println(potentialLeader.username + " was not the leader of the " + party.getName() + " party! Cannot promote member.");
+ }
+ } else System.out.println("Something went wrong! Party was null while trying to promote a member.");
+ }
+ } catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.packets.PacketPartyMemberTypeChange
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/packets/PacketPartyNameChange.java b/src/main/java/net/aetherteam/aether/packets/PacketPartyNameChange.java
new file mode 100644
index 0000000..22820f6
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/packets/PacketPartyNameChange.java
@@ -0,0 +1,81 @@
+package net.aetherteam.aether.packets;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.network.Player;
+import cpw.mods.fml.relauncher.Side;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.InputStreamReader;
+import java.io.PrintStream;
+
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.network.packet.Packet250CustomPayload;
+
+public class PacketPartyNameChange extends AetherPacket
+{
+ public PacketPartyNameChange(int packetID)
+ {
+ super(packetID);
+ }
+
+ public void onPacketReceived(Packet250CustomPayload packet, Player player)
+ {
+ DataInputStream dat = new DataInputStream(new ByteArrayInputStream(packet.data));
+ BufferedReader buf = new BufferedReader(new InputStreamReader(dat));
+ try
+ {
+ byte packetType = dat.readByte();
+
+ String partyName = dat.readUTF();
+ String newPartyName = dat.readUTF();
+
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (side.isClient())
+ {
+ Party party = PartyController.instance().getParty(partyName);
+
+ if ((party != null) && (!newPartyName.isEmpty()) && (PartyController.instance().getParty(newPartyName) == null))
+ {
+ PartyController.instance().changePartyName(party, newPartyName, false);
+
+ System.out.println("'" + partyName + "'s name changed to '" + newPartyName + "'");
+ } else
+ {
+ System.out.println("Either the party was null or the name was empty. Party name change unsuccessful!");
+ }
+ } else
+ {
+ Party party = PartyController.instance().getParty(partyName);
+ PartyMember potentialLeader = PartyController.instance().getMember((EntityPlayer) player);
+
+ if ((party != null) && (!newPartyName.isEmpty()) && (PartyController.instance().getParty(newPartyName) == null))
+ {
+ if (party.isLeader(potentialLeader))
+ {
+ PartyController.instance().changePartyName(party, newPartyName, false);
+
+ sendPacketToAllExcept(AetherPacketHandler.sendPartyNameChange(partyName, newPartyName), player);
+ } else
+ {
+ System.out.println("A player (" + potentialLeader.username + ") tried to change the name of a party (" + party.getName() + ") but didn't have permission.");
+ }
+ } else
+ System.out.println("Something went wrong! The player " + potentialLeader.username + " tried to change the name of a null party!");
+ }
+ } catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.packets.PacketPartyNameChange
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/packets/PacketPartyTypeChange.java b/src/main/java/net/aetherteam/aether/packets/PacketPartyTypeChange.java
new file mode 100644
index 0000000..e83338d
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/packets/PacketPartyTypeChange.java
@@ -0,0 +1,72 @@
+package net.aetherteam.aether.packets;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.network.Player;
+import cpw.mods.fml.relauncher.Side;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.InputStreamReader;
+
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.PartyType;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.network.packet.Packet250CustomPayload;
+
+public class PacketPartyTypeChange extends AetherPacket
+{
+ public PacketPartyTypeChange(int packetID)
+ {
+ super(packetID);
+ }
+
+ public void onPacketReceived(Packet250CustomPayload packet, Player player)
+ {
+ DataInputStream dat = new DataInputStream(new ByteArrayInputStream(packet.data));
+ BufferedReader buf = new BufferedReader(new InputStreamReader(dat));
+ try
+ {
+ byte packetType = dat.readByte();
+
+ String partyName = dat.readUTF();
+ PartyType newType = PartyType.getTypeFromString(dat.readUTF());
+
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (side.isClient())
+ {
+ Party party = PartyController.instance().getParty(partyName);
+
+ if (party != null)
+ {
+ PartyController.instance().changePartyType(party, newType, false);
+ }
+ } else
+ {
+ Party party = PartyController.instance().getParty(partyName);
+ PartyMember potentialLeader = PartyController.instance().getMember((EntityPlayer) player);
+
+ if ((party != null) && (potentialLeader != null))
+ {
+ if (party.isLeader(potentialLeader))
+ {
+ PartyController.instance().changePartyType(party, newType, false);
+
+ sendPacketToAllExcept(AetherPacketHandler.sendPartyTypeChange(partyName, newType), player);
+ }
+ }
+ }
+ } catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.packets.PacketPartyTypeChange
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/packets/PacketPlayerClientInfo.java b/src/main/java/net/aetherteam/aether/packets/PacketPlayerClientInfo.java
new file mode 100644
index 0000000..6988a8a
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/packets/PacketPlayerClientInfo.java
@@ -0,0 +1,66 @@
+package net.aetherteam.aether.packets;
+
+import cpw.mods.fml.common.network.Player;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.InputStreamReader;
+import java.util.HashMap;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.CommonProxy;
+import net.aetherteam.aether.data.PlayerClientInfo;
+import net.minecraft.network.packet.Packet250CustomPayload;
+
+public class PacketPlayerClientInfo extends AetherPacket
+{
+ public PacketPlayerClientInfo(int packetID)
+ {
+ super(packetID);
+ }
+
+ public void onPacketReceived(Packet250CustomPayload packet, Player player)
+ {
+ DataInputStream dat = new DataInputStream(new ByteArrayInputStream(packet.data));
+ BufferedReader buf = new BufferedReader(new InputStreamReader(dat));
+ try
+ {
+ byte packetType = dat.readByte();
+ boolean clearFirst = dat.readBoolean();
+ boolean adding = dat.readBoolean();
+
+ String username = dat.readUTF();
+
+ short halfHearts = dat.readShort();
+ short maxHealth = dat.readShort();
+ short hunger = dat.readShort();
+ short armourValue = dat.readShort();
+ int aetherCoins = dat.readInt();
+
+ HashMap playerClientInfo = Aether.proxy.getPlayerClientInfo();
+
+ if (clearFirst)
+ {
+ playerClientInfo.clear();
+ }
+
+ if (adding)
+ {
+ PlayerClientInfo playerInfo = new PlayerClientInfo(halfHearts, maxHealth, hunger, armourValue, aetherCoins);
+ playerClientInfo.put(username, playerInfo);
+ } else
+ {
+ playerClientInfo.remove(username);
+ }
+ } catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.packets.PacketPlayerClientInfo
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/packets/PacketPlayerInput.java b/src/main/java/net/aetherteam/aether/packets/PacketPlayerInput.java
new file mode 100644
index 0000000..8fe7f76
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/packets/PacketPlayerInput.java
@@ -0,0 +1,57 @@
+package net.aetherteam.aether.packets;
+
+import cpw.mods.fml.common.network.Player;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.PlayerBaseAetherServer;
+import net.aetherteam.aether.entities.mounts.MountInput;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.network.packet.Packet250CustomPayload;
+
+public class PacketPlayerInput extends AetherPacket
+{
+ public PacketPlayerInput(int packetID)
+ {
+ super(packetID);
+ }
+
+ public void onPacketReceived(Packet250CustomPayload packet, Player player)
+ {
+ DataInputStream dat = new DataInputStream(new ByteArrayInputStream(packet.data));
+ BufferedReader buf = new BufferedReader(new InputStreamReader(dat));
+ try
+ {
+ byte packetType = dat.readByte();
+ String username = dat.readUTF();
+
+ ArrayList mountInput = new ArrayList();
+
+ int inputSize = dat.readInt();
+
+ for (int count = 0; count < inputSize; count++)
+ {
+ MountInput direction = MountInput.getInputFromString(dat.readUTF());
+
+ mountInput.add(direction);
+ }
+
+ PlayerBaseAetherServer playerBase = Aether.getServerPlayer((EntityPlayerMP) player);
+
+ playerBase.mountInput = mountInput;
+ } catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.packets.PacketPlayerInput
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/packets/PacketRequestPlayer.java b/src/main/java/net/aetherteam/aether/packets/PacketRequestPlayer.java
new file mode 100644
index 0000000..c120d94
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/packets/PacketRequestPlayer.java
@@ -0,0 +1,83 @@
+package net.aetherteam.aether.packets;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.network.Player;
+import cpw.mods.fml.relauncher.Side;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.InputStreamReader;
+import java.io.PrintStream;
+
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.network.packet.Packet250CustomPayload;
+
+public class PacketRequestPlayer extends AetherPacket
+{
+ public PacketRequestPlayer(int packetID)
+ {
+ super(packetID);
+ }
+
+ public void onPacketReceived(Packet250CustomPayload packet, Player player)
+ {
+ DataInputStream dat = new DataInputStream(new ByteArrayInputStream(packet.data));
+ BufferedReader buf = new BufferedReader(new InputStreamReader(dat));
+ try
+ {
+ byte packetType = dat.readByte();
+
+ boolean adding = dat.readBoolean();
+ String partyName = dat.readUTF();
+
+ String leaderName = dat.readUTF();
+ String leaderSkinUrl = dat.readUTF();
+ String requestedPlayer = dat.readUTF();
+
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (side.isClient())
+ {
+ Party party = PartyController.instance().getParty(partyName);
+
+ if (party != null)
+ {
+ PartyController.instance().requestPlayer(party, PartyController.instance().getMember(leaderName), requestedPlayer, false);
+
+ System.out.println("Requested Player '" + requestedPlayer + "' to the Party: " + partyName + "!");
+ }
+ } else
+ {
+ Party party = PartyController.instance().getParty(partyName);
+
+ PartyMember potentialLeader = PartyController.instance().getMember((EntityPlayer) player);
+
+ if (party != null)
+ {
+ if (party.isLeader(potentialLeader))
+ {
+ PartyController.instance().requestPlayer(party, potentialLeader, requestedPlayer, false);
+
+ sendPacketToAllExcept(AetherPacketHandler.sendRequestPlayer(adding, partyName, leaderName, leaderSkinUrl, requestedPlayer), player);
+ } else if (potentialLeader != null)
+ {
+ System.out.println("A player (" + potentialLeader.username + ") tried to request a member (" + requestedPlayer + ") but didn't have permission.");
+ }
+ } else
+ System.out.println("Something went wrong! The player " + requestedPlayer + " got to requested into a null party!");
+ }
+ } catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.packets.PacketRequestPlayer
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/packets/PacketRiding.java b/src/main/java/net/aetherteam/aether/packets/PacketRiding.java
new file mode 100644
index 0000000..003092b
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/packets/PacketRiding.java
@@ -0,0 +1,54 @@
+package net.aetherteam.aether.packets;
+
+import cpw.mods.fml.common.network.Player;
+
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.IOException;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.AetherCommonPlayerHandler;
+import net.aetherteam.aether.entities.mounts_old.Ridable;
+import net.aetherteam.aether.entities.mounts_old.RidingHandler;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.multiplayer.WorldClient;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.network.packet.Packet250CustomPayload;
+
+public class PacketRiding extends AetherPacket
+{
+ public PacketRiding(int packetID)
+ {
+ super(packetID);
+ }
+
+ public void onPacketReceived(Packet250CustomPayload packet, Player player)
+ {
+ DataInputStream dat = new DataInputStream(new ByteArrayInputStream(packet.data));
+
+ int id = -1;
+ try
+ {
+ byte packetType = dat.readByte();
+ id = dat.readInt();
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+
+ Ridable entity = null;
+
+ if (id != -1)
+ {
+ entity = (Ridable) Minecraft.getMinecraft().theWorld.getEntityByID(id);
+ }
+
+ if (entity != null) entity.getRidingHandler().setRider((EntityPlayer) player);
+ else Aether.getPlayerBase((EntityPlayer) player).rideEntity(null, null);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.packets.PacketRiding
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/packets/PacketSyncAllParties.java b/src/main/java/net/aetherteam/aether/packets/PacketSyncAllParties.java
new file mode 100644
index 0000000..b25c7fe
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/packets/PacketSyncAllParties.java
@@ -0,0 +1,80 @@
+package net.aetherteam.aether.packets;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.network.Player;
+import cpw.mods.fml.relauncher.Side;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.PartyType;
+import net.aetherteam.aether.party.members.MemberType;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.network.packet.Packet250CustomPayload;
+
+public class PacketSyncAllParties extends AetherPacket
+{
+ public PacketSyncAllParties(int packetID)
+ {
+ super(packetID);
+ }
+
+ public void onPacketReceived(Packet250CustomPayload packet, Player player)
+ {
+ DataInputStream dat = new DataInputStream(new ByteArrayInputStream(packet.data));
+ BufferedReader buf = new BufferedReader(new InputStreamReader(dat));
+ try
+ {
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (side.isClient())
+ {
+ PartyController.instance().getParties().clear();
+
+ byte packetType = dat.readByte();
+
+ int partyAmount = dat.readInt();
+
+ for (int i = 0; i < partyAmount; i++)
+ {
+ String partyName = dat.readUTF();
+ String leaderUsername = dat.readUTF();
+ String leaderSkinUrl = "";
+
+ PartyType partyType = PartyType.getTypeFromString(dat.readUTF());
+ int memberSizeLimit = dat.readInt();
+
+ Party party = new Party(partyName, new PartyMember(leaderUsername, leaderSkinUrl)).setType(partyType);
+
+ PartyController.instance().addParty(party, false);
+
+ int memberAmount = dat.readInt();
+
+ for (int j = 0; j < memberAmount; j++)
+ {
+ String memberUsername = dat.readUTF();
+ String skinUrl = "";
+ MemberType memberType = MemberType.getTypeFromString(dat.readUTF());
+
+ PartyMember member = new PartyMember(memberUsername, skinUrl).promoteTo(memberType);
+
+ PartyController.instance().joinParty(party, member, false);
+ }
+ }
+ }
+ } catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.packets.PacketSyncAllParties
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/packets/RegisteredPackets.java b/src/main/java/net/aetherteam/aether/packets/RegisteredPackets.java
new file mode 100644
index 0000000..01b4f25
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/packets/RegisteredPackets.java
@@ -0,0 +1,51 @@
+package net.aetherteam.aether.packets;
+
+import java.util.ArrayList;
+
+public class RegisteredPackets
+{
+ private static ArrayList packets = new ArrayList();
+
+ public static final AetherPacket riding = new PacketRiding(0);
+ public static final AetherPacket accessoryChange = new PacketAccessoryChange(1);
+ public static final AetherPacket heartChange = new PacketHeartChange(2);
+ public static final AetherPacket cooldown = new PacketCooldown(3);
+ public static final AetherPacket coinChange = new PacketCoinChange(4);
+ public static final AetherPacket partyChange = new PacketPartyChange(5);
+ public static final AetherPacket partyNameChange = new PacketPartyNameChange(6);
+ public static final AetherPacket memberChange = new PacketPartyMemberChange(7);
+ public static final AetherPacket partyTypeChange = new PacketPartyTypeChange(8);
+ public static final AetherPacket notification = new PacketNotificationChange(9);
+ public static final AetherPacket donatorChange = new PacketDonatorChange(10);
+ public static final AetherPacket donatorChoice = new PacketDonatorChoice(11);
+ public static final AetherPacket donatorTypeRemoval = new PacketDonatorTypeRemoval(12);
+ public static final AetherPacket playerInput = new PacketPlayerInput(13);
+ public static final AetherPacket allParties = new PacketSyncAllParties(14);
+ public static final AetherPacket requestPlayer = new PacketRequestPlayer(15);
+ public static final AetherPacket playerClientInfo = new PacketPlayerClientInfo(16);
+ public static final AetherPacket memberTypeChange = new PacketPartyMemberTypeChange(17);
+ public static final AetherPacket dungeonQueueChange = new PacketDungeonQueueChange(18);
+ public static final AetherPacket dungeonChange = new PacketDungeonChange(19);
+ public static final AetherPacket dungeonMemberQueue = new PacketDungeonMemberQueue(20);
+ public static final AetherPacket dungeonFinish = new PacketDungeonFinish(21);
+ public static final AetherPacket dungeonTimerStart = new PacketDungeonTimerStart(22);
+ public static final AetherPacket dungeonKey = new PacketDungeonKey(23);
+ public static final AetherPacket dungeonRespawn = new PacketDungeonRespawn(24);
+ public static final AetherPacket dungeonDisbandMember = new PacketDungeonDisbandMember(25);
+ public static final AetherPacket dungeonQueueCheck = new PacketDungeonQueueCheck(26);
+
+ public static void registerPacket(AetherPacket packet)
+ {
+ packets.add(packet);
+ }
+
+ public static ArrayList getPackets()
+ {
+ return packets;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.packets.RegisteredPackets
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/party/Party.java b/src/main/java/net/aetherteam/aether/party/Party.java
new file mode 100644
index 0000000..afc05a4
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/party/Party.java
@@ -0,0 +1,190 @@
+package net.aetherteam.aether.party;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Random;
+
+import net.aetherteam.aether.party.members.MemberType;
+import net.aetherteam.aether.party.members.PartyMember;
+
+public class Party implements Serializable
+{
+ private String name;
+ private PartyMember leader;
+ private ArrayList members = new ArrayList();
+
+ private ArrayList requestedMembers = new ArrayList();
+
+ private int memberSizeLimit = 20;
+
+ private PartyType TYPE = PartyType.OPEN;
+
+ public Party(String name, PartyMember leader)
+ {
+ this.name = name;
+ this.leader = leader;
+
+ this.leader.promoteTo(MemberType.LEADER);
+
+ join(leader);
+ }
+
+ public String getName()
+ {
+ return this.name;
+ }
+
+ public void setName(String text)
+ {
+ this.name = text;
+ }
+
+ public int getMemberSizeLimit()
+ {
+ return this.memberSizeLimit;
+ }
+
+ public void setMemberSizeLimit(int size)
+ {
+ this.memberSizeLimit = size;
+ }
+
+ public PartyType getType()
+ {
+ return this.TYPE;
+ }
+
+ public Party setType(PartyType type)
+ {
+ this.TYPE = type;
+
+ return this;
+ }
+
+ public int getSize()
+ {
+ return this.members.size();
+ }
+
+ public PartyMember getLeader()
+ {
+ return this.leader;
+ }
+
+ public boolean hasLeader()
+ {
+ return this.leader != null;
+ }
+
+ public boolean isLeader(PartyMember member)
+ {
+ return (member != null) && (this.leader == member);
+ }
+
+ public boolean hasMember(PartyMember member)
+ {
+ return (member != null) && (hasMember(member.username));
+ }
+
+ public boolean hasMember(String username)
+ {
+ if ((this.members != null) && (username != null))
+ {
+ for (PartyMember iteratedMember : this.members)
+ {
+ if (iteratedMember.username.equalsIgnoreCase(username))
+ {
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+
+ public void promoteMember(PartyMember member, MemberType type)
+ {
+ if (hasMember(member))
+ {
+ member.promoteTo(type);
+
+ if ((type == MemberType.LEADER) && (hasLeader()))
+ {
+ this.leader.promoteTo(MemberType.MEMBER);
+ this.leader = member;
+ }
+ }
+ }
+
+ public ArrayList getMembers()
+ {
+ return this.members;
+ }
+
+ public void queueRequestedPlayer(String playerUsername)
+ {
+ this.requestedMembers.add(playerUsername.toLowerCase());
+ }
+
+ public void removeRequestedPlayer(String playerUsername)
+ {
+ this.requestedMembers.remove(playerUsername.toLowerCase());
+ }
+
+ public boolean isRequestedPlayer(String playerUsername)
+ {
+ return this.requestedMembers.contains(playerUsername.toLowerCase());
+ }
+
+ public void join(PartyMember member)
+ {
+ if ((member != null) && (this.members.size() < this.memberSizeLimit) && (!hasMember(member)))
+ {
+ Party party;
+ if (PartyController.instance().inParty(member.username))
+ {
+ party = PartyController.instance().getParty(PartyController.instance().getMember(member.username));
+ }
+
+ if (isRequestedPlayer(member.username))
+ {
+ removeRequestedPlayer(member.username);
+ }
+
+ this.members.add(member);
+ }
+ }
+
+ public void leave(PartyMember member)
+ {
+ if (hasMember(member))
+ {
+ if ((member.isLeader()) && (this.members.size() > 1))
+ {
+ Random rand = new Random();
+ PartyMember newLeader = null;
+
+ while ((newLeader == null) || (newLeader == member))
+ {
+ newLeader = (PartyMember) this.members.get(rand.nextInt(this.members.size()));
+ }
+
+ if (newLeader != null)
+ {
+ PartyController.instance().promoteMember(PartyController.instance().getMember(newLeader.username), MemberType.LEADER, true);
+ }
+ }
+ this.members.remove(member);
+
+ if (this.members.size() <= 0)
+ {
+ PartyController.instance().removeParty(this, true);
+ }
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.party.Party
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/party/PartyController.java b/src/main/java/net/aetherteam/aether/party/PartyController.java
new file mode 100644
index 0000000..89f6751
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/party/PartyController.java
@@ -0,0 +1,382 @@
+package net.aetherteam.aether.party;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.network.PacketDispatcher;
+import cpw.mods.fml.relauncher.Side;
+
+import java.io.PrintStream;
+import java.util.ArrayList;
+
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.notifications.client.ClientNotificationHandler;
+import net.aetherteam.aether.packets.AetherPacketHandler;
+import net.aetherteam.aether.party.exceptions.PartyFunctionException;
+import net.aetherteam.aether.party.members.MemberType;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.entity.player.EntityPlayer;
+
+public class PartyController
+{
+ private ArrayList parties = new ArrayList();
+
+ private static PartyController clientController = new PartyController();
+ private static PartyController serverController = new PartyController();
+
+ public static PartyController instance()
+ {
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (side.isClient())
+ {
+ return clientController;
+ }
+ return serverController;
+ }
+
+ public boolean addParty(Party party, boolean sendPackets)
+ {
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+ try
+ {
+ if (party != null)
+ {
+ if (getParty(party.getName()) == null)
+ {
+ this.parties.add(party);
+
+ if ((sendPackets) && (side.isClient()))
+ {
+ PacketDispatcher.sendPacketToServer(AetherPacketHandler.sendPartyChange(true, party.getName(), party.getLeader().username, party.getLeader().skinUrl));
+ }
+
+ return true;
+ }
+ } else throw new PartyFunctionException("The party getting added was null! Aborting!");
+ } catch (PartyFunctionException exception)
+ {
+ exception.printStackTrace();
+ }
+
+ return false;
+ }
+
+ public boolean removeParty(Party party, boolean sendPackets)
+ {
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (party != null)
+ {
+ Dungeon dungeon = DungeonHandler.instance().getDungeon(party);
+
+ if (dungeon != null)
+ {
+ dungeon.disbandQueue(party);
+ }
+
+ if (side.isClient())
+ {
+ if (party.hasMember(getMember(ClientNotificationHandler.clientUsername())))
+ {
+ ClientNotificationHandler.createGeneric("Party Disbanded!", "", "");
+ }
+ }
+
+ this.parties.remove(party);
+
+ if ((sendPackets) && (side == Side.CLIENT))
+ {
+ PacketDispatcher.sendPacketToServer(AetherPacketHandler.sendPartyChange(false, party.getName(), party.getLeader().username, party.getLeader().skinUrl));
+ }
+
+ return true;
+ }
+ System.out.println("A party was trying to remove itself, but unfortunately doesn't exist :(");
+
+ return false;
+ }
+
+ public boolean promoteMember(PartyMember member, MemberType type, boolean sendPackets)
+ {
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if ((member != null) && (type != null))
+ {
+ Party party = getParty(member);
+
+ if (party != null)
+ {
+ party.promoteMember(member, type);
+
+ if ((sendPackets) && (side.isClient()))
+ {
+ PacketDispatcher.sendPacketToServer(AetherPacketHandler.sendMemberTypeChange(member.username, type));
+ }
+
+ return true;
+ }
+ } else
+ {
+ System.out.println("A party member was trying to promote itself, but unfortunately doesn't exist :(");
+ }
+
+ return false;
+ }
+
+ public void requestPlayer(Party party, PartyMember member, String requestedPlayer, boolean sendPackets)
+ {
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if ((this.parties.contains(party)) && (party != null) && (!requestedPlayer.isEmpty()) && (requestedPlayer != null))
+ {
+ party.queueRequestedPlayer(requestedPlayer);
+
+ if ((sendPackets) && (side.isClient()))
+ {
+ PacketDispatcher.sendPacketToServer(AetherPacketHandler.sendRequestPlayer(true, party.getName(), member.username, member.skinUrl, requestedPlayer));
+ }
+ }
+ }
+
+ public void removePlayerRequest(Party party, PartyMember member, String requestedPlayer, boolean sendPackets)
+ {
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if ((this.parties.contains(party)) && (party != null) && (!requestedPlayer.isEmpty()) && (requestedPlayer != null))
+ {
+ party.removeRequestedPlayer(requestedPlayer);
+
+ if ((sendPackets) && (side.isClient()))
+ {
+ PacketDispatcher.sendPacketToServer(AetherPacketHandler.sendRequestPlayer(false, party.getName(), member.username, member.skinUrl, requestedPlayer));
+ }
+ }
+ }
+
+ public void joinParty(Party party, PartyMember member, boolean sendPackets)
+ {
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if ((this.parties.contains(party)) && (party != null) && (member != null))
+ {
+ if (side.isClient())
+ {
+ if (party.hasMember(getMember(ClientNotificationHandler.clientUsername())))
+ {
+ ClientNotificationHandler.createGeneric("Member joined!", member.username, "");
+ }
+ }
+
+ party.join(member);
+
+ if ((sendPackets) && (side.isClient()))
+ {
+ PacketDispatcher.sendPacketToServer(AetherPacketHandler.sendPartyMemberChange(true, party.getName(), member.username, member.skinUrl));
+ }
+ }
+ }
+
+ public void leaveParty(Party party, PartyMember member, boolean sendPackets)
+ {
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if ((this.parties.contains(party)) && (party.hasMember(member)) && (party != null) && (member != null))
+ {
+ Dungeon dungeon = DungeonHandler.instance().getDungeon(party);
+
+ if (dungeon != null)
+ {
+ dungeon.disbandMember(member);
+ }
+
+ if (side.isClient())
+ {
+ if ((party.hasMember(getMember(ClientNotificationHandler.clientUsername()))) && (!member.username.equalsIgnoreCase(ClientNotificationHandler.clientUsername())))
+ {
+ ClientNotificationHandler.createGeneric("Member left!", member.username, "");
+ }
+ }
+
+ if ((sendPackets) && (side.isClient()))
+ {
+ PacketDispatcher.sendPacketToServer(AetherPacketHandler.sendPartyMemberChange(false, party.getName(), member.username, member.skinUrl));
+ }
+
+ party.leave(member);
+ }
+ }
+
+ public boolean changePartyName(Party party, String newName, boolean sendPackets)
+ {
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if ((this.parties.contains(party)) && (party != null) && (!newName.isEmpty()) && (getParty(newName) == null))
+ {
+ if (side.isClient())
+ {
+ if (party.hasMember(getMember(ClientNotificationHandler.clientUsername())))
+ {
+ ClientNotificationHandler.createGeneric("Party Name Changed!", "To: " + newName, "");
+ }
+ }
+
+ if ((sendPackets) && (side.isClient()))
+ {
+ PacketDispatcher.sendPacketToServer(AetherPacketHandler.sendPartyNameChange(party.getName(), newName));
+ }
+
+ party.setName(newName);
+
+ return true;
+ }
+
+ return false;
+ }
+
+ public void changePartyType(Party party, PartyType newType, boolean sendPackets)
+ {
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ if ((this.parties.contains(party)) && (party != null) && (newType != null))
+ {
+ if (side.isClient())
+ {
+ if (party.hasMember(getMember(ClientNotificationHandler.clientUsername())))
+ {
+ ClientNotificationHandler.createGeneric("Party Changed!", "Now: " + newType.name(), "");
+ }
+ }
+
+ party.setType(newType);
+
+ if ((sendPackets) && (side == Side.CLIENT))
+ {
+ PacketDispatcher.sendPacketToServer(AetherPacketHandler.sendPartyTypeChange(party.getName(), newType));
+ }
+ }
+ }
+
+ public Party getParty(String partyName)
+ {
+ for (Party party : this.parties)
+ {
+ if (party.getName().equalsIgnoreCase(partyName))
+ {
+ return party;
+ }
+ }
+
+ return null;
+ }
+
+ public Party getParty(EntityPlayer player)
+ {
+ PartyMember member = getMember(player);
+
+ for (Party party : this.parties)
+ {
+ if (party.getMembers().contains(member))
+ {
+ return party;
+ }
+ }
+
+ return null;
+ }
+
+ public Party getParty(PartyMember member)
+ {
+ for (Party party : this.parties)
+ {
+ if (party.getMembers().contains(member))
+ {
+ return party;
+ }
+ }
+
+ return null;
+ }
+
+ public PartyMember getMember(String playerUsername)
+ {
+ for (Party party : this.parties)
+ {
+ for (PartyMember member : party.getMembers())
+ {
+ if (member.username.equalsIgnoreCase(playerUsername))
+ {
+ return member;
+ }
+ }
+ }
+
+ return null;
+ }
+
+ public PartyMember getMember(EntityPlayer player)
+ {
+ return getMember(player.username);
+ }
+
+ public boolean inParty(Party party, String playerUsername)
+ {
+ return (getMember(playerUsername) != null) && (party.hasMember(getMember(playerUsername)));
+ }
+
+ public boolean inParty(Party party, EntityPlayer player)
+ {
+ return inParty(party, player.username);
+ }
+
+ public boolean inParty(Party party, PartyMember member)
+ {
+ return inParty(party, member.username);
+ }
+
+ public boolean inParty(String playerUsername)
+ {
+ return getMember(playerUsername) != null;
+ }
+
+ public boolean inParty(EntityPlayer player)
+ {
+ return inParty(player.username);
+ }
+
+ public boolean inParty(PartyMember member)
+ {
+ return inParty(member.username);
+ }
+
+ public boolean isLeader(String playerUsername)
+ {
+ return (getMember(playerUsername) != null) && (getMember(playerUsername).isLeader());
+ }
+
+ public boolean isLeader(EntityPlayer player)
+ {
+ return isLeader(player.username);
+ }
+
+ public boolean isLeader(PartyMember member)
+ {
+ return isLeader(member.username);
+ }
+
+ public void setParties(ArrayList parties)
+ {
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ this.parties = parties;
+ }
+
+ public ArrayList getParties()
+ {
+ return this.parties;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.party.PartyController
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/party/PartyType.java b/src/main/java/net/aetherteam/aether/party/PartyType.java
new file mode 100644
index 0000000..32c046f
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/party/PartyType.java
@@ -0,0 +1,38 @@
+package net.aetherteam.aether.party;
+
+import java.io.Serializable;
+
+public enum PartyType implements Serializable
+{
+ OPEN(6750054), CLOSED(16711680), PRIVATE(0);
+
+ public int displayColor;
+
+ private PartyType(int displayColor)
+ {
+ this.displayColor = displayColor;
+ }
+
+ public int getDisplayColor()
+ {
+ return this.displayColor;
+ }
+
+ public static PartyType getTypeFromString(String name)
+ {
+ for (PartyType type : values())
+ {
+ if (type.name().equalsIgnoreCase(name))
+ {
+ return type;
+ }
+ }
+
+ return null;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.party.PartyType
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/party/exceptions/PartyFunctionException.java b/src/main/java/net/aetherteam/aether/party/exceptions/PartyFunctionException.java
new file mode 100644
index 0000000..d20695c
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/party/exceptions/PartyFunctionException.java
@@ -0,0 +1,14 @@
+package net.aetherteam.aether.party.exceptions;
+
+public class PartyFunctionException extends Exception
+{
+ public PartyFunctionException(String cause)
+ {
+ super(cause);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.party.exceptions.PartyFunctionException
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/party/members/MemberType.java b/src/main/java/net/aetherteam/aether/party/members/MemberType.java
new file mode 100644
index 0000000..a249489
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/party/members/MemberType.java
@@ -0,0 +1,59 @@
+package net.aetherteam.aether.party.members;
+
+import java.io.Serializable;
+
+public enum MemberType implements Serializable
+{
+ LEADER(true, true, true, true), MODERATOR(true, true, false, false), MEMBER(false, false, false, false);
+
+ private boolean canKick;
+ private boolean canBan;
+ private boolean canRecruit;
+ private boolean canPromote;
+
+ private MemberType(boolean canKick, boolean canBan, boolean canRecruit, boolean canPromote)
+ {
+ this.canKick = canKick;
+ this.canBan = canBan;
+ this.canRecruit = canRecruit;
+ this.canPromote = canPromote;
+ }
+
+ public boolean canKick()
+ {
+ return this.canKick;
+ }
+
+ public boolean canBan()
+ {
+ return this.canBan;
+ }
+
+ public boolean canRecruit()
+ {
+ return this.canRecruit;
+ }
+
+ public boolean canPromote()
+ {
+ return this.canPromote;
+ }
+
+ public static MemberType getTypeFromString(String name)
+ {
+ for (MemberType type : values())
+ {
+ if (type.name().equalsIgnoreCase(name))
+ {
+ return type;
+ }
+ }
+
+ return null;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.party.members.MemberType
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/party/members/PartyMember.java b/src/main/java/net/aetherteam/aether/party/members/PartyMember.java
new file mode 100644
index 0000000..f2eb447
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/party/members/PartyMember.java
@@ -0,0 +1,92 @@
+package net.aetherteam.aether.party.members;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.relauncher.Side;
+
+import java.io.Serializable;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.CommonProxy;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.EntityPlayer;
+
+public class PartyMember implements Serializable
+{
+ public String username;
+ public int skinIndex;
+ public String skinUrl;
+ private MemberType type = MemberType.MEMBER;
+
+ Side side = FMLCommonHandler.instance().getEffectiveSide();
+
+ public PartyMember(EntityPlayer player)
+ {
+ this.username = player.username;
+
+ if (this.side.isClient())
+ {
+ this.skinIndex = Aether.proxy.getClient().renderEngine.getTextureForDownloadableImage(player.skinUrl, "/mob/char.png");
+ this.skinUrl = player.skinUrl;
+ }
+ }
+
+ public PartyMember(String username, String skinUrl)
+ {
+ this.username = username;
+
+ if (this.side.isClient())
+ {
+ this.skinIndex = Aether.proxy.getClient().renderEngine.getTextureForDownloadableImage(skinUrl, "/mob/char.png");
+ this.skinUrl = skinUrl;
+ }
+ }
+
+ public PartyMember promoteTo(MemberType type)
+ {
+ this.type = type;
+
+ return this;
+ }
+
+ public boolean isLeader()
+ {
+ return this.type == MemberType.LEADER;
+ }
+
+ public boolean isModerator()
+ {
+ return this.type == MemberType.MODERATOR;
+ }
+
+ public boolean canKick()
+ {
+ return this.type.canKick();
+ }
+
+ public boolean canBan()
+ {
+ return this.type.canBan();
+ }
+
+ public boolean canRecruit()
+ {
+ return this.type.canRecruit();
+ }
+
+ public boolean canPromote()
+ {
+ return this.type.canPromote();
+ }
+
+ public MemberType getType()
+ {
+ return this.type;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.party.members.PartyMember
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/recipes/AetherEnchantments.java b/src/main/java/net/aetherteam/aether/recipes/AetherEnchantments.java
new file mode 100644
index 0000000..a482161
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/recipes/AetherEnchantments.java
@@ -0,0 +1,142 @@
+package net.aetherteam.aether.recipes;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.items.AetherItems;
+import net.aetherteam.aether.tile_entities.TileEntityAltar;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+
+public class AetherEnchantments
+{
+ public static void init()
+ {
+ addEnchantment(new ItemStack(AetherBlocks.GravititeOre, 1), new ItemStack(AetherBlocks.EnchantedGravitite, 1), 4, true);
+
+ addEnchantment(new ItemStack(AetherItems.SkyrootPickaxe, 1), new ItemStack(AetherItems.SkyrootPickaxe, 1), 1, true);
+ addEnchantment(new ItemStack(AetherItems.SkyrootSword, 1), new ItemStack(AetherItems.SkyrootSword, 1), 1, true);
+ addEnchantment(new ItemStack(AetherItems.SkyrootShovel, 1), new ItemStack(AetherItems.SkyrootShovel, 1), 1, true);
+ addEnchantment(new ItemStack(AetherItems.SkyrootAxe, 1), new ItemStack(AetherItems.SkyrootAxe, 1), 1, true);
+
+ addEnchantment(new ItemStack(AetherItems.HolystonePickaxe, 1), new ItemStack(AetherItems.HolystonePickaxe, 1), 2, true);
+ addEnchantment(new ItemStack(AetherItems.HolystoneSword, 1), new ItemStack(AetherItems.HolystoneSword, 1), 2, true);
+ addEnchantment(new ItemStack(AetherItems.HolystoneShovel, 1), new ItemStack(AetherItems.HolystoneShovel, 1), 2, true);
+ addEnchantment(new ItemStack(AetherItems.HolystoneAxe, 1), new ItemStack(AetherItems.HolystoneAxe, 1), 2, true);
+
+ addEnchantment(new ItemStack(AetherItems.ZanitePickaxe, 1), new ItemStack(AetherItems.ZanitePickaxe, 1), 3, true);
+ addEnchantment(new ItemStack(AetherItems.ZaniteSword, 1), new ItemStack(AetherItems.ZaniteSword, 1), 3, true);
+ addEnchantment(new ItemStack(AetherItems.ZaniteShovel, 1), new ItemStack(AetherItems.ZaniteShovel, 1), 3, true);
+ addEnchantment(new ItemStack(AetherItems.ZaniteAxe, 1), new ItemStack(AetherItems.ZaniteAxe, 1), 3, true);
+
+ addEnchantment(new ItemStack(AetherItems.GravititePickaxe, 1), new ItemStack(AetherItems.GravititePickaxe, 1), 4, true);
+ addEnchantment(new ItemStack(AetherItems.GravititeSword, 1), new ItemStack(AetherItems.GravititeSword, 1), 4, true);
+ addEnchantment(new ItemStack(AetherItems.GravititeShovel, 1), new ItemStack(AetherItems.GravititeShovel, 1), 4, true);
+ addEnchantment(new ItemStack(AetherItems.GravititeAxe, 1), new ItemStack(AetherItems.GravititeAxe, 1), 4, true);
+
+ addEnchantment(new ItemStack(AetherItems.Dart, 1, 0), new ItemStack(AetherItems.Dart, 1, 2), 6);
+ addEnchantment(new ItemStack(AetherItems.SkyrootBucket, 1, 2), new ItemStack(AetherItems.SkyrootBucket, 1, 3), 2, true);
+
+ int discId = 2256;
+ Item item = Item.itemsList[discId];
+ while ((item != null) && (item.getUnlocalizedName().equals("item.record")))
+ {
+ addEnchantment(new ItemStack(item, 1), new ItemStack(AetherItems.AetherMusicDisk, 1), 4, true);
+ discId++;
+ item = Item.itemsList[discId];
+ }
+
+ addEnchantment(new ItemStack(Item.helmetLeather, 1), new ItemStack(Item.helmetLeather, 1), 1, true);
+ addEnchantment(new ItemStack(Item.plateLeather, 1), new ItemStack(Item.plateLeather, 1), 1, true);
+ addEnchantment(new ItemStack(Item.legsLeather, 1), new ItemStack(Item.legsLeather, 1), 1, true);
+ addEnchantment(new ItemStack(Item.bootsLeather, 1), new ItemStack(Item.bootsLeather, 1), 1, true);
+
+ addEnchantment(new ItemStack(Item.pickaxeWood, 1), new ItemStack(Item.pickaxeWood, 1), 1, true);
+ addEnchantment(new ItemStack(Item.shovelWood, 1), new ItemStack(Item.shovelWood, 1), 1, true);
+ addEnchantment(new ItemStack(Item.swordWood, 1), new ItemStack(Item.swordWood, 1), 1, true);
+ addEnchantment(new ItemStack(Item.axeWood, 1), new ItemStack(Item.axeWood, 1), 1, true);
+ addEnchantment(new ItemStack(Item.hoeWood, 1), new ItemStack(Item.hoeWood, 1), 1, true);
+
+ addEnchantment(new ItemStack(Item.pickaxeStone, 1), new ItemStack(Item.pickaxeStone, 1), 1, true);
+ addEnchantment(new ItemStack(Item.shovelStone, 1), new ItemStack(Item.shovelStone, 1), 1, true);
+ addEnchantment(new ItemStack(Item.swordStone, 1), new ItemStack(Item.swordStone, 1), 1, true);
+ addEnchantment(new ItemStack(Item.axeStone, 1), new ItemStack(Item.axeStone, 1), 1, true);
+ addEnchantment(new ItemStack(Item.hoeStone, 1), new ItemStack(Item.hoeStone, 1), 1, true);
+
+ addEnchantment(new ItemStack(Item.helmetIron, 1), new ItemStack(Item.helmetIron, 1), 2, true);
+ addEnchantment(new ItemStack(Item.plateIron, 1), new ItemStack(Item.plateIron, 1), 2, true);
+ addEnchantment(new ItemStack(Item.legsIron, 1), new ItemStack(Item.legsIron, 1), 2, true);
+ addEnchantment(new ItemStack(Item.bootsIron, 1), new ItemStack(Item.bootsIron, 1), 2, true);
+
+ addEnchantment(new ItemStack(Item.pickaxeIron, 1), new ItemStack(Item.pickaxeIron, 1), 2, true);
+ addEnchantment(new ItemStack(Item.shovelIron, 1), new ItemStack(Item.shovelIron, 1), 2, true);
+ addEnchantment(new ItemStack(Item.swordIron, 1), new ItemStack(Item.swordIron, 1), 2, true);
+ addEnchantment(new ItemStack(Item.axeIron, 1), new ItemStack(Item.axeIron, 1), 2, true);
+ addEnchantment(new ItemStack(Item.hoeIron, 1), new ItemStack(Item.hoeIron, 1), 2, true);
+
+ addEnchantment(new ItemStack(Item.helmetGold, 1), new ItemStack(Item.helmetGold, 1), 3, true);
+ addEnchantment(new ItemStack(Item.plateGold, 1), new ItemStack(Item.plateGold, 1), 3, true);
+ addEnchantment(new ItemStack(Item.legsGold, 1), new ItemStack(Item.legsGold, 1), 3, true);
+ addEnchantment(new ItemStack(Item.bootsGold, 1), new ItemStack(Item.bootsGold, 1), 3, true);
+
+ addEnchantment(new ItemStack(Item.pickaxeGold, 1), new ItemStack(Item.pickaxeGold, 1), 3, true);
+ addEnchantment(new ItemStack(Item.shovelGold, 1), new ItemStack(Item.shovelGold, 1), 3, true);
+ addEnchantment(new ItemStack(Item.swordGold, 1), new ItemStack(Item.swordGold, 1), 3, true);
+ addEnchantment(new ItemStack(Item.axeGold, 1), new ItemStack(Item.axeGold, 1), 3, true);
+ addEnchantment(new ItemStack(Item.hoeGold, 1), new ItemStack(Item.hoeGold, 1), 3, true);
+
+ addEnchantment(new ItemStack(Item.helmetDiamond, 1), new ItemStack(Item.helmetDiamond, 1), 4, true);
+ addEnchantment(new ItemStack(Item.plateDiamond, 1), new ItemStack(Item.plateDiamond, 1), 4, true);
+ addEnchantment(new ItemStack(Item.legsDiamond, 1), new ItemStack(Item.legsDiamond, 1), 4, true);
+ addEnchantment(new ItemStack(Item.bootsDiamond, 1), new ItemStack(Item.bootsDiamond, 1), 4, true);
+
+ addEnchantment(new ItemStack(Item.pickaxeDiamond, 1), new ItemStack(Item.pickaxeDiamond, 1), 4, true);
+ addEnchantment(new ItemStack(Item.shovelDiamond, 1), new ItemStack(Item.shovelDiamond, 1), 4, true);
+ addEnchantment(new ItemStack(Item.swordDiamond, 1), new ItemStack(Item.swordDiamond, 1), 4, true);
+ addEnchantment(new ItemStack(Item.axeDiamond, 1), new ItemStack(Item.axeDiamond, 1), 4, true);
+ addEnchantment(new ItemStack(Item.hoeDiamond, 1), new ItemStack(Item.hoeDiamond, 1), 4, true);
+
+ addEnchantment(new ItemStack(Item.fishingRod, 1), new ItemStack(Item.fishingRod, 1), 1, true);
+
+ addEnchantment(new ItemStack(AetherBlocks.Quicksoil, 1), new ItemStack(AetherBlocks.QuicksoilGlass, 1), 4);
+
+ addEnchantment(new ItemStack(AetherBlocks.Holystone, 1, 1), new ItemStack(AetherItems.HealingStone, 1), 3, true);
+ addEnchantment(new ItemStack(AetherBlocks.Holystone, 1, 3), new ItemStack(AetherItems.HealingStone, 1), 3, true);
+
+ addEnchantment(new ItemStack(AetherItems.GravititeHelmet, 1), new ItemStack(AetherItems.GravititeHelmet, 1), 4, true);
+ addEnchantment(new ItemStack(AetherItems.GravititeChestplate, 1), new ItemStack(AetherItems.GravititeChestplate, 1), 4, true);
+ addEnchantment(new ItemStack(AetherItems.GravititeLeggings, 1), new ItemStack(AetherItems.GravititeLeggings, 1), 4, true);
+ addEnchantment(new ItemStack(AetherItems.GravititeBoots, 1), new ItemStack(AetherItems.GravititeBoots, 1), 4, true);
+ addEnchantment(new ItemStack(AetherItems.GravititeGloves, 1), new ItemStack(AetherItems.GravititeGloves, 1), 4, true);
+
+ addEnchantment(new ItemStack(AetherItems.ZaniteHelmet, 1), new ItemStack(AetherItems.ZaniteHelmet, 1), 3, true);
+ addEnchantment(new ItemStack(AetherItems.ZaniteChestplate, 1), new ItemStack(AetherItems.ZaniteChestplate, 1), 3, true);
+ addEnchantment(new ItemStack(AetherItems.ZaniteLeggings, 1), new ItemStack(AetherItems.ZaniteLeggings, 1), 3, true);
+ addEnchantment(new ItemStack(AetherItems.ZaniteBoots, 1), new ItemStack(AetherItems.ZaniteBoots, 1), 3, true);
+ addEnchantment(new ItemStack(AetherItems.ZaniteGloves, 1), new ItemStack(AetherItems.ZaniteGloves, 1), 3, true);
+ addEnchantment(new ItemStack(AetherItems.ZaniteRing, 1), new ItemStack(AetherItems.ZaniteRing, 1), 3, true);
+ addEnchantment(new ItemStack(AetherItems.ZanitePendant, 1), new ItemStack(AetherItems.ZanitePendant, 1), 3, true);
+
+ addEnchantment(new ItemStack(AetherItems.LeatherGloves, 1), new ItemStack(AetherItems.LeatherGloves, 1), 4, true);
+ addEnchantment(new ItemStack(AetherItems.IronGloves, 1), new ItemStack(AetherItems.IronGloves, 1), 4, true);
+ addEnchantment(new ItemStack(AetherItems.GoldenGloves, 1), new ItemStack(AetherItems.GoldenGloves, 1), 4, true);
+ addEnchantment(new ItemStack(AetherItems.DiamondGloves, 1), new ItemStack(AetherItems.DiamondGloves, 1), 4, true);
+
+ addEnchantment(new ItemStack(AetherItems.DartShooter, 1, 0), new ItemStack(AetherItems.DartShooter, 1, 2), 4, true);
+
+ addEnchantment(new ItemStack(AetherItems.BlueBerry, 1, 0), new ItemStack(AetherItems.EnchantedBerry, 1, 0), 2, true);
+ }
+
+ public static void addEnchantment(ItemStack from, ItemStack to, int i)
+ {
+ TileEntityAltar.addEnchantment(from, to, i);
+ }
+
+ public static void addEnchantment(ItemStack from, ItemStack to, int i, boolean limit)
+ {
+ TileEntityAltar.addEnchantment(from, to, i, limit);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.recipes.AetherEnchantments
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/recipes/AetherFreezables.java b/src/main/java/net/aetherteam/aether/recipes/AetherFreezables.java
new file mode 100644
index 0000000..3f62c52
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/recipes/AetherFreezables.java
@@ -0,0 +1,36 @@
+package net.aetherteam.aether.recipes;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.items.AetherItems;
+import net.aetherteam.aether.tile_entities.TileEntityFreezer;
+import net.minecraft.block.Block;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+
+public class AetherFreezables
+{
+ public static void init()
+ {
+ addFreezable(new ItemStack(Item.bucketWater, 1), new ItemStack(Block.ice, 5), 500);
+ addFreezable(new ItemStack(AetherItems.SkyrootBucket, 1, 8), new ItemStack(Block.ice, 5), 500);
+
+ addFreezable(new ItemStack(Item.bucketLava, 1), new ItemStack(Block.obsidian, 2), 500);
+
+ addFreezable(new ItemStack(AetherBlocks.Aercloud, 1, 0), new ItemStack(AetherBlocks.Aercloud, 1, 1), 50);
+
+ addFreezable(new ItemStack(AetherItems.GoldenPendant, 1), new ItemStack(AetherItems.IcePendant, 1), 2500);
+ addFreezable(new ItemStack(AetherItems.GoldenRing, 1), new ItemStack(AetherItems.IceRing, 1), 1500);
+ addFreezable(new ItemStack(AetherItems.IronRing, 1), new ItemStack(AetherItems.IceRing, 1), 1500);
+ addFreezable(new ItemStack(AetherItems.IronPendant, 1), new ItemStack(AetherItems.IcePendant, 1), 2500);
+ }
+
+ public static void addFreezable(ItemStack from, ItemStack to, int i)
+ {
+ TileEntityFreezer.addFreezable(from, to, i);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.recipes.AetherFreezables
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/recipes/AetherRecipes.java b/src/main/java/net/aetherteam/aether/recipes/AetherRecipes.java
new file mode 100644
index 0000000..fb2ead1
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/recipes/AetherRecipes.java
@@ -0,0 +1,146 @@
+package net.aetherteam.aether.recipes;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.block.Block;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.src.ModLoader;
+
+public class AetherRecipes
+{
+ public static void init()
+ {
+ ModLoader.addRecipe(new ItemStack(AetherItems.HolystonePickaxe, 1), new Object[]{"ZZZ", " Y ", " Y ", Character.valueOf('Z'), AetherBlocks.Holystone, Character.valueOf('Y'), AetherItems.SkyrootStick});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.HolystoneAxe, 1), new Object[]{"ZZ", "ZY", " Y", Character.valueOf('Z'), AetherBlocks.Holystone, Character.valueOf('Y'), AetherItems.SkyrootStick});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.HolystoneShovel, 1), new Object[]{"Z", "Y", "Y", Character.valueOf('Z'), AetherBlocks.Holystone, Character.valueOf('Y'), AetherItems.SkyrootStick});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.HolystoneSword, 1), new Object[]{"Z", "Z", "Y", Character.valueOf('Z'), AetherBlocks.Holystone, Character.valueOf('Y'), AetherItems.SkyrootStick});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.ZanitePickaxe, 1), new Object[]{"ZZZ", " Y ", " Y ", Character.valueOf('Z'), AetherItems.ZaniteGemstone, Character.valueOf('Y'), AetherItems.SkyrootStick});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.ZaniteAxe, 1), new Object[]{"ZZ", "ZY", " Y", Character.valueOf('Z'), AetherItems.ZaniteGemstone, Character.valueOf('Y'), AetherItems.SkyrootStick});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.ZaniteShovel, 1), new Object[]{"Z", "Y", "Y", Character.valueOf('Z'), AetherItems.ZaniteGemstone, Character.valueOf('Y'), AetherItems.SkyrootStick});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.ZaniteSword, 1), new Object[]{"Z", "Z", "Y", Character.valueOf('Z'), AetherItems.ZaniteGemstone, Character.valueOf('Y'), AetherItems.SkyrootStick});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.GravititePickaxe, 1), new Object[]{"ZZZ", " Y ", " Y ", Character.valueOf('Z'), AetherBlocks.EnchantedGravitite, Character.valueOf('Y'), AetherItems.SkyrootStick});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.GravititeAxe, 1), new Object[]{"ZZ", "ZY", " Y", Character.valueOf('Z'), AetherBlocks.EnchantedGravitite, Character.valueOf('Y'), AetherItems.SkyrootStick});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.GravititeShovel, 1), new Object[]{"Z", "Y", "Y", Character.valueOf('Z'), AetherBlocks.EnchantedGravitite, Character.valueOf('Y'), AetherItems.SkyrootStick});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.GravititeSword, 1), new Object[]{"Z", "Z", "Y", Character.valueOf('Z'), AetherBlocks.EnchantedGravitite, Character.valueOf('Y'), AetherItems.SkyrootStick});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.SkyrootPickaxe, 1), new Object[]{"ZZZ", " Y ", " Y ", Character.valueOf('Z'), AetherBlocks.SkyrootPlank, Character.valueOf('Y'), AetherItems.SkyrootStick});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.SkyrootAxe, 1), new Object[]{"ZZ", "ZY", " Y", Character.valueOf('Z'), AetherBlocks.SkyrootPlank, Character.valueOf('Y'), AetherItems.SkyrootStick});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.SkyrootShovel, 1), new Object[]{"Z", "Y", "Y", Character.valueOf('Z'), AetherBlocks.SkyrootPlank, Character.valueOf('Y'), AetherItems.SkyrootStick});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.SkyrootSword, 1), new Object[]{"Z", "Z", "Y", Character.valueOf('Z'), AetherBlocks.SkyrootPlank, Character.valueOf('Y'), AetherItems.SkyrootStick});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.SkyrootBucket, 1, 0), new Object[]{"Z Z", " Z ", Character.valueOf('Z'), AetherBlocks.SkyrootPlank});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.SkyrootStick, 4), new Object[]{"#", "#", Character.valueOf('#'), AetherBlocks.SkyrootPlank});
+
+ ModLoader.addRecipe(new ItemStack(AetherBlocks.SkyrootCraftingTable, 1), new Object[]{"UU", "UU", Character.valueOf('U'), AetherBlocks.SkyrootPlank});
+
+ ModLoader.addRecipe(new ItemStack(AetherBlocks.AmbrosiumTorch, 2), new Object[]{" Z", " Y", Character.valueOf('Z'), AetherItems.AmbrosiumShard, Character.valueOf('Y'), AetherItems.SkyrootStick});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.Dart, 1, 0), new Object[]{"X", "Z", "Y", Character.valueOf('X'), AetherItems.GoldenAmber, Character.valueOf('Z'), AetherItems.SkyrootStick, Character.valueOf('Y'), Item.feather});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.Dart, 8, 1), new Object[]{"XXX", "XZX", "XXX", Character.valueOf('X'), new ItemStack(AetherItems.Dart, 1, 0), Character.valueOf('Z'), new ItemStack(AetherItems.SkyrootBucket, 1, 2)});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.WhiteCape, 1), new Object[]{"XX", "XX", "XX", Character.valueOf('X'), new ItemStack(Block.cloth, 1, 0)});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.RedCape, 1), new Object[]{"XX", "XX", "XX", Character.valueOf('X'), new ItemStack(Block.cloth, 1, 14)});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.BlueCape, 1), new Object[]{"XX", "XX", "XX", Character.valueOf('X'), new ItemStack(Block.cloth, 1, 11)});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.BlueCape, 1), new Object[]{"XX", "XX", "XX", Character.valueOf('X'), new ItemStack(Block.cloth, 1, 3)});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.BlueCape, 1), new Object[]{"XX", "XX", "XX", Character.valueOf('X'), new ItemStack(Block.cloth, 1, 9)});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.YellowCape, 1), new Object[]{"XX", "XX", "XX", Character.valueOf('X'), new ItemStack(Block.cloth, 1, 4)});
+
+ ModLoader.addRecipe(new ItemStack(AetherBlocks.Incubator, 1), new Object[]{"XXX", "XZX", "XXX", Character.valueOf('X'), AetherBlocks.Holystone, Character.valueOf('Z'), AetherBlocks.AmbrosiumTorch});
+
+ ModLoader.addRecipe(new ItemStack(AetherBlocks.Freezer, 1), new Object[]{"XXX", "XZX", "YYY", Character.valueOf('X'), AetherBlocks.Holystone, Character.valueOf('Z'), AetherBlocks.Icestone, Character.valueOf('Y'), AetherBlocks.SkyrootPlank});
+
+ ModLoader.addRecipe(new ItemStack(AetherBlocks.ZaniteBlock, 1), new Object[]{"XX", "XX", Character.valueOf('X'), AetherItems.ZaniteGemstone});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.DartShooter, 1), new Object[]{"X", "X", "Y", Character.valueOf('X'), AetherBlocks.SkyrootPlank, Character.valueOf('Y'), AetherItems.GoldenAmber});
+
+ ModLoader.addRecipe(new ItemStack(Item.saddle, 1), new Object[]{"XXX", "XZX", Character.valueOf('X'), Item.leather, Character.valueOf('Z'), Item.silk});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.GravititeHelmet, 1), new Object[]{"XXX", "X X", Character.valueOf('X'), AetherBlocks.EnchantedGravitite});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.GravititeChestplate, 1), new Object[]{"X X", "XXX", "XXX", Character.valueOf('X'), AetherBlocks.EnchantedGravitite});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.GravititeLeggings, 1), new Object[]{"XXX", "X X", "X X", Character.valueOf('X'), AetherBlocks.EnchantedGravitite});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.GravititeBoots, 1), new Object[]{"X X", "X X", Character.valueOf('X'), AetherBlocks.EnchantedGravitite});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.ZaniteHelmet, 1), new Object[]{"XXX", "X X", Character.valueOf('X'), AetherItems.ZaniteGemstone});
+ ModLoader.addRecipe(new ItemStack(AetherItems.ZaniteChestplate, 1), new Object[]{"X X", "XXX", "XXX", Character.valueOf('X'), AetherItems.ZaniteGemstone});
+ ModLoader.addRecipe(new ItemStack(AetherItems.ZaniteLeggings, 1), new Object[]{"XXX", "X X", "X X", Character.valueOf('X'), AetherItems.ZaniteGemstone});
+ ModLoader.addRecipe(new ItemStack(AetherItems.ZaniteBoots, 1), new Object[]{"X X", "X X", Character.valueOf('X'), AetherItems.ZaniteGemstone});
+
+ ModLoader.addShapelessRecipe(new ItemStack(AetherItems.DartShooter, 1, 1), new Object[]{new ItemStack(AetherItems.DartShooter, 1, 0), AetherItems.AechorPetal});
+ ModLoader.addShapelessRecipe(new ItemStack(AetherItems.ZaniteGemstone, 4), new Object[]{AetherBlocks.ZaniteBlock});
+
+ ModLoader.addShapelessRecipe(new ItemStack(Item.dyePowder, 2, 5), new Object[]{AetherBlocks.PurpleFlower});
+ ModLoader.addRecipe(new ItemStack(AetherBlocks.SkyrootChest, 1), new Object[]{"PPP", "P P", "PPP", Character.valueOf('P'), AetherBlocks.SkyrootPlank});
+
+ ModLoader.addRecipe(new ItemStack(Item.doorWood), new Object[]{"PP", "PP", "PP", Character.valueOf('P'), AetherBlocks.SkyrootPlank});
+ ModLoader.addRecipe(new ItemStack(AetherBlocks.SkyrootFence, 2), new Object[]{"SSS", "SSS", Character.valueOf('S'), AetherItems.SkyrootStick});
+ ModLoader.addRecipe(new ItemStack(Block.ladder, 4), new Object[]{"S S", "SSS", "S S", Character.valueOf('S'), AetherItems.SkyrootStick});
+ ModLoader.addRecipe(new ItemStack(Block.jukebox), new Object[]{"PPP", "PGP", "PPP", Character.valueOf('P'), AetherBlocks.SkyrootPlank, Character.valueOf('G'), AetherBlocks.EnchantedGravitite});
+
+ ModLoader.addRecipe(new ItemStack(AetherBlocks.SkyrootPlank, 4), new Object[]{"L", Character.valueOf('L'), AetherBlocks.AetherLog});
+
+ ModLoader.addRecipe(new ItemStack(AetherBlocks.Altar), new Object[]{"HHH", "HZH", "HHH", Character.valueOf('H'), AetherBlocks.Holystone, Character.valueOf('Z'), AetherItems.ZaniteGemstone});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.LeatherGloves), new Object[]{"C C", Character.valueOf('C'), Item.leather});
+ ModLoader.addRecipe(new ItemStack(AetherItems.IronGloves), new Object[]{"C C", Character.valueOf('C'), Item.ingotIron});
+ ModLoader.addRecipe(new ItemStack(AetherItems.GoldenGloves), new Object[]{"C C", Character.valueOf('C'), Item.ingotGold});
+ ModLoader.addRecipe(new ItemStack(AetherItems.DiamondGloves), new Object[]{"C C", Character.valueOf('C'), Item.diamond});
+ ModLoader.addRecipe(new ItemStack(AetherItems.ZaniteGloves), new Object[]{"C C", Character.valueOf('C'), AetherItems.ZaniteGemstone});
+ ModLoader.addRecipe(new ItemStack(AetherItems.GravititeGloves), new Object[]{"C C", Character.valueOf('C'), AetherBlocks.EnchantedGravitite});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.IronRing), new Object[]{" C ", "C C", " C ", Character.valueOf('C'), Item.ingotIron});
+ ModLoader.addRecipe(new ItemStack(AetherItems.GoldenRing), new Object[]{" C ", "C C", " C ", Character.valueOf('C'), Item.ingotGold});
+ ModLoader.addRecipe(new ItemStack(AetherItems.ZaniteRing), new Object[]{" C ", "C C", " C ", Character.valueOf('C'), AetherItems.ZaniteGemstone});
+
+ ModLoader.addRecipe(new ItemStack(AetherItems.IronPendant), new Object[]{"SSS", "S S", " C ", Character.valueOf('S'), Item.silk, Character.valueOf('C'), Item.ingotIron});
+ ModLoader.addRecipe(new ItemStack(AetherItems.GoldenPendant), new Object[]{"SSS", "S S", " C ", Character.valueOf('S'), Item.silk, Character.valueOf('C'), Item.ingotGold});
+ ModLoader.addRecipe(new ItemStack(AetherItems.ZanitePendant), new Object[]{"SSS", "S S", " C ", Character.valueOf('S'), Item.silk, Character.valueOf('C'), AetherItems.ZaniteGemstone});
+
+ ModLoader.addRecipe(new ItemStack(AetherBlocks.HolystoneStairs, 4), new Object[]{" U", " UU", "UUU", Character.valueOf('U'), new ItemStack(AetherBlocks.Holystone, 1, 1)});
+ ModLoader.addRecipe(new ItemStack(AetherBlocks.MossyHolystoneStairs, 6), new Object[]{" U", " UU", "UUU", Character.valueOf('U'), new ItemStack(AetherBlocks.Holystone, 1, 2)});
+ ModLoader.addRecipe(new ItemStack(AetherBlocks.IcestoneStairs, 4), new Object[]{" U", " UU", "UUU", Character.valueOf('U'), AetherBlocks.Icestone});
+ ModLoader.addRecipe(new ItemStack(AetherBlocks.SkyrootStairs, 4), new Object[]{" U", " UU", "UUU", Character.valueOf('U'), AetherBlocks.SkyrootPlank});
+ ModLoader.addRecipe(new ItemStack(AetherBlocks.CarvedStairs, 6), new Object[]{" U", " UU", "UUU", Character.valueOf('U'), new ItemStack(AetherBlocks.DungeonStone, 1, 0)});
+ ModLoader.addRecipe(new ItemStack(AetherBlocks.AngelicStairs, 6), new Object[]{" U", " UU", "UUU", Character.valueOf('U'), new ItemStack(AetherBlocks.DungeonStone, 1, 1)});
+ ModLoader.addRecipe(new ItemStack(AetherBlocks.HellfireStairs, 6), new Object[]{" U", " UU", "UUU", Character.valueOf('U'), new ItemStack(AetherBlocks.DungeonStone, 1, 2)});
+
+ ModLoader.addRecipe(new ItemStack(AetherBlocks.HolystoneWall, 6), new Object[]{"UUU", "UUU", Character.valueOf('U'), new ItemStack(AetherBlocks.Holystone, 1, 1)});
+ ModLoader.addRecipe(new ItemStack(AetherBlocks.MossyHolystoneWall, 6), new Object[]{"UUU", "UUU", Character.valueOf('U'), new ItemStack(AetherBlocks.Holystone, 1, 2)});
+ ModLoader.addRecipe(new ItemStack(AetherBlocks.IcestoneWall, 6), new Object[]{"UUU", "UUU", Character.valueOf('U'), AetherBlocks.Icestone});
+ ModLoader.addRecipe(new ItemStack(AetherBlocks.SkyrootLogWall, 6), new Object[]{"UUU", "UUU", Character.valueOf('U'), AetherBlocks.AetherLog});
+ ModLoader.addRecipe(new ItemStack(AetherBlocks.CarvedWall, 6), new Object[]{"UUU", "UUU", Character.valueOf('U'), new ItemStack(AetherBlocks.DungeonStone, 1, 0)});
+ ModLoader.addRecipe(new ItemStack(AetherBlocks.AngelicWall, 6), new Object[]{"UUU", "UUU", Character.valueOf('U'), new ItemStack(AetherBlocks.DungeonStone, 1, 1)});
+ ModLoader.addRecipe(new ItemStack(AetherBlocks.HellfireWall, 6), new Object[]{"UUU", "UUU", Character.valueOf('U'), new ItemStack(AetherBlocks.DungeonStone, 1, 2)});
+
+ ModLoader.addRecipe(new ItemStack(AetherBlocks.HolystoneBrick, 2), new Object[]{"UU", "UU", Character.valueOf('U'), AetherBlocks.Holystone});
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.recipes.AetherRecipes
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/sound/JukeboxData.java b/src/main/java/net/aetherteam/aether/sound/JukeboxData.java
new file mode 100644
index 0000000..806c90a
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/sound/JukeboxData.java
@@ -0,0 +1,146 @@
+package net.aetherteam.aether.sound;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Properties;
+
+import net.minecraft.client.Minecraft;
+
+public class JukeboxData
+{
+ private static Minecraft mc = Minecraft.getMinecraft();
+
+ private static final Properties menuProps = new Properties();
+ public static String selectedMenuName;
+ public static boolean loopMusic;
+ public static boolean muteMusic;
+ public static int lastMusicIndex;
+ public static int musicIndex;
+ public static boolean musicSet;
+ public static boolean hasPlayedMusic;
+ public static boolean hasStartedMusic;
+ public static boolean endMusic = true;
+ public static JukeboxPlayer jukebox = new JukeboxPlayer();
+ public static double playerPosX;
+ public static double playerPosY;
+ public static double playerPosZ;
+ public static int ticks;
+ private static File config = new File(Minecraft.getMinecraftDir(), "MenuAPI.properties");
+
+ public static void loadConfig()
+ {
+ if (config.exists()) try
+ {
+ Minecraft.getMinecraft();
+ FileInputStream in = new FileInputStream(Minecraft.getMinecraftDir() + "/MenuAPI.properties");
+
+ menuProps.load(in);
+
+ if (menuProps.size() <= 0)
+ {
+ resetConfig();
+ return;
+ }
+
+ selectedMenuName = String.valueOf(menuProps.getProperty("selectedMenu"));
+ loopMusic = menuProps.getProperty("loopMusic").equals("true");
+ muteMusic = menuProps.getProperty("muteMusic").equals("true");
+ lastMusicIndex = Integer.valueOf(menuProps.getProperty("lastMusicIndex")).intValue();
+ musicIndex = Integer.valueOf(menuProps.getProperty("musicIndex")).intValue();
+ musicSet = menuProps.getProperty("musicSet").equals("true");
+ hasPlayedMusic = menuProps.getProperty("hasPlayedMusic").equals("true");
+ hasStartedMusic = menuProps.getProperty("hasStartedMusic").equals("true");
+ } catch (FileNotFoundException e)
+ {
+ e.printStackTrace();
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+ else resetConfig();
+ }
+
+ public static void resetConfig()
+ {
+ try
+ {
+ menuProps.setProperty("selectedMenu", "");
+ menuProps.setProperty("loopMusic", "true");
+ menuProps.setProperty("muteMusic", "false");
+ menuProps.setProperty("lastMusicIndex", String.valueOf(jukebox.getIndexFromName("Strad")));
+ menuProps.setProperty("musicIndex", String.valueOf(jukebox.getIndexFromName("Strad")));
+ menuProps.setProperty("musicSet", "false");
+ menuProps.setProperty("hasPlayedMusic", "false");
+ menuProps.setProperty("hasStartedMusic", "false");
+
+ Minecraft.getMinecraft();
+ menuProps.store(new FileOutputStream(Minecraft.getMinecraftDir() + "/MenuAPI.properties"), null);
+
+ Minecraft.getMinecraft();
+ FileInputStream in = new FileInputStream(Minecraft.getMinecraftDir() + "/MenuAPI.properties");
+
+ menuProps.load(in);
+ } catch (FileNotFoundException e)
+ {
+ e.printStackTrace();
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ public static void wipeConfig()
+ {
+ if (config.exists()) try
+ {
+ menuProps.setProperty("selectedMenu", "");
+
+ Minecraft.getMinecraft();
+ menuProps.store(new FileOutputStream(Minecraft.getMinecraftDir() + "/MenuAPI.properties"), null);
+
+ FileInputStream in = new FileInputStream("MenuAPI.properties");
+
+ menuProps.load(in);
+ } catch (FileNotFoundException e)
+ {
+ e.printStackTrace();
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ public static void setProperty(String name, String value)
+ {
+ try
+ {
+ menuProps.setProperty(name, value);
+
+ Minecraft.getMinecraft();
+ menuProps.store(new FileOutputStream(Minecraft.getMinecraftDir() + "/MenuAPI.properties"), null);
+
+ FileInputStream in = new FileInputStream("MenuAPI.properties");
+
+ menuProps.load(in);
+ } catch (FileNotFoundException e)
+ {
+ e.printStackTrace();
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ static
+ {
+ Minecraft.getMinecraft();
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.sound.JukeboxData
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/sound/JukeboxPlayer.java b/src/main/java/net/aetherteam/aether/sound/JukeboxPlayer.java
new file mode 100644
index 0000000..bd72cf5
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/sound/JukeboxPlayer.java
@@ -0,0 +1,255 @@
+package net.aetherteam.aether.sound;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.CommonProxy;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.audio.SoundManager;
+import net.minecraft.util.MathHelper;
+import paulscode.sound.SoundSystem;
+
+public class JukeboxPlayer
+{
+ public SoundManager soundManager = Aether.proxy.getClient().sndManager;
+ private int musicInterval;
+ public List jukeboxMusic;
+ public boolean defaultMusic = true;
+ public String musicFileName = null;
+
+ public boolean playingJukebox = false;
+
+ public void process()
+ {
+ Minecraft.getMinecraft();
+ File streaming = new File(Minecraft.getMinecraftDir() + "/resources/streaming/");
+
+ if (streaming.exists())
+ {
+ this.jukeboxMusic = listMusic(streaming, false);
+ }
+ }
+
+ public void start()
+ {
+ JukeboxData.loadConfig();
+
+ if (JukeboxData.hasStartedMusic != true)
+ {
+ if (getMusicFileName() == null) ;
+ }
+
+ JukeboxData.hasStartedMusic = true;
+ JukeboxData.setProperty("hasStartedMusic", "true");
+
+ process();
+ }
+
+ public void run()
+ {
+ if ((this.playingJukebox) && (!JukeboxData.muteMusic))
+ {
+ this.musicInterval += 1;
+ } else this.musicInterval = 0;
+
+ if (this.musicInterval > 100)
+ {
+ this.playingJukebox = false;
+ this.musicInterval = 0;
+ }
+
+ if (this.jukeboxMusic != null)
+ {
+ if (JukeboxData.musicIndex > this.jukeboxMusic.size() - 1)
+ {
+ JukeboxData.musicIndex = 0;
+ JukeboxData.setProperty("musicIndex", String.valueOf(JukeboxData.musicIndex));
+ }
+
+ if (JukeboxData.musicIndex < 0)
+ {
+ JukeboxData.musicIndex = this.jukeboxMusic.size() - 1;
+ JukeboxData.setProperty("musicIndex", String.valueOf(JukeboxData.musicIndex));
+ }
+ }
+
+ if (JukeboxData.muteMusic)
+ {
+ muteMusic();
+ }
+
+ playMenuMusic();
+ }
+
+ public int getIndexFromName(String musicName)
+ {
+ process();
+
+ if (this.jukeboxMusic != null)
+ {
+ for (int count = 0; count < this.jukeboxMusic.size(); count++)
+ {
+ if (((String) this.jukeboxMusic.get(count)).equalsIgnoreCase(musicName))
+ {
+ return count;
+ }
+ }
+ }
+
+ return JukeboxData.musicIndex;
+ }
+
+ public List listMusic(File folder, boolean extension)
+ {
+ if (folder.exists())
+ {
+ List files = new ArrayList();
+
+ for (File fileEntry : folder.listFiles())
+ {
+ if (fileEntry.isDirectory())
+ {
+ listMusic(fileEntry, extension);
+ } else
+ {
+ String nameExtension = fileEntry.getName();
+ String nameNoExtension = fileEntry.getName().replaceFirst("[.][^.]+$", "");
+
+ if (!files.contains(extension ? nameExtension : nameNoExtension))
+ {
+ files.add(extension ? nameExtension : nameNoExtension);
+ }
+ }
+ }
+ return files;
+ }
+ return null;
+ }
+
+ private void setToNextSong()
+ {
+ if (this.jukeboxMusic != null)
+ {
+ if (!JukeboxData.musicSet)
+ {
+ JukeboxData.musicSet = true;
+ JukeboxData.setProperty("musicSet", "true");
+
+ if (JukeboxData.musicIndex > this.jukeboxMusic.size() - 2)
+ {
+ JukeboxData.musicIndex = 0;
+ JukeboxData.setProperty("musicIndex", String.valueOf(JukeboxData.musicIndex));
+ } else
+ {
+ JukeboxData.musicIndex += 1;
+ JukeboxData.setProperty("musicIndex", String.valueOf(JukeboxData.musicIndex));
+ }
+ }
+ }
+ }
+
+ public String getCurrentSongName()
+ {
+ String name = getCurrentSong();
+ return name.substring(0, 1).toUpperCase() + name.substring(1);
+ }
+
+ private String getCurrentSong()
+ {
+ if (this.jukeboxMusic != null)
+ {
+ return (String) this.jukeboxMusic.get(this.defaultMusic ? getIndexFromName(getMusicFileName()) : MathHelper.clamp_int(JukeboxData.musicIndex, 0, this.jukeboxMusic.size() - 1));
+ }
+ return "";
+ }
+
+ public boolean isMusicPlaying()
+ {
+ return (SoundManager.sndSystem != null) && (SoundManager.sndSystem.playing("streaming"));
+ }
+
+ public void muteMusic()
+ {
+ if (isSoundOn())
+ {
+ SoundManager.sndSystem.stop("streaming");
+ }
+ }
+
+ public void toggleMute()
+ {
+ JukeboxData.muteMusic = !JukeboxData.muteMusic;
+ JukeboxData.setProperty("muteMusic", String.valueOf(JukeboxData.muteMusic));
+
+ if (JukeboxData.muteMusic)
+ {
+ muteMusic();
+ } else playMenuMusic();
+ }
+
+ public void toggleLoop()
+ {
+ JukeboxData.loopMusic = !JukeboxData.loopMusic;
+ JukeboxData.setProperty("loopMusic", String.valueOf(JukeboxData.loopMusic));
+ }
+
+ private void playMusicFile(String musicFile)
+ {
+ if ((!JukeboxData.muteMusic) && (isSoundOn()) && (!isMusicPlaying()))
+ {
+ float x = (float) JukeboxData.playerPosX;
+ float y = (float) JukeboxData.playerPosY;
+ float z = (float) JukeboxData.playerPosZ;
+
+ this.soundManager.playStreaming(musicFile, x != 0.0F ? x : 0.0F, y != 0.0F ? y : 0.0F, z != 0.0F ? z : 0.0F);
+ }
+ }
+
+ public String getMusicFileName()
+ {
+ return this.musicFileName;
+ }
+
+ public JukeboxPlayer setMusicFileName(String name)
+ {
+ this.musicFileName = name;
+
+ return this;
+ }
+
+ public boolean isSoundOn()
+ {
+ return (this.soundManager != null) && (SoundManager.sndSystem != null);
+ }
+
+ public void playMenuMusic()
+ {
+ if ((isSoundOn()) && ((!JukeboxData.hasPlayedMusic) || ((!isMusicPlaying()) && (JukeboxData.hasPlayedMusic))) && (JukeboxData.hasStartedMusic))
+ {
+ if ((!JukeboxData.muteMusic) && (!isMusicPlaying()) && (!this.playingJukebox))
+ {
+ this.playingJukebox = true;
+
+ if (!JukeboxData.loopMusic)
+ {
+ setToNextSong();
+ }
+
+ playMusicFile(getCurrentSong());
+ }
+
+ JukeboxData.hasPlayedMusic = true;
+ JukeboxData.setProperty("hasPlayedMusic", "true");
+ }
+
+ JukeboxData.musicSet = false;
+ JukeboxData.setProperty("musicSet", "false");
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.sound.JukeboxPlayer
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/tile_entities/AetherTileEntities.java b/src/main/java/net/aetherteam/aether/tile_entities/AetherTileEntities.java
new file mode 100644
index 0000000..e280601
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/tile_entities/AetherTileEntities.java
@@ -0,0 +1,18 @@
+package net.aetherteam.aether.tile_entities;
+
+import cpw.mods.fml.common.registry.GameRegistry;
+
+public class AetherTileEntities
+{
+ public static void init()
+ {
+ GameRegistry.registerTileEntity(TileEntityFreezer.class, "Freezer");
+ GameRegistry.registerTileEntity(TileEntityIncubator.class, "Incubator");
+ GameRegistry.registerTileEntity(TileEntityAltar.class, "Altar");
+ GameRegistry.registerTileEntity(TileEntityTreasureChest.class, "Treasure Chest");
+ GameRegistry.registerTileEntity(TileEntitySkyrootChest.class, "Skyroot Chest");
+ GameRegistry.registerTileEntity(TileEntityBronzeDoorController.class, "Bronze Door");
+ GameRegistry.registerTileEntity(TileEntityEntranceController.class, "Dungeon Entrance");
+ GameRegistry.registerTileEntity(TileEntityBronzeSpawner.class, "Bronze Spawner");
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/tile_entities/BronzeSpawnerBaseLogic.java b/src/main/java/net/aetherteam/aether/tile_entities/BronzeSpawnerBaseLogic.java
new file mode 100644
index 0000000..16ca602
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/tile_entities/BronzeSpawnerBaseLogic.java
@@ -0,0 +1,60 @@
+package net.aetherteam.aether.tile_entities;
+
+import net.minecraft.block.Block;
+import net.minecraft.tileentity.MobSpawnerBaseLogic;
+import net.minecraft.tileentity.TileEntityMobSpawner;
+import net.minecraft.tileentity.WeightedRandomMinecart;
+import net.minecraft.world.World;
+
+class BronzeSpawnerBaseLogic extends MobSpawnerBaseLogic
+{
+ /**
+ * The mob spawner we deal with
+ */
+ final TileEntityMobSpawner mobSpawnerEntity;
+
+ /**
+ * A counter for spawn tries.
+ */
+ private int spawnCount = 9;
+
+ BronzeSpawnerBaseLogic(TileEntityMobSpawner var1)
+ {
+ this.mobSpawnerEntity = var1;
+ }
+
+ public void func_98267_a(int var1)
+ {
+ this.mobSpawnerEntity.worldObj.addBlockEvent(this.mobSpawnerEntity.xCoord, this.mobSpawnerEntity.yCoord, this.mobSpawnerEntity.zCoord, Block.mobSpawner.blockID, var1, 0);
+ }
+
+ public World getSpawnerWorld()
+ {
+ return this.mobSpawnerEntity.worldObj;
+ }
+
+ public int getSpawnerX()
+ {
+ return this.mobSpawnerEntity.xCoord;
+ }
+
+ public int getSpawnerY()
+ {
+ return this.mobSpawnerEntity.yCoord;
+ }
+
+ public int getSpawnerZ()
+ {
+ return this.mobSpawnerEntity.zCoord;
+ }
+
+ public void setRandomMinecart(WeightedRandomMinecart var1)
+ {
+ super.setRandomMinecart(var1);
+
+ if (this.getSpawnerWorld() != null)
+ {
+ this.getSpawnerWorld().markBlockForUpdate(this.mobSpawnerEntity.xCoord, this.mobSpawnerEntity.yCoord, this.mobSpawnerEntity.zCoord);
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/tile_entities/TileEntityAltar.java b/src/main/java/net/aetherteam/aether/tile_entities/TileEntityAltar.java
new file mode 100644
index 0000000..0cc46ff
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/tile_entities/TileEntityAltar.java
@@ -0,0 +1,596 @@
+package net.aetherteam.aether.tile_entities;
+
+import cpw.mods.fml.client.FMLClientHandler;
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.AetherEnchantment;
+import net.aetherteam.aether.entities.altar.EntityFakeItem;
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.inventory.IInventory;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.NBTTagList;
+import net.minecraft.network.INetworkManager;
+import net.minecraft.network.packet.Packet;
+import net.minecraft.network.packet.Packet132TileEntityData;
+import net.minecraft.server.management.ServerConfigurationManager;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraftforge.common.ForgeDirection;
+import net.minecraftforge.common.ISidedInventory;
+
+public class TileEntityAltar extends TileEntity implements IInventory, ISidedInventory
+{
+ private static List enchantments = new ArrayList();
+ private Random rand = new Random();
+ private EntityFakeItem renderedItem = null;
+ private ItemStack[] enchanterItemStacks = new ItemStack[3];
+ public ItemStack enchantableItem;
+ public ItemStack ambrosiumItems;
+ public int enchantProgress = 0;
+ public int enchantPowerRemaining = 0;
+ public int enchantTimeForItem = 0;
+ private float ambRotationSpeed = 0.05F;
+ private float ambRotation = 0.0F;
+ private double ambSpinningSpeed = 0.0D;
+ private double itemFloatingSpeed = 0.0D;
+ private AetherEnchantment currentEnchantment;
+
+ /**
+ * Returns the number of slots in the inventory.
+ */
+ public int getSizeInventory()
+ {
+ return this.enchanterItemStacks.length;
+ }
+
+ /**
+ * Returns the stack in slot i
+ */
+ public ItemStack getStackInSlot(int var1)
+ {
+ return this.enchanterItemStacks[var1];
+ }
+
+ /**
+ * Removes from an inventory slot (first arg) up to a specified number (second arg) of items and returns them in a
+ * new stack.
+ */
+ public ItemStack decrStackSize(int var1, int var2)
+ {
+ if (this.enchanterItemStacks[var1] != null)
+ {
+ ItemStack var3;
+
+ if (this.enchanterItemStacks[var1].stackSize <= var2)
+ {
+ var3 = this.enchanterItemStacks[var1];
+ this.enchanterItemStacks[var1] = null;
+
+ if (!this.worldObj.isRemote)
+ {
+ this.sendToAllInOurWorld(this.getDescriptionPacket());
+ }
+
+ return var3;
+ } else
+ {
+ var3 = this.enchanterItemStacks[var1].splitStack(var2);
+
+ if (this.enchanterItemStacks[var1].stackSize == 0)
+ {
+ this.enchanterItemStacks[var1] = null;
+ }
+
+ if (!this.worldObj.isRemote)
+ {
+ this.sendToAllInOurWorld(this.getDescriptionPacket());
+ }
+
+ return var3;
+ }
+ } else
+ {
+ return null;
+ }
+ }
+
+ /**
+ * When some containers are closed they call this on each slot, then drop whatever it returns as an EntityItem -
+ * like when you close a workbench GUI.
+ */
+ public ItemStack getStackInSlotOnClosing(int var1)
+ {
+ if (this.enchanterItemStacks[var1] != null)
+ {
+ ItemStack var2 = this.enchanterItemStacks[var1];
+ this.enchanterItemStacks[var1] = null;
+ return var2;
+ } else
+ {
+ return null;
+ }
+ }
+
+ /**
+ * Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).
+ */
+ public void setInventorySlotContents(int var1, ItemStack var2)
+ {
+ this.enchanterItemStacks[var1] = var2;
+
+ if (var1 == 0)
+ {
+ this.currentEnchantment = null;
+ }
+
+ if (var2 != null && var2.stackSize > this.getInventoryStackLimit())
+ {
+ var2.stackSize = this.getInventoryStackLimit();
+ }
+
+ if (!this.worldObj.isRemote)
+ {
+ this.sendToAllInOurWorld(this.getDescriptionPacket());
+ }
+ }
+
+ /**
+ * Returns the name of the inventory.
+ */
+ public String getInvName()
+ {
+ return "Enchanter";
+ }
+
+ /**
+ * Reads a tile entity from NBT.
+ */
+ public void readFromNBT(NBTTagCompound var1)
+ {
+ super.readFromNBT(var1);
+ NBTTagList var2 = var1.getTagList("Items");
+ this.enchanterItemStacks = new ItemStack[this.getSizeInventory()];
+
+ for (int var3 = 0; var3 < var2.tagCount(); ++var3)
+ {
+ NBTTagCompound var4 = (NBTTagCompound) var2.tagAt(var3);
+ byte var5 = var4.getByte("Slot");
+
+ if (var5 >= 0 && var5 < this.enchanterItemStacks.length)
+ {
+ this.enchanterItemStacks[var5] = ItemStack.loadItemStackFromNBT(var4);
+ }
+ }
+
+ this.enchantProgress = var1.getShort("BurnTime");
+ this.enchantTimeForItem = var1.getShort("CookTime");
+ }
+
+ /**
+ * Writes a tile entity to NBT.
+ */
+ public void writeToNBT(NBTTagCompound var1)
+ {
+ super.writeToNBT(var1);
+ var1.setShort("BurnTime", (short) this.enchantProgress);
+ var1.setShort("CookTime", (short) this.enchantTimeForItem);
+ NBTTagList var2 = new NBTTagList();
+
+ for (int var3 = 0; var3 < this.enchanterItemStacks.length; ++var3)
+ {
+ if (this.enchanterItemStacks[var3] != null)
+ {
+ NBTTagCompound var4 = new NBTTagCompound();
+ var4.setByte("Slot", (byte) var3);
+ this.enchanterItemStacks[var3].writeToNBT(var4);
+ var2.appendTag(var4);
+ }
+ }
+
+ var1.setTag("Items", var2);
+ }
+
+ /**
+ * Returns the maximum stack size for a inventory slot. Seems to always be 64, possibly will be extended. *Isn't
+ * this more of a set than a get?*
+ */
+ public int getInventoryStackLimit()
+ {
+ return 16;
+ }
+
+ public void addEnchantable(ItemStack var1)
+ {
+ if (var1 != null && this.isEnchantable(var1))
+ {
+ ItemStack var2 = this.getStackInSlot(0);
+ int var3 = this.getInventoryStackLimit();
+
+ if (this.isLimitedToOne(var1))
+ {
+ var3 = 1;
+ }
+
+ if (var2 == null)
+ {
+ if (var1.stackSize > var3)
+ {
+ var2 = new ItemStack(var1.itemID, var3, var1.getItemDamage());
+ var1.stackSize -= var3;
+ this.setInventorySlotContents(0, var2);
+ } else
+ {
+ var2 = new ItemStack(var1.itemID, var1.stackSize, var1.getItemDamage());
+ var1.stackSize = 0;
+ this.setInventorySlotContents(0, var2);
+ }
+ } else if (var2.itemID == var1.itemID && var2.getItemDamage() == var1.getItemDamage())
+ {
+ if (this.canCombineStackWithRemainder(var1, var2, var3))
+ {
+ this.combineStackWithRemainder(var1, var2, var3);
+ } else if (this.stackIsFull(var2, var3))
+ {
+ if (this.worldObj.isRemote)
+ {
+ FMLClientHandler.instance().getClient().ingameGUI.getChatGUI().printChatMessage("Altar is at full capacity.");
+ }
+ } else
+ {
+ var2.stackSize += var1.stackSize;
+ var1.stackSize = 0;
+ }
+ }
+
+ this.onInventoryChanged();
+
+ if (!this.worldObj.isRemote)
+ {
+ this.sendToAllInOurWorld(this.getDescriptionPacket());
+ }
+ }
+ }
+
+ public boolean canEnchant()
+ {
+ return this.worldObj.getBlockId(this.xCoord, this.yCoord + 1, this.zCoord) == 0;
+ }
+
+ public int getRemainingStackSize(ItemStack var1, ItemStack var2, int var3)
+ {
+ if (this.canCombineStackWithRemainder(var1, var2, var3))
+ {
+ int var4 = var2.stackSize + var1.stackSize - var3;
+ return var4;
+ } else
+ {
+ return 0;
+ }
+ }
+
+ public boolean canCombineStackWithRemainder(ItemStack var1, ItemStack var2, int var3)
+ {
+ return var1.itemID == var2.itemID && var1.getItemDamage() == var2.getItemDamage() ? (this.stackIsFull(var2, var3) ? false : var2.stackSize + var1.stackSize > var3) : false;
+ }
+
+ public boolean stackIsFull(ItemStack var1, int var2)
+ {
+ return var1.stackSize == var2;
+ }
+
+ public void combineStackWithRemainder(ItemStack var1, ItemStack var2, int var3)
+ {
+ if (this.canCombineStackWithRemainder(var1, var2, var3))
+ {
+ int var4 = this.getRemainingStackSize(var1, var2, var3);
+ var1.stackSize = var4;
+ var2.stackSize = this.getInventoryStackLimit();
+ }
+ }
+
+ public void addAmbrosium(ItemStack var1)
+ {
+ if (var1 != null && var1.itemID == AetherItems.AmbrosiumShard.itemID)
+ {
+ ItemStack var2 = this.getStackInSlot(1);
+
+ if (var2 == null || var2.stackSize < this.getInventoryStackLimit())
+ {
+ if (var2 == null)
+ {
+ var2 = new ItemStack(AetherItems.AmbrosiumShard.itemID, 1, 0);
+ this.setInventorySlotContents(1, var2);
+ --var1.stackSize;
+ } else
+ {
+ ++var2.stackSize;
+ --var1.stackSize;
+ }
+
+ this.onInventoryChanged();
+
+ if (!this.worldObj.isRemote)
+ {
+ this.sendToAllInOurWorld(this.getDescriptionPacket());
+ }
+ }
+ }
+ }
+
+ public void dropNextStack()
+ {
+ EntityItem var1;
+
+ if (this.enchanterItemStacks[1] != null)
+ {
+ if (!this.worldObj.isRemote)
+ {
+ var1 = new EntityItem(this.worldObj, (double) ((float) this.xCoord + 0.5F), (double) ((float) this.yCoord + 1.0F), (double) ((float) this.zCoord + 0.5F), this.enchanterItemStacks[1]);
+ var1.delayBeforeCanPickup = 10;
+ this.worldObj.spawnEntityInWorld(var1);
+ }
+
+ this.decrStackSize(1, this.enchanterItemStacks[1].stackSize);
+ } else if (this.enchanterItemStacks[0] != null)
+ {
+ if (!this.worldObj.isRemote)
+ {
+ var1 = new EntityItem(this.worldObj, (double) ((float) this.xCoord + 0.5F), (double) ((float) this.yCoord + 1.0F), (double) ((float) this.zCoord + 0.5F), this.enchanterItemStacks[0]);
+ var1.delayBeforeCanPickup = 10;
+ this.worldObj.spawnEntityInWorld(var1);
+ }
+
+ this.decrStackSize(0, this.enchanterItemStacks[0].stackSize);
+ }
+ }
+
+ @SideOnly(Side.CLIENT)
+ public int getCookProgressScaled(int var1)
+ {
+ return this.enchantTimeForItem == 0 ? 0 : this.enchantProgress * var1 / this.enchantTimeForItem;
+ }
+
+ @SideOnly(Side.CLIENT)
+ public int getBurnTimeRemainingScaled(int var1)
+ {
+ return this.enchantPowerRemaining * var1 / 500;
+ }
+
+ public boolean isBurning()
+ {
+ return this.enchantPowerRemaining > 0;
+ }
+
+ /**
+ * Allows the entity to update its state. Overridden in most subclasses, e.g. the mob spawner uses this to count
+ * ticks and creates a new spawn inside its implementation.
+ */
+ public void updateEntity()
+ {
+ if (!this.worldObj.isRemote)
+ {
+ if (this.renderedItem == null)
+ {
+ if (this.getEnchanterStacks(0) != null)
+ {
+ this.renderedItem = new EntityFakeItem(this.worldObj, (double) this.xCoord + 0.5D, (double) this.yCoord + 1.15D, (double) this.zCoord + 0.5D, this.getEnchanterStacks(0));
+ this.worldObj.spawnEntityInWorld(this.renderedItem);
+ }
+ } else if (this.getEnchanterStacks(0) == null)
+ {
+ this.renderedItem.setDead();
+ this.renderedItem = null;
+ }
+ }
+
+ if (this.enchanterItemStacks[0] != null)
+ {
+ this.itemFloatingSpeed = 0.03D;
+ } else
+ {
+ this.itemFloatingSpeed = 0.0D;
+ }
+
+ if (this.enchanterItemStacks[1] != null)
+ {
+ float var1 = this.ambRotationSpeed * (float) this.enchanterItemStacks[1].stackSize * 0.5F;
+ this.ambRotation += var1;
+ double var2;
+
+ if (this.enchanterItemStacks[1].stackSize < 4)
+ {
+ var2 = 0.2D * (double) this.enchanterItemStacks[1].stackSize * 0.5D;
+ } else
+ {
+ var2 = 0.35D;
+ }
+
+ this.ambSpinningSpeed = var2;
+ } else
+ {
+ this.ambRotation = 0.0F;
+ this.ambSpinningSpeed = 0.0D;
+ }
+
+ ItemStack var7;
+
+ if (this.currentEnchantment != null)
+ {
+ var7 = this.getStackInSlot(0);
+ ItemStack var6 = this.getStackInSlot(1);
+
+ if (this.canEnchant() && var6 != null && var6.stackSize >= this.currentEnchantment.enchantAmbrosiumNeeded && var7 != null)
+ {
+ Aether.proxy.spawnAltarParticles(this.worldObj, this.xCoord, this.yCoord, this.zCoord, this.rand);
+
+ if (!this.worldObj.isRemote)
+ {
+ ItemStack var3 = this.currentEnchantment.enchantTo.copy();
+ var3.stackSize = var7.stackSize;
+ EntityItem var4 = new EntityItem(this.worldObj, (double) ((float) this.xCoord + 0.5F), (double) ((float) this.yCoord + 1.0F), (double) ((float) this.zCoord + 0.5F), var3);
+ var4.delayBeforeCanPickup = 10;
+ this.worldObj.spawnEntityInWorld(var4);
+ }
+
+ this.decrStackSize(0, var7.stackSize);
+ this.decrStackSize(1, this.currentEnchantment.enchantAmbrosiumNeeded);
+ this.currentEnchantment = null;
+ }
+ } else
+ {
+ var7 = this.getStackInSlot(0);
+
+ for (int var5 = 0; var5 < enchantments.size(); ++var5)
+ {
+ if (var7 != null && enchantments.get(var5) != null && var7.itemID == ((AetherEnchantment) enchantments.get(var5)).enchantFrom.itemID && var7.getItemDamage() == ((AetherEnchantment) enchantments.get(var5)).enchantFrom.getItemDamage())
+ {
+ if (this.enchanterItemStacks[2] == null)
+ {
+ this.currentEnchantment = (AetherEnchantment) enchantments.get(var5);
+ } else if (this.enchanterItemStacks[2].itemID == ((AetherEnchantment) enchantments.get(var5)).enchantTo.itemID && ((AetherEnchantment) enchantments.get(var5)).enchantTo.getItem().getItemStackLimit() > this.enchanterItemStacks[2].stackSize)
+ {
+ this.currentEnchantment = (AetherEnchantment) enchantments.get(var5);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Do not make give this method the name canInteractWith because it clashes with Container
+ */
+ public boolean isUseableByPlayer(EntityPlayer var1)
+ {
+ return this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : var1.getDistanceSq((double) this.xCoord + 0.5D, (double) this.yCoord + 0.5D, (double) this.zCoord + 0.5D) <= 64.0D;
+ }
+
+ public static void addEnchantment(ItemStack var0, ItemStack var1, int var2)
+ {
+ enchantments.add(new AetherEnchantment(var0, var1, var2));
+ }
+
+ public static void addEnchantment(ItemStack var0, ItemStack var1, int var2, boolean var3)
+ {
+ enchantments.add(new AetherEnchantment(var0, var1, var2, var3));
+ }
+
+ public boolean isEnchantable(ItemStack var1)
+ {
+ for (int var2 = 0; var2 < enchantments.size(); ++var2)
+ {
+ if (var1 != null && enchantments.get(var2) != null && var1.itemID == ((AetherEnchantment) enchantments.get(var2)).enchantFrom.itemID && var1.getItemDamage() == ((AetherEnchantment) enchantments.get(var2)).enchantFrom.getItemDamage())
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public boolean isLimitedToOne(ItemStack var1)
+ {
+ for (int var2 = 0; var2 < enchantments.size(); ++var2)
+ {
+ if (var1 != null && enchantments.get(var2) != null && var1.itemID == ((AetherEnchantment) enchantments.get(var2)).enchantFrom.itemID && var1.getItemDamage() == ((AetherEnchantment) enchantments.get(var2)).enchantFrom.getItemDamage() && ((AetherEnchantment) enchantments.get(var2)).limitStackToOne)
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public int getStartInventorySide(ForgeDirection var1)
+ {
+ return var1 == ForgeDirection.DOWN ? 1 : (var1 == ForgeDirection.UP ? 0 : 2);
+ }
+
+ public int getSizeInventorySide(ForgeDirection var1)
+ {
+ return 1;
+ }
+
+ public void openChest() {}
+
+ public void closeChest() {}
+
+ public void onDataPacket(INetworkManager var1, Packet132TileEntityData var2)
+ {
+ this.readFromNBT(var2.customParam1);
+ }
+
+ /**
+ * Overriden in a sign to provide the text.
+ */
+ public Packet getDescriptionPacket()
+ {
+ NBTTagCompound var1 = new NBTTagCompound();
+ this.writeToNBT(var1);
+ return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 1, var1);
+ }
+
+ private void sendToAllInOurWorld(Packet var1)
+ {
+ ServerConfigurationManager var2 = FMLCommonHandler.instance().getMinecraftServerInstance().getConfigurationManager();
+ Iterator var3 = var2.playerEntityList.iterator();
+
+ while (var3.hasNext())
+ {
+ Object var4 = var3.next();
+ EntityPlayerMP var5 = (EntityPlayerMP) var4;
+
+ if (var5.worldObj == this.worldObj)
+ {
+ var5.playerNetServerHandler.sendPacketToPlayer(var1);
+ }
+ }
+ }
+
+ public ItemStack getEnchanterStacks(int var1)
+ {
+ return this.enchanterItemStacks[var1];
+ }
+
+ public float getAmbRotation()
+ {
+ return this.ambRotation;
+ }
+
+ public double getItemFloating()
+ {
+ return this.worldObj.isRemote && FMLClientHandler.instance().getClient().isGamePaused ? 0.0D : this.itemFloatingSpeed;
+ }
+
+ public double getAmbSpinning()
+ {
+ return this.worldObj.isRemote && FMLClientHandler.instance().getClient().isGamePaused ? 0.0D : this.ambSpinningSpeed;
+ }
+
+ /**
+ * If this returns false, the inventory name will be used as an unlocalized name, and translated into the player's
+ * language. Otherwise it will be used directly.
+ */
+ public boolean isInvNameLocalized()
+ {
+ return false;
+ }
+
+ /**
+ * Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot.
+ */
+ public boolean isStackValidForSlot(int var1, ItemStack var2)
+ {
+ return false;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/tile_entities/TileEntityAltarRenderer.java b/src/main/java/net/aetherteam/aether/tile_entities/TileEntityAltarRenderer.java
new file mode 100644
index 0000000..43adb4a
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/tile_entities/TileEntityAltarRenderer.java
@@ -0,0 +1,161 @@
+package net.aetherteam.aether.tile_entities;
+
+import net.aetherteam.aether.client.models.ModelAltar1;
+import net.aetherteam.aether.client.models.ModelAltar2;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.entity.RenderManager;
+import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
+import net.minecraft.item.Item;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.Icon;
+import org.lwjgl.opengl.GL11;
+import org.lwjgl.opengl.GL12;
+
+public class TileEntityAltarRenderer extends TileEntitySpecialRenderer
+{
+ private ModelAltar1 altarModel1 = new ModelAltar1();
+ private ModelAltar2 altarModel2 = new ModelAltar2();
+ private double radius = 1.5D;
+ private double theta = 5.0D;
+ private double alpha = 0.0D;
+ private double alphaFloat = 0.0D;
+ private double angle = 10.0D;
+
+ public void renderTileEntityAt(TileEntity var1, double var2, double var4, double var6, float var8)
+ {
+ this.renderTileEntityAltarAt((TileEntityAltar) var1, var2, var4, var6, var8);
+ }
+
+ public void renderTileEntityAltarAt(TileEntityAltar var1, double var2, double var4, double var6, float var8)
+ {
+ GL11.glPushMatrix();
+ GL11.glEnable(GL12.GL_RESCALE_NORMAL);
+ ModelAltar1 var9 = this.altarModel1;
+ ModelAltar2 var10 = this.altarModel2;
+ this.bindTextureByName("/net/aetherteam/aether/client/sprites/tile_entities/Altar.png");
+ GL11.glTranslatef((float) var2 + 0.5F, (float) var4 + 1.5F, (float) var6 + 0.5F);
+ GL11.glRotatef(180.0F, 1.0F, 0.0F, 1.0F);
+ int var11 = 2;
+
+ if (var1.worldObj != null)
+ {
+ var11 = var1.getBlockMetadata();
+ }
+
+ if (var11 != 2)
+ {
+ if (var11 == 3)
+ {
+ GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
+ } else if (var11 == 4)
+ {
+ GL11.glRotatef(270.0F, 0.0F, 1.0F, 0.0F);
+ } else if (var11 == 5)
+ {
+ GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
+ }
+ }
+
+ var9.AmbrosiumBottomLeft.rotateAngleY = var1.getAmbRotation();
+ var9.AmbrosiumBottomRight.rotateAngleY = var1.getAmbRotation();
+ var9.AmbrosiumTopLeft.rotateAngleY = var1.getAmbRotation();
+ var9.AmbrosiumTopRight.rotateAngleY = var1.getAmbRotation();
+ var9.renderAll(0.0625F);
+ GL11.glPopMatrix();
+ Item var12;
+
+ if (var1.getEnchanterStacks(0) != null)
+ {
+ var12 = var1.getEnchanterStacks(0).getItem();
+ var12.getIconFromDamage(var1.getEnchanterStacks(0).getItemDamage());
+ GL11.glPushMatrix();
+ GL11.glEnable(GL12.GL_RESCALE_NORMAL);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glTranslatef((float) var2 + 0.5F, (float) var4 + 1.2F, (float) var6 + 0.5F);
+ GL11.glScalef(0.5F, 0.5F, 0.5F);
+ GL11.glDisable(GL12.GL_RESCALE_NORMAL);
+ GL11.glPopMatrix();
+ }
+
+ if (var1.getEnchanterStacks(1) != null)
+ {
+ var12 = var1.getEnchanterStacks(1).getItem();
+ Icon var13 = var12.getIconFromDamage(var1.getEnchanterStacks(1).getItemDamage());
+
+ if (var12.getSpriteNumber() > 0)
+ {
+ this.bindTextureByName("/gui/items.png");
+ } else
+ {
+ this.bindTextureByName("/terrain.png");
+ }
+
+ int var14 = var1.getEnchanterStacks(1).stackSize;
+ GL11.glPushMatrix();
+ GL11.glEnable(GL12.GL_RESCALE_NORMAL);
+ GL11.glTranslatef((float) var2 + 0.5F, (float) var4 + 1.25F, (float) var6 + 0.5F);
+ GL11.glScalef(0.2F, 0.2F, 0.2F);
+ this.renderOrbitItem(var13, var14, var1.getAmbSpinning());
+ GL11.glDisable(GL12.GL_RESCALE_NORMAL);
+ GL11.glPopMatrix();
+ }
+ }
+
+ private void renderItem(Icon var1, int var2, double var3)
+ {
+ Tessellator var5 = Tessellator.instance;
+ float var6 = var1.getMinU();
+ float var7 = var1.getMaxU();
+ float var8 = var1.getMinV();
+ float var9 = var1.getMaxV();
+ float var10 = 1.0F;
+ float var11 = 0.5F;
+ float var12 = 0.25F;
+ double var13 = 0.35D * Math.cos(this.theta);
+ double var15 = var13 * Math.cos(this.alphaFloat) - var13 * Math.sin(this.alphaFloat);
+ this.alphaFloat += var3;
+ GL11.glTranslatef(0.0F, (float) var15, 0.0F);
+ GL11.glRotatef(180.0F - RenderManager.instance.playerViewY, 0.0F, 1.0F, 0.0F);
+ var5.startDrawingQuads();
+ var5.setNormal(0.0F, 1.0F, 0.0F);
+ var5.addVertexWithUV((double) (0.0F - var11), (double) (0.0F - var12), 0.0D, (double) var6, (double) var9);
+ var5.addVertexWithUV((double) (var10 - var11), (double) (0.0F - var12), 0.0D, (double) var7, (double) var9);
+ var5.addVertexWithUV((double) (var10 - var11), (double) (1.0F - var12), 0.0D, (double) var7, (double) var8);
+ var5.addVertexWithUV((double) (0.0F - var11), (double) (1.0F - var12), 0.0D, (double) var6, (double) var8);
+ var5.draw();
+ }
+
+ private void renderOrbitItem(Icon var1, int var2, double var3)
+ {
+ for (int var5 = 0; var5 < var2; ++var5)
+ {
+ GL11.glPushMatrix();
+ Tessellator var6 = Tessellator.instance;
+ float var7 = var1.getMinU();
+ float var8 = var1.getMaxU();
+ float var9 = var1.getMinV();
+ float var10 = var1.getMaxV();
+ float var11 = 1.0F;
+ float var12 = 0.5F;
+ float var13 = 0.25F;
+ double var14 = Math.PI * (double) var5 / (double) var2 * 2.0D;
+ double var16 = this.radius * Math.cos(this.theta + var14);
+ double var18 = 0.0D;
+ double var20 = this.radius * Math.sin(this.theta + var14);
+ double var22 = var20 * Math.cos(this.alpha) - var16 * Math.sin(this.alpha);
+ double var24 = var16 * Math.cos(this.alpha) + var20 * Math.sin(this.alpha);
+ GL11.glTranslatef((float) var22, (float) var18, (float) var24);
+ this.alpha += var3 / 100.0D;
+ this.angle += 0.004999999888241291D;
+ GL11.glRotatef(180.0F + RenderManager.instance.playerViewY, 0.0F, -1.0F, 0.0F);
+ var6.startDrawingQuads();
+ var6.setNormal(0.0F, 1.0F, 0.0F);
+ var6.addVertexWithUV((double) (0.0F - var12), (double) (0.0F - var13), 0.0D, (double) var7, (double) var10);
+ var6.addVertexWithUV((double) (var11 - var12), (double) (0.0F - var13), 0.0D, (double) var8, (double) var10);
+ var6.addVertexWithUV((double) (var11 - var12), (double) (1.0F - var13), 0.0D, (double) var8, (double) var9);
+ var6.addVertexWithUV((double) (0.0F - var12), (double) (1.0F - var13), 0.0D, (double) var7, (double) var9);
+ var6.draw();
+ GL11.glPopMatrix();
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/tile_entities/TileEntityBronzeDoorController.java b/src/main/java/net/aetherteam/aether/tile_entities/TileEntityBronzeDoorController.java
new file mode 100644
index 0000000..4246d17
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/tile_entities/TileEntityBronzeDoorController.java
@@ -0,0 +1,286 @@
+package net.aetherteam.aether.tile_entities;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.network.PacketDispatcher;
+import cpw.mods.fml.relauncher.Side;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Random;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.dungeons.keys.DungeonKey;
+import net.aetherteam.aether.dungeons.keys.EnumKeyType;
+import net.aetherteam.aether.packets.AetherPacketHandler;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.network.INetworkManager;
+import net.minecraft.network.packet.Packet;
+import net.minecraft.network.packet.Packet132TileEntityData;
+import net.minecraft.server.MinecraftServer;
+import net.minecraft.server.management.ServerConfigurationManager;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.MathHelper;
+
+public class TileEntityBronzeDoorController extends TileEntity
+{
+ private Random rand = new Random();
+ public static int keysRequired = 5;
+ public int chatTime;
+ public ArrayList keyList = new ArrayList();
+ private int dungeonID = -1;
+
+ public void setDungeonID(int var1)
+ {
+ this.dungeonID = var1;
+ }
+
+ public Dungeon getDungeon()
+ {
+ return DungeonHandler.instance().getDungeon(this.dungeonID);
+ }
+
+ public boolean hasDungeon()
+ {
+ return this.dungeonID != -1;
+ }
+
+ public void chatItUp(EntityPlayer var1, String var2)
+ {
+ if (this.chatTime <= 0)
+ {
+ Aether.proxy.displayMessage(var1, var2);
+ this.chatTime = 100;
+ }
+ }
+
+ /**
+ * Reads a tile entity from NBT.
+ */
+ public void readFromNBT(NBTTagCompound var1)
+ {
+ super.readFromNBT(var1);
+
+ for (int var2 = 0; var2 < var1.getInteger("KeyAmount"); ++var2)
+ {
+ this.keyList.add(new DungeonKey(EnumKeyType.getTypeFromString(var1.getString("Key" + var2))));
+ }
+
+ this.dungeonID = var1.getInteger("dungeonId");
+ }
+
+ /**
+ * Writes a tile entity to NBT.
+ */
+ public void writeToNBT(NBTTagCompound var1)
+ {
+ super.writeToNBT(var1);
+ var1.setInteger("KeyAmount", this.keyList.size());
+
+ for (int var2 = 0; var2 < this.keyList.size(); ++var2)
+ {
+ var1.setString("Key" + var2, ((DungeonKey) this.keyList.get(var2)).getType().name());
+ }
+
+ var1.setInteger("dungeonId", this.dungeonID);
+ }
+
+ public void addKey(DungeonKey var1)
+ {
+ if (var1 != null && (this.keyList != null || this.keyList.size() < keysRequired))
+ {
+ this.keyList.add(var1);
+ this.onInventoryChanged();
+
+ if (this.getDungeon() != null)
+ {
+ DungeonHandler.instance().removeKey(this.getDungeon(), this.getDungeon().getQueuedParty(), var1);
+ }
+
+ if (!this.worldObj.isRemote)
+ {
+ this.sendToAllInOurWorld(this.getDescriptionPacket());
+ }
+ }
+ }
+
+ public void addKeys(ArrayList var1)
+ {
+ if (var1 != null && var1.size() > 0 && (this.keyList != null || this.keyList.size() < keysRequired))
+ {
+ Iterator var2 = var1.iterator();
+
+ while (var2.hasNext())
+ {
+ Object var3 = var2.next();
+
+ if (this.keyList.size() < keysRequired && var3 instanceof DungeonKey)
+ {
+ DungeonKey var4 = (DungeonKey) var3;
+ this.keyList.add(var4);
+ }
+ }
+
+ Side var5 = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (this.getDungeon() != null)
+ {
+ for (int var6 = 0; var6 < var1.size(); ++var6)
+ {
+ PacketDispatcher.sendPacketToAllPlayers(AetherPacketHandler.removeDungeonKey(this.getDungeon(), this.getDungeon().getQueuedParty(), ((DungeonKey) var1.get(var6)).getType(), this));
+ }
+
+ this.getDungeon().getKeys().clear();
+ }
+
+ this.onInventoryChanged();
+
+ if (!this.worldObj.isRemote)
+ {
+ this.sendToAllInOurWorld(this.getDescriptionPacket());
+ }
+ }
+ }
+
+ /**
+ * Allows the entity to update its state. Overridden in most subclasses, e.g. the mob spawner uses this to count
+ * ticks and creates a new spawn inside its implementation.
+ */
+ public void updateEntity()
+ {
+ Side var1 = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (this.keyList != null && this.keyList.size() >= keysRequired && var1.isServer())
+ {
+ this.unlockDoor();
+ }
+
+ if (this.chatTime > 0)
+ {
+ --this.chatTime;
+ }
+
+ if (this.dungeonID == -1 && var1.isServer())
+ {
+ Dungeon var2 = DungeonHandler.instance().getInstanceAt(MathHelper.floor_double((double) this.xCoord), MathHelper.floor_double((double) this.yCoord), MathHelper.floor_double((double) this.zCoord));
+
+ if (var2 != null)
+ {
+ this.dungeonID = var2.getID();
+
+ if (!this.worldObj.isRemote)
+ {
+ this.sendToAllInOurWorld(this.getDescriptionPacket());
+ }
+ }
+ }
+ }
+
+ public void teleportMembersFromParty(ArrayList var1)
+ {
+ Side var2 = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (var2.isServer())
+ {
+ MinecraftServer var3 = FMLCommonHandler.instance().getMinecraftServerInstance();
+ ServerConfigurationManager var4 = var3.getConfigurationManager();
+
+ for (int var5 = 0; var5 < var4.playerEntityList.size(); ++var5)
+ {
+ Object var6 = var4.playerEntityList.get(var5);
+ Iterator var7 = var1.iterator();
+
+ while (var7.hasNext())
+ {
+ PartyMember var8 = (PartyMember) var7.next();
+
+ if (var6 instanceof EntityPlayerMP && ((EntityPlayerMP) var6).username.equalsIgnoreCase(var8.username))
+ {
+ ((EntityPlayerMP) var6).setPositionAndUpdate((double) ((float) ((double) this.xCoord + 0.5D)), (double) ((float) ((double) this.yCoord + 1.0D)), (double) ((float) ((double) this.zCoord + 0.5D)));
+ }
+ }
+ }
+ }
+
+ this.worldObj.playSoundEffect((double) this.xCoord, (double) this.yCoord, (double) this.zCoord, "aeboss.slider.awake", 1.0F, 1.0F / (this.rand.nextFloat() * 0.2F + 0.9F));
+ this.worldObj.playSoundEffect((double) this.xCoord, (double) this.yCoord, (double) this.zCoord, "aeboss.slider.unlock", 1.0F, 1.0F / (this.rand.nextFloat() * 0.2F + 0.9F));
+ }
+
+ public void unlockDoor()
+ {
+ Side var1 = FMLCommonHandler.instance().getEffectiveSide();
+
+ for (int var2 = this.xCoord - 6; var2 < this.xCoord + 6; ++var2)
+ {
+ for (int var3 = this.yCoord - 6; var3 < this.yCoord + 6; ++var3)
+ {
+ for (int var4 = this.zCoord - 6; var4 < this.zCoord + 6; ++var4)
+ {
+ if (this.worldObj.getBlockId(var2, var3, var4) == AetherBlocks.BronzeDoor.blockID && var1.isServer())
+ {
+ this.worldObj.setBlockToAir(var2, var3, var4);
+ }
+ }
+ }
+ }
+
+ this.worldObj.playSoundEffect((double) this.xCoord, (double) this.yCoord, (double) this.zCoord, "aeboss.slider.awake", 2.5F, 1.0F / (this.rand.nextFloat() * 0.2F + 0.9F));
+ this.worldObj.playSoundEffect((double) this.xCoord, (double) this.yCoord, (double) this.zCoord, "aeboss.slider.unlock", 2.5F, 1.0F / (this.rand.nextFloat() * 0.2F + 0.9F));
+
+ if (var1.isServer())
+ {
+ this.worldObj.setBlock(this.xCoord, this.yCoord, this.zCoord, AetherBlocks.LockedDungeonStone.blockID);
+ }
+ }
+
+ public boolean isUseableByPlayer(EntityPlayer var1)
+ {
+ return this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : var1.getDistanceSq((double) this.xCoord + 0.5D, (double) this.yCoord + 0.5D, (double) this.zCoord + 0.5D) <= 64.0D;
+ }
+
+ public void openChest() {}
+
+ public void closeChest() {}
+
+ public int getKeyAmount()
+ {
+ return this.keyList.size();
+ }
+
+ public void onDataPacket(INetworkManager var1, Packet132TileEntityData var2)
+ {
+ this.readFromNBT(var2.customParam1);
+ }
+
+ /**
+ * Overriden in a sign to provide the text.
+ */
+ public Packet getDescriptionPacket()
+ {
+ NBTTagCompound var1 = new NBTTagCompound();
+ this.writeToNBT(var1);
+ return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 1, var1);
+ }
+
+ private void sendToAllInOurWorld(Packet var1)
+ {
+ ServerConfigurationManager var2 = FMLCommonHandler.instance().getMinecraftServerInstance().getConfigurationManager();
+ Iterator var3 = var2.playerEntityList.iterator();
+
+ while (var3.hasNext())
+ {
+ Object var4 = var3.next();
+ EntityPlayerMP var5 = (EntityPlayerMP) var4;
+
+ if (var5.worldObj == this.worldObj)
+ {
+ var5.playerNetServerHandler.sendPacketToPlayer(var1);
+ }
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/tile_entities/TileEntityBronzeSpawner.java b/src/main/java/net/aetherteam/aether/tile_entities/TileEntityBronzeSpawner.java
new file mode 100644
index 0000000..3a4af77
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/tile_entities/TileEntityBronzeSpawner.java
@@ -0,0 +1,14 @@
+package net.aetherteam.aether.tile_entities;
+
+import net.minecraft.tileentity.MobSpawnerBaseLogic;
+import net.minecraft.tileentity.TileEntityMobSpawner;
+
+public class TileEntityBronzeSpawner extends TileEntityMobSpawner
+{
+ private final MobSpawnerBaseLogic field_98050_a = new BronzeSpawnerBaseLogic(this);
+
+ public TileEntityBronzeSpawner()
+ {
+ this.func_98049_a().setMobID("Aerbunny");
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/tile_entities/TileEntityEnchanter.java b/src/main/java/net/aetherteam/aether/tile_entities/TileEntityEnchanter.java
new file mode 100644
index 0000000..c1dac12
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/tile_entities/TileEntityEnchanter.java
@@ -0,0 +1,576 @@
+package net.aetherteam.aether.tile_entities;
+
+import cpw.mods.fml.client.FMLClientHandler;
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.AetherEnchantment;
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.inventory.IInventory;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.NBTTagList;
+import net.minecraft.network.INetworkManager;
+import net.minecraft.network.packet.Packet;
+import net.minecraft.network.packet.Packet132TileEntityData;
+import net.minecraft.server.management.ServerConfigurationManager;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraftforge.common.ForgeDirection;
+import net.minecraftforge.common.ISidedInventory;
+
+public class TileEntityEnchanter extends TileEntity implements IInventory, ISidedInventory
+{
+ private static List enchantments = new ArrayList();
+ private Random rand = new Random();
+ private ItemStack[] enchanterItemStacks = new ItemStack[3];
+ public ItemStack enchantableItem;
+ public ItemStack ambrosiumItems;
+ public int enchantProgress = 0;
+ public int enchantPowerRemaining = 0;
+ public int enchantTimeForItem = 0;
+ private float ambRotationSpeed = 0.05F;
+ private float ambRotation = 0.0F;
+ private double ambSpinningSpeed = 0.0D;
+ private double itemFloatingSpeed = 0.0D;
+ private AetherEnchantment currentEnchantment;
+
+ /**
+ * Returns the number of slots in the inventory.
+ */
+ public int getSizeInventory()
+ {
+ return this.enchanterItemStacks.length;
+ }
+
+ /**
+ * Returns the stack in slot i
+ */
+ public ItemStack getStackInSlot(int var1)
+ {
+ return this.enchanterItemStacks[var1];
+ }
+
+ /**
+ * Removes from an inventory slot (first arg) up to a specified number (second arg) of items and returns them in a
+ * new stack.
+ */
+ public ItemStack decrStackSize(int var1, int var2)
+ {
+ if (this.enchanterItemStacks[var1] != null)
+ {
+ ItemStack var3;
+
+ if (this.enchanterItemStacks[var1].stackSize <= var2)
+ {
+ var3 = this.enchanterItemStacks[var1];
+ this.enchanterItemStacks[var1] = null;
+
+ if (!this.worldObj.isRemote)
+ {
+ this.sendToAllInOurWorld(this.getDescriptionPacket());
+ }
+
+ return var3;
+ } else
+ {
+ var3 = this.enchanterItemStacks[var1].splitStack(var2);
+
+ if (this.enchanterItemStacks[var1].stackSize == 0)
+ {
+ this.enchanterItemStacks[var1] = null;
+ }
+
+ if (!this.worldObj.isRemote)
+ {
+ this.sendToAllInOurWorld(this.getDescriptionPacket());
+ }
+
+ return var3;
+ }
+ } else
+ {
+ return null;
+ }
+ }
+
+ /**
+ * When some containers are closed they call this on each slot, then drop whatever it returns as an EntityItem -
+ * like when you close a workbench GUI.
+ */
+ public ItemStack getStackInSlotOnClosing(int var1)
+ {
+ if (this.enchanterItemStacks[var1] != null)
+ {
+ ItemStack var2 = this.enchanterItemStacks[var1];
+ this.enchanterItemStacks[var1] = null;
+ return var2;
+ } else
+ {
+ return null;
+ }
+ }
+
+ /**
+ * Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).
+ */
+ public void setInventorySlotContents(int var1, ItemStack var2)
+ {
+ this.enchanterItemStacks[var1] = var2;
+
+ if (var2 != null && var2.stackSize > this.getInventoryStackLimit())
+ {
+ var2.stackSize = this.getInventoryStackLimit();
+ }
+
+ if (!this.worldObj.isRemote)
+ {
+ this.sendToAllInOurWorld(this.getDescriptionPacket());
+ }
+ }
+
+ /**
+ * Returns the name of the inventory.
+ */
+ public String getInvName()
+ {
+ return "Enchanter";
+ }
+
+ /**
+ * Reads a tile entity from NBT.
+ */
+ public void readFromNBT(NBTTagCompound var1)
+ {
+ super.readFromNBT(var1);
+ NBTTagList var2 = var1.getTagList("Items");
+ this.enchanterItemStacks = new ItemStack[this.getSizeInventory()];
+
+ for (int var3 = 0; var3 < var2.tagCount(); ++var3)
+ {
+ NBTTagCompound var4 = (NBTTagCompound) var2.tagAt(var3);
+ byte var5 = var4.getByte("Slot");
+
+ if (var5 >= 0 && var5 < this.enchanterItemStacks.length)
+ {
+ this.enchanterItemStacks[var5] = ItemStack.loadItemStackFromNBT(var4);
+ }
+ }
+
+ this.enchantProgress = var1.getShort("BurnTime");
+ this.enchantTimeForItem = var1.getShort("CookTime");
+ }
+
+ /**
+ * Writes a tile entity to NBT.
+ */
+ public void writeToNBT(NBTTagCompound var1)
+ {
+ super.writeToNBT(var1);
+ var1.setShort("BurnTime", (short) this.enchantProgress);
+ var1.setShort("CookTime", (short) this.enchantTimeForItem);
+ NBTTagList var2 = new NBTTagList();
+
+ for (int var3 = 0; var3 < this.enchanterItemStacks.length; ++var3)
+ {
+ if (this.enchanterItemStacks[var3] != null)
+ {
+ NBTTagCompound var4 = new NBTTagCompound();
+ var4.setByte("Slot", (byte) var3);
+ this.enchanterItemStacks[var3].writeToNBT(var4);
+ var2.appendTag(var4);
+ }
+ }
+
+ var1.setTag("Items", var2);
+ }
+
+ /**
+ * Returns the maximum stack size for a inventory slot. Seems to always be 64, possibly will be extended. *Isn't
+ * this more of a set than a get?*
+ */
+ public int getInventoryStackLimit()
+ {
+ return 16;
+ }
+
+ public void addEnchantable(ItemStack var1)
+ {
+ if (var1 != null && this.isEnchantable(var1))
+ {
+ ItemStack var2 = this.getStackInSlot(0);
+ int var3 = this.getInventoryStackLimit();
+
+ if (this.isLimitedToOne(var1))
+ {
+ var3 = 1;
+ }
+
+ if (var2 == null)
+ {
+ if (var1.stackSize > var3)
+ {
+ var2 = new ItemStack(var1.itemID, var3, var1.getItemDamage());
+ var1.stackSize -= var3;
+ this.setInventorySlotContents(0, var2);
+ } else
+ {
+ var2 = new ItemStack(var1.itemID, var1.stackSize, var1.getItemDamage());
+ var1.stackSize = 0;
+ this.setInventorySlotContents(0, var2);
+ }
+ } else if (var2.itemID == var1.itemID && var2.getItemDamage() == var1.getItemDamage())
+ {
+ if (this.canCombineStackWithRemainder(var1, var2, var3))
+ {
+ this.combineStackWithRemainder(var1, var2, var3);
+ } else if (this.stackIsFull(var2, var3))
+ {
+ if (this.worldObj.isRemote)
+ {
+ FMLClientHandler.instance().getClient().ingameGUI.getChatGUI().printChatMessage("Altar is at full capacity.");
+ }
+ } else
+ {
+ var2.stackSize += var1.stackSize;
+ var1.stackSize = 0;
+ }
+ }
+
+ this.onInventoryChanged();
+
+ if (!this.worldObj.isRemote)
+ {
+ this.sendToAllInOurWorld(this.getDescriptionPacket());
+ }
+ }
+ }
+
+ public boolean canEnchant()
+ {
+ return this.worldObj.getBlockId(this.xCoord, this.yCoord + 1, this.zCoord) == 0;
+ }
+
+ public int getRemainingStackSize(ItemStack var1, ItemStack var2, int var3)
+ {
+ if (this.canCombineStackWithRemainder(var1, var2, var3))
+ {
+ int var4 = var2.stackSize + var1.stackSize - var3;
+ return var4;
+ } else
+ {
+ return 0;
+ }
+ }
+
+ public boolean canCombineStackWithRemainder(ItemStack var1, ItemStack var2, int var3)
+ {
+ return var1.itemID == var2.itemID && var1.getItemDamage() == var2.getItemDamage() ? (this.stackIsFull(var2, var3) ? false : var2.stackSize + var1.stackSize > var3) : false;
+ }
+
+ public boolean stackIsFull(ItemStack var1, int var2)
+ {
+ return var1.stackSize == var2;
+ }
+
+ public void combineStackWithRemainder(ItemStack var1, ItemStack var2, int var3)
+ {
+ if (this.canCombineStackWithRemainder(var1, var2, var3))
+ {
+ int var4 = this.getRemainingStackSize(var1, var2, var3);
+ var1.stackSize = var4;
+ var2.stackSize = this.getInventoryStackLimit();
+ }
+ }
+
+ public void addAmbrosium(ItemStack var1)
+ {
+ if (var1 != null && var1.itemID == AetherItems.AmbrosiumShard.itemID)
+ {
+ ItemStack var2 = this.getStackInSlot(1);
+
+ if (var2.stackSize < this.getInventoryStackLimit())
+ {
+ if (var2 == null)
+ {
+ var2 = new ItemStack(AetherItems.AmbrosiumShard.itemID, 1, 0);
+ this.setInventorySlotContents(1, var2);
+ --var1.stackSize;
+ } else
+ {
+ ++var2.stackSize;
+ --var1.stackSize;
+ }
+
+ this.onInventoryChanged();
+
+ if (!this.worldObj.isRemote)
+ {
+ this.sendToAllInOurWorld(this.getDescriptionPacket());
+ }
+ }
+ }
+ }
+
+ public void dropNextStack()
+ {
+ EntityItem var1;
+
+ if (this.enchanterItemStacks[1] != null)
+ {
+ if (!this.worldObj.isRemote)
+ {
+ var1 = new EntityItem(this.worldObj, (double) ((float) this.xCoord + 0.5F), (double) ((float) this.yCoord + 1.0F), (double) ((float) this.zCoord + 0.5F), this.enchanterItemStacks[1]);
+ var1.delayBeforeCanPickup = 10;
+ this.worldObj.spawnEntityInWorld(var1);
+ }
+
+ this.decrStackSize(1, this.enchanterItemStacks[1].stackSize);
+ } else if (this.enchanterItemStacks[0] != null)
+ {
+ if (!this.worldObj.isRemote)
+ {
+ var1 = new EntityItem(this.worldObj, (double) ((float) this.xCoord + 0.5F), (double) ((float) this.yCoord + 1.0F), (double) ((float) this.zCoord + 0.5F), this.enchanterItemStacks[0]);
+ var1.delayBeforeCanPickup = 10;
+ this.worldObj.spawnEntityInWorld(var1);
+ }
+
+ this.decrStackSize(0, this.enchanterItemStacks[0].stackSize);
+ }
+ }
+
+ @SideOnly(Side.CLIENT)
+ public int getCookProgressScaled(int var1)
+ {
+ return this.enchantTimeForItem == 0 ? 0 : this.enchantProgress * var1 / this.enchantTimeForItem;
+ }
+
+ @SideOnly(Side.CLIENT)
+ public int getBurnTimeRemainingScaled(int var1)
+ {
+ return this.enchantPowerRemaining * var1 / 500;
+ }
+
+ public boolean isBurning()
+ {
+ return this.enchantPowerRemaining > 0;
+ }
+
+ /**
+ * Allows the entity to update its state. Overridden in most subclasses, e.g. the mob spawner uses this to count
+ * ticks and creates a new spawn inside its implementation.
+ */
+ public void updateEntity()
+ {
+ if (this.enchanterItemStacks[0] != null)
+ {
+ this.itemFloatingSpeed = 0.03D;
+ } else
+ {
+ this.itemFloatingSpeed = 0.0D;
+ }
+
+ if (this.enchanterItemStacks[1] != null)
+ {
+ float var1 = this.ambRotationSpeed * (float) this.enchanterItemStacks[1].stackSize * 0.5F;
+ this.ambRotation += var1;
+ double var2;
+
+ if (this.enchanterItemStacks[1].stackSize < 4)
+ {
+ var2 = 0.2D * (double) this.enchanterItemStacks[1].stackSize * 0.5D;
+ } else
+ {
+ var2 = 0.35D;
+ }
+
+ this.ambSpinningSpeed = var2;
+ } else
+ {
+ this.ambRotation = 0.0F;
+ this.ambSpinningSpeed = 0.0D;
+ }
+
+ ItemStack var6;
+
+ if (this.currentEnchantment == null)
+ {
+ var6 = this.getStackInSlot(0);
+
+ for (int var8 = 0; var8 < enchantments.size(); ++var8)
+ {
+ if (var6 != null && enchantments.get(var8) != null && var6.itemID == ((AetherEnchantment) enchantments.get(var8)).enchantFrom.itemID && var6.getItemDamage() == ((AetherEnchantment) enchantments.get(var8)).enchantFrom.getItemDamage())
+ {
+ if (this.enchanterItemStacks[2] == null)
+ {
+ this.currentEnchantment = (AetherEnchantment) enchantments.get(var8);
+ } else if (this.enchanterItemStacks[2].itemID == ((AetherEnchantment) enchantments.get(var8)).enchantTo.itemID && ((AetherEnchantment) enchantments.get(var8)).enchantTo.getItem().getItemStackLimit() > this.enchanterItemStacks[2].stackSize)
+ {
+ this.currentEnchantment = (AetherEnchantment) enchantments.get(var8);
+ }
+ }
+ }
+ }
+
+ if (this.currentEnchantment != null)
+ {
+ var6 = this.getStackInSlot(0);
+ ItemStack var7 = this.getStackInSlot(1);
+ boolean var3 = true;
+
+ if (this.canEnchant() && var7 != null && var7.stackSize >= this.currentEnchantment.enchantAmbrosiumNeeded && var6 != null)
+ {
+ Aether.proxy.spawnAltarParticles(this.worldObj, this.xCoord, this.yCoord, this.zCoord, this.rand);
+
+ if (!this.worldObj.isRemote)
+ {
+ ItemStack var4 = this.currentEnchantment.enchantTo.copy();
+ var4.stackSize = var6.stackSize;
+ EntityItem var5 = new EntityItem(this.worldObj, (double) ((float) this.xCoord + 0.5F), (double) ((float) this.yCoord + 1.0F), (double) ((float) this.zCoord + 0.5F), var4);
+ var5.delayBeforeCanPickup = 10;
+ this.worldObj.spawnEntityInWorld(var5);
+ }
+
+ this.decrStackSize(0, var6.stackSize);
+ this.decrStackSize(1, this.currentEnchantment.enchantAmbrosiumNeeded);
+ this.currentEnchantment = null;
+ }
+ }
+ }
+
+ /**
+ * Do not make give this method the name canInteractWith because it clashes with Container
+ */
+ public boolean isUseableByPlayer(EntityPlayer var1)
+ {
+ return this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : var1.getDistanceSq((double) this.xCoord + 0.5D, (double) this.yCoord + 0.5D, (double) this.zCoord + 0.5D) <= 64.0D;
+ }
+
+ public static void addEnchantment(ItemStack var0, ItemStack var1, int var2)
+ {
+ enchantments.add(new AetherEnchantment(var0, var1, var2));
+ }
+
+ public static void addEnchantment(ItemStack var0, ItemStack var1, int var2, boolean var3)
+ {
+ enchantments.add(new AetherEnchantment(var0, var1, var2, var3));
+ }
+
+ public boolean isEnchantable(ItemStack var1)
+ {
+ for (int var2 = 0; var2 < enchantments.size(); ++var2)
+ {
+ if (var1 != null && enchantments.get(var2) != null && var1.itemID == ((AetherEnchantment) enchantments.get(var2)).enchantFrom.itemID && var1.getItemDamage() == ((AetherEnchantment) enchantments.get(var2)).enchantFrom.getItemDamage())
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public boolean isLimitedToOne(ItemStack var1)
+ {
+ for (int var2 = 0; var2 < enchantments.size(); ++var2)
+ {
+ if (var1 != null && enchantments.get(var2) != null && var1.itemID == ((AetherEnchantment) enchantments.get(var2)).enchantFrom.itemID && var1.getItemDamage() == ((AetherEnchantment) enchantments.get(var2)).enchantFrom.getItemDamage() && ((AetherEnchantment) enchantments.get(var2)).limitStackToOne)
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public int getStartInventorySide(ForgeDirection var1)
+ {
+ return var1 == ForgeDirection.DOWN ? 1 : (var1 == ForgeDirection.UP ? 0 : 2);
+ }
+
+ public int getSizeInventorySide(ForgeDirection var1)
+ {
+ return 1;
+ }
+
+ public void openChest() {}
+
+ public void closeChest() {}
+
+ public void onDataPacket(INetworkManager var1, Packet132TileEntityData var2)
+ {
+ this.readFromNBT(var2.customParam1);
+ }
+
+ /**
+ * Overriden in a sign to provide the text.
+ */
+ public Packet getDescriptionPacket()
+ {
+ NBTTagCompound var1 = new NBTTagCompound();
+ this.writeToNBT(var1);
+ return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 1, var1);
+ }
+
+ private void sendToAllInOurWorld(Packet var1)
+ {
+ ServerConfigurationManager var2 = FMLCommonHandler.instance().getMinecraftServerInstance().getConfigurationManager();
+ Iterator var3 = var2.playerEntityList.iterator();
+
+ while (var3.hasNext())
+ {
+ Object var4 = var3.next();
+ EntityPlayerMP var5 = (EntityPlayerMP) var4;
+
+ if (var5.worldObj == this.worldObj)
+ {
+ var5.playerNetServerHandler.sendPacketToPlayer(var1);
+ }
+ }
+ }
+
+ public ItemStack getEnchanterStacks(int var1)
+ {
+ return this.enchanterItemStacks[var1];
+ }
+
+ public float getAmbRotation()
+ {
+ return this.ambRotation;
+ }
+
+ public double getItemFloating()
+ {
+ return this.worldObj.isRemote && FMLClientHandler.instance().getClient().isGamePaused ? 0.0D : this.itemFloatingSpeed;
+ }
+
+ public double getAmbSpinning()
+ {
+ return this.worldObj.isRemote && FMLClientHandler.instance().getClient().isGamePaused ? 0.0D : this.ambSpinningSpeed;
+ }
+
+ /**
+ * If this returns false, the inventory name will be used as an unlocalized name, and translated into the player's
+ * language. Otherwise it will be used directly.
+ */
+ public boolean isInvNameLocalized()
+ {
+ return false;
+ }
+
+ /**
+ * Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot.
+ */
+ public boolean isStackValidForSlot(int var1, ItemStack var2)
+ {
+ return false;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/tile_entities/TileEntityEntranceController.java b/src/main/java/net/aetherteam/aether/tile_entities/TileEntityEntranceController.java
new file mode 100644
index 0000000..ffade94
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/tile_entities/TileEntityEntranceController.java
@@ -0,0 +1,233 @@
+package net.aetherteam.aether.tile_entities;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.relauncher.Side;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Random;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.client.audio.SoundManager;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.network.INetworkManager;
+import net.minecraft.network.packet.Packet;
+import net.minecraft.network.packet.Packet132TileEntityData;
+import net.minecraft.server.MinecraftServer;
+import net.minecraft.server.management.ServerConfigurationManager;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.MathHelper;
+
+public class TileEntityEntranceController extends TileEntity
+{
+ private Random rand = new Random();
+ public int chatTime;
+ private int dungeonID = -1;
+
+ public void chatItUp(EntityPlayer var1, String var2)
+ {
+ if (this.chatTime <= 0)
+ {
+ Aether.proxy.displayMessage(var1, var2);
+ this.chatTime = 100;
+ }
+ }
+
+ public void setDungeonID(int var1)
+ {
+ this.dungeonID = var1;
+ }
+
+ public Dungeon getDungeon()
+ {
+ return DungeonHandler.instance().getDungeon(this.dungeonID);
+ }
+
+ public boolean isSoundOn()
+ {
+ boolean var1;
+
+ if (this.isClient() && Aether.proxy.getClient().sndManager != null)
+ {
+ SoundManager var10000 = Aether.proxy.getClient().sndManager;
+
+ if (SoundManager.sndSystem != null)
+ {
+ var1 = true;
+ return var1;
+ }
+ }
+
+ var1 = false;
+ return var1;
+ }
+
+ public boolean isClient()
+ {
+ return Aether.proxy.getClient() != null;
+ }
+
+ public boolean isMusicPlaying()
+ {
+ SoundManager var10000 = Aether.proxy.getClient().sndManager;
+ boolean var1;
+
+ if (SoundManager.sndSystem != null)
+ {
+ var10000 = Aether.proxy.getClient().sndManager;
+
+ if (SoundManager.sndSystem.playing("streaming"))
+ {
+ var1 = true;
+ return var1;
+ }
+ }
+
+ var1 = false;
+ return var1;
+ }
+
+ public void turnMusicOff()
+ {
+ if (this.isSoundOn())
+ {
+ SoundManager var10000 = Aether.proxy.getClient().sndManager;
+ SoundManager.sndSystem.stop("streaming");
+ }
+ }
+
+ public void playMusicFile(String var1)
+ {
+ if (this.isSoundOn())
+ {
+ float var10002 = (float) this.xCoord;
+ float var10003 = (float) this.yCoord;
+ Aether.proxy.getClient().sndManager.playStreaming(var1, var10002, var10003, (float) this.zCoord);
+ }
+ }
+
+ public void teleportMembersFromParty(ArrayList var1, boolean var2)
+ {
+ Side var3 = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (var3.isServer())
+ {
+ MinecraftServer var4 = FMLCommonHandler.instance().getMinecraftServerInstance();
+ ServerConfigurationManager var5 = var4.getConfigurationManager();
+
+ for (int var6 = 0; var6 < var5.playerEntityList.size(); ++var6)
+ {
+ Object var7 = var5.playerEntityList.get(var6);
+ Iterator var8 = var1.iterator();
+
+ while (var8.hasNext())
+ {
+ PartyMember var9 = (PartyMember) var8.next();
+
+ if (var7 instanceof EntityPlayerMP && ((EntityPlayerMP) var7).username.equalsIgnoreCase(var9.username))
+ {
+ ((EntityPlayerMP) var7).setPositionAndUpdate((double) ((float) ((double) this.xCoord + 0.5D)), (double) ((float) ((double) this.yCoord + 1.0D)), (double) ((float) ((double) this.zCoord + 0.5D + (var2 ? 3.0D : 0.0D))));
+ }
+ }
+ }
+ }
+
+ if (!var2)
+ {
+ this.worldObj.playSoundEffect((double) this.xCoord, (double) this.yCoord, (double) this.zCoord, "aeboss.slider.awake", 1.0F, 1.0F / (this.rand.nextFloat() * 0.2F + 0.9F));
+ this.worldObj.playSoundEffect((double) this.xCoord, (double) this.yCoord, (double) this.zCoord, "aeboss.slider.unlock", 1.0F, 1.0F / (this.rand.nextFloat() * 0.2F + 0.9F));
+ }
+ }
+
+ /**
+ * Reads a tile entity from NBT.
+ */
+ public void readFromNBT(NBTTagCompound var1)
+ {
+ super.readFromNBT(var1);
+ this.dungeonID = var1.getInteger("dungeonId");
+ }
+
+ /**
+ * Writes a tile entity to NBT.
+ */
+ public void writeToNBT(NBTTagCompound var1)
+ {
+ super.writeToNBT(var1);
+ var1.setInteger("dungeonId", this.dungeonID);
+ }
+
+ /**
+ * Allows the entity to update its state. Overridden in most subclasses, e.g. the mob spawner uses this to count
+ * ticks and creates a new spawn inside its implementation.
+ */
+ public void updateEntity()
+ {
+ if (this.chatTime > 0)
+ {
+ --this.chatTime;
+ }
+
+ if (this.dungeonID == -1)
+ {
+ Dungeon var1 = DungeonHandler.instance().getInstanceAt(MathHelper.floor_double((double) this.xCoord), MathHelper.floor_double((double) this.yCoord), MathHelper.floor_double((double) this.zCoord));
+
+ if (var1 != null)
+ {
+ this.dungeonID = var1.getID();
+
+ if (!this.worldObj.isRemote)
+ {
+ this.sendToAllInOurWorld(this.getDescriptionPacket());
+ }
+ }
+ }
+ }
+
+ public boolean isUseableByPlayer(EntityPlayer var1)
+ {
+ return this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : var1.getDistanceSq((double) this.xCoord + 0.5D, (double) this.yCoord + 0.5D, (double) this.zCoord + 0.5D) <= 64.0D;
+ }
+
+ public void onDataPacket(INetworkManager var1, Packet132TileEntityData var2)
+ {
+ this.readFromNBT(var2.customParam1);
+ }
+
+ /**
+ * Overriden in a sign to provide the text.
+ */
+ public Packet getDescriptionPacket()
+ {
+ NBTTagCompound var1 = new NBTTagCompound();
+ this.writeToNBT(var1);
+ return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 1, var1);
+ }
+
+ private void sendToAllInOurWorld(Packet var1)
+ {
+ ServerConfigurationManager var2 = FMLCommonHandler.instance().getMinecraftServerInstance().getConfigurationManager();
+ Iterator var3 = var2.playerEntityList.iterator();
+
+ while (var3.hasNext())
+ {
+ Object var4 = var3.next();
+ EntityPlayerMP var5 = (EntityPlayerMP) var4;
+
+ if (var5.worldObj == this.worldObj)
+ {
+ var5.playerNetServerHandler.sendPacketToPlayer(var1);
+ }
+ }
+ }
+
+ public boolean hasDungeon()
+ {
+ return this.dungeonID != -1;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/tile_entities/TileEntityEntranceRenderer.java b/src/main/java/net/aetherteam/aether/tile_entities/TileEntityEntranceRenderer.java
new file mode 100644
index 0000000..d7fa7c2
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/tile_entities/TileEntityEntranceRenderer.java
@@ -0,0 +1,96 @@
+package net.aetherteam.aether.tile_entities;
+
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.party.Party;
+import net.aetherteam.aether.party.PartyController;
+import net.aetherteam.aether.party.members.PartyMember;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.entity.RenderManager;
+import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.tileentity.TileEntity;
+import org.lwjgl.opengl.GL11;
+
+public class TileEntityEntranceRenderer extends TileEntitySpecialRenderer
+{
+ protected static final String AVAILABLE = "Available";
+ protected static final String OCCUPIED = "Occupied";
+ protected static final String CONQUERED = "Conquered";
+ private static final int AVAILABLE_COLOUR = 6750054;
+ private static final int OCCUPIED_COLOUR = 16756516;
+ private static final int CONQUERED_COLOUR = 10688793;
+
+ public void renderTileEntityAt(TileEntity var1, double var2, double var4, double var6, float var8)
+ {
+ this.renderTileEntityEntranceAt((TileEntityEntranceController) var1, var2, var4, var6, var8);
+ }
+
+ public void renderTileEntityEntranceAt(TileEntityEntranceController var1, double var2, double var4, double var6, float var8)
+ {
+ Dungeon var9 = var1.getDungeon();
+
+ if (var9 != null && !var9.hasMember(PartyController.instance().getMember((EntityPlayer) Minecraft.getMinecraft().thePlayer)))
+ {
+ PartyMember var10 = PartyController.instance().getMember(Minecraft.getMinecraft().thePlayer.username.toLowerCase());
+ Party var11 = PartyController.instance().getParty(var10);
+ String var12 = (var11 == null || !var9.hasAnyConqueredDungeon(var11.getMembers())) && !var9.hasConqueredDungeon((EntityPlayer) Minecraft.getMinecraft().thePlayer) ? (!var9.isActive() && !var9.hasQueuedParty() ? "Available" : "Occupied") : "Conquered";
+ int var13 = (var11 == null || !var9.hasAnyConqueredDungeon(var11.getMembers())) && !var9.hasConqueredDungeon((EntityPlayer) Minecraft.getMinecraft().thePlayer) ? (!var9.isActive() && !var9.hasQueuedParty() ? 6750054 : 16756516) : 10688793;
+ GL11.glPushMatrix();
+ this.renderLabel(var1, var12, var2, var4 + 5.0D, var6, 24, 2.0F, var13);
+ GL11.glPopMatrix();
+ }
+ }
+
+ protected void renderLabel(TileEntity var1, String var2, double var3, double var5, double var7, int var9, float var10, int var11)
+ {
+ RenderManager var12 = RenderManager.instance;
+ double var13 = var1.getDistanceFrom(var12.livingPlayer.posX, var12.livingPlayer.posY, var12.livingPlayer.posZ);
+
+ if (var13 <= (double) (var9 * var9))
+ {
+ FontRenderer var15 = var12.getFontRenderer();
+ float var16 = 1.6F;
+ float var17 = 0.016666668F * var16;
+ GL11.glPushMatrix();
+ GL11.glTranslatef((float) var3 + 0.0F, (float) var5 + 0.5F, (float) var7);
+ GL11.glScalef(var10, var10, var10);
+ GL11.glNormal3f(1.0F, 1.0F, 1.0F);
+ GL11.glRotatef(-var12.playerViewY, 0.0F, 1.0F, 0.0F);
+ GL11.glRotatef(var12.playerViewX, 1.0F, 0.0F, 0.0F);
+ GL11.glScalef(-var17, -var17, var17);
+ GL11.glDisable(GL11.GL_LIGHTING);
+ GL11.glDepthMask(false);
+ GL11.glDisable(GL11.GL_DEPTH_TEST);
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ Tessellator var18 = Tessellator.instance;
+ byte var19 = 0;
+
+ if (var2.equals("deadmau5"))
+ {
+ var19 = -10;
+ }
+
+ GL11.glDisable(GL11.GL_TEXTURE_2D);
+ var18.startDrawingQuads();
+ int var20 = var15.getStringWidth(var2) / 2;
+ var18.setColorRGBA_F(0.0F, 0.0F, 0.0F, 0.25F);
+ var18.addVertex((double) (-var20 - 1), (double) (-1 + var19), 0.0D);
+ var18.addVertex((double) (-var20 - 1), (double) (8 + var19), 0.0D);
+ var18.addVertex((double) (var20 + 1), (double) (8 + var19), 0.0D);
+ var18.addVertex((double) (var20 + 1), (double) (-1 + var19), 0.0D);
+ var18.draw();
+ GL11.glEnable(GL11.GL_TEXTURE_2D);
+ var15.drawString(var2, -var15.getStringWidth(var2) / 2, var19, var11);
+ GL11.glEnable(GL11.GL_DEPTH_TEST);
+ GL11.glDepthMask(true);
+ var15.drawString(var2, -var15.getStringWidth(var2) / 2, var19, var11);
+ GL11.glEnable(GL11.GL_LIGHTING);
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glPopMatrix();
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/tile_entities/TileEntityFreezer.java b/src/main/java/net/aetherteam/aether/tile_entities/TileEntityFreezer.java
new file mode 100644
index 0000000..8b18870
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/tile_entities/TileEntityFreezer.java
@@ -0,0 +1,338 @@
+package net.aetherteam.aether.tile_entities;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import net.aetherteam.aether.AetherFrozen;
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.inventory.IInventory;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.NBTTagList;
+import net.minecraft.network.INetworkManager;
+import net.minecraft.network.packet.Packet;
+import net.minecraft.network.packet.Packet132TileEntityData;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraftforge.common.ForgeDirection;
+import net.minecraftforge.common.ISidedInventory;
+
+public class TileEntityFreezer extends TileEntity implements IInventory, ISidedInventory
+{
+ private static List frozen = new ArrayList();
+ private ItemStack[] frozenItemStacks = new ItemStack[3];
+ public int frozenProgress = 0;
+ public int frozenPowerRemaining = 0;
+ public int frozenTimeForItem = 0;
+ private AetherFrozen currentFrozen;
+
+ /**
+ * Returns the number of slots in the inventory.
+ */
+ public int getSizeInventory()
+ {
+ return this.frozenItemStacks.length;
+ }
+
+ /**
+ * Returns the stack in slot i
+ */
+ public ItemStack getStackInSlot(int var1)
+ {
+ return this.frozenItemStacks[var1];
+ }
+
+ /**
+ * Removes from an inventory slot (first arg) up to a specified number (second arg) of items and returns them in a
+ * new stack.
+ */
+ public ItemStack decrStackSize(int var1, int var2)
+ {
+ if (this.frozenItemStacks[var1] != null)
+ {
+ ItemStack var3;
+
+ if (this.frozenItemStacks[var1].stackSize <= var2)
+ {
+ var3 = this.frozenItemStacks[var1];
+ this.frozenItemStacks[var1] = null;
+ return var3;
+ } else
+ {
+ var3 = this.frozenItemStacks[var1].splitStack(var2);
+
+ if (this.frozenItemStacks[var1].stackSize == 0)
+ {
+ this.frozenItemStacks[var1] = null;
+ }
+
+ return var3;
+ }
+ } else
+ {
+ return null;
+ }
+ }
+
+ /**
+ * When some containers are closed they call this on each slot, then drop whatever it returns as an EntityItem -
+ * like when you close a workbench GUI.
+ */
+ public ItemStack getStackInSlotOnClosing(int var1)
+ {
+ if (this.frozenItemStacks[var1] != null)
+ {
+ ItemStack var2 = this.frozenItemStacks[var1];
+ this.frozenItemStacks[var1] = null;
+ return var2;
+ } else
+ {
+ return null;
+ }
+ }
+
+ /**
+ * Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).
+ */
+ public void setInventorySlotContents(int var1, ItemStack var2)
+ {
+ this.frozenItemStacks[var1] = var2;
+
+ if (var2 != null && var2.stackSize > this.getInventoryStackLimit())
+ {
+ var2.stackSize = this.getInventoryStackLimit();
+ }
+ }
+
+ /**
+ * Returns the name of the inventory.
+ */
+ public String getInvName()
+ {
+ return "Freezer";
+ }
+
+ public void openChest() {}
+
+ public void closeChest() {}
+
+ /**
+ * Reads a tile entity from NBT.
+ */
+ public void readFromNBT(NBTTagCompound var1)
+ {
+ super.readFromNBT(var1);
+ NBTTagList var2 = var1.getTagList("Items");
+ this.frozenItemStacks = new ItemStack[this.getSizeInventory()];
+
+ for (int var3 = 0; var3 < var2.tagCount(); ++var3)
+ {
+ NBTTagCompound var4 = (NBTTagCompound) var2.tagAt(var3);
+ byte var5 = var4.getByte("Slot");
+
+ if (var5 >= 0 && var5 < this.frozenItemStacks.length)
+ {
+ this.frozenItemStacks[var5] = ItemStack.loadItemStackFromNBT(var4);
+ }
+ }
+
+ this.frozenProgress = var1.getShort("BurnTime");
+ this.frozenTimeForItem = var1.getShort("CookTime");
+ }
+
+ /**
+ * Writes a tile entity to NBT.
+ */
+ public void writeToNBT(NBTTagCompound var1)
+ {
+ super.writeToNBT(var1);
+ var1.setShort("BurnTime", (short) this.frozenProgress);
+ var1.setShort("CookTime", (short) this.frozenTimeForItem);
+ NBTTagList var2 = new NBTTagList();
+
+ for (int var3 = 0; var3 < this.frozenItemStacks.length; ++var3)
+ {
+ if (this.frozenItemStacks[var3] != null)
+ {
+ NBTTagCompound var4 = new NBTTagCompound();
+ var4.setByte("Slot", (byte) var3);
+ this.frozenItemStacks[var3].writeToNBT(var4);
+ var2.appendTag(var4);
+ }
+ }
+
+ var1.setTag("Items", var2);
+ }
+
+ /**
+ * Returns the maximum stack size for a inventory slot. Seems to always be 64, possibly will be extended. *Isn't
+ * this more of a set than a get?*
+ */
+ public int getInventoryStackLimit()
+ {
+ return 64;
+ }
+
+ @SideOnly(Side.CLIENT)
+ public int getCookProgressScaled(int var1)
+ {
+ return this.frozenTimeForItem == 0 ? 0 : this.frozenProgress * var1 / this.frozenTimeForItem;
+ }
+
+ @SideOnly(Side.CLIENT)
+ public int getBurnTimeRemainingScaled(int var1)
+ {
+ return this.frozenPowerRemaining * var1 / 500;
+ }
+
+ public boolean isBurning()
+ {
+ return this.frozenPowerRemaining > 0;
+ }
+
+ /**
+ * Allows the entity to update its state. Overridden in most subclasses, e.g. the mob spawner uses this to count
+ * ticks and creates a new spawn inside its implementation.
+ */
+ public void updateEntity()
+ {
+ if (this.frozenPowerRemaining > 0)
+ {
+ --this.frozenPowerRemaining;
+
+ if (this.currentFrozen != null)
+ {
+ ++this.frozenProgress;
+ }
+ }
+
+ if (this.currentFrozen != null && (this.frozenItemStacks[0] == null || this.frozenItemStacks[0].itemID != this.currentFrozen.frozenFrom.itemID))
+ {
+ this.currentFrozen = null;
+ this.frozenProgress = 0;
+ }
+
+ if (this.currentFrozen != null && this.frozenProgress >= this.currentFrozen.frozenPowerNeeded)
+ {
+ if (!this.worldObj.isRemote)
+ {
+ if (this.frozenItemStacks[2] == null)
+ {
+ this.setInventorySlotContents(2, new ItemStack(this.currentFrozen.frozenTo.getItem(), 1, this.currentFrozen.frozenTo.getItemDamage()));
+ } else
+ {
+ this.setInventorySlotContents(2, new ItemStack(this.currentFrozen.frozenTo.getItem(), this.getStackInSlot(2).stackSize + 1, this.currentFrozen.frozenTo.getItemDamage()));
+ }
+
+ if (this.getStackInSlot(0).itemID != Item.bucketWater.itemID && this.getStackInSlot(0).itemID != Item.bucketLava.itemID)
+ {
+ if (this.getStackInSlot(0).itemID == AetherItems.SkyrootBucket.itemID)
+ {
+ this.setInventorySlotContents(0, new ItemStack(AetherItems.SkyrootBucket));
+ } else
+ {
+ this.decrStackSize(0, 1);
+ }
+ } else
+ {
+ this.setInventorySlotContents(0, new ItemStack(Item.bucketEmpty));
+ }
+ }
+
+ this.frozenProgress = 0;
+ this.currentFrozen = null;
+ this.frozenTimeForItem = 0;
+ }
+
+ if (this.frozenPowerRemaining <= 0 && this.currentFrozen != null && this.getStackInSlot(1) != null && this.getStackInSlot(1).itemID == AetherBlocks.Icestone.blockID)
+ {
+ this.frozenPowerRemaining += 500;
+
+ if (!this.worldObj.isRemote)
+ {
+ this.decrStackSize(1, 1);
+ }
+ }
+
+ if (this.currentFrozen == null)
+ {
+ ItemStack var1 = this.getStackInSlot(0);
+
+ for (int var2 = 0; var2 < frozen.size(); ++var2)
+ {
+ if (var1 != null && frozen.get(var2) != null && var1.itemID == ((AetherFrozen) frozen.get(var2)).frozenFrom.itemID && var1.getItemDamage() == ((AetherFrozen) frozen.get(var2)).frozenFrom.getItemDamage())
+ {
+ if (this.frozenItemStacks[2] == null)
+ {
+ this.currentFrozen = (AetherFrozen) frozen.get(var2);
+ this.frozenTimeForItem = this.currentFrozen.frozenPowerNeeded;
+ } else if (this.frozenItemStacks[2].itemID == ((AetherFrozen) frozen.get(var2)).frozenTo.itemID && ((AetherFrozen) frozen.get(var2)).frozenTo.getItem().getItemStackLimit() > this.frozenItemStacks[2].stackSize)
+ {
+ this.currentFrozen = (AetherFrozen) frozen.get(var2);
+ this.frozenTimeForItem = this.currentFrozen.frozenPowerNeeded;
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Do not make give this method the name canInteractWith because it clashes with Container
+ */
+ public boolean isUseableByPlayer(EntityPlayer var1)
+ {
+ return this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : var1.getDistanceSq((double) this.xCoord + 0.5D, (double) this.yCoord + 0.5D, (double) this.zCoord + 0.5D) <= 64.0D;
+ }
+
+ public static void addFreezable(ItemStack var0, ItemStack var1, int var2)
+ {
+ frozen.add(new AetherFrozen(var0, var1, var2));
+ }
+
+ public int getStartInventorySide(ForgeDirection var1)
+ {
+ return var1 == ForgeDirection.DOWN ? 1 : (var1 == ForgeDirection.UP ? 0 : 2);
+ }
+
+ public int getSizeInventorySide(ForgeDirection var1)
+ {
+ return 1;
+ }
+
+ public void onDataPacket(INetworkManager var1, Packet132TileEntityData var2)
+ {
+ this.readFromNBT(var2.customParam1);
+ }
+
+ /**
+ * Overriden in a sign to provide the text.
+ */
+ public Packet getDescriptionPacket()
+ {
+ NBTTagCompound var1 = new NBTTagCompound();
+ this.writeToNBT(var1);
+ return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 1, var1);
+ }
+
+ /**
+ * If this returns false, the inventory name will be used as an unlocalized name, and translated into the player's
+ * language. Otherwise it will be used directly.
+ */
+ public boolean isInvNameLocalized()
+ {
+ return false;
+ }
+
+ /**
+ * Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot.
+ */
+ public boolean isStackValidForSlot(int var1, ItemStack var2)
+ {
+ return false;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/tile_entities/TileEntityIncubator.java b/src/main/java/net/aetherteam/aether/tile_entities/TileEntityIncubator.java
new file mode 100644
index 0000000..31428e1
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/tile_entities/TileEntityIncubator.java
@@ -0,0 +1,290 @@
+package net.aetherteam.aether.tile_entities;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.aetherteam.aether.AetherMoaColour;
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.entities.mounts.EntityMoa;
+import net.aetherteam.aether.items.AetherItems;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.inventory.IInventory;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.NBTTagList;
+import net.minecraft.network.INetworkManager;
+import net.minecraft.network.packet.Packet;
+import net.minecraft.network.packet.Packet132TileEntityData;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraftforge.common.ForgeDirection;
+import net.minecraftforge.common.ISidedInventory;
+
+public class TileEntityIncubator extends TileEntity implements IInventory, ISidedInventory
+{
+ private ItemStack[] IncubatorItemStacks = new ItemStack[2];
+ public int torchPower;
+ public int progress = 0;
+ public int ticksRequired = 6000;
+ public EntityPlayer playerUsing;
+
+ /**
+ * Returns the number of slots in the inventory.
+ */
+ public int getSizeInventory()
+ {
+ return this.IncubatorItemStacks.length;
+ }
+
+ /**
+ * Returns the stack in slot i
+ */
+ public ItemStack getStackInSlot(int var1)
+ {
+ return this.IncubatorItemStacks[var1];
+ }
+
+ /**
+ * Removes from an inventory slot (first arg) up to a specified number (second arg) of items and returns them in a
+ * new stack.
+ */
+ public ItemStack decrStackSize(int var1, int var2)
+ {
+ if (this.IncubatorItemStacks[var1] != null)
+ {
+ ItemStack var3;
+
+ if (this.IncubatorItemStacks[var1].stackSize <= var2)
+ {
+ var3 = this.IncubatorItemStacks[var1];
+ this.IncubatorItemStacks[var1] = null;
+ return var3;
+ } else
+ {
+ var3 = this.IncubatorItemStacks[var1].splitStack(var2);
+
+ if (this.IncubatorItemStacks[var1].stackSize == 0)
+ {
+ this.IncubatorItemStacks[var1] = null;
+ }
+
+ return var3;
+ }
+ } else
+ {
+ return null;
+ }
+ }
+
+ /**
+ * When some containers are closed they call this on each slot, then drop whatever it returns as an EntityItem -
+ * like when you close a workbench GUI.
+ */
+ public ItemStack getStackInSlotOnClosing(int var1)
+ {
+ if (this.IncubatorItemStacks[var1] != null)
+ {
+ ItemStack var2 = this.IncubatorItemStacks[var1];
+ this.IncubatorItemStacks[var1] = null;
+ return var2;
+ } else
+ {
+ return null;
+ }
+ }
+
+ /**
+ * Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).
+ */
+ public void setInventorySlotContents(int var1, ItemStack var2)
+ {
+ this.IncubatorItemStacks[var1] = var2;
+
+ if (var2 != null && var2.stackSize > this.getInventoryStackLimit())
+ {
+ var2.stackSize = this.getInventoryStackLimit();
+ }
+ }
+
+ /**
+ * Returns the name of the inventory.
+ */
+ public String getInvName()
+ {
+ return "Incubator";
+ }
+
+ /**
+ * Reads a tile entity from NBT.
+ */
+ public void readFromNBT(NBTTagCompound var1)
+ {
+ super.readFromNBT(var1);
+ NBTTagList var2 = var1.getTagList("Items");
+ this.IncubatorItemStacks = new ItemStack[this.getSizeInventory()];
+
+ for (int var3 = 0; var3 < var2.tagCount(); ++var3)
+ {
+ NBTTagCompound var4 = (NBTTagCompound) var2.tagAt(var3);
+ byte var5 = var4.getByte("Slot");
+
+ if (var5 >= 0 && var5 < this.IncubatorItemStacks.length)
+ {
+ this.IncubatorItemStacks[var5] = ItemStack.loadItemStackFromNBT(var4);
+ }
+ }
+
+ this.progress = var1.getShort("BurnTime");
+ }
+
+ public void openChest() {}
+
+ public void closeChest() {}
+
+ /**
+ * Writes a tile entity to NBT.
+ */
+ public void writeToNBT(NBTTagCompound var1)
+ {
+ super.writeToNBT(var1);
+ var1.setShort("BurnTime", (short) this.progress);
+ NBTTagList var2 = new NBTTagList();
+
+ for (int var3 = 0; var3 < this.IncubatorItemStacks.length; ++var3)
+ {
+ if (this.IncubatorItemStacks[var3] != null)
+ {
+ NBTTagCompound var4 = new NBTTagCompound();
+ var4.setByte("Slot", (byte) var3);
+ this.IncubatorItemStacks[var3].writeToNBT(var4);
+ var2.appendTag(var4);
+ }
+ }
+
+ var1.setTag("Items", var2);
+ }
+
+ /**
+ * Returns the maximum stack size for a inventory slot. Seems to always be 64, possibly will be extended. *Isn't
+ * this more of a set than a get?*
+ */
+ public int getInventoryStackLimit()
+ {
+ return 64;
+ }
+
+ @SideOnly(Side.CLIENT)
+ public int getCookProgressScaled(int var1)
+ {
+ return this.progress * var1 / this.ticksRequired;
+ }
+
+ @SideOnly(Side.CLIENT)
+ public int getBurnTimeRemainingScaled(int var1)
+ {
+ return this.torchPower * var1 / 500;
+ }
+
+ public boolean isBurning()
+ {
+ return this.torchPower > 0;
+ }
+
+ /**
+ * Allows the entity to update its state. Overridden in most subclasses, e.g. the mob spawner uses this to count
+ * ticks and creates a new spawn inside its implementation.
+ */
+ public void updateEntity()
+ {
+ if (this.torchPower > 0)
+ {
+ --this.torchPower;
+
+ if (this.getStackInSlot(1) != null)
+ {
+ ++this.progress;
+ }
+ }
+
+ if (this.IncubatorItemStacks[1] == null || this.IncubatorItemStacks[1].itemID != AetherItems.MoaEgg.itemID)
+ {
+ this.progress = 0;
+ }
+
+ if (this.progress >= this.ticksRequired)
+ {
+ if (this.IncubatorItemStacks[1] != null && !this.worldObj.isRemote)
+ {
+ EntityMoa var1 = new EntityMoa(this.worldObj, true, false, false, AetherMoaColour.getColour(this.IncubatorItemStacks[1].getItemDamage()), this.playerUsing);
+ var1.setPosition((double) this.xCoord + 0.5D, (double) this.yCoord + 1.5D, (double) this.zCoord + 0.5D);
+ this.worldObj.spawnEntityInWorld(var1);
+ }
+
+ if (!this.worldObj.isRemote)
+ {
+ this.decrStackSize(1, 1);
+ }
+
+ this.progress = 0;
+ }
+
+ if (this.torchPower <= 0 && this.IncubatorItemStacks[1] != null && this.IncubatorItemStacks[1].itemID == AetherItems.MoaEgg.itemID && this.getStackInSlot(0) != null && this.getStackInSlot(0).itemID == AetherBlocks.AmbrosiumTorch.blockID)
+ {
+ this.torchPower += 1000;
+
+ if (!this.worldObj.isRemote)
+ {
+ this.decrStackSize(0, 1);
+ }
+ }
+ }
+
+ /**
+ * Do not make give this method the name canInteractWith because it clashes with Container
+ */
+ public boolean isUseableByPlayer(EntityPlayer var1)
+ {
+ this.playerUsing = var1;
+ return this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : var1.getDistanceSq((double) this.xCoord + 0.5D, (double) this.yCoord + 0.5D, (double) this.zCoord + 0.5D) <= 64.0D;
+ }
+
+ public int getStartInventorySide(ForgeDirection var1)
+ {
+ return var1 == ForgeDirection.DOWN ? 1 : (var1 == ForgeDirection.UP ? 0 : 2);
+ }
+
+ public int getSizeInventorySide(ForgeDirection var1)
+ {
+ return 1;
+ }
+
+ public void onDataPacket(INetworkManager var1, Packet132TileEntityData var2)
+ {
+ this.readFromNBT(var2.customParam1);
+ }
+
+ /**
+ * Overriden in a sign to provide the text.
+ */
+ public Packet getDescriptionPacket()
+ {
+ NBTTagCompound var1 = new NBTTagCompound();
+ this.writeToNBT(var1);
+ return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 1, var1);
+ }
+
+ /**
+ * If this returns false, the inventory name will be used as an unlocalized name, and translated into the player's
+ * language. Otherwise it will be used directly.
+ */
+ public boolean isInvNameLocalized()
+ {
+ return false;
+ }
+
+ /**
+ * Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot.
+ */
+ public boolean isStackValidForSlot(int var1, ItemStack var2)
+ {
+ return false;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/tile_entities/TileEntityIncubatorSlot.java b/src/main/java/net/aetherteam/aether/tile_entities/TileEntityIncubatorSlot.java
new file mode 100644
index 0000000..4931c35
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/tile_entities/TileEntityIncubatorSlot.java
@@ -0,0 +1,21 @@
+package net.aetherteam.aether.tile_entities;
+
+import net.minecraft.inventory.IInventory;
+import net.minecraft.inventory.Slot;
+
+public class TileEntityIncubatorSlot extends Slot
+{
+ public TileEntityIncubatorSlot(IInventory var1, int var2, int var3, int var4)
+ {
+ super(var1, var2, var3, var4);
+ }
+
+ /**
+ * Returns the maximum stack size for a given slot (usually the same as getInventoryStackLimit(), but 1 in the case
+ * of armor slots)
+ */
+ public int getSlotStackLimit()
+ {
+ return 1;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/tile_entities/TileEntitySkyrootChest.java b/src/main/java/net/aetherteam/aether/tile_entities/TileEntitySkyrootChest.java
new file mode 100644
index 0000000..613bc1b
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/tile_entities/TileEntitySkyrootChest.java
@@ -0,0 +1,377 @@
+package net.aetherteam.aether.tile_entities;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.inventory.IInventory;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.NBTTagList;
+import net.minecraft.tileentity.TileEntity;
+
+public class TileEntitySkyrootChest extends TileEntity implements IInventory
+{
+ private ItemStack[] chestContents = new ItemStack[36];
+ public boolean adjacentChestChecked = false;
+ public TileEntitySkyrootChest adjacentChestZNeg;
+ public TileEntitySkyrootChest adjacentChestXPos;
+ public TileEntitySkyrootChest adjacentChestXNeg;
+ public TileEntitySkyrootChest adjacentChestZPosition;
+ public float lidAngle;
+ public float prevLidAngle;
+ public int numUsingPlayers;
+ private int ticksSinceSync;
+
+ /**
+ * Returns the number of slots in the inventory.
+ */
+ public int getSizeInventory()
+ {
+ return 27;
+ }
+
+ /**
+ * Returns the stack in slot i
+ */
+ public ItemStack getStackInSlot(int var1)
+ {
+ return this.getChestContents()[var1];
+ }
+
+ /**
+ * Removes from an inventory slot (first arg) up to a specified number (second arg) of items and returns them in a
+ * new stack.
+ */
+ public ItemStack decrStackSize(int var1, int var2)
+ {
+ if (this.getChestContents()[var1] != null)
+ {
+ ItemStack var3;
+
+ if (this.getChestContents()[var1].stackSize <= var2)
+ {
+ var3 = this.getChestContents()[var1];
+ this.getChestContents()[var1] = null;
+ this.onInventoryChanged();
+ return var3;
+ } else
+ {
+ var3 = this.getChestContents()[var1].splitStack(var2);
+
+ if (this.getChestContents()[var1].stackSize == 0)
+ {
+ this.getChestContents()[var1] = null;
+ }
+
+ this.onInventoryChanged();
+ return var3;
+ }
+ } else
+ {
+ return null;
+ }
+ }
+
+ /**
+ * When some containers are closed they call this on each slot, then drop whatever it returns as an EntityItem -
+ * like when you close a workbench GUI.
+ */
+ public ItemStack getStackInSlotOnClosing(int var1)
+ {
+ if (this.getChestContents()[var1] != null)
+ {
+ ItemStack var2 = this.getChestContents()[var1];
+ this.getChestContents()[var1] = null;
+ return var2;
+ } else
+ {
+ return null;
+ }
+ }
+
+ /**
+ * Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).
+ */
+ public void setInventorySlotContents(int var1, ItemStack var2)
+ {
+ this.getChestContents()[var1] = var2;
+
+ if (var2 != null && var2.stackSize > this.getInventoryStackLimit())
+ {
+ var2.stackSize = this.getInventoryStackLimit();
+ }
+
+ this.onInventoryChanged();
+ }
+
+ /**
+ * Returns the name of the inventory.
+ */
+ public String getInvName()
+ {
+ return "container.chest";
+ }
+
+ /**
+ * Reads a tile entity from NBT.
+ */
+ public void readFromNBT(NBTTagCompound var1)
+ {
+ super.readFromNBT(var1);
+ NBTTagList var2 = var1.getTagList("Items");
+ this.setChestContents(new ItemStack[this.getSizeInventory()]);
+
+ for (int var3 = 0; var3 < var2.tagCount(); ++var3)
+ {
+ NBTTagCompound var4 = (NBTTagCompound) var2.tagAt(var3);
+ int var5 = var4.getByte("Slot") & 255;
+
+ if (var5 >= 0 && var5 < this.getChestContents().length)
+ {
+ this.getChestContents()[var5] = ItemStack.loadItemStackFromNBT(var4);
+ }
+ }
+ }
+
+ /**
+ * Writes a tile entity to NBT.
+ */
+ public void writeToNBT(NBTTagCompound var1)
+ {
+ super.writeToNBT(var1);
+ NBTTagList var2 = new NBTTagList();
+
+ for (int var3 = 0; var3 < this.getChestContents().length; ++var3)
+ {
+ if (this.getChestContents()[var3] != null)
+ {
+ NBTTagCompound var4 = new NBTTagCompound();
+ var4.setByte("Slot", (byte) var3);
+ this.getChestContents()[var3].writeToNBT(var4);
+ var2.appendTag(var4);
+ }
+ }
+
+ var1.setTag("Items", var2);
+ }
+
+ /**
+ * Returns the maximum stack size for a inventory slot. Seems to always be 64, possibly will be extended. *Isn't
+ * this more of a set than a get?*
+ */
+ public int getInventoryStackLimit()
+ {
+ return 64;
+ }
+
+ /**
+ * Do not make give this method the name canInteractWith because it clashes with Container
+ */
+ public boolean isUseableByPlayer(EntityPlayer var1)
+ {
+ return this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : var1.getDistanceSq((double) this.xCoord + 0.5D, (double) this.yCoord + 0.5D, (double) this.zCoord + 0.5D) <= 64.0D;
+ }
+
+ /**
+ * Causes the TileEntity to reset all it's cached values for it's container block, blockID, metaData and in the case
+ * of chests, the adjcacent chest check
+ */
+ public void updateContainingBlockInfo()
+ {
+ super.updateContainingBlockInfo();
+ this.adjacentChestChecked = false;
+ }
+
+ public void checkForAdjacentChests()
+ {
+ if (!this.adjacentChestChecked)
+ {
+ this.adjacentChestChecked = true;
+ this.adjacentChestZNeg = null;
+ this.adjacentChestXPos = null;
+ this.adjacentChestXNeg = null;
+ this.adjacentChestZPosition = null;
+
+ if (this.worldObj.getBlockId(this.xCoord - 1, this.yCoord, this.zCoord) == AetherBlocks.SkyrootChest.blockID)
+ {
+ this.adjacentChestXNeg = (TileEntitySkyrootChest) this.worldObj.getBlockTileEntity(this.xCoord - 1, this.yCoord, this.zCoord);
+ }
+
+ if (this.worldObj.getBlockId(this.xCoord + 1, this.yCoord, this.zCoord) == AetherBlocks.SkyrootChest.blockID)
+ {
+ this.adjacentChestXPos = (TileEntitySkyrootChest) this.worldObj.getBlockTileEntity(this.xCoord + 1, this.yCoord, this.zCoord);
+ }
+
+ if (this.worldObj.getBlockId(this.xCoord, this.yCoord, this.zCoord - 1) == AetherBlocks.SkyrootChest.blockID)
+ {
+ this.adjacentChestZNeg = (TileEntitySkyrootChest) this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord - 1);
+ }
+
+ if (this.worldObj.getBlockId(this.xCoord, this.yCoord, this.zCoord + 1) == AetherBlocks.SkyrootChest.blockID)
+ {
+ this.adjacentChestZPosition = (TileEntitySkyrootChest) this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord + 1);
+ }
+
+ if (this.adjacentChestZNeg != null)
+ {
+ this.adjacentChestZNeg.updateContainingBlockInfo();
+ }
+
+ if (this.adjacentChestZPosition != null)
+ {
+ this.adjacentChestZPosition.updateContainingBlockInfo();
+ }
+
+ if (this.adjacentChestXPos != null)
+ {
+ this.adjacentChestXPos.updateContainingBlockInfo();
+ }
+
+ if (this.adjacentChestXNeg != null)
+ {
+ this.adjacentChestXNeg.updateContainingBlockInfo();
+ }
+ }
+ }
+
+ /**
+ * Allows the entity to update its state. Overridden in most subclasses, e.g. the mob spawner uses this to count
+ * ticks and creates a new spawn inside its implementation.
+ */
+ public void updateEntity()
+ {
+ super.updateEntity();
+ this.checkForAdjacentChests();
+
+ if (++this.ticksSinceSync % 20 * 4 == 0)
+ {
+ ;
+ }
+
+ this.prevLidAngle = this.lidAngle;
+ float var1 = 0.1F;
+ double var2;
+
+ if (this.numUsingPlayers > 0 && this.lidAngle == 0.0F && this.adjacentChestZNeg == null && this.adjacentChestXNeg == null)
+ {
+ double var4 = (double) this.xCoord + 0.5D;
+ var2 = (double) this.zCoord + 0.5D;
+
+ if (this.adjacentChestZPosition != null)
+ {
+ var2 += 0.5D;
+ }
+
+ if (this.adjacentChestXPos != null)
+ {
+ var4 += 0.5D;
+ }
+
+ this.worldObj.playSoundEffect(var4, (double) this.yCoord + 0.5D, var2, "random.chestopen", 0.5F, this.worldObj.rand.nextFloat() * 0.1F + 0.9F);
+ }
+
+ if (this.numUsingPlayers == 0 && this.lidAngle > 0.0F || this.numUsingPlayers > 0 && this.lidAngle < 1.0F)
+ {
+ float var8 = this.lidAngle;
+
+ if (this.numUsingPlayers > 0)
+ {
+ this.lidAngle += var1;
+ } else
+ {
+ this.lidAngle -= var1;
+ }
+
+ if (this.lidAngle > 1.0F)
+ {
+ this.lidAngle = 1.0F;
+ }
+
+ float var5 = 0.5F;
+
+ if (this.lidAngle < var5 && var8 >= var5 && this.adjacentChestZNeg == null && this.adjacentChestXNeg == null)
+ {
+ var2 = (double) this.xCoord + 0.5D;
+ double var6 = (double) this.zCoord + 0.5D;
+
+ if (this.adjacentChestZPosition != null)
+ {
+ var6 += 0.5D;
+ }
+
+ if (this.adjacentChestXPos != null)
+ {
+ var2 += 0.5D;
+ }
+
+ this.worldObj.playSoundEffect(var2, (double) this.yCoord + 0.5D, var6, "random.chestclosed", 0.5F, this.worldObj.rand.nextFloat() * 0.1F + 0.9F);
+ }
+
+ if (this.lidAngle < 0.0F)
+ {
+ this.lidAngle = 0.0F;
+ }
+ }
+ }
+
+ /**
+ * Called when a client event is received with the event number and argument, see World.sendClientEvent
+ */
+ public boolean receiveClientEvent(int var1, int var2)
+ {
+ if (var1 == 1)
+ {
+ this.numUsingPlayers = var2;
+ }
+
+ return true;
+ }
+
+ public void openChest()
+ {
+ ++this.numUsingPlayers;
+ this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, AetherBlocks.SkyrootChest.blockID, 1, this.numUsingPlayers);
+ }
+
+ public void closeChest()
+ {
+ --this.numUsingPlayers;
+ this.worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, AetherBlocks.SkyrootChest.blockID, 1, this.numUsingPlayers);
+ }
+
+ /**
+ * invalidates a tile entity
+ */
+ public void invalidate()
+ {
+ this.updateContainingBlockInfo();
+ this.checkForAdjacentChests();
+ super.invalidate();
+ }
+
+ public ItemStack[] getChestContents()
+ {
+ return this.chestContents;
+ }
+
+ public void setChestContents(ItemStack[] var1)
+ {
+ this.chestContents = var1;
+ }
+
+ /**
+ * If this returns false, the inventory name will be used as an unlocalized name, and translated into the player's
+ * language. Otherwise it will be used directly.
+ */
+ public boolean isInvNameLocalized()
+ {
+ return false;
+ }
+
+ /**
+ * Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot.
+ */
+ public boolean isStackValidForSlot(int var1, ItemStack var2)
+ {
+ return false;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/tile_entities/TileEntitySkyrootChestRenderer.java b/src/main/java/net/aetherteam/aether/tile_entities/TileEntitySkyrootChestRenderer.java
new file mode 100644
index 0000000..2864227
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/tile_entities/TileEntitySkyrootChestRenderer.java
@@ -0,0 +1,129 @@
+package net.aetherteam.aether.tile_entities;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.aetherteam.aether.blocks.BlockSkyrootChest;
+import net.minecraft.block.Block;
+import net.minecraft.client.model.ModelChest;
+import net.minecraft.client.model.ModelLargeChest;
+import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
+import net.minecraft.tileentity.TileEntity;
+import org.lwjgl.opengl.GL11;
+import org.lwjgl.opengl.GL12;
+
+@SideOnly(Side.CLIENT)
+public class TileEntitySkyrootChestRenderer extends TileEntitySpecialRenderer
+{
+ private ModelChest chestModel = new ModelChest();
+ private ModelChest largeChestModel = new ModelLargeChest();
+
+ public void renderTileEntityChestAt(TileEntitySkyrootChest var1, double var2, double var4, double var6, float var8)
+ {
+ int var9;
+
+ if (!var1.func_70309_m())
+ {
+ var9 = 0;
+ } else
+ {
+ Block var10 = var1.getBlockType();
+ var9 = var1.getBlockMetadata();
+
+ if (var10 != null && var9 == 0)
+ {
+ ((BlockSkyrootChest) var10).unifyAdjacentChests(var1.getWorldObj(), var1.xCoord, var1.yCoord, var1.zCoord);
+ var9 = var1.getBlockMetadata();
+ }
+
+ var1.checkForAdjacentChests();
+ }
+
+ if (var1.adjacentChestZNeg == null && var1.adjacentChestXNeg == null)
+ {
+ ModelChest var14;
+
+ if (var1.adjacentChestXPos == null && var1.adjacentChestZPosition == null)
+ {
+ var14 = this.chestModel;
+ this.bindTextureByName("/net/aetherteam/aether/client/sprites/tile_entities/skyrootChest.png");
+ } else
+ {
+ var14 = this.largeChestModel;
+ this.bindTextureByName("/net/aetherteam/aether/client/sprites/tile_entities/skyrootLargeChest.png");
+ }
+
+ GL11.glPushMatrix();
+ GL11.glEnable(GL12.GL_RESCALE_NORMAL);
+ GL11.glTranslatef((float) var2, (float) var4 + 1.0F, (float) var6 + 1.0F);
+ GL11.glScalef(1.0F, -1.0F, -1.0F);
+ GL11.glTranslatef(0.5F, 0.5F, 0.5F);
+ short var11 = 0;
+
+ if (var9 == 2)
+ {
+ var11 = 180;
+ }
+
+ if (var9 == 3)
+ {
+ var11 = 0;
+ }
+
+ if (var9 == 4)
+ {
+ var11 = 90;
+ }
+
+ if (var9 == 5)
+ {
+ var11 = -90;
+ }
+
+ if (var9 == 2 && var1.adjacentChestXPos != null)
+ {
+ GL11.glTranslatef(1.0F, 0.0F, 0.0F);
+ }
+
+ if (var9 == 5 && var1.adjacentChestZPosition != null)
+ {
+ GL11.glTranslatef(0.0F, 0.0F, -1.0F);
+ }
+
+ GL11.glRotatef((float) var11, 0.0F, 1.0F, 0.0F);
+ GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
+ float var12 = var1.prevLidAngle + (var1.lidAngle - var1.prevLidAngle) * var8;
+ float var13;
+
+ if (var1.adjacentChestZNeg != null)
+ {
+ var13 = var1.adjacentChestZNeg.prevLidAngle + (var1.adjacentChestZNeg.lidAngle - var1.adjacentChestZNeg.prevLidAngle) * var8;
+
+ if (var13 > var12)
+ {
+ var12 = var13;
+ }
+ }
+
+ if (var1.adjacentChestXNeg != null)
+ {
+ var13 = var1.adjacentChestXNeg.prevLidAngle + (var1.adjacentChestXNeg.lidAngle - var1.adjacentChestXNeg.prevLidAngle) * var8;
+
+ if (var13 > var12)
+ {
+ var12 = var13;
+ }
+ }
+
+ var12 = 1.0F - var12;
+ var12 = 1.0F - var12 * var12 * var12;
+ var14.chestLid.rotateAngleX = -(var12 * (float) Math.PI / 2.0F);
+ var14.renderAll();
+ GL11.glPopMatrix();
+ }
+ }
+
+ public void renderTileEntityAt(TileEntity var1, double var2, double var4, double var6, float var8)
+ {
+ this.renderTileEntityChestAt((TileEntitySkyrootChest) var1, var2, var4, var6, var8);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/tile_entities/TileEntityTreasureChest.java b/src/main/java/net/aetherteam/aether/tile_entities/TileEntityTreasureChest.java
new file mode 100644
index 0000000..7b488b5
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/tile_entities/TileEntityTreasureChest.java
@@ -0,0 +1,121 @@
+package net.aetherteam.aether.tile_entities;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+
+import java.util.Iterator;
+import java.util.Random;
+
+import net.aetherteam.aether.AetherLoot;
+import net.minecraft.entity.player.EntityPlayerMP;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.network.INetworkManager;
+import net.minecraft.network.packet.Packet;
+import net.minecraft.network.packet.Packet132TileEntityData;
+import net.minecraft.server.management.ServerConfigurationManager;
+import net.minecraft.tileentity.TileEntityChest;
+
+public class TileEntityTreasureChest extends TileEntityChest
+{
+ private boolean locked = true;
+ private int kind = 0;
+
+ /**
+ * Reads a tile entity from NBT.
+ */
+ public void readFromNBT(NBTTagCompound var1)
+ {
+ super.readFromNBT(var1);
+ this.locked = var1.getBoolean("locked");
+ this.kind = var1.getInteger("kind");
+ }
+
+ /**
+ * Writes a tile entity to NBT.
+ */
+ public void writeToNBT(NBTTagCompound var1)
+ {
+ super.writeToNBT(var1);
+ var1.setBoolean("locked", this.locked);
+ var1.setInteger("kind", this.kind);
+ }
+
+ public void unlock(int var1)
+ {
+ this.kind = var1;
+ Random var2 = new Random();
+ int var3;
+
+ if (var1 == 0)
+ {
+ for (var3 = 0; var3 < 5 + var2.nextInt(1); ++var3)
+ {
+ this.setInventorySlotContents(var2.nextInt(this.getSizeInventory()), AetherLoot.BRONZE.getRandomItem(var2));
+ }
+ }
+
+ if (var1 == 1)
+ {
+ for (var3 = 0; var3 < 5 + var2.nextInt(1); ++var3)
+ {
+ this.setInventorySlotContents(var2.nextInt(this.getSizeInventory()), AetherLoot.SILVER.getRandomItem(var2));
+ }
+ }
+
+ if (var1 == 2)
+ {
+ for (var3 = 0; var3 < 5 + var2.nextInt(1); ++var3)
+ {
+ this.setInventorySlotContents(var2.nextInt(this.getSizeInventory()), AetherLoot.GOLD.getRandomItem(var2));
+ }
+ }
+
+ this.locked = false;
+
+ if (!this.worldObj.isRemote)
+ {
+ this.sendToAllInOurWorld(this.getDescriptionPacket());
+ }
+ }
+
+ public void onDataPacket(INetworkManager var1, Packet132TileEntityData var2)
+ {
+ this.readFromNBT(var2.customParam1);
+ }
+
+ /**
+ * Overriden in a sign to provide the text.
+ */
+ public Packet getDescriptionPacket()
+ {
+ NBTTagCompound var1 = new NBTTagCompound();
+ this.writeToNBT(var1);
+ return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 1, var1);
+ }
+
+ private void sendToAllInOurWorld(Packet var1)
+ {
+ ServerConfigurationManager var2 = FMLCommonHandler.instance().getMinecraftServerInstance().getConfigurationManager();
+ Iterator var3 = var2.playerEntityList.iterator();
+
+ while (var3.hasNext())
+ {
+ Object var4 = var3.next();
+ EntityPlayerMP var5 = (EntityPlayerMP) var4;
+
+ if (var5.worldObj == this.worldObj)
+ {
+ var5.playerNetServerHandler.sendPacketToPlayer(var1);
+ }
+ }
+ }
+
+ public boolean isLocked()
+ {
+ return this.locked;
+ }
+
+ public int getKind()
+ {
+ return this.kind;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/tile_entities/TileEntityTreasureChestRenderer.java b/src/main/java/net/aetherteam/aether/tile_entities/TileEntityTreasureChestRenderer.java
new file mode 100644
index 0000000..af932de
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/tile_entities/TileEntityTreasureChestRenderer.java
@@ -0,0 +1,130 @@
+package net.aetherteam.aether.tile_entities;
+
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockChest;
+import net.minecraft.client.model.ModelChest;
+import net.minecraft.client.model.ModelLargeChest;
+import net.minecraft.client.renderer.tileentity.TileEntityChestRenderer;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.tileentity.TileEntityChest;
+import org.lwjgl.opengl.GL11;
+import org.lwjgl.opengl.GL12;
+
+public class TileEntityTreasureChestRenderer extends TileEntityChestRenderer
+{
+ private ModelChest chestModel = new ModelChest();
+ private ModelChest largeChestModel = new ModelLargeChest();
+
+ public void renderTileEntityAt(TileEntity var1, double var2, double var4, double var6, float var8)
+ {
+ this.renderTileEntityChestAt((TileEntityChest) var1, var2, var4, var6, var8);
+ }
+
+ /**
+ * Renders the TileEntity for the chest at a position.
+ */
+ public void renderTileEntityChestAt(TileEntityChest var1, double var2, double var4, double var6, float var8)
+ {
+ int var9;
+
+ if (var1.worldObj == null)
+ {
+ var9 = 0;
+ } else
+ {
+ Block var10 = var1.getBlockType();
+ var9 = var1.getBlockMetadata();
+
+ if (var10 != null && var9 == 0)
+ {
+ ((BlockChest) var10).unifyAdjacentChests(var1.worldObj, var1.xCoord, var1.yCoord, var1.zCoord);
+ var9 = var1.getBlockMetadata();
+ }
+
+ var1.checkForAdjacentChests();
+ }
+
+ if (var1.adjacentChestZNeg == null && var1.adjacentChestXNeg == null)
+ {
+ ModelChest var14;
+
+ if (var1.adjacentChestXPos == null && var1.adjacentChestZPosition == null)
+ {
+ var14 = this.chestModel;
+ this.bindTextureByName("/net/aetherteam/aether/client/sprites/tile_entities/treasureChest.png");
+ } else
+ {
+ var14 = this.largeChestModel;
+ this.bindTextureByName("/net/aetherteam/aether/client/sprites/tile_entities/treasureChest.png");
+ }
+
+ GL11.glPushMatrix();
+ GL11.glEnable(GL12.GL_RESCALE_NORMAL);
+ GL11.glTranslatef((float) var2, (float) var4 + 1.0F, (float) var6 + 1.0F);
+ GL11.glScalef(1.0F, -1.0F, -1.0F);
+ GL11.glTranslatef(0.5F, 0.5F, 0.5F);
+ short var11 = 0;
+
+ if (var9 == 2)
+ {
+ var11 = 180;
+ }
+
+ if (var9 == 3)
+ {
+ var11 = 0;
+ }
+
+ if (var9 == 4)
+ {
+ var11 = 90;
+ }
+
+ if (var9 == 5)
+ {
+ var11 = -90;
+ }
+
+ if (var9 == 2 && var1.adjacentChestXPos != null)
+ {
+ GL11.glTranslatef(1.0F, 0.0F, 0.0F);
+ }
+
+ if (var9 == 5 && var1.adjacentChestZPosition != null)
+ {
+ GL11.glTranslatef(0.0F, 0.0F, -1.0F);
+ }
+
+ GL11.glRotatef((float) var11, 0.0F, 1.0F, 0.0F);
+ GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
+ float var12 = var1.prevLidAngle + (var1.lidAngle - var1.prevLidAngle) * var8;
+ float var13;
+
+ if (var1.adjacentChestZNeg != null)
+ {
+ var13 = var1.adjacentChestZNeg.prevLidAngle + (var1.adjacentChestZNeg.lidAngle - var1.adjacentChestZNeg.prevLidAngle) * var8;
+
+ if (var13 > var12)
+ {
+ var12 = var13;
+ }
+ }
+
+ if (var1.adjacentChestXNeg != null)
+ {
+ var13 = var1.adjacentChestXNeg.prevLidAngle + (var1.adjacentChestXNeg.lidAngle - var1.adjacentChestXNeg.prevLidAngle) * var8;
+
+ if (var13 > var12)
+ {
+ var12 = var13;
+ }
+ }
+
+ var12 = 1.0F - var12;
+ var12 = 1.0F - var12 * var12 * var12;
+ var14.chestLid.rotateAngleX = -(var12 * (float) Math.PI / 2.0F);
+ var14.renderAll();
+ GL11.glPopMatrix();
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/util/Loc.java b/src/main/java/net/aetherteam/aether/util/Loc.java
new file mode 100644
index 0000000..6f91a86
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/util/Loc.java
@@ -0,0 +1,352 @@
+package net.aetherteam.aether.util;
+
+import java.util.ArrayList;
+
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.ChunkCoordinates;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+
+public class Loc
+{
+ public final double x;
+ public final double y;
+ public final double z;
+
+ public static Loc[] vecAdjacent()
+ {
+ Loc[] aloc = {new Loc(0, 0, 1), new Loc(0, 0, -1), new Loc(0, 1, 0), new Loc(0, -1, 0), new Loc(1, 0, 0), new Loc(-1, 0, 0)};
+
+ return aloc;
+ }
+
+ public static Loc[] vecAdjacent2D()
+ {
+ Loc[] aloc = {new Loc(0, 1), new Loc(0, -1), new Loc(1, 0), new Loc(-1, 0)};
+
+ return aloc;
+ }
+
+ public static ArrayList vecInRadius(int i, boolean flag)
+ {
+ ArrayList arraylist = new ArrayList();
+ Loc loc = new Loc();
+ for (int j = -i; j <= i; j++)
+ {
+ for (int k = -i; k <= i; k++)
+ {
+ for (int l = -i; l <= i; l++)
+ {
+ Loc loc1 = new Loc(j, l, k);
+ double d = flag ? loc.distAdv(loc1) : loc.distSimple(loc1);
+ if (d <= i)
+ {
+ arraylist.add(loc1);
+ }
+ }
+
+ }
+
+ }
+
+ return arraylist;
+ }
+
+ public static ArrayList vecInRadius2D(int i, boolean flag)
+ {
+ ArrayList arraylist = new ArrayList();
+ Loc loc = new Loc();
+ for (int j = -i; j <= i; j++)
+ {
+ for (int k = -i; k <= i; k++)
+ {
+ Loc loc1 = new Loc(j, k);
+ double d = flag ? loc.distAdv(loc1) : loc.distSimple(loc1);
+ if (d <= i)
+ {
+ arraylist.add(loc1);
+ }
+ }
+
+ }
+
+ return arraylist;
+ }
+
+ public Loc()
+ {
+ this(0, 0, 0);
+ }
+
+ public Loc(double d, double d1)
+ {
+ this(d, 0.0D, d1);
+ }
+
+ public Loc(double d, double d1, double d2)
+ {
+ this.x = d;
+ this.y = d1;
+ this.z = d2;
+ }
+
+ public Loc(int i, int j)
+ {
+ this(i, 0, j);
+ }
+
+ public Loc(int i, int j, int k)
+ {
+ this((double) i, (double) j, (double) k);
+ }
+
+ public Loc(Loc loc)
+ {
+ this(loc.x, loc.y, loc.z);
+ }
+
+ public Loc(World world)
+ {
+ this(world.getSpawnPoint().posX, world.getSpawnPoint().posY, world.getSpawnPoint().posZ);
+ }
+
+ public Loc add(double d, double d1, double d2)
+ {
+ return new Loc(this.x + d, this.y + d1, this.z + d2);
+ }
+
+ public Loc add(int i, int j, int k)
+ {
+ return new Loc(this.x + i, this.y + j, this.z + k);
+ }
+
+ public Loc add(Loc loc)
+ {
+ return new Loc(this.x + loc.x, this.y + loc.y, this.z + loc.z);
+ }
+
+ public Loc[] adjacent()
+ {
+ Loc[] aloc = vecAdjacent();
+ for (int i = 0; i < aloc.length; i++)
+ {
+ aloc[i] = add(aloc[i]);
+ }
+
+ return aloc;
+ }
+
+ public Loc[] adjacent2D()
+ {
+ Loc[] aloc = vecAdjacent();
+ for (int i = 0; i < aloc.length; i++)
+ {
+ aloc[i] = add(aloc[i]);
+ }
+
+ return aloc;
+ }
+
+ public double distAdv(Loc loc)
+ {
+ return Math.sqrt(Math.pow(this.x - loc.x, 2.0D) + Math.pow(this.y - loc.y, 2.0D) + Math.pow(this.z - loc.z, 2.0D));
+ }
+
+ public int distSimple(Loc loc)
+ {
+ return (int) (Math.abs(this.x - loc.x) + Math.abs(this.y - loc.y) + Math.abs(this.z - loc.z));
+ }
+
+ public boolean equals(Object obj)
+ {
+ if ((obj instanceof Loc))
+ {
+ Loc loc = (Loc) obj;
+ return (this.x == loc.x) && (this.y == loc.y) && (this.z == loc.z);
+ }
+ return false;
+ }
+
+ public int getBlock(IBlockAccess iblockaccess)
+ {
+ return iblockaccess.getBlockId(x(), y(), z());
+ }
+
+ public int getLight(World world)
+ {
+ return world.getFullBlockLightValue(x(), y(), z());
+ }
+
+ public int getMeta(IBlockAccess iblockaccess)
+ {
+ return iblockaccess.getBlockMetadata(x(), y(), z());
+ }
+
+ public Loc getSide(int i)
+ {
+ switch (i)
+ {
+ case 0:
+ return new Loc(this.x, this.y - 1.0D, this.z);
+ case 1:
+ return new Loc(this.x, this.y + 1.0D, this.z);
+ case 2:
+ return new Loc(this.x, this.y, this.z - 1.0D);
+ case 3:
+ return new Loc(this.x, this.y, this.z + 1.0D);
+ case 4:
+ return new Loc(this.x - 1.0D, this.y, this.z);
+ case 5:
+ return new Loc(this.x + 1.0D, this.y, this.z);
+ }
+ return new Loc(this.x, this.y, this.z);
+ }
+
+ public TileEntity getTileEntity(IBlockAccess iblockaccess)
+ {
+ return iblockaccess.getBlockTileEntity(x(), y(), z());
+ }
+
+ public ArrayList inRadius(int i, boolean flag)
+ {
+ ArrayList arraylist = new ArrayList();
+ for (int j = -i; j <= i; j++)
+ {
+ for (int k = -i; k <= i; k++)
+ {
+ for (int l = -i; l <= i; l++)
+ {
+ Loc loc = new Loc(j, l, k).add(this);
+ double d = flag ? distAdv(loc) : distSimple(loc);
+ if (d <= i)
+ {
+ arraylist.add(loc);
+ }
+ }
+
+ }
+
+ }
+
+ return arraylist;
+ }
+
+ public ArrayList inRadius2D(int i, boolean flag)
+ {
+ ArrayList arraylist = new ArrayList();
+ for (int j = -i; j <= i; j++)
+ {
+ for (int k = -i; k <= i; k++)
+ {
+ Loc loc = new Loc(j, k).add(this);
+ double d = flag ? distAdv(loc) : distSimple(loc);
+ if (d <= i)
+ {
+ arraylist.add(loc);
+ }
+ }
+
+ }
+
+ return arraylist;
+ }
+
+ public Loc multiply(double d, double d1, double d2)
+ {
+ return new Loc(this.x * d, this.y * d1, this.z * d2);
+ }
+
+ public Loc notify(World world)
+ {
+ world.notifyBlocksOfNeighborChange(x(), y(), z(), getBlock(world));
+ return this;
+ }
+
+ public Loc removeTileEntity(World world)
+ {
+ world.removeBlockTileEntity(x(), y(), z());
+ return this;
+ }
+
+ public Loc setBlock(World world, int i)
+ {
+ world.setBlock(x(), y(), z(), i);
+ return this;
+ }
+
+ public Loc setBlockAndMeta(World world, int i, int j)
+ {
+ world.setBlock(x(), y(), z(), i, j, 4);
+ return this;
+ }
+
+ public Loc setBlockAndMetaNotify(World world, int i, int j)
+ {
+ world.setBlock(x(), y(), z(), i, j, 4);
+ return this;
+ }
+
+ public Loc setBlockNotify(World world, int i)
+ {
+ world.setBlock(x(), y(), z(), i);
+ return this;
+ }
+
+ public Loc setMeta(World world, int i)
+ {
+ world.setBlockMetadataWithNotify(x(), y(), z(), i, 4);
+ return this;
+ }
+
+ public Loc setMetaNotify(World world, int i)
+ {
+ world.setBlockMetadataWithNotify(x(), y(), z(), i, 4);
+ return this;
+ }
+
+ public Loc setTileEntity(World world, TileEntity tileentity)
+ {
+ world.setBlockTileEntity(x(), y(), z(), tileentity);
+ return this;
+ }
+
+ public Loc subtract(double d, double d1, double d2)
+ {
+ return new Loc(this.x - d, this.y - d1, this.z - d2);
+ }
+
+ public Loc subtract(int i, int j, int k)
+ {
+ return new Loc(this.x - i, this.y - j, this.z - k);
+ }
+
+ public Loc subtract(Loc loc)
+ {
+ return new Loc(this.x - loc.x, this.y - loc.y, this.z - loc.z);
+ }
+
+ public String toString()
+ {
+ return "(" + this.x + "," + this.y + "," + this.z + ")";
+ }
+
+ public int x()
+ {
+ return (int) this.x;
+ }
+
+ public int y()
+ {
+ return (int) this.y;
+ }
+
+ public int z()
+ {
+ return (int) this.z;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.aether.util.Loc
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/aether/worldgen/AetherChunk.java b/src/main/java/net/aetherteam/aether/worldgen/AetherChunk.java
new file mode 100644
index 0000000..a62528a
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/AetherChunk.java
@@ -0,0 +1,31 @@
+package net.aetherteam.aether.worldgen;
+
+import net.minecraft.world.World;
+import net.minecraft.world.chunk.Chunk;
+
+public class AetherChunk extends Chunk
+{
+ public AetherChunk(World var1, byte[] var2, int var3, int var4)
+ {
+ super(var1, var2, var3, var4);
+ }
+
+ /**
+ * Checks whether skylight needs updated; if it does, calls updateSkylight_do
+ */
+ public void updateSkylight()
+ {
+ this.resetRelightChecks();
+ }
+
+ /**
+ * Called once-per-chunk-per-tick, and advances the round-robin relight check index per-storage-block by up to 8
+ * blocks at a time. In a worst-case scenario, can potentially take up to 1.6 seconds, calculated via
+ * (4096/(8*16))/20, to re-check all blocks in a chunk, which could explain both lagging light updates in certain
+ * cases as well as Nether relight
+ */
+ public void enqueueRelightChecks()
+ {
+ this.resetRelightChecks();
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/AetherGenClouds.java b/src/main/java/net/aetherteam/aether/worldgen/AetherGenClouds.java
new file mode 100644
index 0000000..7414a3f
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/AetherGenClouds.java
@@ -0,0 +1,66 @@
+package net.aetherteam.aether.worldgen;
+
+import java.util.Random;
+
+import net.minecraft.world.World;
+import net.minecraft.world.gen.feature.WorldGenerator;
+
+public class AetherGenClouds extends WorldGenerator
+{
+ BronzeDungeon dungeon;
+ private int cloudBlockId;
+ private int meta;
+ private int numberOfBlocks;
+ private boolean flat;
+
+ public AetherGenClouds(int var1, int var2, int var3, boolean var4, BronzeDungeon var5)
+ {
+ this.dungeon = var5;
+ this.cloudBlockId = var1;
+ this.meta = var2;
+ this.numberOfBlocks = var3;
+ this.flat = var4;
+ }
+
+ public boolean generate(World var1, Random var2, int var3, int var4, int var5)
+ {
+ int var6 = var3;
+ int var7 = var4;
+ int var8 = var5;
+ int var9 = var2.nextInt(3) - 1;
+ int var10 = var2.nextInt(3) - 1;
+
+ if (this.meta >= 3)
+ {
+ ;
+ }
+
+ for (int var11 = 0; var11 < this.numberOfBlocks; ++var11)
+ {
+ var6 += var2.nextInt(3) - 1 + var9;
+
+ if (var2.nextBoolean() && !this.flat || this.flat && var2.nextInt(10) == 0)
+ {
+ var7 += var2.nextInt(3) - 1;
+ }
+
+ var8 += var2.nextInt(3) - 1 + var10;
+
+ for (int var12 = var6; var12 < var6 + var2.nextInt(4) + 3 * (this.flat ? 3 : 1); ++var12)
+ {
+ for (int var13 = var7; var13 < var7 + var2.nextInt(1) + 2; ++var13)
+ {
+ for (int var14 = var8; var14 < var8 + var2.nextInt(4) + 3 * (this.flat ? 3 : 1); ++var14)
+ {
+ if (var1.getBlockId(var12, var13, var14) == 0 && Math.abs(var12 - var6) + Math.abs(var13 - var7) + Math.abs(var14 - var8) < 4 * (this.flat ? 3 : 1) + var2.nextInt(2) && !this.dungeon.hasStructureAt(var12, var13, var14))
+ {
+ var1.setBlock(var12, var13, var14, this.cloudBlockId, this.meta, ChunkProviderAether.placementFlagType);
+ }
+ }
+ }
+ }
+ }
+
+ return true;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/AetherGenFlowers.java b/src/main/java/net/aetherteam/aether/worldgen/AetherGenFlowers.java
new file mode 100644
index 0000000..8e54459
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/AetherGenFlowers.java
@@ -0,0 +1,37 @@
+package net.aetherteam.aether.worldgen;
+
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.BlockAetherFlower;
+import net.minecraft.block.Block;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.feature.WorldGenerator;
+
+public class AetherGenFlowers extends WorldGenerator
+{
+ private int plantBlockId;
+ private int placementChance;
+
+ public AetherGenFlowers(int var1, int var2)
+ {
+ this.plantBlockId = var1;
+ this.placementChance = var2;
+ }
+
+ public boolean generate(World var1, Random var2, int var3, int var4, int var5)
+ {
+ for (int var6 = 0; var6 < this.placementChance; ++var6)
+ {
+ int var7 = var3 + var2.nextInt(8) - var2.nextInt(8);
+ int var8 = var4 + var2.nextInt(4) - var2.nextInt(4);
+ int var9 = var5 + var2.nextInt(8) - var2.nextInt(8);
+
+ if (var1.isAirBlock(var7, var8, var9) && ((BlockAetherFlower) Block.blocksList[this.plantBlockId]).canBlockStay(var1, var7, var8, var9))
+ {
+ var1.setBlock(var7, var8, var9, this.plantBlockId);
+ }
+ }
+
+ return true;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/AetherGenLakes.java b/src/main/java/net/aetherteam/aether/worldgen/AetherGenLakes.java
new file mode 100644
index 0000000..4512111
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/AetherGenLakes.java
@@ -0,0 +1,143 @@
+package net.aetherteam.aether.worldgen;
+
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.world.EnumSkyBlock;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.feature.WorldGenerator;
+
+public class AetherGenLakes extends WorldGenerator
+{
+ private int blockIndex;
+
+ public AetherGenLakes(int var1)
+ {
+ this.blockIndex = var1;
+ }
+
+ public boolean generate(World var1, Random var2, int var3, int var4, int var5)
+ {
+ var3 -= 8;
+
+ for (var5 -= 8; var4 > 0 && var1.isAirBlock(var3, var4, var5); --var4)
+ {
+ ;
+ }
+
+ var4 -= 4;
+ boolean[] var6 = new boolean[2048];
+ int var7 = var2.nextInt(4) + 4;
+ int var8;
+
+ for (var8 = 0; var8 < var7; ++var8)
+ {
+ double var9 = var2.nextDouble() * 6.0D + 3.0D;
+ double var11 = var2.nextDouble() * 4.0D + 2.0D;
+ double var13 = var2.nextDouble() * 6.0D + 3.0D;
+ double var15 = var2.nextDouble() * (16.0D - var9 - 2.0D) + 1.0D + var9 / 2.0D;
+ double var17 = var2.nextDouble() * (8.0D - var11 - 4.0D) + 2.0D + var11 / 2.0D;
+ double var19 = var2.nextDouble() * (16.0D - var13 - 2.0D) + 1.0D + var13 / 2.0D;
+
+ for (int var21 = 1; var21 < 15; ++var21)
+ {
+ for (int var22 = 1; var22 < 15; ++var22)
+ {
+ for (int var23 = 1; var23 < 7; ++var23)
+ {
+ double var24 = ((double) var21 - var15) / (var9 / 2.0D);
+ double var26 = ((double) var23 - var17) / (var11 / 2.0D);
+ double var28 = ((double) var22 - var19) / (var13 / 2.0D);
+ double var30 = var24 * var24 + var26 * var26 + var28 * var28;
+
+ if (var30 < 1.0D)
+ {
+ var6[(var21 * 16 + var22) * 8 + var23] = true;
+ }
+ }
+ }
+ }
+ }
+
+ int var32;
+ boolean var33;
+ int var10;
+
+ for (var8 = 0; var8 < 16; ++var8)
+ {
+ for (var32 = 0; var32 < 16; ++var32)
+ {
+ for (var10 = 0; var10 < 8; ++var10)
+ {
+ var33 = !var6[(var8 * 16 + var32) * 8 + var10] && (var8 < 15 && var6[((var8 + 1) * 16 + var32) * 8 + var10] || var8 > 0 && var6[((var8 - 1) * 16 + var32) * 8 + var10] || var32 < 15 && var6[(var8 * 16 + var32 + 1) * 8 + var10] || var32 > 0 && var6[(var8 * 16 + (var32 - 1)) * 8 + var10] || var10 < 7 && var6[(var8 * 16 + var32) * 8 + var10 + 1] || var10 > 0 && var6[(var8 * 16 + var32) * 8 + (var10 - 1)]);
+
+ if (var33)
+ {
+ Material var12 = var1.getBlockMaterial(var3 + var8, var4 + var10, var5 + var32);
+
+ if (var10 >= 4 && var12.isLiquid())
+ {
+ return false;
+ }
+
+ if (var10 < 4 && !var12.isSolid() && var1.getBlockId(var3 + var8, var4 + var10, var5 + var32) != this.blockIndex)
+ {
+ return false;
+ }
+ }
+ }
+ }
+ }
+
+ for (var8 = 0; var8 < 16; ++var8)
+ {
+ for (var32 = 0; var32 < 16; ++var32)
+ {
+ for (var10 = 0; var10 < 8; ++var10)
+ {
+ if (var6[(var8 * 16 + var32) * 8 + var10])
+ {
+ var1.setBlock(var3 + var8, var4 + var10, var5 + var32, var10 < 4 ? this.blockIndex : 0);
+ }
+ }
+ }
+ }
+
+ for (var8 = 0; var8 < 16; ++var8)
+ {
+ for (var32 = 0; var32 < 16; ++var32)
+ {
+ for (var10 = 4; var10 < 8; ++var10)
+ {
+ if (var6[(var8 * 16 + var32) * 8 + var10] && var1.getBlockId(var3 + var8, var4 + var10 - 1, var5 + var32) == AetherBlocks.AetherDirt.blockID && var1.getSavedLightValue(EnumSkyBlock.Sky, var3 + var8, var4 + var10, var5 + var32) > 0)
+ {
+ var1.setBlock(var3 + var8, var4 + var10 - 1, var5 + var32, AetherBlocks.AetherGrass.blockID);
+ }
+ }
+ }
+ }
+
+ if (Block.blocksList[this.blockIndex].blockMaterial == Material.lava)
+ {
+ for (var8 = 0; var8 < 16; ++var8)
+ {
+ for (var32 = 0; var32 < 16; ++var32)
+ {
+ for (var10 = 0; var10 < 8; ++var10)
+ {
+ var33 = !var6[(var8 * 16 + var32) * 8 + var10] && (var8 < 15 && var6[((var8 + 1) * 16 + var32) * 8 + var10] || var8 > 0 && var6[((var8 - 1) * 16 + var32) * 8 + var10] || var32 < 15 && var6[(var8 * 16 + var32 + 1) * 8 + var10] || var32 > 0 && var6[(var8 * 16 + (var32 - 1)) * 8 + var10] || var10 < 7 && var6[(var8 * 16 + var32) * 8 + var10 + 1] || var10 > 0 && var6[(var8 * 16 + var32) * 8 + (var10 - 1)]);
+
+ if (var33 && (var10 < 4 || var2.nextInt(2) != 0) && var1.getBlockMaterial(var3 + var8, var4 + var10, var5 + var32).isSolid())
+ {
+ var1.setBlock(var3 + var8, var4 + var10, var5 + var32, AetherBlocks.Holystone.blockID, 0, ChunkProviderAether.placementFlagType);
+ }
+ }
+ }
+ }
+ }
+
+ return true;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/AetherGenLargeTree.java b/src/main/java/net/aetherteam/aether/worldgen/AetherGenLargeTree.java
new file mode 100644
index 0000000..b1223a8
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/AetherGenLargeTree.java
@@ -0,0 +1,85 @@
+package net.aetherteam.aether.worldgen;
+
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.feature.WorldGenerator;
+
+public class AetherGenLargeTree extends WorldGenerator
+{
+ private int leafBlock;
+ private int logBlock;
+ private int logMetadata;
+
+ public AetherGenLargeTree(int var1, int var2, int var3)
+ {
+ this.leafBlock = var1;
+ this.logBlock = var2;
+ this.logMetadata = var3;
+ }
+
+ public boolean branch(World var1, Random var2, int var3, int var4, int var5, int var6)
+ {
+ int var7 = var2.nextInt(3) - 1;
+ int var8 = var6;
+ int var9 = var2.nextInt(3) - 1;
+ int var10 = var3;
+ int var11 = var5;
+
+ for (int var12 = 0; var12 < 2; ++var12)
+ {
+ var3 += var7;
+ var4 += var8;
+ var5 += var9;
+ var10 -= var7;
+ var11 -= var9;
+
+ if (var1.getBlockId(var3, var4, var5) == this.leafBlock)
+ {
+ var1.setBlock(var3, var4, var5, this.logBlock, this.logMetadata, ChunkProviderAether.placementFlagType);
+ var1.setBlock(var10, var4, var11, this.logBlock, this.logMetadata, ChunkProviderAether.placementFlagType);
+ }
+ }
+
+ return true;
+ }
+
+ public boolean generate(World var1, Random var2, int var3, int var4, int var5)
+ {
+ if (var1.getBlockId(var3, var4 - 1, var5) != AetherBlocks.AetherGrass.blockID && var1.getBlockId(var3, var4 - 1, var5) != AetherBlocks.AetherDirt.blockID)
+ {
+ return false;
+ } else
+ {
+ byte var6 = 11;
+ int var7;
+
+ for (var7 = var3 - 3; var7 < var3 + 5; ++var7)
+ {
+ for (int var8 = var4 + 5; var8 < var4 + 13; ++var8)
+ {
+ for (int var9 = var5 - 3; var9 < var5 + 5; ++var9)
+ {
+ if ((var7 - var3) * (var7 - var3) + (var8 - var4 - 8) * (var8 - var4 - 8) + (var9 - var5) * (var9 - var5) < 12 + var2.nextInt(5) && var1.getBlockId(var7, var8, var9) == 0)
+ {
+ var1.setBlock(var7, var8, var9, this.leafBlock);
+ }
+ }
+ }
+ }
+
+ for (var7 = 0; var7 < var6 - 2; ++var7)
+ {
+ if (var7 > 4)
+ {
+ this.branch(var1, var2, var3, var4 + var7, var5, var7 / 4 - 1);
+ }
+
+ var1.setBlock(var3, var4 + var7, var5, this.logBlock, this.logMetadata, ChunkProviderAether.placementFlagType);
+ }
+
+ return true;
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/AetherGenLiquids.java b/src/main/java/net/aetherteam/aether/worldgen/AetherGenLiquids.java
new file mode 100644
index 0000000..e5a66a9
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/AetherGenLiquids.java
@@ -0,0 +1,93 @@
+package net.aetherteam.aether.worldgen;
+
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.minecraft.block.Block;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.feature.WorldGenerator;
+
+public class AetherGenLiquids extends WorldGenerator
+{
+ private int liquidBlockId;
+
+ public AetherGenLiquids(int var1)
+ {
+ this.liquidBlockId = var1;
+ }
+
+ public boolean generate(World var1, Random var2, int var3, int var4, int var5)
+ {
+ if (var1.getBlockId(var3, var4 + 1, var5) == AetherBlocks.Holystone.blockID && var1.getBlockMetadata(var3, var4 + 1, var5) < 2)
+ {
+ if (var1.getBlockId(var3, var4 - 1, var5) == AetherBlocks.Holystone.blockID && var1.getBlockMetadata(var3, var4 - 1, var5) < 2)
+ {
+ if (var1.getBlockId(var3, var4, var5) != 0 && (var1.getBlockId(var3, var4, var5) != AetherBlocks.Holystone.blockID || var1.getBlockMetadata(var3, var4, var5) >= 2))
+ {
+ return false;
+ } else
+ {
+ int var6 = 0;
+
+ if (var1.getBlockId(var3 - 1, var4, var5) == AetherBlocks.Holystone.blockID || var1.getBlockMetadata(var3 - 1, var4, var5) >= 2)
+ {
+ ++var6;
+ }
+
+ if (var1.getBlockId(var3 + 1, var4, var5) == AetherBlocks.Holystone.blockID || var1.getBlockMetadata(var3 + 1, var4, var5) >= 2)
+ {
+ ++var6;
+ }
+
+ if (var1.getBlockId(var3, var4, var5 - 1) == AetherBlocks.Holystone.blockID || var1.getBlockMetadata(var3, var4, var5 - 1) >= 2)
+ {
+ ++var6;
+ }
+
+ if (var1.getBlockId(var3, var4, var5 + 1) == AetherBlocks.Holystone.blockID || var1.getBlockMetadata(var3, var4, var5 + 1) >= 2)
+ {
+ ++var6;
+ }
+
+ int var7 = 0;
+
+ if (var1.isAirBlock(var3 - 1, var4, var5))
+ {
+ ++var7;
+ }
+
+ if (var1.isAirBlock(var3 + 1, var4, var5))
+ {
+ ++var7;
+ }
+
+ if (var1.isAirBlock(var3, var4, var5 - 1))
+ {
+ ++var7;
+ }
+
+ if (var1.isAirBlock(var3, var4, var5 + 1))
+ {
+ ++var7;
+ }
+
+ if (var6 == 3 && var7 == 1)
+ {
+ var1.setBlock(var3, var4, var5, this.liquidBlockId);
+ var1.scheduledUpdatesAreImmediate = true;
+ Block.blocksList[this.liquidBlockId].updateTick(var1, var3, var4, var5, var2);
+ var1.scheduledUpdatesAreImmediate = false;
+ }
+
+ return true;
+ }
+ } else
+ {
+ return false;
+ }
+ } else
+ {
+ return false;
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/AetherGenMassiveTree.java b/src/main/java/net/aetherteam/aether/worldgen/AetherGenMassiveTree.java
new file mode 100644
index 0000000..327198a
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/AetherGenMassiveTree.java
@@ -0,0 +1,306 @@
+package net.aetherteam.aether.worldgen;
+
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.feature.WorldGenerator;
+
+public class AetherGenMassiveTree extends WorldGenerator
+{
+ int leaves;
+ int randHeight;
+ boolean branches;
+
+ public AetherGenMassiveTree(int var1, int var2, boolean var3)
+ {
+ this.leaves = var1;
+ this.randHeight = var2;
+ this.branches = var3;
+ }
+
+ public boolean generate(World var1, Random var2, int var3, int var4, int var5)
+ {
+ boolean var6 = true;
+ int var7 = var2.nextInt(this.randHeight) + (this.branches ? 8 : 4);
+ int var9;
+ int var8;
+ int var10;
+
+ for (var8 = var3 - 3; var8 < var3 + 3; ++var8)
+ {
+ for (var9 = var4 + 1; var9 < var4 + var7 + 2; ++var9)
+ {
+ for (var10 = var5 - 3; var10 < var5 + 3; ++var10)
+ {
+ if (var1.getBlockId(var8, var9, var10) != 0)
+ {
+ var6 = false;
+ }
+ }
+ }
+ }
+
+ if (var4 + var7 + 2 <= var1.getHeight() && var6)
+ {
+ var8 = var1.getBlockId(var3, var4 - 1, var5);
+
+ if (var8 != AetherBlocks.AetherGrass.blockID && var8 != AetherBlocks.AetherDirt.blockID)
+ {
+ return false;
+ } else
+ {
+ var1.setBlock(var3, var4 - 1, var5, AetherBlocks.AetherDirt.blockID);
+
+ for (var9 = var4; var9 <= var4 + var7; ++var9)
+ {
+ var1.setBlock(var3, var9, var5, AetherBlocks.AetherLog.blockID);
+ }
+
+ if (this.branches)
+ {
+ var1.setBlock(var3 + 1, var4, var5, AetherBlocks.SkyrootLogWall.blockID);
+ var1.setBlock(var3 + 1, var4 + 1, var5, AetherBlocks.SkyrootLogWall.blockID);
+ var1.setBlock(var3 + 2, var4, var5, AetherBlocks.SkyrootLogWall.blockID);
+ var1.setBlock(var3 - 1, var4, var5, AetherBlocks.SkyrootLogWall.blockID);
+ var1.setBlock(var3 - 1, var4 + 1, var5, AetherBlocks.SkyrootLogWall.blockID);
+ var1.setBlock(var3 - 2, var4, var5, AetherBlocks.SkyrootLogWall.blockID);
+ var1.setBlock(var3, var4, var5 + 1, AetherBlocks.SkyrootLogWall.blockID);
+ var1.setBlock(var3, var4 + 1, var5 + 1, AetherBlocks.SkyrootLogWall.blockID);
+ var1.setBlock(var3, var4, var5 + 2, AetherBlocks.SkyrootLogWall.blockID);
+ var1.setBlock(var3, var4, var5 - 1, AetherBlocks.SkyrootLogWall.blockID);
+ var1.setBlock(var3, var4 + 1, var5 - 1, AetherBlocks.SkyrootLogWall.blockID);
+ var1.setBlock(var3, var4, var5 - 2, AetherBlocks.SkyrootLogWall.blockID);
+ var1.setBlock(var3 + 1, var4 - 1, var5, AetherBlocks.AetherGrass.blockID);
+ var1.setBlock(var3 + 2, var4 - 1, var5, AetherBlocks.AetherGrass.blockID);
+ var1.setBlock(var3 - 1, var4 - 1, var5, AetherBlocks.AetherGrass.blockID);
+ var1.setBlock(var3 - 2, var4 - 1, var5, AetherBlocks.AetherGrass.blockID);
+ var1.setBlock(var3, var4 - 1, var5 + 1, AetherBlocks.AetherGrass.blockID);
+ var1.setBlock(var3, var4 - 1, var5 + 2, AetherBlocks.AetherGrass.blockID);
+ var1.setBlock(var3, var4 - 1, var5 - 1, AetherBlocks.AetherGrass.blockID);
+ var1.setBlock(var3, var4 - 1, var5 - 2, AetherBlocks.AetherGrass.blockID);
+ var1.setBlock(var3 + 1, var4 - 2, var5, AetherBlocks.AetherDirt.blockID);
+ var1.setBlock(var3 + 2, var4 - 2, var5, AetherBlocks.AetherDirt.blockID);
+ var1.setBlock(var3 - 1, var4 - 2, var5, AetherBlocks.AetherDirt.blockID);
+ var1.setBlock(var3 - 2, var4 - 2, var5, AetherBlocks.AetherDirt.blockID);
+ var1.setBlock(var3, var4 - 2, var5 + 1, AetherBlocks.AetherDirt.blockID);
+ var1.setBlock(var3, var4 - 2, var5 + 2, AetherBlocks.AetherDirt.blockID);
+ var1.setBlock(var3, var4 - 2, var5 - 1, AetherBlocks.AetherDirt.blockID);
+ var1.setBlock(var3, var4 - 2, var5 - 2, AetherBlocks.AetherDirt.blockID);
+ }
+
+ this.setBlockAirCheck(var1, var3, var4 + var7 + 1, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3, var4 + var7 + 2, var5, this.leaves);
+
+ for (var9 = var4 + 2; var9 <= var4 + var7 + 1; ++var9)
+ {
+ this.setBlockAirCheck(var1, var3 + 1, var9, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var9, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3, var9, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3, var9, var5 - 1, this.leaves);
+ }
+
+ for (var9 = var4 + 3; var9 <= var4 + var7; var9 += 2)
+ {
+ this.setBlockAirCheck(var1, var3 + 1, var9, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var9, var5 - 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var9, var5 - 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var9, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + 2, var9, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 - 2, var9, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3, var9, var5 + 2, this.leaves);
+ this.setBlockAirCheck(var1, var3, var9, var5 - 2, this.leaves);
+ }
+
+ if (this.branches)
+ {
+ var9 = var2.nextInt(3);
+
+ for (var10 = var4 + var2.nextInt(2) + 3; var10 <= var4 + var7 - 2; var10 += 1 + var2.nextInt(3))
+ {
+ int var11 = var2.nextInt(4) + 1;
+ int var12;
+
+ switch (var9)
+ {
+ case 0:
+ for (var12 = var3; var12 <= var3 + var11; ++var12)
+ {
+ var1.setBlock(var12, var10, var5, AetherBlocks.AetherLog.blockID);
+ this.setBlockAirCheck(var1, var12, var10 + 1, var5, this.leaves);
+ this.setBlockAirCheck(var1, var12, var10 - 1, var5, this.leaves);
+ this.setBlockAirCheck(var1, var12 + 1, var10, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var12 - 1, var10, var5 - 1, this.leaves);
+ }
+
+ var1.setBlock(var3 + var11 + 1, var10 + 1, var5, AetherBlocks.AetherLog.blockID);
+ var1.setBlock(var3 + var11 + 2, var10 + 2, var5, AetherBlocks.AetherLog.blockID);
+ var1.setBlock(var3 + var11 + 2, var10 + 3, var5, AetherBlocks.AetherLog.blockID);
+ this.setBlockAirCheck(var1, var3 + var11 + 1, var10 + 2, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11 + 1, var10 + 3, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11 + 2, var10 + 4, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11 + 3, var10 + 2, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11 + 3, var10 + 3, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11 + 2, var10 + 2, var5 - 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11 + 2, var10 + 3, var5 - 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11 + 2, var10 + 2, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11 + 2, var10 + 3, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11 + 1, var10 + 1, var5 - 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11 + 1, var10 + 2, var5 - 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11 + 1, var10 + 1, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11 + 1, var10 + 2, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11, var10, var5 - 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11, var10 + 1, var5 - 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11, var10, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11, var10 + 1, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + (var11 - 1), var10, var5 - 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + (var11 - 1), var10, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + (var11 - 2), var10 - 1, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 + (var11 - 1), var10 - 1, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11, var10 - 1, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11 + 1, var10, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11 + 2, var10 + 1, var5, this.leaves);
+ break;
+
+ case 1:
+ for (var12 = var3; var12 >= var3 - var11; --var12)
+ {
+ var1.setBlock(var12, var10, var5, AetherBlocks.AetherLog.blockID);
+ this.setBlockAirCheck(var1, var12, var10 + 1, var5, this.leaves);
+ this.setBlockAirCheck(var1, var12, var10 - 1, var5, this.leaves);
+ this.setBlockAirCheck(var1, var12 + 1, var10, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var12 - 1, var10, var5 - 1, this.leaves);
+ }
+
+ var1.setBlock(var3 - (var11 + 1), var10 + 1, var5, AetherBlocks.AetherLog.blockID);
+ var1.setBlock(var3 - (var11 + 2), var10 + 2, var5, AetherBlocks.AetherLog.blockID);
+ var1.setBlock(var3 - (var11 + 2), var10 + 3, var5, AetherBlocks.AetherLog.blockID);
+ this.setBlockAirCheck(var1, var3 - (var11 + 1), var10 + 2, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 + 1), var10 + 3, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 + 2), var10 + 4, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 + 3), var10 + 2, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 + 3), var10 + 3, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 + 2), var10 + 2, var5 - 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 + 2), var10 + 3, var5 - 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 + 2), var10 + 2, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 + 2), var10 + 3, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 + 1), var10 + 1, var5 - 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 + 1), var10 + 2, var5 - 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 + 1), var10 + 1, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 + 1), var10 + 2, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - var11, var10, var5 - 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - var11, var10 + 1, var5 - 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - var11, var10, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - var11, var10 + 1, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 - 1), var10, var5 - 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 - 1), var10, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 - 2), var10 - 1, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 - 1), var10 - 1, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 - var11, var10 - 1, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 + 1), var10, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 + 2), var10 + 1, var5, this.leaves);
+ break;
+
+ case 2:
+ for (var12 = var5; var12 <= var5 + var11; ++var12)
+ {
+ var1.setBlock(var3, var10, var12, AetherBlocks.AetherLog.blockID);
+ this.setBlockAirCheck(var1, var3, var10 + 1, var12, this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 - 1, var12, this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var10, var12, this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var10, var12, this.leaves);
+ }
+
+ var1.setBlock(var3, var10 + 1, var5 + var11 + 1, AetherBlocks.AetherLog.blockID);
+ var1.setBlock(var3, var10 + 2, var5 + var11 + 2, AetherBlocks.AetherLog.blockID);
+ var1.setBlock(var3, var10 + 3, var5 + var11 + 2, AetherBlocks.AetherLog.blockID);
+ this.setBlockAirCheck(var1, var3, var10 + 2, var5 + var11 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 + 3, var5 + var11 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 + 4, var5 + var11 + 2, this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 + 2, var5 + var11 + 3, this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 + 3, var5 + var11 + 3, this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var10 + 2, var5 + var11 + 2, this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var10 + 3, var5 + var11 + 2, this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var10 + 2, var5 + var11 + 2, this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var10 + 3, var5 + var11 + 2, this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var10 + 1, var5 + var11 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var10 + 2, var5 + var11 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var10 + 1, var5 + var11 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var10 + 2, var5 + var11 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var10, var5 + var11, this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var10 + 1, var5 + var11, this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var10, var5 + var11, this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var10 + 1, var5 + var11, this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var10, var5 + (var11 - 1), this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var10, var5 + (var11 - 1), this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 - 1, var5 + (var11 - 2), this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 - 1, var5 + (var11 - 1), this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 - 1, var5 + var11, this.leaves);
+ this.setBlockAirCheck(var1, var3, var10, var5 + var11 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 + 1, var5 + var11 + 2, this.leaves);
+ break;
+
+ case 3:
+ for (var12 = var5; var12 >= var5 - var11; --var12)
+ {
+ var1.setBlock(var3, var10, var12, AetherBlocks.AetherLog.blockID);
+ this.setBlockAirCheck(var1, var3, var10 + 1, var12, this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 - 1, var12, this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var10, var12, this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var10, var12, this.leaves);
+ }
+
+ var1.setBlock(var3, var10 + 1, var5 - (var11 + 1), AetherBlocks.AetherLog.blockID);
+ var1.setBlock(var3, var10 + 2, var5 - (var11 + 2), AetherBlocks.AetherLog.blockID);
+ var1.setBlock(var3, var10 + 3, var5 - (var11 + 2), AetherBlocks.AetherLog.blockID);
+ this.setBlockAirCheck(var1, var3, var10 + 2, var5 - (var11 + 1), this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 + 3, var5 - (var11 + 1), this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 + 4, var5 - (var11 + 2), this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 + 2, var5 - (var11 + 3), this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 + 3, var5 - (var11 + 3), this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var10 + 2, var5 - (var11 + 2), this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var10 + 3, var5 - (var11 + 2), this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var10 + 2, var5 - (var11 + 2), this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var10 + 3, var5 - (var11 + 2), this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var10 + 1, var5 - (var11 + 1), this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var10 + 2, var5 - (var11 + 1), this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var10 + 1, var5 - (var11 + 1), this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var10 + 2, var5 - (var11 + 1), this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var10, var5 - var11, this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var10 + 1, var5 - var11, this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var10, var5 - var11, this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var10 + 1, var5 - var11, this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var10, var5 - (var11 - 1), this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var10, var5 - (var11 - 1), this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 - 1, var5 - (var11 - 2), this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 - 1, var5 - (var11 - 1), this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 - 1, var5 - var11, this.leaves);
+ this.setBlockAirCheck(var1, var3, var10, var5 - (var11 + 1), this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 + 1, var5 - (var11 + 2), this.leaves);
+ }
+
+ ++var9;
+
+ if (var9 > 3)
+ {
+ var9 = 0;
+ }
+ }
+ }
+
+ return true;
+ }
+ } else
+ {
+ return false;
+ }
+ }
+
+ public void setBlockAirCheck(World var1, int var2, int var3, int var4, int var5)
+ {
+ if (var1.getBlockId(var2, var3, var4) == 0)
+ {
+ var1.setBlock(var2, var3, var4, var5);
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/AetherGenMinable.java b/src/main/java/net/aetherteam/aether/worldgen/AetherGenMinable.java
new file mode 100644
index 0000000..6e900c0
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/AetherGenMinable.java
@@ -0,0 +1,75 @@
+package net.aetherteam.aether.worldgen;
+
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.feature.WorldGenerator;
+
+public class AetherGenMinable extends WorldGenerator
+{
+ private int minableBlockId;
+ private int numberOfBlocks;
+
+ public AetherGenMinable(int var1, int var2)
+ {
+ this.minableBlockId = var1;
+ this.numberOfBlocks = var2;
+ }
+
+ public boolean generate(World var1, Random var2, int var3, int var4, int var5)
+ {
+ float var6 = var2.nextFloat() * (float) Math.PI;
+ double var7 = (double) ((float) (var3 + 8) + MathHelper.sin(var6) * (float) this.numberOfBlocks / 8.0F);
+ double var9 = (double) ((float) (var3 + 8) - MathHelper.sin(var6) * (float) this.numberOfBlocks / 8.0F);
+ double var11 = (double) ((float) (var5 + 8) + MathHelper.cos(var6) * (float) this.numberOfBlocks / 8.0F);
+ double var13 = (double) ((float) (var5 + 8) - MathHelper.cos(var6) * (float) this.numberOfBlocks / 8.0F);
+ double var15 = (double) (var4 + var2.nextInt(3) + 2);
+ double var17 = (double) (var4 + var2.nextInt(3) + 2);
+
+ for (int var19 = 0; var19 <= this.numberOfBlocks; ++var19)
+ {
+ double var20 = var7 + (var9 - var7) * (double) var19 / (double) this.numberOfBlocks;
+ double var22 = var15 + (var17 - var15) * (double) var19 / (double) this.numberOfBlocks;
+ double var24 = var11 + (var13 - var11) * (double) var19 / (double) this.numberOfBlocks;
+ double var26 = var2.nextDouble() * (double) this.numberOfBlocks / 16.0D;
+ double var28 = (double) (MathHelper.sin((float) var19 * (float) Math.PI / (float) this.numberOfBlocks) + 1.0F) * var26 + 1.0D;
+ double var30 = (double) (MathHelper.sin((float) var19 * (float) Math.PI / (float) this.numberOfBlocks) + 1.0F) * var26 + 1.0D;
+ int var32 = MathHelper.floor_double(var20 - var28 / 2.0D);
+ int var33 = MathHelper.floor_double(var22 - var30 / 2.0D);
+ int var34 = MathHelper.floor_double(var24 - var28 / 2.0D);
+ int var35 = MathHelper.floor_double(var20 + var28 / 2.0D);
+ int var36 = MathHelper.floor_double(var22 + var30 / 2.0D);
+ int var37 = MathHelper.floor_double(var24 + var28 / 2.0D);
+
+ for (int var38 = var32; var38 <= var35; ++var38)
+ {
+ double var39 = ((double) var38 + 0.5D - var20) / (var28 / 2.0D);
+
+ if (var39 * var39 < 1.0D)
+ {
+ for (int var41 = var33; var41 <= var36; ++var41)
+ {
+ double var42 = ((double) var41 + 0.5D - var22) / (var30 / 2.0D);
+
+ if (var39 * var39 + var42 * var42 < 1.0D)
+ {
+ for (int var44 = var34; var44 <= var37; ++var44)
+ {
+ double var45 = ((double) var44 + 0.5D - var24) / (var28 / 2.0D);
+
+ if (var39 * var39 + var42 * var42 + var45 * var45 < 1.0D && var1.getBlockId(var38, var41, var44) == AetherBlocks.Holystone.blockID && var1.getBlockMetadata(var38, var41, var44) <= 1)
+ {
+ var1.setBlock(var38, var41, var44, this.minableBlockId);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return true;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/AetherGenNormalTree.java b/src/main/java/net/aetherteam/aether/worldgen/AetherGenNormalTree.java
new file mode 100644
index 0000000..ad570b3
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/AetherGenNormalTree.java
@@ -0,0 +1,123 @@
+package net.aetherteam.aether.worldgen;
+
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.minecraft.block.Block;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.feature.WorldGenerator;
+
+public class AetherGenNormalTree extends WorldGenerator
+{
+ private int leafBlock;
+ private int logBlock;
+ private int logMetadata;
+
+ public AetherGenNormalTree(int var1, int var2, int var3)
+ {
+ this.leafBlock = var1;
+ this.logBlock = var2;
+ this.logMetadata = var3;
+ }
+
+ public boolean generate(World var1, Random var2, int var3, int var4, int var5)
+ {
+ int var6 = var2.nextInt(3) + 4;
+ boolean var7 = true;
+
+ if (var4 >= 1 && var4 + var6 + 1 <= 128)
+ {
+ int var8;
+ int var11;
+ int var10;
+ int var12;
+
+ for (var8 = var4; var8 <= var4 + 1 + var6; ++var8)
+ {
+ byte var9 = 1;
+
+ if (var8 == var4)
+ {
+ var9 = 0;
+ }
+
+ if (var8 >= var4 + 1 + var6 - 2)
+ {
+ var9 = 2;
+ }
+
+ for (var10 = var3 - var9; var10 <= var3 + var9 && var7; ++var10)
+ {
+ for (var11 = var5 - var9; var11 <= var5 + var9 && var7; ++var11)
+ {
+ if (var8 >= 0 && var8 < 128)
+ {
+ var12 = var1.getBlockId(var10, var8, var11);
+
+ if (var12 != 0 && var12 != this.leafBlock)
+ {
+ var7 = false;
+ }
+ } else
+ {
+ var7 = false;
+ }
+ }
+ }
+ }
+
+ if (!var7)
+ {
+ return false;
+ } else
+ {
+ var8 = var1.getBlockId(var3, var4 - 1, var5);
+
+ if ((var8 == AetherBlocks.AetherGrass.blockID || var8 == AetherBlocks.AetherDirt.blockID) && var4 < 128 - var6 - 1)
+ {
+ var1.setBlock(var3, var4 - 1, var5, AetherBlocks.AetherDirt.blockID);
+ int var16;
+
+ for (var16 = var4 - 3 + var6; var16 <= var4 + var6; ++var16)
+ {
+ var10 = var16 - (var4 + var6);
+ var11 = 1 - var10 / 2;
+
+ for (var12 = var3 - var11; var12 <= var3 + var11; ++var12)
+ {
+ int var13 = var12 - var3;
+
+ for (int var14 = var5 - var11; var14 <= var5 + var11; ++var14)
+ {
+ int var15 = var14 - var5;
+
+ if ((Math.abs(var13) != var11 || Math.abs(var15) != var11 || var2.nextInt(2) != 0 && var10 != 0) && !Block.opaqueCubeLookup[var1.getBlockId(var12, var16, var14)])
+ {
+ var1.setBlock(var12, var16, var14, this.leafBlock);
+ }
+ }
+ }
+ }
+
+ for (var16 = 0; var16 < var6; ++var16)
+ {
+ var10 = var1.getBlockId(var3, var4 + var16, var5);
+
+ if (var10 == 0 || var10 == this.leafBlock)
+ {
+ var1.setBlock(var3, var4 + var16, var5, this.logBlock, this.logMetadata, ChunkProviderAether.placementFlagType);
+ }
+ }
+
+ return true;
+ } else
+ {
+ return false;
+ }
+ }
+ } else
+ {
+ return false;
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/AetherGenOrangeFruit.java b/src/main/java/net/aetherteam/aether/worldgen/AetherGenOrangeFruit.java
new file mode 100644
index 0000000..d17b064
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/AetherGenOrangeFruit.java
@@ -0,0 +1,36 @@
+package net.aetherteam.aether.worldgen;
+
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.blocks.BlockAetherFlower;
+import net.minecraft.block.Block;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.feature.WorldGenerator;
+
+public class AetherGenOrangeFruit extends WorldGenerator
+{
+ private int placementChance;
+
+ public AetherGenOrangeFruit(int var1)
+ {
+ this.placementChance = var1;
+ }
+
+ public boolean generate(World var1, Random var2, int var3, int var4, int var5)
+ {
+ for (int var6 = 0; var6 < this.placementChance; ++var6)
+ {
+ int var7 = var3 + var2.nextInt(8) - var2.nextInt(8);
+ int var8 = var4 + var2.nextInt(4) - var2.nextInt(4);
+ int var9 = var5 + var2.nextInt(8) - var2.nextInt(8);
+
+ if (var1.isAirBlock(var7, var8, var9) && ((BlockAetherFlower) Block.blocksList[AetherBlocks.BlockOrangeTree.blockID]).canBlockStay(var1, var7, var8, var9) && var1.getBlockId(var7, var8 + 1, var9) == 0)
+ {
+ var1.setBlock(var7, var8, var9, AetherBlocks.BlockOrangeTree.blockID, 0, ChunkProviderAether.placementFlagType);
+ }
+ }
+
+ return true;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/AetherGenPurpleTree.java b/src/main/java/net/aetherteam/aether/worldgen/AetherGenPurpleTree.java
new file mode 100644
index 0000000..ff28bbf
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/AetherGenPurpleTree.java
@@ -0,0 +1,274 @@
+package net.aetherteam.aether.worldgen;
+
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.feature.WorldGenerator;
+
+public class AetherGenPurpleTree extends WorldGenerator
+{
+ int leaves;
+ int randHeight;
+ boolean branches;
+
+ public AetherGenPurpleTree(int var1, int var2, boolean var3)
+ {
+ this.leaves = var1;
+ this.randHeight = var2;
+ this.branches = var3;
+ }
+
+ public boolean generate(World var1, Random var2, int var3, int var4, int var5)
+ {
+ boolean var6 = true;
+ int var7 = var2.nextInt(this.randHeight) + (this.branches ? 8 : 4);
+ int var8;
+ int var9;
+ int var10;
+
+ for (var8 = var3 - 3; var8 < var3 + 3; ++var8)
+ {
+ for (var9 = var4 + 1; var9 < var4 + var7 + 2; ++var9)
+ {
+ for (var10 = var5 - 3; var10 < var5 + 3; ++var10)
+ {
+ if (var1.getBlockId(var8, var9, var10) != 0)
+ {
+ var6 = false;
+ }
+ }
+ }
+ }
+
+ if (var4 + var7 + 2 <= var1.getHeight() && var6)
+ {
+ var8 = var1.getBlockId(var3, var4 - 1, var5);
+
+ if (var8 != AetherBlocks.AetherGrass.blockID && var8 != AetherBlocks.AetherDirt.blockID)
+ {
+ return false;
+ } else
+ {
+ var1.setBlock(var3, var4 - 1, var5, AetherBlocks.AetherDirt.blockID);
+
+ for (var9 = var4; var9 <= var4 + var7; ++var9)
+ {
+ var1.setBlock(var3, var9, var5, AetherBlocks.SkyrootLogWall.blockID);
+ }
+
+ this.setBlockAirCheck(var1, var3, var4 + var7 + 1, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3, var4 + var7 + 2, var5, this.leaves);
+
+ for (var9 = var4 + 2; var9 <= var4 + var7 + 1; ++var9)
+ {
+ this.setBlockAirCheck(var1, var3 + 1, var9, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var9, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3, var9, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3, var9, var5 - 1, this.leaves);
+ }
+
+ for (var9 = var4 + 3; var9 <= var4 + var7; var9 += 2)
+ {
+ this.setBlockAirCheck(var1, var3 + 1, var9, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var9, var5 - 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var9, var5 - 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var9, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + 2, var9, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 - 2, var9, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3, var9, var5 + 2, this.leaves);
+ this.setBlockAirCheck(var1, var3, var9, var5 - 2, this.leaves);
+ }
+
+ if (this.branches)
+ {
+ var9 = var2.nextInt(3);
+
+ for (var10 = var4 + var2.nextInt(2) + 3; var10 <= var4 + var7 - 2; var10 += 1 + var2.nextInt(3))
+ {
+ int var11 = var2.nextInt(2) + 1;
+ int var12;
+
+ switch (var9)
+ {
+ case 0:
+ for (var12 = var3; var12 <= var3 + var11; ++var12)
+ {
+ var1.setBlock(var12, var10, var5, AetherBlocks.AetherLog.blockID);
+ this.setBlockAirCheck(var1, var12, var10 + 1, var5, this.leaves);
+ this.setBlockAirCheck(var1, var12, var10 - 1, var5, this.leaves);
+ this.setBlockAirCheck(var1, var12 + 1, var10, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var12 - 1, var10, var5 - 1, this.leaves);
+ }
+
+ var1.setBlock(var3 + var11 + 1, var10 + 1, var5, AetherBlocks.AetherLog.blockID);
+ var1.setBlock(var3 + var11 + 2, var10 + 2, var5, AetherBlocks.AetherLog.blockID);
+ var1.setBlock(var3 + var11 + 2, var10 + 3, var5, AetherBlocks.AetherLog.blockID);
+ this.setBlockAirCheck(var1, var3 + var11 + 1, var10 + 2, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11 + 1, var10 + 3, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11 + 2, var10 + 4, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11 + 3, var10 + 2, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11 + 3, var10 + 3, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11 + 2, var10 + 2, var5 - 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11 + 2, var10 + 3, var5 - 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11 + 2, var10 + 2, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11 + 2, var10 + 3, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11 + 1, var10 + 1, var5 - 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11 + 1, var10 + 2, var5 - 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11 + 1, var10 + 1, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11 + 1, var10 + 2, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11, var10, var5 - 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11, var10 + 1, var5 - 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11, var10, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11, var10 + 1, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + (var11 - 1), var10, var5 - 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + (var11 - 1), var10, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + (var11 - 2), var10 - 1, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 + (var11 - 1), var10 - 1, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11, var10 - 1, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11 + 1, var10, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 + var11 + 2, var10 + 1, var5, this.leaves);
+ break;
+
+ case 1:
+ for (var12 = var3; var12 >= var3 - var11; --var12)
+ {
+ var1.setBlock(var12, var10, var5, AetherBlocks.AetherLog.blockID);
+ this.setBlockAirCheck(var1, var12, var10 + 1, var5, this.leaves);
+ this.setBlockAirCheck(var1, var12, var10 - 1, var5, this.leaves);
+ this.setBlockAirCheck(var1, var12 + 1, var10, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var12 - 1, var10, var5 - 1, this.leaves);
+ }
+
+ var1.setBlock(var3 - (var11 + 1), var10 + 1, var5, AetherBlocks.AetherLog.blockID);
+ var1.setBlock(var3 - (var11 + 2), var10 + 2, var5, AetherBlocks.AetherLog.blockID);
+ var1.setBlock(var3 - (var11 + 2), var10 + 3, var5, AetherBlocks.AetherLog.blockID);
+ this.setBlockAirCheck(var1, var3 - (var11 + 1), var10 + 2, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 + 1), var10 + 3, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 + 2), var10 + 4, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 + 3), var10 + 2, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 + 3), var10 + 3, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 + 2), var10 + 2, var5 - 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 + 2), var10 + 3, var5 - 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 + 2), var10 + 2, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 + 2), var10 + 3, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 + 1), var10 + 1, var5 - 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 + 1), var10 + 2, var5 - 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 + 1), var10 + 1, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 + 1), var10 + 2, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - var11, var10, var5 - 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - var11, var10 + 1, var5 - 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - var11, var10, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - var11, var10 + 1, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 - 1), var10, var5 - 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 - 1), var10, var5 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 - 2), var10 - 1, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 - 1), var10 - 1, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 - var11, var10 - 1, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 + 1), var10, var5, this.leaves);
+ this.setBlockAirCheck(var1, var3 - (var11 + 2), var10 + 1, var5, this.leaves);
+ break;
+
+ case 2:
+ for (var12 = var5; var12 <= var5 + var11; ++var12)
+ {
+ var1.setBlock(var3, var10, var12, AetherBlocks.AetherLog.blockID);
+ this.setBlockAirCheck(var1, var3, var10 + 1, var12, this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 - 1, var12, this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var10, var12, this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var10, var12, this.leaves);
+ }
+
+ var1.setBlock(var3, var10 + 1, var5 + var11 + 1, AetherBlocks.AetherLog.blockID);
+ var1.setBlock(var3, var10 + 2, var5 + var11 + 2, AetherBlocks.AetherLog.blockID);
+ var1.setBlock(var3, var10 + 3, var5 + var11 + 2, AetherBlocks.AetherLog.blockID);
+ this.setBlockAirCheck(var1, var3, var10 + 2, var5 + var11 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 + 3, var5 + var11 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 + 4, var5 + var11 + 2, this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 + 2, var5 + var11 + 3, this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 + 3, var5 + var11 + 3, this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var10 + 2, var5 + var11 + 2, this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var10 + 3, var5 + var11 + 2, this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var10 + 2, var5 + var11 + 2, this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var10 + 3, var5 + var11 + 2, this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var10 + 1, var5 + var11 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var10 + 2, var5 + var11 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var10 + 1, var5 + var11 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var10 + 2, var5 + var11 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var10, var5 + var11, this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var10 + 1, var5 + var11, this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var10, var5 + var11, this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var10 + 1, var5 + var11, this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var10, var5 + (var11 - 1), this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var10, var5 + (var11 - 1), this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 - 1, var5 + (var11 - 2), this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 - 1, var5 + (var11 - 1), this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 - 1, var5 + var11, this.leaves);
+ this.setBlockAirCheck(var1, var3, var10, var5 + var11 + 1, this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 + 1, var5 + var11 + 2, this.leaves);
+ break;
+
+ case 3:
+ for (var12 = var5; var12 >= var5 - var11; --var12)
+ {
+ var1.setBlock(var3, var10, var12, AetherBlocks.AetherLog.blockID);
+ this.setBlockAirCheck(var1, var3, var10 + 1, var12, this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 - 1, var12, this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var10, var12, this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var10, var12, this.leaves);
+ }
+
+ var1.setBlock(var3, var10 + 1, var5 - (var11 + 1), AetherBlocks.AetherLog.blockID);
+ var1.setBlock(var3, var10 + 2, var5 - (var11 + 2), AetherBlocks.AetherLog.blockID);
+ var1.setBlock(var3, var10 + 3, var5 - (var11 + 2), AetherBlocks.AetherLog.blockID);
+ this.setBlockAirCheck(var1, var3, var10 + 2, var5 - (var11 + 1), this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 + 3, var5 - (var11 + 1), this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 + 4, var5 - (var11 + 2), this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 + 2, var5 - (var11 + 3), this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 + 3, var5 - (var11 + 3), this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var10 + 2, var5 - (var11 + 2), this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var10 + 3, var5 - (var11 + 2), this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var10 + 2, var5 - (var11 + 2), this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var10 + 3, var5 - (var11 + 2), this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var10 + 1, var5 - (var11 + 1), this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var10 + 2, var5 - (var11 + 1), this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var10 + 1, var5 - (var11 + 1), this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var10 + 2, var5 - (var11 + 1), this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var10, var5 - var11, this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var10 + 1, var5 - var11, this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var10, var5 - var11, this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var10 + 1, var5 - var11, this.leaves);
+ this.setBlockAirCheck(var1, var3 - 1, var10, var5 - (var11 - 1), this.leaves);
+ this.setBlockAirCheck(var1, var3 + 1, var10, var5 - (var11 - 1), this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 - 1, var5 - (var11 - 2), this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 - 1, var5 - (var11 - 1), this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 - 1, var5 - var11, this.leaves);
+ this.setBlockAirCheck(var1, var3, var10, var5 - (var11 + 1), this.leaves);
+ this.setBlockAirCheck(var1, var3, var10 + 1, var5 - (var11 + 2), this.leaves);
+ }
+
+ ++var9;
+
+ if (var9 > 3)
+ {
+ var9 = 0;
+ }
+ }
+ }
+
+ return true;
+ }
+ } else
+ {
+ return false;
+ }
+ }
+
+ public void setBlockAirCheck(World var1, int var2, int var3, int var4, int var5)
+ {
+ if (var1.getBlockId(var2, var3, var4) == 0)
+ {
+ var1.setBlock(var2, var3, var4, var5);
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/AetherGenQuicksoil.java b/src/main/java/net/aetherteam/aether/worldgen/AetherGenQuicksoil.java
new file mode 100644
index 0000000..9c1b83e
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/AetherGenQuicksoil.java
@@ -0,0 +1,32 @@
+package net.aetherteam.aether.worldgen;
+
+import java.util.Random;
+
+import net.minecraft.world.World;
+import net.minecraft.world.gen.feature.WorldGenerator;
+
+public class AetherGenQuicksoil extends WorldGenerator
+{
+ private int minableBlockId;
+
+ public AetherGenQuicksoil(int var1)
+ {
+ this.minableBlockId = var1;
+ }
+
+ public boolean generate(World var1, Random var2, int var3, int var4, int var5)
+ {
+ for (int var6 = var3 - 3; var6 < var3 + 4; ++var6)
+ {
+ for (int var7 = var5 - 3; var7 < var5 + 4; ++var7)
+ {
+ if (var1.getBlockId(var6, var4, var7) == 0 && (var6 - var3) * (var6 - var3) + (var7 - var5) * (var7 - var5) < 12)
+ {
+ var1.setBlock(var6, var4, var7, this.minableBlockId);
+ }
+ }
+ }
+
+ return true;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/AetherPortalPosition.java b/src/main/java/net/aetherteam/aether/worldgen/AetherPortalPosition.java
new file mode 100644
index 0000000..802878c
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/AetherPortalPosition.java
@@ -0,0 +1,23 @@
+package net.aetherteam.aether.worldgen;
+
+import net.minecraft.world.PortalPosition;
+
+public class AetherPortalPosition extends PortalPosition
+{
+ /**
+ * The worldtime at which this PortalPosition was last verified
+ */
+ public long lastUpdateTime;
+
+ /**
+ * The teleporter to which this PortalPosition applies
+ */
+ final TeleporterAether teleporterInstance;
+
+ public AetherPortalPosition(TeleporterAether var1, int var2, int var3, int var4, long var5)
+ {
+ super(var1, var2, var3, var4, var5);
+ this.teleporterInstance = var1;
+ this.lastUpdateTime = var5;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/AetherWorldType.java b/src/main/java/net/aetherteam/aether/worldgen/AetherWorldType.java
new file mode 100644
index 0000000..ab51857
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/AetherWorldType.java
@@ -0,0 +1,53 @@
+package net.aetherteam.aether.worldgen;
+
+import net.minecraft.world.World;
+import net.minecraft.world.WorldType;
+import net.minecraft.world.biome.WorldChunkManager;
+import net.minecraft.world.chunk.IChunkProvider;
+
+public class AetherWorldType extends WorldType
+{
+ public AetherWorldType(int var1, String var2)
+ {
+ super(var1, var2, 0);
+ this.biomesForWorldType[0] = new BiomeGenAether();
+ }
+
+ public double getHorizon(World var1)
+ {
+ return 0.0D;
+ }
+
+ public boolean hasVoidParticles(boolean var1)
+ {
+ return false;
+ }
+
+ public double voidFadeMagnitude()
+ {
+ return 1.0D;
+ }
+
+ public String getWorldTypeName()
+ {
+ return "Aether";
+ }
+
+ /**
+ * Gets the translation key for the name of this world type.
+ */
+ public String getTranslateName()
+ {
+ return "Aether";
+ }
+
+ public WorldChunkManager getChunkManager(World var1)
+ {
+ return new WorldChunkManagerAether(0.5D);
+ }
+
+ public IChunkProvider getChunkGenerator(World var1, String var2)
+ {
+ return new ChunkProviderAether(var1, var1.getSeed());
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/BiomeGenAether.java b/src/main/java/net/aetherteam/aether/worldgen/BiomeGenAether.java
new file mode 100644
index 0000000..c8fdb3a
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/BiomeGenAether.java
@@ -0,0 +1,51 @@
+package net.aetherteam.aether.worldgen;
+
+import cpw.mods.fml.common.registry.GameRegistry;
+
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.minecraft.world.biome.BiomeGenBase;
+import net.minecraft.world.gen.feature.WorldGenTallGrass;
+import net.minecraft.world.gen.feature.WorldGenerator;
+
+public class BiomeGenAether extends BiomeGenBase
+{
+ public BiomeGenAether()
+ {
+ super(237);
+ this.rainfall = 0.0F;
+ this.spawnableMonsterList.clear();
+ this.spawnableCreatureList.clear();
+ this.spawnableWaterCreatureList.clear();
+ this.spawnableCaveCreatureList.clear();
+ this.setBiomeName("Aether");
+ this.setDisableRain();
+ GameRegistry.removeBiome(this);
+ }
+
+ /**
+ * Gets a WorldGen appropriate for this biome.
+ */
+ public WorldGenerator getRandomWorldGenForTrees(Random var1)
+ {
+ int var2 = var1.nextInt(100);
+ return (WorldGenerator) (var2 <= 9 ? new AetherGenNormalTree(AetherBlocks.GreenSkyrootLeaves.blockID, AetherBlocks.AetherLog.blockID, 0) : (var2 > 9 && var2 <= 18 ? new AetherGenLargeTree(AetherBlocks.GreenSkyrootLeaves.blockID, AetherBlocks.AetherLog.blockID, 0) : (var2 > 18 && var2 <= 35 ? new AetherGenNormalTree(AetherBlocks.BlueSkyrootLeaves.blockID, AetherBlocks.AetherLog.blockID, 0) : (var2 > 35 && var2 <= 63 ? new AetherGenMassiveTree(AetherBlocks.GreenSkyrootLeaves.blockID, 8, false) : (var2 > 63 && var2 <= 80 ? new AetherGenMassiveTree(AetherBlocks.BlueSkyrootLeaves.blockID, 8, false) : (var2 > 80 && var2 <= 85 ? new AetherGenLargeTree(AetherBlocks.GoldenOakLeaves.blockID, AetherBlocks.AetherLog.blockID, 2) : (var2 > 85 && var2 <= 90 ? new AetherGenMassiveTree(AetherBlocks.GreenSkyrootLeaves.blockID, 20, true) : (var2 > 90 && var2 <= 95 ? new AetherGenPurpleTree(AetherBlocks.PurpleSkyrootLeaves.blockID, 5, true) : new AetherGenMassiveTree(AetherBlocks.DarkBlueSkyrootLeaves.blockID, 35, true)))))))));
+ }
+
+ /**
+ * Gets a WorldGen appropriate for this biome.
+ */
+ public WorldGenerator getRandomWorldGenForGrass(Random var1)
+ {
+ return new WorldGenTallGrass(AetherBlocks.TallAetherGrass.blockID, 1);
+ }
+
+ /**
+ * takes temperature, returns color
+ */
+ public int getSkyColorByTemp(float var1)
+ {
+ return 12632319;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/BronzeDungeon.java b/src/main/java/net/aetherteam/aether/worldgen/BronzeDungeon.java
new file mode 100644
index 0000000..c91109d
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/BronzeDungeon.java
@@ -0,0 +1,146 @@
+package net.aetherteam.aether.worldgen;
+
+import java.io.Serializable;
+import java.util.ConcurrentModificationException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Random;
+
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.minecraft.world.ChunkCoordIntPair;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.MapGenBase;
+import net.minecraft.world.gen.structure.StructureBoundingBox;
+import net.minecraft.world.gen.structure.StructureComponent;
+
+public class BronzeDungeon extends MapGenBase implements Serializable
+{
+ private double rarity = 0.2D;
+ public Map structureMap = new HashMap();
+ int tried = 0;
+ List neqstructureMap = new LinkedList();
+
+ protected boolean canSpawnStructureAtCoords(int var1, int var2)
+ {
+ return var1 % 13 == 0 && var2 % 13 == 0 && this.rand.nextDouble() < this.rarity;
+ }
+
+ /**
+ * Recursively called by generate() (generate) and optionally by itself.
+ */
+ protected void recursiveGenerate(World var1, int var2, int var3, int var4, int var5, byte[] var6)
+ {
+ if (!this.structureMap.containsKey(Long.valueOf(ChunkCoordIntPair.chunkXZ2Int(var2, var3))))
+ {
+ this.rand.nextInt();
+
+ if (this.canSpawnStructureAtCoords(var2, var3))
+ {
+ StructureBronzeDungeonStart var7 = this.getStructureStart(var2, var3);
+ this.structureMap.put(Long.valueOf(ChunkCoordIntPair.chunkXZ2Int(var2, var3)), var7);
+ }
+ }
+ }
+
+ public boolean generateStructuresInChunk(World var1, Random var2, int var3, int var4, double[] var5)
+ {
+ int var6 = (var3 << 4) + 8;
+ int var7 = (var4 << 4) + 8;
+ boolean var8 = false;
+ this.neqstructureMap.clear();
+ Iterator var9 = this.structureMap.values().iterator();
+
+ try
+ {
+ while (var9.hasNext())
+ {
+ StructureBronzeDungeonStart var10 = (StructureBronzeDungeonStart) var9.next();
+
+ if (var10.getBoundingBox().intersectsWith(var6 - 15, var7 - 15, var6 + 31, var7 + 31))
+ {
+ var10.generateStructure(var1, var2, new StructureBoundingBox(var6, var7, var6 + 15, var7 + 15), var5);
+ var8 = true;
+ }
+ }
+ } catch (ConcurrentModificationException var11)
+ {
+ var11.printStackTrace();
+ ++this.tried;
+
+ if (this.tried < 4)
+ {
+ this.generateStructuresInChunk(var1, var2, var3, var4, var5);
+ }
+ }
+
+ this.tried = 0;
+ return var8;
+ }
+
+ public boolean hasStructureAt(int var1, int var2, int var3)
+ {
+ Iterator var4 = this.structureMap.values().iterator();
+
+ while (var4.hasNext())
+ {
+ StructureBronzeDungeonStart var5 = (StructureBronzeDungeonStart) var4.next();
+
+ if (var5.getBoundingBox().intersectsWith(var1, var3, var1, var3))
+ {
+ Iterator var6 = var5.getComponents().iterator();
+
+ while (var6.hasNext())
+ {
+ StructureComponent var7 = (StructureComponent) var6.next();
+
+ if (var7.getBoundingBox().isVecInside(var1, var2, var3))
+ {
+ return true;
+ }
+ }
+ }
+ }
+
+ return false;
+ }
+
+ public boolean intersectsWith(StructureBoundingBox var1, int var2, int var3, int var4)
+ {
+ return var1.maxX >= var2 && var1.minX <= var2 && var1.maxZ >= var4 && var1.minZ <= var4 && var3 <= var1.maxY && var3 >= var1.minY;
+ }
+
+ public Dungeon getDungeonInstanceAt(int var1, int var2, int var3)
+ {
+ Iterator var4 = this.structureMap.values().iterator();
+
+ while (var4.hasNext())
+ {
+ StructureBronzeDungeonStart var5 = (StructureBronzeDungeonStart) var4.next();
+
+ if (var5.getBoundingBox().intersectsWith(var1, var3, var1, var3))
+ {
+ Iterator var6 = var5.getComponents().iterator();
+
+ while (var6.hasNext())
+ {
+ StructureComponent var7 = (StructureComponent) var6.next();
+
+ if (this.intersectsWith(var7.getBoundingBox(), var1, var2, var3))
+ {
+ return var5.dungeonInstance;
+ }
+ }
+ }
+ }
+
+ return null;
+ }
+
+ protected StructureBronzeDungeonStart getStructureStart(int var1, int var2)
+ {
+ return new StructureBronzeDungeonStart(this.worldObj, this.rand, var1, var2);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/ChunkProviderAether.java b/src/main/java/net/aetherteam/aether/worldgen/ChunkProviderAether.java
new file mode 100644
index 0000000..4cdce7f
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/ChunkProviderAether.java
@@ -0,0 +1,670 @@
+package net.aetherteam.aether.worldgen;
+
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.Aether;
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockSand;
+import net.minecraft.entity.EnumCreatureType;
+import net.minecraft.util.IProgressUpdate;
+import net.minecraft.world.ChunkPosition;
+import net.minecraft.world.SpawnerAnimals;
+import net.minecraft.world.World;
+import net.minecraft.world.biome.BiomeGenBase;
+import net.minecraft.world.biome.WorldChunkManager;
+import net.minecraft.world.chunk.Chunk;
+import net.minecraft.world.chunk.IChunkProvider;
+import net.minecraft.world.gen.MapGenBase;
+import net.minecraft.world.gen.MapGenCaves;
+import net.minecraft.world.gen.NoiseGeneratorOctaves;
+import net.minecraft.world.gen.feature.WorldGenerator;
+
+public class ChunkProviderAether implements IChunkProvider
+{
+ private Random random;
+ private NoiseGeneratorOctaves noiseGenerator1;
+ private NoiseGeneratorOctaves noiseGenerator2;
+ private NoiseGeneratorOctaves noiseGenerator3;
+ private NoiseGeneratorOctaves noiseGenerator4;
+ private NoiseGeneratorOctaves noiseGenerator5;
+ public NoiseGeneratorOctaves noiseGenerator6;
+ public NoiseGeneratorOctaves noiseGenerator7;
+ public NoiseGeneratorOctaves noiseGenerator8;
+ private World worldObj;
+ private double[] field_28080_q;
+ private double[] field_28079_r = new double[256];
+ private double[] field_28078_s = new double[256];
+ private double[] field_28077_t = new double[256];
+ private MapGenBase mapGenCaves = new MapGenCaves();
+ double[] field_28093_d;
+ double[] field_28092_e;
+ double[] field_28091_f;
+ double[] field_28090_g;
+ double[] field_28089_h;
+ int[][] field_28088_i = new int[32][32];
+ public byte topAetherBlock;
+ public byte fillerAetherBlock;
+ public static BronzeDungeon bronzeDungeon = new BronzeDungeon();
+ public static int gumCount;
+ public static int placementFlagType = 3;
+
+ public ChunkProviderAether(World var1, long var2)
+ {
+ this.worldObj = var1;
+ this.random = new Random(var2);
+ this.noiseGenerator1 = new NoiseGeneratorOctaves(this.random, 16);
+ this.noiseGenerator2 = new NoiseGeneratorOctaves(this.random, 16);
+ this.noiseGenerator3 = new NoiseGeneratorOctaves(this.random, 8);
+ this.noiseGenerator4 = new NoiseGeneratorOctaves(this.random, 4);
+ this.noiseGenerator5 = new NoiseGeneratorOctaves(this.random, 4);
+ this.noiseGenerator6 = new NoiseGeneratorOctaves(this.random, 10);
+ this.noiseGenerator7 = new NoiseGeneratorOctaves(this.random, 16);
+ this.noiseGenerator8 = new NoiseGeneratorOctaves(this.random, 8);
+ }
+
+ /**
+ * Returns if the IChunkProvider supports saving.
+ */
+ public boolean canSave()
+ {
+ return true;
+ }
+
+ /**
+ * Checks to see if a chunk exists at x, y
+ */
+ public boolean chunkExists(int var1, int var2)
+ {
+ return true;
+ }
+
+ /**
+ * Returns the location of the closest structure of the specified type. If not found returns null.
+ */
+ public ChunkPosition findClosestStructure(World var1, String var2, int var3, int var4, int var5)
+ {
+ return null;
+ }
+
+ public void func_28071_a(int var1, int var2, byte[] var3)
+ {
+ byte var4 = 2;
+ int var5 = var4 + 1;
+ byte var6 = 33;
+ int var7 = var4 + 1;
+ this.field_28080_q = this.func_28073_a(this.field_28080_q, var1 * var4, 0, var2 * var4, var5, var6, var7);
+
+ for (int var8 = 0; var8 < var4; ++var8)
+ {
+ for (int var9 = 0; var9 < var4; ++var9)
+ {
+ for (int var10 = 0; var10 < 32; ++var10)
+ {
+ double var11 = 0.25D;
+ double var13 = this.field_28080_q[((var8 + 0) * var7 + var9 + 0) * var6 + var10 + 0];
+ double var15 = this.field_28080_q[((var8 + 0) * var7 + var9 + 1) * var6 + var10 + 0];
+ double var17 = this.field_28080_q[((var8 + 1) * var7 + var9 + 0) * var6 + var10 + 0];
+ double var19 = this.field_28080_q[((var8 + 1) * var7 + var9 + 1) * var6 + var10 + 0];
+ double var21 = (this.field_28080_q[((var8 + 0) * var7 + var9 + 0) * var6 + var10 + 1] - var13) * var11;
+ double var23 = (this.field_28080_q[((var8 + 0) * var7 + var9 + 1) * var6 + var10 + 1] - var15) * var11;
+ double var25 = (this.field_28080_q[((var8 + 1) * var7 + var9 + 0) * var6 + var10 + 1] - var17) * var11;
+ double var27 = (this.field_28080_q[((var8 + 1) * var7 + var9 + 1) * var6 + var10 + 1] - var19) * var11;
+
+ for (int var29 = 0; var29 < 4; ++var29)
+ {
+ double var30 = 0.125D;
+ double var32 = var13;
+ double var34 = var15;
+ double var36 = (var17 - var13) * var30;
+ double var38 = (var19 - var15) * var30;
+
+ for (int var40 = 0; var40 < 8; ++var40)
+ {
+ int var41 = var40 + var8 * 8 << 11 | 0 + var9 * 8 << 7 | var10 * 4 + var29;
+ short var42 = 128;
+ double var43 = 0.125D;
+ double var45 = var32;
+ double var47 = (var34 - var32) * var43;
+
+ for (int var49 = 0; var49 < 8; ++var49)
+ {
+ int var50 = 0;
+
+ if (var45 > 0.0D)
+ {
+ var50 = AetherBlocks.Holystone.blockID;
+ }
+
+ var3[var41] = (byte) var50;
+ var41 += var42;
+ var45 += var47;
+ }
+
+ var32 += var36;
+ var34 += var38;
+ }
+
+ var13 += var21;
+ var15 += var23;
+ var17 += var25;
+ var19 += var27;
+ }
+ }
+ }
+ }
+ }
+
+ public void func_28072_a(int var1, int var2, byte[] var3)
+ {
+ double var4 = 0.03125D;
+ this.field_28079_r = this.noiseGenerator4.generateNoiseOctaves(this.field_28079_r, var1 * 16, var2 * 16, 0, 16, 16, 1, var4, var4, 1.0D);
+ this.field_28078_s = this.noiseGenerator4.generateNoiseOctaves(this.field_28078_s, var1 * 16, 109, var2 * 16, 16, 1, 16, var4, 1.0D, var4);
+ this.field_28077_t = this.noiseGenerator5.generateNoiseOctaves(this.field_28077_t, var1 * 16, var2 * 16, 0, 16, 16, 1, var4 * 2.0D, var4 * 2.0D, var4 * 2.0D);
+
+ for (int var6 = 0; var6 < 16; ++var6)
+ {
+ for (int var7 = 0; var7 < 16; ++var7)
+ {
+ int var8 = (int) (this.field_28077_t[var6 + var7 * 16] / 3.0D + 3.0D + this.random.nextDouble() * 0.25D);
+ int var9 = -1;
+ this.topAetherBlock = (byte) AetherBlocks.AetherGrass.blockID;
+ this.fillerAetherBlock = (byte) AetherBlocks.AetherDirt.blockID;
+ byte var10 = this.topAetherBlock;
+ byte var11 = this.fillerAetherBlock;
+ byte var12 = (byte) AetherBlocks.Holystone.blockID;
+
+ if (var10 < 0)
+ {
+ var10 = (byte) (var10 + 0);
+ }
+
+ if (var11 < 0)
+ {
+ var11 = (byte) (var11 + 0);
+ }
+
+ if (var12 < 0)
+ {
+ var12 = (byte) (var12 + 0);
+ }
+
+ for (int var13 = 127; var13 >= 0; --var13)
+ {
+ int var14 = (var7 * 16 + var6) * 128 + var13;
+ byte var15 = var3[var14];
+
+ if (var15 == 0)
+ {
+ var9 = -1;
+ } else if (var15 == var12)
+ {
+ if (var9 == -1)
+ {
+ if (var8 <= 0)
+ {
+ var10 = 0;
+ var11 = var12;
+ }
+
+ var9 = var8;
+
+ if (var13 >= 0)
+ {
+ var3[var14] = var10;
+ } else
+ {
+ var3[var14] = var11;
+ }
+ } else if (var9 > 0)
+ {
+ --var9;
+ var3[var14] = var11;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private double[] func_28073_a(double[] var1, int var2, int var3, int var4, int var5, int var6, int var7)
+ {
+ if (var1 == null)
+ {
+ var1 = new double[var5 * var6 * var7];
+ }
+
+ double var8 = 684.412D;
+ double var10 = 684.412D;
+ this.field_28090_g = this.noiseGenerator6.generateNoiseOctaves(this.field_28090_g, var2, var4, var5, var7, 1.121D, 1.121D, 0.5D);
+ this.field_28089_h = this.noiseGenerator7.generateNoiseOctaves(this.field_28089_h, var2, var4, var5, var7, 200.0D, 200.0D, 0.5D);
+ var8 *= 2.0D;
+ this.field_28093_d = this.noiseGenerator3.generateNoiseOctaves(this.field_28093_d, var2, var3, var4, var5, var6, var7, var8 / 80.0D, var10 / 160.0D, var8 / 80.0D);
+ this.field_28092_e = this.noiseGenerator1.generateNoiseOctaves(this.field_28092_e, var2, var3, var4, var5, var6, var7, var8, var10, var8);
+ this.field_28091_f = this.noiseGenerator2.generateNoiseOctaves(this.field_28091_f, var2, var3, var4, var5, var6, var7, var8, var10, var8);
+ int var12 = 0;
+ int var13 = 0;
+ int var14 = 16 / var5;
+
+ for (int var15 = 0; var15 < var5; ++var15)
+ {
+ int var16 = var15 * var14 + var14 / 2;
+
+ for (int var17 = 0; var17 < var7; ++var17)
+ {
+ int var18 = var17 * var14 + var14 / 2;
+ double var19 = 1.0D;
+ var19 *= var19;
+ var19 *= var19;
+ var19 = 1.0D - var19;
+ double var21 = (this.field_28090_g[var13] + 256.0D) / 512.0D;
+ var21 *= var19;
+
+ if (var21 > 1.0D)
+ {
+ var21 = 1.0D;
+ }
+
+ double var23 = this.field_28089_h[var13] / 8000.0D;
+
+ if (var23 < 0.0D)
+ {
+ var23 = -var23 * 0.3D;
+ }
+
+ var23 = var23 * 3.0D - 2.0D;
+
+ if (var23 > 1.0D)
+ {
+ var23 = 1.0D;
+ }
+
+ var23 /= 8.0D;
+ var23 = 0.0D;
+
+ if (var21 < 0.0D)
+ {
+ var21 = 0.0D;
+ }
+
+ var21 += 0.5D;
+ var23 = var23 * (double) var6 / 16.0D;
+ ++var13;
+ double var25 = (double) var6 / 2.0D;
+
+ for (int var27 = 0; var27 < var6; ++var27)
+ {
+ double var28 = 0.0D;
+ double var30 = ((double) var27 - var25) * 8.0D / var21;
+
+ if (var30 < 0.0D)
+ {
+ var30 *= -1.0D;
+ }
+
+ double var32 = this.field_28092_e[var12] / 512.0D;
+ double var34 = this.field_28091_f[var12] / 512.0D;
+ double var36 = (this.field_28093_d[var12] / 10.0D + 1.0D) / 2.0D;
+
+ if (var36 < 0.0D)
+ {
+ var28 = var32;
+ } else if (var36 > 1.0D)
+ {
+ var28 = var34;
+ } else
+ {
+ var28 = var32 + (var34 - var32) * var36;
+ }
+
+ var28 -= 8.0D;
+ byte var38 = 32;
+ double var39;
+
+ if (var27 > var6 - var38)
+ {
+ var39 = (double) ((float) (var27 - (var6 - var38)) / ((float) var38 - 1.0F));
+ var28 = var28 * (1.0D - var39) + -30.0D * var39;
+ }
+
+ var38 = 8;
+
+ if (var27 < var38)
+ {
+ var39 = (double) ((float) (var38 - var27) / ((float) var38 - 1.0F));
+ var28 = var28 * (1.0D - var39) + -30.0D * var39;
+ }
+
+ var1[var12] = var28;
+ ++var12;
+ }
+ }
+ }
+
+ return var1;
+ }
+
+ public void recreateStructures(int var1, int var2) {}
+
+ public int getLoadedChunkCount()
+ {
+ return 0;
+ }
+
+ /**
+ * Returns a list of creatures of the specified type that can spawn at the given location.
+ */
+ public List getPossibleCreatures(EnumCreatureType var1, int var2, int var3, int var4)
+ {
+ WorldChunkManager var5 = this.worldObj.getWorldChunkManager();
+ BiomeGenBase var6 = var5.getBiomeGenAt(var2 >> 4, var4 >> 4);
+ return var6 == null ? null : var6.getSpawnableList(var1);
+ }
+
+ /**
+ * loads or generates the chunk at the chunk location specified
+ */
+ public Chunk loadChunk(int var1, int var2)
+ {
+ return this.provideChunk(var1, var2);
+ }
+
+ /**
+ * Converts the instance data to a readable string.
+ */
+ public String makeString()
+ {
+ return "RandomLevelSource";
+ }
+
+ /**
+ * Populates chunk with ores etc etc
+ */
+ public void populate(IChunkProvider var1, int var2, int var3)
+ {
+ int var4 = var2 * 16;
+ int var5 = var3 * 16;
+ int var8;
+ int var7;
+ int var6;
+
+ if (this.random.nextInt(50) == 0)
+ {
+ var6 = var4 + this.random.nextInt(4);
+ var7 = this.random.nextInt(32);
+ var8 = var5 + this.random.nextInt(4);
+ (new AetherGenClouds(AetherBlocks.Aercloud.blockID, 6, 4, false, bronzeDungeon)).generate(this.worldObj, this.random, var6, var7, var8);
+ }
+
+ if (this.random.nextInt(50) == 0)
+ {
+ var6 = var4 + this.random.nextInt(4);
+ var7 = this.random.nextInt(32);
+ var8 = var5 + this.random.nextInt(4);
+ (new AetherGenClouds(AetherBlocks.Aercloud.blockID, 5, 4, false, bronzeDungeon)).generate(this.worldObj, this.random, var6, var7, var8);
+ }
+
+ if (this.random.nextInt(50) == 0)
+ {
+ var6 = var4 + this.random.nextInt(4);
+ var7 = this.random.nextInt(32);
+ var8 = var5 + this.random.nextInt(4);
+ (new AetherGenClouds(AetherBlocks.Aercloud.blockID, 4, 4, false, bronzeDungeon)).generate(this.worldObj, this.random, var6, var7, var8);
+ }
+
+ if (this.random.nextInt(50) == 0)
+ {
+ var6 = var4 + this.random.nextInt(4);
+ var7 = this.random.nextInt(32);
+ var8 = var5 + this.random.nextInt(4);
+ (new AetherGenClouds(AetherBlocks.Aercloud.blockID, 3, 4, false, bronzeDungeon)).generate(this.worldObj, this.random, var6, var7, var8);
+ }
+
+ if (this.random.nextInt(13) == 0)
+ {
+ var6 = var4 + this.random.nextInt(16);
+ var7 = this.random.nextInt(65) + 32;
+ var8 = var5 + this.random.nextInt(16);
+ (new AetherGenClouds(AetherBlocks.Aercloud.blockID, 3, 8, false, bronzeDungeon)).generate(this.worldObj, this.random, var6, var7, var8);
+ }
+
+ if (this.random.nextInt(50) == 0)
+ {
+ var6 = var4 + this.random.nextInt(16);
+ var7 = this.random.nextInt(32) + 96;
+ var8 = var5 + this.random.nextInt(16);
+ (new AetherGenClouds(AetherBlocks.Aercloud.blockID, 2, 4, false, bronzeDungeon)).generate(this.worldObj, this.random, var6, var7, var8);
+ }
+
+ if (this.random.nextInt(13) == 0)
+ {
+ var6 = var4 + this.random.nextInt(16);
+ var7 = this.random.nextInt(65) + 32;
+ var8 = var5 + this.random.nextInt(16);
+ (new AetherGenClouds(AetherBlocks.Aercloud.blockID, 1, 8, false, bronzeDungeon)).generate(this.worldObj, this.random, var6, var7, var8);
+ }
+
+ if (this.random.nextInt(7) == 0)
+ {
+ var6 = var4 + this.random.nextInt(16);
+ var7 = this.random.nextInt(65) + 32;
+ var8 = var5 + this.random.nextInt(16);
+ (new AetherGenClouds(AetherBlocks.Aercloud.blockID, 0, 16, false, bronzeDungeon)).generate(this.worldObj, this.random, var6, var7, var8);
+ }
+
+ if (this.random.nextInt(25) == 0)
+ {
+ var6 = var4 + this.random.nextInt(16);
+ var7 = this.random.nextInt(32);
+ var8 = var5 + this.random.nextInt(16);
+ (new AetherGenClouds(AetherBlocks.Aercloud.blockID, 0, 64, true, bronzeDungeon)).generate(this.worldObj, this.random, var6, var7, var8);
+ }
+
+ double var23 = 0.03125D;
+ this.field_28077_t = this.noiseGenerator5.generateNoiseOctaves(this.field_28077_t, var2, var3, 0, 16, 16, 1, var23 * 2.0D, var23 * 2.0D, var23 * 2.0D);
+ bronzeDungeon.generateStructuresInChunk(this.worldObj, this.random, var2, var3, this.field_28077_t);
+ BiomeGenBase var22 = Aether.biome;
+ BlockSand.fallInstantly = true;
+ this.random.setSeed(this.worldObj.getSeed());
+ long var9 = this.random.nextLong() / 2L * 2L + 1L;
+ long var11 = this.random.nextLong() / 2L * 2L + 1L;
+ this.random.setSeed((long) var2 * var9 + (long) var3 * var11 ^ this.worldObj.getSeed());
+ var23 = 0.125D;
+ int var13;
+ int var15;
+ int var14;
+
+ if (this.random.nextInt(32) == 0)
+ {
+ var13 = var4 + this.random.nextInt(16);
+ var14 = this.random.nextInt(64) + 32;
+ var15 = var5 + this.random.nextInt(16);
+ (new GenerateFloatingTree()).generate(this.worldObj, this.random, var13, var14, var15);
+ }
+
+ if (gumCount < 800)
+ {
+ ++gumCount;
+ }
+
+ int var16;
+
+ for (var13 = 0; var13 < 20; ++var13)
+ {
+ var14 = var4 + this.random.nextInt(16);
+ var15 = this.random.nextInt(128);
+ var16 = var5 + this.random.nextInt(16);
+ (new AetherGenMinable(AetherBlocks.AetherDirt.blockID, 32)).generate(this.worldObj, this.random, var14, var15, var16);
+ }
+
+ for (var13 = 0; var13 < 6; ++var13)
+ {
+ var14 = var4 + this.random.nextInt(16) + 8;
+ var15 = this.random.nextInt(128);
+ var16 = var5 + this.random.nextInt(16) + 8;
+ (new AetherGenFlowers(AetherBlocks.WhiteFlower.blockID, 64)).generate(this.worldObj, this.random, var14, var15, var16);
+ }
+
+ for (var13 = 0; var13 < 6; ++var13)
+ {
+ if (this.random.nextInt(2) == 0)
+ {
+ var14 = var4 + this.random.nextInt(16) + 8;
+ var15 = this.random.nextInt(128);
+ var16 = var5 + this.random.nextInt(16) + 8;
+ (new AetherGenFlowers(AetherBlocks.PurpleFlower.blockID, 64)).generate(this.worldObj, this.random, var14, var15, var16);
+ }
+ }
+
+ for (var13 = 0; var13 < 10; ++var13)
+ {
+ int var10000 = var4 + this.random.nextInt(16);
+ var15 = this.random.nextInt(128);
+ var16 = var5 + this.random.nextInt(16);
+ (new AetherGenMinable(AetherBlocks.Icestone.blockID, 10)).generate(this.worldObj, this.random, var2, var15, var16);
+ }
+
+ for (var13 = 0; var13 < 20; ++var13)
+ {
+ var14 = var4 + this.random.nextInt(16);
+ var15 = this.random.nextInt(128);
+ var16 = var5 + this.random.nextInt(16);
+ (new AetherGenMinable(AetherBlocks.AmbrosiumOre.blockID, 16)).generate(this.worldObj, this.random, var14, var15, var16);
+ }
+
+ for (var13 = 0; var13 < 15; ++var13)
+ {
+ var14 = var4 + this.random.nextInt(16);
+ var15 = this.random.nextInt(64);
+ var16 = var5 + this.random.nextInt(16);
+ (new AetherGenMinable(AetherBlocks.ZaniteOre.blockID, 8)).generate(this.worldObj, this.random, var14, var15, var16);
+ }
+
+ for (var13 = 0; var13 < 6; ++var13)
+ {
+ var14 = var4 + this.random.nextInt(16);
+ var15 = this.random.nextInt(32);
+ var16 = var5 + this.random.nextInt(16);
+ (new AetherGenMinable(AetherBlocks.GravititeOre.blockID, 4)).generate(this.worldObj, this.random, var14, var15, var16);
+ }
+
+ for (var13 = 0; var13 < 4; ++var13)
+ {
+ var14 = var4 + this.random.nextInt(16);
+ var15 = this.random.nextInt(128);
+ var16 = var5 + this.random.nextInt(16);
+ (new AetherGenMinable(AetherBlocks.ContinuumOre.blockID, 4)).generate(this.worldObj, this.random, var14, var15, var16);
+ }
+
+ if (this.random.nextInt(5) == 0)
+ {
+ for (var13 = var4; var13 < var4 + 16; ++var13)
+ {
+ for (var14 = var5; var14 < var5 + 16; ++var14)
+ {
+ for (var15 = 0; var15 < 48; ++var15)
+ {
+ if (this.worldObj.getBlockId(var13, var15, var14) == 0 && this.worldObj.getBlockId(var13, var15 + 1, var14) == AetherBlocks.AetherGrass.blockID && this.worldObj.getBlockId(var13, var15 + 2, var14) == 0)
+ {
+ (new AetherGenQuicksoil(AetherBlocks.Quicksoil.blockID)).generate(this.worldObj, this.random, var13, var15, var14);
+ var15 = 128;
+ }
+ }
+ }
+ }
+ }
+
+ var23 = 0.5D;
+ byte var20 = 3;
+ byte var21 = 4;
+ int var17;
+ WorldGenerator var18;
+
+ for (var15 = 0; var15 < var20; ++var15)
+ {
+ var16 = var4 + this.random.nextInt(16) + 8;
+ var17 = var5 + this.random.nextInt(16) + 8;
+ var18 = var22.getRandomWorldGenForTrees(this.random);
+ var18.setScale(1.0D, 1.0D, 1.0D);
+ var18.generate(this.worldObj, this.random, var16, this.worldObj.getHeightValue(var16, var17), var17);
+ }
+
+ for (var15 = 0; var15 < var21; ++var15)
+ {
+ var16 = var4 + this.random.nextInt(16) + 8;
+ var17 = var5 + this.random.nextInt(16) + 8;
+ var18 = var22.getRandomWorldGenForGrass(this.random);
+ var18.setScale(1.0D, 1.0D, 1.0D);
+ var18.generate(this.worldObj, this.random, var16, this.worldObj.getHeightValue(var16, var17), var17);
+ }
+
+ int var19;
+
+ for (var15 = 0; var15 < 2; ++var15)
+ {
+ var16 = var4 + this.random.nextInt(16) + 8;
+ var17 = this.random.nextInt(128);
+ var19 = var5 + this.random.nextInt(16) + 8;
+ (new AetherGenFlowers(AetherBlocks.BerryBush.blockID, 32)).generate(this.worldObj, this.random, var16, var17, var19);
+ }
+
+ for (var15 = 0; var15 < 2; ++var15)
+ {
+ var16 = var4 + this.random.nextInt(16) + 8;
+ var17 = this.random.nextInt(128);
+ var19 = var5 + this.random.nextInt(16) + 8;
+ (new AetherGenOrangeFruit(16)).generate(this.worldObj, this.random, var16, var17, var19);
+ }
+
+ for (var15 = 0; var15 < 50; ++var15)
+ {
+ var16 = var4 + this.random.nextInt(16) + 8;
+ var17 = this.random.nextInt(this.random.nextInt(120) + 8);
+ var19 = var5 + this.random.nextInt(16) + 8;
+ (new AetherGenLiquids(Block.waterMoving.blockID)).generate(this.worldObj, this.random, var16, var17, var19);
+ }
+
+ SpawnerAnimals.performWorldGenSpawning(this.worldObj, var22, var4 + 8, var5 + 8, 16, 16, this.random);
+ BlockSand.fallInstantly = false;
+ }
+
+ public Chunk prepareChunk(int var1, int var2)
+ {
+ return this.provideChunk(var1, var2);
+ }
+
+ /**
+ * Will return back a chunk, if it doesn't exist and its not a MP client it will generates all the blocks for the
+ * specified chunk from the map seed and chunk seed
+ */
+ public Chunk provideChunk(int var1, int var2)
+ {
+ this.random.setSeed((long) var1 * 341873128712L + (long) var2 * 132897987541L);
+ byte[] var3 = new byte[32768];
+ this.func_28071_a(var1, var2, var3);
+ this.func_28072_a(var1, var2, var3);
+ this.mapGenCaves.generate(this, this.worldObj, var1, var2, var3);
+ bronzeDungeon.generate(this, this.worldObj, var1, var2, var3);
+ AetherChunk var4 = new AetherChunk(this.worldObj, var3, var1, var2);
+ var4.generateSkylightMap();
+ return var4;
+ }
+
+ /**
+ * Two modes of operation: if passed true, save all Chunks in one go. If passed false, save up to two chunks.
+ * Return true if all chunks have been saved.
+ */
+ public boolean saveChunks(boolean var1, IProgressUpdate var2)
+ {
+ return true;
+ }
+
+ /**
+ * Unloads chunks that are marked to be unloaded. This is not guaranteed to unload every such chunk.
+ */
+ public boolean unloadQueuedChunks()
+ {
+ return false;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonBronzeBoss.java b/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonBronzeBoss.java
new file mode 100644
index 0000000..7d9bec4
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonBronzeBoss.java
@@ -0,0 +1,235 @@
+package net.aetherteam.aether.worldgen;
+
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.entities.bosses.EntitySlider;
+import net.minecraft.tileentity.TileEntityChest;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.structure.StructureBoundingBox;
+import net.minecraft.world.gen.structure.StructureComponent;
+
+public class ComponentDungeonBronzeBoss extends ComponentDungeonBronzeRoom
+{
+ int yOffset = 3;
+ int entranceOffset = 8;
+
+ public ComponentDungeonBronzeBoss(int var1, StructureComponent var2, StructureBronzeDungeonStart var3, Random var4, int var5, int var6)
+ {
+ super(var1, var2, var3, var4, var5, var6);
+ this.boundingBox = new StructureBoundingBox(var5, 30 - this.yOffset, var6, var5 + 24, 40, var6 + 15);
+ this.entrances.clear();
+ this.addEntranceToAllFourWalls();
+ }
+
+ public void addEntranceToAllFourWalls()
+ {
+ this.entrances.add(new StructureBoundingBox(this.boundingBox.minX + 1, this.boundingBox.minY + 1 + this.yOffset, this.boundingBox.minZ - 2, this.boundingBox.minX + this.entranceOffset, this.boundingBox.maxY - 1, this.boundingBox.minZ));
+ this.entrances.add(new StructureBoundingBox(this.boundingBox.minX + 1, this.boundingBox.minY + 1 + this.yOffset, this.boundingBox.maxZ, this.boundingBox.minX + this.entranceOffset, this.boundingBox.maxY - 1, this.boundingBox.maxZ + 2));
+ this.entrances.add(new StructureBoundingBox(this.boundingBox.minX - 2, this.boundingBox.minY + 1 + this.yOffset, this.boundingBox.minZ + 1, this.boundingBox.minX, this.boundingBox.maxY - 1, this.boundingBox.maxZ - 1));
+ }
+
+ /**
+ * second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at
+ * the end, it adds Fences...
+ */
+ public boolean addComponentParts(World var1, Random var2, StructureBoundingBox var3)
+ {
+ int var4;
+ int var5;
+ int var6;
+
+ for (var4 = this.boundingBox.minY; var4 <= this.boundingBox.maxY; ++var4)
+ {
+ for (var5 = this.boundingBox.minX; var5 <= this.boundingBox.maxX; ++var5)
+ {
+ for (var6 = this.boundingBox.minZ; var6 <= this.boundingBox.maxZ; ++var6)
+ {
+ this.placeBlockAtCurrentPosition(var1, var2.nextInt(20) == 1 ? AetherBlocks.LockedLightDungeonStone.blockID : AetherBlocks.LockedDungeonStone.blockID, 0, var5, var4, var6, var3);
+ }
+ }
+ }
+
+ var4 = this.boundingBox.minX + this.entranceOffset + (this.boundingBox.maxX - (this.boundingBox.minX + this.entranceOffset)) / 2 - 1;
+ var5 = this.boundingBox.minY + this.yOffset + 1;
+ var6 = this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2 - 1;
+ int var7 = this.boundingBox.minX + this.entranceOffset + (this.boundingBox.maxX - (this.boundingBox.minX + this.entranceOffset)) / 2 + 2;
+ int var8 = this.boundingBox.minY + this.yOffset + 1;
+ int var9 = this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2 + 2;
+ this.fillWithBlocksWithNotify(var1, var3, this.boundingBox.minX + 1 + this.entranceOffset, var5, this.boundingBox.minZ + 1, this.boundingBox.maxX - 1, this.boundingBox.maxY - 1, this.boundingBox.maxZ - 1, 0, 0, false);
+ this.fillWithBlocksWithNotify(var1, var3, this.boundingBox.minX + 1, var5, this.boundingBox.minZ + 1, this.boundingBox.minX - 1 + this.entranceOffset, this.boundingBox.maxY - 1, this.boundingBox.maxZ - 1, 0, 0, false);
+ Dungeon var10 = DungeonHandler.instance().getInstanceAt(MathHelper.floor_double((double) (this.boundingBox.minX + this.entranceOffset)), MathHelper.floor_double((double) var5), MathHelper.floor_double((double) (this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2 - 2)));
+ var10.registerSafeBlock(this.boundingBox.minX + this.entranceOffset, var5 + 1, this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2, AetherBlocks.BronzeDoor.blockID, 1);
+ this.fillBlocksAndRegister(var1, var3, this.boundingBox.minX + this.entranceOffset, var5, this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2 - 2, this.boundingBox.minX + this.entranceOffset, var5 + 3, this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2 + 2, AetherBlocks.BronzeDoor.blockID, 0, false, var10);
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.BronzeDoor.blockID, 1, this.boundingBox.minX + this.entranceOffset, var5 + 1, this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2, var3);
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.BronzeDoorController.blockID, 0, this.boundingBox.minX + this.entranceOffset + 1, var5 - 1, this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2, var3);
+ this.fillWithBlocksWithNotify(var1, var3, var4, var5 - 3, var6, var7, var8, var9, AetherBlocks.LockedDungeonStone.blockID, 0, false);
+
+ if (var3.isVecInside(this.boundingBox.minX + this.entranceOffset + (this.boundingBox.maxX - (this.boundingBox.minX + this.entranceOffset)) / 2 + 1, var8 + 2, this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2 + 1))
+ {
+ EntitySlider var11 = new EntitySlider(var1, (double) (this.boundingBox.minX + this.entranceOffset + (this.boundingBox.maxX - (this.boundingBox.minX + this.entranceOffset)) / 2 + 1), (double) (var8 + 2), (double) (this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2 + 1));
+ DungeonHandler var12 = DungeonHandler.instance();
+ Dungeon var13 = var12.getInstanceAt(MathHelper.floor_double(var11.posX), MathHelper.floor_double(var11.posY), MathHelper.floor_double(var11.posZ));
+ int var14 = MathHelper.floor_double(var11.posX);
+ int var15 = MathHelper.floor_double(var11.posY);
+ int var16 = MathHelper.floor_double(var11.posZ);
+ var13.registerEntity((float) var14, (float) var15, (float) var16, var11);
+ var13.registerSafeBlock(this.boundingBox.minX + this.entranceOffset, var5 + 1, this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2, AetherBlocks.BronzeDoor.blockID, 1);
+ var13.registerSafeBlock(this.boundingBox.minX + this.entranceOffset + 1, var5 - 1, this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2, AetherBlocks.BronzeDoorController.blockID, 0);
+ var1.spawnEntityInWorld(var11);
+ }
+
+ this.fillWithBlocksWithNotify(var1, var3, var4 + 1, var5 - 2, var6 + 1, var7 - 1, var8 - 1, var9 - 1, 0, 0, false);
+
+ if (var3.isVecInside(var4 + 1, var5 - 2, var6 + 1))
+ {
+ var1.setBlock(var4 + 1, var5 - 2, var6 + 1, AetherBlocks.TreasureChest.blockID);
+ TileEntityChest var17 = (TileEntityChest) ((TileEntityChest) var1.getBlockTileEntity(var4 + 1, var5 - 2, var6 + 1));
+ }
+
+ this.cutHolesForEntrances(var1, var2, var3);
+ return true;
+ }
+
+ public void setBlockWithChance(World var1, Random var2, int var3, int var4, int var5, int var6, int var7, int var8, StructureBoundingBox var9)
+ {
+ if (var2.nextInt(var3) == 1)
+ {
+ this.placeBlockAtCurrentPosition(var1, var7, var8, var4, var5, var6, var9);
+ }
+ }
+
+ public void setBlockWithChance(World var1, Random var2, int var3, int var4, int var5, int var6, int var7, StructureBoundingBox var8)
+ {
+ if (var2.nextInt(var3) == 1)
+ {
+ this.placeBlockAtCurrentPosition(var1, var7, 0, var4, var5, var6, var8);
+ }
+ }
+
+ protected void fillWithBlocksWithNotify(World var1, StructureBoundingBox var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9, int var10, boolean var11)
+ {
+ for (int var12 = var4; var12 <= var7; ++var12)
+ {
+ for (int var13 = var3; var13 <= var6; ++var13)
+ {
+ for (int var14 = var5; var14 <= var8; ++var14)
+ {
+ if (!var11 || this.getBlockIdAtCurrentPosition(var1, var13, var12, var14, var2) != 0)
+ {
+ if (var12 != var4 && var12 != var7 && var13 != var3 && var13 != var6 && var14 != var5 && var14 != var8)
+ {
+ this.placeBlockAtCurrentPositionWithNotify(var1, var10, 0, var13, var12, var14, var2);
+ } else
+ {
+ this.placeBlockAtCurrentPositionWithNotify(var1, var9, 0, var13, var12, var14, var2);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ protected void fillBlocksAndRegister(World var1, StructureBoundingBox var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9, int var10, boolean var11, Dungeon var12)
+ {
+ for (int var13 = var4; var13 <= var7; ++var13)
+ {
+ for (int var14 = var3; var14 <= var6; ++var14)
+ {
+ for (int var15 = var5; var15 <= var8; ++var15)
+ {
+ if (!var11 || this.getBlockIdAtCurrentPosition(var1, var14, var13, var15, var2) != 0)
+ {
+ if (var13 != var4 && var13 != var7 && var14 != var3 && var14 != var6 && var15 != var5 && var15 != var8)
+ {
+ this.placeBlockAtCurrentPositionWithNotify(var1, var10, 0, var14, var13, var15, var2);
+ var12.registerSafeBlock(var14, var13, var15, var9, 0);
+ } else
+ {
+ this.placeBlockAtCurrentPositionWithNotify(var1, var9, 0, var14, var13, var15, var2);
+ var12.registerSafeBlock(var14, var13, var15, var9, 0);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public void fillVariedBlocks(World var1, StructureBoundingBox var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9, int var10, int var11, int var12, int var13, Random var14, boolean var15)
+ {
+ for (int var16 = var4; var16 <= var7; ++var16)
+ {
+ for (int var17 = var3; var17 <= var6; ++var17)
+ {
+ for (int var18 = var5; var18 <= var8; ++var18)
+ {
+ if (this.getBlockIdAtCurrentPosition(var1, var17, var16, var18, var2) == 0 || var15)
+ {
+ int var19 = var11;
+ int var20 = var12;
+
+ if (var14.nextInt(var13) == 1)
+ {
+ var19 = var9;
+ var20 = var10;
+ }
+
+ this.placeBlockAtCurrentPositionWithNotify(var1, var19, var20, var17, var16, var18, var2);
+ }
+ }
+ }
+ }
+ }
+
+ protected void placeBlockAtCurrentPositionWithNotify(World var1, int var2, int var3, int var4, int var5, int var6, StructureBoundingBox var7)
+ {
+ int var8 = this.getXWithOffset(var4, var6);
+ int var9 = this.getYWithOffset(var5);
+ int var10 = this.getZWithOffset(var4, var6);
+
+ if (var7.isVecInside(var8, var9, var10))
+ {
+ var1.setBlock(var8, var9, var10, var2, var3, 2);
+ }
+ }
+
+ public static StructureBoundingBox findValidPlacement(List var0, Random var1, int var2, int var3, int var4, int var5)
+ {
+ byte var6 = 24;
+ byte var7 = 16;
+ byte var8 = 10;
+ StructureBoundingBox var9 = new StructureBoundingBox(var2, var3, var4, var2, var3 + var8, var4);
+
+ switch (var5)
+ {
+ case 0:
+ var9.minX = var2 - 1;
+ var9.maxX = var2 + var6 - 1;
+ var9.maxZ = var4 + var7;
+ break;
+
+ case 1:
+ var9.minX = var2 - var6;
+ var9.minZ = var4 - 1;
+ var9.maxZ = var4 + var7 - 1;
+ break;
+
+ case 2:
+ var9.minX = var2 - 1;
+ var9.maxX = var2 + var6 - 1;
+ var9.minZ = var4 - var7;
+ break;
+
+ case 3:
+ var9.maxX = var2 + var6;
+ var9.minZ = var4 - 1;
+ var9.maxZ = var4 + var7 - 1;
+ }
+
+ return StructureComponent.findIntersecting(var0, var9) != null ? null : var9;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonBronzeChest.java b/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonBronzeChest.java
new file mode 100644
index 0000000..de2681a
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonBronzeChest.java
@@ -0,0 +1,254 @@
+package net.aetherteam.aether.worldgen;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.relauncher.Side;
+
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.AetherLoot;
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.tile_entities.TileEntitySkyrootChest;
+import net.minecraft.block.Block;
+import net.minecraft.tileentity.TileEntityMobSpawner;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.structure.StructureBoundingBox;
+import net.minecraft.world.gen.structure.StructureComponent;
+
+public class ComponentDungeonBronzeChest extends ComponentDungeonBronzeRoom
+{
+ public ComponentDungeonBronzeChest(int var1, StructureComponent var2, StructureBronzeDungeonStart var3, Random var4, int var5, int var6)
+ {
+ super(var1, var2, var3, var4, var5, var6);
+ }
+
+ public ComponentDungeonBronzeChest(int var1, StructureComponent var2, StructureBronzeDungeonStart var3, Random var4, StructureBoundingBox var5, int var6)
+ {
+ super(var1, var2, var3, var4, var5, var6);
+ }
+
+ /**
+ * second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at
+ * the end, it adds Fences...
+ */
+ public boolean addComponentParts(World var1, Random var2, StructureBoundingBox var3)
+ {
+ int var5;
+ int var4;
+ int var6;
+
+ for (var4 = this.boundingBox.minY; var4 <= this.boundingBox.maxY; ++var4)
+ {
+ for (var5 = this.boundingBox.minX; var5 <= this.boundingBox.maxX; ++var5)
+ {
+ for (var6 = this.boundingBox.minZ; var6 <= this.boundingBox.maxZ; ++var6)
+ {
+ this.placeBlockAtCurrentPosition(var1, var2.nextInt(20) == 1 ? AetherBlocks.Trap.blockID : AetherBlocks.LockedDungeonStone.blockID, 0, var5, var4, var6, var3);
+ }
+ }
+ }
+
+ var4 = this.boundingBox.minX + (this.boundingBox.maxX - this.boundingBox.minX) / 2 - 1;
+ var5 = this.boundingBox.minY + 1;
+ var6 = this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2 - 1;
+ int var7 = this.boundingBox.minX + (this.boundingBox.maxX - this.boundingBox.minX) / 2 + 1;
+ int var8 = this.boundingBox.minY + 1;
+ int var9 = this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2 + 1;
+ this.fillWithBlocksWithNotify(var1, var3, this.boundingBox.minX + 1, this.boundingBox.minY + 1, this.boundingBox.minZ + 1, this.boundingBox.maxX - 1, this.boundingBox.maxY - 1, this.boundingBox.maxZ - 1, 0, 0, false);
+ this.fillWithBlocksWithNotify(var1, var3, var4, var5, var6, var7, var8, var9, AetherBlocks.LockedDungeonStone.blockID, 0, false);
+ int var10 = this.boundingBox.minX + (this.boundingBox.maxX - this.boundingBox.minX) / 2;
+ int var11 = this.boundingBox.minY + 2;
+ int var12 = this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2;
+
+ for (int var13 = 1; var13 <= 4; ++var13)
+ {
+ byte var14 = 0;
+ byte var15 = 0;
+ byte var16 = 1;
+
+ switch (var13)
+ {
+ case 1:
+ var14 = 1;
+ var16 = 1;
+ break;
+
+ case 2:
+ var14 = -1;
+ var16 = 2;
+ break;
+
+ case 3:
+ var15 = 1;
+ var16 = 3;
+ break;
+
+ case 4:
+ var15 = -1;
+ var16 = 4;
+ }
+
+ int var17 = this.getXWithOffset(var10 + var14, var12 + var15);
+ int var18 = this.getYWithOffset(var11);
+ int var19 = this.getZWithOffset(var10 + var14, var12 + var15);
+ Dungeon var20;
+
+ if (var3.isVecInside(var17, var18, var19) && var1.getBlockId(var17, var18, var19) != AetherBlocks.SkyrootChest.blockID && var2.nextInt(3) == 0)
+ {
+ var20 = null;
+ var1.setBlock(var17, var18, var19, AetherBlocks.SkyrootChest.blockID, var16, 2);
+ var1.setBlockMetadataWithNotify(var17, var18, var19, var16, 2);
+ Dungeon var21 = DungeonHandler.instance().getInstanceAt(var17, var18, var19);
+ var21.registerSafeBlock(var17, var18, var19, AetherBlocks.SkyrootChest.blockID, var16);
+ TileEntitySkyrootChest var24 = (TileEntitySkyrootChest) var1.getBlockTileEntity(var17, var18, var19);
+
+ if (var24 != null)
+ {
+ Side var22 = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (var22.isServer() && !var1.isRemote)
+ {
+ for (int var23 = 0; var23 < 3 + var2.nextInt(3); ++var23)
+ {
+ var24.setInventorySlotContents(var2.nextInt(var24.getSizeInventory()), AetherLoot.NORMAL.getRandomItem(var2));
+ }
+ }
+ }
+ } else if (var3.isVecInside(var17, var18, var19) && var1.getBlockId(var17, var18, var19) != AetherBlocks.SkyrootChestMimic.blockID && var2.nextInt(3) == 0)
+ {
+ var1.setBlock(var17, var18, var19, AetherBlocks.SkyrootChestMimic.blockID, var16, 2);
+ var20 = DungeonHandler.instance().getInstanceAt(var17, var18, var19);
+ var20.registerSafeBlock(var17, var18, var19, AetherBlocks.SkyrootChestMimic.blockID, var16);
+ }
+ }
+
+ this.placeBlockAtCurrentPosition(var1, Block.mobSpawner.blockID, 0, var10, var11, var12, var3);
+ TileEntityMobSpawner var26 = (TileEntityMobSpawner) var1.getBlockTileEntity(var10, var11, var12);
+
+ if (var26 != null)
+ {
+ String var27 = var2.nextInt(3) == 1 ? "SentryGolem" : "Sentry";
+ var26.func_98049_a().setMobID(var27);
+ Dungeon var25 = DungeonHandler.instance().getInstanceAt(var10, var11, var12);
+ var25.registerMobSpawner(var10, var11, var12, var27);
+ }
+
+ this.cutHolesForEntrances(var1, var2, var3);
+ return true;
+ }
+
+ public void setBlockWithChance(World var1, Random var2, int var3, int var4, int var5, int var6, int var7, int var8, StructureBoundingBox var9)
+ {
+ if (var2.nextInt(var3) == 1)
+ {
+ this.placeBlockAtCurrentPosition(var1, var7, var8, var4, var5, var6, var9);
+ }
+ }
+
+ public void setBlockWithChance(World var1, Random var2, int var3, int var4, int var5, int var6, int var7, StructureBoundingBox var8)
+ {
+ if (var2.nextInt(var3) == 1)
+ {
+ this.placeBlockAtCurrentPosition(var1, var7, 0, var4, var5, var6, var8);
+ }
+ }
+
+ protected void fillWithBlocksWithNotify(World var1, StructureBoundingBox var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9, int var10, boolean var11)
+ {
+ for (int var12 = var4; var12 <= var7; ++var12)
+ {
+ for (int var13 = var3; var13 <= var6; ++var13)
+ {
+ for (int var14 = var5; var14 <= var8; ++var14)
+ {
+ if (!var11 || this.getBlockIdAtCurrentPosition(var1, var13, var12, var14, var2) != 0)
+ {
+ if (var12 != var4 && var12 != var7 && var13 != var3 && var13 != var6 && var14 != var5 && var14 != var8)
+ {
+ this.placeBlockAtCurrentPositionWithNotify(var1, var10, 0, var13, var12, var14, var2);
+ } else
+ {
+ this.placeBlockAtCurrentPositionWithNotify(var1, var9, 0, var13, var12, var14, var2);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public void fillVariedBlocks(World var1, StructureBoundingBox var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9, int var10, int var11, int var12, int var13, Random var14, boolean var15)
+ {
+ for (int var16 = var4; var16 <= var7; ++var16)
+ {
+ for (int var17 = var3; var17 <= var6; ++var17)
+ {
+ for (int var18 = var5; var18 <= var8; ++var18)
+ {
+ if (this.getBlockIdAtCurrentPosition(var1, var17, var16, var18, var2) == 0 || var15)
+ {
+ int var19 = var11;
+ int var20 = var12;
+
+ if (var14.nextInt(var13) == 1)
+ {
+ var19 = var9;
+ var20 = var10;
+ }
+
+ this.placeBlockAtCurrentPositionWithNotify(var1, var19, var20, var17, var16, var18, var2);
+ }
+ }
+ }
+ }
+ }
+
+ protected void placeBlockAtCurrentPositionWithNotify(World var1, int var2, int var3, int var4, int var5, int var6, StructureBoundingBox var7)
+ {
+ int var8 = this.getXWithOffset(var4, var6);
+ int var9 = this.getYWithOffset(var5);
+ int var10 = this.getZWithOffset(var4, var6);
+
+ if (var7.isVecInside(var8, var9, var10))
+ {
+ var1.setBlock(var8, var9, var10, var2, var3, 2);
+ }
+ }
+
+ public static StructureBoundingBox findValidPlacement(List var0, Random var1, int var2, int var3, int var4, int var5)
+ {
+ int var6 = 6 + var1.nextInt(3);
+ int var7 = 6 + var1.nextInt(3);
+ byte var8 = 10;
+ StructureBoundingBox var9 = new StructureBoundingBox(var2, var3, var4, var2, var3 + var8, var4);
+
+ switch (var5)
+ {
+ case 0:
+ var9.minX = var2 - 1;
+ var9.maxX = var2 + var6 - 1;
+ var9.maxZ = var4 + var7;
+ break;
+
+ case 1:
+ var9.minX = var2 - var6;
+ var9.minZ = var4 - 1;
+ var9.maxZ = var4 + var7 - 1;
+ break;
+
+ case 2:
+ var9.minX = var2 - 1;
+ var9.maxX = var2 + var6 - 1;
+ var9.minZ = var4 - var7;
+ break;
+
+ case 3:
+ var9.maxX = var2 + var6;
+ var9.minZ = var4 - 1;
+ var9.maxZ = var4 + var7 - 1;
+ }
+
+ return StructureComponent.findIntersecting(var0, var9) != null ? null : var9;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonBronzeCog.java b/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonBronzeCog.java
new file mode 100644
index 0000000..4f0cd2e
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonBronzeCog.java
@@ -0,0 +1,190 @@
+package net.aetherteam.aether.worldgen;
+
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.entities.bosses.EntityLabyrinthEye;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.structure.StructureBoundingBox;
+import net.minecraft.world.gen.structure.StructureComponent;
+
+public class ComponentDungeonBronzeCog extends ComponentDungeonBronzeRoom
+{
+ public ComponentDungeonBronzeCog(int var1, StructureComponent var2, StructureBronzeDungeonStart var3, Random var4, int var5, int var6)
+ {
+ super(var1, var2, var3, var4, var5, var6);
+ }
+
+ public ComponentDungeonBronzeCog(int var1, StructureComponent var2, StructureBronzeDungeonStart var3, Random var4, StructureBoundingBox var5, int var6)
+ {
+ super(var1, var2, var3, var4, var5, var6);
+ }
+
+ /**
+ * second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at
+ * the end, it adds Fences...
+ */
+ public boolean addComponentParts(World var1, Random var2, StructureBoundingBox var3)
+ {
+ int var5;
+ int var4;
+ int var6;
+
+ for (var4 = this.boundingBox.minY; var4 <= this.boundingBox.maxY; ++var4)
+ {
+ for (var5 = this.boundingBox.minX; var5 <= this.boundingBox.maxX; ++var5)
+ {
+ for (var6 = this.boundingBox.minZ; var6 <= this.boundingBox.maxZ; ++var6)
+ {
+ this.placeBlockAtCurrentPosition(var1, var2.nextInt(20) == 1 ? AetherBlocks.LockedLightDungeonStone.blockID : AetherBlocks.LockedDungeonStone.blockID, 0, var5, var4, var6, var3);
+ }
+ }
+ }
+
+ var4 = this.boundingBox.minX + (this.boundingBox.maxX - this.boundingBox.minX) / 2 - 1;
+ var5 = this.boundingBox.minY + 1;
+ var6 = this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2 - 1;
+ int var7 = this.boundingBox.minX + (this.boundingBox.maxX - this.boundingBox.minX) / 2 + 2;
+ int var8 = this.boundingBox.minY + 1;
+ int var9 = this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2 + 2;
+ this.fillWithBlocksWithNotify(var1, var3, this.boundingBox.minX + 1, this.boundingBox.minY + 1, this.boundingBox.minZ + 1, this.boundingBox.maxX - 1, this.boundingBox.maxY - 1, this.boundingBox.maxZ - 1, 0, 0, false);
+ this.fillWithBlocksWithNotify(var1, var3, var4, var5, var6, var7, var8, var9, AetherBlocks.LockedDungeonStone.blockID, 0, false);
+ int var10 = this.boundingBox.minX + (this.boundingBox.maxX - this.boundingBox.minX) / 2;
+ int var11 = this.boundingBox.minY + 2;
+ int var12 = this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2;
+
+ if (var3.isVecInside(var10 + 1, var11, var12 + 1))
+ {
+ EntityLabyrinthEye var13 = new EntityLabyrinthEye(var1);
+ var13.setPosition((double) ((float) var10 + 1.0F), (double) (var11 + 2), (double) ((float) var12 + 1.0F));
+ var1.spawnEntityInWorld(var13);
+ DungeonHandler var14 = DungeonHandler.instance();
+ Dungeon var15 = var14.getInstanceAt(MathHelper.floor_double((double) ((float) var10 + 1.0F)), MathHelper.floor_double((double) (var11 + 2)), MathHelper.floor_double((double) ((float) var12 + 1.0F)));
+
+ if (var15 != null)
+ {
+ var15.registerEntity((float) var10 + 1.0F, (float) var11 + 2.0F, (float) var12 + 1.0F, var13);
+ }
+ }
+
+ this.cutHolesForEntrances(var1, var2, var3);
+ return true;
+ }
+
+ public void setBlockWithChance(World var1, Random var2, int var3, int var4, int var5, int var6, int var7, int var8, StructureBoundingBox var9)
+ {
+ if (var2.nextInt(var3) == 1)
+ {
+ this.placeBlockAtCurrentPosition(var1, var7, var8, var4, var5, var6, var9);
+ }
+ }
+
+ public void setBlockWithChance(World var1, Random var2, int var3, int var4, int var5, int var6, int var7, StructureBoundingBox var8)
+ {
+ if (var2.nextInt(var3) == 1)
+ {
+ this.placeBlockAtCurrentPosition(var1, var7, 0, var4, var5, var6, var8);
+ }
+ }
+
+ protected void fillWithBlocksWithNotify(World var1, StructureBoundingBox var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9, int var10, boolean var11)
+ {
+ for (int var12 = var4; var12 <= var7; ++var12)
+ {
+ for (int var13 = var3; var13 <= var6; ++var13)
+ {
+ for (int var14 = var5; var14 <= var8; ++var14)
+ {
+ if (!var11 || this.getBlockIdAtCurrentPosition(var1, var13, var12, var14, var2) != 0)
+ {
+ if (var12 != var4 && var12 != var7 && var13 != var3 && var13 != var6 && var14 != var5 && var14 != var8)
+ {
+ this.placeBlockAtCurrentPositionWithNotify(var1, var10, 0, var13, var12, var14, var2);
+ } else
+ {
+ this.placeBlockAtCurrentPositionWithNotify(var1, var9, 0, var13, var12, var14, var2);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public void fillVariedBlocks(World var1, StructureBoundingBox var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9, int var10, int var11, int var12, int var13, Random var14, boolean var15)
+ {
+ for (int var16 = var4; var16 <= var7; ++var16)
+ {
+ for (int var17 = var3; var17 <= var6; ++var17)
+ {
+ for (int var18 = var5; var18 <= var8; ++var18)
+ {
+ if (this.getBlockIdAtCurrentPosition(var1, var17, var16, var18, var2) == 0 || var15)
+ {
+ int var19 = var11;
+ int var20 = var12;
+
+ if (var14.nextInt(var13) == 1)
+ {
+ var19 = var9;
+ var20 = var10;
+ }
+
+ this.placeBlockAtCurrentPositionWithNotify(var1, var19, var20, var17, var16, var18, var2);
+ }
+ }
+ }
+ }
+ }
+
+ protected void placeBlockAtCurrentPositionWithNotify(World var1, int var2, int var3, int var4, int var5, int var6, StructureBoundingBox var7)
+ {
+ int var8 = this.getXWithOffset(var4, var6);
+ int var9 = this.getYWithOffset(var5);
+ int var10 = this.getZWithOffset(var4, var6);
+
+ if (var7.isVecInside(var8, var9, var10))
+ {
+ var1.setBlock(var8, var9, var10, var2, var3, 2);
+ }
+ }
+
+ public static StructureBoundingBox findValidPlacement(List var0, Random var1, int var2, int var3, int var4, int var5)
+ {
+ int var6 = 10 + var1.nextInt(8);
+ int var7 = 10 + var1.nextInt(8);
+ byte var8 = 10;
+ StructureBoundingBox var9 = new StructureBoundingBox(var2, var3, var4, var2, var3 + var8, var4);
+
+ switch (var5)
+ {
+ case 0:
+ var9.minX = var2 - 1;
+ var9.maxX = var2 + var6 - 1;
+ var9.maxZ = var4 + var7;
+ break;
+
+ case 1:
+ var9.minX = var2 - var6;
+ var9.minZ = var4 - 1;
+ var9.maxZ = var4 + var7 - 1;
+ break;
+
+ case 2:
+ var9.minX = var2 - 1;
+ var9.maxX = var2 + var6 - 1;
+ var9.minZ = var4 - var7;
+ break;
+
+ case 3:
+ var9.maxX = var2 + var6;
+ var9.minZ = var4 - 1;
+ var9.maxZ = var4 + var7 - 1;
+ }
+
+ return StructureComponent.findIntersecting(var0, var9) != null ? null : var9;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonBronzeEntrance.java b/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonBronzeEntrance.java
new file mode 100644
index 0000000..c18cc4b
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonBronzeEntrance.java
@@ -0,0 +1,113 @@
+package net.aetherteam.aether.worldgen;
+
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.structure.StructureBoundingBox;
+import net.minecraft.world.gen.structure.StructureComponent;
+
+public class ComponentDungeonBronzeEntrance extends ComponentDungeonBronzeRoom
+{
+ int thedirection;
+
+ public ComponentDungeonBronzeEntrance(int var1, StructureComponent var2, StructureBronzeDungeonStart var3, Random var4, StructureBoundingBox var5, int var6)
+ {
+ super(var1, var2, var3, var4, var5, var6);
+ this.thedirection = var6;
+ }
+
+ public static StructureBoundingBox findValidPlacement(List var0, Random var1, int var2, int var3, int var4, int var5)
+ {
+ StructureBoundingBox var6 = new StructureBoundingBox(var2, var3, var4, var2, var3 + 4, var4);
+ int var7;
+
+ for (var7 = 16; var7 > 0; --var7)
+ {
+ int var8 = var7 * 5;
+
+ switch (var5)
+ {
+ case 0:
+ var6.maxX = var2 + 4;
+ var6.maxZ = var4 + (var8 - 1);
+ break;
+
+ case 1:
+ var6.minX = var2 - (var8 - 1);
+ var6.maxZ = var4 + 4;
+ break;
+
+ case 2:
+ var6.maxX = var2 + 4;
+ var6.minZ = var4 - (var8 - 1);
+ break;
+
+ case 3:
+ var6.maxX = var2 + (var8 - 1);
+ var6.maxZ = var4 + 4;
+ }
+
+ if (StructureComponent.findIntersecting(var0, var6) == null)
+ {
+ break;
+ }
+ }
+
+ return var7 > 0 ? var6 : null;
+ }
+
+ /**
+ * second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at
+ * the end, it adds Fences...
+ */
+ public boolean addComponentParts(World var1, Random var2, StructureBoundingBox var3)
+ {
+ boolean var4 = false;
+ boolean var5 = false;
+ boolean var6 = false;
+ boolean var7 = false;
+
+ switch (this.thedirection)
+ {
+ case 0:
+ var5 = true;
+ break;
+
+ case 1:
+ var6 = true;
+ break;
+
+ case 2:
+ var7 = true;
+ break;
+
+ case 3:
+ var4 = true;
+ }
+
+ byte var14 = 0;
+ byte var12 = 0;
+ byte var11 = 0;
+ byte var13 = 0;
+
+ for (int var8 = this.boundingBox.minX; var8 <= this.boundingBox.maxX; ++var8)
+ {
+ for (int var9 = this.boundingBox.minY; var9 <= this.boundingBox.maxY; ++var9)
+ {
+ for (int var10 = this.boundingBox.minZ; var10 <= this.boundingBox.maxZ; ++var10)
+ {
+ if (this.getBlockIdAtCurrentPosition(var1, var9, var8, var10, var3) != 0)
+ {
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.LockedDungeonStone.blockID, 0, var9, var8, var10, var3);
+ }
+ }
+ }
+ }
+
+ this.fillWithBlocks(var1, var3, this.boundingBox.minX + 1 + var11, this.boundingBox.minY + 1, this.boundingBox.minZ + 1 + var13, this.boundingBox.maxX - 1 + var14, this.boundingBox.maxY - 1, this.boundingBox.maxZ - 1 + var12, 0, 0, false);
+ this.cutHolesForEntrances(var1, var2, var3);
+ return true;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonBronzeHost.java b/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonBronzeHost.java
new file mode 100644
index 0000000..afa333e
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonBronzeHost.java
@@ -0,0 +1,191 @@
+package net.aetherteam.aether.worldgen;
+
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.entities.bosses.EntitySliderHostMimic;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.structure.StructureBoundingBox;
+import net.minecraft.world.gen.structure.StructureComponent;
+
+public class ComponentDungeonBronzeHost extends ComponentDungeonBronzeRoom
+{
+ public ComponentDungeonBronzeHost(int var1, StructureComponent var2, StructureBronzeDungeonStart var3, Random var4, int var5, int var6)
+ {
+ super(var1, var2, var3, var4, var5, var6);
+ }
+
+ public ComponentDungeonBronzeHost(int var1, StructureComponent var2, StructureBronzeDungeonStart var3, Random var4, StructureBoundingBox var5, int var6)
+ {
+ super(var1, var2, var3, var4, var5, var6);
+ }
+
+ /**
+ * second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at
+ * the end, it adds Fences...
+ */
+ public boolean addComponentParts(World var1, Random var2, StructureBoundingBox var3)
+ {
+ int var5;
+ int var4;
+ int var6;
+
+ for (var4 = this.boundingBox.minY; var4 <= this.boundingBox.maxY; ++var4)
+ {
+ for (var5 = this.boundingBox.minX; var5 <= this.boundingBox.maxX; ++var5)
+ {
+ for (var6 = this.boundingBox.minZ; var6 <= this.boundingBox.maxZ; ++var6)
+ {
+ this.placeBlockAtCurrentPosition(var1, var2.nextInt(20) == 1 ? AetherBlocks.LockedLightDungeonStone.blockID : AetherBlocks.LockedDungeonStone.blockID, 0, var5, var4, var6, var3);
+ }
+ }
+ }
+
+ var4 = this.boundingBox.minX + (this.boundingBox.maxX - this.boundingBox.minX) / 2 - 1;
+ var5 = this.boundingBox.minY + 1;
+ var6 = this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2 - 1;
+ int var7 = this.boundingBox.minX + (this.boundingBox.maxX - this.boundingBox.minX) / 2 + 2;
+ int var8 = this.boundingBox.minY + 1;
+ int var9 = this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2 + 2;
+ this.fillWithBlocksWithNotify(var1, var3, this.boundingBox.minX + 1, this.boundingBox.minY + 1, this.boundingBox.minZ + 1, this.boundingBox.maxX - 1, this.boundingBox.maxY - 1, this.boundingBox.maxZ - 1, 0, 0, false);
+ this.fillWithBlocksWithNotify(var1, var3, var4, var5, var6, var7, var8, var9, AetherBlocks.LockedDungeonStone.blockID, 0, false);
+ int var10 = this.boundingBox.minX + (this.boundingBox.maxX - this.boundingBox.minX) / 2;
+ int var11 = this.boundingBox.minY + 2;
+ int var12 = this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2;
+
+ if (var3.isVecInside(var10 + 1, var11, var12 + 1))
+ {
+ EntitySliderHostMimic var13 = new EntitySliderHostMimic(var1);
+ var13.setPosition((double) (var10 + 1), (double) var11, (double) (var12 + 1));
+ DungeonHandler var14 = DungeonHandler.instance();
+ Dungeon var15 = var14.getInstanceAt(MathHelper.floor_double((double) (var10 + 1)), MathHelper.floor_double((double) var11), MathHelper.floor_double((double) (var12 + 1)));
+
+ if (var15 != null)
+ {
+ var15.registerEntity((float) (var10 + 1), (float) var11, (float) (var12 + 1), var13);
+ }
+
+ var1.spawnEntityInWorld(var13);
+ }
+
+ this.cutHolesForEntrances(var1, var2, var3);
+ return true;
+ }
+
+ public void setBlockWithChance(World var1, Random var2, int var3, int var4, int var5, int var6, int var7, int var8, StructureBoundingBox var9)
+ {
+ if (var2.nextInt(var3) == 1)
+ {
+ this.placeBlockAtCurrentPosition(var1, var7, var8, var4, var5, var6, var9);
+ }
+ }
+
+ public void setBlockWithChance(World var1, Random var2, int var3, int var4, int var5, int var6, int var7, StructureBoundingBox var8)
+ {
+ if (var2.nextInt(var3) == 1)
+ {
+ this.placeBlockAtCurrentPosition(var1, var7, 0, var4, var5, var6, var8);
+ }
+ }
+
+ protected void fillWithBlocksWithNotify(World var1, StructureBoundingBox var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9, int var10, boolean var11)
+ {
+ for (int var12 = var4; var12 <= var7; ++var12)
+ {
+ for (int var13 = var3; var13 <= var6; ++var13)
+ {
+ for (int var14 = var5; var14 <= var8; ++var14)
+ {
+ if (!var11 || this.getBlockIdAtCurrentPosition(var1, var13, var12, var14, var2) != 0)
+ {
+ if (var12 != var4 && var12 != var7 && var13 != var3 && var13 != var6 && var14 != var5 && var14 != var8)
+ {
+ this.placeBlockAtCurrentPositionWithNotify(var1, var10, 0, var13, var12, var14, var2);
+ } else
+ {
+ this.placeBlockAtCurrentPositionWithNotify(var1, var9, 0, var13, var12, var14, var2);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public void fillVariedBlocks(World var1, StructureBoundingBox var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9, int var10, int var11, int var12, int var13, Random var14, boolean var15)
+ {
+ for (int var16 = var4; var16 <= var7; ++var16)
+ {
+ for (int var17 = var3; var17 <= var6; ++var17)
+ {
+ for (int var18 = var5; var18 <= var8; ++var18)
+ {
+ if (this.getBlockIdAtCurrentPosition(var1, var17, var16, var18, var2) == 0 || var15)
+ {
+ int var19 = var11;
+ int var20 = var12;
+
+ if (var14.nextInt(var13) == 1)
+ {
+ var19 = var9;
+ var20 = var10;
+ }
+
+ this.placeBlockAtCurrentPositionWithNotify(var1, var19, var20, var17, var16, var18, var2);
+ }
+ }
+ }
+ }
+ }
+
+ protected void placeBlockAtCurrentPositionWithNotify(World var1, int var2, int var3, int var4, int var5, int var6, StructureBoundingBox var7)
+ {
+ int var8 = this.getXWithOffset(var4, var6);
+ int var9 = this.getYWithOffset(var5);
+ int var10 = this.getZWithOffset(var4, var6);
+
+ if (var7.isVecInside(var8, var9, var10))
+ {
+ var1.setBlock(var8, var9, var10, var2, var3, 2);
+ }
+ }
+
+ public static StructureBoundingBox findValidPlacement(List var0, Random var1, int var2, int var3, int var4, int var5)
+ {
+ int var6 = 12 + var1.nextInt(3);
+ int var7 = 12 + var1.nextInt(3);
+ byte var8 = 12;
+ StructureBoundingBox var9 = new StructureBoundingBox(var2, var3, var4, var2, var3 + var8, var4);
+
+ switch (var5)
+ {
+ case 0:
+ var9.minX = var2 - 1;
+ var9.maxX = var2 + var6 - 1;
+ var9.maxZ = var4 + var7;
+ break;
+
+ case 1:
+ var9.minX = var2 - var6;
+ var9.minZ = var4 - 1;
+ var9.maxZ = var4 + var7 - 1;
+ break;
+
+ case 2:
+ var9.minX = var2 - 1;
+ var9.maxX = var2 + var6 - 1;
+ var9.minZ = var4 - var7;
+ break;
+
+ case 3:
+ var9.maxX = var2 + var6;
+ var9.minZ = var4 - 1;
+ var9.maxZ = var4 + var7 - 1;
+ }
+
+ return StructureComponent.findIntersecting(var0, var9) != null ? null : var9;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonBronzeLarge.java b/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonBronzeLarge.java
new file mode 100644
index 0000000..c292c23
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonBronzeLarge.java
@@ -0,0 +1,213 @@
+package net.aetherteam.aether.worldgen;
+
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.entities.bosses.EntitySentryGuardian;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.structure.StructureBoundingBox;
+import net.minecraft.world.gen.structure.StructureComponent;
+
+public class ComponentDungeonBronzeLarge extends ComponentDungeonBronzeRoom
+{
+ public int yOffset = 6;
+
+ public ComponentDungeonBronzeLarge(int var1, StructureComponent var2, StructureBronzeDungeonStart var3, Random var4, int var5, int var6)
+ {
+ super(var1, var2, var3, var4, var5, var6);
+ }
+
+ public ComponentDungeonBronzeLarge(int var1, StructureComponent var2, StructureBronzeDungeonStart var3, Random var4, StructureBoundingBox var5, int var6)
+ {
+ super(var1, var2, var3, var4, var5, var6);
+ }
+
+ /**
+ * second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at
+ * the end, it adds Fences...
+ */
+ public boolean addComponentParts(World var1, Random var2, StructureBoundingBox var3)
+ {
+ int var6;
+ int var5;
+
+ for (int var4 = this.boundingBox.minY; var4 <= this.boundingBox.maxY; ++var4)
+ {
+ for (var5 = this.boundingBox.minX; var5 <= this.boundingBox.maxX; ++var5)
+ {
+ for (var6 = this.boundingBox.minZ; var6 <= this.boundingBox.maxZ; ++var6)
+ {
+ this.placeBlockAtCurrentPosition(var1, var2.nextInt(20) == 1 ? AetherBlocks.LockedLightDungeonStone.blockID : AetherBlocks.LockedDungeonStone.blockID, 0, var5, var4, var6, var3);
+ }
+ }
+ }
+
+ byte var15 = 8;
+ var5 = this.boundingBox.minX + var15 + (this.boundingBox.maxX - (this.boundingBox.minX + var15)) / 2 - 1;
+ var6 = this.boundingBox.minY + this.yOffset + 1;
+ int var7 = this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2 - 1;
+ int var8 = this.boundingBox.minX + var15 + (this.boundingBox.maxX - (this.boundingBox.minX + var15)) / 2 + 2;
+ int var9 = this.boundingBox.minY + this.yOffset + 1;
+ int var10 = this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2 + 2;
+ this.fillWithBlocksWithNotify(var1, var3, this.boundingBox.minX + 1 + var15, var6, this.boundingBox.minZ + 1, this.boundingBox.maxX - 1, this.boundingBox.maxY - 1, this.boundingBox.maxZ - 1, 0, 0, false);
+ this.fillWithBlocksWithNotify(var1, var3, this.boundingBox.minX + 1, var6, this.boundingBox.minZ + 1, this.boundingBox.minX + 1 + var15, this.boundingBox.maxY - 1, this.boundingBox.maxZ - 1, 0, 0, false);
+ this.fillWithBlocksWithNotify(var1, var3, this.boundingBox.minX + var15, var6, this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2 - 1, this.boundingBox.minX + var15, var6 + 3, this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2 + 2, 0, 0, false);
+ this.fillWithBlocksWithNotify(var1, var3, var5, var6 - 3, var7, var8, var9, var10, AetherBlocks.LockedDungeonStone.blockID, AetherBlocks.LockedDungeonStone.blockID, false);
+
+ for (int var11 = 1; var11 <= 6; ++var11)
+ {
+ boolean var12 = false;
+ int var13 = this.boundingBox.minY + var11;
+ int var14;
+ int var17;
+
+ for (var17 = var11; var17 <= this.boundingBox.maxX - this.boundingBox.minX - var11; ++var17)
+ {
+ this.placeBlockAtCurrentPositionWithNotify(var1, AetherBlocks.CarvedDungeonStairs.blockID, 3, this.boundingBox.minX + var17, var13, this.boundingBox.maxZ - var11, var3);
+ this.placeBlockAtCurrentPositionWithNotify(var1, AetherBlocks.CarvedDungeonStairs.blockID, 2, this.boundingBox.minX + var17, var13, this.boundingBox.minZ + var11, var3);
+
+ for (var14 = 1; var14 < 6; ++var14)
+ {
+ this.placeBlockAtCurrentPositionWithNotify(var1, 0, 0, this.boundingBox.minX + var17, var13 + var14, this.boundingBox.minZ + var11, var3);
+ this.placeBlockAtCurrentPositionWithNotify(var1, 0, 0, this.boundingBox.minX + var17, var13 + var14, this.boundingBox.maxZ - var11, var3);
+ }
+ }
+
+ for (var17 = var11; var17 <= this.boundingBox.maxZ - this.boundingBox.minZ - var11; ++var17)
+ {
+ this.placeBlockAtCurrentPositionWithNotify(var1, AetherBlocks.CarvedDungeonStairs.blockID, 0, this.boundingBox.minX + var11, var13, this.boundingBox.minZ + var17, var3);
+ this.placeBlockAtCurrentPositionWithNotify(var1, AetherBlocks.CarvedDungeonStairs.blockID, 1, this.boundingBox.maxX - var11, var13, this.boundingBox.minZ + var17, var3);
+
+ for (var14 = 1; var14 < 6; ++var14)
+ {
+ this.placeBlockAtCurrentPositionWithNotify(var1, 0, 0, this.boundingBox.minX + var11, var13 + var14, this.boundingBox.minZ + var17, var3);
+ this.placeBlockAtCurrentPositionWithNotify(var1, 0, 0, this.boundingBox.maxX - var11, var13 + var14, this.boundingBox.minZ + var17, var3);
+ }
+ }
+ }
+
+ if (var3.isVecInside(this.boundingBox.minX + var15 + (this.boundingBox.maxX - (this.boundingBox.minX + var15)) / 2 + 1, var9 + 2, this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2 + 1))
+ {
+ EntitySentryGuardian var16 = new EntitySentryGuardian(var1);
+ var16.setPosition((double) (this.boundingBox.minX + var15 + (this.boundingBox.maxX - (this.boundingBox.minX + var15)) / 2 + 1), (double) (var9 + 2), (double) (this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2 + 1));
+ var1.spawnEntityInWorld(var16);
+ }
+
+ this.cutHolesForEntrances(var1, var2, var3);
+ return true;
+ }
+
+ public void setBlockWithChance(World var1, Random var2, int var3, int var4, int var5, int var6, int var7, int var8, StructureBoundingBox var9)
+ {
+ if (var2.nextInt(var3) == 1)
+ {
+ this.placeBlockAtCurrentPosition(var1, var7, var8, var4, var5, var6, var9);
+ }
+ }
+
+ public void setBlockWithChance(World var1, Random var2, int var3, int var4, int var5, int var6, int var7, StructureBoundingBox var8)
+ {
+ if (var2.nextInt(var3) == 1)
+ {
+ this.placeBlockAtCurrentPosition(var1, var7, 0, var4, var5, var6, var8);
+ }
+ }
+
+ protected void fillWithBlocksWithNotify(World var1, StructureBoundingBox var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9, int var10, boolean var11)
+ {
+ for (int var12 = var4; var12 <= var7; ++var12)
+ {
+ for (int var13 = var3; var13 <= var6; ++var13)
+ {
+ for (int var14 = var5; var14 <= var8; ++var14)
+ {
+ if (!var11 || this.getBlockIdAtCurrentPosition(var1, var13, var12, var14, var2) != 0)
+ {
+ if (var12 != var4 && var12 != var7 && var13 != var3 && var13 != var6 && var14 != var5 && var14 != var8)
+ {
+ this.placeBlockAtCurrentPositionWithNotify(var1, var10, 0, var13, var12, var14, var2);
+ } else
+ {
+ this.placeBlockAtCurrentPositionWithNotify(var1, var9, 0, var13, var12, var14, var2);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public void fillVariedBlocks(World var1, StructureBoundingBox var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9, int var10, int var11, int var12, int var13, Random var14, boolean var15)
+ {
+ for (int var16 = var4; var16 <= var7; ++var16)
+ {
+ for (int var17 = var3; var17 <= var6; ++var17)
+ {
+ for (int var18 = var5; var18 <= var8; ++var18)
+ {
+ if (var1.getBlockId(var17, var16, var18) == 0 || var15)
+ {
+ int var19 = var11;
+ int var20 = var12;
+
+ if (var14.nextInt(var13) == 1)
+ {
+ var19 = var9;
+ var20 = var10;
+ }
+
+ this.placeBlockAtCurrentPositionWithNotify(var1, var19, var20, var17, var16, var18, var2);
+ }
+ }
+ }
+ }
+ }
+
+ protected void placeBlockAtCurrentPositionWithNotify(World var1, int var2, int var3, int var4, int var5, int var6, StructureBoundingBox var7)
+ {
+ int var8 = this.getXWithOffset(var4, var6);
+ int var9 = this.getYWithOffset(var5);
+ int var10 = this.getZWithOffset(var4, var6);
+
+ if (var7.isVecInside(var8, var9, var10))
+ {
+ var1.setBlock(var8, var9, var10, var2, var3, 2);
+ }
+ }
+
+ public static StructureBoundingBox findValidPlacement(List var0, Random var1, int var2, int var3, int var4, int var5)
+ {
+ int var6 = 20 + var1.nextInt(20);
+ int var7 = 20 + var1.nextInt(20);
+ byte var8 = 16;
+ StructureBoundingBox var9 = new StructureBoundingBox(var2, var3, var4, var2, var3 + var8, var4);
+
+ switch (var5)
+ {
+ case 0:
+ var9.minX = var2 - 1;
+ var9.maxX = var2 + var6 - 1;
+ var9.maxZ = var4 + var7;
+ break;
+
+ case 1:
+ var9.minX = var2 - var6;
+ var9.minZ = var4 - 1;
+ var9.maxZ = var4 + var7 - 1;
+ break;
+
+ case 2:
+ var9.minX = var2 - 1;
+ var9.maxX = var2 + var6 - 1;
+ var9.minZ = var4 - var7;
+ break;
+
+ case 3:
+ var9.maxX = var2 + var6;
+ var9.minZ = var4 - 1;
+ var9.maxZ = var4 + var7 - 1;
+ }
+
+ return StructureComponent.findIntersecting(var0, var9) != null ? null : var9;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonBronzeLight.java b/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonBronzeLight.java
new file mode 100644
index 0000000..ecfce5c
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonBronzeLight.java
@@ -0,0 +1,253 @@
+package net.aetherteam.aether.worldgen;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.relauncher.Side;
+
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.AetherLoot;
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.tile_entities.TileEntitySkyrootChest;
+import net.minecraft.block.Block;
+import net.minecraft.tileentity.TileEntityMobSpawner;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.structure.StructureBoundingBox;
+import net.minecraft.world.gen.structure.StructureComponent;
+
+public class ComponentDungeonBronzeLight extends ComponentDungeonBronzeRoom
+{
+ public ComponentDungeonBronzeLight(int var1, StructureComponent var2, StructureBronzeDungeonStart var3, Random var4, int var5, int var6)
+ {
+ super(var1, var2, var3, var4, var5, var6);
+ }
+
+ public ComponentDungeonBronzeLight(int var1, StructureComponent var2, StructureBronzeDungeonStart var3, Random var4, StructureBoundingBox var5, int var6)
+ {
+ super(var1, var2, var3, var4, var5, var6);
+ }
+
+ /**
+ * second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at
+ * the end, it adds Fences...
+ */
+ public boolean addComponentParts(World var1, Random var2, StructureBoundingBox var3)
+ {
+ int var5;
+ int var4;
+ int var6;
+
+ for (var4 = this.boundingBox.minY; var4 <= this.boundingBox.maxY; ++var4)
+ {
+ for (var5 = this.boundingBox.minX; var5 <= this.boundingBox.maxX; ++var5)
+ {
+ for (var6 = this.boundingBox.minZ; var6 <= this.boundingBox.maxZ; ++var6)
+ {
+ this.placeBlockAtCurrentPosition(var1, var2.nextInt(20) == 1 ? AetherBlocks.Trap.blockID : AetherBlocks.LockedDungeonStone.blockID, 0, var5, var4, var6, var3);
+ }
+ }
+ }
+
+ var4 = this.boundingBox.minX + (this.boundingBox.maxX - this.boundingBox.minX) / 2 - 1;
+ var5 = this.boundingBox.minY + 1;
+ var6 = this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2 - 1;
+ int var7 = this.boundingBox.minX + (this.boundingBox.maxX - this.boundingBox.minX) / 2 + 1;
+ int var8 = this.boundingBox.minY + 1;
+ int var9 = this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2 + 1;
+ this.fillWithBlocksWithNotify(var1, var3, this.boundingBox.minX + 1, this.boundingBox.minY + 1, this.boundingBox.minZ + 1, this.boundingBox.maxX - 1, this.boundingBox.maxY - 1, this.boundingBox.maxZ - 1, 0, 0, false);
+ this.fillWithBlocksWithNotify(var1, var3, var4, var5, var6, var7, var8, var9, AetherBlocks.LockedDungeonStone.blockID, 0, false);
+ this.fillWithBlocksWithNotify(var1, var3, var4, this.boundingBox.maxY - 1, var6, var7, this.boundingBox.maxY - 1, var9, AetherBlocks.LockedDungeonStone.blockID, 0, false);
+ this.fillVariedBlocks(var1, var3, var4, this.boundingBox.minY + (this.boundingBox.maxY - this.boundingBox.minY) / 2, var6, var7, this.boundingBox.minY + (this.boundingBox.maxY - this.boundingBox.minY) / 2, var9, AetherBlocks.LockedLightDungeonStone.blockID, 0, AetherBlocks.LockedDungeonStone.blockID, 0, 2, var2, false);
+ this.fillVariedBlocks(var1, var3, var4 + 1, var5, var6 + 1, var7 - 1, this.boundingBox.maxY - 1, var9 - 1, AetherBlocks.CarvedDungeonWall.blockID, 0, AetherBlocks.CarvedDungeonWall.blockID, 0, 1, var2, true);
+ this.fillVariedBlocks(var1, var3, var4, var5, var6, var4, this.boundingBox.maxY - 1, var6, AetherBlocks.CarvedDungeonWall.blockID, 0, AetherBlocks.CarvedDungeonWall.blockID, 0, 1, var2, false);
+ this.fillVariedBlocks(var1, var3, var7, var5, var9, var7, this.boundingBox.maxY - 1, var9, AetherBlocks.CarvedDungeonWall.blockID, 0, AetherBlocks.CarvedDungeonWall.blockID, 0, 1, var2, false);
+ int var10 = this.boundingBox.minX + (this.boundingBox.maxX - this.boundingBox.minX) / 2;
+ int var11 = this.boundingBox.minY + 2;
+ int var12 = this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2;
+
+ for (int var13 = 1; var13 <= 4; ++var13)
+ {
+ byte var14 = 0;
+ byte var15 = 0;
+ byte var16 = 1;
+
+ switch (var13)
+ {
+ case 1:
+ var14 = 1;
+ var16 = 1;
+ break;
+
+ case 2:
+ var14 = -1;
+ var16 = 2;
+ break;
+
+ case 3:
+ var15 = 1;
+ var16 = 3;
+ break;
+
+ case 4:
+ var15 = -1;
+ var16 = 4;
+ }
+
+ int var17 = this.getXWithOffset(var10 + var14, var12 + var15);
+ int var18 = this.getYWithOffset(var11);
+ int var19 = this.getZWithOffset(var10 + var14, var12 + var15);
+
+ if (var3.isVecInside(var17, var18, var19) && var1.getBlockId(var17, var18, var19) != AetherBlocks.SkyrootChest.blockID && var2.nextInt(3) == 0)
+ {
+ TileEntitySkyrootChest var20 = null;
+ var1.setBlock(var17, var18, var19, AetherBlocks.SkyrootChest.blockID, var16, 2);
+ var1.setBlockMetadataWithNotify(var17, var18, var19, var16, 2);
+ Dungeon var21 = DungeonHandler.instance().getInstanceAt(var17, var18, var19);
+ var21.registerSafeBlock(var17, var18, var19, AetherBlocks.SkyrootChest.blockID, var16);
+ var20 = (TileEntitySkyrootChest) var1.getBlockTileEntity(var17, var18, var19);
+
+ if (var20 != null)
+ {
+ Side var22 = FMLCommonHandler.instance().getEffectiveSide();
+
+ if (var22.isServer() && !var1.isRemote)
+ {
+ for (int var23 = 0; var23 < 3 + var2.nextInt(3); ++var23)
+ {
+ var20.setInventorySlotContents(var2.nextInt(var20.getSizeInventory()), AetherLoot.NORMAL.getRandomItem(var2));
+ }
+ }
+ }
+ }
+ }
+
+ this.placeBlockAtCurrentPosition(var1, Block.mobSpawner.blockID, 0, var10, var11 + 1, var12, var3);
+ TileEntityMobSpawner var26 = (TileEntityMobSpawner) var1.getBlockTileEntity(var10, var11 + 1, var12);
+
+ if (var26 != null)
+ {
+ String var25 = var2.nextInt(3) == 1 ? "SentryGolemRanged" : "SentryMelee";
+ var26.func_98049_a().setMobID(var25);
+ Dungeon var24 = DungeonHandler.instance().getInstanceAt(var10, var11 + 1, var12);
+ var24.registerMobSpawner(var10, var11 + 1, var12, var25);
+ }
+
+ this.cutHolesForEntrances(var1, var2, var3);
+ return true;
+ }
+
+ public void setBlockWithChance(World var1, Random var2, int var3, int var4, int var5, int var6, int var7, int var8, StructureBoundingBox var9)
+ {
+ if (var2.nextInt(var3) == 1)
+ {
+ this.placeBlockAtCurrentPosition(var1, var7, var8, var4, var5, var6, var9);
+ }
+ }
+
+ public void setBlockWithChance(World var1, Random var2, int var3, int var4, int var5, int var6, int var7, StructureBoundingBox var8)
+ {
+ if (var2.nextInt(var3) == 1)
+ {
+ this.placeBlockAtCurrentPosition(var1, var7, 0, var4, var5, var6, var8);
+ }
+ }
+
+ protected void fillWithBlocksWithNotify(World var1, StructureBoundingBox var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9, int var10, boolean var11)
+ {
+ for (int var12 = var4; var12 <= var7; ++var12)
+ {
+ for (int var13 = var3; var13 <= var6; ++var13)
+ {
+ for (int var14 = var5; var14 <= var8; ++var14)
+ {
+ if (!var11 || this.getBlockIdAtCurrentPosition(var1, var13, var12, var14, var2) != 0)
+ {
+ if (var12 != var4 && var12 != var7 && var13 != var3 && var13 != var6 && var14 != var5 && var14 != var8)
+ {
+ this.placeBlockAtCurrentPositionWithNotify(var1, var10, 0, var13, var12, var14, var2);
+ } else
+ {
+ this.placeBlockAtCurrentPositionWithNotify(var1, var9, 0, var13, var12, var14, var2);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public void fillVariedBlocks(World var1, StructureBoundingBox var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9, int var10, int var11, int var12, int var13, Random var14, boolean var15)
+ {
+ for (int var16 = var4; var16 <= var7; ++var16)
+ {
+ for (int var17 = var3; var17 <= var6; ++var17)
+ {
+ for (int var18 = var5; var18 <= var8; ++var18)
+ {
+ if (this.getBlockIdAtCurrentPosition(var1, var17, var16, var18, var2) == 0 || var15)
+ {
+ int var19 = var11;
+ int var20 = var12;
+
+ if (var14.nextInt(var13) == 1)
+ {
+ var19 = var9;
+ var20 = var10;
+ }
+
+ this.placeBlockAtCurrentPositionWithNotify(var1, var19, var20, var17, var16, var18, var2);
+ }
+ }
+ }
+ }
+ }
+
+ protected void placeBlockAtCurrentPositionWithNotify(World var1, int var2, int var3, int var4, int var5, int var6, StructureBoundingBox var7)
+ {
+ int var8 = this.getXWithOffset(var4, var6);
+ int var9 = this.getYWithOffset(var5);
+ int var10 = this.getZWithOffset(var4, var6);
+
+ if (var7.isVecInside(var8, var9, var10))
+ {
+ var1.setBlock(var8, var9, var10, var2, var3, 2);
+ }
+ }
+
+ public static StructureBoundingBox findValidPlacement(List var0, Random var1, int var2, int var3, int var4, int var5)
+ {
+ int var6 = 8 + var1.nextInt(16);
+ int var7 = 8 + var1.nextInt(16);
+ byte var8 = 10;
+ StructureBoundingBox var9 = new StructureBoundingBox(var2, var3, var4, var2, var3 + var8, var4);
+
+ switch (var5)
+ {
+ case 0:
+ var9.minX = var2 - 1;
+ var9.maxX = var2 + var6 - 1;
+ var9.maxZ = var4 + var7;
+ break;
+
+ case 1:
+ var9.minX = var2 - var6;
+ var9.minZ = var4 - 1;
+ var9.maxZ = var4 + var7 - 1;
+ break;
+
+ case 2:
+ var9.minX = var2 - 1;
+ var9.maxX = var2 + var6 - 1;
+ var9.minZ = var4 - var7;
+ break;
+
+ case 3:
+ var9.maxX = var2 + var6;
+ var9.minZ = var4 - 1;
+ var9.maxZ = var4 + var7 - 1;
+ }
+
+ return StructureComponent.findIntersecting(var0, var9) != null ? null : var9;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonBronzeRoom.java b/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonBronzeRoom.java
new file mode 100644
index 0000000..4552ae4
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonBronzeRoom.java
@@ -0,0 +1,225 @@
+package net.aetherteam.aether.worldgen;
+
+import java.io.Serializable;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.minecraft.world.World;
+import net.minecraft.world.chunk.Chunk;
+import net.minecraft.world.gen.structure.StructureBoundingBox;
+import net.minecraft.world.gen.structure.StructureComponent;
+
+public class ComponentDungeonBronzeRoom extends StructureComponent implements Serializable
+{
+ public List roomsLinkedToTheRoom = new LinkedList();
+ StructureBronzeDungeonStart structureAsAWhole;
+ List entrances = new LinkedList();
+ int YOffset = 0;
+
+ public ComponentDungeonBronzeRoom(int var1, StructureComponent var2, StructureBronzeDungeonStart var3, Random var4, int var5, int var6)
+ {
+ super(var1);
+ this.structureAsAWhole = var3;
+
+ if (var2 != null)
+ {
+ this.roomsLinkedToTheRoom.add(var2);
+ }
+
+ this.boundingBox = new StructureBoundingBox(var5, 50, var6, var5 + 7 + var4.nextInt(6), 60, var6 + 7 + var4.nextInt(6));
+ this.addEntranceToAllFourWalls();
+ }
+
+ public ComponentDungeonBronzeRoom(int var1, StructureComponent var2, StructureBronzeDungeonStart var3, Random var4)
+ {
+ super(var1);
+ this.structureAsAWhole = var3;
+ this.roomsLinkedToTheRoom.add(var2);
+ }
+
+ public ComponentDungeonBronzeRoom(int var1, StructureComponent var2, StructureBronzeDungeonStart var3, Random var4, StructureBoundingBox var5, int var6)
+ {
+ super(var1);
+ this.structureAsAWhole = var3;
+ this.roomsLinkedToTheRoom.add(var2);
+ this.boundingBox = var5;
+ this.addEntranceToAllFourWalls();
+ }
+
+ public void addEntranceToAllFourWalls()
+ {
+ this.entrances.add(new StructureBoundingBox(this.boundingBox.minX + 1, this.boundingBox.minY + 1 + this.YOffset, this.boundingBox.minZ - 2, this.boundingBox.maxX - 1, this.boundingBox.maxY - 1, this.boundingBox.minZ));
+ this.entrances.add(new StructureBoundingBox(this.boundingBox.minX + 1, this.boundingBox.minY + 1 + this.YOffset, this.boundingBox.maxZ, this.boundingBox.maxX - 1, this.boundingBox.maxY - 1, this.boundingBox.maxZ + 2));
+ this.entrances.add(new StructureBoundingBox(this.boundingBox.minX - 2, this.boundingBox.minY + 1 + this.YOffset, this.boundingBox.minZ + 1, this.boundingBox.minX, this.boundingBox.maxY - 1, this.boundingBox.maxZ - 1));
+ this.entrances.add(new StructureBoundingBox(this.boundingBox.maxX, this.boundingBox.minY + 1 + this.YOffset, this.boundingBox.minZ + 1, this.boundingBox.maxX + 2, this.boundingBox.maxY - 1, this.boundingBox.maxZ - 1));
+ }
+
+ public void addStructor(List var1, Random var2, int var3, int var4, int var5, int var6, int var7)
+ {
+ StructureComponent var8 = StructureBronzeDungeonPieces.getNextComponent(this.structureAsAWhole, this, var1, var2, var3, var4, var5, var6, var7);
+
+ if (var8 != null)
+ {
+ this.roomsLinkedToTheRoom.add(var8);
+ }
+ }
+
+ public boolean ChunkCheck(int var1, int var2, int var3, StructureBoundingBox var4)
+ {
+ int var5 = this.getXWithOffset(var1, var3);
+ int var6 = this.getYWithOffset(var2);
+ int var7 = this.getZWithOffset(var1, var3);
+ return var4.isVecInside(var5, var6, var7);
+ }
+
+ /**
+ * current Position depends on currently set Coordinates mode, is computed here
+ */
+ protected void placeBlockAtCurrentPosition(World var1, int var2, int var3, int var4, int var5, int var6, StructureBoundingBox var7)
+ {
+ int var8 = this.getXWithOffset(var4, var6);
+ int var9 = this.getYWithOffset(var5);
+ int var10 = this.getZWithOffset(var4, var6);
+
+ if (var7.isVecInside(var8, var9, var10))
+ {
+ Chunk var11 = var1.getChunkFromChunkCoords(var8 >> 4, var10 >> 4);
+ var11.setBlockIDWithMetadata(var8 & 15, var9, var10 & 15, var2, var3);
+ }
+ }
+
+ /**
+ * Initiates construction of the Structure Component picked, at the current Location of StructGen
+ */
+ public void buildComponent(StructureComponent var1, List var2, Random var3)
+ {
+ this.buildComponent(var2, var3);
+ }
+
+ public void buildComponent(List var1, Random var2)
+ {
+ int var3 = this.getComponentType();
+ byte var4 = 2;
+
+ if (this.boundingBox.getYSize() - var4 <= 0)
+ {
+ var4 = 1;
+ }
+
+ int var5;
+
+ for (var5 = 0; var5 < this.boundingBox.getXSize() && var5 + 3 <= this.boundingBox.getXSize(); ++var5)
+ {
+ this.addStructor(var1, var2, this.boundingBox.minX + var5, this.boundingBox.minY + var2.nextInt(var4) + this.YOffset, this.boundingBox.minZ - 1, 2, var3);
+ }
+
+ for (var5 = 0; var5 < this.boundingBox.getXSize() && var5 + 3 <= this.boundingBox.getXSize(); ++var5)
+ {
+ this.addStructor(var1, var2, this.boundingBox.minX + var5, this.boundingBox.minY + var2.nextInt(var4) + this.YOffset, this.boundingBox.maxZ + 1, 0, var3);
+ }
+
+ for (var5 = 0; var5 < this.boundingBox.getZSize() && var5 + 3 <= this.boundingBox.getZSize(); ++var5)
+ {
+ this.addStructor(var1, var2, this.boundingBox.minX - 1, this.boundingBox.minY + var2.nextInt(var4) + this.YOffset, this.boundingBox.minZ + var5, 1, var3);
+ }
+
+ for (var5 = 0; var5 < this.boundingBox.getZSize() && var5 + 3 >= this.boundingBox.getZSize(); ++var5)
+ {
+ this.addStructor(var1, var2, this.boundingBox.maxX + 1, this.boundingBox.minY + var2.nextInt(var4) + this.YOffset, this.boundingBox.minZ + var5, 3, var3);
+ }
+ }
+
+ public int GetValue(int var1, boolean var2)
+ {
+ var1 = var1 >> 4 << 4;
+ return var1 < 0 ? (var2 ? var1 : var1 + 16) : (var2 ? var1 : var1 + 16);
+ }
+
+ /**
+ * second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at
+ * the end, it adds Fences...
+ */
+ public boolean addComponentParts(World var1, Random var2, StructureBoundingBox var3)
+ {
+ this.fillWithBlocks(var1, var3, this.boundingBox.minX, this.boundingBox.minY, this.boundingBox.minZ, this.boundingBox.maxX, this.boundingBox.maxY, this.boundingBox.maxZ, AetherBlocks.LockedDungeonStone.blockID, 0, false);
+ this.fillWithBlocks(var1, var3, this.boundingBox.minX + 1, this.boundingBox.minY + 1, this.boundingBox.minZ + 1, this.boundingBox.maxX - 1, this.boundingBox.maxY - 1, this.boundingBox.maxZ - 1, 0, 0, false);
+ this.cutHolesForEntrances(var1, var2, var3);
+ return true;
+ }
+
+ public void cutHolesForEntrances(World var1, Random var2, StructureBoundingBox var3)
+ {
+ Iterator var4 = this.entrances.iterator();
+
+ while (var4.hasNext())
+ {
+ StructureBoundingBox var5 = (StructureBoundingBox) var4.next();
+ Iterator var6 = this.roomsLinkedToTheRoom.iterator();
+
+ while (var6.hasNext())
+ {
+ Iterator var7 = ((ComponentDungeonBronzeRoom) var6.next()).entrances.iterator();
+
+ while (var7.hasNext())
+ {
+ StructureBoundingBox var8 = this.findIntercetingCube(var5, (StructureBoundingBox) var7.next());
+
+ if (var8 != null)
+ {
+ this.fillWithBlocks(var1, var3, var8.minX, var8.minY, var8.minZ, var8.maxX, var8.maxY, var8.maxZ, 0, 0, false);
+ }
+ }
+ }
+ }
+ }
+
+ public StructureBoundingBox findIntercetingCube(StructureBoundingBox var1, StructureBoundingBox var2)
+ {
+ int var3 = Math.max(var1.minX, var2.minX);
+ int var4 = Math.max(var1.minY, var2.minY);
+ int var5 = Math.max(var1.minZ, var2.minZ);
+ int var6 = Math.min(var1.maxX, var2.maxX);
+ int var7 = Math.min(var1.maxY, var2.maxY);
+ int var8 = Math.min(var1.maxZ, var2.maxZ);
+ return var3 < var6 && var4 < var7 && var5 < var8 ? new StructureBoundingBox(var3, var4, var5, var6, var7, var8) : null;
+ }
+
+ public static StructureBoundingBox findValidPlacement(List var0, Random var1, int var2, int var3, int var4, int var5)
+ {
+ byte var6 = 8;
+ byte var7 = 8;
+ byte var8 = 5;
+ StructureBoundingBox var9 = new StructureBoundingBox(var2, var3, var4, var2, var3 + var8, var4);
+
+ switch (var5)
+ {
+ case 0:
+ var9.minX = var2 - 1;
+ var9.maxX = var2 + var6 - 1;
+ var9.maxZ = var4 + var7;
+ break;
+
+ case 1:
+ var9.minX = var2 - var6;
+ var9.minZ = var4 - 1;
+ var9.maxZ = var4 + var7 - 1;
+ break;
+
+ case 2:
+ var9.minX = var2 - 1;
+ var9.maxX = var2 + var6 - 1;
+ var9.minZ = var4 - var7;
+ break;
+
+ case 3:
+ var9.maxX = var2 + var6;
+ var9.minZ = var4 - 1;
+ var9.maxZ = var4 + var7 - 1;
+ }
+
+ return StructureComponent.findIntersecting(var0, var9) != null ? null : var9;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonBronzeSentryGuard.java b/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonBronzeSentryGuard.java
new file mode 100644
index 0000000..9fe42e6
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonBronzeSentryGuard.java
@@ -0,0 +1,232 @@
+package net.aetherteam.aether.worldgen;
+
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.entities.bosses.EntitySentryGuardian;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.structure.StructureBoundingBox;
+import net.minecraft.world.gen.structure.StructureComponent;
+
+public class ComponentDungeonBronzeSentryGuard extends ComponentDungeonBronzeRoom
+{
+ public int yOffset = 2;
+
+ public ComponentDungeonBronzeSentryGuard(int var1, StructureComponent var2, StructureBronzeDungeonStart var3, Random var4, int var5, int var6)
+ {
+ super(var1, var2, var3, var4, var5, var6);
+ this.boundingBox = new StructureBoundingBox(var5, 50 - this.yOffset, var6, var5 + 24, 60, var6 + 15);
+ }
+
+ public ComponentDungeonBronzeSentryGuard(int var1, StructureComponent var2, StructureBronzeDungeonStart var3, Random var4, StructureBoundingBox var5, int var6)
+ {
+ super(var1, var2, var3, var4, var5, var6);
+ }
+
+ /**
+ * second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at
+ * the end, it adds Fences...
+ */
+ public boolean addComponentParts(World var1, Random var2, StructureBoundingBox var3)
+ {
+ int var6;
+ int var5;
+
+ for (int var4 = this.boundingBox.minY; var4 <= this.boundingBox.maxY; ++var4)
+ {
+ for (var5 = this.boundingBox.minX; var5 <= this.boundingBox.maxX; ++var5)
+ {
+ for (var6 = this.boundingBox.minZ; var6 <= this.boundingBox.maxZ; ++var6)
+ {
+ this.placeBlockAtCurrentPosition(var1, var2.nextInt(20) == 1 ? AetherBlocks.LockedLightDungeonStone.blockID : AetherBlocks.LockedDungeonStone.blockID, 0, var5, var4, var6, var3);
+ }
+ }
+ }
+
+ byte var17 = 8;
+ var5 = this.boundingBox.minX + var17 + (this.boundingBox.maxX - (this.boundingBox.minX + var17)) / 2 - 1;
+ var6 = this.boundingBox.minY + 1;
+ int var7 = this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2 - 1;
+ int var8 = this.boundingBox.minX + var17 + (this.boundingBox.maxX - (this.boundingBox.minX + var17)) / 2 + 2;
+ int var9 = this.boundingBox.minY + 1;
+ int var10 = this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2 + 2;
+ this.fillWithBlocksWithNotify(var1, var3, this.boundingBox.minX + 1 + var17, var6, this.boundingBox.minZ + 1, this.boundingBox.maxX - 1, this.boundingBox.maxY - 1, this.boundingBox.maxZ - 1, 0, 0, false);
+ this.fillWithBlocksWithNotify(var1, var3, this.boundingBox.minX + 1, var6, this.boundingBox.minZ + 1, this.boundingBox.minX + 1 + var17, this.boundingBox.maxY - 1, this.boundingBox.maxZ - 1, 0, 0, false);
+ this.fillWithBlocksWithNotify(var1, var3, var5, var6 + 2, var7, var8, var9 + 2, var10, AetherBlocks.LockedDungeonStone.blockID, AetherBlocks.LockedDungeonStone.blockID, false);
+ this.fillWithBlocksWithNotify(var1, var3, this.boundingBox.minX + 4, var6, this.boundingBox.minZ + 4, this.boundingBox.maxX - 4, var6 + 1, this.boundingBox.maxZ - 4, AetherBlocks.LockedDungeonStone.blockID, AetherBlocks.LockedDungeonStone.blockID, false);
+ int var18;
+ int var13;
+
+ for (int var11 = 1; var11 <= 2; ++var11)
+ {
+ boolean var12 = false;
+ var13 = this.boundingBox.minY + var11;
+
+ for (var18 = var11; var18 <= this.boundingBox.maxX - this.boundingBox.minX - 2 - var11; ++var18)
+ {
+ this.placeBlockAtCurrentPositionWithNotify(var1, AetherBlocks.CarvedDungeonStairs.blockID, 3, this.boundingBox.minX + var18 + 1, var13, this.boundingBox.maxZ - var11 - 1, var3);
+ this.placeBlockAtCurrentPositionWithNotify(var1, AetherBlocks.CarvedDungeonStairs.blockID, 2, this.boundingBox.minX + var18 + 1, var13, this.boundingBox.minZ + var11 + 1, var3);
+ this.placeBlockAtCurrentPositionWithNotify(var1, 0, 0, this.boundingBox.minX + var18, var13 + 2, this.boundingBox.minZ + var11, var3);
+ this.placeBlockAtCurrentPositionWithNotify(var1, 0, 0, this.boundingBox.minX + var18, var13 + 2, this.boundingBox.maxZ - var11, var3);
+ this.placeBlockAtCurrentPositionWithNotify(var1, 0, 0, this.boundingBox.minX + var18, var13 + 1, this.boundingBox.minZ + var11, var3);
+ this.placeBlockAtCurrentPositionWithNotify(var1, 0, 0, this.boundingBox.minX + var18, var13 + 1, this.boundingBox.maxZ - var11, var3);
+ }
+
+ for (var18 = var11; var18 <= this.boundingBox.maxZ - this.boundingBox.minZ - 2 - var11; ++var18)
+ {
+ this.placeBlockAtCurrentPositionWithNotify(var1, AetherBlocks.CarvedDungeonStairs.blockID, 0, this.boundingBox.minX + var11 + 1, var13, this.boundingBox.minZ + var18 + 1, var3);
+ this.placeBlockAtCurrentPositionWithNotify(var1, AetherBlocks.CarvedDungeonStairs.blockID, 1, this.boundingBox.maxX - var11 - 1, var13, this.boundingBox.minZ + var18 + 1, var3);
+ this.placeBlockAtCurrentPositionWithNotify(var1, 0, 0, this.boundingBox.maxX - var11, var13 + 2, this.boundingBox.minZ + var18, var3);
+ this.placeBlockAtCurrentPositionWithNotify(var1, 0, 0, this.boundingBox.minX + var11, var13 + 2, this.boundingBox.minZ + var18, var3);
+ this.placeBlockAtCurrentPositionWithNotify(var1, 0, 0, this.boundingBox.maxX - var11, var13 + 1, this.boundingBox.minZ + var18, var3);
+ this.placeBlockAtCurrentPositionWithNotify(var1, 0, 0, this.boundingBox.minX + var11, var13 + 1, this.boundingBox.minZ + var18, var3);
+ }
+ }
+
+ if (var3.isVecInside(this.boundingBox.minX + var17 + (this.boundingBox.maxX - (this.boundingBox.minX + var17)) / 2 + 1, var9 + 2, this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2 + 1))
+ {
+ EntitySentryGuardian var19 = new EntitySentryGuardian(var1);
+ var18 = this.boundingBox.minX + var17 + (this.boundingBox.maxX - (this.boundingBox.minX + var17)) / 2 + 1;
+ var13 = var9 + 4;
+ int var14 = this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2 + 1;
+ var19.setPosition((double) var18, (double) var13, (double) var14);
+ DungeonHandler var15 = DungeonHandler.instance();
+ Dungeon var16 = var15.getInstanceAt(MathHelper.floor_double((double) var18), MathHelper.floor_double((double) var13), MathHelper.floor_double((double) var14));
+
+ if (var16 != null)
+ {
+ var16.registerEntity((float) var18, (float) var13, (float) var14, var19);
+ }
+
+ if (!var1.isRemote)
+ {
+ var1.spawnEntityInWorld(var19);
+ }
+ }
+
+ this.cutHolesForEntrances(var1, var2, var3);
+ return true;
+ }
+
+ public void addShapeWithStairs(World var1, StructureBoundingBox var2, int var3, int var4, int var5, int var6, int var7, int var8)
+ {
+ this.fillWithBlocksWithNotify(var1, var2, var3, var4, var5, var6, var7, var8, AetherBlocks.LockedDungeonStone.blockID, 0, false);
+ }
+
+ public void setBlockWithChance(World var1, Random var2, int var3, int var4, int var5, int var6, int var7, int var8, StructureBoundingBox var9)
+ {
+ if (var2.nextInt(var3) == 1)
+ {
+ this.placeBlockAtCurrentPosition(var1, var7, var8, var4, var5, var6, var9);
+ }
+ }
+
+ public void setBlockWithChance(World var1, Random var2, int var3, int var4, int var5, int var6, int var7, StructureBoundingBox var8)
+ {
+ if (var2.nextInt(var3) == 1)
+ {
+ this.placeBlockAtCurrentPosition(var1, var7, 0, var4, var5, var6, var8);
+ }
+ }
+
+ protected void fillWithBlocksWithNotify(World var1, StructureBoundingBox var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9, int var10, boolean var11)
+ {
+ for (int var12 = var4; var12 <= var7; ++var12)
+ {
+ for (int var13 = var3; var13 <= var6; ++var13)
+ {
+ for (int var14 = var5; var14 <= var8; ++var14)
+ {
+ if (!var11 || this.getBlockIdAtCurrentPosition(var1, var13, var12, var14, var2) != 0)
+ {
+ if (var12 != var4 && var12 != var7 && var13 != var3 && var13 != var6 && var14 != var5 && var14 != var8)
+ {
+ this.placeBlockAtCurrentPositionWithNotify(var1, var10, 0, var13, var12, var14, var2);
+ } else
+ {
+ this.placeBlockAtCurrentPositionWithNotify(var1, var9, 0, var13, var12, var14, var2);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public void fillVariedBlocks(World var1, StructureBoundingBox var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9, int var10, int var11, int var12, int var13, Random var14, boolean var15)
+ {
+ for (int var16 = var4; var16 <= var7; ++var16)
+ {
+ for (int var17 = var3; var17 <= var6; ++var17)
+ {
+ for (int var18 = var5; var18 <= var8; ++var18)
+ {
+ if (this.getBlockIdAtCurrentPosition(var1, var17, var16, var18, var2) == 0 || var15)
+ {
+ int var19 = var11;
+ int var20 = var12;
+
+ if (var14.nextInt(var13) == 1)
+ {
+ var19 = var9;
+ var20 = var10;
+ }
+
+ this.placeBlockAtCurrentPositionWithNotify(var1, var19, var20, var17, var16, var18, var2);
+ }
+ }
+ }
+ }
+ }
+
+ protected void placeBlockAtCurrentPositionWithNotify(World var1, int var2, int var3, int var4, int var5, int var6, StructureBoundingBox var7)
+ {
+ int var8 = this.getXWithOffset(var4, var6);
+ int var9 = this.getYWithOffset(var5);
+ int var10 = this.getZWithOffset(var4, var6);
+
+ if (var7.isVecInside(var8, var9, var10))
+ {
+ var1.setBlock(var8, var9, var10, var2, var3, 5);
+ }
+ }
+
+ public static StructureBoundingBox findValidPlacement(List var0, Random var1, int var2, int var3, int var4, int var5)
+ {
+ byte var6 = 24;
+ byte var7 = 16;
+ byte var8 = 10;
+ StructureBoundingBox var9 = new StructureBoundingBox(var2, var3, var4, var2, var3 + var8, var4);
+
+ switch (var5)
+ {
+ case 0:
+ var9.minX = var2 - 1;
+ var9.maxX = var2 + var6 - 1;
+ var9.maxZ = var4 + var7;
+ break;
+
+ case 1:
+ var9.minX = var2 - var6;
+ var9.minZ = var4 - 1;
+ var9.maxZ = var4 + var7 - 1;
+ break;
+
+ case 2:
+ var9.minX = var2 - 1;
+ var9.maxX = var2 + var6 - 1;
+ var9.minZ = var4 - var7;
+ break;
+
+ case 3:
+ var9.maxX = var2 + var6;
+ var9.minZ = var4 - 1;
+ var9.maxZ = var4 + var7 - 1;
+ }
+
+ return StructureComponent.findIntersecting(var0, var9) != null ? null : var9;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonCorridor.java b/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonCorridor.java
new file mode 100644
index 0000000..897c4f5
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonCorridor.java
@@ -0,0 +1,114 @@
+package net.aetherteam.aether.worldgen;
+
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.structure.StructureBoundingBox;
+import net.minecraft.world.gen.structure.StructureComponent;
+
+public class ComponentDungeonCorridor extends ComponentDungeonBronzeRoom
+{
+ private int sectionCount;
+
+ public ComponentDungeonCorridor(int var1, StructureComponent var2, StructureBronzeDungeonStart var3, Random var4, StructureBoundingBox var5, int var6)
+ {
+ super(var1, var2, var3, var4);
+ this.boundingBox = var5;
+
+ if (this.coordBaseMode != 2 && this.coordBaseMode != 0)
+ {
+ this.sectionCount = this.boundingBox.getXSize() / 5;
+ } else
+ {
+ this.sectionCount = this.boundingBox.getZSize() / 5;
+ }
+
+ this.addEntranceToAllFourWalls();
+
+ if (var6 != 0 && var6 == 2)
+ {
+ ;
+ }
+ }
+
+ public static StructureBoundingBox findValidPlacement(List var0, Random var1, int var2, int var3, int var4, int var5)
+ {
+ StructureBoundingBox var6 = new StructureBoundingBox(var2, var3, var4, var2, var3 + 4, var4);
+ int var7;
+
+ for (var7 = var1.nextInt(3) + 2; var7 > 0; --var7)
+ {
+ int var8 = var7 * 5;
+
+ switch (var5)
+ {
+ case 0:
+ var6.maxX = var2 + 4;
+ var6.maxZ = var4 + (var8 - 1);
+ break;
+
+ case 1:
+ var6.minX = var2 - (var8 - 1);
+ var6.maxZ = var4 + 4;
+ break;
+
+ case 2:
+ var6.maxX = var2 + 4;
+ var6.minZ = var4 - (var8 - 1);
+ break;
+
+ case 3:
+ var6.maxX = var2 + (var8 - 1);
+ var6.maxZ = var4 + 4;
+ }
+
+ if (StructureComponent.findIntersecting(var0, var6) == null)
+ {
+ break;
+ }
+ }
+
+ return var7 > 0 ? var6 : null;
+ }
+
+ /**
+ * second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at
+ * the end, it adds Fences...
+ */
+ public boolean addComponentParts(World var1, Random var2, StructureBoundingBox var3)
+ {
+ int var4 = this.sectionCount * 5 - 1;
+ this.fillVariedBlocks(var1, var3, this.boundingBox.minX, this.boundingBox.minY, this.boundingBox.minZ, this.boundingBox.maxX, this.boundingBox.maxY, this.boundingBox.maxZ, AetherBlocks.DungeonHolystone.blockID, 2, AetherBlocks.DungeonHolystone.blockID, 0, 2, var2, true);
+ this.fillWithBlocks(var1, var3, this.boundingBox.minX + 1, this.boundingBox.minY + 1, this.boundingBox.minZ + 1, this.boundingBox.maxX - 1, this.boundingBox.maxY - 1, this.boundingBox.maxZ - 1, 0, 0, false);
+ this.cutHolesForEntrances(var1, var2, var3);
+ return true;
+ }
+
+ public void fillVariedBlocks(World var1, StructureBoundingBox var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9, int var10, int var11, int var12, int var13, Random var14, boolean var15)
+ {
+ for (int var16 = var4; var16 <= var7; ++var16)
+ {
+ for (int var17 = var3; var17 <= var6; ++var17)
+ {
+ for (int var18 = var5; var18 <= var8; ++var18)
+ {
+ if (this.getBlockIdAtCurrentPosition(var1, var17, var16, var18, var2) == 0 || var15)
+ {
+ int var19 = var11;
+ int var20 = var12;
+
+ if (var14.nextInt(var13) == 1)
+ {
+ var19 = var9;
+ var20 = var10;
+ }
+
+ this.placeBlockAtCurrentPosition(var1, var19, var20, var17, var16, var18, var2);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonCross.java b/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonCross.java
new file mode 100644
index 0000000..a1f718c
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonCross.java
@@ -0,0 +1,209 @@
+package net.aetherteam.aether.worldgen;
+
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.structure.StructureBoundingBox;
+import net.minecraft.world.gen.structure.StructureComponent;
+
+public class ComponentDungeonCross extends StructureComponent
+{
+ private final int corridorDirection;
+ private final boolean isMultipleFloors;
+ List roomsLinkedToTheRoom = new LinkedList();
+
+ public ComponentDungeonCross(int var1, Random var2, StructureBoundingBox var3, int var4)
+ {
+ super(var1);
+ this.corridorDirection = var4;
+ this.boundingBox = var3;
+ this.isMultipleFloors = var3.getYSize() > 3;
+ }
+
+ public static StructureBoundingBox findValidPlacement(List var0, Random var1, int var2, int var3, int var4, int var5)
+ {
+ StructureBoundingBox var6 = new StructureBoundingBox(var2, var3, var4, var2, var3 + 4, var4);
+
+ switch (var5)
+ {
+ case 0:
+ var6.minX = var2 - 1;
+ var6.maxX = var2 + 7;
+ var6.maxZ = var4 + 8;
+ break;
+
+ case 1:
+ var6.minX = var2 - 8;
+ var6.minZ = var4 - 1;
+ var6.maxZ = var4 + 7;
+ break;
+
+ case 2:
+ var6.minX = var2 - 1;
+ var6.maxX = var2 + 7;
+ var6.minZ = var4 - 8;
+ break;
+
+ case 3:
+ var6.maxX = var2 + 8;
+ var6.minZ = var4 - 1;
+ var6.maxZ = var4 + 7;
+ }
+
+ return StructureComponent.findIntersecting(var0, var6) != null ? null : var6;
+ }
+
+ public void addStructor(StructureComponent var1, List var2, Random var3, int var4, int var5, int var6, int var7, int var8) {}
+
+ /**
+ * Initiates construction of the Structure Component picked, at the current Location of StructGen
+ */
+ public void buildComponent(StructureComponent var1, List var2, Random var3)
+ {
+ int var4 = this.getComponentType();
+
+ switch (this.corridorDirection)
+ {
+ case 0:
+ this.addStructor(var1, var2, var3, this.boundingBox.minX + 1, this.boundingBox.minY, this.boundingBox.maxZ + 1, 0, var4);
+ this.addStructor(var1, var2, var3, this.boundingBox.minX - 1, this.boundingBox.minY, this.boundingBox.minZ + 1, 1, var4);
+ this.addStructor(var1, var2, var3, this.boundingBox.maxX + 1, this.boundingBox.minY, this.boundingBox.minZ + 1, 3, var4);
+ break;
+
+ case 1:
+ this.addStructor(var1, var2, var3, this.boundingBox.minX + 1, this.boundingBox.minY, this.boundingBox.minZ - 1, 2, var4);
+ this.addStructor(var1, var2, var3, this.boundingBox.minX + 1, this.boundingBox.minY, this.boundingBox.maxZ + 1, 0, var4);
+ this.addStructor(var1, var2, var3, this.boundingBox.minX - 1, this.boundingBox.minY, this.boundingBox.minZ + 1, 1, var4);
+ break;
+
+ case 2:
+ this.addStructor(var1, var2, var3, this.boundingBox.minX + 1, this.boundingBox.minY, this.boundingBox.minZ - 1, 2, var4);
+ this.addStructor(var1, var2, var3, this.boundingBox.minX - 1, this.boundingBox.minY, this.boundingBox.minZ + 1, 1, var4);
+ this.addStructor(var1, var2, var3, this.boundingBox.maxX + 1, this.boundingBox.minY, this.boundingBox.minZ + 1, 3, var4);
+ break;
+
+ case 3:
+ this.addStructor(var1, var2, var3, this.boundingBox.minX + 1, this.boundingBox.minY, this.boundingBox.minZ - 1, 2, var4);
+ this.addStructor(var1, var2, var3, this.boundingBox.minX + 1, this.boundingBox.minY, this.boundingBox.maxZ + 1, 0, var4);
+ this.addStructor(var1, var2, var3, this.boundingBox.maxX + 1, this.boundingBox.minY, this.boundingBox.minZ + 1, 3, var4);
+ }
+
+ if (this.isMultipleFloors)
+ {
+ if (var3.nextBoolean())
+ {
+ ;
+ }
+
+ if (var3.nextBoolean())
+ {
+ ;
+ }
+
+ if (var3.nextBoolean())
+ {
+ ;
+ }
+
+ if (var3.nextBoolean())
+ {
+ ;
+ }
+ }
+ }
+
+ /**
+ * second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at
+ * the end, it adds Fences...
+ */
+ public boolean addComponentParts(World var1, Random var2, StructureBoundingBox var3)
+ {
+ if (this.isLiquidInStructureBoundingBox(var1, var3))
+ {
+ return false;
+ } else
+ {
+ if (this.isMultipleFloors)
+ {
+ this.fillWithBlocks(var1, var3, this.boundingBox.minX + 1, this.boundingBox.minY, this.boundingBox.minZ, this.boundingBox.maxX - 1, this.boundingBox.minY + 3 - 1, this.boundingBox.maxZ, 0, 0, false);
+ this.fillWithBlocks(var1, var3, this.boundingBox.minX, this.boundingBox.minY, this.boundingBox.minZ + 1, this.boundingBox.maxX, this.boundingBox.minY + 3 - 1, this.boundingBox.maxZ - 1, 0, 0, false);
+ this.fillWithBlocks(var1, var3, this.boundingBox.minX + 1, this.boundingBox.maxY - 2, this.boundingBox.minZ, this.boundingBox.maxX - 1, this.boundingBox.maxY, this.boundingBox.maxZ, 0, 0, false);
+ this.fillWithBlocks(var1, var3, this.boundingBox.minX, this.boundingBox.maxY - 2, this.boundingBox.minZ + 1, this.boundingBox.maxX, this.boundingBox.maxY, this.boundingBox.maxZ - 1, 0, 0, false);
+ this.fillWithBlocks(var1, var3, this.boundingBox.minX + 1, this.boundingBox.minY + 3, this.boundingBox.minZ + 1, this.boundingBox.maxX - 1, this.boundingBox.minY + 3, this.boundingBox.maxZ - 1, 0, 0, false);
+ } else
+ {
+ this.fillWithBlocks(var1, var3, this.boundingBox.minX + 1, this.boundingBox.minY, this.boundingBox.minZ, this.boundingBox.maxX - 1, this.boundingBox.maxY, this.boundingBox.maxZ, 0, 0, false);
+ this.fillWithBlocks(var1, var3, this.boundingBox.minX, this.boundingBox.minY, this.boundingBox.minZ + 1, this.boundingBox.maxX, this.boundingBox.maxY, this.boundingBox.maxZ - 1, 0, 0, false);
+ }
+
+ int var5;
+ int var4;
+
+ for (var4 = this.boundingBox.minX; var4 <= this.boundingBox.maxX; ++var4)
+ {
+ for (var5 = this.boundingBox.minZ; var5 <= this.boundingBox.maxZ; ++var5)
+ {
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.LockedDungeonStone.blockID, 0, var4, this.boundingBox.minY, var5, var3);
+ }
+ }
+
+ if (this.corridorDirection != 1)
+ {
+ for (var4 = this.boundingBox.minY; var4 <= this.boundingBox.maxY; ++var4)
+ {
+ for (var5 = this.boundingBox.minZ; var5 <= this.boundingBox.maxZ; ++var5)
+ {
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.LockedDungeonStone.blockID, 0, this.boundingBox.minX - 1, var4, var5, var3);
+ }
+ }
+ }
+
+ if (this.corridorDirection != 2)
+ {
+ for (var4 = this.boundingBox.minY; var4 <= this.boundingBox.maxY; ++var4)
+ {
+ for (var5 = this.boundingBox.minX; var5 <= this.boundingBox.maxX; ++var5)
+ {
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.LockedDungeonStone.blockID, 0, var5, var4, this.boundingBox.minZ - 1, var3);
+ }
+ }
+ }
+
+ if (this.corridorDirection != 3)
+ {
+ for (var4 = this.boundingBox.minY; var4 <= this.boundingBox.maxY; ++var4)
+ {
+ for (var5 = this.boundingBox.minZ; var5 <= this.boundingBox.maxZ; ++var5)
+ {
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.LockedDungeonStone.blockID, 0, this.boundingBox.maxX + 1, var4, var5, var3);
+ }
+ }
+ }
+
+ if (this.corridorDirection != 4)
+ {
+ for (var4 = this.boundingBox.minY; var4 <= this.boundingBox.maxY; ++var4)
+ {
+ for (var5 = this.boundingBox.minX; var5 <= this.boundingBox.maxX; ++var5)
+ {
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.LockedDungeonStone.blockID, 0, var5, var4, this.boundingBox.maxZ + 1, var3);
+ }
+ }
+ }
+
+ Iterator var7 = this.roomsLinkedToTheRoom.iterator();
+
+ while (var7.hasNext())
+ {
+ StructureBoundingBox var6 = (StructureBoundingBox) var7.next();
+ this.fillWithBlocks(var1, var3, var6.minX, var6.maxY, var6.minZ, var6.maxX, var6.maxY, var6.maxZ, 0, 0, false);
+ }
+
+ return true;
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonEntranceTop.java b/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonEntranceTop.java
new file mode 100644
index 0000000..9d51620
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonEntranceTop.java
@@ -0,0 +1,225 @@
+package net.aetherteam.aether.worldgen;
+
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.structure.StructureBoundingBox;
+import net.minecraft.world.gen.structure.StructureComponent;
+
+public class ComponentDungeonEntranceTop extends ComponentDungeonBronzeEntrance
+{
+ public int randHeight;
+ public boolean isTower;
+ public int towerRarity = 5;
+
+ public ComponentDungeonEntranceTop(int var1, StructureComponent var2, StructureBronzeDungeonStart var3, Random var4, StructureBoundingBox var5, int var6)
+ {
+ super(var1, var2, var3, var4, var5, var6);
+ this.boundingBox = var5;
+ this.randHeight = var4.nextInt(25);
+ this.isTower = var4.nextInt(this.towerRarity) == 0;
+ int var7 = this.boundingBox.maxY - this.boundingBox.minY;
+
+ for (int var8 = 0; var8 < var7; var8 += 5)
+ {
+ this.entrances.add(new StructureBoundingBox(this.boundingBox.minX + 1, this.boundingBox.minY + 1 + var8, this.boundingBox.minZ - 2, this.boundingBox.maxX - 1, this.boundingBox.minY + 3 + var8, this.boundingBox.minZ));
+ this.entrances.add(new StructureBoundingBox(this.boundingBox.minX + 1, this.boundingBox.minY + 1 + var8, this.boundingBox.maxZ, this.boundingBox.maxX - 1, this.boundingBox.minY + 3 + var8, this.boundingBox.maxZ + 2));
+ this.entrances.add(new StructureBoundingBox(this.boundingBox.minX - 2, this.boundingBox.minY + 1 + var8, this.boundingBox.minZ + 1, this.boundingBox.minX, this.boundingBox.minY + 3 + var8, this.boundingBox.maxZ - 1));
+ this.entrances.add(new StructureBoundingBox(this.boundingBox.maxX, this.boundingBox.minY + 1 + var8, this.boundingBox.minZ + 1, this.boundingBox.maxX + 2, this.boundingBox.minY + 3 + var8, this.boundingBox.maxZ - 1));
+ }
+ }
+
+ public void buildComponent(List var1, Random var2)
+ {
+ int var3 = this.boundingBox.maxY - this.boundingBox.minY;
+
+ for (int var4 = 1; var4 < 3; ++var4)
+ {
+ for (int var5 = 0; var5 < var3; var5 += 5)
+ {
+ this.addStructor(var1, var2, this.boundingBox.minX + var4, this.boundingBox.minY + var3 + 1, this.boundingBox.maxZ + 1, 0, this.componentType);
+ this.addStructor(var1, var2, this.boundingBox.minX - 1, this.boundingBox.minY + var3 + 1, this.boundingBox.minZ + var4, 1, this.componentType);
+ this.addStructor(var1, var2, this.boundingBox.minX + var4, this.boundingBox.minY + var3 + 1, this.boundingBox.minZ - 1, 2, this.componentType);
+ this.addStructor(var1, var2, this.boundingBox.maxX + 1, this.boundingBox.minY + var3 + 1, this.boundingBox.minZ + var4, 3, this.componentType);
+ }
+
+ this.addStructor(var1, var2, this.boundingBox.minX + var4, this.boundingBox.minY + 5, this.boundingBox.maxZ + 1, 0, this.componentType);
+ this.addStructor(var1, var2, this.boundingBox.minX - 1, this.boundingBox.minY + 5, this.boundingBox.minZ + var4, 1, this.componentType);
+ this.addStructor(var1, var2, this.boundingBox.minX + var4, this.boundingBox.minY + 5, this.boundingBox.minZ - 1, 2, this.componentType);
+ this.addStructor(var1, var2, this.boundingBox.maxX + 1, this.boundingBox.minY + 5, this.boundingBox.minZ + var4, 3, this.componentType);
+ }
+ }
+
+ /**
+ * second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at
+ * the end, it adds Fences...
+ */
+ public boolean addComponentParts(World var1, Random var2, StructureBoundingBox var3)
+ {
+ this.fillWithBlocks(var1, var3, this.boundingBox.minX, this.boundingBox.minY, this.boundingBox.minZ, this.boundingBox.maxX, this.boundingBox.maxY, this.boundingBox.maxZ, AetherBlocks.LockedDungeonStone.blockID, 0, false);
+ this.fillWithBlocks(var1, var3, this.boundingBox.minX + 1, this.boundingBox.minY + 1, this.boundingBox.minZ + 1, this.boundingBox.maxX - 1, this.boundingBox.maxY - 1, this.boundingBox.maxZ - 1, 0, 0, false);
+ int var4 = (this.boundingBox.maxY - this.boundingBox.minY) / 5;
+ int var6;
+ int var5;
+
+ for (var5 = 1; var5 < var4; ++var5)
+ {
+ this.fillWithBlocks(var1, var3, this.boundingBox.minX, this.boundingBox.minY + 5 * var5, this.boundingBox.minZ, this.boundingBox.maxX, this.boundingBox.minY + 5 * var5, this.boundingBox.maxZ, AetherBlocks.LockedDungeonStone.blockID, 0, false);
+ this.fillWithBlocks(var1, var3, this.boundingBox.minX + 2, this.boundingBox.minY + 5 * var5, this.boundingBox.minZ + 2, this.boundingBox.maxX - 2, this.boundingBox.minY + 5 * var5, this.boundingBox.maxZ - 2, 0, 0, false);
+ var6 = 5 * var5 - 5;
+ this.placeBlockAtCurrentPosition(var1, var2.nextInt(20) == 1 ? AetherBlocks.LockedLightDungeonStone.blockID : AetherBlocks.LockedDungeonStone.blockID, 0, this.boundingBox.minX + 2, this.boundingBox.minY + 1 + var6, this.boundingBox.minZ + 2, var3);
+ this.placeBlockAtCurrentPosition(var1, var2.nextInt(20) == 1 ? AetherBlocks.LockedLightDungeonStone.blockID : AetherBlocks.LockedDungeonStone.blockID, 0, this.boundingBox.minX + 3, this.boundingBox.minY + 1 + var6, this.boundingBox.minZ + 2, var3);
+ this.placeBlockAtCurrentPosition(var1, var2.nextInt(20) == 1 ? AetherBlocks.LockedLightDungeonStone.blockID : AetherBlocks.LockedDungeonStone.blockID, 0, this.boundingBox.minX + 2, this.boundingBox.minY + 1 + var6, this.boundingBox.minZ + 3, var3);
+ this.placeBlockAtCurrentPosition(var1, var2.nextInt(20) == 1 ? AetherBlocks.LockedLightDungeonStone.blockID : AetherBlocks.LockedDungeonStone.blockID, 0, this.boundingBox.minX + 2, this.boundingBox.minY + 2 + var6, this.boundingBox.minZ + 4, var3);
+ this.placeBlockAtCurrentPosition(var1, var2.nextInt(20) == 1 ? AetherBlocks.LockedLightDungeonStone.blockID : AetherBlocks.LockedDungeonStone.blockID, 0, this.boundingBox.minX + 2, this.boundingBox.minY + 2 + var6, this.boundingBox.minZ + 5, var3);
+ this.placeBlockAtCurrentPosition(var1, var2.nextInt(20) == 1 ? AetherBlocks.LockedLightDungeonStone.blockID : AetherBlocks.LockedDungeonStone.blockID, 0, this.boundingBox.minX + 3, this.boundingBox.minY + 2 + var6, this.boundingBox.minZ + 5, var3);
+ this.placeBlockAtCurrentPosition(var1, var2.nextInt(20) == 1 ? AetherBlocks.LockedLightDungeonStone.blockID : AetherBlocks.LockedDungeonStone.blockID, 0, this.boundingBox.minX + 4, this.boundingBox.minY + 3 + var6, this.boundingBox.minZ + 5, var3);
+ this.placeBlockAtCurrentPosition(var1, var2.nextInt(20) == 1 ? AetherBlocks.LockedLightDungeonStone.blockID : AetherBlocks.LockedDungeonStone.blockID, 0, this.boundingBox.minX + 5, this.boundingBox.minY + 3 + var6, this.boundingBox.minZ + 5, var3);
+ this.placeBlockAtCurrentPosition(var1, var2.nextInt(20) == 1 ? AetherBlocks.LockedLightDungeonStone.blockID : AetherBlocks.LockedDungeonStone.blockID, 0, this.boundingBox.minX + 5, this.boundingBox.minY + 3 + var6, this.boundingBox.minZ + 4, var3);
+ this.placeBlockAtCurrentPosition(var1, var2.nextInt(20) == 1 ? AetherBlocks.LockedLightDungeonStone.blockID : AetherBlocks.LockedDungeonStone.blockID, 0, this.boundingBox.minX + 5, this.boundingBox.minY + 4 + var6, this.boundingBox.minZ + 2, var3);
+ this.placeBlockAtCurrentPosition(var1, var2.nextInt(20) == 1 ? AetherBlocks.LockedLightDungeonStone.blockID : AetherBlocks.LockedDungeonStone.blockID, 0, this.boundingBox.minX + 5, this.boundingBox.minY + 4 + var6, this.boundingBox.minZ + 3, var3);
+ this.placeBlockAtCurrentPosition(var1, var2.nextInt(20) == 1 ? AetherBlocks.LockedLightDungeonStone.blockID : AetherBlocks.LockedDungeonStone.blockID, 0, this.boundingBox.minX + 4, this.boundingBox.minY + 4 + var6, this.boundingBox.minZ + 2, var3);
+ this.placeBlockAtCurrentPosition(var1, var2.nextInt(20) == 1 ? AetherBlocks.LockedLightDungeonStone.blockID : AetherBlocks.LockedDungeonStone.blockID, 0, this.boundingBox.minX + 2, this.boundingBox.minY + 5 + var6, this.boundingBox.minZ + 2, var3);
+ this.placeBlockAtCurrentPosition(var1, var2.nextInt(20) == 1 ? AetherBlocks.LockedLightDungeonStone.blockID : AetherBlocks.LockedDungeonStone.blockID, 0, this.boundingBox.minX + 3, this.boundingBox.minY + 5 + var6, this.boundingBox.minZ + 2, var3);
+ this.placeBlockAtCurrentPosition(var1, var2.nextInt(20) == 1 ? AetherBlocks.LockedLightDungeonStone.blockID : AetherBlocks.LockedDungeonStone.blockID, 0, this.boundingBox.minX + 2, this.boundingBox.minY + 5 + var6, this.boundingBox.minZ + 3, var3);
+ }
+
+ this.fillWithBlocks(var1, var3, this.boundingBox.minX + 3, this.boundingBox.minY + 1, this.boundingBox.minZ + 3, this.boundingBox.maxX - 3, this.boundingBox.maxY - 5, this.boundingBox.maxZ - 3, AetherBlocks.LockedDungeonStone.blockID, 0, false);
+ var5 = this.boundingBox.maxY - this.boundingBox.minY - 5;
+ this.fillWithBlocks(var1, var3, this.boundingBox.minX + 1, this.boundingBox.minY + 1 + var5, this.boundingBox.minZ - 2, this.boundingBox.maxX - 1, this.boundingBox.minY + 3 + var5, this.boundingBox.minZ, 0, 0, false);
+ this.fillWithBlocks(var1, var3, this.boundingBox.minX + 1, this.boundingBox.minY + 1 + var5, this.boundingBox.maxZ, this.boundingBox.maxX - 1, this.boundingBox.minY + 3 + var5, this.boundingBox.maxZ + 2, 0, 0, false);
+ this.fillWithBlocks(var1, var3, this.boundingBox.minX - 2, this.boundingBox.minY + 1 + var5, this.boundingBox.minZ + 1, this.boundingBox.minX, this.boundingBox.minY + 3 + var5, this.boundingBox.maxZ - 1, 0, 0, false);
+ this.fillWithBlocks(var1, var3, this.boundingBox.maxX, this.boundingBox.minY + 1 + var5, this.boundingBox.minZ + 1, this.boundingBox.maxX + 2, this.boundingBox.minY + 3 + var5, this.boundingBox.maxZ - 1, 0, 0, false);
+ this.fillWithBlocks(var1, var3, this.boundingBox.minX + 1, this.boundingBox.minY + 1 + var5, this.boundingBox.minZ + 1, this.boundingBox.maxX - 1, this.boundingBox.minY + 4 + var5, this.boundingBox.minZ + 1, AetherBlocks.DungeonEntrance.blockID, 0, false);
+ this.fillWithBlocks(var1, var3, this.boundingBox.minX + 1, this.boundingBox.minY + 1 + var5, this.boundingBox.maxZ - 1, this.boundingBox.maxX - 1, this.boundingBox.minY + 4 + var5, this.boundingBox.maxZ - 1, AetherBlocks.DungeonEntrance.blockID, 0, false);
+ this.fillWithBlocks(var1, var3, this.boundingBox.minX + 1, this.boundingBox.minY + 1 + var5, this.boundingBox.minZ + 1, this.boundingBox.minX + 1, this.boundingBox.minY + 4 + var5, this.boundingBox.maxZ - 1, AetherBlocks.DungeonEntrance.blockID, 0, false);
+ this.fillWithBlocks(var1, var3, this.boundingBox.maxX - 1, this.boundingBox.minY + 1 + var5, this.boundingBox.minZ + 1, this.boundingBox.maxX - 1, this.boundingBox.minY + 4 + var5, this.boundingBox.maxZ - 1, AetherBlocks.DungeonEntrance.blockID, 0, false);
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.DungeonEntrance.blockID, 1, this.boundingBox.minX + (this.boundingBox.maxX - this.boundingBox.minX) / 2, this.boundingBox.minY + 2 + var5, this.boundingBox.minZ + 1, var3);
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.DungeonEntrance.blockID, 1, this.boundingBox.minX + (this.boundingBox.maxX - this.boundingBox.minX) / 2 + 1, this.boundingBox.minY + 2 + var5, this.boundingBox.minZ + 1, var3);
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.DungeonEntrance.blockID, 1, this.boundingBox.minX + (this.boundingBox.maxX - this.boundingBox.minX) / 2, this.boundingBox.minY + 2 + var5, this.boundingBox.maxZ - 1, var3);
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.DungeonEntrance.blockID, 1, this.boundingBox.minX + (this.boundingBox.maxX - this.boundingBox.minX) / 2 + 1, this.boundingBox.minY + 2 + var5, this.boundingBox.maxZ - 1, var3);
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.DungeonEntrance.blockID, 1, this.boundingBox.minX + 1, this.boundingBox.minY + 2 + var5, this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2, var3);
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.DungeonEntrance.blockID, 1, this.boundingBox.minX + 1, this.boundingBox.minY + 2 + var5, this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2 + 1, var3);
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.DungeonEntrance.blockID, 1, this.boundingBox.maxX - 1, this.boundingBox.minY + 2 + var5, this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2, var3);
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.DungeonEntrance.blockID, 1, this.boundingBox.maxX - 1, this.boundingBox.minY + 2 + var5, this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2 + 1, var3);
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.DungeonEntranceController.blockID, 0, this.boundingBox.maxX - 3, this.boundingBox.minY + var5 + 1, this.boundingBox.minZ + (this.boundingBox.maxZ - this.boundingBox.minZ) / 2 + 1, var3);
+
+ if (this.isTower)
+ {
+ this.fillVariedBlocks(var1, var3, this.boundingBox.minX, this.boundingBox.maxY, this.boundingBox.minZ, this.boundingBox.maxX, this.boundingBox.maxY + 5 + this.randHeight, this.boundingBox.maxZ, AetherBlocks.LightDungeonStone.blockID, 0, AetherBlocks.DungeonStone.blockID, 0, 15, var2, false);
+
+ for (var6 = 0; var6 <= 6; ++var6)
+ {
+ boolean var7 = false;
+ int var8 = this.boundingBox.maxY + this.randHeight + 5 + var6;
+ int var9;
+
+ for (var9 = var6; var9 <= this.boundingBox.maxX - this.boundingBox.minX - var6; ++var9)
+ {
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.CarvedStairs.blockID, 3, this.boundingBox.minX + var9, var8, this.boundingBox.maxZ - var6, var3);
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.CarvedStairs.blockID, 2, this.boundingBox.minX + var9, var8, this.boundingBox.minZ + var6, var3);
+ }
+
+ for (var9 = var6; var9 <= this.boundingBox.maxZ - this.boundingBox.minZ - var6; ++var9)
+ {
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.CarvedStairs.blockID, 0, this.boundingBox.minX + var6, var8, this.boundingBox.minZ + var9, var3);
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.CarvedStairs.blockID, 1, this.boundingBox.maxX - var6, var8, this.boundingBox.minZ + var9, var3);
+ }
+ }
+ }
+
+ this.cutHolesForEntrances(var1, var2, var3);
+ return true;
+ }
+
+ public void fillVariedBlocks(World var1, StructureBoundingBox var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9, int var10, int var11, int var12, int var13, Random var14, boolean var15)
+ {
+ for (int var16 = var4; var16 <= var7; ++var16)
+ {
+ for (int var17 = var3; var17 <= var6; ++var17)
+ {
+ for (int var18 = var5; var18 <= var8; ++var18)
+ {
+ if (this.getBlockIdAtCurrentPosition(var1, var17, var16, var18, var2) == 0 || var15)
+ {
+ int var19 = var11;
+ int var20 = var12;
+
+ if (var14.nextInt(var13) == 1)
+ {
+ var19 = var9;
+ var20 = var10;
+ }
+
+ this.placeBlockAtCurrentPosition(var1, var19, var20, var17, var16, var18, var2);
+ }
+ }
+ }
+ }
+ }
+
+ public boolean checkForAir(World var1, StructureBoundingBox var2, int var3, int var4, int var5, int var6, int var7, int var8)
+ {
+ for (int var9 = var4; var9 <= var7; ++var9)
+ {
+ for (int var10 = var3; var10 <= var6; ++var10)
+ {
+ for (int var11 = var5; var11 <= var8; ++var11)
+ {
+ if (this.getBlockIdAtCurrentPosition(var1, var10, var9, var11, var2) != 0 || this.getBlockIdAtCurrentPosition(var1, var10, var9, var11, var2) != AetherBlocks.Aercloud.blockID)
+ {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+ }
+
+ public static StructureBoundingBox findValidPlacement(List var0, Random var1, int var2, int var3, int var4, int var5)
+ {
+ byte var6 = 7;
+ byte var7 = 7;
+ byte var8 = 20;
+ StructureBoundingBox var9;
+
+ if (var1.nextInt(8) != 0)
+ {
+ var9 = new StructureBoundingBox(var2, var3, var4, var2, var3 + var8, var4);
+ } else
+ {
+ var9 = new StructureBoundingBox(var2, var3 - var8 + 4, var4, var2, var3 + 4, var4);
+ }
+
+ switch (var5)
+ {
+ case 0:
+ var9.minX = var2 - 1;
+ var9.maxX = var2 + var6 - 1;
+ var9.maxZ = var4 + var7;
+ break;
+
+ case 1:
+ var9.minX = var2 - var6;
+ var9.minZ = var4 - 1;
+ var9.maxZ = var4 + var7 - 1;
+ break;
+
+ case 2:
+ var9.minX = var2 - 1;
+ var9.maxX = var2 + var6 - 1;
+ var9.minZ = var4 - var7;
+ break;
+
+ case 3:
+ var9.maxX = var2 + var6;
+ var9.minZ = var4 - 1;
+ var9.maxZ = var4 + var7 - 1;
+ }
+
+ return StructureComponent.findIntersecting(var0, var9) != null ? null : var9;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonStair.java b/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonStair.java
new file mode 100644
index 0000000..71b2d48
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/ComponentDungeonStair.java
@@ -0,0 +1,142 @@
+package net.aetherteam.aether.worldgen;
+
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.structure.StructureBoundingBox;
+import net.minecraft.world.gen.structure.StructureComponent;
+
+public class ComponentDungeonStair extends ComponentDungeonBronzeRoom
+{
+ private int sectionCount;
+
+ public ComponentDungeonStair(int var1, StructureComponent var2, StructureBronzeDungeonStart var3, Random var4, StructureBoundingBox var5, int var6)
+ {
+ super(var1, var2, var3, var4);
+ this.boundingBox = var5;
+ int var7 = this.boundingBox.maxY - this.boundingBox.minY;
+
+ for (int var8 = 0; var8 < var7; var8 += 5)
+ {
+ this.entrances.add(new StructureBoundingBox(this.boundingBox.minX + 1, this.boundingBox.minY + 1 + var8, this.boundingBox.minZ - 2, this.boundingBox.maxX - 1, this.boundingBox.minY + 3 + var8, this.boundingBox.minZ));
+ this.entrances.add(new StructureBoundingBox(this.boundingBox.minX + 1, this.boundingBox.minY + 1 + var8, this.boundingBox.maxZ, this.boundingBox.maxX - 1, this.boundingBox.minY + 3 + var8, this.boundingBox.maxZ + 2));
+ this.entrances.add(new StructureBoundingBox(this.boundingBox.minX - 2, this.boundingBox.minY + 1 + var8, this.boundingBox.minZ + 1, this.boundingBox.minX, this.boundingBox.minY + 3 + var8, this.boundingBox.maxZ - 1));
+ this.entrances.add(new StructureBoundingBox(this.boundingBox.maxX, this.boundingBox.minY + 1 + var8, this.boundingBox.minZ + 1, this.boundingBox.maxX + 2, this.boundingBox.minY + 3 + var8, this.boundingBox.maxZ - 1));
+ }
+ }
+
+ public void buildComponent(List var1, Random var2)
+ {
+ int var3 = this.boundingBox.maxY - this.boundingBox.minY;
+
+ for (int var4 = 1; var4 < 3; ++var4)
+ {
+ for (int var5 = 0; var5 < var3; var5 += 5)
+ {
+ this.addStructor(var1, var2, this.boundingBox.minX + var4, this.boundingBox.minY + var3 + 1, this.boundingBox.maxZ + 1, 0, this.componentType);
+ this.addStructor(var1, var2, this.boundingBox.minX - 1, this.boundingBox.minY + var3 + 1, this.boundingBox.minZ + var4, 1, this.componentType);
+ this.addStructor(var1, var2, this.boundingBox.minX + var4, this.boundingBox.minY + var3 + 1, this.boundingBox.minZ - 1, 2, this.componentType);
+ this.addStructor(var1, var2, this.boundingBox.maxX + 1, this.boundingBox.minY + var3 + 1, this.boundingBox.minZ + var4, 3, this.componentType);
+ }
+
+ this.addStructor(var1, var2, this.boundingBox.minX + var4, this.boundingBox.minY + 5, this.boundingBox.maxZ + 1, 0, this.componentType);
+ this.addStructor(var1, var2, this.boundingBox.minX - 1, this.boundingBox.minY + 5, this.boundingBox.minZ + var4, 1, this.componentType);
+ this.addStructor(var1, var2, this.boundingBox.minX + var4, this.boundingBox.minY + 5, this.boundingBox.minZ - 1, 2, this.componentType);
+ this.addStructor(var1, var2, this.boundingBox.maxX + 1, this.boundingBox.minY + 5, this.boundingBox.minZ + var4, 3, this.componentType);
+ }
+ }
+
+ /**
+ * second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at
+ * the end, it adds Fences...
+ */
+ public boolean addComponentParts(World var1, Random var2, StructureBoundingBox var3)
+ {
+ this.fillWithBlocks(var1, var3, this.boundingBox.minX, this.boundingBox.minY, this.boundingBox.minZ, this.boundingBox.maxX, this.boundingBox.maxY, this.boundingBox.maxZ, AetherBlocks.LockedDungeonStone.blockID, 0, false);
+ this.fillWithBlocks(var1, var3, this.boundingBox.minX + 1, this.boundingBox.minY + 1, this.boundingBox.minZ + 1, this.boundingBox.maxX - 1, this.boundingBox.maxY - 1, this.boundingBox.maxZ - 1, 0, 0, false);
+ int var4 = (this.boundingBox.maxY - this.boundingBox.minY) / 5;
+
+ for (int var5 = 1; var5 < var4; ++var5)
+ {
+ this.fillWithBlocks(var1, var3, this.boundingBox.minX, this.boundingBox.minY + 5 * var5, this.boundingBox.minZ, this.boundingBox.maxX, this.boundingBox.minY + 5 * var5, this.boundingBox.maxZ, AetherBlocks.LockedDungeonStone.blockID, 0, false);
+ this.fillWithBlocks(var1, var3, this.boundingBox.minX + 2, this.boundingBox.minY + 5 * var5, this.boundingBox.minZ + 2, this.boundingBox.maxX - 2, this.boundingBox.minY + 5 * var5, this.boundingBox.maxZ - 2, 0, 0, false);
+ int var6 = 5 * var5 - 5;
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.LockedDungeonStone.blockID, 0, this.boundingBox.minX + 2, this.boundingBox.minY + 1 + var6, this.boundingBox.minZ + 2, var3);
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.LockedDungeonStone.blockID, 0, this.boundingBox.minX + 3, this.boundingBox.minY + 1 + var6, this.boundingBox.minZ + 2, var3);
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.LockedDungeonStone.blockID, 0, this.boundingBox.minX + 2, this.boundingBox.minY + 1 + var6, this.boundingBox.minZ + 3, var3);
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.LockedDungeonStone.blockID, 0, this.boundingBox.minX + 2, this.boundingBox.minY + 2 + var6, this.boundingBox.minZ + 4, var3);
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.LockedDungeonStone.blockID, 0, this.boundingBox.minX + 2, this.boundingBox.minY + 2 + var6, this.boundingBox.minZ + 5, var3);
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.LockedDungeonStone.blockID, 0, this.boundingBox.minX + 3, this.boundingBox.minY + 2 + var6, this.boundingBox.minZ + 5, var3);
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.LockedDungeonStone.blockID, 0, this.boundingBox.minX + 4, this.boundingBox.minY + 3 + var6, this.boundingBox.minZ + 5, var3);
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.LockedDungeonStone.blockID, 0, this.boundingBox.minX + 5, this.boundingBox.minY + 3 + var6, this.boundingBox.minZ + 5, var3);
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.LockedDungeonStone.blockID, 0, this.boundingBox.minX + 5, this.boundingBox.minY + 3 + var6, this.boundingBox.minZ + 4, var3);
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.LockedDungeonStone.blockID, 0, this.boundingBox.minX + 5, this.boundingBox.minY + 4 + var6, this.boundingBox.minZ + 2, var3);
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.LockedDungeonStone.blockID, 0, this.boundingBox.minX + 5, this.boundingBox.minY + 4 + var6, this.boundingBox.minZ + 3, var3);
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.LockedDungeonStone.blockID, 0, this.boundingBox.minX + 4, this.boundingBox.minY + 4 + var6, this.boundingBox.minZ + 2, var3);
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.LockedDungeonStone.blockID, 0, this.boundingBox.minX + 2, this.boundingBox.minY + 5 + var6, this.boundingBox.minZ + 2, var3);
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.LockedDungeonStone.blockID, 0, this.boundingBox.minX + 3, this.boundingBox.minY + 5 + var6, this.boundingBox.minZ + 2, var3);
+ this.placeBlockAtCurrentPosition(var1, AetherBlocks.LockedDungeonStone.blockID, 0, this.boundingBox.minX + 2, this.boundingBox.minY + 5 + var6, this.boundingBox.minZ + 3, var3);
+ }
+
+ this.fillWithBlocks(var1, var3, this.boundingBox.minX + 3, this.boundingBox.minY + 1, this.boundingBox.minZ + 3, this.boundingBox.maxX - 3, this.boundingBox.maxY - 2, this.boundingBox.maxZ - 3, AetherBlocks.LockedDungeonStone.blockID, 0, false);
+ this.cutHolesForEntrances(var1, var2, var3);
+ return true;
+ }
+
+ public static StructureBoundingBox findValidPlacement(List var0, Random var1, int var2, int var3, int var4, int var5)
+ {
+ byte var6 = 7;
+ byte var7 = 7;
+ int var8 = 10;
+
+ if (var1.nextInt(5) == 0)
+ {
+ var8 += 5;
+ }
+
+ if (var1.nextInt(5) == 0)
+ {
+ var8 += 5;
+ }
+
+ StructureBoundingBox var9;
+
+ if (var1.nextInt(8) != 0)
+ {
+ var9 = new StructureBoundingBox(var2, var3, var4, var2, var3 + var8, var4);
+ } else
+ {
+ var9 = new StructureBoundingBox(var2, var3 - var8 + 4, var4, var2, var3 + 4, var4);
+ }
+
+ switch (var5)
+ {
+ case 0:
+ var9.minX = var2 - 1;
+ var9.maxX = var2 + var6 - 1;
+ var9.maxZ = var4 + var7;
+ break;
+
+ case 1:
+ var9.minX = var2 - var6;
+ var9.minZ = var4 - 1;
+ var9.maxZ = var4 + var7 - 1;
+ break;
+
+ case 2:
+ var9.minX = var2 - 1;
+ var9.maxX = var2 + var6 - 1;
+ var9.minZ = var4 - var7;
+ break;
+
+ case 3:
+ var9.maxX = var2 + var6;
+ var9.minZ = var4 - 1;
+ var9.maxZ = var4 + var7 - 1;
+ }
+
+ return StructureComponent.findIntersecting(var0, var9) != null ? null : var9;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/GenerateFloatingTree.java b/src/main/java/net/aetherteam/aether/worldgen/GenerateFloatingTree.java
new file mode 100644
index 0000000..62cfe61
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/GenerateFloatingTree.java
@@ -0,0 +1,128 @@
+package net.aetherteam.aether.worldgen;
+
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.feature.WorldGenerator;
+
+public class GenerateFloatingTree extends WorldGenerator
+{
+ public boolean generate(World var1, Random var2, int var3, int var4, int var5)
+ {
+ boolean var6 = true;
+ int var7;
+
+ for (var7 = var3 - 6; var7 < var3 + 6 + 6; ++var7)
+ {
+ for (int var8 = var4 - 6; var8 < var4 + 11 + 6; ++var8)
+ {
+ for (int var9 = var5 - 6; var9 < var5 + 6 + 6; ++var9)
+ {
+ if (var1.getBlockId(var7, var8, var9) != 0)
+ {
+ var6 = false;
+ }
+ }
+ }
+ }
+
+ if (var4 + 11 <= var1.getHeight() && var6)
+ {
+ var1.setBlock(var3, var4, var5, AetherBlocks.Holystone.blockID);
+ var1.setBlock(var3, var4, var5 + 1, AetherBlocks.Holystone.blockID);
+ var1.setBlock(var3, var4, var5 - 1, AetherBlocks.Holystone.blockID);
+ var1.setBlock(var3 + 1, var4, var5, AetherBlocks.Holystone.blockID);
+ var1.setBlock(var3 - 1, var4, var5, AetherBlocks.Holystone.blockID);
+ var1.setBlock(var3, var4 + 1, var5, AetherBlocks.Holystone.blockID);
+ var1.setBlock(var3, var4 + 1, var5 + 1, AetherBlocks.Holystone.blockID);
+ var1.setBlock(var3, var4 + 1, var5 + 2, AetherBlocks.Holystone.blockID);
+ var1.setBlock(var3, var4 + 1, var5 - 1, AetherBlocks.Holystone.blockID);
+ var1.setBlock(var3, var4 + 1, var5 - 2, AetherBlocks.Holystone.blockID);
+ var1.setBlock(var3 + 1, var4 + 1, var5, AetherBlocks.Holystone.blockID);
+ var1.setBlock(var3 + 2, var4 + 1, var5, AetherBlocks.Holystone.blockID);
+ var1.setBlock(var3 - 1, var4 + 1, var5, AetherBlocks.Holystone.blockID);
+ var1.setBlock(var3 - 2, var4 + 1, var5, AetherBlocks.Holystone.blockID);
+ var1.setBlock(var3 + 1, var4 + 1, var5 + 1, AetherBlocks.Holystone.blockID);
+ var1.setBlock(var3 + 1, var4 + 1, var5 - 1, AetherBlocks.Holystone.blockID);
+ var1.setBlock(var3 - 1, var4 + 1, var5 - 1, AetherBlocks.Holystone.blockID);
+ var1.setBlock(var3 - 1, var4 + 1, var5 + 1, AetherBlocks.Holystone.blockID);
+ var1.setBlock(var3, var4 + 2, var5, AetherBlocks.AetherGrass.blockID);
+ var1.setBlock(var3, var4 + 2, var5 + 1, AetherBlocks.AetherGrass.blockID);
+ var1.setBlock(var3, var4 + 2, var5 + 2, AetherBlocks.AetherGrass.blockID);
+ var1.setBlock(var3, var4 + 2, var5 - 1, AetherBlocks.AetherGrass.blockID);
+ var1.setBlock(var3, var4 + 2, var5 - 2, AetherBlocks.AetherGrass.blockID);
+ var1.setBlock(var3 + 1, var4 + 2, var5, AetherBlocks.AetherGrass.blockID);
+ var1.setBlock(var3 + 2, var4 + 2, var5, AetherBlocks.AetherGrass.blockID);
+ var1.setBlock(var3 - 1, var4 + 2, var5, AetherBlocks.AetherGrass.blockID);
+ var1.setBlock(var3 - 2, var4 + 2, var5, AetherBlocks.AetherGrass.blockID);
+ var1.setBlock(var3 + 1, var4 + 2, var5 + 1, AetherBlocks.AetherGrass.blockID);
+ var1.setBlock(var3 + 1, var4 + 2, var5 - 1, AetherBlocks.AetherGrass.blockID);
+ var1.setBlock(var3 - 1, var4 + 2, var5 - 1, AetherBlocks.AetherGrass.blockID);
+ var1.setBlock(var3 - 1, var4 + 2, var5 + 1, AetherBlocks.AetherGrass.blockID);
+
+ for (var7 = var4 + 3; var7 <= var4 + 9; ++var7)
+ {
+ var1.setBlock(var3, var7, var5, AetherBlocks.AetherLog.blockID);
+ }
+
+ var1.setBlock(var3, var4 + 10, var5, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 + 1, var4 + 5, var5, AetherBlocks.AetherLog.blockID);
+ var1.setBlock(var3 - 1, var4 + 5, var5, AetherBlocks.AetherLog.blockID);
+ var1.setBlock(var3, var4 + 5, var5 + 1, AetherBlocks.AetherLog.blockID);
+ var1.setBlock(var3, var4 + 5, var5 - 1, AetherBlocks.AetherLog.blockID);
+ var1.setBlock(var3, var4 + 5, var5 - 2, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3, var4 + 5, var5 + 2, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 + 2, var4 + 5, var5, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 - 2, var4 + 5, var5, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 - 1, var4 + 5, var5 - 2, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 + 1, var4 + 5, var5 - 2, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 - 1, var4 + 5, var5 + 2, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 + 1, var4 + 5, var5 + 2, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 - 2, var4 + 5, var5 + 1, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 + 2, var4 + 5, var5 + 1, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 - 2, var4 + 5, var5 - 1, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 + 2, var4 + 5, var5 - 1, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 + 1, var4 + 5, var5 + 1, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 - 1, var4 + 5, var5 + 1, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 + 1, var4 + 5, var5 - 1, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 - 1, var4 + 5, var5 - 1, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3, var4 + 6, var5 - 2, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3, var4 + 6, var5 + 2, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 + 2, var4 + 6, var5, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 - 2, var4 + 6, var5, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 + 1, var4 + 6, var5 + 1, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 - 1, var4 + 6, var5 + 1, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 + 1, var4 + 6, var5 - 1, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 - 1, var4 + 6, var5 - 1, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 + 1, var4 + 6, var5, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 - 1, var4 + 6, var5, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3, var4 + 6, var5 + 1, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3, var4 + 6, var5 - 1, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 + 1, var4 + 7, var5, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 - 1, var4 + 7, var5, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3, var4 + 7, var5 + 1, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3, var4 + 7, var5 - 1, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 + 1, var4 + 8, var5, AetherBlocks.AetherLog.blockID);
+ var1.setBlock(var3 - 1, var4 + 8, var5, AetherBlocks.AetherLog.blockID);
+ var1.setBlock(var3, var4 + 8, var5 + 1, AetherBlocks.AetherLog.blockID);
+ var1.setBlock(var3, var4 + 8, var5 - 1, AetherBlocks.AetherLog.blockID);
+ var1.setBlock(var3, var4 + 8, var5 - 2, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3, var4 + 8, var5 + 2, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 + 2, var4 + 8, var5, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 - 2, var4 + 8, var5, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 + 1, var4 + 8, var5 + 1, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 - 1, var4 + 8, var5 + 1, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 + 1, var4 + 8, var5 - 1, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 - 1, var4 + 8, var5 - 1, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 + 1, var4 + 9, var5, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3 - 1, var4 + 9, var5, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3, var4 + 9, var5 + 1, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ var1.setBlock(var3, var4 + 9, var5 - 1, AetherBlocks.CrystalLeaves.blockID, var2.nextInt(2), ChunkProviderAether.placementFlagType);
+ return true;
+ } else
+ {
+ return false;
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/StructureBoundingBoxSerial.java b/src/main/java/net/aetherteam/aether/worldgen/StructureBoundingBoxSerial.java
new file mode 100644
index 0000000..1198a1f
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/StructureBoundingBoxSerial.java
@@ -0,0 +1,143 @@
+package net.aetherteam.aether.worldgen;
+
+import java.io.Serializable;
+
+import net.minecraft.world.gen.structure.StructureBoundingBox;
+
+public class StructureBoundingBoxSerial implements Serializable
+{
+ public int minX;
+ public int minY;
+ public int minZ;
+ public int maxX;
+ public int maxY;
+ public int maxZ;
+
+ public StructureBoundingBoxSerial() {}
+
+ public static StructureBoundingBoxSerial getNewBoundingBox()
+ {
+ return new StructureBoundingBoxSerial(Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MIN_VALUE, Integer.MIN_VALUE, Integer.MIN_VALUE);
+ }
+
+ public static StructureBoundingBoxSerial getComponentToAddBoundingBox(int var0, int var1, int var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9)
+ {
+ switch (var9)
+ {
+ case 0:
+ return new StructureBoundingBoxSerial(var0 + var3, var1 + var4, var2 + var5, var0 + var6 - 1 + var3, var1 + var7 - 1 + var4, var2 + var8 - 1 + var5);
+
+ case 1:
+ return new StructureBoundingBoxSerial(var0 - var8 + 1 + var5, var1 + var4, var2 + var3, var0 + var5, var1 + var7 - 1 + var4, var2 + var6 - 1 + var3);
+
+ case 2:
+ return new StructureBoundingBoxSerial(var0 + var3, var1 + var4, var2 - var8 + 1 + var5, var0 + var6 - 1 + var3, var1 + var7 - 1 + var4, var2 + var5);
+
+ case 3:
+ return new StructureBoundingBoxSerial(var0 + var5, var1 + var4, var2 + var3, var0 + var8 - 1 + var5, var1 + var7 - 1 + var4, var2 + var6 - 1 + var3);
+
+ default:
+ return new StructureBoundingBoxSerial(var0 + var3, var1 + var4, var2 + var5, var0 + var6 - 1 + var3, var1 + var7 - 1 + var4, var2 + var8 - 1 + var5);
+ }
+ }
+
+ public StructureBoundingBoxSerial(StructureBoundingBox var1)
+ {
+ this.minX = var1.minX;
+ this.minY = var1.minY;
+ this.minZ = var1.minZ;
+ this.maxX = var1.maxX;
+ this.maxY = var1.maxY;
+ this.maxZ = var1.maxZ;
+ }
+
+ public StructureBoundingBoxSerial(int var1, int var2, int var3, int var4, int var5, int var6)
+ {
+ this.minX = var1;
+ this.minY = var2;
+ this.minZ = var3;
+ this.maxX = var4;
+ this.maxY = var5;
+ this.maxZ = var6;
+ }
+
+ public StructureBoundingBoxSerial(int var1, int var2, int var3, int var4)
+ {
+ this.minX = var1;
+ this.minZ = var2;
+ this.maxX = var3;
+ this.maxZ = var4;
+ this.minY = 1;
+ this.maxY = 512;
+ }
+
+ public boolean intersectsWith(StructureBoundingBoxSerial var1)
+ {
+ return this.maxX >= var1.minX && this.minX <= var1.maxX && this.maxZ >= var1.minZ && this.minZ <= var1.maxZ && this.maxY >= var1.minY && this.minY <= var1.maxY;
+ }
+
+ public boolean intersectsWith(int var1, int var2, int var3, int var4)
+ {
+ return this.maxX >= var1 && this.minX <= var3 && this.maxZ >= var2 && this.minZ <= var4;
+ }
+
+ public void expandTo(StructureBoundingBoxSerial var1)
+ {
+ this.minX = Math.min(this.minX, var1.minX);
+ this.minY = Math.min(this.minY, var1.minY);
+ this.minZ = Math.min(this.minZ, var1.minZ);
+ this.maxX = Math.max(this.maxX, var1.maxX);
+ this.maxY = Math.max(this.maxY, var1.maxY);
+ this.maxZ = Math.max(this.maxZ, var1.maxZ);
+ }
+
+ public void offset(int var1, int var2, int var3)
+ {
+ this.minX += var1;
+ this.minY += var2;
+ this.minZ += var3;
+ this.maxX += var1;
+ this.maxY += var2;
+ this.maxZ += var3;
+ }
+
+ public boolean isVecInside(int var1, int var2, int var3)
+ {
+ return var1 >= this.minX && var1 <= this.maxX && var3 >= this.minZ && var3 <= this.maxZ && var2 >= this.minY && var2 <= this.maxY;
+ }
+
+ public int getXSize()
+ {
+ return this.maxX - this.minX + 1;
+ }
+
+ public int getYSize()
+ {
+ return this.maxY - this.minY + 1;
+ }
+
+ public int getZSize()
+ {
+ return this.maxZ - this.minZ + 1;
+ }
+
+ public int getCenterX()
+ {
+ return this.minX + (this.maxX - this.minX + 1) / 2;
+ }
+
+ public int getCenterY()
+ {
+ return this.minY + (this.maxY - this.minY + 1) / 2;
+ }
+
+ public int getCenterZ()
+ {
+ return this.minZ + (this.maxZ - this.minZ + 1) / 2;
+ }
+
+ public String toString()
+ {
+ return "(" + this.minX + ", " + this.minY + ", " + this.minZ + "; " + this.maxX + ", " + this.maxY + ", " + this.maxZ + ")";
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/StructureBronzeDungeonPieces.java b/src/main/java/net/aetherteam/aether/worldgen/StructureBronzeDungeonPieces.java
new file mode 100644
index 0000000..c7dc9b0
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/StructureBronzeDungeonPieces.java
@@ -0,0 +1,229 @@
+package net.aetherteam.aether.worldgen;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Random;
+
+import net.minecraft.world.gen.structure.StructureBoundingBox;
+import net.minecraft.world.gen.structure.StructureComponent;
+
+public class StructureBronzeDungeonPieces
+{
+ static boolean PreviousRoomHadThisAttached(List var0, Class var1)
+ {
+ Iterator var2 = var0.iterator();
+
+ while (var2.hasNext())
+ {
+ StructureComponent var3 = (StructureComponent) var2.next();
+
+ if (var1.isInstance(var3))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ private static StructureComponent getRandomComponent(StructureBronzeDungeonStart var0, ComponentDungeonBronzeRoom var1, List var2, Random var3, int var4, int var5, int var6, int var7, int var8)
+ {
+ int var9 = var3.nextInt(100);
+ StructureBoundingBox var10;
+
+ if (!(var1 instanceof ComponentDungeonEntranceTop) && !PreviousRoomHadThisAttached(var1.roomsLinkedToTheRoom, ComponentDungeonEntranceTop.class) && var3.nextInt(1000) < var8 * var8)
+ {
+ var10 = ComponentDungeonEntranceTop.findValidPlacement(var2, var3, var4, var5, var6, var7);
+
+ if (var10 != null)
+ {
+ ComponentDungeonEntranceTop var11 = new ComponentDungeonEntranceTop(var8, var1, var0, var3, var10, var7);
+
+ if (doRoomsHaveIntersectingEntrances(var1, var11))
+ {
+ return var11;
+ }
+ }
+ }
+
+ if (var3.nextInt(100) < var8 * var8)
+ {
+ var10 = ComponentDungeonBronzeCog.findValidPlacement(var2, var3, var4, var5, var6, var7);
+
+ if (var10 != null && numberOfCertainRoom(var2, ComponentDungeonBronzeCog.class) < 1)
+ {
+ ComponentDungeonBronzeCog var16 = new ComponentDungeonBronzeCog(var8, var1, var0, var3, var10, var7);
+
+ if (doRoomsHaveIntersectingEntrances(var1, var16))
+ {
+ return var16;
+ }
+ }
+ }
+
+ if (var3.nextInt(100) < var8 * var8)
+ {
+ var10 = ComponentDungeonBronzeSentryGuard.findValidPlacement(var2, var3, var4, var5, var6, var7);
+
+ if (var10 != null && numberOfCertainRoom(var2, ComponentDungeonBronzeSentryGuard.class) < 2)
+ {
+ ComponentDungeonBronzeSentryGuard var15 = new ComponentDungeonBronzeSentryGuard(var8, var1, var0, var3, var10, var7);
+
+ if (doRoomsHaveIntersectingEntrances(var1, var15))
+ {
+ return var15;
+ }
+ }
+ }
+
+ if (var3.nextInt(100) < var8 * var8)
+ {
+ var10 = ComponentDungeonBronzeHost.findValidPlacement(var2, var3, var4, var5, var6, var7);
+
+ if (var10 != null && numberOfCertainRoom(var2, ComponentDungeonBronzeHost.class) < 2)
+ {
+ ComponentDungeonBronzeHost var14 = new ComponentDungeonBronzeHost(var8, var1, var0, var3, var10, var7);
+
+ if (doRoomsHaveIntersectingEntrances(var1, var14))
+ {
+ return var14;
+ }
+ }
+ } else if (var9 < 30)
+ {
+ var10 = ComponentDungeonCorridor.findValidPlacement(var2, var3, var4, var5, var6, var7);
+
+ if (var10 != null)
+ {
+ ComponentDungeonCorridor var13 = new ComponentDungeonCorridor(var8, var1, var0, var3, var10, var7);
+
+ if (doRoomsHaveIntersectingEntrances(var1, var13))
+ {
+ return var13;
+ }
+ }
+ } else if (var9 < 50)
+ {
+ var10 = ComponentDungeonBronzeChest.findValidPlacement(var2, var3, var4, var5, var6, var7);
+
+ if (var10 != null)
+ {
+ ComponentDungeonBronzeChest var12 = new ComponentDungeonBronzeChest(var8, var1, var0, var3, var10, var7);
+
+ if (doRoomsHaveIntersectingEntrances(var1, var12))
+ {
+ return var12;
+ }
+ }
+ } else if (var9 < 70)
+ {
+ if (!(var1 instanceof ComponentDungeonStair))
+ {
+ var10 = ComponentDungeonStair.findValidPlacement(var2, var3, var4, var5, var6, var7);
+
+ if (var10 != null)
+ {
+ ComponentDungeonStair var18 = new ComponentDungeonStair(var8, var1, var0, var3, var10, var7);
+
+ if (doRoomsHaveIntersectingEntrances(var1, var18))
+ {
+ return var18;
+ }
+ }
+ }
+ } else if (var9 >= 70)
+ {
+ var10 = ComponentDungeonBronzeLight.findValidPlacement(var2, var3, var4, var5, var6, var7);
+
+ if (var10 != null)
+ {
+ ComponentDungeonBronzeLight var17 = new ComponentDungeonBronzeLight(var8, var1, var0, var3, var10, var7);
+
+ if (doRoomsHaveIntersectingEntrances(var1, var17))
+ {
+ return var17;
+ }
+ }
+ }
+
+ return null;
+ }
+
+ public static int numberOfCertainRoom(List var0, Class var1)
+ {
+ Iterator var2 = var0.iterator();
+ int var4 = 0;
+
+ while (var2.hasNext())
+ {
+ StructureComponent var3 = (StructureComponent) var2.next();
+
+ if (var1.isInstance(var3))
+ {
+ ++var4;
+ }
+ }
+
+ return var4;
+ }
+
+ public static boolean doRoomsHaveIntersectingEntrances(ComponentDungeonBronzeRoom var0, ComponentDungeonBronzeRoom var1)
+ {
+ Iterator var2 = var0.entrances.iterator();
+
+ while (var2.hasNext())
+ {
+ StructureBoundingBox var3 = (StructureBoundingBox) var2.next();
+ Iterator var4 = var1.entrances.iterator();
+
+ while (var4.hasNext())
+ {
+ StructureBoundingBox var5 = findIntercetingCube(var3, (StructureBoundingBox) var4.next());
+
+ if (var5 != null)
+ {
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+
+ public static StructureBoundingBox findIntercetingCube(StructureBoundingBox var0, StructureBoundingBox var1)
+ {
+ int var2 = Math.max(var0.minX, var1.minX);
+ int var3 = Math.max(var0.minY, var1.minY);
+ int var4 = Math.max(var0.minZ, var1.minZ);
+ int var5 = Math.min(var0.maxX, var1.maxX);
+ int var6 = Math.min(var0.maxY, var1.maxY);
+ int var7 = Math.min(var0.maxZ, var1.maxZ);
+ return var2 < var5 && var3 < var6 && var4 < var7 ? new StructureBoundingBox(var2, var3, var4, var5, var6, var7) : null;
+ }
+
+ private static StructureComponent getNextMineShaftComponent(StructureBronzeDungeonStart var0, StructureComponent var1, List var2, Random var3, int var4, int var5, int var6, int var7, int var8)
+ {
+ if (var8 > 8)
+ {
+ return null;
+ } else if (Math.abs(var4 - var0.X) <= 80 && Math.abs(var6 - var0.Z) <= 80)
+ {
+ StructureComponent var9 = getRandomComponent(var0, (ComponentDungeonBronzeRoom) var1, var2, var3, var4, var5, var6, var7, var8 + 1);
+
+ if (var9 != null)
+ {
+ var2.add(var9);
+ }
+
+ return var9;
+ } else
+ {
+ return null;
+ }
+ }
+
+ static StructureComponent getNextComponent(StructureBronzeDungeonStart var0, StructureComponent var1, List var2, Random var3, int var4, int var5, int var6, int var7, int var8)
+ {
+ return getNextMineShaftComponent(var0, var1, var2, var3, var4, var5, var6, var7, var8);
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/StructureBronzeDungeonStart.java b/src/main/java/net/aetherteam/aether/worldgen/StructureBronzeDungeonStart.java
new file mode 100644
index 0000000..60107af
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/StructureBronzeDungeonStart.java
@@ -0,0 +1,182 @@
+package net.aetherteam.aether.worldgen;
+
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.aetherteam.aether.dungeons.Dungeon;
+import net.aetherteam.aether.dungeons.DungeonHandler;
+import net.aetherteam.aether.dungeons.DungeonType;
+import net.minecraft.world.World;
+import net.minecraft.world.gen.structure.StructureBoundingBox;
+import net.minecraft.world.gen.structure.StructureComponent;
+
+public class StructureBronzeDungeonStart
+{
+ public int X;
+ public int Z;
+ Dungeon dungeonInstance;
+ public LinkedList components = new LinkedList();
+ protected StructureBoundingBox boundingBox;
+
+ public StructureBoundingBox getBoundingBox()
+ {
+ return this.boundingBox;
+ }
+
+ public LinkedList getComponents()
+ {
+ return this.components;
+ }
+
+ protected void updateBoundingBox()
+ {
+ this.boundingBox = StructureBoundingBox.getNewBoundingBox();
+ Iterator var1 = this.components.iterator();
+
+ while (var1.hasNext())
+ {
+ StructureComponent var2 = (StructureComponent) var1.next();
+ this.boundingBox.expandTo(var2.getBoundingBox());
+ }
+ }
+
+ public StructureBronzeDungeonStart(World var1, Random var2, int var3, int var4)
+ {
+ this.X = (var3 << 4) + 2;
+ this.Z = (var4 << 4) + 2;
+ ComponentDungeonBronzeBoss var5 = new ComponentDungeonBronzeBoss(0, (StructureComponent) null, this, var2, (var3 << 4) + 2, (var4 << 4) + 2);
+ this.components.add(var5);
+ var5.buildComponent(this.components, var2);
+
+ for (int var7 = 1; var7 < 8; ++var7)
+ {
+ List var8 = (List) this.components.clone();
+ Iterator var9 = var8.iterator();
+
+ do
+ {
+ StructureComponent var6 = (StructureComponent) var9.next();
+
+ if (var6.getComponentType() == var7)
+ {
+ var6.buildComponent(var6, this.components, var2);
+ }
+ } while (var9.hasNext());
+ }
+
+ this.updateBoundingBox();
+
+ if (!var1.isRemote)
+ {
+ this.dungeonInstance = new Dungeon(DungeonType.BRONZE, this.X, this.Z, this);
+ DungeonHandler.instance().addInstance(this.dungeonInstance);
+ }
+ }
+
+ public void generateStructure(World var1, Random var2, StructureBoundingBox var3, double[] var4)
+ {
+ this.GenDirtForChunk(var1, var3.minX, var3.minZ, var4, var2);
+ Iterator var5 = this.components.iterator();
+
+ while (var5.hasNext())
+ {
+ StructureComponent var6 = (StructureComponent) var5.next();
+
+ if (var6.getBoundingBox().intersectsWith(var3) && !var6.addComponentParts(var1, var2, var3))
+ {
+ var5.remove();
+ }
+ }
+ }
+
+ float getInterPolated(float var1, float var2, float var3, int var4, int var5, int var6)
+ {
+ var5 = var5 < 0 ? var5 + 16 : var5;
+ var6 = var6 < 0 ? var6 + 16 : var6;
+ float var7 = (float) var5 / 16.0F;
+ float var8 = (float) var6 / 16.0F;
+ return var1 * (1.0F - var7) * (1.0F - var8) + var3 * var7 * (1.0F - var8) + var2 * var8 * (1.0F - var7) + (float) var4 * var7 * var8;
+ }
+
+ public void GenDirtForChunk(World var1, int var2, int var3, double[] var4, Random var5)
+ {
+ int var6 = findhighest(this.components, var2 - 16, var3 - 16, var2 + 16, var3 + 16);
+ int var7 = findhighest(this.components, var2, var3 - 16, var2 + 32, var3 + 16);
+ int var8 = findhighest(this.components, var2 - 16, var3, var2 + 16, var3 + 32);
+ int var9 = findhighest(this.components, var2, var3, var2 + 32, var3 + 32);
+ int var10 = this.findlowest(this.components, var2 - 16, var3 - 16, var2 + 16, var3 + 16);
+ int var11 = this.findlowest(this.components, var2, var3 - 16, var2 + 32, var3 + 16);
+ int var12 = this.findlowest(this.components, var2 - 16, var3, var2 + 16, var3 + 32);
+ int var13 = this.findlowest(this.components, var2, var3, var2 + 32, var3 + 32);
+
+ for (int var14 = var2; var14 < var2 + 16; ++var14)
+ {
+ for (int var15 = var3; var15 < var3 + 16; ++var15)
+ {
+ int var16 = (int) this.getInterPolated((float) var6, (float) var8, (float) var7, var9, var14 - var2, var15 - var3);
+ int var17 = (int) this.getInterPolated((float) var10, (float) var12, (float) var11, var13, var14 - var2, var15 - var3);
+
+ if (var16 > var17)
+ {
+ var1.setBlock(var14, var16 + 1, var15, AetherBlocks.AetherGrass.blockID, 0, 2);
+ int var18 = 0;
+ int var19 = (int) (var4[var14 - var2 + (var15 - var3) * 16] / 3.0D + 3.0D + var5.nextDouble() * 0.25D);
+
+ for (int var20 = var16; var20 > var17; --var20)
+ {
+ ++var18;
+
+ if (var18 < var19)
+ {
+ var1.setBlock(var14, var20, var15, AetherBlocks.AetherDirt.blockID, 0, 2);
+ } else
+ {
+ var1.setBlock(var14, var20, var15, AetherBlocks.Holystone.blockID, 0, 2);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private int findlowest(LinkedList var1, int var2, int var3, int var4, int var5)
+ {
+ StructureBoundingBox var6 = new StructureBoundingBox(var2, 0, var3, var4, 128, var5);
+ Iterator var7 = var1.iterator();
+ int var9 = 40;
+
+ while (var7.hasNext())
+ {
+ StructureComponent var8 = (StructureComponent) var7.next();
+
+ if (var8.getBoundingBox() != null && var8.getBoundingBox().intersectsWith(var6) && !(var8 instanceof ComponentDungeonBronzeEntrance))
+ {
+ var9 = var8.getBoundingBox().minY > var9 ? var9 : var8.getBoundingBox().minY;
+ }
+ }
+
+ return var9;
+ }
+
+ public static int findhighest(List var0, int var1, int var2, int var3, int var4)
+ {
+ StructureBoundingBox var5 = new StructureBoundingBox(var1, 0, var2, var3, 128, var4);
+ Iterator var6 = var0.iterator();
+ int var8 = 30;
+
+ while (var6.hasNext())
+ {
+ StructureComponent var7 = (StructureComponent) var6.next();
+
+ if (var7.getBoundingBox() != null && var7.getBoundingBox().intersectsWith(var5) && !(var7 instanceof ComponentDungeonBronzeEntrance))
+ {
+ var8 = var7.getBoundingBox().maxY < var8 ? var8 : var7.getBoundingBox().maxY;
+ }
+ }
+
+ return var8;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/TeleporterAether.java b/src/main/java/net/aetherteam/aether/worldgen/TeleporterAether.java
new file mode 100644
index 0000000..7a5ffbb
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/TeleporterAether.java
@@ -0,0 +1,487 @@
+package net.aetherteam.aether.worldgen;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.blocks.AetherBlocks;
+import net.minecraft.block.Block;
+import net.minecraft.entity.Entity;
+import net.minecraft.util.Direction;
+import net.minecraft.util.LongHashMap;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.ChunkCoordIntPair;
+import net.minecraft.world.Teleporter;
+import net.minecraft.world.WorldServer;
+
+public class TeleporterAether extends Teleporter
+{
+ private final WorldServer worldServerInstance;
+ private final Random random;
+
+ /**
+ * Stores successful portal placement locations for rapid lookup.
+ */
+ private final LongHashMap destinationCoordinateCache = new LongHashMap();
+
+ /**
+ * A list of valid keys for the destinationCoordainteCache. These are based on the X & Z of the players initial
+ * location.
+ */
+ private final List destinationCoordinateKeys = new ArrayList();
+
+ public TeleporterAether(WorldServer var1)
+ {
+ super(var1);
+ this.worldServerInstance = var1;
+ this.worldServerInstance.customTeleporters.add(this);
+ this.random = new Random(var1.getSeed());
+ }
+
+ /**
+ * Place an entity in a nearby portal, creating one if necessary.
+ */
+ public void placeInPortal(Entity var1, double var2, double var4, double var6, float var8)
+ {
+ if (!this.placeInExistingPortal(var1, var2, var4, var6, var8))
+ {
+ this.makePortal(var1);
+ this.placeInExistingPortal(var1, var2, var4, var6, var8);
+ }
+ }
+
+ /**
+ * Place an entity in a nearby portal which already exists.
+ */
+ public boolean placeInExistingPortal(Entity var1, double var2, double var4, double var6, float var8)
+ {
+ short var9 = 128;
+ double var10 = -1.0D;
+ int var12 = 0;
+ int var13 = 0;
+ int var14 = 0;
+ int var15 = MathHelper.floor_double(var1.posX);
+ int var16 = MathHelper.floor_double(var1.posZ);
+ long var17 = ChunkCoordIntPair.chunkXZ2Int(var15, var16);
+ boolean var19 = true;
+ int var28;
+ double var20;
+ int var22;
+ double var48;
+
+ if (this.destinationCoordinateCache.containsItem(var17))
+ {
+ AetherPortalPosition var23 = (AetherPortalPosition) this.destinationCoordinateCache.getValueByKey(var17);
+ var10 = 0.0D;
+ var12 = var23.posX;
+ var13 = var23.posY;
+ var14 = var23.posZ;
+ var23.lastUpdateTime = this.worldServerInstance.getTotalWorldTime();
+ var19 = false;
+ } else
+ {
+ for (var22 = var15 - var9; var22 <= var15 + var9; ++var22)
+ {
+ var48 = (double) var22 + 0.5D - var1.posX;
+
+ for (int var25 = var16 - var9; var25 <= var16 + var9; ++var25)
+ {
+ double var26 = (double) var25 + 0.5D - var1.posZ;
+
+ for (var28 = this.worldServerInstance.getActualHeight() - 1; var28 >= 0; --var28)
+ {
+ if (this.worldServerInstance.getBlockId(var22, var28, var25) == AetherBlocks.AetherPortal.blockID)
+ {
+ while (this.worldServerInstance.getBlockId(var22, var28 - 1, var25) == AetherBlocks.AetherPortal.blockID)
+ {
+ --var28;
+ }
+
+ var20 = (double) var28 + 0.5D - var1.posY;
+ double var29 = var48 * var48 + var20 * var20 + var26 * var26;
+
+ if (var10 < 0.0D || var29 < var10)
+ {
+ var10 = var29;
+ var12 = var22;
+ var13 = var28;
+ var14 = var25;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (var10 >= 0.0D)
+ {
+ if (var19)
+ {
+ this.destinationCoordinateCache.add(var17, new AetherPortalPosition(this, var12, var13, var14, this.worldServerInstance.getTotalWorldTime()));
+ this.destinationCoordinateKeys.add(Long.valueOf(var17));
+ }
+
+ var48 = (double) var12 + 0.5D;
+ double var47 = (double) var13 + 0.5D;
+ var20 = (double) var14 + 0.5D;
+ int var27 = -1;
+
+ if (this.worldServerInstance.getBlockId(var12 - 1, var13, var14) == AetherBlocks.AetherPortal.blockID)
+ {
+ var27 = 2;
+ }
+
+ if (this.worldServerInstance.getBlockId(var12 + 1, var13, var14) == AetherBlocks.AetherPortal.blockID)
+ {
+ var27 = 0;
+ }
+
+ if (this.worldServerInstance.getBlockId(var12, var13, var14 - 1) == AetherBlocks.AetherPortal.blockID)
+ {
+ var27 = 3;
+ }
+
+ if (this.worldServerInstance.getBlockId(var12, var13, var14 + 1) == AetherBlocks.AetherPortal.blockID)
+ {
+ var27 = 1;
+ }
+
+ var28 = var1.getTeleportDirection();
+
+ if (var27 > -1)
+ {
+ int var49 = Direction.rotateLeft[var27];
+ int var30 = Direction.offsetX[var27];
+ int var31 = Direction.offsetZ[var27];
+ int var32 = Direction.offsetX[var49];
+ int var33 = Direction.offsetZ[var49];
+ boolean var34 = !this.worldServerInstance.isAirBlock(var12 + var30 + var32, var13, var14 + var31 + var33) || !this.worldServerInstance.isAirBlock(var12 + var30 + var32, var13 + 1, var14 + var31 + var33);
+ boolean var35 = !this.worldServerInstance.isAirBlock(var12 + var30, var13, var14 + var31) || !this.worldServerInstance.isAirBlock(var12 + var30, var13 + 1, var14 + var31);
+
+ if (var34 && var35)
+ {
+ var27 = Direction.rotateOpposite[var27];
+ var49 = Direction.rotateOpposite[var49];
+ var30 = Direction.offsetX[var27];
+ var31 = Direction.offsetZ[var27];
+ var32 = Direction.offsetX[var49];
+ var33 = Direction.offsetZ[var49];
+ var22 = var12 - var32;
+ var48 -= (double) var32;
+ int var36 = var14 - var33;
+ var20 -= (double) var33;
+ var34 = !this.worldServerInstance.isAirBlock(var22 + var30 + var32, var13, var36 + var31 + var33) || !this.worldServerInstance.isAirBlock(var22 + var30 + var32, var13 + 1, var36 + var31 + var33);
+ var35 = !this.worldServerInstance.isAirBlock(var22 + var30, var13, var36 + var31) || !this.worldServerInstance.isAirBlock(var22 + var30, var13 + 1, var36 + var31);
+ }
+
+ float var46 = 0.5F;
+ float var37 = 0.5F;
+
+ if (!var34 && var35)
+ {
+ var46 = 1.0F;
+ } else if (var34 && !var35)
+ {
+ var46 = 0.0F;
+ } else if (var34 && var35)
+ {
+ var37 = 0.0F;
+ }
+
+ var48 += (double) ((float) var32 * var46 + var37 * (float) var30);
+ var20 += (double) ((float) var33 * var46 + var37 * (float) var31);
+ float var38 = 0.0F;
+ float var39 = 0.0F;
+ float var40 = 0.0F;
+ float var41 = 0.0F;
+
+ if (var27 == var28)
+ {
+ var38 = 1.0F;
+ var39 = 1.0F;
+ } else if (var27 == Direction.rotateOpposite[var28])
+ {
+ var38 = -1.0F;
+ var39 = -1.0F;
+ } else if (var27 == Direction.rotateRight[var28])
+ {
+ var40 = 1.0F;
+ var41 = -1.0F;
+ } else
+ {
+ var40 = -1.0F;
+ var41 = 1.0F;
+ }
+
+ double var42 = var1.motionX;
+ double var44 = var1.motionZ;
+ var1.motionX = var42 * (double) var38 + var44 * (double) var41;
+ var1.motionZ = var42 * (double) var40 + var44 * (double) var39;
+ var1.rotationYaw = var8 - (float) (var28 * 90) + (float) (var27 * 90);
+ } else
+ {
+ var1.motionX = var1.motionY = var1.motionZ = 0.0D;
+ }
+
+ var1.setLocationAndAngles(var48, var47, var20, var1.rotationYaw, var1.rotationPitch);
+ return true;
+ } else
+ {
+ return false;
+ }
+ }
+
+ public boolean makePortal(Entity var1)
+ {
+ byte var2 = 16;
+ double var3 = -1.0D;
+ int var5 = MathHelper.floor_double(var1.posX);
+ int var6 = MathHelper.floor_double(var1.posY);
+ int var7 = MathHelper.floor_double(var1.posZ);
+ int var8 = var5;
+ int var9 = var6;
+ int var10 = var7;
+ int var11 = 0;
+ int var12 = this.random.nextInt(4);
+ double var32;
+ double var33;
+ int var23;
+ int var22;
+ int var21;
+ int var20;
+ int var19;
+ double var17;
+ int var16;
+ int var27;
+ int var26;
+ int var25;
+ int var24;
+ double var14;
+ int var13;
+
+ for (var13 = var5 - var2; var13 <= var5 + var2; ++var13)
+ {
+ var14 = (double) var13 + 0.5D - var1.posX;
+
+ for (var16 = var7 - var2; var16 <= var7 + var2; ++var16)
+ {
+ var17 = (double) var16 + 0.5D - var1.posZ;
+ label266:
+
+ for (var19 = 127; var19 >= 0; --var19)
+ {
+ if (this.worldServerInstance.isAirBlock(var13, var19, var16))
+ {
+ while (var19 > 0 && this.worldServerInstance.isAirBlock(var13, var19 - 1, var16))
+ {
+ --var19;
+ }
+
+ for (var20 = var12; var20 < var12 + 4; ++var20)
+ {
+ var21 = var20 % 2;
+ var22 = 1 - var21;
+
+ if (var20 % 4 >= 2)
+ {
+ var21 = -var21;
+ var22 = -var22;
+ }
+
+ for (var23 = 0; var23 < 3; ++var23)
+ {
+ for (var24 = 0; var24 < 4; ++var24)
+ {
+ for (var25 = -1; var25 < 4; ++var25)
+ {
+ var26 = var13 + (var24 - 1) * var21 + var23 * var22;
+ var27 = var19 + var25;
+ int var28 = var16 + (var24 - 1) * var22 - var23 * var21;
+
+ if (!this.blockIsGood(this.worldServerInstance.getBlockId(var26, var27, var28), this.worldServerInstance.getBlockMetadata(var26, var27, var28)) || !this.worldServerInstance.isAirBlock(var26, var27, var28))
+ {
+ continue label266;
+ }
+ }
+ }
+ }
+
+ var32 = (double) var19 + 0.5D - var1.posY;
+ var33 = var14 * var14 + var32 * var32 + var17 * var17;
+
+ if (var3 < 0.0D || var33 < var3)
+ {
+ var3 = var33;
+ var8 = var13;
+ var9 = var19;
+ var10 = var16;
+ var11 = var20 % 4;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (var3 < 0.0D)
+ {
+ for (var13 = var5 - var2; var13 <= var5 + var2; ++var13)
+ {
+ var14 = (double) var13 + 0.5D - var1.posX;
+
+ for (var16 = var7 - var2; var16 <= var7 + var2; ++var16)
+ {
+ var17 = (double) var16 + 0.5D - var1.posZ;
+ label216:
+
+ for (var19 = 127; var19 >= 0; --var19)
+ {
+ if (this.worldServerInstance.isAirBlock(var13, var19, var16))
+ {
+ while (this.worldServerInstance.isAirBlock(var13, var19 - 1, var16) && var19 > 0)
+ {
+ --var19;
+ }
+
+ for (var20 = var12; var20 < var12 + 2; ++var20)
+ {
+ var21 = var20 % 2;
+ var22 = 1 - var21;
+
+ for (var23 = 0; var23 < 4; ++var23)
+ {
+ for (var24 = -1; var24 < 4; ++var24)
+ {
+ var25 = var13 + (var23 - 1) * var21;
+ var26 = var19 + var24;
+ var27 = var16 + (var23 - 1) * var22;
+
+ if (!this.blockIsGood(this.worldServerInstance.getBlockId(var25, var26, var27), this.worldServerInstance.getBlockMetadata(var25, var26, var27)) || !this.worldServerInstance.isAirBlock(var25, var26, var27))
+ {
+ continue label216;
+ }
+ }
+ }
+
+ var32 = (double) var19 + 0.5D - var1.posY;
+ var33 = var14 * var14 + var32 * var32 + var17 * var17;
+
+ if (var3 < 0.0D || var33 < var3)
+ {
+ var3 = var33;
+ var8 = var13;
+ var9 = var19;
+ var10 = var16;
+ var11 = var20 % 2;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ int var30 = var8;
+ int var15 = var9;
+ var16 = var10;
+ int var29 = var11 % 2;
+ int var18 = 1 - var29;
+
+ if (var11 % 4 >= 2)
+ {
+ var29 = -var29;
+ var18 = -var18;
+ }
+
+ boolean var31;
+
+ if (var3 < 0.0D)
+ {
+ if (var9 < 70)
+ {
+ var9 = 70;
+ }
+
+ if (var9 > 118)
+ {
+ var9 = 118;
+ }
+
+ var15 = var9;
+
+ for (var19 = -1; var19 <= 1; ++var19)
+ {
+ for (var20 = 1; var20 < 3; ++var20)
+ {
+ for (var21 = -1; var21 < 3; ++var21)
+ {
+ var22 = var30 + (var20 - 1) * var29 + var19 * var18;
+ var23 = var15 + var21;
+ var24 = var16 + (var20 - 1) * var18 - var19 * var29;
+ var31 = var21 < 0;
+ this.worldServerInstance.setBlock(var22, var23, var24, var31 ? Block.glowStone.blockID : 0);
+ }
+ }
+ }
+ }
+
+ for (var19 = 0; var19 < 4; ++var19)
+ {
+ for (var20 = 0; var20 < 4; ++var20)
+ {
+ for (var21 = -1; var21 < 4; ++var21)
+ {
+ var22 = var30 + (var20 - 1) * var29;
+ var23 = var15 + var21;
+ var24 = var16 + (var20 - 1) * var18;
+ var31 = var20 == 0 || var20 == 3 || var21 == -1 || var21 == 3;
+ this.worldServerInstance.setBlock(var22, var23, var24, var31 ? Block.glowStone.blockID : AetherBlocks.AetherPortal.blockID, 0, 2);
+ }
+ }
+
+ for (var20 = 0; var20 < 4; ++var20)
+ {
+ for (var21 = -1; var21 < 4; ++var21)
+ {
+ var22 = var30 + (var20 - 1) * var29;
+ var23 = var15 + var21;
+ var24 = var16 + (var20 - 1) * var18;
+ this.worldServerInstance.notifyBlocksOfNeighborChange(var22, var23, var24, this.worldServerInstance.getBlockId(var22, var23, var24));
+ }
+ }
+ }
+
+ return true;
+ }
+
+ public boolean blockIsGood(int var1, int var2)
+ {
+ return var1 == 0 ? false : (!Block.blocksList[var1].blockMaterial.isSolid() ? false : var1 != AetherBlocks.Aercloud.blockID);
+ }
+
+ /**
+ * called periodically to remove out-of-date portal locations from the cache list. Argument par1 is a
+ * WorldServer.getTotalWorldTime() value.
+ */
+ public void removeStalePortalLocations(long var1)
+ {
+ if (var1 % 100L == 0L)
+ {
+ Iterator var3 = this.destinationCoordinateKeys.iterator();
+ long var4 = var1 - 600L;
+
+ while (var3.hasNext())
+ {
+ Long var6 = (Long) var3.next();
+ AetherPortalPosition var7 = (AetherPortalPosition) this.destinationCoordinateCache.getValueByKey(var6.longValue());
+
+ if (var7 == null || var7.lastUpdateTime < var4)
+ {
+ var3.remove();
+ this.destinationCoordinateCache.remove(var6.longValue());
+ }
+ }
+ }
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/WorldChunkManagerAether.java b/src/main/java/net/aetherteam/aether/worldgen/WorldChunkManagerAether.java
new file mode 100644
index 0000000..740b0c7
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/WorldChunkManagerAether.java
@@ -0,0 +1,97 @@
+package net.aetherteam.aether.worldgen;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Random;
+
+import net.aetherteam.aether.Aether;
+import net.minecraft.world.ChunkPosition;
+import net.minecraft.world.biome.BiomeGenBase;
+import net.minecraft.world.biome.WorldChunkManager;
+
+public class WorldChunkManagerAether extends WorldChunkManager
+{
+ private BiomeGenBase biomeGenerator;
+
+ public WorldChunkManagerAether(double var1)
+ {
+ this.biomeGenerator = Aether.biome;
+ }
+
+ /**
+ * checks given Chunk's Biomes against List of allowed ones
+ */
+ public boolean areBiomesViable(int var1, int var2, int var3, List var4)
+ {
+ return var4.contains(this.biomeGenerator);
+ }
+
+ /**
+ * Finds a valid position within a range, that is in one of the listed biomes. Searches {par1,par2} +-par3 blocks.
+ * Strongly favors positive y positions.
+ */
+ public ChunkPosition findBiomePosition(int var1, int var2, int var3, List var4, Random var5)
+ {
+ return var4.contains(this.biomeGenerator) ? new ChunkPosition(var1 - var3 + var5.nextInt(var3 * 2 + 1), 0, var2 - var3 + var5.nextInt(var3 * 2 + 1)) : null;
+ }
+
+ /**
+ * Return a list of biomes for the specified blocks. Args: listToReuse, x, y, width, length, cacheFlag (if false,
+ * don't check biomeCache to avoid infinite loop in BiomeCacheBlock)
+ */
+ public BiomeGenBase[] getBiomeGenAt(BiomeGenBase[] var1, int var2, int var3, int var4, int var5, boolean var6)
+ {
+ return this.loadBlockGeneratorData(var1, var2, var3, var4, var5);
+ }
+
+ /**
+ * Returns the BiomeGenBase related to the x, z position on the world.
+ */
+ public BiomeGenBase getBiomeGenAt(int var1, int var2)
+ {
+ return this.biomeGenerator;
+ }
+
+ /**
+ * Returns a list of rainfall values for the specified blocks. Args: listToReuse, x, z, width, length.
+ */
+ public float[] getRainfall(float[] var1, int var2, int var3, int var4, int var5)
+ {
+ if (var1 == null || var1.length < var4 * var5)
+ {
+ var1 = new float[var4 * var5];
+ }
+
+ Arrays.fill(var1, 0, var4 * var5, 0.0F);
+ return var1;
+ }
+
+ /**
+ * Returns a list of temperatures to use for the specified blocks. Args: listToReuse, x, y, width, length
+ */
+ public float[] getTemperatures(float[] var1, int var2, int var3, int var4, int var5)
+ {
+ if (var1 == null || var1.length < var4 * var5)
+ {
+ var1 = new float[var4 * var5];
+ }
+
+ Arrays.fill(var1, 0, var4 * var5, 1.0F);
+ return var1;
+ }
+
+ /**
+ * Returns biomes to use for the blocks and loads the other data like temperature and humidity onto the
+ * WorldChunkManager Args: oldBiomeList, x, z, width, depth
+ */
+ public BiomeGenBase[] loadBlockGeneratorData(BiomeGenBase[] var1, int var2, int var3, int var4, int var5)
+ {
+ if (var1 == null || var1.length < var4 * var5)
+ {
+ var1 = new BiomeGenBase[var4 * var5];
+ }
+
+ Arrays.fill(var1, 0, var4 * var5, this.biomeGenerator);
+ return var1;
+ }
+}
diff --git a/src/main/java/net/aetherteam/aether/worldgen/WorldProviderAether.java b/src/main/java/net/aetherteam/aether/worldgen/WorldProviderAether.java
new file mode 100644
index 0000000..5f34bed
--- /dev/null
+++ b/src/main/java/net/aetherteam/aether/worldgen/WorldProviderAether.java
@@ -0,0 +1,174 @@
+package net.aetherteam.aether.worldgen;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.aetherteam.aether.client.renders.AetherSkyProvider;
+import net.minecraft.block.Block;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.Vec3;
+import net.minecraft.world.WorldProviderSurface;
+import net.minecraft.world.chunk.IChunkProvider;
+import net.minecraftforge.client.IRenderHandler;
+
+public class WorldProviderAether extends WorldProviderSurface
+{
+ private float[] colorsSunriseSunset = new float[4];
+ public static boolean isDaey = false;
+
+ /**
+ * Returns array with sunrise/sunset colors
+ */
+ public float[] calcSunriseSunsetColors(float var1, float var2)
+ {
+ float var3 = 0.4F;
+ float var4 = MathHelper.cos(var1 * (float) Math.PI * 2.0F) - 0.0F;
+ float var5 = -0.0F;
+
+ if (var4 >= var5 - var3 && var4 <= var5 + var3)
+ {
+ float var6 = (var4 - var5) / var3 * 0.5F + 0.5F;
+ float var7 = 1.0F - (1.0F - MathHelper.sin(var6 * (float) Math.PI)) * 0.99F;
+ var7 *= var7;
+ this.colorsSunriseSunset[0] = var6 * 0.3F + 0.1F;
+ this.colorsSunriseSunset[1] = var6 * var6 * 0.7F + 0.2F;
+ this.colorsSunriseSunset[2] = var6 * var6 * 0.7F + 0.2F;
+ this.colorsSunriseSunset[3] = var7;
+ return this.colorsSunriseSunset;
+ } else
+ {
+ return null;
+ }
+ }
+
+ /**
+ * Returns 'true' if in the "main surface world", but 'false' if in the Nether or End dimensions.
+ */
+ public boolean isSurfaceWorld()
+ {
+ return false;
+ }
+
+ /**
+ * Will check if the x, z position specified is alright to be set as the map spawn point
+ */
+ public boolean canCoordinateBeSpawn(int var1, int var2)
+ {
+ int var3 = this.worldObj.getFirstUncoveredBlock(var1, var2);
+ return var3 == 0 ? false : Block.blocksList[var3].blockMaterial.isSolid();
+ }
+
+ /**
+ * True if the player can respawn in this dimension (true = overworld, false = nether).
+ */
+ public boolean canRespawnHere()
+ {
+ return false;
+ }
+
+ /**
+ * Returns a new chunk provider which generates chunks for this world
+ */
+ public IChunkProvider createChunkGenerator()
+ {
+ return new ChunkProviderAether(this.worldObj, this.worldObj.getSeed());
+ }
+
+ public String getDepartMessage()
+ {
+ return "Descending from the Aether";
+ }
+
+ /**
+ * Returns the dimension's name, e.g. "The End", "Nether", or "Overworld".
+ */
+ public String getDimensionName()
+ {
+ return "Aether";
+ }
+
+ /**
+ * Return Vec3D with biome specific fog color
+ */
+ public Vec3 getFogColor(float var1, float var2)
+ {
+ int var3 = 8421536;
+
+ if (isDaey)
+ {
+ var3 = 104890528;
+ }
+
+ float var4 = MathHelper.cos(var1 * (float) Math.PI * 2.0F) * 2.0F + 0.5F;
+
+ if (var4 < 0.0F)
+ {
+ var4 = 0.0F;
+ }
+
+ if (var4 > 1.0F)
+ {
+ var4 = 1.0F;
+ }
+
+ float var5 = (float) (var3 >> 16 & 255) / 255.0F;
+ float var6 = (float) (var3 >> 8 & 255) / 255.0F;
+ float var7 = (float) (var3 & 255) / 255.0F;
+ var5 *= var4 * 0.94F + 0.06F;
+ var6 *= var4 * 0.94F + 0.06F;
+ var7 *= var4 * 0.91F + 0.09F;
+ return this.worldObj.getWorldVec3Pool().getVecFromPool((double) var5, (double) var6, (double) var7);
+ }
+
+ public String getSaveFolder()
+ {
+ return "AETHER";
+ }
+
+ /**
+ * Returns a double value representing the Y value relative to the top of the map at which void fog is at its
+ * maximum. The default factor of 0.03125 relative to 256, for example, means the void fog will be at its maximum at
+ * (256*0.03125), or 8.
+ */
+ public double getVoidFogYFactor()
+ {
+ return 100.0D;
+ }
+
+ public String getWelcomeMessage()
+ {
+ return "Ascending into the Aether";
+ }
+
+ /**
+ * returns true if this dimension is supposed to display void particles and pull in the far plane based on the
+ * user's Y offset.
+ */
+ public boolean getWorldHasVoidParticles()
+ {
+ return false;
+ }
+
+ public boolean isSkyColored()
+ {
+ return true;
+ }
+
+ /**
+ * creates a new world chunk manager for WorldProvider
+ */
+ protected void registerWorldChunkManager()
+ {
+ this.worldChunkMgr = new WorldChunkManagerAether(1.0D);
+ }
+
+ @SideOnly(Side.CLIENT)
+ public IRenderHandler getSkyRenderer()
+ {
+ return new AetherSkyProvider();
+ }
+
+ public double getHorizon()
+ {
+ return 0.0D;
+ }
+}
diff --git a/src/main/java/net/aetherteam/mainmenu_api/GuiAetherButton.java b/src/main/java/net/aetherteam/mainmenu_api/GuiAetherButton.java
new file mode 100644
index 0000000..dad8cd1
--- /dev/null
+++ b/src/main/java/net/aetherteam/mainmenu_api/GuiAetherButton.java
@@ -0,0 +1,117 @@
+package net.aetherteam.mainmenu_api;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.renderer.RenderEngine;
+import org.lwjgl.opengl.GL11;
+
+@SideOnly(Side.CLIENT)
+public class GuiAetherButton extends GuiButton
+{
+ public int scrollMax = 100;
+ public int scrollHeight = this.scrollMax;
+ public int scrollMin = 115;
+ public int scrollCrop = 20;
+ public int scrollCropMax = 90;
+ public boolean retracting = false;
+
+ public GuiAetherButton(int i, int j, int k, String s)
+ {
+ super(i, j, k, s);
+ }
+
+ public GuiAetherButton(int i, int j, int k, int l, int i1, String s)
+ {
+ super(i, j, k, l, i1, s);
+ this.enabled = true;
+ this.drawButton = true;
+ }
+
+ protected int getHoverState(boolean flag)
+ {
+ byte byte0 = 1;
+
+ if (!this.enabled)
+ {
+ byte0 = 0;
+ } else if (flag)
+ {
+ if (byte0 < 2)
+ {
+ byte0 = (byte) (byte0 + 1);
+ }
+ if (this.scrollCrop < this.scrollCropMax)
+ {
+ this.scrollCrop += 1;
+ }
+ if (this.scrollHeight < this.scrollMin) this.scrollHeight += 1;
+ } else
+ {
+ if (this.scrollCrop > this.scrollCropMax)
+ {
+ this.scrollCrop -= 1;
+ }
+ if (this.scrollHeight > this.scrollMax) this.scrollHeight -= 1;
+ if (this.scrollHeight == this.scrollMax)
+ {
+ this.retracting = false;
+ }
+ }
+ return byte0;
+ }
+
+ public void drawButton(Minecraft minecraft, int i, int j)
+ {
+ if (!this.drawButton)
+ {
+ return;
+ }
+
+ GL11.glEnable(3042);
+ GL11.glBlendFunc(770, 771);
+
+ FontRenderer fontrenderer = minecraft.fontRenderer;
+ GL11.glBindTexture(3553, minecraft.renderEngine.getTexture("/net/aetherteam/mainmenu_api/icons/aether/buttons.png"));
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ boolean flag = (i >= this.xPosition) && (j >= this.yPosition) && (i < this.xPosition + this.width) && (j < this.yPosition + this.height);
+ int k = getHoverState(flag);
+ drawTexturedModalRect(this.xPosition + this.scrollHeight - 90, this.yPosition, 0, 46 + k * 20, this.width / 2, this.height);
+ drawTexturedModalRect(this.xPosition + this.scrollHeight + this.width / 2 - 90, this.yPosition, 200 - this.width / 2, 46 + k * 20, this.width / 2, this.height);
+ mouseDragged(minecraft, i, j);
+
+ GL11.glDisable(3042);
+
+ minecraft.renderEngine.resetBoundTexture();
+
+ if (!this.enabled)
+ {
+ drawString(fontrenderer, this.displayString, this.xPosition + this.width / 10 + this.scrollHeight - 80, this.yPosition + (this.height - 8) / 2, -6250336);
+ } else if (flag)
+ {
+ drawString(fontrenderer, this.displayString, this.xPosition + this.width / 10 + this.scrollHeight - 80, this.yPosition + (this.height - 8) / 2, 7851212);
+ } else
+ drawString(fontrenderer, this.displayString, this.xPosition + this.width / 10 + this.scrollHeight - 80, this.yPosition + (this.height - 8) / 2, 14737632);
+ }
+
+ protected void mouseDragged(Minecraft var1, int var2, int var3)
+ {
+ }
+
+ public void mouseReleased(int var1, int var2)
+ {
+ }
+
+ public boolean mousePressed(Minecraft var1, int var2, int var3)
+ {
+ return (this.enabled) && (var2 >= this.xPosition) && (var3 >= this.yPosition) && (var2 < this.xPosition + this.width) && (var3 < this.yPosition + this.height);
+ }
+
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.mainmenu_api.GuiAetherButton
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/mainmenu_api/GuiButtonItemStack.java b/src/main/java/net/aetherteam/mainmenu_api/GuiButtonItemStack.java
new file mode 100644
index 0000000..634a83c
--- /dev/null
+++ b/src/main/java/net/aetherteam/mainmenu_api/GuiButtonItemStack.java
@@ -0,0 +1,33 @@
+package net.aetherteam.mainmenu_api;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.renderer.entity.RenderItem;
+import net.minecraft.item.ItemStack;
+import org.lwjgl.opengl.GL11;
+
+public class GuiButtonItemStack extends GuiButton
+{
+ protected static RenderItem itemRenderer = new RenderItem();
+ protected static FontRenderer fontRenderer;
+ protected static Minecraft mc;
+ protected static ItemStack is;
+
+ public GuiButtonItemStack(FontRenderer fontRenderer, Minecraft mc, int par1, int par2, int par3, ItemStack item)
+ {
+ super(par1, par2, par3, 20, 20, "");
+ this.fontRenderer = fontRenderer;
+ this.mc = mc;
+ is = item;
+ }
+
+ public void drawButton(Minecraft par1Minecraft, int par2, int par3)
+ {
+ super.drawButton(par1Minecraft, par2, par3);
+ GL11.glPushMatrix();
+ GL11.glEnable(32826);
+ itemRenderer.renderItemAndEffectIntoGUI(fontRenderer, mc.renderEngine, is, this.xPosition + 2, this.yPosition + 2);
+ GL11.glPopMatrix();
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/mainmenu_api/GuiMenuButton.java b/src/main/java/net/aetherteam/mainmenu_api/GuiMenuButton.java
new file mode 100644
index 0000000..8b644a0
--- /dev/null
+++ b/src/main/java/net/aetherteam/mainmenu_api/GuiMenuButton.java
@@ -0,0 +1,119 @@
+package net.aetherteam.mainmenu_api;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.renderer.RenderEngine;
+import org.lwjgl.opengl.GL11;
+
+@SideOnly(Side.CLIENT)
+public class GuiMenuButton extends GuiButton
+{
+ protected int a;
+ protected int b;
+ public int c;
+ public int d;
+ public String e;
+ public int f;
+ public boolean g;
+ public boolean h;
+ protected boolean i;
+
+ public GuiMenuButton(int par1, int par2, int par3, String par4Str)
+ {
+ this(par1, par2, par3, 200, 20, par4Str);
+ }
+
+ public GuiMenuButton(int par1, int par2, int par3, int par4, int par5, String par6Str)
+ {
+ super(par1, par2, par3, par4, par5, par6Str);
+
+ this.width = 200;
+ this.height = 20;
+ this.enabled = true;
+ this.drawButton = true;
+ this.id = par1;
+ this.xPosition = par2;
+ this.yPosition = par3;
+ this.width = par4;
+ this.height = par5;
+ this.displayString = par6Str;
+ }
+
+ protected int getHoverState(boolean par1)
+ {
+ byte b0 = 1;
+
+ if (!this.enabled)
+ {
+ b0 = 0;
+ } else if (par1)
+ {
+ b0 = 2;
+ }
+
+ return b0;
+ }
+
+ public void drawButton(Minecraft par1Minecraft, int par2, int par3)
+ {
+ if (this.drawButton)
+ {
+ FontRenderer fontrenderer = par1Minecraft.fontRenderer;
+ par1Minecraft.renderEngine.bindTexture("/gui/gui.png");
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ this.field_82253_i = ((par2 >= this.xPosition) && (par3 >= this.yPosition) && (par2 < this.xPosition + this.width) && (par3 < this.yPosition + this.height));
+ int k = getHoverState(this.field_82253_i);
+ drawTexturedModalRect(this.xPosition, this.yPosition, 0, 46 + k * 20, this.width / 2, this.height);
+ drawTexturedModalRect(this.xPosition + this.width / 2, this.yPosition, 200 - this.width / 2, 46 + k * 20, this.width / 2, this.height);
+ mouseDragged(par1Minecraft, par2, par3);
+ int l = 14737632;
+
+ if (!this.enabled)
+ {
+ l = -6250336;
+ } else if (this.field_82253_i)
+ {
+ l = 16777120;
+ }
+
+ drawCenteredString(fontrenderer, this.displayString, this.xPosition + this.width / 2, this.yPosition + (this.height - 8) / 2, l);
+ }
+ }
+
+ protected void mouseDragged(Minecraft par1Minecraft, int par2, int par3)
+ {
+ }
+
+ public void mouseReleased(int par1, int par2)
+ {
+ }
+
+ public boolean mousePressed(Minecraft par1Minecraft, int par2, int par3)
+ {
+ return (this.enabled) && (this.drawButton) && (par2 >= this.xPosition) && (par3 >= this.yPosition) && (par2 < this.xPosition + this.width) && (par3 < this.yPosition + this.height);
+ }
+
+ public boolean func_82252_a()
+ {
+ return this.field_82253_i;
+ }
+
+ public void func_82251_b(int par1, int par2)
+ {
+ }
+
+ public void clickButton()
+ {
+ MenuBaseConfig.wipeConfig();
+
+ Minecraft.getMinecraft().displayGuiScreen(new MenuBaseLoaderWithSlider());
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.mainmenu_api.GuiMenuButton
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/mainmenu_api/GuiYSlider.java b/src/main/java/net/aetherteam/mainmenu_api/GuiYSlider.java
new file mode 100644
index 0000000..f3dc738
--- /dev/null
+++ b/src/main/java/net/aetherteam/mainmenu_api/GuiYSlider.java
@@ -0,0 +1,101 @@
+package net.aetherteam.mainmenu_api;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.GuiButton;
+import org.lwjgl.opengl.GL11;
+
+public class GuiYSlider extends GuiButton
+{
+ private static final int BACKGROUND_COLOR = -8947849;
+ private static final int DEFAULT_BAR_COLOR = -10066330;
+ private static final int HOVER_BAR_COLOR = -11184811;
+ private static final int DRAG_BAR_COLOR = -12303292;
+ public float sliderValue = 0.0F;
+ public boolean dragging = false;
+
+ public GuiYSlider(int id, int x, int y, int width, int height)
+ {
+ super(id, x, y, width, height, "");
+ }
+
+ protected int getHoverState(boolean par1)
+ {
+ return super.getHoverState(par1);
+ }
+
+ protected void mouseDragged(Minecraft par1Minecraft, int par2, int par3)
+ {
+ if (this.drawButton)
+ {
+ if (this.dragging)
+ {
+ this.sliderValue = ((par3 - (this.yPosition + 4)) / (this.height - 8));
+
+ if (this.sliderValue < 0.0F)
+ {
+ this.sliderValue = 0.0F;
+ }
+
+ if (this.sliderValue > 1.0F)
+ {
+ this.sliderValue = 1.0F;
+ }
+ }
+
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ drawTexturedModalRect(this.xPosition, this.yPosition + (int) (this.sliderValue * (this.height - 20)), 0, 66, this.width, 20);
+ drawTexturedModalRect(this.xPosition, this.yPosition + (int) (this.sliderValue * (this.height - 20)) + 4, 196, 66, 4, 20);
+ }
+ }
+
+ public void drawButton(Minecraft par1Minecraft, int par2, int par3)
+ {
+ mouseDragged(par1Minecraft, par2, par3);
+ GL11.glDisable(3553);
+ drawGradientRect(this.xPosition, this.yPosition, this.xPosition + this.width, this.yPosition + this.height, -8947849, -8947849);
+
+ this.field_82253_i = ((par2 >= this.xPosition) && (par3 >= this.yPosition + (int) (this.sliderValue * (this.height - 20))) && (par2 < this.xPosition + this.width) && (par3 < this.yPosition + 20 + (int) (this.sliderValue * (this.height - 20))));
+ int barColor = 0;
+ if (this.dragging)
+ {
+ barColor = -12303292;
+ } else
+ {
+ if (this.field_82253_i) ;
+ else ;
+ }
+ drawGradientRect(this.xPosition, this.yPosition + (int) (this.sliderValue * (this.height - 20)), this.xPosition + this.width, this.yPosition + (int) (this.sliderValue * (this.height - 20)) + 20, barColor, barColor);
+ }
+
+ public boolean mousePressed(Minecraft par1Minecraft, int par2, int par3)
+ {
+ if (super.mousePressed(par1Minecraft, par2, par3))
+ {
+ this.sliderValue = ((par3 - (this.yPosition + 4)) / (this.height - 8));
+
+ if (this.sliderValue < 0.0F)
+ {
+ this.sliderValue = 0.0F;
+ }
+
+ if (this.sliderValue > 1.0F)
+ {
+ this.sliderValue = 1.0F;
+ }
+
+ this.dragging = true;
+ return true;
+ }
+ return false;
+ }
+
+ public void mouseReleased(int par1, int par2)
+ {
+ this.dragging = false;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.mainmenu_api.GuiYSlider
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/mainmenu_api/JukeboxPlayer.java b/src/main/java/net/aetherteam/mainmenu_api/JukeboxPlayer.java
new file mode 100644
index 0000000..69b7508
--- /dev/null
+++ b/src/main/java/net/aetherteam/mainmenu_api/JukeboxPlayer.java
@@ -0,0 +1,252 @@
+package net.aetherteam.mainmenu_api;
+
+import java.io.File;
+import java.io.PrintStream;
+import java.util.ArrayList;
+import java.util.List;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.audio.SoundManager;
+import net.minecraft.util.MathHelper;
+import paulscode.sound.SoundSystem;
+
+public class JukeboxPlayer
+{
+ public SoundManager soundManager = MainMenuAPI.proxy.getClient().sndManager;
+ private int musicInterval;
+ public List jukeboxMusic;
+ public boolean defaultMusic = true;
+ public String musicFileName = null;
+
+ public boolean songIsPlaying = false;
+
+ public void process()
+ {
+ Minecraft.getMinecraft();
+ File streaming = new File(Minecraft.getMinecraftDir() + "/resources/streaming/");
+
+ if (streaming.exists())
+ {
+ this.jukeboxMusic = listMusic(streaming, false);
+ }
+ }
+
+ public void start()
+ {
+ MenuBaseConfig.loadConfig();
+
+ if (MenuBaseConfig.hasStartedMusic != true)
+ {
+ if (getMusicFileName() == null) ;
+ }
+
+ MenuBaseConfig.hasStartedMusic = true;
+ MenuBaseConfig.setProperty("hasStartedMusic", "true");
+
+ process();
+ }
+
+ public void run()
+ {
+ if ((this.songIsPlaying) && (!MenuBaseConfig.muteMusic))
+ {
+ this.musicInterval += 1;
+ } else this.musicInterval = 0;
+
+ if (this.musicInterval > 100)
+ {
+ this.songIsPlaying = false;
+ this.musicInterval = 0;
+ }
+
+ if (this.jukeboxMusic != null)
+ {
+ if (MenuBaseConfig.musicIndex > this.jukeboxMusic.size() - 1)
+ {
+ MenuBaseConfig.musicIndex = 0;
+ MenuBaseConfig.setProperty("musicIndex", String.valueOf(MenuBaseConfig.musicIndex));
+ }
+
+ if (MenuBaseConfig.musicIndex < 0)
+ {
+ MenuBaseConfig.musicIndex = this.jukeboxMusic.size() - 1;
+ MenuBaseConfig.setProperty("musicIndex", String.valueOf(MenuBaseConfig.musicIndex));
+ }
+ }
+
+ if (MenuBaseConfig.muteMusic)
+ {
+ muteMusic();
+ }
+
+ playMenuMusic();
+ }
+
+ public int getIndexFromName(String musicName)
+ {
+ process();
+
+ if (this.jukeboxMusic != null)
+ {
+ for (int count = 0; count < this.jukeboxMusic.size(); count++)
+ {
+ if (((String) this.jukeboxMusic.get(count)).equalsIgnoreCase(musicName))
+ {
+ return count;
+ }
+ }
+ }
+
+ return MenuBaseConfig.musicIndex;
+ }
+
+ public List listMusic(File folder, boolean extension)
+ {
+ if (folder.exists())
+ {
+ List files = new ArrayList();
+
+ for (File fileEntry : folder.listFiles())
+ {
+ if (fileEntry.isDirectory())
+ {
+ listMusic(fileEntry, extension);
+ } else
+ {
+ String nameExtension = fileEntry.getName();
+ String nameNoExtension = fileEntry.getName().replaceFirst("[.][^.]+$", "");
+
+ if (!files.contains(extension ? nameExtension : nameNoExtension))
+ {
+ files.add(extension ? nameExtension : nameNoExtension);
+ }
+ }
+ }
+ return files;
+ }
+ return null;
+ }
+
+ private void setToNextSong()
+ {
+ if (this.jukeboxMusic != null)
+ {
+ if (!MenuBaseConfig.musicSet)
+ {
+ MenuBaseConfig.musicSet = true;
+ MenuBaseConfig.setProperty("musicSet", "true");
+
+ if (MenuBaseConfig.musicIndex > this.jukeboxMusic.size() - 2)
+ {
+ MenuBaseConfig.musicIndex = 0;
+ MenuBaseConfig.setProperty("musicIndex", String.valueOf(MenuBaseConfig.musicIndex));
+ } else
+ {
+ MenuBaseConfig.musicIndex += 1;
+ MenuBaseConfig.setProperty("musicIndex", String.valueOf(MenuBaseConfig.musicIndex));
+ }
+ }
+ }
+ }
+
+ public String getCurrentSongName()
+ {
+ String name = getCurrentSong();
+ return name.substring(0, 1).toUpperCase() + name.substring(1);
+ }
+
+ private String getCurrentSong()
+ {
+ if (this.jukeboxMusic != null)
+ {
+ return (String) this.jukeboxMusic.get(this.defaultMusic ? getIndexFromName(getMusicFileName()) : MathHelper.clamp_int(MenuBaseConfig.musicIndex, 0, this.jukeboxMusic.size() - 1));
+ }
+ return "";
+ }
+
+ public boolean isMusicPlaying()
+ {
+ return (SoundManager.sndSystem != null) && (SoundManager.sndSystem.playing("streaming"));
+ }
+
+ public void muteMusic()
+ {
+ if ((this.soundManager != null) && (SoundManager.sndSystem != null))
+ {
+ SoundManager.sndSystem.stop("streaming");
+ }
+ }
+
+ public void toggleMute()
+ {
+ MenuBaseConfig.muteMusic = !MenuBaseConfig.muteMusic;
+ MenuBaseConfig.setProperty("muteMusic", String.valueOf(MenuBaseConfig.muteMusic));
+
+ if (MenuBaseConfig.muteMusic)
+ {
+ muteMusic();
+ } else playMenuMusic();
+ }
+
+ public void toggleLoop()
+ {
+ MenuBaseConfig.loopMusic = !MenuBaseConfig.loopMusic;
+ MenuBaseConfig.setProperty("loopMusic", String.valueOf(MenuBaseConfig.loopMusic));
+ }
+
+ private void playMusicFile(String musicFile)
+ {
+ if ((!MenuBaseConfig.muteMusic) && (SoundManager.sndSystem != null) && (!SoundManager.sndSystem.playing("streaming")))
+ {
+ System.out.println("Playing Music File: " + musicFile);
+
+ float x = (float) MenuBaseConfig.playerPosX;
+ float y = (float) MenuBaseConfig.playerPosY;
+ float z = (float) MenuBaseConfig.playerPosZ;
+
+ this.soundManager.playStreaming(musicFile, x != 0.0F ? x : 0.0F, y != 0.0F ? y : 0.0F, z != 0.0F ? z : 0.0F);
+ }
+ }
+
+ public String getMusicFileName()
+ {
+ return this.musicFileName;
+ }
+
+ public JukeboxPlayer setMusicFileName(String name)
+ {
+ this.musicFileName = name;
+
+ return this;
+ }
+
+ public void playMenuMusic()
+ {
+ if ((SoundManager.sndSystem != null) &&
+ ((!MenuBaseConfig.hasPlayedMusic) || ((!SoundManager.sndSystem.playing("streaming")) && (MenuBaseConfig.hasPlayedMusic))) && (MenuBaseConfig.hasStartedMusic))
+ {
+ if ((!MenuBaseConfig.muteMusic) && (!SoundManager.sndSystem.playing("streaming")) && (!this.songIsPlaying))
+ {
+ this.songIsPlaying = true;
+
+ if (!MenuBaseConfig.loopMusic)
+ {
+ setToNextSong();
+ }
+
+ playMusicFile(getCurrentSong());
+ }
+
+ MenuBaseConfig.hasPlayedMusic = true;
+ MenuBaseConfig.setProperty("hasPlayedMusic", "true");
+ }
+
+ MenuBaseConfig.musicSet = false;
+ MenuBaseConfig.setProperty("musicSet", "false");
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.mainmenu_api.JukeboxPlayer
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/mainmenu_api/MainMenuAPI.java b/src/main/java/net/aetherteam/mainmenu_api/MainMenuAPI.java
new file mode 100644
index 0000000..c7cdcb9
--- /dev/null
+++ b/src/main/java/net/aetherteam/mainmenu_api/MainMenuAPI.java
@@ -0,0 +1,75 @@
+package net.aetherteam.mainmenu_api;
+
+import cpw.mods.fml.common.Mod;
+import cpw.mods.fml.common.Mod.Init;
+import cpw.mods.fml.common.Mod.Instance;
+import cpw.mods.fml.common.Mod.PostInit;
+import cpw.mods.fml.common.Mod.PreInit;
+import cpw.mods.fml.common.SidedProxy;
+import cpw.mods.fml.common.event.FMLInitializationEvent;
+import cpw.mods.fml.common.event.FMLPostInitializationEvent;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.network.NetworkMod;
+
+import java.io.PrintStream;
+
+@Mod(modid = "MainMenuAPI", name = "Main Menu API", version = "1.0.0")
+@NetworkMod(clientSideRequired = true, serverSideRequired = true)
+public class MainMenuAPI
+{
+
+ @Mod.Instance("MainMenuAPI")
+ private static MainMenuAPI instance;
+
+ @SidedProxy(clientSide = "net.aetherteam.mainmenu_api.client.MenuClientProxy", serverSide = "net.aetherteam.mainmenu_api.MenuCommonProxy")
+ public static MenuCommonProxy proxy;
+
+ public static MainMenuAPI getInstance()
+ {
+ return instance;
+ }
+
+ @Mod.Init
+ public void load(FMLInitializationEvent event)
+ {
+ proxy.registerTickHandler();
+ }
+
+ @Mod.PostInit
+ public void postInit(FMLPostInitializationEvent event)
+ {
+ }
+
+ @Mod.PreInit
+ public void preInit(FMLPreInitializationEvent event)
+ {
+ proxy.registerSounds();
+ }
+
+ public static void registerMenu(String menuName, Class menu)
+ {
+ if (menuName == null)
+ {
+ throw new NullPointerException("A Menu Base string is null!");
+ }
+
+ if (menu == null)
+ {
+ throw new NullPointerException("The Menu Base '" + menuName + "' has a null MenuBase class!");
+ }
+
+ if (MenuBaseSorter.isMenuRegistered(menuName))
+ {
+ System.out.println("Menu Base '" + menu + "' with name '" + menuName + "' is already registered!");
+ }
+
+ System.out.println("Menu Base '" + menu + "' with name '" + menuName + "' has been registered.");
+
+ MenuBaseSorter.addMenuToSorter(menuName, menu);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.mainmenu_api.MainMenuAPI
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/mainmenu_api/MenuBase.java b/src/main/java/net/aetherteam/mainmenu_api/MenuBase.java
new file mode 100644
index 0000000..690920e
--- /dev/null
+++ b/src/main/java/net/aetherteam/mainmenu_api/MenuBase.java
@@ -0,0 +1,303 @@
+package net.aetherteam.mainmenu_api;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import net.minecraft.block.Block;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.audio.SoundManager;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.item.ItemStack;
+import org.lwjgl.opengl.GL11;
+
+@SideOnly(Side.CLIENT)
+public class MenuBase extends GuiScreen
+{
+ private GuiMenuButton menuButton;
+ private GuiButtonItemStack jukeButton;
+ private GuiButton selectedButton = null;
+ private int jukeboxTexture;
+ private int menuX;
+ private int menuY;
+ private int jukeWidth;
+ private int jukeHeight;
+ private boolean jukeboxOpen = false;
+ private List jukeButtonList = new ArrayList();
+ public JukeboxPlayer jukebox = new JukeboxPlayer().setMusicFileName(getMusicFileName());
+
+ public void initGui()
+ {
+ this.jukeboxTexture = this.mc.renderEngine.getTexture("/net/aetherteam/mainmenu_api/gui/jukebox.png");
+
+ this.jukeHeight = 256;
+ this.jukeWidth = 256;
+
+ updateScreen();
+
+ if (useJukebox()) this.jukebox.start();
+ }
+
+ public void onGuiClosed()
+ {
+ MenuBaseConfig.hasStartedMusic = false;
+ MenuBaseConfig.setProperty("hasStartedMusic", "false");
+
+ if (MenuBaseConfig.hasPlayedMusic) ;
+ }
+
+ public void drawJukeboxBackground(int i)
+ {
+ GL11.glDisable(2896);
+ GL11.glDisable(2912);
+ Tessellator tessellator = Tessellator.instance;
+
+ this.mc.renderEngine.bindTexture(getJukeboxBackgroundPath());
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ float f = 32.0F;
+ tessellator.startDrawingQuads();
+ tessellator.setColorOpaque_I(10066329);
+ tessellator.addVertexWithUV(0.0D, this.height, 0.0D, 0.0D, this.height / f + i);
+ tessellator.addVertexWithUV(this.width, this.height, 0.0D, this.width / f, this.height / f + i);
+ tessellator.addVertexWithUV(this.width, 0.0D, 0.0D, this.width / f, 0 + i);
+ tessellator.addVertexWithUV(0.0D, 0.0D, 0.0D, 0.0D, 0 + i);
+ tessellator.draw();
+ }
+
+ public void drawScreen(int x, int y, float something)
+ {
+ super.drawScreen(x, y, something);
+
+ Minecraft mc = Minecraft.getMinecraft();
+ ScaledResolution scaledresolution = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+
+ this.menuX = (width + mc.displayWidth / 2);
+ this.menuY = (height + mc.displayHeight / 2);
+
+ if (useJukebox())
+ {
+ this.jukebox.run();
+ }
+ this.jukeButtonList.clear();
+
+ this.jukeButton = new GuiButtonItemStack(this.fontRenderer, mc, 0, getJukeboxButtonX(), getJukeboxButtonY(), new ItemStack(Block.jukebox));
+ this.menuButton = new GuiMenuButton(0, getListButtonX(), getListButtonY(), 58, 20, "Menu List");
+
+ this.menuButton.drawButton(this.mc, x, y);
+
+ if (useJukebox())
+ {
+ this.jukeButton.drawButton(this.mc, x, y);
+ }
+ if (this.jukeboxOpen)
+ {
+ drawJukeboxBackground(0);
+
+ this.jukeButton.drawButton(this.mc, x, y);
+ this.menuButton.drawButton(this.mc, x, y);
+
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glEnable(3042);
+ GL11.glBlendFunc(770, 771);
+ GL11.glBindTexture(3553, this.jukeboxTexture);
+
+ int centerX = width - width / 2 - 75;
+ int centerY = height - height / 2 - 37;
+
+ ScaledResolution sr = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
+ drawTexturedModalRect(centerX, centerY, 0, 0, 151, this.jukeHeight);
+
+ mc.renderEngine.resetBoundTexture();
+
+ this.fontRenderer.drawStringWithShadow(this.jukebox.getCurrentSongName(), centerX + 76 - this.fontRenderer.getStringWidth(this.jukebox.getCurrentSongName()) / 2, centerY + 14, 16777215);
+
+ if ((!this.jukebox.isMusicPlaying()) && (!MenuBaseConfig.muteMusic))
+ {
+ this.fontRenderer.drawStringWithShadow("Loading Song...", centerX + 76 - this.fontRenderer.getStringWidth("Loading Song...") / 2, centerY - 11, 16777215);
+ }
+ this.jukeButtonList.add(new GuiButton(0, centerX + 12, centerY + 42, 58, 20, "Music: " + (MenuBaseConfig.muteMusic ? "Off" : "On")));
+ this.jukeButtonList.add(new GuiButton(1, centerX + 83, centerY + 42, 58, 20, "Loop: " + (MenuBaseConfig.loopMusic ? "On" : "Off")));
+ this.jukeButtonList.add(new GuiButton(2, centerX + 125, centerY + 8, 20, 20, ">"));
+ this.jukeButtonList.add(new GuiButton(3, centerX + 7, centerY + 8, 20, 20, "<"));
+
+ for (int k = 0; k < this.jukeButtonList.size(); k++)
+ {
+ GuiButton jukebutton = (GuiButton) this.jukeButtonList.get(k);
+ jukebutton.drawButton(this.mc, x, y);
+ }
+ }
+ }
+
+ public int getJukeboxButtonX()
+ {
+ Minecraft mc = Minecraft.getMinecraft();
+ ScaledResolution scaledresolution = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+
+ return width / 2 + 192;
+ }
+
+ public int getJukeboxButtonY()
+ {
+ Minecraft mc = Minecraft.getMinecraft();
+ ScaledResolution scaledresolution = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+
+ return 4;
+ }
+
+ public int getListButtonX()
+ {
+ Minecraft mc = Minecraft.getMinecraft();
+ ScaledResolution scaledresolution = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+
+ return 5;
+ }
+
+ public int getListButtonY()
+ {
+ Minecraft mc = Minecraft.getMinecraft();
+ ScaledResolution scaledresolution = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+
+ return height - 25;
+ }
+
+ protected void mouseClicked(int par1, int par2, int par3)
+ {
+ if (par3 == 0)
+ {
+ if ((this.jukeButton != null) && (this.jukeButton.mousePressed(this.mc, par1, par2)))
+ {
+ this.mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
+
+ this.jukeboxOpen = (!this.jukeboxOpen);
+ }
+
+ if ((this.menuButton != null) && (this.menuButton.mousePressed(this.mc, par1, par2)))
+ {
+ this.mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
+ this.menuButton.clickButton();
+ }
+
+ for (int l = 0; l < this.jukeButtonList.size(); l++)
+ {
+ GuiButton guibutton = (GuiButton) this.jukeButtonList.get(l);
+
+ if (guibutton.mousePressed(this.mc, par1, par2))
+ {
+ this.selectedButton = guibutton;
+ this.mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
+
+ if (guibutton.id == 0)
+ {
+ this.jukebox.toggleMute();
+ }
+
+ if (guibutton.id == 1)
+ {
+ this.jukebox.toggleLoop();
+ }
+
+ if (guibutton.id == 2)
+ {
+ MenuBaseConfig.musicIndex += 1;
+ MenuBaseConfig.setProperty("musicIndex", String.valueOf(MenuBaseConfig.musicIndex));
+
+ this.jukebox.defaultMusic = false;
+
+ this.jukebox.muteMusic();
+ }
+
+ if (guibutton.id == 3)
+ {
+ MenuBaseConfig.musicIndex -= 1;
+ MenuBaseConfig.setProperty("musicIndex", String.valueOf(MenuBaseConfig.musicIndex));
+
+ this.jukebox.defaultMusic = false;
+
+ this.jukebox.muteMusic();
+ }
+ }
+ }
+
+ if (!this.jukeboxOpen)
+ {
+ for (int l = 0; l < this.buttonList.size(); l++)
+ {
+ GuiButton guibutton = (GuiButton) this.buttonList.get(l);
+
+ if (guibutton.mousePressed(this.mc, par1, par2))
+ {
+ this.selectedButton = guibutton;
+ this.mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
+ actionPerformed(guibutton);
+ }
+ }
+ }
+ }
+ }
+
+ protected void mouseMovedOrUp(int par1, int par2, int par3)
+ {
+ if ((this.selectedButton != null) && (par3 == 0) && (!this.jukeboxOpen))
+ {
+ this.selectedButton.mouseReleased(par1, par2);
+ this.selectedButton = null;
+ }
+ }
+
+ public String getName()
+ {
+ return "Default Name";
+ }
+
+ public String getVersion()
+ {
+ return "1.0.0";
+ }
+
+ public String getMusicFileName()
+ {
+ return null;
+ }
+
+ public String getIconPath()
+ {
+ return "/net/aetherteam/mainmenu_api/icons/minecraft.png";
+ }
+
+ public String getJukeboxBackgroundPath()
+ {
+ return "/net/aetherteam/mainmenu_api/icons/dirt.png";
+ }
+
+ public boolean useJukebox()
+ {
+ return true;
+ }
+
+ public boolean isJukeboxOpen()
+ {
+ return this.jukeboxOpen;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.mainmenu_api.MenuBase
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/mainmenu_api/MenuBaseAether.java b/src/main/java/net/aetherteam/mainmenu_api/MenuBaseAether.java
new file mode 100644
index 0000000..7ae4f31
--- /dev/null
+++ b/src/main/java/net/aetherteam/mainmenu_api/MenuBaseAether.java
@@ -0,0 +1,636 @@
+package net.aetherteam.mainmenu_api;
+
+import com.google.common.base.Strings;
+import com.google.common.collect.Lists;
+import cpw.mods.fml.client.GuiModList;
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.awt.image.BufferedImage;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.lang.reflect.Method;
+import java.net.URI;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+import java.util.Random;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.Gui;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiButtonLanguage;
+import net.minecraft.client.gui.GuiConfirmOpenLink;
+import net.minecraft.client.gui.GuiLanguage;
+import net.minecraft.client.gui.GuiMultiplayer;
+import net.minecraft.client.gui.GuiOptions;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.GuiScreenOnlineServers;
+import net.minecraft.client.gui.GuiSelectWorld;
+import net.minecraft.client.gui.GuiYesNo;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.StringTranslate;
+import net.minecraft.world.demo.DemoWorldServer;
+import net.minecraft.world.storage.ISaveFormat;
+import net.minecraft.world.storage.WorldInfo;
+import org.lwjgl.opengl.GL11;
+import org.lwjgl.util.glu.GLU;
+
+@SideOnly(Side.CLIENT)
+public class MenuBaseAether extends MenuBase
+{
+ private static final Random rand = new Random();
+
+ private float updateCounter = 0.0F;
+
+ private String splashText = "missingno";
+ private GuiAetherButton buttonResetDemo;
+ private int panoramaTimer = 0;
+
+ private float scalingLol = 0.975F;
+ private int viewportTexture;
+ private boolean field_96141_q = true;
+ private static boolean field_96140_r = false;
+ private static boolean field_96139_s = false;
+ private String field_92025_p;
+ private static final String[] titlePanoramaPaths = {"/net/aetherteam/mainmenu_api/title/bg/panorama0.png", "/net/aetherteam/mainmenu_api/title/bg/panorama1.png", "/net/aetherteam/mainmenu_api/title/bg/panorama2.png", "/net/aetherteam/mainmenu_api/title/bg/panorama3.png", "/net/aetherteam/mainmenu_api/title/bg/panorama4.png", "/net/aetherteam/mainmenu_api/title/bg/panorama5.png"};
+ public static final String field_96138_a = "Please click " + EnumChatFormatting.UNDERLINE + "here" + EnumChatFormatting.RESET + " for more information.";
+ private int field_92024_r;
+ private int field_92023_s;
+ private int field_92022_t;
+ private int field_92021_u;
+ private int field_92020_v;
+ private int field_92019_w;
+ private GuiAetherButton fmlModButton = null;
+
+ public MenuBaseAether()
+ {
+ BufferedReader bufferedreader = null;
+ try
+ {
+ ArrayList arraylist = new ArrayList();
+ bufferedreader = new BufferedReader(new InputStreamReader(MenuBaseAether.class.getResourceAsStream("/title/splashes.txt"), Charset.forName("UTF-8")));
+ String s;
+ while ((s = bufferedreader.readLine()) != null)
+ {
+ s = s.trim();
+
+ if (s.length() > 0)
+ {
+ arraylist.add(s);
+ }
+ }
+
+ do
+ {
+ this.splashText = ((String) arraylist.get(rand.nextInt(arraylist.size())));
+ } while (this.splashText.hashCode() == 125780783);
+ } catch (IOException ioexception)
+ {
+ } finally
+ {
+ if (bufferedreader != null)
+ {
+ try
+ {
+ bufferedreader.close();
+ } catch (IOException ioexception1)
+ {
+ }
+ }
+
+ }
+
+ this.updateCounter = rand.nextFloat();
+ }
+
+ public void updateScreen()
+ {
+ this.panoramaTimer += 1;
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ protected void keyTyped(char par1, int par2)
+ {
+ }
+
+ public void initGui()
+ {
+ super.initGui();
+
+ this.viewportTexture = this.mc.renderEngine.allocateAndSetupTexture(new BufferedImage(256, 256, 2));
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTime(new Date());
+
+ if ((calendar.get(2) + 1 == 11) && (calendar.get(5) == 9))
+ {
+ this.splashText = "Happy birthday, ez!";
+ } else if ((calendar.get(2) + 1 == 6) && (calendar.get(5) == 1))
+ {
+ this.splashText = "Happy birthday, Notch!";
+ } else if ((calendar.get(2) + 1 == 12) && (calendar.get(5) == 24))
+ {
+ this.splashText = "Merry X-mas!";
+ } else if ((calendar.get(2) + 1 == 1) && (calendar.get(5) == 1))
+ {
+ this.splashText = "Happy new year!";
+ } else if ((calendar.get(2) + 1 == 10) && (calendar.get(5) == 31))
+ {
+ this.splashText = "OOoooOOOoooo! Spooky!";
+ }
+
+ StringTranslate stringtranslate = StringTranslate.getInstance();
+ int i = this.height / 4 + 68;
+
+ if (this.mc.isDemo())
+ {
+ addDemoButtons(i, 24, stringtranslate);
+ } else
+ {
+ addSingleplayerMultiplayerButtons(i, 24, stringtranslate);
+ }
+
+ this.fmlModButton = new GuiAetherButton(6, 30, i + 48 - 45, "Mods");
+ this.buttonList.add(this.fmlModButton);
+
+ func_96137_a(stringtranslate, i, 24);
+
+ if (this.mc.hideQuitButton)
+ {
+ this.buttonList.add(new GuiAetherButton(0, 30, i + 27, stringtranslate.translateKey("menu.options")));
+ } else
+ {
+ this.buttonList.add(new GuiAetherButton(0, 30, i + 27 + 12, 200, 20, stringtranslate.translateKey("menu.options")));
+ this.buttonList.add(new GuiAetherButton(4, 30, i + 27 + 35, 200, 20, stringtranslate.translateKey("menu.quit")));
+ }
+
+ this.buttonList.add(new GuiButtonLanguage(5, this.width - 48, 4));
+ this.field_92025_p = "";
+ String s = System.getProperty("os_architecture");
+ String s1 = System.getProperty("java_version");
+
+ if ("ppc".equalsIgnoreCase(s))
+ {
+ this.field_92025_p = ("" + EnumChatFormatting.BOLD + "Notice!" + EnumChatFormatting.RESET + " PowerPC compatibility will be dropped in Minecraft 1.6");
+ } else if ((s1 != null) && (s1.startsWith("1.5")))
+ {
+ this.field_92025_p = ("" + EnumChatFormatting.BOLD + "Notice!" + EnumChatFormatting.RESET + " Java 1.5 compatibility will be dropped in Minecraft 1.6");
+ }
+
+ this.field_92023_s = this.fontRenderer.getStringWidth(this.field_92025_p);
+ this.field_92024_r = this.fontRenderer.getStringWidth(field_96138_a);
+ int j = Math.max(this.field_92023_s, this.field_92024_r);
+ this.field_92022_t = ((this.width - j) / 2);
+ this.field_92021_u = (((GuiAetherButton) this.buttonList.get(0)).yPosition - 24);
+ this.field_92020_v = (this.field_92022_t + j);
+ this.field_92019_w = (this.field_92021_u + 24);
+ }
+
+ private void func_96137_a(StringTranslate par1StringTranslate, int par2, int par3)
+ {
+ if (this.field_96141_q)
+ {
+ if (!field_96140_r)
+ {
+ field_96140_r = true;
+ } else if (field_96139_s)
+ {
+ func_98060_b(par1StringTranslate, par2, par3);
+ }
+ }
+ }
+
+ private void func_98060_b(StringTranslate par1StringTranslate, int par2, int par3)
+ {
+ this.fmlModButton.xPosition = (this.width / 2 + 2);
+
+ GuiAetherButton realmButton = new GuiAetherButton(3, 30, par2 - 45 + par3 * 2, par1StringTranslate.translateKey("menu.online"));
+
+ realmButton.xPosition = (this.width / 2 - 100);
+ this.buttonList.add(realmButton);
+ }
+
+ private void addSingleplayerMultiplayerButtons(int par1, int par2, StringTranslate par3StringTranslate)
+ {
+ this.buttonList.add(new GuiAetherButton(1, 30, par1 - 45, par3StringTranslate.translateKey("menu.singleplayer")));
+ this.buttonList.add(new GuiAetherButton(2, 30, par1 - 45 + par2 * 1, par3StringTranslate.translateKey("menu.multiplayer")));
+ }
+
+ private void addDemoButtons(int par1, int par2, StringTranslate par3StringTranslate)
+ {
+ this.buttonList.add(new GuiAetherButton(11, 30, par1, par3StringTranslate.translateKey("menu.playdemo")));
+ this.buttonList.add(this.buttonResetDemo = new GuiAetherButton(12, 30, par1 - 45 + par2 * 1, par3StringTranslate.translateKey("menu.resetdemo")));
+ ISaveFormat isaveformat = this.mc.getSaveLoader();
+ WorldInfo worldinfo = isaveformat.getWorldInfo("Demo_World");
+
+ if (worldinfo == null)
+ {
+ this.buttonResetDemo.enabled = false;
+ }
+ }
+
+ protected void actionPerformed(GuiButton par1GuiButton)
+ {
+ if (par1GuiButton.id == 0)
+ {
+ this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
+ }
+
+ if (par1GuiButton.id == 5)
+ {
+ this.mc.displayGuiScreen(new GuiLanguage(this, this.mc.gameSettings));
+ }
+
+ if (par1GuiButton.id == 1)
+ {
+ this.mc.displayGuiScreen(new GuiSelectWorld(this));
+ }
+
+ if (par1GuiButton.id == 2)
+ {
+ this.mc.displayGuiScreen(new GuiMultiplayer(this));
+ }
+
+ if (par1GuiButton.id == 3)
+ {
+ this.mc.displayGuiScreen(new GuiScreenOnlineServers(this));
+ }
+
+ if (par1GuiButton.id == 4)
+ {
+ this.mc.shutdown();
+ }
+
+ if (par1GuiButton.id == 6)
+ {
+ this.mc.displayGuiScreen(new GuiModList(this));
+ }
+
+ if (par1GuiButton.id == 11)
+ {
+ this.mc.launchIntegratedServer("Demo_World", "Demo_World", DemoWorldServer.demoWorldSettings);
+ }
+
+ if (par1GuiButton.id == 12)
+ {
+ ISaveFormat isaveformat = this.mc.getSaveLoader();
+ WorldInfo worldinfo = isaveformat.getWorldInfo("Demo_World");
+
+ if (worldinfo != null)
+ {
+ GuiYesNo guiyesno = GuiSelectWorld.getDeleteWorldScreen(this, worldinfo.getWorldName(), 12);
+ this.mc.displayGuiScreen(guiyesno);
+ }
+ }
+ }
+
+ public void confirmClicked(boolean par1, int par2)
+ {
+ if ((par1) && (par2 == 12))
+ {
+ ISaveFormat isaveformat = this.mc.getSaveLoader();
+ isaveformat.flushCache();
+ isaveformat.deleteWorldDirectory("Demo_World");
+ this.mc.displayGuiScreen(this);
+ } else if (par2 == 13)
+ {
+ if (par1)
+ {
+ try
+ {
+ Class oclass = Class.forName("java.awt.Desktop");
+ Object object = oclass.getMethod("getDesktop", new Class[0]).invoke((Object) null, new Object[0]);
+ oclass.getMethod("browse", new Class[]{URI.class}).invoke(object, new Object[]{new URI("http://tinyurl.com/javappc")});
+ } catch (Throwable throwable)
+ {
+ throwable.printStackTrace();
+ }
+ }
+
+ this.mc.displayGuiScreen(this);
+ }
+ }
+
+ private void drawPanorama(int par1, int par2, float par3)
+ {
+ Tessellator tessellator = Tessellator.instance;
+ GL11.glMatrixMode(5889);
+ GL11.glPushMatrix();
+ GL11.glLoadIdentity();
+ GLU.gluPerspective(120.0F, 1.0F, 0.05F, 10.0F);
+ GL11.glMatrixMode(5888);
+ GL11.glPushMatrix();
+ GL11.glLoadIdentity();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glEnable(3042);
+ GL11.glDisable(3008);
+ GL11.glDisable(2884);
+ GL11.glDepthMask(false);
+ GL11.glBlendFunc(770, 771);
+ byte b0 = 8;
+
+ for (int k = 0; k < b0 * b0; k++)
+ {
+ GL11.glPushMatrix();
+ float f1 = (k % b0 / b0 - 0.5F) / 64.0F;
+ float f2 = (k / b0 / b0 - 0.5F) / 64.0F;
+ float f3 = 0.0F;
+ GL11.glTranslatef(f1, f2, f3);
+ GL11.glRotatef(MathHelper.sin((this.panoramaTimer + par3) / 400.0F) * 25.0F + 20.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glRotatef(-(this.panoramaTimer + par3) * 0.1F, 0.0F, 1.0F, 0.0F);
+
+ for (int l = 0; l < 6; l++)
+ {
+ GL11.glPushMatrix();
+
+ if (l == 1)
+ {
+ GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
+ }
+
+ if (l == 2)
+ {
+ GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
+ }
+
+ if (l == 3)
+ {
+ GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
+ }
+
+ if (l == 4)
+ {
+ GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
+ }
+
+ if (l == 5)
+ {
+ GL11.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F);
+ }
+
+ this.mc.renderEngine.bindTexture(titlePanoramaPaths[l]);
+ tessellator.startDrawingQuads();
+ tessellator.setColorRGBA_I(16777215, 255 / (k + 1));
+ float f4 = 0.0F;
+ tessellator.addVertexWithUV(-1.0D, -1.0D, 1.0D, 0.0F + f4, 0.0F + f4);
+ tessellator.addVertexWithUV(1.0D, -1.0D, 1.0D, 1.0F - f4, 0.0F + f4);
+ tessellator.addVertexWithUV(1.0D, 1.0D, 1.0D, 1.0F - f4, 1.0F - f4);
+ tessellator.addVertexWithUV(-1.0D, 1.0D, 1.0D, 0.0F + f4, 1.0F - f4);
+ tessellator.draw();
+ GL11.glPopMatrix();
+ }
+
+ GL11.glPopMatrix();
+ GL11.glColorMask(true, true, true, false);
+ }
+
+ tessellator.setTranslation(0.0D, 0.0D, 0.0D);
+ GL11.glColorMask(true, true, true, true);
+ GL11.glMatrixMode(5889);
+ GL11.glPopMatrix();
+ GL11.glMatrixMode(5888);
+ GL11.glPopMatrix();
+ GL11.glDepthMask(true);
+ GL11.glEnable(2884);
+ GL11.glEnable(3008);
+ GL11.glEnable(2929);
+ }
+
+ private void rotateAndBlurSkybox(float par1)
+ {
+ GL11.glBindTexture(3553, this.viewportTexture);
+ this.mc.renderEngine.resetBoundTexture();
+ GL11.glCopyTexSubImage2D(3553, 0, 0, 0, 0, 0, 256, 256);
+ GL11.glEnable(3042);
+ GL11.glBlendFunc(770, 771);
+ GL11.glColorMask(true, true, true, false);
+ Tessellator tessellator = Tessellator.instance;
+ tessellator.startDrawingQuads();
+ byte b0 = 3;
+
+ for (int i = 0; i < b0; i++)
+ {
+ tessellator.setColorRGBA_F(1.0F, 1.0F, 1.0F, 1.0F / (i + 1));
+ int j = this.width;
+ int k = this.height;
+ float f1 = (i - b0 / 2) / 256.0F;
+ tessellator.addVertexWithUV(j, k, this.zLevel, 0.0F + f1, 0.0D);
+ tessellator.addVertexWithUV(j, 0.0D, this.zLevel, 1.0F + f1, 0.0D);
+ tessellator.addVertexWithUV(0.0D, 0.0D, this.zLevel, 1.0F + f1, 1.0D);
+ tessellator.addVertexWithUV(0.0D, k, this.zLevel, 0.0F + f1, 1.0D);
+ }
+
+ tessellator.draw();
+ GL11.glColorMask(true, true, true, true);
+ this.mc.renderEngine.resetBoundTexture();
+ }
+
+ private void renderSkybox(int par1, int par2, float par3)
+ {
+ GL11.glViewport(0, 0, 256, 256);
+ drawPanorama(par1, par2, par3);
+ GL11.glDisable(3553);
+ GL11.glEnable(3553);
+ rotateAndBlurSkybox(par3);
+ rotateAndBlurSkybox(par3);
+ rotateAndBlurSkybox(par3);
+ rotateAndBlurSkybox(par3);
+ rotateAndBlurSkybox(par3);
+ rotateAndBlurSkybox(par3);
+ rotateAndBlurSkybox(par3);
+ rotateAndBlurSkybox(par3);
+ GL11.glViewport(0, 0, this.mc.displayWidth, this.mc.displayHeight);
+ Tessellator tessellator = Tessellator.instance;
+ tessellator.startDrawingQuads();
+ float f1 = this.width > this.height ? 120.0F / this.width : 120.0F / this.height;
+ float f2 = this.height * f1 / 256.0F;
+ float f3 = this.width * f1 / 256.0F;
+ GL11.glTexParameteri(3553, 10241, 9729);
+ GL11.glTexParameteri(3553, 10240, 9729);
+ tessellator.setColorRGBA_F(1.0F, 1.0F, 1.0F, 1.0F);
+ int k = this.width;
+ int l = this.height;
+ tessellator.addVertexWithUV(0.0D, l, this.zLevel, 0.5F - f2, 0.5F + f3);
+ tessellator.addVertexWithUV(k, l, this.zLevel, 0.5F - f2, 0.5F - f3);
+ tessellator.addVertexWithUV(k, 0.0D, this.zLevel, 0.5F + f2, 0.5F - f3);
+ tessellator.addVertexWithUV(0.0D, 0.0D, this.zLevel, 0.5F + f2, 0.5F + f3);
+ tessellator.draw();
+ }
+
+ public void drawLogo(int k, int b0)
+ {
+ GL11.glPushMatrix();
+
+ GL11.glEnable(3042);
+ GL11.glBlendFunc(770, 771);
+
+ this.scalingLol += this.scalingLol * 0.001F;
+
+ if (this.scalingLol > 1.0F)
+ {
+ this.scalingLol = 1.0F;
+ }
+ GL11.glScalef(this.scalingLol, this.scalingLol, this.scalingLol);
+ drawTexturedModalRect(25, b0 - 10, 0, 0, 155, 44);
+ drawTexturedModalRect(180, b0 - 10, 0, 45, 155, 44);
+
+ GL11.glDisable(3042);
+
+ GL11.glPopMatrix();
+ }
+
+ public void drawScreen(int par1, int par2, float par3)
+ {
+ renderSkybox(par1, par2, par3);
+ Tessellator tessellator = Tessellator.instance;
+ short short1 = 274;
+ int k = this.width / 2 - short1 / 2;
+ byte b0 = 30;
+ drawGradientRect(0, 0, this.width, this.height, -2130706433, 16777215);
+ drawGradientRect(0, 0, this.width, this.height, 0, -2147483648);
+ this.mc.renderEngine.bindTexture("/net/aetherteam/mainmenu_api/title/mclogomod1.png");
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+
+ if (this.updateCounter < 0.0001D)
+ {
+ drawTexturedModalRect(k + 0, b0 + 0, 0, 0, 99, 44);
+ drawTexturedModalRect(k + 99, b0 + 0, 129, 0, 27, 44);
+ drawTexturedModalRect(k + 99 + 26, b0 + 0, 126, 0, 3, 44);
+ drawTexturedModalRect(k + 99 + 26 + 3, b0 + 0, 99, 0, 26, 44);
+ drawTexturedModalRect(k + 155, b0 + 0, 0, 45, 155, 44);
+ } else
+ {
+ drawLogo(k, b0);
+ }
+
+ tessellator.setColorOpaque_I(16777215);
+ GL11.glPushMatrix();
+ GL11.glTranslatef(215.0F, 50.0F, 0.0F);
+ GL11.glRotatef(-20.0F, 0.0F, 0.0F, 1.0F);
+ float f1 = 1.4F - MathHelper.abs(MathHelper.sin((float) (Minecraft.getSystemTime() % 1000L) / 1000.0F * 3.141593F * 2.0F) * 0.1F);
+ f1 = f1 * 100.0F / (this.fontRenderer.getStringWidth(this.splashText) + 32);
+ GL11.glScalef(f1, f1, f1);
+ drawCenteredString(this.fontRenderer, this.splashText, 0, -8, 16776960);
+ GL11.glPopMatrix();
+ String s = "Minecraft 1.5.1";
+
+ if (this.mc.isDemo())
+ {
+ s = s + " Demo";
+ }
+
+ List brandings = Lists.reverse(FMLCommonHandler.instance().getBrandings());
+ for (int i = 0; i < brandings.size(); i++)
+ {
+ String brd = (String) brandings.get(i);
+ if (!Strings.isNullOrEmpty(brd))
+ {
+ drawString(this.fontRenderer, brd, this.width - 2 - this.fontRenderer.getStringWidth(brd), this.height - (10 + i * (this.fontRenderer.FONT_HEIGHT + 1)), 16777215);
+ }
+ }
+
+ String s1 = "Copyright Mojang AB. Do not distribute!";
+ drawString(this.fontRenderer, s1, 2, this.height - 10, 16777215);
+
+ if ((this.field_92025_p != null) && (this.field_92025_p.length() > 0))
+ {
+ drawRect(this.field_92022_t - 2, this.field_92021_u - 2, this.field_92020_v + 2, this.field_92019_w - 1, 1428160512);
+ drawString(this.fontRenderer, this.field_92025_p, this.field_92022_t, this.field_92021_u, 16777215);
+ drawString(this.fontRenderer, field_96138_a, (this.width - this.field_92024_r) / 2, ((GuiAetherButton) this.buttonList.get(0)).yPosition - 12, 16777215);
+ }
+
+ super.drawScreen(par1, par2, par3);
+ }
+
+ protected void mouseClicked(int par1, int par2, int par3)
+ {
+ super.mouseClicked(par1, par2, par3);
+
+ if ((this.field_92025_p.length() > 0) && (par1 >= this.field_92022_t) && (par1 <= this.field_92020_v) && (par2 >= this.field_92021_u) && (par2 <= this.field_92019_w))
+ {
+ GuiConfirmOpenLink guiconfirmopenlink = new GuiConfirmOpenLink(this, "http://tinyurl.com/javappc", 13);
+ guiconfirmopenlink.func_92026_h();
+ this.mc.displayGuiScreen(guiconfirmopenlink);
+ }
+ }
+
+ static Minecraft func_98058_a(MenuBaseAether par0GuiMainMenu)
+ {
+ return par0GuiMainMenu.mc;
+ }
+
+ static void func_98061_a(MenuBaseAether par0GuiMainMenu, StringTranslate par1StringTranslate, int par2, int par3)
+ {
+ par0GuiMainMenu.func_98060_b(par1StringTranslate, par2, par3);
+ }
+
+ static boolean func_98059_a(boolean par0)
+ {
+ field_96139_s = par0;
+ return par0;
+ }
+
+ public int getListButtonX()
+ {
+ return this.width - 110;
+ }
+
+ public int getListButtonY()
+ {
+ Minecraft mc = Minecraft.getMinecraft();
+ ScaledResolution scaledresolution = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+
+ return 4;
+ }
+
+ public int getJukeboxButtonX()
+ {
+ return this.width - 24;
+ }
+
+ public int getJukeboxButtonY()
+ {
+ return 4;
+ }
+
+ public String getName()
+ {
+ return "Aether I";
+ }
+
+ public String getVersion()
+ {
+ return "Sequel Released!";
+ }
+
+ public String getMusicFileName()
+ {
+ return "Aether Menu";
+ }
+
+ public String getIconPath()
+ {
+ return "/net/aetherteam/mainmenu_api/icons/aether/MenuIcon.png";
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.mainmenu_api.MenuBaseAether
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/mainmenu_api/MenuBaseConfig.java b/src/main/java/net/aetherteam/mainmenu_api/MenuBaseConfig.java
new file mode 100644
index 0000000..c7395fb
--- /dev/null
+++ b/src/main/java/net/aetherteam/mainmenu_api/MenuBaseConfig.java
@@ -0,0 +1,155 @@
+package net.aetherteam.mainmenu_api;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.util.Properties;
+
+import net.minecraft.client.Minecraft;
+
+public class MenuBaseConfig
+{
+ private static Minecraft mc = Minecraft.getMinecraft();
+
+ private static final Properties menuProps = new Properties();
+ public static String selectedMenuName;
+ public static boolean loopMusic;
+ public static boolean muteMusic;
+ public static int lastMusicIndex;
+ public static int musicIndex;
+ public static boolean musicSet;
+ public static boolean hasPlayedMusic;
+ public static boolean hasStartedMusic;
+ public static boolean endMusic = true;
+ public static JukeboxPlayer jukebox = new JukeboxPlayer();
+ public static double playerPosX;
+ public static double playerPosY;
+ public static double playerPosZ;
+ public static int ticks;
+ private static File config = new File(Minecraft.getMinecraftDir(), "MenuAPI.properties");
+
+ public static void loadConfig()
+ {
+ Minecraft.getMinecraft();
+ System.out.println(Minecraft.getMinecraftDir());
+ if (config.exists()) try
+ {
+ Minecraft.getMinecraft();
+ FileInputStream in = new FileInputStream(Minecraft.getMinecraftDir() + "/MenuAPI.properties");
+
+ menuProps.load(in);
+
+ if (menuProps.size() <= 0)
+ {
+ resetConfig();
+ return;
+ }
+
+ if (menuProps != null)
+ {
+ selectedMenuName = String.valueOf(menuProps.getProperty("selectedMenu"));
+ loopMusic = menuProps.getProperty("loopMusic") != null ? menuProps.getProperty("loopMusic").equals("true") : true;
+ muteMusic = menuProps.getProperty("muteMusic") != null ? menuProps.getProperty("muteMusic").equals("true") : false;
+ lastMusicIndex = Integer.valueOf(menuProps.getProperty("lastMusicIndex")).intValue();
+ musicIndex = Integer.valueOf(menuProps.getProperty("musicIndex")).intValue();
+ musicSet = menuProps.getProperty("musicSet") != null ? menuProps.getProperty("musicSet").equals("true") : false;
+ hasPlayedMusic = menuProps.getProperty("hasPlayedMusic") != null ? menuProps.getProperty("hasPlayedMusic").equals("true") : false;
+ hasStartedMusic = menuProps.getProperty("hasStartedMusic") != null ? menuProps.getProperty("hasStartedMusic").equals("true") : false;
+ }
+
+ } catch (FileNotFoundException e)
+ {
+ e.printStackTrace();
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+ else resetConfig();
+ }
+
+ public static void resetConfig()
+ {
+ try
+ {
+ System.out.println(String.valueOf(jukebox.getIndexFromName("Strad")));
+
+ menuProps.setProperty("selectedMenu", "");
+ menuProps.setProperty("loopMusic", "true");
+ menuProps.setProperty("muteMusic", "false");
+ menuProps.setProperty("lastMusicIndex", String.valueOf(jukebox.getIndexFromName("Strad")));
+ menuProps.setProperty("musicIndex", String.valueOf(jukebox.getIndexFromName("Strad")));
+ menuProps.setProperty("musicSet", "false");
+ menuProps.setProperty("hasPlayedMusic", "false");
+ menuProps.setProperty("hasStartedMusic", "false");
+
+ Minecraft.getMinecraft();
+ menuProps.store(new FileOutputStream(Minecraft.getMinecraftDir() + "/MenuAPI.properties"), null);
+
+ Minecraft.getMinecraft();
+ FileInputStream in = new FileInputStream(Minecraft.getMinecraftDir() + "/MenuAPI.properties");
+
+ menuProps.load(in);
+ } catch (FileNotFoundException e)
+ {
+ e.printStackTrace();
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ public static void wipeConfig()
+ {
+ if (config.exists()) try
+ {
+ menuProps.setProperty("selectedMenu", "");
+
+ Minecraft.getMinecraft();
+ menuProps.store(new FileOutputStream(Minecraft.getMinecraftDir() + "/MenuAPI.properties"), null);
+
+ FileInputStream in = new FileInputStream("MenuAPI.properties");
+
+ menuProps.load(in);
+ } catch (FileNotFoundException e)
+ {
+ e.printStackTrace();
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ public static void setProperty(String name, String value)
+ {
+ try
+ {
+ menuProps.setProperty(name, value);
+
+ Minecraft.getMinecraft();
+ menuProps.store(new FileOutputStream(Minecraft.getMinecraftDir() + "/MenuAPI.properties"), null);
+
+ FileInputStream in = new FileInputStream("MenuAPI.properties");
+
+ menuProps.load(in);
+ } catch (FileNotFoundException e)
+ {
+ e.printStackTrace();
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ static
+ {
+ Minecraft.getMinecraft();
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.mainmenu_api.MenuBaseConfig
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/mainmenu_api/MenuBaseLeftMinecraft.java b/src/main/java/net/aetherteam/mainmenu_api/MenuBaseLeftMinecraft.java
new file mode 100644
index 0000000..6b416d4
--- /dev/null
+++ b/src/main/java/net/aetherteam/mainmenu_api/MenuBaseLeftMinecraft.java
@@ -0,0 +1,618 @@
+package net.aetherteam.mainmenu_api;
+
+import com.google.common.base.Strings;
+import com.google.common.collect.Lists;
+import cpw.mods.fml.client.GuiModList;
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.awt.image.BufferedImage;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.lang.reflect.Method;
+import java.net.URI;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+import java.util.Random;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.Gui;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiButtonLanguage;
+import net.minecraft.client.gui.GuiConfirmOpenLink;
+import net.minecraft.client.gui.GuiLanguage;
+import net.minecraft.client.gui.GuiMultiplayer;
+import net.minecraft.client.gui.GuiOptions;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.GuiScreenOnlineServers;
+import net.minecraft.client.gui.GuiSelectWorld;
+import net.minecraft.client.gui.GuiYesNo;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.StringTranslate;
+import net.minecraft.world.demo.DemoWorldServer;
+import net.minecraft.world.storage.ISaveFormat;
+import net.minecraft.world.storage.WorldInfo;
+import org.lwjgl.opengl.GL11;
+import org.lwjgl.util.glu.GLU;
+
+@SideOnly(Side.CLIENT)
+public class MenuBaseLeftMinecraft extends MenuBase
+{
+ private static final Random rand = new Random();
+
+ private float updateCounter = 0.0F;
+
+ private String splashText = "missingno";
+ private GuiButton buttonResetDemo;
+ private int panoramaTimer = 0;
+ private int viewportTexture;
+ private boolean field_96141_q = true;
+ private static boolean field_96140_r = false;
+ private static boolean field_96139_s = false;
+ private String field_92025_p;
+ private static final String[] titlePanoramaPaths = {"/title/bg/panorama0.png", "/title/bg/panorama1.png", "/title/bg/panorama2.png", "/title/bg/panorama3.png", "/title/bg/panorama4.png", "/title/bg/panorama5.png"};
+ public static final String field_96138_a = "Please click " + EnumChatFormatting.UNDERLINE + "here" + EnumChatFormatting.RESET + " for more information.";
+ private int field_92024_r;
+ private int field_92023_s;
+ private int field_92022_t;
+ private int field_92021_u;
+ private int field_92020_v;
+ private int field_92019_w;
+ private GuiButton fmlModButton = null;
+
+ public MenuBaseLeftMinecraft()
+ {
+ BufferedReader bufferedreader = null;
+ try
+ {
+ ArrayList arraylist = new ArrayList();
+ bufferedreader = new BufferedReader(new InputStreamReader(MenuBaseLeftMinecraft.class.getResourceAsStream("/title/splashes.txt"), Charset.forName("UTF-8")));
+ String s;
+ while ((s = bufferedreader.readLine()) != null)
+ {
+ s = s.trim();
+
+ if (s.length() > 0)
+ {
+ arraylist.add(s);
+ }
+ }
+
+ do
+ {
+ this.splashText = ((String) arraylist.get(rand.nextInt(arraylist.size())));
+ } while (this.splashText.hashCode() == 125780783);
+ } catch (IOException ioexception)
+ {
+ } finally
+ {
+ if (bufferedreader != null)
+ {
+ try
+ {
+ bufferedreader.close();
+ } catch (IOException ioexception1)
+ {
+ }
+ }
+
+ }
+
+ this.updateCounter = rand.nextFloat();
+ }
+
+ public void updateScreen()
+ {
+ this.panoramaTimer += 1;
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ protected void keyTyped(char par1, int par2)
+ {
+ }
+
+ public void initGui()
+ {
+ super.initGui();
+
+ this.viewportTexture = this.mc.renderEngine.allocateAndSetupTexture(new BufferedImage(256, 256, 2));
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTime(new Date());
+
+ if ((calendar.get(2) + 1 == 11) && (calendar.get(5) == 9))
+ {
+ this.splashText = "Happy birthday, ez!";
+ } else if ((calendar.get(2) + 1 == 6) && (calendar.get(5) == 1))
+ {
+ this.splashText = "Happy birthday, Notch!";
+ } else if ((calendar.get(2) + 1 == 12) && (calendar.get(5) == 24))
+ {
+ this.splashText = "Merry X-mas!";
+ } else if ((calendar.get(2) + 1 == 1) && (calendar.get(5) == 1))
+ {
+ this.splashText = "Happy new year!";
+ } else if ((calendar.get(2) + 1 == 10) && (calendar.get(5) == 31))
+ {
+ this.splashText = "OOoooOOOoooo! Spooky!";
+ }
+
+ StringTranslate stringtranslate = StringTranslate.getInstance();
+ int i = this.height / 4 + 68;
+
+ if (this.mc.isDemo())
+ {
+ addDemoButtons(i, 24, stringtranslate);
+ } else
+ {
+ addSingleplayerMultiplayerButtons(i, 24, stringtranslate);
+ }
+
+ this.fmlModButton = new GuiButton(6, 30, i + 48 - 45, "Mods");
+ this.buttonList.add(this.fmlModButton);
+
+ func_96137_a(stringtranslate, i, 24);
+
+ if (this.mc.hideQuitButton)
+ {
+ this.buttonList.add(new GuiButton(0, 30, i + 27, stringtranslate.translateKey("menu.options")));
+ } else
+ {
+ this.buttonList.add(new GuiButton(0, 30, i + 27 + 12, 200, 20, stringtranslate.translateKey("menu.options")));
+ this.buttonList.add(new GuiButton(4, 30, i + 27 + 35, 200, 20, stringtranslate.translateKey("menu.quit")));
+ }
+
+ this.buttonList.add(new GuiButtonLanguage(5, this.width - 48, 4));
+ this.field_92025_p = "";
+ String s = System.getProperty("os_architecture");
+ String s1 = System.getProperty("java_version");
+
+ if ("ppc".equalsIgnoreCase(s))
+ {
+ this.field_92025_p = ("" + EnumChatFormatting.BOLD + "Notice!" + EnumChatFormatting.RESET + " PowerPC compatibility will be dropped in Minecraft 1.6");
+ } else if ((s1 != null) && (s1.startsWith("1.5")))
+ {
+ this.field_92025_p = ("" + EnumChatFormatting.BOLD + "Notice!" + EnumChatFormatting.RESET + " Java 1.5 compatibility will be dropped in Minecraft 1.6");
+ }
+
+ this.field_92023_s = this.fontRenderer.getStringWidth(this.field_92025_p);
+ this.field_92024_r = this.fontRenderer.getStringWidth(field_96138_a);
+ int j = Math.max(this.field_92023_s, this.field_92024_r);
+ this.field_92022_t = ((this.width - j) / 2);
+ this.field_92021_u = (((GuiButton) this.buttonList.get(0)).yPosition - 24);
+ this.field_92020_v = (this.field_92022_t + j);
+ this.field_92019_w = (this.field_92021_u + 24);
+ }
+
+ private void func_96137_a(StringTranslate par1StringTranslate, int par2, int par3)
+ {
+ if (this.field_96141_q)
+ {
+ if (!field_96140_r)
+ {
+ field_96140_r = true;
+ } else if (field_96139_s)
+ {
+ func_98060_b(par1StringTranslate, par2, par3);
+ }
+ }
+ }
+
+ private void func_98060_b(StringTranslate par1StringTranslate, int par2, int par3)
+ {
+ this.fmlModButton.xPosition = (this.width / 2 + 2);
+
+ GuiButton realmButton = new GuiButton(3, 30, par2 - 45 + par3 * 2, par1StringTranslate.translateKey("menu.online"));
+
+ realmButton.xPosition = (this.width / 2 - 100);
+ this.buttonList.add(realmButton);
+ }
+
+ private void addSingleplayerMultiplayerButtons(int par1, int par2, StringTranslate par3StringTranslate)
+ {
+ this.buttonList.add(new GuiButton(1, 30, par1 - 45, par3StringTranslate.translateKey("menu.singleplayer")));
+ this.buttonList.add(new GuiButton(2, 30, par1 - 45 + par2 * 1, par3StringTranslate.translateKey("menu.multiplayer")));
+ }
+
+ private void addDemoButtons(int par1, int par2, StringTranslate par3StringTranslate)
+ {
+ this.buttonList.add(new GuiButton(11, 30, par1, par3StringTranslate.translateKey("menu.playdemo")));
+ this.buttonList.add(this.buttonResetDemo = new GuiButton(12, 30, par1 - 45 + par2 * 1, par3StringTranslate.translateKey("menu.resetdemo")));
+ ISaveFormat isaveformat = this.mc.getSaveLoader();
+ WorldInfo worldinfo = isaveformat.getWorldInfo("Demo_World");
+
+ if (worldinfo == null)
+ {
+ this.buttonResetDemo.enabled = false;
+ }
+ }
+
+ protected void actionPerformed(GuiButton par1GuiButton)
+ {
+ if (par1GuiButton.id == 0)
+ {
+ this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
+ }
+
+ if (par1GuiButton.id == 5)
+ {
+ this.mc.displayGuiScreen(new GuiLanguage(this, this.mc.gameSettings));
+ }
+
+ if (par1GuiButton.id == 1)
+ {
+ this.mc.displayGuiScreen(new GuiSelectWorld(this));
+ }
+
+ if (par1GuiButton.id == 2)
+ {
+ this.mc.displayGuiScreen(new GuiMultiplayer(this));
+ }
+
+ if (par1GuiButton.id == 3)
+ {
+ this.mc.displayGuiScreen(new GuiScreenOnlineServers(this));
+ }
+
+ if (par1GuiButton.id == 4)
+ {
+ this.mc.shutdown();
+ }
+
+ if (par1GuiButton.id == 6)
+ {
+ this.mc.displayGuiScreen(new GuiModList(this));
+ }
+
+ if (par1GuiButton.id == 11)
+ {
+ this.mc.launchIntegratedServer("Demo_World", "Demo_World", DemoWorldServer.demoWorldSettings);
+ }
+
+ if (par1GuiButton.id == 12)
+ {
+ ISaveFormat isaveformat = this.mc.getSaveLoader();
+ WorldInfo worldinfo = isaveformat.getWorldInfo("Demo_World");
+
+ if (worldinfo != null)
+ {
+ GuiYesNo guiyesno = GuiSelectWorld.getDeleteWorldScreen(this, worldinfo.getWorldName(), 12);
+ this.mc.displayGuiScreen(guiyesno);
+ }
+ }
+ }
+
+ public void confirmClicked(boolean par1, int par2)
+ {
+ if ((par1) && (par2 == 12))
+ {
+ ISaveFormat isaveformat = this.mc.getSaveLoader();
+ isaveformat.flushCache();
+ isaveformat.deleteWorldDirectory("Demo_World");
+ this.mc.displayGuiScreen(this);
+ } else if (par2 == 13)
+ {
+ if (par1)
+ {
+ try
+ {
+ Class oclass = Class.forName("java.awt.Desktop");
+ Object object = oclass.getMethod("getDesktop", new Class[0]).invoke((Object) null, new Object[0]);
+ oclass.getMethod("browse", new Class[]{URI.class}).invoke(object, new Object[]{new URI("http://tinyurl.com/javappc")});
+ } catch (Throwable throwable)
+ {
+ throwable.printStackTrace();
+ }
+ }
+
+ this.mc.displayGuiScreen(this);
+ }
+ }
+
+ private void drawPanorama(int par1, int par2, float par3)
+ {
+ Tessellator tessellator = Tessellator.instance;
+ GL11.glMatrixMode(5889);
+ GL11.glPushMatrix();
+ GL11.glLoadIdentity();
+ GLU.gluPerspective(120.0F, 1.0F, 0.05F, 10.0F);
+ GL11.glMatrixMode(5888);
+ GL11.glPushMatrix();
+ GL11.glLoadIdentity();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glEnable(3042);
+ GL11.glDisable(3008);
+ GL11.glDisable(2884);
+ GL11.glDepthMask(false);
+ GL11.glBlendFunc(770, 771);
+ byte b0 = 8;
+
+ for (int k = 0; k < b0 * b0; k++)
+ {
+ GL11.glPushMatrix();
+ float f1 = (k % b0 / b0 - 0.5F) / 64.0F;
+ float f2 = (k / b0 / b0 - 0.5F) / 64.0F;
+ float f3 = 0.0F;
+ GL11.glTranslatef(f1, f2, f3);
+ GL11.glRotatef(MathHelper.sin((this.panoramaTimer + par3) / 400.0F) * 25.0F + 20.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glRotatef(-(this.panoramaTimer + par3) * 0.1F, 0.0F, 1.0F, 0.0F);
+
+ for (int l = 0; l < 6; l++)
+ {
+ GL11.glPushMatrix();
+
+ if (l == 1)
+ {
+ GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
+ }
+
+ if (l == 2)
+ {
+ GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
+ }
+
+ if (l == 3)
+ {
+ GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
+ }
+
+ if (l == 4)
+ {
+ GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
+ }
+
+ if (l == 5)
+ {
+ GL11.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F);
+ }
+
+ this.mc.renderEngine.bindTexture(titlePanoramaPaths[l]);
+ tessellator.startDrawingQuads();
+ tessellator.setColorRGBA_I(16777215, 255 / (k + 1));
+ float f4 = 0.0F;
+ tessellator.addVertexWithUV(-1.0D, -1.0D, 1.0D, 0.0F + f4, 0.0F + f4);
+ tessellator.addVertexWithUV(1.0D, -1.0D, 1.0D, 1.0F - f4, 0.0F + f4);
+ tessellator.addVertexWithUV(1.0D, 1.0D, 1.0D, 1.0F - f4, 1.0F - f4);
+ tessellator.addVertexWithUV(-1.0D, 1.0D, 1.0D, 0.0F + f4, 1.0F - f4);
+ tessellator.draw();
+ GL11.glPopMatrix();
+ }
+
+ GL11.glPopMatrix();
+ GL11.glColorMask(true, true, true, false);
+ }
+
+ tessellator.setTranslation(0.0D, 0.0D, 0.0D);
+ GL11.glColorMask(true, true, true, true);
+ GL11.glMatrixMode(5889);
+ GL11.glPopMatrix();
+ GL11.glMatrixMode(5888);
+ GL11.glPopMatrix();
+ GL11.glDepthMask(true);
+ GL11.glEnable(2884);
+ GL11.glEnable(3008);
+ GL11.glEnable(2929);
+ }
+
+ private void rotateAndBlurSkybox(float par1)
+ {
+ GL11.glBindTexture(3553, this.viewportTexture);
+ this.mc.renderEngine.resetBoundTexture();
+ GL11.glCopyTexSubImage2D(3553, 0, 0, 0, 0, 0, 256, 256);
+ GL11.glEnable(3042);
+ GL11.glBlendFunc(770, 771);
+ GL11.glColorMask(true, true, true, false);
+ Tessellator tessellator = Tessellator.instance;
+ tessellator.startDrawingQuads();
+ byte b0 = 3;
+
+ for (int i = 0; i < b0; i++)
+ {
+ tessellator.setColorRGBA_F(1.0F, 1.0F, 1.0F, 1.0F / (i + 1));
+ int j = this.width;
+ int k = this.height;
+ float f1 = (i - b0 / 2) / 256.0F;
+ tessellator.addVertexWithUV(j, k, this.zLevel, 0.0F + f1, 0.0D);
+ tessellator.addVertexWithUV(j, 0.0D, this.zLevel, 1.0F + f1, 0.0D);
+ tessellator.addVertexWithUV(0.0D, 0.0D, this.zLevel, 1.0F + f1, 1.0D);
+ tessellator.addVertexWithUV(0.0D, k, this.zLevel, 0.0F + f1, 1.0D);
+ }
+
+ tessellator.draw();
+ GL11.glColorMask(true, true, true, true);
+ this.mc.renderEngine.resetBoundTexture();
+ }
+
+ private void renderSkybox(int par1, int par2, float par3)
+ {
+ GL11.glViewport(0, 0, 256, 256);
+ drawPanorama(par1, par2, par3);
+ GL11.glDisable(3553);
+ GL11.glEnable(3553);
+ rotateAndBlurSkybox(par3);
+ rotateAndBlurSkybox(par3);
+ rotateAndBlurSkybox(par3);
+ rotateAndBlurSkybox(par3);
+ rotateAndBlurSkybox(par3);
+ rotateAndBlurSkybox(par3);
+ rotateAndBlurSkybox(par3);
+ rotateAndBlurSkybox(par3);
+ GL11.glViewport(0, 0, this.mc.displayWidth, this.mc.displayHeight);
+ Tessellator tessellator = Tessellator.instance;
+ tessellator.startDrawingQuads();
+ float f1 = this.width > this.height ? 120.0F / this.width : 120.0F / this.height;
+ float f2 = this.height * f1 / 256.0F;
+ float f3 = this.width * f1 / 256.0F;
+ GL11.glTexParameteri(3553, 10241, 9729);
+ GL11.glTexParameteri(3553, 10240, 9729);
+ tessellator.setColorRGBA_F(1.0F, 1.0F, 1.0F, 1.0F);
+ int k = this.width;
+ int l = this.height;
+ tessellator.addVertexWithUV(0.0D, l, this.zLevel, 0.5F - f2, 0.5F + f3);
+ tessellator.addVertexWithUV(k, l, this.zLevel, 0.5F - f2, 0.5F - f3);
+ tessellator.addVertexWithUV(k, 0.0D, this.zLevel, 0.5F + f2, 0.5F - f3);
+ tessellator.addVertexWithUV(0.0D, 0.0D, this.zLevel, 0.5F + f2, 0.5F + f3);
+ tessellator.draw();
+ }
+
+ public void drawLogo(int k, int b0)
+ {
+ GL11.glPushMatrix();
+
+ GL11.glScalef(0.85F, 0.85F, 0.85F);
+ drawTexturedModalRect(20, b0 - 10, 0, 0, 155, 44);
+ drawTexturedModalRect(175, b0 - 10, 0, 45, 155, 44);
+
+ GL11.glPopMatrix();
+ }
+
+ public void drawScreen(int par1, int par2, float par3)
+ {
+ renderSkybox(par1, par2, par3);
+ Tessellator tessellator = Tessellator.instance;
+ short short1 = 274;
+ int k = this.width / 2 - short1 / 2;
+ byte b0 = 30;
+ drawGradientRect(0, 0, this.width, this.height, -2130706433, 16777215);
+ drawGradientRect(0, 0, this.width, this.height, 0, -2147483648);
+ this.mc.renderEngine.bindTexture("/title/mclogo.png");
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+
+ if (this.updateCounter < 0.0001D)
+ {
+ drawTexturedModalRect(k + 0, b0 + 0, 0, 0, 99, 44);
+ drawTexturedModalRect(k + 99, b0 + 0, 129, 0, 27, 44);
+ drawTexturedModalRect(k + 99 + 26, b0 + 0, 126, 0, 3, 44);
+ drawTexturedModalRect(k + 99 + 26 + 3, b0 + 0, 99, 0, 26, 44);
+ drawTexturedModalRect(k + 155, b0 + 0, 0, 45, 155, 44);
+ } else
+ {
+ drawLogo(k, b0);
+ }
+
+ tessellator.setColorOpaque_I(16777215);
+ GL11.glPushMatrix();
+ GL11.glTranslatef(215.0F, 50.0F, 0.0F);
+ GL11.glRotatef(-20.0F, 0.0F, 0.0F, 1.0F);
+ float f1 = 1.4F - MathHelper.abs(MathHelper.sin((float) (Minecraft.getSystemTime() % 1000L) / 1000.0F * 3.141593F * 2.0F) * 0.1F);
+ f1 = f1 * 100.0F / (this.fontRenderer.getStringWidth(this.splashText) + 32);
+ GL11.glScalef(f1, f1, f1);
+ drawCenteredString(this.fontRenderer, this.splashText, 0, -8, 16776960);
+ GL11.glPopMatrix();
+ String s = "Minecraft 1.5.1";
+
+ if (this.mc.isDemo())
+ {
+ s = s + " Demo";
+ }
+
+ List brandings = Lists.reverse(FMLCommonHandler.instance().getBrandings());
+ for (int i = 0; i < brandings.size(); i++)
+ {
+ String brd = (String) brandings.get(i);
+ if (!Strings.isNullOrEmpty(brd))
+ {
+ drawString(this.fontRenderer, brd, this.width - 2 - this.fontRenderer.getStringWidth(brd), this.height - (10 + i * (this.fontRenderer.FONT_HEIGHT + 1)), 16777215);
+ }
+ }
+
+ String s1 = "Copyright Mojang AB. Do not distribute!";
+ drawString(this.fontRenderer, s1, 2, this.height - 10, 16777215);
+
+ if ((this.field_92025_p != null) && (this.field_92025_p.length() > 0))
+ {
+ drawRect(this.field_92022_t - 2, this.field_92021_u - 2, this.field_92020_v + 2, this.field_92019_w - 1, 1428160512);
+ drawString(this.fontRenderer, this.field_92025_p, this.field_92022_t, this.field_92021_u, 16777215);
+ drawString(this.fontRenderer, field_96138_a, (this.width - this.field_92024_r) / 2, ((GuiButton) this.buttonList.get(0)).yPosition - 12, 16777215);
+ }
+
+ super.drawScreen(par1, par2, par3);
+ }
+
+ protected void mouseClicked(int par1, int par2, int par3)
+ {
+ super.mouseClicked(par1, par2, par3);
+
+ if ((this.field_92025_p.length() > 0) && (par1 >= this.field_92022_t) && (par1 <= this.field_92020_v) && (par2 >= this.field_92021_u) && (par2 <= this.field_92019_w))
+ {
+ GuiConfirmOpenLink guiconfirmopenlink = new GuiConfirmOpenLink(this, "http://tinyurl.com/javappc", 13);
+ guiconfirmopenlink.func_92026_h();
+ this.mc.displayGuiScreen(guiconfirmopenlink);
+ }
+ }
+
+ static Minecraft func_98058_a(MenuBaseLeftMinecraft par0GuiMainMenu)
+ {
+ return par0GuiMainMenu.mc;
+ }
+
+ static void func_98061_a(MenuBaseLeftMinecraft par0GuiMainMenu, StringTranslate par1StringTranslate, int par2, int par3)
+ {
+ par0GuiMainMenu.func_98060_b(par1StringTranslate, par2, par3);
+ }
+
+ static boolean func_98059_a(boolean par0)
+ {
+ field_96139_s = par0;
+ return par0;
+ }
+
+ public int getListButtonX()
+ {
+ return this.width - 110;
+ }
+
+ public int getListButtonY()
+ {
+ Minecraft mc = Minecraft.getMinecraft();
+ ScaledResolution scaledresolution = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+
+ return 4;
+ }
+
+ public int getJukeboxButtonX()
+ {
+ return this.width - 24;
+ }
+
+ public int getJukeboxButtonY()
+ {
+ return 4;
+ }
+
+ public String getName()
+ {
+ return "Left Minecraft";
+ }
+
+ public String getVersion()
+ {
+ return "1.5.1";
+ }
+
+ public String getIconPath()
+ {
+ return "/net/aetherteam/mainmenu_api/icons/minecraft.png";
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.mainmenu_api.MenuBaseLeftMinecraft
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/mainmenu_api/MenuBaseLoader.java b/src/main/java/net/aetherteam/mainmenu_api/MenuBaseLoader.java
new file mode 100644
index 0000000..dd5d504
--- /dev/null
+++ b/src/main/java/net/aetherteam/mainmenu_api/MenuBaseLoader.java
@@ -0,0 +1,330 @@
+package net.aetherteam.mainmenu_api;
+
+import cpw.mods.fml.client.FMLClientHandler;
+
+import java.io.PrintStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.audio.SoundManager;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.renderer.Tessellator;
+import org.lwjgl.input.Keyboard;
+import org.lwjgl.input.Mouse;
+import org.lwjgl.opengl.GL11;
+import paulscode.sound.SoundSystem;
+
+public class MenuBaseLoader extends GuiScreen
+{
+ private int totalHeight;
+ private int backgroundTexture;
+ private int x2;
+ private int y2;
+ private int loaderWidth;
+ private int loaderHeight;
+ Minecraft f;
+ private MenuSlot selectedMenuSlot;
+ private List menuSlotList = new ArrayList();
+ HashMap menuSlotToString = new HashMap();
+ HashMap menuSlotFromString = new HashMap();
+ private GuiButton launchMenu;
+ private boolean slotsCreated = false;
+ private boolean pagesCreated = false;
+ private GuiButton leftPage;
+ private GuiButton rightPage;
+ private List menuPages = new ArrayList();
+ private int pageNumber = 0;
+
+ public MenuBaseLoader()
+ {
+ this.mc = FMLClientHandler.instance().getClient();
+ this.backgroundTexture = this.mc.renderEngine.getTexture("/net/aetherteam/mainmenu_api/gui/menulist.png");
+ this.loaderWidth = 256;
+ this.loaderHeight = 256;
+ updateScreen();
+ }
+
+ public void initGui()
+ {
+ MenuBaseConfig.ticks = 0;
+ MenuBaseConfig.endMusic = true;
+ muteMusic();
+
+ Keyboard.enableRepeatEvents(true);
+ updateScreen();
+ this.buttonList.clear();
+
+ this.launchMenu = new GuiButton(0, this.x2 - 35, this.y2 + 85 - 28, 72, 20, "Launch Menu");
+
+ this.launchMenu.enabled = false;
+
+ this.buttonList.add(this.launchMenu);
+
+ this.rightPage = new GuiButton(1, this.x2 + 44, this.y2 + 57, 20, 20, ">");
+ this.leftPage = new GuiButton(2, this.x2 - 62, this.y2 + 57, 20, 20, "<");
+
+ this.buttonList.add(this.rightPage);
+ this.buttonList.add(this.leftPage);
+
+ MenuBaseConfig.loadConfig();
+
+ MenuBase menu = null;
+
+ if ((MenuBaseConfig.selectedMenuName != null) && (!MenuBaseConfig.selectedMenuName.isEmpty()))
+ {
+ menu = MenuBaseSorter.createMenuBaseObject(MenuBaseConfig.selectedMenuName);
+ }
+
+ if (menu == null)
+ {
+ System.out.println("The Menu Base '" + MenuBaseConfig.selectedMenuName + "' failed to initialize! Reverting to Menu selection.");
+ } else
+ {
+ this.mc.displayGuiScreen(menu);
+ this.mc.displayGuiScreen(menu);
+ this.mc.displayGuiScreen(menu);
+ }
+ }
+
+ protected void keyTyped(char par1, int par2)
+ {
+ }
+
+ protected void mouseClicked(int par1, int par2, int par3)
+ {
+ if (par3 == 0)
+ {
+ for (int l = 0; l < this.menuSlotList.size(); l++)
+ {
+ MenuSlot menuSlot = (MenuSlot) this.menuSlotList.get(l);
+
+ if (menuSlot.mousePressed(this.mc, par1, par2))
+ {
+ menuSlot.selected = true;
+ this.launchMenu.enabled = true;
+ this.selectedMenuSlot = menuSlot;
+ this.mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
+ } else
+ {
+ menuSlot.selected = false;
+ }
+ }
+ }
+
+ super.mouseClicked(par1, par2, par3);
+ }
+
+ protected void mouseMovedOrUp(int par1, int par2, int par3)
+ {
+ super.mouseMovedOrUp(par1, par2, par3);
+ }
+
+ protected void actionPerformed(GuiButton button)
+ {
+ if ((button.id == 0) && (this.selectedMenuSlot != null))
+ {
+ String menuName = (String) this.menuSlotToString.get(this.selectedMenuSlot);
+
+ if (menuName != null)
+ {
+ MenuBaseConfig.setProperty("selectedMenu", menuName);
+ }
+
+ this.mc.displayGuiScreen(this.selectedMenuSlot.menu);
+ }
+
+ if (button.id == 1)
+ {
+ this.pageNumber += 1;
+ }
+
+ if (button.id == 2)
+ {
+ this.pageNumber -= 1;
+ }
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ public void drawScreen(int x, int y, float partialTick)
+ {
+ if (this.menuPages.size() == 1)
+ {
+ this.leftPage.enabled = false;
+ this.rightPage.enabled = false;
+ } else if (this.pageNumber == 0)
+ {
+ this.leftPage.enabled = false;
+ this.rightPage.enabled = true;
+ } else if (this.pageNumber == this.menuPages.size() - 1)
+ {
+ this.leftPage.enabled = true;
+ this.rightPage.enabled = false;
+ } else if (this.pageNumber > 0)
+ {
+ this.leftPage.enabled = true;
+ this.rightPage.enabled = true;
+ }
+
+ drawBackground(0);
+
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.7F);
+ GL11.glEnable(3042);
+ GL11.glBlendFunc(770, 771);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+ int dmsy = Mouse.getDWheel();
+
+ int centerX = this.x2 - 70;
+ int centerY = this.y2 - 84;
+
+ ScaledResolution sr = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ drawTexturedModalRect(centerX, centerY, 0, 0, 141, this.loaderHeight);
+ this.totalHeight = 0;
+ int slotW = 100;
+ int slotH = 20;
+ int gutter = 2;
+ GL11.glEnable(3089);
+ GL11.glScissor((centerX + 14) * sr.getScaleFactor(), (centerY + 35) * sr.getScaleFactor(), slotW * sr.getScaleFactor(), 103 * sr.getScaleFactor());
+ GL11.glPushMatrix();
+
+ this.totalHeight = (MenuBaseSorter.getSize() * (slotH + gutter));
+
+ if (this.totalHeight > 103) ;
+ this.totalHeight = 0;
+
+ if (!this.slotsCreated)
+ {
+ for (int i = 0; i < MenuBaseSorter.getSize(); i++)
+ {
+ HashMap map = MenuBaseSorter.getMenuHashMap();
+ List keys = new ArrayList(map.keySet());
+
+ MenuBase menu = MenuBaseSorter.createMenuBaseObject((String) keys.get(i));
+
+ System.out.println(menu);
+
+ if (menu != null)
+ {
+ this.totalHeight += slotH + gutter;
+
+ MenuSlot menuSlot = new MenuSlot(menu, this.menuSlotList.size(), centerX + 15, centerY + this.totalHeight + 30, slotW, slotH);
+
+ this.menuSlotList.add(menuSlot);
+ this.menuSlotToString.put(menuSlot, (String) keys.get(i));
+ this.menuSlotFromString.put((String) keys.get(i), menuSlot);
+
+ MenuSlot menuSlotButton = (MenuSlot) this.menuSlotList.get(i);
+
+ System.out.println(menuSlotButton.menu);
+ }
+
+ if (this.totalHeight > 83)
+ {
+ this.totalHeight = 0;
+ }
+ }
+
+ this.slotsCreated = true;
+ }
+
+ if (!this.pagesCreated)
+ {
+ int slotCount = 0;
+
+ while (slotCount < this.menuSlotList.size() - 2)
+ {
+ MenuPage page = new MenuPage();
+
+ for (int count = 0; count < page.getPageAmount(); count++)
+ {
+ page.addMenuSlot((MenuSlot) this.menuSlotList.get(slotCount));
+ slotCount++;
+ }
+
+ this.menuPages.add(page);
+ }
+
+ this.pagesCreated = true;
+ }
+
+ for (int pageCount = 0; pageCount < this.menuPages.size(); pageCount++)
+ {
+ MenuPage currentPage = (MenuPage) this.menuPages.get(this.pageNumber);
+
+ for (int count = 0; count < currentPage.getPageAmount(); count++)
+ {
+ MenuSlot menuSlotButton = currentPage.getMenuSlot(count);
+ menuSlotButton.drawMenuSlot(this.mc, centerX + 15, centerY + this.totalHeight + 30);
+
+ this.totalHeight += slotH + gutter;
+
+ if (this.totalHeight > 83)
+ {
+ this.totalHeight = 0;
+ }
+ }
+
+ }
+
+ GL11.glPopMatrix();
+ GL11.glDisable(3089);
+
+ this.mc.renderEngine.resetBoundTexture();
+
+ String name = "Pages: " + (this.pageNumber + 1) + "/" + this.menuPages.size();
+
+ this.fontRenderer.drawStringWithShadow(name, centerX + 69 - this.fontRenderer.getStringWidth(name) / 2, centerY + 11, 16777215);
+
+ super.drawScreen(x, y, partialTick);
+ }
+
+ public void updateScreen()
+ {
+ super.updateScreen();
+
+ ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+ this.x2 = (width / 2);
+ this.y2 = (height / 2);
+ }
+
+ public void drawBackground(int i)
+ {
+ super.drawBackground(i);
+
+ GL11.glDisable(2896);
+ GL11.glDisable(2912);
+ Tessellator tessellator = Tessellator.instance;
+
+ this.mc.renderEngine.bindTexture("/net/aetherteam/mainmenu_api/icons/dirt.png");
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ float f = 32.0F;
+ tessellator.startDrawingQuads();
+ tessellator.setColorOpaque_I(10066329);
+ tessellator.addVertexWithUV(0.0D, this.height, 0.0D, 0.0D, this.height / f + i);
+ tessellator.addVertexWithUV(this.width, this.height, 0.0D, this.width / f, this.height / f + i);
+ tessellator.addVertexWithUV(this.width, 0.0D, 0.0D, this.width / f, 0 + i);
+ tessellator.addVertexWithUV(0.0D, 0.0D, 0.0D, 0.0D, 0 + i);
+ tessellator.draw();
+ }
+
+ private void muteMusic()
+ {
+ SoundManager.sndSystem.stop("streaming");
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.mainmenu_api.MenuBaseLoader
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/mainmenu_api/MenuBaseLoaderWithSlider.java b/src/main/java/net/aetherteam/mainmenu_api/MenuBaseLoaderWithSlider.java
new file mode 100644
index 0000000..171eeb3
--- /dev/null
+++ b/src/main/java/net/aetherteam/mainmenu_api/MenuBaseLoaderWithSlider.java
@@ -0,0 +1,293 @@
+package net.aetherteam.mainmenu_api;
+
+import cpw.mods.fml.client.FMLClientHandler;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.io.PrintStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.audio.SoundManager;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.GuiTextField;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.renderer.Tessellator;
+import org.lwjgl.input.Keyboard;
+import org.lwjgl.input.Mouse;
+import org.lwjgl.opengl.GL11;
+import paulscode.sound.SoundSystem;
+
+@SideOnly(Side.CLIENT)
+public class MenuBaseLoaderWithSlider extends GuiScreen
+{
+ private int totalHeight;
+ private GuiTextField descriptionField;
+ private GuiTextField dialogueInput;
+ private GuiYSlider sbar;
+ private float sbarVal = 0.0F;
+ private String description = "Choose A Main Menu";
+ private int backgroundTexture;
+ private int loaderX;
+ private int loaderY;
+ private int loaderW;
+ private int loaderH;
+ Minecraft f;
+ private MenuSlot selectedMenuSlot;
+ private List menuSlotList = new ArrayList();
+ HashMap menuSlotToString = new HashMap();
+ HashMap menuSlotFromString = new HashMap();
+ private GuiButton launchMenu;
+ private boolean slotsCreated = false;
+
+ public SoundManager soundManager = MainMenuAPI.proxy.getClient().sndManager;
+
+ public MenuBaseLoaderWithSlider()
+ {
+ this.mc = FMLClientHandler.instance().getClient();
+ this.backgroundTexture = this.mc.renderEngine.getTexture("/net/aetherteam/mainmenu_api/gui/menulist.png");
+ this.loaderW = 256;
+ this.loaderH = 256;
+ updateScreen();
+ }
+
+ public void initGui()
+ {
+ MenuBaseConfig.jukebox.process();
+ muteMusic();
+
+ Keyboard.enableRepeatEvents(true);
+ updateScreen();
+ this.buttonList.clear();
+ if (this.sbar != null) this.sbarVal = this.sbar.sliderValue;
+ this.sbar = new GuiYSlider(-1, this.loaderX + 46, this.loaderY - 54, 10, 103);
+ this.sbar.sliderValue = this.sbarVal;
+
+ this.launchMenu = new GuiButton(0, this.loaderX - 36, this.loaderY + 85 - 28, 72, 20, "Launch Menu");
+
+ this.launchMenu.enabled = false;
+
+ this.buttonList.add(this.launchMenu);
+ this.descriptionField = new GuiTextField(this.fontRenderer, this.loaderX - 49, this.loaderY - 73, 112, 16);
+ this.descriptionField.setFocused(false);
+ this.descriptionField.setMaxStringLength(24);
+ this.descriptionField.setText(this.description);
+ this.descriptionField.setEnableBackgroundDrawing(false);
+
+ MenuBaseConfig.loadConfig();
+
+ MenuBaseConfig.ticks = 0;
+ MenuBaseConfig.endMusic = true;
+
+ MenuBase menu = null;
+
+ if ((MenuBaseConfig.selectedMenuName != null) && (!MenuBaseConfig.selectedMenuName.isEmpty()))
+ {
+ menu = MenuBaseSorter.createMenuBaseObject(MenuBaseConfig.selectedMenuName);
+ }
+
+ if (menu == null)
+ {
+ System.out.println("The Menu Base '" + MenuBaseConfig.selectedMenuName + "' failed to initialize! Reverting to Menu selection.");
+ } else
+ {
+ this.mc.displayGuiScreen(menu);
+ this.mc.displayGuiScreen(menu);
+ this.mc.displayGuiScreen(menu);
+ }
+ }
+
+ protected void keyTyped(char par1, int par2)
+ {
+ }
+
+ protected void mouseClicked(int par1, int par2, int par3)
+ {
+ if (par3 == 0)
+ {
+ if (this.totalHeight > 103)
+ {
+ this.sbar.mousePressed(this.mc, par1, par2);
+ }
+ for (int l = 0; l < this.menuSlotList.size(); l++)
+ {
+ int y = (int) (par2 + this.sbar.sliderValue * (this.totalHeight - 103));
+
+ MenuSlot menuSlot = (MenuSlot) this.menuSlotList.get(l);
+
+ if ((menuSlot.mousePressed(this.mc, par1, y)) && (par2 < this.loaderY + 50))
+ {
+ menuSlot.selected = true;
+ this.launchMenu.enabled = true;
+ this.selectedMenuSlot = menuSlot;
+ this.mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
+ } else
+ {
+ menuSlot.selected = false;
+ }
+ }
+ }
+
+ super.mouseClicked(par1, par2, par3);
+ }
+
+ protected void mouseMovedOrUp(int par1, int par2, int par3)
+ {
+ if ((par3 == 0) && (this.totalHeight > 103)) this.sbar.mouseReleased(par1, par2);
+ super.mouseMovedOrUp(par1, par2, par3);
+ }
+
+ protected void actionPerformed(GuiButton button)
+ {
+ if ((button.id == 0) && (this.selectedMenuSlot != null))
+ {
+ String menuName = (String) this.menuSlotToString.get(this.selectedMenuSlot);
+
+ if (menuName != null)
+ {
+ MenuBaseConfig.setProperty("selectedMenu", menuName);
+ }
+
+ this.mc.displayGuiScreen(this.selectedMenuSlot.menu);
+ }
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ public void drawScreen(int x, int y, float partialTick)
+ {
+ drawBackground(0);
+
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.7F);
+ GL11.glEnable(3042);
+ GL11.glBlendFunc(770, 771);
+ GL11.glBindTexture(3553, this.backgroundTexture);
+ int dmsy = Mouse.getDWheel();
+ this.sbar.sliderValue -= (this.totalHeight > 103 ? dmsy : 0) / 1000.0F;
+ if (this.sbar.sliderValue > 1.0F) this.sbar.sliderValue = 1.0F;
+ if (this.sbar.sliderValue < 0.0F) this.sbar.sliderValue = 0.0F;
+ int centerX = this.loaderX - 70;
+ int centerY = this.loaderY - 84;
+
+ ScaledResolution sr = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ drawTexturedModalRect(centerX, centerY, 0, 0, 141, this.loaderH);
+ this.totalHeight = 0;
+ int slotW = 100;
+ int slotH = 20;
+ int gutter = 2;
+ GL11.glEnable(3089);
+ GL11.glScissor((centerX + 14) * sr.getScaleFactor(), (centerY + 35) * sr.getScaleFactor(), slotW * sr.getScaleFactor(), 103 * sr.getScaleFactor());
+ GL11.glPushMatrix();
+
+ this.totalHeight = (MenuBaseSorter.getSize() * (slotH + gutter));
+ float sVal = -this.sbar.sliderValue * (this.totalHeight - 105);
+
+ if (this.totalHeight > 103)
+ {
+ GL11.glTranslatef(0.0F, sVal, 0.0F);
+ }
+
+ this.totalHeight = 0;
+
+ if (!this.slotsCreated)
+ {
+ for (int i = 0; i < MenuBaseSorter.getSize(); i++)
+ {
+ HashMap map = MenuBaseSorter.getMenuHashMap();
+ List keys = new ArrayList(map.keySet());
+
+ MenuBase menu = MenuBaseSorter.createMenuBaseObject((String) keys.get(i));
+
+ if (menu != null)
+ {
+ MenuSlot menuSlot = new MenuSlot(menu, this.menuSlotList.size(), centerX + 15, centerY + this.totalHeight + 30, slotW, slotH);
+
+ this.menuSlotList.add(menuSlot);
+ this.menuSlotToString.put(menuSlot, (String) keys.get(i));
+ this.menuSlotFromString.put((String) keys.get(i), menuSlot);
+
+ MenuSlot menuSlotButton = (MenuSlot) this.menuSlotList.get(i);
+
+ this.totalHeight += slotH + gutter;
+
+ System.out.println(menuSlotButton.menu);
+ }
+ }
+
+ this.slotsCreated = true;
+ }
+
+ for (int i = 0; i < MenuBaseSorter.getSize(); i++)
+ {
+ MenuSlot menuSlotButton = (MenuSlot) this.menuSlotList.get(i);
+ menuSlotButton.drawMenuSlot(this.mc, centerX + 15, centerY + this.totalHeight + 30);
+
+ this.totalHeight += slotH + gutter;
+ }
+
+ GL11.glPopMatrix();
+ GL11.glDisable(3089);
+
+ this.descriptionField.drawTextBox();
+
+ if (this.totalHeight > 103)
+ {
+ this.sbar.drawButton(this.mc, x, y);
+ }
+
+ super.drawScreen(x, y, partialTick);
+ }
+
+ public void updateScreen()
+ {
+ super.updateScreen();
+ if (this.descriptionField != null)
+ {
+ this.descriptionField.updateCursorCounter();
+ }
+
+ ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+ this.loaderX = (width / 2);
+ this.loaderY = (height / 2);
+ }
+
+ public void drawBackground(int i)
+ {
+ GL11.glDisable(2896);
+ GL11.glDisable(2912);
+ Tessellator tessellator = Tessellator.instance;
+
+ this.mc.renderEngine.bindTexture("/net/aetherteam/mainmenu_api/icons/dirt.png");
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ float f = 32.0F;
+ tessellator.startDrawingQuads();
+ tessellator.setColorOpaque_I(10066329);
+ tessellator.addVertexWithUV(0.0D, this.height, 0.0D, 0.0D, this.height / f + i);
+ tessellator.addVertexWithUV(this.width, this.height, 0.0D, this.width / f, this.height / f + i);
+ tessellator.addVertexWithUV(this.width, 0.0D, 0.0D, this.width / f, 0 + i);
+ tessellator.addVertexWithUV(0.0D, 0.0D, 0.0D, 0.0D, 0 + i);
+ tessellator.draw();
+ }
+
+ private void muteMusic()
+ {
+ if ((this.soundManager != null) && (SoundManager.sndSystem != null))
+ {
+ SoundManager.sndSystem.stop("streaming");
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.mainmenu_api.MenuBaseLoaderWithSlider
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/mainmenu_api/MenuBaseMinecraft.java b/src/main/java/net/aetherteam/mainmenu_api/MenuBaseMinecraft.java
new file mode 100644
index 0000000..3f992b8
--- /dev/null
+++ b/src/main/java/net/aetherteam/mainmenu_api/MenuBaseMinecraft.java
@@ -0,0 +1,613 @@
+package net.aetherteam.mainmenu_api;
+
+import com.google.common.base.Strings;
+import com.google.common.collect.Lists;
+import cpw.mods.fml.client.GuiModList;
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import java.awt.image.BufferedImage;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.lang.reflect.Method;
+import java.net.URI;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+import java.util.Random;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.Gui;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiButtonLanguage;
+import net.minecraft.client.gui.GuiConfirmOpenLink;
+import net.minecraft.client.gui.GuiLanguage;
+import net.minecraft.client.gui.GuiMultiplayer;
+import net.minecraft.client.gui.GuiOptions;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.GuiScreenOnlineServers;
+import net.minecraft.client.gui.GuiSelectWorld;
+import net.minecraft.client.gui.GuiYesNo;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.renderer.RenderEngine;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.StringTranslate;
+import net.minecraft.world.demo.DemoWorldServer;
+import net.minecraft.world.storage.ISaveFormat;
+import net.minecraft.world.storage.WorldInfo;
+import org.lwjgl.opengl.GL11;
+import org.lwjgl.util.glu.GLU;
+
+@SideOnly(Side.CLIENT)
+public class MenuBaseMinecraft extends MenuBase
+{
+ private static final Random rand = new Random();
+
+ private float updateCounter = 0.0F;
+
+ private String splashText = "missingno";
+ private GuiButton buttonResetDemo;
+ private int panoramaTimer = 0;
+ private int viewportTexture;
+ private boolean field_96141_q = true;
+ private static boolean field_96140_r = false;
+ private static boolean field_96139_s = false;
+ private String field_92025_p;
+ private static final String[] titlePanoramaPaths = {"/title/bg/panorama0.png", "/title/bg/panorama1.png", "/title/bg/panorama2.png", "/title/bg/panorama3.png", "/title/bg/panorama4.png", "/title/bg/panorama5.png"};
+ public static final String field_96138_a = "Please click " + EnumChatFormatting.UNDERLINE + "here" + EnumChatFormatting.RESET + " for more information.";
+ private int field_92024_r;
+ private int field_92023_s;
+ private int field_92022_t;
+ private int field_92021_u;
+ private int field_92020_v;
+ private int field_92019_w;
+ private GuiButton fmlModButton = null;
+
+ public MenuBaseMinecraft()
+ {
+ BufferedReader bufferedreader = null;
+ try
+ {
+ ArrayList arraylist = new ArrayList();
+ bufferedreader = new BufferedReader(new InputStreamReader(MenuBaseMinecraft.class.getResourceAsStream("/title/splashes.txt"), Charset.forName("UTF-8")));
+ String s;
+ while ((s = bufferedreader.readLine()) != null)
+ {
+ s = s.trim();
+
+ if (s.length() > 0)
+ {
+ arraylist.add(s);
+ }
+ }
+
+ do
+ {
+ this.splashText = ((String) arraylist.get(rand.nextInt(arraylist.size())));
+ } while (this.splashText.hashCode() == 125780783);
+ } catch (IOException ioexception)
+ {
+ } finally
+ {
+ if (bufferedreader != null)
+ {
+ try
+ {
+ bufferedreader.close();
+ } catch (IOException ioexception1)
+ {
+ }
+ }
+
+ }
+
+ this.updateCounter = rand.nextFloat();
+ }
+
+ public void updateScreen()
+ {
+ this.panoramaTimer += 1;
+ }
+
+ public boolean doesGuiPauseGame()
+ {
+ return false;
+ }
+
+ protected void keyTyped(char par1, int par2)
+ {
+ }
+
+ public void initGui()
+ {
+ super.initGui();
+
+ this.viewportTexture = this.mc.renderEngine.allocateAndSetupTexture(new BufferedImage(256, 256, 2));
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTime(new Date());
+
+ if ((calendar.get(2) + 1 == 11) && (calendar.get(5) == 9))
+ {
+ this.splashText = "Happy birthday, ez!";
+ } else if ((calendar.get(2) + 1 == 6) && (calendar.get(5) == 1))
+ {
+ this.splashText = "Happy birthday, Notch!";
+ } else if ((calendar.get(2) + 1 == 12) && (calendar.get(5) == 24))
+ {
+ this.splashText = "Merry X-mas!";
+ } else if ((calendar.get(2) + 1 == 1) && (calendar.get(5) == 1))
+ {
+ this.splashText = "Happy new year!";
+ } else if ((calendar.get(2) + 1 == 10) && (calendar.get(5) == 31))
+ {
+ this.splashText = "OOoooOOOoooo! Spooky!";
+ }
+
+ StringTranslate stringtranslate = StringTranslate.getInstance();
+ int i = this.height / 4 + 48;
+
+ if (this.mc.isDemo())
+ {
+ addDemoButtons(i, 24, stringtranslate);
+ } else
+ {
+ addSingleplayerMultiplayerButtons(i, 24, stringtranslate);
+ }
+
+ this.fmlModButton = new GuiButton(6, this.width / 2 - 100, i + 48, "Mods");
+ this.buttonList.add(this.fmlModButton);
+
+ func_96137_a(stringtranslate, i, 24);
+
+ if (this.mc.hideQuitButton)
+ {
+ this.buttonList.add(new GuiButton(0, this.width / 2 - 100, i + 72, stringtranslate.translateKey("menu.options")));
+ } else
+ {
+ this.buttonList.add(new GuiButton(0, this.width / 2 - 100, i + 72 + 12, 98, 20, stringtranslate.translateKey("menu.options")));
+ this.buttonList.add(new GuiButton(4, this.width / 2 + 2, i + 72 + 12, 98, 20, stringtranslate.translateKey("menu.quit")));
+ }
+
+ this.buttonList.add(new GuiButtonLanguage(5, this.width - 48, 4));
+ this.field_92025_p = "";
+ String s = System.getProperty("os_architecture");
+ String s1 = System.getProperty("java_version");
+
+ if ("ppc".equalsIgnoreCase(s))
+ {
+ this.field_92025_p = ("" + EnumChatFormatting.BOLD + "Notice!" + EnumChatFormatting.RESET + " PowerPC compatibility will be dropped in Minecraft 1.6");
+ } else if ((s1 != null) && (s1.startsWith("1.5")))
+ {
+ this.field_92025_p = ("" + EnumChatFormatting.BOLD + "Notice!" + EnumChatFormatting.RESET + " Java 1.5 compatibility will be dropped in Minecraft 1.6");
+ }
+
+ this.field_92023_s = this.fontRenderer.getStringWidth(this.field_92025_p);
+ this.field_92024_r = this.fontRenderer.getStringWidth(field_96138_a);
+ int j = Math.max(this.field_92023_s, this.field_92024_r);
+ this.field_92022_t = ((this.width - j) / 2);
+ this.field_92021_u = (((GuiButton) this.buttonList.get(0)).yPosition - 24);
+ this.field_92020_v = (this.field_92022_t + j);
+ this.field_92019_w = (this.field_92021_u + 24);
+ }
+
+ private void func_96137_a(StringTranslate par1StringTranslate, int par2, int par3)
+ {
+ if (this.field_96141_q)
+ {
+ if (!field_96140_r)
+ {
+ field_96140_r = true;
+ } else if (field_96139_s)
+ {
+ func_98060_b(par1StringTranslate, par2, par3);
+ }
+ }
+ }
+
+ private void func_98060_b(StringTranslate par1StringTranslate, int par2, int par3)
+ {
+ this.fmlModButton.xPosition = (this.width / 2 + 2);
+
+ GuiButton realmButton = new GuiButton(3, this.width / 2 - 100, par2 + par3 * 2, par1StringTranslate.translateKey("menu.online"));
+
+ realmButton.xPosition = (this.width / 2 - 100);
+ this.buttonList.add(realmButton);
+ }
+
+ private void addSingleplayerMultiplayerButtons(int par1, int par2, StringTranslate par3StringTranslate)
+ {
+ this.buttonList.add(new GuiButton(1, this.width / 2 - 100, par1, par3StringTranslate.translateKey("menu.singleplayer")));
+ this.buttonList.add(new GuiButton(2, this.width / 2 - 100, par1 + par2 * 1, par3StringTranslate.translateKey("menu.multiplayer")));
+ }
+
+ private void addDemoButtons(int par1, int par2, StringTranslate par3StringTranslate)
+ {
+ this.buttonList.add(new GuiButton(11, this.width / 2 - 100, par1, par3StringTranslate.translateKey("menu.playdemo")));
+ this.buttonList.add(this.buttonResetDemo = new GuiButton(12, this.width / 2 - 100, par1 + par2 * 1, par3StringTranslate.translateKey("menu.resetdemo")));
+ ISaveFormat isaveformat = this.mc.getSaveLoader();
+ WorldInfo worldinfo = isaveformat.getWorldInfo("Demo_World");
+
+ if (worldinfo == null)
+ {
+ this.buttonResetDemo.enabled = false;
+ }
+ }
+
+ protected void actionPerformed(GuiButton par1GuiButton)
+ {
+ if (par1GuiButton.id == 0)
+ {
+ this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
+ }
+
+ if (par1GuiButton.id == 5)
+ {
+ this.mc.displayGuiScreen(new GuiLanguage(this, this.mc.gameSettings));
+ }
+
+ if (par1GuiButton.id == 1)
+ {
+ this.mc.displayGuiScreen(new GuiSelectWorld(this));
+ }
+
+ if (par1GuiButton.id == 2)
+ {
+ this.mc.displayGuiScreen(new GuiMultiplayer(this));
+ }
+
+ if (par1GuiButton.id == 3)
+ {
+ this.mc.displayGuiScreen(new GuiScreenOnlineServers(this));
+ }
+
+ if (par1GuiButton.id == 4)
+ {
+ this.mc.shutdown();
+ }
+
+ if (par1GuiButton.id == 6)
+ {
+ this.mc.displayGuiScreen(new GuiModList(this));
+ }
+
+ if (par1GuiButton.id == 11)
+ {
+ this.mc.launchIntegratedServer("Demo_World", "Demo_World", DemoWorldServer.demoWorldSettings);
+ }
+
+ if (par1GuiButton.id == 12)
+ {
+ ISaveFormat isaveformat = this.mc.getSaveLoader();
+ WorldInfo worldinfo = isaveformat.getWorldInfo("Demo_World");
+
+ if (worldinfo != null)
+ {
+ GuiYesNo guiyesno = GuiSelectWorld.getDeleteWorldScreen(this, worldinfo.getWorldName(), 12);
+ this.mc.displayGuiScreen(guiyesno);
+ }
+ }
+ }
+
+ public void confirmClicked(boolean par1, int par2)
+ {
+ if ((par1) && (par2 == 12))
+ {
+ ISaveFormat isaveformat = this.mc.getSaveLoader();
+ isaveformat.flushCache();
+ isaveformat.deleteWorldDirectory("Demo_World");
+ this.mc.displayGuiScreen(this);
+ } else if (par2 == 13)
+ {
+ if (par1)
+ {
+ try
+ {
+ Class oclass = Class.forName("java.awt.Desktop");
+ Object object = oclass.getMethod("getDesktop", new Class[0]).invoke((Object) null, new Object[0]);
+ oclass.getMethod("browse", new Class[]{URI.class}).invoke(object, new Object[]{new URI("http://tinyurl.com/javappc")});
+ } catch (Throwable throwable)
+ {
+ throwable.printStackTrace();
+ }
+ }
+
+ this.mc.displayGuiScreen(this);
+ }
+ }
+
+ private void drawPanorama(int par1, int par2, float par3)
+ {
+ Tessellator tessellator = Tessellator.instance;
+ GL11.glMatrixMode(5889);
+ GL11.glPushMatrix();
+ GL11.glLoadIdentity();
+ GLU.gluPerspective(120.0F, 1.0F, 0.05F, 10.0F);
+ GL11.glMatrixMode(5888);
+ GL11.glPushMatrix();
+ GL11.glLoadIdentity();
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glEnable(3042);
+ GL11.glDisable(3008);
+ GL11.glDisable(2884);
+ GL11.glDepthMask(false);
+ GL11.glBlendFunc(770, 771);
+ byte b0 = 8;
+
+ for (int k = 0; k < b0 * b0; k++)
+ {
+ GL11.glPushMatrix();
+ float f1 = (k % b0 / b0 - 0.5F) / 64.0F;
+ float f2 = (k / b0 / b0 - 0.5F) / 64.0F;
+ float f3 = 0.0F;
+ GL11.glTranslatef(f1, f2, f3);
+ GL11.glRotatef(MathHelper.sin((this.panoramaTimer + par3) / 400.0F) * 25.0F + 20.0F, 1.0F, 0.0F, 0.0F);
+ GL11.glRotatef(-(this.panoramaTimer + par3) * 0.1F, 0.0F, 1.0F, 0.0F);
+
+ for (int l = 0; l < 6; l++)
+ {
+ GL11.glPushMatrix();
+
+ if (l == 1)
+ {
+ GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
+ }
+
+ if (l == 2)
+ {
+ GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
+ }
+
+ if (l == 3)
+ {
+ GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
+ }
+
+ if (l == 4)
+ {
+ GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
+ }
+
+ if (l == 5)
+ {
+ GL11.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F);
+ }
+
+ this.mc.renderEngine.bindTexture(titlePanoramaPaths[l]);
+ tessellator.startDrawingQuads();
+ tessellator.setColorRGBA_I(16777215, 255 / (k + 1));
+ float f4 = 0.0F;
+ tessellator.addVertexWithUV(-1.0D, -1.0D, 1.0D, 0.0F + f4, 0.0F + f4);
+ tessellator.addVertexWithUV(1.0D, -1.0D, 1.0D, 1.0F - f4, 0.0F + f4);
+ tessellator.addVertexWithUV(1.0D, 1.0D, 1.0D, 1.0F - f4, 1.0F - f4);
+ tessellator.addVertexWithUV(-1.0D, 1.0D, 1.0D, 0.0F + f4, 1.0F - f4);
+ tessellator.draw();
+ GL11.glPopMatrix();
+ }
+
+ GL11.glPopMatrix();
+ GL11.glColorMask(true, true, true, false);
+ }
+
+ tessellator.setTranslation(0.0D, 0.0D, 0.0D);
+ GL11.glColorMask(true, true, true, true);
+ GL11.glMatrixMode(5889);
+ GL11.glPopMatrix();
+ GL11.glMatrixMode(5888);
+ GL11.glPopMatrix();
+ GL11.glDepthMask(true);
+ GL11.glEnable(2884);
+ GL11.glEnable(3008);
+ GL11.glEnable(2929);
+ }
+
+ private void rotateAndBlurSkybox(float par1)
+ {
+ GL11.glBindTexture(3553, this.viewportTexture);
+ this.mc.renderEngine.resetBoundTexture();
+ GL11.glCopyTexSubImage2D(3553, 0, 0, 0, 0, 0, 256, 256);
+ GL11.glEnable(3042);
+ GL11.glBlendFunc(770, 771);
+ GL11.glColorMask(true, true, true, false);
+ Tessellator tessellator = Tessellator.instance;
+ tessellator.startDrawingQuads();
+ byte b0 = 3;
+
+ for (int i = 0; i < b0; i++)
+ {
+ tessellator.setColorRGBA_F(1.0F, 1.0F, 1.0F, 1.0F / (i + 1));
+ int j = this.width;
+ int k = this.height;
+ float f1 = (i - b0 / 2) / 256.0F;
+ tessellator.addVertexWithUV(j, k, this.zLevel, 0.0F + f1, 0.0D);
+ tessellator.addVertexWithUV(j, 0.0D, this.zLevel, 1.0F + f1, 0.0D);
+ tessellator.addVertexWithUV(0.0D, 0.0D, this.zLevel, 1.0F + f1, 1.0D);
+ tessellator.addVertexWithUV(0.0D, k, this.zLevel, 0.0F + f1, 1.0D);
+ }
+
+ tessellator.draw();
+ GL11.glColorMask(true, true, true, true);
+ this.mc.renderEngine.resetBoundTexture();
+ }
+
+ private void renderSkybox(int par1, int par2, float par3)
+ {
+ GL11.glViewport(0, 0, 256, 256);
+ drawPanorama(par1, par2, par3);
+ GL11.glDisable(3553);
+ GL11.glEnable(3553);
+ rotateAndBlurSkybox(par3);
+ rotateAndBlurSkybox(par3);
+ rotateAndBlurSkybox(par3);
+ rotateAndBlurSkybox(par3);
+ rotateAndBlurSkybox(par3);
+ rotateAndBlurSkybox(par3);
+ rotateAndBlurSkybox(par3);
+ rotateAndBlurSkybox(par3);
+ GL11.glViewport(0, 0, this.mc.displayWidth, this.mc.displayHeight);
+ Tessellator tessellator = Tessellator.instance;
+ tessellator.startDrawingQuads();
+ float f1 = this.width > this.height ? 120.0F / this.width : 120.0F / this.height;
+ float f2 = this.height * f1 / 256.0F;
+ float f3 = this.width * f1 / 256.0F;
+ GL11.glTexParameteri(3553, 10241, 9729);
+ GL11.glTexParameteri(3553, 10240, 9729);
+ tessellator.setColorRGBA_F(1.0F, 1.0F, 1.0F, 1.0F);
+ int k = this.width;
+ int l = this.height;
+ tessellator.addVertexWithUV(0.0D, l, this.zLevel, 0.5F - f2, 0.5F + f3);
+ tessellator.addVertexWithUV(k, l, this.zLevel, 0.5F - f2, 0.5F - f3);
+ tessellator.addVertexWithUV(k, 0.0D, this.zLevel, 0.5F + f2, 0.5F - f3);
+ tessellator.addVertexWithUV(0.0D, 0.0D, this.zLevel, 0.5F + f2, 0.5F + f3);
+ tessellator.draw();
+ }
+
+ public void drawScreen(int par1, int par2, float par3)
+ {
+ renderSkybox(par1, par2, par3);
+ Tessellator tessellator = Tessellator.instance;
+ short short1 = 274;
+ int k = this.width / 2 - short1 / 2;
+ byte b0 = 30;
+ drawGradientRect(0, 0, this.width, this.height, -2130706433, 16777215);
+ drawGradientRect(0, 0, this.width, this.height, 0, -2147483648);
+ this.mc.renderEngine.bindTexture("/title/mclogo.png");
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+
+ if (this.updateCounter < 0.0001D)
+ {
+ drawTexturedModalRect(k + 0, b0 + 0, 0, 0, 99, 44);
+ drawTexturedModalRect(k + 99, b0 + 0, 129, 0, 27, 44);
+ drawTexturedModalRect(k + 99 + 26, b0 + 0, 126, 0, 3, 44);
+ drawTexturedModalRect(k + 99 + 26 + 3, b0 + 0, 99, 0, 26, 44);
+ drawTexturedModalRect(k + 155, b0 + 0, 0, 45, 155, 44);
+ } else
+ {
+ drawTexturedModalRect(k + 0, b0 + 0, 0, 0, 155, 44);
+ drawTexturedModalRect(k + 155, b0 + 0, 0, 45, 155, 44);
+ }
+
+ tessellator.setColorOpaque_I(16777215);
+ GL11.glPushMatrix();
+ GL11.glTranslatef(this.width / 2 + 90, 70.0F, 0.0F);
+ GL11.glRotatef(-20.0F, 0.0F, 0.0F, 1.0F);
+ float f1 = 1.8F - MathHelper.abs(MathHelper.sin((float) (Minecraft.getSystemTime() % 1000L) / 1000.0F * 3.141593F * 2.0F) * 0.1F);
+ f1 = f1 * 100.0F / (this.fontRenderer.getStringWidth(this.splashText) + 32);
+ GL11.glScalef(f1, f1, f1);
+ drawCenteredString(this.fontRenderer, this.splashText, 0, -8, 16776960);
+ GL11.glPopMatrix();
+ String s = "Minecraft 1.5.1";
+
+ if (this.mc.isDemo())
+ {
+ s = s + " Demo";
+ }
+
+ List brandings = Lists.reverse(FMLCommonHandler.instance().getBrandings());
+ for (int i = 0; i < brandings.size(); i++)
+ {
+ String brd = (String) brandings.get(i);
+ if (!Strings.isNullOrEmpty(brd))
+ {
+ drawString(this.fontRenderer, brd, 2, this.height - (10 + i * (this.fontRenderer.FONT_HEIGHT + 1)), 16777215);
+ }
+ }
+
+ String s1 = "Copyright Mojang AB. Do not distribute!";
+ drawString(this.fontRenderer, s1, this.width - this.fontRenderer.getStringWidth(s1) - 2, this.height - 10, 16777215);
+
+ if ((this.field_92025_p != null) && (this.field_92025_p.length() > 0))
+ {
+ drawRect(this.field_92022_t - 2, this.field_92021_u - 2, this.field_92020_v + 2, this.field_92019_w - 1, 1428160512);
+ drawString(this.fontRenderer, this.field_92025_p, this.field_92022_t, this.field_92021_u, 16777215);
+ drawString(this.fontRenderer, field_96138_a, (this.width - this.field_92024_r) / 2, ((GuiButton) this.buttonList.get(0)).yPosition - 12, 16777215);
+ }
+
+ super.drawScreen(par1, par2, par3);
+ }
+
+ protected void mouseClicked(int par1, int par2, int par3)
+ {
+ super.mouseClicked(par1, par2, par3);
+
+ if ((this.field_92025_p.length() > 0) && (par1 >= this.field_92022_t) && (par1 <= this.field_92020_v) && (par2 >= this.field_92021_u) && (par2 <= this.field_92019_w))
+ {
+ GuiConfirmOpenLink guiconfirmopenlink = new GuiConfirmOpenLink(this, "http://tinyurl.com/javappc", 13);
+ guiconfirmopenlink.func_92026_h();
+ this.mc.displayGuiScreen(guiconfirmopenlink);
+ }
+ }
+
+ static Minecraft func_98058_a(MenuBaseMinecraft field_98132_d)
+ {
+ return field_98132_d.mc;
+ }
+
+ static void func_98061_a(MenuBaseMinecraft par0GuiMainMenu, StringTranslate par1StringTranslate, int par2, int par3)
+ {
+ par0GuiMainMenu.func_98060_b(par1StringTranslate, par2, par3);
+ }
+
+ static boolean func_98059_a(boolean par0)
+ {
+ field_96139_s = par0;
+ return par0;
+ }
+
+ public int getListButtonX()
+ {
+ Minecraft mc = Minecraft.getMinecraft();
+ ScaledResolution scaledresolution = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+
+ return 5;
+ }
+
+ public int getListButtonY()
+ {
+ Minecraft mc = Minecraft.getMinecraft();
+ ScaledResolution scaledresolution = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
+ int width = scaledresolution.getScaledWidth();
+ int height = scaledresolution.getScaledHeight();
+
+ return 4;
+ }
+
+ public int getJukeboxButtonX()
+ {
+ return this.width - 24;
+ }
+
+ public int getJukeboxButtonY()
+ {
+ return 4;
+ }
+
+ public String getName()
+ {
+ return "Minecraft";
+ }
+
+ public String getVersion()
+ {
+ return "1.5.1";
+ }
+
+ public String getIconPath()
+ {
+ return "/net/aetherteam/mainmenu_api/icons/minecraft.png";
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.mainmenu_api.MenuBaseMinecraft
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/mainmenu_api/MenuBaseSorter.java b/src/main/java/net/aetherteam/mainmenu_api/MenuBaseSorter.java
new file mode 100644
index 0000000..aebe773
--- /dev/null
+++ b/src/main/java/net/aetherteam/mainmenu_api/MenuBaseSorter.java
@@ -0,0 +1,104 @@
+package net.aetherteam.mainmenu_api;
+
+import java.io.PrintStream;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.util.HashMap;
+
+public class MenuBaseSorter
+{
+ public static HashMap menuBaseClasses = new HashMap();
+
+ public static void addMenuToSorter(String menuName, Class menu)
+ {
+ menuBaseClasses.put(menuName, menu);
+ }
+
+ public static boolean isMenuRegistered(String menuName)
+ {
+ for (int count = 0; count < menuBaseClasses.size(); count++)
+ {
+ if (menuBaseClasses.get(menuName) != null)
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public static MenuBase createMenuBaseObject(String menuName)
+ {
+ if (!isMenuRegistered(menuName))
+ {
+ System.out.println("The Menu Base '" + menuName + "' has not been registered!");
+ return null;
+ }
+
+ Class menuBase = (Class) menuBaseClasses.get(menuName);
+
+ if (menuBase == null)
+ {
+ throw new NullPointerException("The Menu Base '" + menuName + "' has a null MenuBase class!");
+ }
+
+ MenuBase menu = null;
+ try
+ {
+ Constructor c = null;
+ try
+ {
+ c = menuBase.getConstructor(new Class[0]);
+ } catch (NoSuchMethodException e)
+ {
+ e.printStackTrace();
+ } catch (SecurityException e)
+ {
+ e.printStackTrace();
+ }
+ try
+ {
+ menu = (MenuBase) c.newInstance(new Object[0]);
+ } catch (IllegalArgumentException e)
+ {
+ e.printStackTrace();
+ } catch (InvocationTargetException e)
+ {
+ e.printStackTrace();
+ }
+ } catch (InstantiationException e)
+ {
+ e.printStackTrace();
+ } catch (IllegalAccessException e)
+ {
+ e.printStackTrace();
+ }
+
+ if (menu == null)
+ {
+ throw new NullPointerException("Menu API failed to create a Menu Base object of '" + menuName + "'!");
+ }
+
+ return menu;
+ }
+
+ public static Class getMenuBaseClass(String menuName)
+ {
+ return (Class) menuBaseClasses.get(menuName);
+ }
+
+ public static int getSize()
+ {
+ return menuBaseClasses.size();
+ }
+
+ public static HashMap getMenuHashMap()
+ {
+ return menuBaseClasses;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.mainmenu_api.MenuBaseSorter
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/mainmenu_api/MenuCommonProxy.java b/src/main/java/net/aetherteam/mainmenu_api/MenuCommonProxy.java
new file mode 100644
index 0000000..f002ae7
--- /dev/null
+++ b/src/main/java/net/aetherteam/mainmenu_api/MenuCommonProxy.java
@@ -0,0 +1,24 @@
+package net.aetherteam.mainmenu_api;
+
+import net.minecraft.client.Minecraft;
+
+public class MenuCommonProxy
+{
+ public void registerTickHandler()
+ {
+ }
+
+ public Minecraft getClient()
+ {
+ return null;
+ }
+
+ public void registerSounds()
+ {
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.mainmenu_api.MenuCommonProxy
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/mainmenu_api/MenuPage.java b/src/main/java/net/aetherteam/mainmenu_api/MenuPage.java
new file mode 100644
index 0000000..81c3251
--- /dev/null
+++ b/src/main/java/net/aetherteam/mainmenu_api/MenuPage.java
@@ -0,0 +1,32 @@
+package net.aetherteam.mainmenu_api;
+
+import java.io.PrintStream;
+
+public class MenuPage
+{
+ private MenuSlot[] menuSlots = new MenuSlot[3];
+ private int slotIndex = 0;
+
+ public void addMenuSlot(MenuSlot slot)
+ {
+ this.menuSlots[this.slotIndex] = slot;
+
+ if (this.slotIndex < getPageAmount()) this.slotIndex += 1;
+ else System.out.println("Menu Page filled up!");
+ }
+
+ public MenuSlot getMenuSlot(int index)
+ {
+ return this.menuSlots[index];
+ }
+
+ public int getPageAmount()
+ {
+ return this.menuSlots.length;
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.mainmenu_api.MenuPage
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/mainmenu_api/MenuSlot.java b/src/main/java/net/aetherteam/mainmenu_api/MenuSlot.java
new file mode 100644
index 0000000..fac1f7e
--- /dev/null
+++ b/src/main/java/net/aetherteam/mainmenu_api/MenuSlot.java
@@ -0,0 +1,85 @@
+package net.aetherteam.mainmenu_api;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.Gui;
+import net.minecraft.client.renderer.RenderEngine;
+import org.lwjgl.opengl.GL11;
+
+public class MenuSlot extends Gui
+{
+ protected MenuBase menu;
+ protected int width;
+ protected int height;
+ public int xPosition;
+ public int yPosition;
+ public String displayString;
+ public int id;
+ public boolean enabled;
+ public boolean drawButton;
+ protected boolean field_82253_i;
+ public boolean selected;
+
+ public MenuSlot(MenuBase menu, int id, int x, int y, int width, int height)
+ {
+ this.selected = false;
+ this.width = width;
+ this.height = height;
+ this.enabled = true;
+ this.drawButton = true;
+ this.id = id;
+ this.xPosition = x;
+ this.yPosition = y;
+ this.menu = menu;
+ }
+
+ public void drawMenuSlot(Minecraft mc, int xPosition, int yPosition)
+ {
+ this.xPosition = xPosition;
+ this.yPosition = yPosition;
+
+ drawGradientRect(xPosition, yPosition, xPosition + this.width, yPosition + this.height, this.selected ? -10439830 : -13421773, this.selected ? -11563178 : -11184811);
+
+ int icon = mc.renderEngine.getTexture(this.menu.getIconPath());
+
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ GL11.glBindTexture(3553, icon);
+ GL11.glEnable(3553);
+
+ float u = 0.0F;
+ float v = 0.0F;
+ float u1 = 1.0F;
+ float v1 = 1.0F;
+
+ GL11.glBegin(7);
+ GL11.glTexCoord2f(u, v);
+ GL11.glVertex2f(xPosition + 2, yPosition + 2);
+ GL11.glTexCoord2f(u, v1);
+ GL11.glVertex2f(xPosition + 2, yPosition + 18);
+ GL11.glTexCoord2f(u1, v1);
+ GL11.glVertex2f(xPosition + 18, yPosition + 18);
+ GL11.glTexCoord2f(u1, v);
+ GL11.glVertex2f(xPosition + 18, yPosition + 2);
+ GL11.glEnd();
+
+ mc.renderEngine.resetBoundTexture();
+
+ mc.fontRenderer.drawStringWithShadow(this.menu.getName(), xPosition + this.height, yPosition + 2, 15066597);
+ GL11.glPushMatrix();
+ GL11.glScalef(0.75F, 0.75F, 1.0F);
+
+ mc.fontRenderer.drawString(this.menu.getVersion(), (int) ((xPosition + this.height) / 0.75F), (int) ((yPosition + 12.0F) / 0.75F), 15066597);
+
+ GL11.glPopMatrix();
+ }
+
+ public boolean mousePressed(Minecraft par1Minecraft, int par2, int par3)
+ {
+ return (this.enabled) && (this.drawButton) && (par2 >= this.xPosition) && (par3 >= this.yPosition) && (par2 < this.xPosition + this.width) && (par3 < this.yPosition + this.height);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.mainmenu_api.MenuSlot
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/mainmenu_api/MenuSoundLoader.java b/src/main/java/net/aetherteam/mainmenu_api/MenuSoundLoader.java
new file mode 100644
index 0000000..0cf137e
--- /dev/null
+++ b/src/main/java/net/aetherteam/mainmenu_api/MenuSoundLoader.java
@@ -0,0 +1,74 @@
+package net.aetherteam.mainmenu_api;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.PrintStream;
+import java.net.URL;
+import java.util.List;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.audio.SoundManager;
+import net.minecraft.client.audio.SoundPool;
+import net.minecraft.src.ModLoader;
+import net.minecraftforge.client.event.sound.SoundLoadEvent;
+import net.minecraftforge.event.ForgeSubscribe;
+
+public class MenuSoundLoader
+{
+ @ForgeSubscribe
+ public void onSound(SoundLoadEvent event)
+ {
+ JukeboxPlayer jukebox = new JukeboxPlayer();
+
+ Minecraft.getMinecraft();
+ File streaming = new File(Minecraft.getMinecraftDir() + "/resources/streaming/");
+
+ List music = null;
+
+ if (streaming.exists())
+ {
+ music = jukebox.listMusic(streaming, true);
+ }
+
+ if (music != null)
+ {
+ for (int musicIndex = 0; musicIndex < music.size(); musicIndex++)
+ {
+ registerStreaming(event.manager, "streaming/" + (String) music.get(musicIndex), "/resources/streaming/" + (String) music.get(musicIndex));
+ }
+ }
+ }
+
+ private void registerSound(SoundManager manager, String name, String path)
+ {
+ try
+ {
+ URL filePath = MenuSoundLoader.class.getResource(path);
+ if (filePath != null) manager.soundPoolSounds.addSound(name, filePath);
+ else throw new FileNotFoundException();
+ } catch (Exception ex)
+ {
+ System.out.println(String.format("Warning: unable to load sound file %s", new Object[]{path}));
+ }
+ }
+
+ private void registerStreaming(SoundManager manager, String name, String path)
+ {
+ File soundFile = new File(ModLoader.getMinecraftInstance().mcDataDir, "resources/" + name);
+
+ if ((soundFile.canRead()) && (soundFile.isFile()))
+ {
+ ModLoader.getMinecraftInstance().installResource(name, soundFile);
+
+ System.out.println("MainMenuAPI - Registering Music: " + name.replace("streaming/", ""));
+ } else
+ {
+ System.err.println("Could not load file: " + soundFile);
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.mainmenu_api.MenuSoundLoader
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/mainmenu_api/client/MenuClientProxy.java b/src/main/java/net/aetherteam/mainmenu_api/client/MenuClientProxy.java
new file mode 100644
index 0000000..30a4de9
--- /dev/null
+++ b/src/main/java/net/aetherteam/mainmenu_api/client/MenuClientProxy.java
@@ -0,0 +1,97 @@
+package net.aetherteam.mainmenu_api.client;
+
+import cpw.mods.fml.client.FMLClientHandler;
+import cpw.mods.fml.common.registry.TickRegistry;
+import cpw.mods.fml.relauncher.Side;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintStream;
+
+import net.aetherteam.mainmenu_api.MainMenuAPI;
+import net.aetherteam.mainmenu_api.MenuBaseAether;
+import net.aetherteam.mainmenu_api.MenuBaseLeftMinecraft;
+import net.aetherteam.mainmenu_api.MenuBaseMinecraft;
+import net.aetherteam.mainmenu_api.MenuCommonProxy;
+import net.aetherteam.mainmenu_api.MenuSoundLoader;
+import net.minecraft.client.Minecraft;
+import net.minecraft.src.ModLoader;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.event.EventBus;
+
+public class MenuClientProxy extends MenuCommonProxy
+{
+ private static String soundZipPath = "/resources/";
+
+ public void registerTickHandler()
+ {
+ MainMenuAPI.registerMenu("Minecraft", MenuBaseMinecraft.class);
+ MainMenuAPI.registerMenu("Left Minecraft", MenuBaseLeftMinecraft.class);
+ MainMenuAPI.registerMenu("Aether I", MenuBaseAether.class);
+
+ TickRegistry.registerTickHandler(new MenuClientTickHandler(), Side.CLIENT);
+ }
+
+ public Minecraft getClient()
+ {
+ return FMLClientHandler.instance().getClient();
+ }
+
+ public void registerSounds()
+ {
+ installSound("streaming/Aether Menu.ogg");
+ installSound("streaming/Aether Menu Two.wav");
+
+ MinecraftForge.EVENT_BUS.register(new MenuSoundLoader());
+ }
+
+ private void installSound(String filename)
+ {
+ File soundFile = new File(ModLoader.getMinecraftInstance().mcDataDir, "resources/" + filename);
+
+ if (!soundFile.exists())
+ {
+ try
+ {
+ String srcPath = soundZipPath + filename;
+ InputStream inStream = MainMenuAPI.class.getResourceAsStream(srcPath);
+ if (inStream == null)
+ {
+ throw new IOException();
+ }
+
+ if (!soundFile.getParentFile().exists())
+ {
+ soundFile.getParentFile().mkdirs();
+ }
+
+ BufferedInputStream fileIn = new BufferedInputStream(inStream);
+ BufferedOutputStream fileOut = new BufferedOutputStream(new FileOutputStream(soundFile));
+ byte[] buffer = new byte[1024];
+ int n = 0;
+ while (-1 != (n = fileIn.read(buffer)))
+ {
+ fileOut.write(buffer, 0, n);
+ }
+ fileIn.close();
+ fileOut.close();
+ } catch (IOException ex)
+ {
+ }
+
+ }
+
+ if ((soundFile.canRead()) && (soundFile.isFile()))
+ ModLoader.getMinecraftInstance().installResource(filename, soundFile);
+ else System.err.println("Could not load file: " + soundFile);
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.mainmenu_api.client.MenuClientProxy
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file
diff --git a/src/main/java/net/aetherteam/mainmenu_api/client/MenuClientTickHandler.java b/src/main/java/net/aetherteam/mainmenu_api/client/MenuClientTickHandler.java
new file mode 100644
index 0000000..f38e7ed
--- /dev/null
+++ b/src/main/java/net/aetherteam/mainmenu_api/client/MenuClientTickHandler.java
@@ -0,0 +1,75 @@
+package net.aetherteam.mainmenu_api.client;
+
+import cpw.mods.fml.common.ITickHandler;
+import cpw.mods.fml.common.TickType;
+
+import java.io.PrintStream;
+import java.util.EnumSet;
+
+import net.aetherteam.mainmenu_api.MainMenuAPI;
+import net.aetherteam.mainmenu_api.MenuBaseConfig;
+import net.aetherteam.mainmenu_api.MenuBaseLoaderWithSlider;
+import net.aetherteam.mainmenu_api.MenuBaseMinecraft;
+import net.aetherteam.mainmenu_api.MenuCommonProxy;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.audio.SoundManager;
+import net.minecraft.client.gui.GuiMainMenu;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.entity.Entity;
+import paulscode.sound.SoundSystem;
+
+public class MenuClientTickHandler implements ITickHandler
+{
+ public SoundManager soundManager = MainMenuAPI.proxy.getClient().sndManager;
+
+ public String getLabel()
+ {
+ return null;
+ }
+
+ public void tickEnd(EnumSet type, Object[] tickData)
+ {
+ if (type.equals(EnumSet.of(TickType.CLIENT)))
+ {
+ GuiScreen guiscreen = Minecraft.getMinecraft().currentScreen;
+ MenuBaseMinecraft minecraftMenu = new MenuBaseMinecraft();
+
+ if (((guiscreen instanceof GuiMainMenu)) && (guiscreen.getClass() != minecraftMenu.getClass()))
+ {
+ Minecraft.getMinecraft().displayGuiScreen(new MenuBaseLoaderWithSlider());
+ }
+ }
+ }
+
+ public EnumSet ticks()
+ {
+ return EnumSet.of(TickType.CLIENT);
+ }
+
+ public void tickStart(EnumSet type, Object[] tickData)
+ {
+ if (Minecraft.getMinecraft().isIntegratedServerRunning())
+ {
+ MenuBaseConfig.ticks += 1;
+
+ if (Minecraft.getMinecraft().thePlayer != null)
+ {
+ MenuBaseConfig.playerPosX = Minecraft.getMinecraft().thePlayer.posX;
+ MenuBaseConfig.playerPosY = Minecraft.getMinecraft().thePlayer.posY;
+ MenuBaseConfig.playerPosZ = Minecraft.getMinecraft().thePlayer.posZ;
+ }
+
+ if ((MenuBaseConfig.endMusic) && (SoundManager.sndSystem != null) && (SoundManager.sndSystem.playing("streaming")) && (MenuBaseConfig.ticks < 10))
+ {
+ MenuBaseConfig.endMusic = false;
+ System.out.println("Stopping rogue music.");
+ SoundManager.sndSystem.stop("streaming");
+ }
+ }
+ }
+}
+
+/* Location: D:\Dev\Mc\forge_orl\mcp\jars\bin\aether.jar
+ * Qualified Name: net.aetherteam.mainmenu_api.client.MenuClientTickHandler
+ * JD-Core Version: 0.6.2
+ */
\ No newline at end of file