From e818762ae786a6ea1866c9640237a1f753bfb999 Mon Sep 17 00:00:00 2001 From: Vasco Lavos Date: Sun, 16 Feb 2014 16:48:50 +0000 Subject: [PATCH] Cleanup and Build 5. --- .../client/core/handler/HUDHandler.java | 10 +++++----- .../common/block/BlockSpecialFlower.java | 1 - .../subtile/functional/SubTileHeiseiDream.java | 8 ++++---- .../subtile/functional/SubTileTigerseye.java | 18 +++++++++--------- .../subtile/generating/SubTileEndoflame.java | 18 +++++++++--------- .../common/block/tile/TileRuneAltar.java | 2 +- .../common/crafting/ModPetalRecipes.java | 2 +- .../botania/common/lexicon/LexiconData.java | 6 +++--- .../botania/common/lib/LibObfuscation.java | 4 ++-- build.properties | 4 ++-- 10 files changed, 36 insertions(+), 37 deletions(-) diff --git a/MODSRC/vazkii/botania/client/core/handler/HUDHandler.java b/MODSRC/vazkii/botania/client/core/handler/HUDHandler.java index 0b88c28ad..46c075a2a 100644 --- a/MODSRC/vazkii/botania/client/core/handler/HUDHandler.java +++ b/MODSRC/vazkii/botania/client/core/handler/HUDHandler.java @@ -38,7 +38,7 @@ public final class HUDHandler { private static final ResourceLocation manaBar = new ResourceLocation(LibResources.GUI_MANA_HUD); private static final RenderItem itemRender = new RenderItem(); - + @ForgeSubscribe public void onDrawScreen(RenderGameOverlayEvent.Post event) { if(event.type == ElementType.ALL) { @@ -49,7 +49,7 @@ public final class HUDHandler { if(Block.blocksList[id] != null && Block.blocksList[id] instanceof IWandHUD) ((IWandHUD) Block.blocksList[id]).renderHUD(mc, event.resolution, mc.theWorld, pos.blockX, pos.blockY, pos.blockZ); } - + else if(pos != null && mc.thePlayer.getCurrentEquippedItem() != null && mc.thePlayer.getCurrentEquippedItem().itemID == ModItems.lexicon.itemID) { int id = mc.theWorld.getBlockId(pos.blockX, pos.blockY, pos.blockZ); if(Block.blocksList[id] != null && Block.blocksList[id] instanceof ILexiconable) { @@ -60,16 +60,16 @@ public final class HUDHandler { } } } - + private void drawLexiconGUI(LexiconEntry entry, ScaledResolution res) { GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); Minecraft mc = Minecraft.getMinecraft(); int x = res.getScaledWidth() / 2 + 8; int y = res.getScaledHeight() / 2 - 4; - + int color = 0x2200FF00; - + mc.fontRenderer.drawStringWithShadow(StatCollector.translateToLocal(entry.getUnlocalizedName()), x + 18, y, color); mc.fontRenderer.drawStringWithShadow(StatCollector.translateToLocal("botaniamisc.shiftToRead"), x + 18, y + 11, color); itemRender.renderItemIntoGUI(mc.fontRenderer, mc.renderEngine, new ItemStack(ModItems.lexicon), x, y); diff --git a/MODSRC/vazkii/botania/common/block/BlockSpecialFlower.java b/MODSRC/vazkii/botania/common/block/BlockSpecialFlower.java index 2c3943b6b..36fe0f016 100644 --- a/MODSRC/vazkii/botania/common/block/BlockSpecialFlower.java +++ b/MODSRC/vazkii/botania/common/block/BlockSpecialFlower.java @@ -29,7 +29,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Icon; import net.minecraft.util.MovingObjectPosition; -import net.minecraft.world.ColorizerFoliage; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import vazkii.botania.api.ILexiconable; diff --git a/MODSRC/vazkii/botania/common/block/subtile/functional/SubTileHeiseiDream.java b/MODSRC/vazkii/botania/common/block/subtile/functional/SubTileHeiseiDream.java index 21280cdff..660321364 100644 --- a/MODSRC/vazkii/botania/common/block/subtile/functional/SubTileHeiseiDream.java +++ b/MODSRC/vazkii/botania/common/block/subtile/functional/SubTileHeiseiDream.java @@ -59,12 +59,12 @@ public class SubTileHeiseiDream extends SubTileFunctional { messWithGetTargetAI((EntityAINearestAttackableTarget) entry.action); else if(entry.action instanceof EntityAIAttackOnCollide) messWithAttackOnCollideAI((EntityAIAttackOnCollide) entry.action); - + mana -= cost; PacketDispatcher.sendPacketToAllInDimension(supertile.getDescriptionPacket(), supertile.worldObj.provider.dimensionId); break; } - } + } } } } @@ -72,7 +72,7 @@ public class SubTileHeiseiDream extends SubTileFunctional { private void messWithGetTargetAI(EntityAINearestAttackableTarget aiEntry) { ReflectionHelper.setPrivateValue(EntityAINearestAttackableTarget.class, aiEntry, IMob.class, LibObfuscation.TARGET_CLASS); } - + private void messWithAttackOnCollideAI(EntityAIAttackOnCollide aiEntry) { ReflectionHelper.setPrivateValue(EntityAIAttackOnCollide.class, aiEntry, IMob.class, LibObfuscation.CLASS_TARGET); } @@ -86,7 +86,7 @@ public class SubTileHeiseiDream extends SubTileFunctional { public int getMaxMana() { return 1000; } - + @Override public LexiconEntry getEntry() { return LexiconData.heiseiDream; diff --git a/MODSRC/vazkii/botania/common/block/subtile/functional/SubTileTigerseye.java b/MODSRC/vazkii/botania/common/block/subtile/functional/SubTileTigerseye.java index 310b97e87..632dc91bc 100644 --- a/MODSRC/vazkii/botania/common/block/subtile/functional/SubTileTigerseye.java +++ b/MODSRC/vazkii/botania/common/block/subtile/functional/SubTileTigerseye.java @@ -39,9 +39,9 @@ public class SubTileTigerseye extends SubTileFunctional { final int range = 10; final int rangeY = 4; final int cost = 70; - + boolean shouldAfffect = mana >= cost; - + List entities = supertile.worldObj.getEntitiesWithinAABB(EntityLiving.class, AxisAlignedBB.getBoundingBox(supertile.xCoord - range, supertile.yCoord - rangeY, supertile.zCoord - range, supertile.xCoord + range, supertile.yCoord + rangeY, supertile.zCoord + range)); for(EntityLiving entity : entities) { @@ -53,16 +53,16 @@ public class SubTileTigerseye extends SubTileFunctional { for(EntityAITaskEntry entry : entries) { if(entry.action instanceof EntityAIAvoidEntity) avoidsOcelots = messWithRunAwayAI((EntityAIAvoidEntity) entry.action) || avoidsOcelots; - + if(entry.action instanceof EntityAINearestAttackableTarget) messWithGetTargetAI((EntityAINearestAttackableTarget) entry.action); } - + if(entity instanceof EntityCreeper) { ReflectionHelper.setPrivateValue(EntityCreeper.class, (EntityCreeper) entity, 2, LibObfuscation.TIME_SINCE_IGNITED); entity.setAttackTarget(null); } - + if(avoidsOcelots) { mana -= cost; PacketDispatcher.sendPacketToAllInDimension(supertile.getDescriptionPacket(), supertile.worldObj.provider.dimensionId); @@ -94,9 +94,9 @@ public class SubTileTigerseye extends SubTileFunctional { return 1000; } - @Override - public LexiconEntry getEntry() { - return LexiconData.tigerseye; - } + @Override + public LexiconEntry getEntry() { + return LexiconData.tigerseye; + } } diff --git a/MODSRC/vazkii/botania/common/block/subtile/generating/SubTileEndoflame.java b/MODSRC/vazkii/botania/common/block/subtile/generating/SubTileEndoflame.java index f37234927..e45463d58 100644 --- a/MODSRC/vazkii/botania/common/block/subtile/generating/SubTileEndoflame.java +++ b/MODSRC/vazkii/botania/common/block/subtile/generating/SubTileEndoflame.java @@ -13,7 +13,6 @@ package vazkii.botania.common.block.subtile.generating; import java.util.List; -import cpw.mods.fml.common.network.PacketDispatcher; import net.minecraft.entity.item.EntityItem; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -23,6 +22,7 @@ import vazkii.botania.api.lexicon.LexiconEntry; import vazkii.botania.common.Botania; import vazkii.botania.common.block.subtile.SubTileGenerating; import vazkii.botania.common.lexicon.LexiconData; +import cpw.mods.fml.common.network.PacketDispatcher; public class SubTileEndoflame extends SubTileGenerating { @@ -37,34 +37,34 @@ public class SubTileEndoflame extends SubTileGenerating { if(mana < getMaxMana() && !supertile.worldObj.isRemote) { final int range = 3; boolean didSomething = false; - + List items = supertile.worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(supertile.xCoord - range, supertile.yCoord - range, supertile.zCoord - range, supertile.xCoord + range, supertile.yCoord + range, supertile.zCoord + range)); for(EntityItem item : items) { if(item.delayBeforeCanPickup == 0 && !item.isDead) { ItemStack stack = item.getEntityItem(); - int burnTime = TileEntityFurnace.getItemBurnTime(stack); + int burnTime = TileEntityFurnace.getItemBurnTime(stack); if(burnTime > 0 && stack.stackSize > 0) { this.burnTime = burnTime / 2; stack.stackSize--; if(stack.stackSize == 0) item.setDead(); - + didSomething = true; break; } } } - + if(didSomething) PacketDispatcher.sendPacketToAllInDimension(supertile.getDescriptionPacket(), supertile.worldObj.provider.dimensionId); } } else { - Botania.proxy.wispFX(supertile.worldObj, (float) supertile.xCoord + 0.8, (float) supertile.yCoord + 0.5, (float) supertile.zCoord + 0.8, 0.7F, 0.05F, 0.05F, (float) Math.random() / 6, (float) -Math.random() / 60); - Botania.proxy.wispFX(supertile.worldObj, (float) supertile.xCoord + 0.8, (float) supertile.yCoord + 0.5, (float) supertile.zCoord + 0.2, 0.7F, 0.05F, 0.05F, (float) Math.random() / 6, (float) -Math.random() / 60); - Botania.proxy.wispFX(supertile.worldObj, (float) supertile.xCoord + 0.2, (float) supertile.yCoord + 0.5, (float) supertile.zCoord + 0.2, 0.7F, 0.05F, 0.05F, (float) Math.random() / 6, (float) -Math.random() / 60); - Botania.proxy.wispFX(supertile.worldObj, (float) supertile.xCoord + 0.2, (float) supertile.yCoord + 0.5, (float) supertile.zCoord + 0.8, 0.7F, 0.05F, 0.05F, (float) Math.random() / 6, (float) -Math.random() / 60); + Botania.proxy.wispFX(supertile.worldObj, supertile.xCoord + 0.8, supertile.yCoord + 0.5, supertile.zCoord + 0.8, 0.7F, 0.05F, 0.05F, (float) Math.random() / 6, (float) -Math.random() / 60); + Botania.proxy.wispFX(supertile.worldObj, supertile.xCoord + 0.8, supertile.yCoord + 0.5, supertile.zCoord + 0.2, 0.7F, 0.05F, 0.05F, (float) Math.random() / 6, (float) -Math.random() / 60); + Botania.proxy.wispFX(supertile.worldObj, supertile.xCoord + 0.2, supertile.yCoord + 0.5, supertile.zCoord + 0.2, 0.7F, 0.05F, 0.05F, (float) Math.random() / 6, (float) -Math.random() / 60); + Botania.proxy.wispFX(supertile.worldObj, supertile.xCoord + 0.2, supertile.yCoord + 0.5, supertile.zCoord + 0.8, 0.7F, 0.05F, 0.05F, (float) Math.random() / 6, (float) -Math.random() / 60); burnTime--; } diff --git a/MODSRC/vazkii/botania/common/block/tile/TileRuneAltar.java b/MODSRC/vazkii/botania/common/block/tile/TileRuneAltar.java index fbe878025..0d55e31e8 100644 --- a/MODSRC/vazkii/botania/common/block/tile/TileRuneAltar.java +++ b/MODSRC/vazkii/botania/common/block/tile/TileRuneAltar.java @@ -74,7 +74,7 @@ public class TileRuneAltar extends TileSimpleInventory implements ISidedInventor updateRotationAngles(); firstTick = false; } - + for(int i = 0; i < angles.length; i++) angles[i]++; diff --git a/MODSRC/vazkii/botania/common/crafting/ModPetalRecipes.java b/MODSRC/vazkii/botania/common/crafting/ModPetalRecipes.java index f0c774eb6..5643c336a 100644 --- a/MODSRC/vazkii/botania/common/crafting/ModPetalRecipes.java +++ b/MODSRC/vazkii/botania/common/crafting/ModPetalRecipes.java @@ -37,7 +37,7 @@ public final class ModPetalRecipes { daybloomRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_DAYBLOOM), yellow, yellow, orange, orange, lightBlue); endoflameRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_ENDOFLAME), brown, red, redMana, brownMana, lightGray); - + bellethorneRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_BELLETHORN), redMana, redMana, cyan, cyan, red); heiseiDreamRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_HEISEI_DREAM), purpleMana, pinkMana, magentaMana, purple, pink, magenta, runeWrath); tigerseyeRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_TIGERSEYE), yellow, brownMana, orangeMana, lime, runeAutumn); diff --git a/MODSRC/vazkii/botania/common/lexicon/LexiconData.java b/MODSRC/vazkii/botania/common/lexicon/LexiconData.java index c11f9e8d7..4e1154759 100644 --- a/MODSRC/vazkii/botania/common/lexicon/LexiconData.java +++ b/MODSRC/vazkii/botania/common/lexicon/LexiconData.java @@ -140,10 +140,10 @@ public final class LexiconData { heiseiDream = new BLexiconEntry(LibLexicon.FFLOWER_HEISEI_DREAM, categoryFunctionalFlowers); heiseiDream.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.heiseiDreamRecipe)); - + tigerseye = new BLexiconEntry(LibLexicon.FFLOWER_TIGERSEYE, categoryFunctionalFlowers); tigerseye.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.tigerseyeRecipe)); - + // GENERATING FLOWERS ENTRIES generatingIntro = new BLexiconEntry(LibLexicon.GFLOWER_INTRO, categoryGenerationFlowers); generatingIntro.setPriority().setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2")); @@ -153,7 +153,7 @@ public final class LexiconData { endoflame = new BLexiconEntry(LibLexicon.GFLOWER_ENDOFLAME, categoryGenerationFlowers); endoflame.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.endoflameRecipe)); - + // MISCLENAEOUS ENTRIES unstableBlocks = new BLexiconEntry(LibLexicon.MISC_UNSTABLE_BLOCKS, categoryMisc); unstableBlocks.setLexiconPages(new PageText("0"), new PageImage("1", LibResources.ENTRY_UNSTABLE_BLOCK), new PageCraftingRecipe("2", ModCrafingRecipes.recipesUnstableBlocks)); diff --git a/MODSRC/vazkii/botania/common/lib/LibObfuscation.java b/MODSRC/vazkii/botania/common/lib/LibObfuscation.java index 8eef5e444..05ccef777 100644 --- a/MODSRC/vazkii/botania/common/lib/LibObfuscation.java +++ b/MODSRC/vazkii/botania/common/lib/LibObfuscation.java @@ -18,10 +18,10 @@ public final class LibObfuscation { // EntityAINearestAttackableTarget public static final String[] TARGET_CLASS = new String[] { "targetClass", "field_75307_b", "a" }; - + // EntityAIAttackOnCollide public static final String[] CLASS_TARGET = new String[] { "classTarget", "field_75444_h", "g" }; - + // EntityAIAvoidEntity public static final String[] TARGET_ENTITY_CLASS = new String[] { "targetEntityClass", "field_75381_h", "i" }; diff --git a/build.properties b/build.properties index b8390664e..d30c39044 100644 --- a/build.properties +++ b/build.properties @@ -1,6 +1,6 @@ -#Sat, 15 Feb 2014 18:44:14 +0000 +#Sun, 16 Feb 2014 16:41:26 +0000 version=beta -build_number=5 +build_number=6 mc_version=1.6.4 mod_name=Botania dir.repo=./