From c84efa0580b7b2e70ce7d4558bf492ea287fb9d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=9BAZ27?= Date: Fri, 6 Jun 2014 13:52:08 +0600 Subject: [PATCH 01/12] Some fixes for oreDict F.1088 --- src/main/java/tconstruct/common/TRecipes.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/main/java/tconstruct/common/TRecipes.java b/src/main/java/tconstruct/common/TRecipes.java index 819517a6..6abc5bec 100644 --- a/src/main/java/tconstruct/common/TRecipes.java +++ b/src/main/java/tconstruct/common/TRecipes.java @@ -1078,24 +1078,27 @@ public class TRecipes } OreDictionary.registerOre("thaumiumRod", new ItemStack(TRepo.toolRod, 1, 31)); - String[] glassTypes = { "glassBlack", "glassRed", "glassGreen", "glassBrown", "glassBlue", "glassPurple", "glassCyan", "glassLightGray", "glassGray", "glassPink", "glassLime", "glassYellow", - "glassLightBlue", "glassMagenta", "glassOrange", "glassWhite" }; + String[] glassTypes = { "GlassBlack", "GlassRed", "GlassGreen", "GlassBrown", "GlassBlue", "GlassPurple", "GlassCyan", "GlassLightGray", "GlassGray", "GlassPink", "GlassLime", "GlassYellow", + "GlassLightBlue", "GlassMagenta", "GlassOrange", "GlassWhite" }; for (int i = 0; i < 16; i++) { - OreDictionary.registerOre(glassTypes[15 - i], new ItemStack(TRepo.stainedGlassClear, 1, i)); + OreDictionary.registerOre("block"+glassTypes[i], new ItemStack(TRepo.stainedGlassClear, 1, i)); } - + OreDictionary.registerOre("blockGlass", new ItemStack(TRepo.stainedGlassClear, 1, OreDictionary.WILDCARD_VALUE)); + BlockDispenser.dispenseBehaviorRegistry.putObject(TRepo.titleIcon, new TDispenserBehaviorSpawnEgg()); BlockDispenser.dispenseBehaviorRegistry.putObject(TRepo.arrow, new TDispenserBehaviorArrow()); // Vanilla stuff - OreDictionary.registerOre("slimeball", new ItemStack(Items.slime_ball)); + ensureOreIsRegistered("slimeball", new ItemStack(Items.slime_ball)); OreDictionary.registerOre("slimeball", new ItemStack(TRepo.strangeFood, 1, 0)); OreDictionary.registerOre("slimeball", new ItemStack(TRepo.strangeFood, 1, 1)); OreDictionary.registerOre("slimeball", new ItemStack(TRepo.materials, 1, 36)); OreDictionary.registerOre("blockGlass", new ItemStack(TRepo.clearGlass)); - OreDictionary.registerOre("blockGlass", new ItemStack(Blocks.glass)); + OreDictionary.registerOre("blockGlassColorless", new ItemStack(TRepo.clearGlass)); + ensureOreIsRegistered("blockGlass", new ItemStack(Blocks.glass)); + ensureOreIsRegistered("blockGlassColorless", new ItemStack(Blocks.glass)); RecipeRemover.removeShapedRecipe(new ItemStack(Blocks.sticky_piston)); RecipeRemover.removeShapedRecipe(new ItemStack(Items.magma_cream)); RecipeRemover.removeShapedRecipe(new ItemStack(Items.lead)); From a63f020dbbb0ba40fc28df62c7539cf103ed6863 Mon Sep 17 00:00:00 2001 From: Zerokyuuni Date: Fri, 6 Jun 2014 21:13:53 -0400 Subject: [PATCH 02/12] Fix Mod ID --- src/main/java/tconstruct/util/EnvironmentChecks.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/tconstruct/util/EnvironmentChecks.java b/src/main/java/tconstruct/util/EnvironmentChecks.java index c950f98f..96b185c6 100644 --- a/src/main/java/tconstruct/util/EnvironmentChecks.java +++ b/src/main/java/tconstruct/util/EnvironmentChecks.java @@ -31,11 +31,11 @@ public class EnvironmentChecks { List modIds = new ArrayList(); - if (Loader.isModLoaded("gregtech_addon")) + if (Loader.isModLoaded("gregtech")) { TConstruct.logger.error("Tinkers' Construct and GregTech are incompatible for the following reasons:"); TConstruct.logger.error(modCompatDetails("GregTech", true)); - modIds.add("gregtech_addon"); + modIds.add("gregtech"); incompatibilities.add("GregTech"); } From 1278298d7c8626f41371440484ef40165c7d6182 Mon Sep 17 00:00:00 2001 From: Alexander Behrhof Date: Sun, 8 Jun 2014 14:37:02 -0400 Subject: [PATCH 03/12] Changing getAABBPool().getAABB( -> getBoundingBox( --- src/main/java/tconstruct/TConstruct.java | 9 ++++++--- src/main/java/tconstruct/blocks/BlockLandmine.java | 10 +++++----- src/main/java/tconstruct/blocks/CraftingSlab.java | 4 ++-- src/main/java/tconstruct/blocks/DryingRack.java | 6 +++--- .../java/tconstruct/blocks/GlassBlockConnected.java | 2 +- src/main/java/tconstruct/blocks/SearedBlock.java | 4 ++-- src/main/java/tconstruct/blocks/ToolStationBlock.java | 4 ++-- .../java/tconstruct/blocks/logic/DryingRackLogic.java | 2 +- .../java/tconstruct/blocks/logic/SmelteryLogic.java | 2 +- src/main/java/tconstruct/blocks/traps/Landmine.java | 6 +++--- src/main/java/tconstruct/common/TRepo.java | 3 +++ src/main/java/tconstruct/entity/BlueSlime.java | 2 +- src/main/java/tconstruct/items/tools/Scythe.java | 2 +- .../library/armor/BehaviorDispenseArmorCopy.java | 2 +- .../java/tconstruct/library/tools/AbilityHelper.java | 2 +- src/main/java/tconstruct/util/MiningExplosion.java | 2 +- .../util/landmine/behavior/BehaviorShears.java | 2 +- 17 files changed, 35 insertions(+), 29 deletions(-) diff --git a/src/main/java/tconstruct/TConstruct.java b/src/main/java/tconstruct/TConstruct.java index a1e0f9c2..767be6ca 100644 --- a/src/main/java/tconstruct/TConstruct.java +++ b/src/main/java/tconstruct/TConstruct.java @@ -71,18 +71,21 @@ public class TConstruct public static final int liquidUpdateAmount = 6; + // the entire mod + public static final String modID = "TConstruct"; + // Shared mod logger - public static final Logger logger = LogManager.getLogger("TConstruct"); + public static final Logger logger = LogManager.getLogger(modID); /* Instance of this mod, used for grabbing prototype fields */ - @Instance("TConstruct") + @Instance(modID) public static TConstruct instance; /* Proxies for sides, used for graphics processing */ @SidedProxy(clientSide = "tconstruct.client.TProxyClient", serverSide = "tconstruct.common.TProxyCommon") public static TProxyCommon proxy; // Module loader - public static final ModuleController moduleLoader = new ModuleController("TDynstruct.cfg", "TConstruct"); + public static final ModuleController moduleLoader = new ModuleController("TDynstruct.cfg", modID); // The packet pipeline public static final PacketPipeline packetPipeline = new PacketPipeline(); diff --git a/src/main/java/tconstruct/blocks/BlockLandmine.java b/src/main/java/tconstruct/blocks/BlockLandmine.java index e7d1f8c7..ad10f963 100644 --- a/src/main/java/tconstruct/blocks/BlockLandmine.java +++ b/src/main/java/tconstruct/blocks/BlockLandmine.java @@ -532,7 +532,7 @@ public class BlockLandmine extends BlockContainer protected AxisAlignedBB getSensitiveAABB (World par1World, int par2, int par3, int par4) { float f = 0.125F; - // return AxisAlignedBB.getAABBPool().getAABB((double)((float)par1 + f), + // return AxisAlignedBB.getBoundingBox((double)((float)par1 + f), // (double)par2, (double)((float)par3 + f), (double)((float)(par1 + 1) - // f), (double)par2 + 0.25D, (double)((float)(par3 + 1) - f)); @@ -559,7 +559,7 @@ public class BlockLandmine extends BlockContainer maxY = par3 + 1; maxZ = par4 + 1; } - return AxisAlignedBB.getAABBPool().getAABB(minX, minY, minZ, maxX, maxY, maxZ); + return AxisAlignedBB.getBoundingBox(minX, minY, minZ, maxX, maxY, maxZ); } public Entity getMineTriggerer (World par1World, int par2, int par3, int par4) @@ -597,17 +597,17 @@ public class BlockLandmine extends BlockContainer if (triggerType == Sensitivity.everything) { - list = par1World.getEntitiesWithinAABBExcludingEntity((Entity) null, AxisAlignedBB.getAABBPool().getAABB(par2 + 0D, par3 + 0D, par4 + 0D, par2 + 1D, par3 + 1D, par4 + 1D)); + list = par1World.getEntitiesWithinAABBExcludingEntity((Entity) null, AxisAlignedBB.getBoundingBox(par2 + 0D, par3 + 0D, par4 + 0D, par2 + 1D, par3 + 1D, par4 + 1D)); } if (triggerType == Sensitivity.mobs) { - list = par1World.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getAABBPool().getAABB(par2 + 0D, par3 + 0D, par4 + 0D, par2 + 1D, par3 + 1D, par4 + 1D)); + list = par1World.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(par2 + 0D, par3 + 0D, par4 + 0D, par2 + 1D, par3 + 1D, par4 + 1D)); } if (triggerType == Sensitivity.players) { - list = par1World.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getAABBPool().getAABB(par2 + 0D, par3 + 0D, par4 + 0D, par2 + 1D, par3 + 1D, par4 + 1D)); + list = par1World.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(par2 + 0D, par3 + 0D, par4 + 0D, par2 + 1D, par3 + 1D, par4 + 1D)); } if (list != null && !list.isEmpty()) diff --git a/src/main/java/tconstruct/blocks/CraftingSlab.java b/src/main/java/tconstruct/blocks/CraftingSlab.java index f4bf5dec..2446eb0f 100644 --- a/src/main/java/tconstruct/blocks/CraftingSlab.java +++ b/src/main/java/tconstruct/blocks/CraftingSlab.java @@ -77,9 +77,9 @@ public class CraftingSlab extends InventorySlab { int metadata = world.getBlockMetadata(x, y, z); if (metadata == 5) - return AxisAlignedBB.getAABBPool().getAABB((double) x + this.minX, (double) y + this.minY, (double) z + this.minZ, (double) x + this.maxX, (double) y + this.maxY - 0.125, + return AxisAlignedBB.getBoundingBox((double) x + this.minX, (double) y + this.minY, (double) z + this.minZ, (double) x + this.maxX, (double) y + this.maxY - 0.125, (double) z + this.maxZ); - return AxisAlignedBB.getAABBPool().getAABB((double) x + this.minX, (double) y + this.minY, (double) z + this.minZ, (double) x + this.maxX, (double) y + this.maxY, (double) z + this.maxZ); + return AxisAlignedBB.getBoundingBox((double) x + this.minX, (double) y + this.minY, (double) z + this.minZ, (double) x + this.maxX, (double) y + this.maxY, (double) z + this.maxZ); } @Override diff --git a/src/main/java/tconstruct/blocks/DryingRack.java b/src/main/java/tconstruct/blocks/DryingRack.java index a80aef6d..01e58f35 100644 --- a/src/main/java/tconstruct/blocks/DryingRack.java +++ b/src/main/java/tconstruct/blocks/DryingRack.java @@ -159,7 +159,7 @@ public class DryingRack extends InventoryBlock yMin = 0.75F; break; } - return AxisAlignedBB.getAABBPool().getAABB((double) x + xMin, (double) y + yMin, (double) z + zMin, (double) x + xMax, (double) y + yMax, (double) z + zMax); + return AxisAlignedBB.getBoundingBox((double) x + xMin, (double) y + yMin, (double) z + zMin, (double) x + xMax, (double) y + yMax, (double) z + zMax); } @Override @@ -296,7 +296,7 @@ public class DryingRack extends InventoryBlock /* * @Override public AxisAlignedBB getCollisionBoundingBoxFromPool (World * world, int x, int y, int z) { int meta = world.getBlockMetadata(x, y, z); - * if (meta != 1) { return AxisAlignedBB.getAABBPool().getAABB(x, y, z, x + + * if (meta != 1) { return AxisAlignedBB.getBoundingBox(x, y, z, x + * 1, y + 1, z + 1); } else { FaucetLogic logic = (FaucetLogic) * world.getBlockTileEntity(x, y, z); if (logic != null) { float xMin = * 0.25F; float xMax = 0.75F; float zMin = 0.25F; float zMax = 0.75F; @@ -305,7 +305,7 @@ public class DryingRack extends InventoryBlock * break; case 3: zMax = 0.375F; zMin = 0F; break; case 4: xMin = 0.625F; * xMax = 1.0F; break; case 5: xMax = 0.375F; xMin = 0F; break; } * - * return AxisAlignedBB.getAABBPool().getAABB((double) ((float) x + xMin), + * return AxisAlignedBB.getBoundingBox((double) ((float) x + xMin), * (double) y + 0.25, (double) ((float) z + zMin), (double) ((float) x + * xMax), (double) y + 0.625, (double) ((float) z + zMax)); } } * diff --git a/src/main/java/tconstruct/blocks/GlassBlockConnected.java b/src/main/java/tconstruct/blocks/GlassBlockConnected.java index a55389e2..fc469816 100644 --- a/src/main/java/tconstruct/blocks/GlassBlockConnected.java +++ b/src/main/java/tconstruct/blocks/GlassBlockConnected.java @@ -618,7 +618,7 @@ public class GlassBlockConnected extends MantleBlock } else { - return AxisAlignedBB.getAABBPool().getAABB(0D, 0D, 0D, 0D, 0D, 0D); + return AxisAlignedBB.getBoundingBox(0D, 0D, 0D, 0D, 0D, 0D); } } diff --git a/src/main/java/tconstruct/blocks/SearedBlock.java b/src/main/java/tconstruct/blocks/SearedBlock.java index 11f51558..b60496cb 100644 --- a/src/main/java/tconstruct/blocks/SearedBlock.java +++ b/src/main/java/tconstruct/blocks/SearedBlock.java @@ -316,7 +316,7 @@ public class SearedBlock extends InventoryBlock int meta = world.getBlockMetadata(x, y, z); if (meta != 1) { - return AxisAlignedBB.getAABBPool().getAABB(x, y, z, x + 1, y + 1, z + 1); + return AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1); } else { @@ -348,7 +348,7 @@ public class SearedBlock extends InventoryBlock break; } - return AxisAlignedBB.getAABBPool().getAABB((double) ((float) x + xMin), (double) y + 0.25, (double) ((float) z + zMin), (double) ((float) x + xMax), (double) y + 0.625, + return AxisAlignedBB.getBoundingBox((double) ((float) x + xMin), (double) y + 0.25, (double) ((float) z + zMin), (double) ((float) x + xMax), (double) y + 0.625, (double) ((float) z + zMax)); } } diff --git a/src/main/java/tconstruct/blocks/ToolStationBlock.java b/src/main/java/tconstruct/blocks/ToolStationBlock.java index a156e60e..9092c639 100644 --- a/src/main/java/tconstruct/blocks/ToolStationBlock.java +++ b/src/main/java/tconstruct/blocks/ToolStationBlock.java @@ -116,9 +116,9 @@ public class ToolStationBlock extends InventoryBlock { int metadata = world.getBlockMetadata(x, y, z); if (metadata == 5) - return AxisAlignedBB.getAABBPool().getAABB((double) x + this.minX, (double) y + this.minY, (double) z + this.minZ, (double) x + this.maxX, (double) y + this.maxY - 0.125, + return AxisAlignedBB.getBoundingBox((double) x + this.minX, (double) y + this.minY, (double) z + this.minZ, (double) x + this.maxX, (double) y + this.maxY - 0.125, (double) z + this.maxZ); - return AxisAlignedBB.getAABBPool().getAABB((double) x + this.minX, (double) y + this.minY, (double) z + this.minZ, (double) x + this.maxX, (double) y + this.maxY, (double) z + this.maxZ); + return AxisAlignedBB.getBoundingBox((double) x + this.minX, (double) y + this.minY, (double) z + this.minZ, (double) x + this.maxX, (double) y + this.maxY, (double) z + this.maxZ); } @Override diff --git a/src/main/java/tconstruct/blocks/logic/DryingRackLogic.java b/src/main/java/tconstruct/blocks/logic/DryingRackLogic.java index 64e5e934..cbfd9e44 100644 --- a/src/main/java/tconstruct/blocks/logic/DryingRackLogic.java +++ b/src/main/java/tconstruct/blocks/logic/DryingRackLogic.java @@ -122,7 +122,7 @@ public class DryingRackLogic extends InventoryLogic @SideOnly(Side.CLIENT) public AxisAlignedBB getRenderBoundingBox () { - AxisAlignedBB cbb = AxisAlignedBB.getAABBPool().getAABB(xCoord, yCoord - 1, zCoord, xCoord + 1, yCoord + 1, zCoord + 1); + AxisAlignedBB cbb = AxisAlignedBB.getBoundingBox(xCoord, yCoord - 1, zCoord, xCoord + 1, yCoord + 1, zCoord + 1); return cbb; } diff --git a/src/main/java/tconstruct/blocks/logic/SmelteryLogic.java b/src/main/java/tconstruct/blocks/logic/SmelteryLogic.java index 869273dd..f023de0b 100644 --- a/src/main/java/tconstruct/blocks/logic/SmelteryLogic.java +++ b/src/main/java/tconstruct/blocks/logic/SmelteryLogic.java @@ -308,7 +308,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci void detectEntities () { - AxisAlignedBB box = AxisAlignedBB.getAABBPool().getAABB(centerPos.x, centerPos.y, centerPos.z, centerPos.x + 1.0D, centerPos.y + 1.0D, centerPos.z + 1.0D).expand(1.0D, 0.0D, 1.0D); + AxisAlignedBB box = AxisAlignedBB.getBoundingBox(centerPos.x, centerPos.y, centerPos.z, centerPos.x + 1.0D, centerPos.y + 1.0D, centerPos.z + 1.0D).expand(1.0D, 0.0D, 1.0D); List list = worldObj.getEntitiesWithinAABB(Entity.class, box); for (Object o : list) diff --git a/src/main/java/tconstruct/blocks/traps/Landmine.java b/src/main/java/tconstruct/blocks/traps/Landmine.java index b39d43a3..ee5bf461 100644 --- a/src/main/java/tconstruct/blocks/traps/Landmine.java +++ b/src/main/java/tconstruct/blocks/traps/Landmine.java @@ -184,7 +184,7 @@ public class Landmine extends MantleBlock { var8 = world.getEntitiesWithinAABBExcludingEntity( (Entity) null, - AxisAlignedBB.getAABBPool().getAABB((double) ((float) posX + var7), (double) posY, (double) ((float) posZ + var7), (double) ((float) (posX + 1) - var7), (double) posY + 0.25D, + AxisAlignedBB.getBoundingBox((double) ((float) posX + var7), (double) posY, (double) ((float) posZ + var7), (double) ((float) (posX + 1) - var7), (double) posY + 0.25D, (double) ((float) (posZ + 1) - var7))); } @@ -192,14 +192,14 @@ public class Landmine extends MantleBlock { var8 = world.getEntitiesWithinAABB( EntityLiving.class, - AxisAlignedBB.getAABBPool().getAABB((double) ((float) posX + var7), (double) posY, (double) ((float) posZ + var7), (double) ((float) (posX + 1) - var7), (double) posY + 0.25D, + AxisAlignedBB.getBoundingBox((double) ((float) posX + var7), (double) posY, (double) ((float) posZ + var7), (double) ((float) (posX + 1) - var7), (double) posY + 0.25D, (double) ((float) (posZ + 1) - var7))); } /* * if (this.triggerMobType == EnumCreatureType.players) { var8 = * world.getEntitiesWithinAABB( EntityPlayer.class, - * AxisAlignedBB.getAABBPool().getAABB((double) ((float) posX + var7), + * AxisAlignedBB.getBoundingBox((double) ((float) posX + var7), * (double) posY, (double) ((float) posZ + var7), (double) ((float) * (posX + 1) - var7), (double) posY + 0.25D, (double) ((float) (posZ + * 1) - var7))); } diff --git a/src/main/java/tconstruct/common/TRepo.java b/src/main/java/tconstruct/common/TRepo.java index b8477663..81b92eac 100644 --- a/src/main/java/tconstruct/common/TRepo.java +++ b/src/main/java/tconstruct/common/TRepo.java @@ -1,5 +1,6 @@ package tconstruct.common; +import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder; import net.minecraft.block.Block; import net.minecraft.block.Block.SoundType; import net.minecraft.block.material.Material; @@ -15,7 +16,9 @@ import tconstruct.library.tools.ToolCore; import tconstruct.modifiers.tools.ModAttack; import tconstruct.modifiers.tools.ModFlux; import tconstruct.modifiers.tools.ModLapis; +import tconstruct.TConstruct; +@ObjectHolder(TConstruct.modID) public class TRepo { // Supresses console spam when iguana's tweaks remove stuff diff --git a/src/main/java/tconstruct/entity/BlueSlime.java b/src/main/java/tconstruct/entity/BlueSlime.java index 3a020e64..db1439e0 100644 --- a/src/main/java/tconstruct/entity/BlueSlime.java +++ b/src/main/java/tconstruct/entity/BlueSlime.java @@ -442,7 +442,7 @@ public class BlueSlime extends EntityLiving implements IMob, IBossDisplayData for (int l = 0; l < k; ++l) { - this.entityDropItem(new ItemStack(j), 1); + this.dropItem(j, 0); } } diff --git a/src/main/java/tconstruct/items/tools/Scythe.java b/src/main/java/tconstruct/items/tools/Scythe.java index 2359208f..b639c25a 100644 --- a/src/main/java/tconstruct/items/tools/Scythe.java +++ b/src/main/java/tconstruct/items/tools/Scythe.java @@ -252,7 +252,7 @@ public class Scythe extends Weapon @Override public boolean onLeftClickEntity (ItemStack stack, EntityPlayer player, Entity entity) { - AxisAlignedBB box = AxisAlignedBB.getAABBPool().getAABB(entity.posX, entity.posY, entity.posZ, entity.posX + 1.0D, entity.posY + 1.0D, entity.posZ + 1.0D).expand(1.0D, 1.0D, 1.0D); + AxisAlignedBB box = AxisAlignedBB.getBoundingBox(entity.posX, entity.posY, entity.posZ, entity.posX + 1.0D, entity.posY + 1.0D, entity.posZ + 1.0D).expand(1.0D, 1.0D, 1.0D); List list = player.worldObj.getEntitiesWithinAABBExcludingEntity(player, box); for (Object o : list) { diff --git a/src/main/java/tconstruct/library/armor/BehaviorDispenseArmorCopy.java b/src/main/java/tconstruct/library/armor/BehaviorDispenseArmorCopy.java index ca4f1167..1ffe5045 100644 --- a/src/main/java/tconstruct/library/armor/BehaviorDispenseArmorCopy.java +++ b/src/main/java/tconstruct/library/armor/BehaviorDispenseArmorCopy.java @@ -26,7 +26,7 @@ final class BehaviorDispenseArmorCopy extends BehaviorDefaultDispenseItem int i = par1IBlockSource.getXInt() + enumfacing.getFrontOffsetX(); int j = par1IBlockSource.getYInt() + enumfacing.getFrontOffsetY(); int k = par1IBlockSource.getZInt() + enumfacing.getFrontOffsetZ(); - AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double) i, (double) j, (double) k, (double) (i + 1), (double) (j + 1), (double) (k + 1)); + AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox((double) i, (double) j, (double) k, (double) (i + 1), (double) (j + 1), (double) (k + 1)); List list = par1IBlockSource.getWorld().selectEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb, new IEntitySelector.ArmoredMob(par2ItemStack)); if (list.size() > 0) diff --git a/src/main/java/tconstruct/library/tools/AbilityHelper.java b/src/main/java/tconstruct/library/tools/AbilityHelper.java index ee6c2e57..a8c9f880 100644 --- a/src/main/java/tconstruct/library/tools/AbilityHelper.java +++ b/src/main/java/tconstruct/library/tools/AbilityHelper.java @@ -309,7 +309,7 @@ public class AbilityHelper if (!(living instanceof EntityPlayer) || player.canAttackPlayer((EntityPlayer) living)) { List var6 = player.worldObj.getEntitiesWithinAABB(EntityWolf.class, - AxisAlignedBB.getAABBPool().getAABB(player.posX, player.posY, player.posZ, player.posX + 1.0D, player.posY + 1.0D, player.posZ + 1.0D).expand(16.0D, 4.0D, 16.0D)); + AxisAlignedBB.getBoundingBox(player.posX, player.posY, player.posZ, player.posX + 1.0D, player.posY + 1.0D, player.posZ + 1.0D).expand(16.0D, 4.0D, 16.0D)); Iterator var4 = var6.iterator(); while (var4.hasNext()) diff --git a/src/main/java/tconstruct/util/MiningExplosion.java b/src/main/java/tconstruct/util/MiningExplosion.java index df2aa5db..b36721e4 100644 --- a/src/main/java/tconstruct/util/MiningExplosion.java +++ b/src/main/java/tconstruct/util/MiningExplosion.java @@ -103,7 +103,7 @@ public class MiningExplosion extends Explosion int l1 = MathHelper.floor_double(this.explosionY + (double) this.explosionSize + 1.0D); int i2 = MathHelper.floor_double(this.explosionZ - (double) this.explosionSize - 1.0D); int j2 = MathHelper.floor_double(this.explosionZ + (double) this.explosionSize + 1.0D); - List list = this.world.getEntitiesWithinAABBExcludingEntity(this.exploder, AxisAlignedBB.getAABBPool().getAABB((double) i, (double) k, (double) i2, (double) j, (double) l1, (double) j2)); + List list = this.world.getEntitiesWithinAABBExcludingEntity(this.exploder, AxisAlignedBB.getBoundingBox((double) i, (double) k, (double) i2, (double) j, (double) l1, (double) j2)); Vec3 vec3 = this.world.getWorldVec3Pool().getVecFromPool(this.explosionX, this.explosionY, this.explosionZ); for (int k2 = 0; k2 < list.size(); ++k2) diff --git a/src/main/java/tconstruct/util/landmine/behavior/BehaviorShears.java b/src/main/java/tconstruct/util/landmine/behavior/BehaviorShears.java index 7163d499..b5f5df4a 100644 --- a/src/main/java/tconstruct/util/landmine/behavior/BehaviorShears.java +++ b/src/main/java/tconstruct/util/landmine/behavior/BehaviorShears.java @@ -31,7 +31,7 @@ public class BehaviorShears extends Behavior { Random rand = ItemBlockLandmine.getRandom(); - List sheeps = par1World.getEntitiesWithinAABB(IShearable.class, AxisAlignedBB.getAABBPool().getAABB(par2 - 2, par3 - 2, par4 - 2, par2 + 2, par3 + 2, par4 + 2)); + List sheeps = par1World.getEntitiesWithinAABB(IShearable.class, AxisAlignedBB.getBoundingBox(par2 - 2, par3 - 2, par4 - 2, par2 + 2, par3 + 2, par4 + 2)); if (sheeps != null && !sheeps.isEmpty()) { From 01ac9241231f7b1a561375b25749838b8d6b27f1 Mon Sep 17 00:00:00 2001 From: Alexander Behrhof Date: Sun, 8 Jun 2014 14:39:35 -0400 Subject: [PATCH 04/12] Revert BlueSlime Change --- src/main/java/tconstruct/entity/BlueSlime.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/tconstruct/entity/BlueSlime.java b/src/main/java/tconstruct/entity/BlueSlime.java index db1439e0..3a020e64 100644 --- a/src/main/java/tconstruct/entity/BlueSlime.java +++ b/src/main/java/tconstruct/entity/BlueSlime.java @@ -442,7 +442,7 @@ public class BlueSlime extends EntityLiving implements IMob, IBossDisplayData for (int l = 0; l < k; ++l) { - this.dropItem(j, 0); + this.entityDropItem(new ItemStack(j), 1); } } From b16b79a8239253a48fd85250daf79e3a844749be Mon Sep 17 00:00:00 2001 From: blue42u Date: Wed, 4 Jun 2014 14:32:15 -0400 Subject: [PATCH 05/12] Fix some block breaking problems. - Bibliocraft locks are respected. - Fixes Thaumcraft node drops. - Fixes strange auto-smelt drops sometimes. - Probably fixes sync issues somewhere. --- src/main/java/tconstruct/TConstruct.java | 1 - .../tconstruct/items/tools/Battleaxe.java | 59 ++---- .../tconstruct/items/tools/Excavator.java | 124 ++++------- .../java/tconstruct/items/tools/Hammer.java | 132 ++++-------- .../tconstruct/items/tools/LumberAxe.java | 200 +++++------------- .../java/tconstruct/items/tools/Scythe.java | 88 ++------ .../library/tools/DualHarvestTool.java | 38 ---- .../tconstruct/library/tools/HarvestTool.java | 90 -------- .../tconstruct/library/tools/ToolCore.java | 28 ++- .../modifiers/tools/TActiveOmniMod.java | 85 -------- .../java/tconstruct/util/TEventHandler.java | 39 ++++ 11 files changed, 216 insertions(+), 668 deletions(-) diff --git a/src/main/java/tconstruct/TConstruct.java b/src/main/java/tconstruct/TConstruct.java index 767be6ca..5c072165 100644 --- a/src/main/java/tconstruct/TConstruct.java +++ b/src/main/java/tconstruct/TConstruct.java @@ -105,7 +105,6 @@ public class TConstruct } EnvironmentChecks.verifyEnvironmentSanity(); - MinecraftForge.EVENT_BUS.register(events = new TEventHandler()); PluginController.registerModules(); } diff --git a/src/main/java/tconstruct/items/tools/Battleaxe.java b/src/main/java/tconstruct/items/tools/Battleaxe.java index e4e4aca6..f5132fe7 100644 --- a/src/main/java/tconstruct/items/tools/Battleaxe.java +++ b/src/main/java/tconstruct/items/tools/Battleaxe.java @@ -7,6 +7,7 @@ import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.EnumAction; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -247,56 +248,26 @@ public class Battleaxe extends HarvestTool if (!stack.hasTagCompound()) return false; - World world = player.worldObj; - final Block wood = world.getBlock(x, y, z); - NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool"); - final int meta = world.getBlockMetadata(x, y, z); - for (int yPos = y + 1; yPos < y + 9; yPos++) + if (player instanceof EntityPlayerMP) { - Block block = world.getBlock(x, yPos, z); - if (!(tags.getBoolean("Broken")) && block != null && block.getMaterial() == Material.wood) + EntityPlayerMP mplayer = (EntityPlayerMP)player; + World world = player.worldObj; + NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool"); + if (!tags.hasKey("AOEBreaking") || !tags.getBoolean("AOEBreaking")) { - Block localblock = world.getBlock(x, yPos, z); - int localMeta = world.getBlockMetadata(x, yPos, z); - int hlvl = block.getHarvestLevel(meta); - - if (hlvl <= tags.getInteger("HarvestLevel")) + tags.setBoolean("AOEBreaking", true); + for (int yPos = y + 1; yPos < y + 9; yPos++) { - boolean cancelHarvest = false; - for (ActiveToolMod mod : TConstructRegistry.activeModifiers) - { - if (mod.beforeBlockBreak(this, stack, x, yPos, z, player)) - cancelHarvest = true; - } - - if (!cancelHarvest) - { - if (block != null && block.getMaterial() == Material.wood) - { - localMeta = world.getBlockMetadata(x, yPos, z); - if (!player.capabilities.isCreativeMode) - { - if (block.removedByPlayer(world, player, x, yPos, z)) - { - block.onBlockDestroyedByPlayer(world, x, yPos, z, localMeta); - } - block.harvestBlock(world, player, x, yPos, z, localMeta); - block.onBlockHarvested(world, x, yPos, z, localMeta, player); - onBlockDestroyed(stack, world, block, x, yPos, z, player); - } - else - { - WorldHelper.setBlockToAir(world, x, yPos, z); - } - } - } + Block block = world.getBlock(x, yPos, z); + if (block != null && block.getMaterial() == Material.wood + && block.getPlayerRelativeBlockHardness(mplayer, world, x, yPos, z) > 0) + mplayer.theItemInWorldManager.tryHarvestBlock(x, yPos, z); + else + break; } + tags.setBoolean("AOEBreaking", false); } - else - break; } - if (!world.isRemote) - world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(wood) + (meta << 12)); return super.onBlockStartBreak(stack, x, y, z, player); } } diff --git a/src/main/java/tconstruct/items/tools/Excavator.java b/src/main/java/tconstruct/items/tools/Excavator.java index 59fcbbbb..419084ff 100644 --- a/src/main/java/tconstruct/items/tools/Excavator.java +++ b/src/main/java/tconstruct/items/tools/Excavator.java @@ -4,6 +4,7 @@ import mantle.world.WorldHelper; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -141,107 +142,54 @@ public class Excavator extends HarvestTool return false; World world = player.worldObj; - final int meta = world.getBlockMetadata(x, y, z); - Block block = world.getBlock(x, y, z); - if (!stack.hasTagCompound()) - return false; - - if (block == null) - return super.onBlockStartBreak(stack, x, y, z, player); - - float blockHardness = block.getBlockHardness(world, x, y, z); - - boolean validStart = false; - for (int iter = 0; iter < materials.length; iter++) - { - if (materials[iter] == block.getMaterial()) - { - validStart = true; - break; - } - } - MovingObjectPosition mop = AbilityHelper.raytraceFromEntity(world, player, true, 5.0D); - if (mop == null || !validStart) - return super.onBlockStartBreak(stack, x, y, z, player); - - int xRange = 1; - int yRange = 1; - int zRange = 1; - switch (mop.sideHit) + if (mop != null && player instanceof EntityPlayerMP) { - case 0: - case 1: - yRange = 0; - break; - case 2: - case 3: - zRange = 0; - break; - case 4: - case 5: - xRange = 0; - break; - } - NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool"); - for (int xPos = x - xRange; xPos <= x + xRange; xPos++) - { - for (int yPos = y - yRange; yPos <= y + yRange; yPos++) + EntityPlayerMP mplayer = (EntityPlayerMP) player; + NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool"); + if (!tags.hasKey("AOEBreaking") || !tags.getBoolean("AOEBreaking")) { - for (int zPos = z - zRange; zPos <= z + zRange; zPos++) + tags.setBoolean("AOEBreaking", true); + + int xRange = 1; + int yRange = 1; + int zRange = 1; + switch (mop.sideHit) { - if (!(tags.getBoolean("Broken"))) + case 0: + case 1: + yRange = 0; + break; + case 2: + case 3: + zRange = 0; + break; + case 4: + case 5: + xRange = 0; + break; + } + + for (int xPos = x - xRange; xPos <= x + xRange; xPos++) + { + for (int yPos = y - yRange; yPos <= y + yRange; yPos++) { - Block localblock = world.getBlock(xPos, yPos, zPos); - block = localblock; - int localMeta = world.getBlockMetadata(xPos, yPos, zPos); - int hlvl = block.getHarvestLevel(meta); - float localHardness = block == null ? Float.MAX_VALUE : block.getBlockHardness(world, xPos, yPos, zPos); - - if (hlvl <= tags.getInteger("HarvestLevel") && localHardness - 1.5 <= blockHardness) + for (int zPos = z - zRange; zPos <= z + zRange; zPos++) { - boolean cancelHarvest = false; - for (ActiveToolMod mod : TConstructRegistry.activeModifiers) + Block block = world.getBlock(xPos, yPos, zPos); + for (Material mat : this.materials) { - if (mod.beforeBlockBreak(this, stack, xPos, yPos, zPos, player)) - cancelHarvest = true; - } - - if (!cancelHarvest) - { - if (block != null && !(localHardness < 0)) - { - for (int iter = 0; iter < materials.length; iter++) - { - if (materials[iter] == block.getMaterial()) - { - if (!player.capabilities.isCreativeMode) - { - if (block.removedByPlayer(world, player, xPos, yPos, zPos)) - { - block.onBlockDestroyedByPlayer(world, xPos, yPos, zPos, localMeta); - } - block.harvestBlock(world, player, xPos, yPos, zPos, localMeta); - block.onBlockHarvested(world, xPos, yPos, zPos, localMeta, player); - if (blockHardness > 0f) - onBlockDestroyed(stack, world, localblock, xPos, yPos, zPos, player); - } - else - { - WorldHelper.setBlockToAir(world, xPos, yPos, zPos); - } - } - } - } + if (block != null && mat == block.getMaterial() + && block.getPlayerRelativeBlockHardness(mplayer, world, x, yPos, z) > 0) + mplayer.theItemInWorldManager.tryHarvestBlock(xPos, yPos, zPos); } } } } + tags.setBoolean("AOEBreaking", false); } } - if (!world.isRemote) - world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(block) + (meta << 12)); - return true; + return super.onBlockStartBreak(stack, x, y, z, player); } @Override diff --git a/src/main/java/tconstruct/items/tools/Hammer.java b/src/main/java/tconstruct/items/tools/Hammer.java index 0aa72590..11d340a8 100644 --- a/src/main/java/tconstruct/items/tools/Hammer.java +++ b/src/main/java/tconstruct/items/tools/Hammer.java @@ -7,6 +7,7 @@ import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -235,115 +236,54 @@ public class Hammer extends HarvestTool return false; World world = player.worldObj; - final Block block = world.getBlock(x, y, z); - final int meta = world.getBlockMetadata(x, y, z); - if (!stack.hasTagCompound()) - return false; - - if (block == null) - return super.onBlockStartBreak(stack, x, y, z, player); - - float blockHardness = block.getBlockHardness(world, x, y, z); - - boolean validStart = false; - for (int iter = 0; iter < materials.length; iter++) - { - if (materials[iter] == block.getMaterial()) - { - validStart = true; - break; - } - } - - if (block == Blocks.monster_egg) - validStart = true; - MovingObjectPosition mop = AbilityHelper.raytraceFromEntity(world, player, true, 4.5D); - if (mop == null || !validStart) - return super.onBlockStartBreak(stack, x, y, z, player); - - int xRange = 1; - int yRange = 1; - int zRange = 1; - switch (mop.sideHit) + if (mop != null && player instanceof EntityPlayerMP) { - case 0: - case 1: - yRange = 0; - break; - case 2: - case 3: - zRange = 0; - break; - case 4: - case 5: - xRange = 0; - break; - } - - NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool"); - int toolLevel = tags.getInteger("HarvestLevel"); - for (int xPos = x - xRange; xPos <= x + xRange; xPos++) - { - for (int yPos = y - yRange; yPos <= y + yRange; yPos++) + EntityPlayerMP mplayer = (EntityPlayerMP) player; + NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool"); + if (!tags.hasKey("AOEBreaking") || !tags.getBoolean("AOEBreaking")) { - for (int zPos = z - zRange; zPos <= z + zRange; zPos++) + tags.setBoolean("AOEBreaking", true); + + int xRange = 1; + int yRange = 1; + int zRange = 1; + switch (mop.sideHit) { - if (!(tags.getBoolean("Broken"))) + case 0: + case 1: + yRange = 0; + break; + case 2: + case 3: + zRange = 0; + break; + case 4: + case 5: + xRange = 0; + break; + } + + for (int xPos = x - xRange; xPos <= x + xRange; xPos++) + { + for (int yPos = y - yRange; yPos <= y + yRange; yPos++) { - Block localBlock = world.getBlock(xPos, yPos, zPos); - int localMeta = world.getBlockMetadata(xPos, yPos, zPos); - int hlvl = -1; - if (localBlock.getHarvestTool(localMeta) != null && localBlock.getHarvestTool(localMeta).equals(this.getHarvestType())) - hlvl = localBlock.getHarvestLevel(localMeta); - float localHardness = localBlock == null ? Float.MAX_VALUE : localBlock.getBlockHardness(world, xPos, yPos, zPos); - - if (hlvl <= toolLevel && localHardness - 1.5 <= blockHardness) + for (int zPos = z - zRange; zPos <= z + zRange; zPos++) { - boolean cancelHarvest = false; - for (ActiveToolMod mod : TConstructRegistry.activeModifiers) + Block block = world.getBlock(xPos, yPos, zPos); + for (Material mat : this.materials) { - if (mod.beforeBlockBreak(this, stack, xPos, yPos, zPos, player)) - cancelHarvest = true; - } - - if (!cancelHarvest) - { - if (localBlock != null && !(localHardness < 0)) - { - for (int iter = 0; iter < materials.length; iter++) - { - if (materials[iter] == localBlock.getMaterial() || localBlock == Blocks.monster_egg) - { - if (!player.capabilities.isCreativeMode) - { - if (localBlock.removedByPlayer(world, player, xPos, yPos, zPos)) - { - localBlock.onBlockDestroyedByPlayer(world, xPos, yPos, zPos, localMeta); - } - localBlock.harvestBlock(world, player, xPos, yPos, zPos, localMeta); - localBlock.onBlockHarvested(world, xPos, yPos, zPos, localMeta, player); - if (blockHardness > 0f) - onBlockDestroyed(stack, world, localBlock, xPos, yPos, zPos, player); - world.func_147479_m(x, y, z); - } - else - { - WorldHelper.setBlockToAir(world, xPos, yPos, zPos); - world.func_147479_m(x, y, z); - } - } - } - } + if (block != null && mat == block.getMaterial() + && block.getPlayerRelativeBlockHardness(mplayer, world, x, yPos, z) > 0) + mplayer.theItemInWorldManager.tryHarvestBlock(xPos, yPos, zPos); } } } } + tags.setBoolean("AOEBreaking", false); } } - if (!world.isRemote) - world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(block) + (meta << 12)); - return true; + return super.onBlockStartBreak(stack, x, y, z, player); } @Override diff --git a/src/main/java/tconstruct/items/tools/LumberAxe.java b/src/main/java/tconstruct/items/tools/LumberAxe.java index 137bd177..30293a7f 100644 --- a/src/main/java/tconstruct/items/tools/LumberAxe.java +++ b/src/main/java/tconstruct/items/tools/LumberAxe.java @@ -5,6 +5,7 @@ import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -135,150 +136,81 @@ public class LumberAxe extends HarvestTool if (!stack.hasTagCompound()) return false; - World world = player.worldObj; - final Block wood = world.getBlock(x, y, z); - ; - if (wood == null) + if (player instanceof EntityPlayerMP) { - return super.onBlockStartBreak(stack, x, y, z, player); - } - if (wood.isWood(world, x, y, z) || wood.getMaterial() == Material.sponge) - { - int height = y; - boolean foundTop = false; - do + EntityPlayerMP mplayer = (EntityPlayerMP) player; + NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool"); + if (!tags.hasKey("AOEBreaking") || !tags.getBoolean("AOEBreaking")) { - height++; - Block block = world.getBlock(x, height, z); - if (block != wood) + tags.setBoolean("AOEBreaking", true); + World world = player.worldObj; + Block block = world.getBlock(x, y, z); + if (block.isWood(world, x, y, z)) { - height--; - foundTop = true; - } - } while (!foundTop); - - int numLeaves = 0; - if (height - y < 50) - { - for (int xPos = x - 1; xPos <= x + 1; xPos++) - { - for (int yPos = height - 1; yPos <= height + 1; yPos++) + int height = y; + while (true) { - for (int zPos = z - 1; zPos <= z + 1; zPos++) + height++; + if (block != world.getBlock(x, height, z)) { - Block leaves = world.getBlock(xPos, yPos, zPos); - if (leaves != null && leaves.isLeaves(world, xPos, yPos, zPos)) - numLeaves++; + height--; + break; } } + + int numLeaves = 0; + if (height - y < 50) + { + for (int xPos = x - 1; xPos <= x + 1; xPos++) + { + for (int zPos = z - 1; zPos <= z + 1; zPos++) + { + for (int yPos = height - 1; yPos <= height + 1; yPos++) + { + Block leaf = world.getBlock(xPos, yPos, zPos); + if (leaf != null && leaf.isLeaves(world, xPos, yPos, zPos)) + numLeaves++; + } + } + } + } + + if (numLeaves > 3) + breakTree(world, x, y, z, stack, tags, block, world.getBlockMetadata(x, y, z), mplayer); + else + destroyWood(world, x, y, z, stack, tags, mplayer); } + else if (block.getMaterial() == Material.wood) + { + destroyWood(world, x, y, z, stack, tags, mplayer); + } + tags.setBoolean("AOEBreaking", false); } - - NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool"); - int meta = world.getBlockMetadata(x, y, z); - if (numLeaves > 3) - breakTree(world, x, y, z, stack, tags, wood, meta, player); - else - destroyWood(world, x, y, z, stack, tags, player); - - if (!world.isRemote) - world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(wood) + (meta << 12)); - } - else if (wood.getMaterial() == Material.wood) - { - NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool"); - int meta = world.getBlockMetadata(x, y, z); - destroyWood(world, x, y, z, stack, tags, player); - if (!world.isRemote) - world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(wood) + (meta << 12)); } return super.onBlockStartBreak(stack, x, y, z, player); } - void breakTree (World world, int x, int y, int z, ItemStack stack, NBTTagCompound tags, Block bID, int meta, EntityPlayer player) + void breakTree (World world, int x, int y, int z, ItemStack stack, NBTTagCompound tags, Block bID, int meta, EntityPlayerMP player) { - Block block; for (int xPos = x - 1; xPos <= x + 1; xPos++) { for (int yPos = y; yPos <= y + 1; yPos++) { for (int zPos = z - 1; zPos <= z + 1; zPos++) { - if (!(tags.getBoolean("Broken"))) + Block block = world.getBlock(xPos, yPos, zPos); + if (bID == block && world.getBlockMetadata(xPos, yPos, zPos) == meta) { - Block localblock = world.getBlock(xPos, yPos, zPos); - if (bID == localblock) - { - block = localblock; - meta = world.getBlockMetadata(xPos, yPos, zPos); - int hlvl = block.getHarvestLevel(meta); - - if (hlvl <= tags.getInteger("HarvestLevel")) - { - boolean cancelHarvest = false; - for (ActiveToolMod mod : TConstructRegistry.activeModifiers) - { - if (mod.beforeBlockBreak(this, stack, xPos, yPos, zPos, player)) - cancelHarvest = true; - } - - if (cancelHarvest) - { - breakTree(world, xPos, yPos, zPos, stack, tags, bID, meta, player); - } - else - { - if (localblock == bID && world.getBlockMetadata(xPos, yPos, zPos) % 4 == meta % 4) - { - /* - * world.setBlock(xPos, yPos, zPos, 0, - * 0, 3); if - * (!player.capabilities.isCreativeMode) - * { - * Block.blocksList[bID].harvestBlock(world - * , player, xPos, yPos, zPos, meta); - * onBlockDestroyed(stack, world, bID, - * xPos, yPos, zPos, player); } - */ - if (!player.capabilities.isCreativeMode) - { - if (block.removedByPlayer(world, player, xPos, yPos, zPos)) - { - block.onBlockDestroyedByPlayer(world, xPos, yPos, zPos, meta); - } - block.harvestBlock(world, player, xPos, yPos, zPos, meta); - block.onBlockHarvested(world, xPos, yPos, zPos, meta, player); - onBlockDestroyed(stack, world, localblock, xPos, yPos, zPos, player); - } - else - { - WorldHelper.setBlockToAir(world, xPos, yPos, zPos); - } - breakTree(world, xPos, yPos, zPos, stack, tags, bID, meta, player); - } - /* - * else { Block leaves = - * Block.blocksList[localID]; if (leaves != - * null && leaves.isLeaves(world, xPos, - * yPos, zPos)) { - * WorldHelper.setBlockToAir(world, xPos, - * yPos, zPos); if - * (!player.capabilities.isCreativeMode) { - * Block.blocksList[bID].harvestBlock(world, - * player, xPos, yPos, zPos, meta); - * onBlockDestroyed(stack, world, bID, xPos, - * yPos, zPos, player); } } } - */ - } - } - } + if (block.getPlayerRelativeBlockHardness(player, world, x, yPos, z) > 0) + player.theItemInWorldManager.tryHarvestBlock(x, yPos, z); + breakTree(world, xPos, yPos, zPos, stack, tags, bID, meta, player); } } } } } - void destroyWood (World world, int x, int y, int z, ItemStack stack, NBTTagCompound tags, EntityPlayer player) + void destroyWood (World world, int x, int y, int z, ItemStack stack, NBTTagCompound tags, EntityPlayerMP player) { for (int xPos = x - 1; xPos <= x + 1; xPos++) { @@ -286,36 +218,10 @@ public class LumberAxe extends HarvestTool { for (int zPos = z - 1; zPos <= z + 1; zPos++) { - if (!(tags.getBoolean("Broken"))) - { - Block block = world.getBlock(xPos, yPos, zPos); - int meta = world.getBlockMetadata(xPos, yPos, zPos); - int hlvl = block.getHarvestLevel(meta); - - if (block != null && block.getMaterial() == Material.wood) - { - if (hlvl <= tags.getInteger("HarvestLevel")) - { - boolean cancelHarvest = false; - for (ActiveToolMod mod : TConstructRegistry.activeModifiers) - { - if (mod.beforeBlockBreak(this, stack, xPos, yPos, zPos, player)) - cancelHarvest = true; - } - - if (!cancelHarvest) - { - WorldHelper.setBlockToAir(world, xPos, yPos, zPos); - if (!player.capabilities.isCreativeMode) - { - // TODO harvestBlock - block.harvestBlock(world, player, xPos, yPos, zPos, meta); - onBlockDestroyed(stack, world, block, xPos, yPos, zPos, player); - } - } - } - } - } + Block block = world.getBlock(xPos, yPos, zPos); + if (block != null && block.getMaterial() == Material.wood + && block.getPlayerRelativeBlockHardness(player, world, xPos, yPos, zPos) > 0) + player.theItemInWorldManager.tryHarvestBlock(xPos, yPos, zPos); } } } diff --git a/src/main/java/tconstruct/items/tools/Scythe.java b/src/main/java/tconstruct/items/tools/Scythe.java index b639c25a..c808ed2e 100644 --- a/src/main/java/tconstruct/items/tools/Scythe.java +++ b/src/main/java/tconstruct/items/tools/Scythe.java @@ -12,6 +12,7 @@ import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -162,90 +163,33 @@ public class Scythe extends Weapon if (!stack.hasTagCompound()) return false; - World world = player.worldObj; - final Block blockB = world.getBlock(x, y, z); - final int meta = world.getBlockMetadata(x, y, z); - if (!stack.hasTagCompound()) - return false; - NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool"); - boolean butter = EnchantmentHelper.getEnchantmentLevel(Enchantment.silkTouch.effectId, stack) > 0; - for (int xPos = x - 1; xPos <= x + 1; xPos++) + if (player instanceof EntityPlayerMP) { - for (int yPos = y - 1; yPos <= y + 1; yPos++) + EntityPlayerMP mplayer = (EntityPlayerMP) player; + World world = player.worldObj; + NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool"); + if (!tags.hasKey("AOEBreaking") || !tags.getBoolean("AOEBreaking")) { - for (int zPos = z - 1; zPos <= z + 1; zPos++) + tags.setBoolean("AOEBreaking", true); + for (int xPos = x - 1; xPos <= x + 1; xPos++) { - if (!(tags.getBoolean("Broken"))) + for (int yPos = y - 1; yPos <= y + 1; yPos++) { - boolean cancelHarvest = false; - for (ActiveToolMod mod : TConstructRegistry.activeModifiers) + for (int zPos = z - 1; zPos <= z + 1; zPos++) { - if (mod.beforeBlockBreak(this, stack, xPos, yPos, zPos, player)) - cancelHarvest = true; - } - - if (!cancelHarvest) - { - Block localBlock = world.getBlock(xPos, yPos, zPos); - int localMeta = world.getBlockMetadata(xPos, yPos, zPos); - float localHardness = localBlock == null ? Float.MAX_VALUE : localBlock.getBlockHardness(world, xPos, yPos, zPos); - if (localBlock != null)// && (block.blockMaterial == Material.leaves || block.isLeaves(world, xPos, yPos, zPos))) + Block block = world.getBlock(xPos, yPos, zPos); + for (Material mat : this.materials) { - for (int iter = 0; iter < materials.length; iter++) - { - if (materials[iter] == localBlock.getMaterial()) - { - if (!player.capabilities.isCreativeMode) - { - if (butter && localBlock instanceof IShearable && ((IShearable) localBlock).isShearable(stack, player.worldObj, x, y, z)) - { - ArrayList drops = ((IShearable) localBlock).onSheared(stack, player.worldObj, x, y, z, - EnchantmentHelper.getEnchantmentLevel(Enchantment.fortune.effectId, stack)); - Random rand = new Random(); - - if (!world.isRemote) - for (ItemStack dropStack : drops) - { - float f = 0.7F; - double d = (double) (rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D; - double d1 = (double) (rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D; - double d2 = (double) (rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D; - EntityItem entityitem = new EntityItem(player.worldObj, (double) xPos + d, (double) yPos + d1, (double) zPos + d2, dropStack); - entityitem.delayBeforeCanPickup = 10; - player.worldObj.spawnEntityInWorld(entityitem); - } - - if (localHardness > 0f) - onBlockDestroyed(stack, world, localBlock, xPos, yPos, zPos, player); - player.addStat(StatList.mineBlockStatArray[Block.getIdFromBlock(localBlock)], 1); - world.setBlockToAir(xPos, yPos, zPos); - } - else - { - if (localBlock.removedByPlayer(world, player, xPos, yPos, zPos)) - { - localBlock.onBlockDestroyedByPlayer(world, xPos, yPos, zPos, localMeta); - } - localBlock.harvestBlock(world, player, xPos, yPos, zPos, localMeta); - localBlock.onBlockHarvested(world, xPos, yPos, zPos, localMeta, player); - if (localHardness > 0f) - onBlockDestroyed(stack, world, localBlock, xPos, yPos, zPos, player); - } - } - else - { - world.setBlockToAir(xPos, yPos, zPos); - } - } - } + if (block != null && mat == block.getMaterial() + && block.getPlayerRelativeBlockHardness(mplayer, world, x, yPos, z) > 0) + mplayer.theItemInWorldManager.tryHarvestBlock(xPos, yPos, zPos); } } } } + tags.setBoolean("AOEBreaking", false); } } - if (!world.isRemote) - world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(blockB) + (meta << 12)); return super.onBlockStartBreak(stack, x, y, z, player); } diff --git a/src/main/java/tconstruct/library/tools/DualHarvestTool.java b/src/main/java/tconstruct/library/tools/DualHarvestTool.java index f6c291ed..ff15a871 100644 --- a/src/main/java/tconstruct/library/tools/DualHarvestTool.java +++ b/src/main/java/tconstruct/library/tools/DualHarvestTool.java @@ -20,44 +20,6 @@ public abstract class DualHarvestTool extends HarvestTool super(baseDamage); } - @Override - public boolean onBlockStartBreak (ItemStack stack, int x, int y, int z, EntityPlayer player) - { - NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool"); - World world = player.worldObj; - int meta = world.getBlockMetadata(x, y, z); - Block block = player.worldObj.getBlock(x, y, z); - if (block == null || block == Blocks.air) - return false; - int hlvl = -1; - int shlvl = -1; - if (block.getHarvestTool(meta) == null || block.getHarvestTool(meta).equals(getHarvestType())) - hlvl = block.getHarvestLevel(meta); - if (block.getHarvestTool(meta) == null || block.getHarvestTool(meta).equals(getSecondHarvestType())) - shlvl = block.getHarvestLevel(meta); - - if (hlvl <= tags.getInteger("HarvestLevel") && shlvl <= tags.getInteger("HarvestLevel2")) - { - boolean cancelHarvest = false; - for (ActiveToolMod mod : TConstructRegistry.activeModifiers) - { - if (mod.beforeBlockBreak(this, stack, x, y, z, player)) - cancelHarvest = true; - } - - return cancelHarvest; - } - else - { - if (!player.capabilities.isCreativeMode) - onBlockDestroyed(stack, world, block, x, y, z, player); - WorldHelper.setBlockToAir(world, x, y, z); - if (!world.isRemote) - world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(block) + (meta << 12)); - return true; - } - } - @Override public float getDigSpeed (ItemStack stack, Block block, int meta) { diff --git a/src/main/java/tconstruct/library/tools/HarvestTool.java b/src/main/java/tconstruct/library/tools/HarvestTool.java index 6b265ef3..3efb07ee 100644 --- a/src/main/java/tconstruct/library/tools/HarvestTool.java +++ b/src/main/java/tconstruct/library/tools/HarvestTool.java @@ -22,96 +22,6 @@ public abstract class HarvestTool extends ToolCore super(baseDamage); } - @Override - public boolean onBlockStartBreak (ItemStack stack, int x, int y, int z, EntityPlayer player) - { - if (!stack.hasTagCompound()) - return false; - - NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool"); - World world = player.worldObj; - Block block = player.worldObj.getBlock(x, y, z); - int meta = world.getBlockMetadata(x, y, z); - // Block block = Block.blocksList[bID]; - if (block == null || block == Blocks.air) - return false; - int hlvl = -1; - if (!(tags.getBoolean("Broken"))) - { - Block localBlock = world.getBlock(x, y, z); - int localMeta = world.getBlockMetadata(x, y, z); - if (block.getHarvestTool(meta) != null && block.getHarvestTool(meta).equals(this.getHarvestType())) - hlvl = block.getHarvestLevel(meta); - int toolLevel = tags.getInteger("HarvestLevel"); - float blockHardness = block.getBlockHardness(world, x, y, z); - float localHardness = localBlock == null ? Float.MAX_VALUE : localBlock.getBlockHardness(world, x, y, z); - - if (hlvl <= toolLevel && localHardness - 1.5 <= blockHardness) - { - boolean cancelHarvest = false; - for (ActiveToolMod mod : TConstructRegistry.activeModifiers) - { - if (mod.beforeBlockBreak(this, stack, x, y, z, player)) - cancelHarvest = true; - } - - if (!cancelHarvest) - { - if (localBlock != null && !(localHardness < 0)) - { - - boolean isEffective = false; - - for (int iter = 0; iter < getEffectiveMaterials().length; iter++) - { - if (getEffectiveMaterials()[iter] == localBlock.getMaterial() || localBlock == Blocks.monster_egg) - { - isEffective = true; - break; - } - } - - if (localBlock.getMaterial().isToolNotRequired()) - { - isEffective = true; - } - - if (!player.capabilities.isCreativeMode) - { - if (isEffective) - { - if (localBlock.removedByPlayer(world, player, x, y, z)) - { - localBlock.onBlockDestroyedByPlayer(world, x, y, z, localMeta); - } - localBlock.harvestBlock(world, player, x, y, z, localMeta); - localBlock.onBlockHarvested(world, x, y, z, localMeta, player); - if (blockHardness > 0f) - onBlockDestroyed(stack, world, localBlock, x, y, z, player); - world.func_147479_m(x, y, z); - } - else - { - WorldHelper.setBlockToAir(world, x, y, z); - world.func_147479_m(x, y, z); - } - - } - else - { - WorldHelper.setBlockToAir(world, x, y, z); - world.func_147479_m(x, y, z); - } - } - } - } - } - if (!world.isRemote) - world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(block) + (meta << 12)); - return true; - - } - @Override public float getDigSpeed (ItemStack stack, Block block, int meta) { diff --git a/src/main/java/tconstruct/library/tools/ToolCore.java b/src/main/java/tconstruct/library/tools/ToolCore.java index ab0fae9b..a5baf602 100644 --- a/src/main/java/tconstruct/library/tools/ToolCore.java +++ b/src/main/java/tconstruct/library/tools/ToolCore.java @@ -606,14 +606,28 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem @Override public boolean onBlockStartBreak (ItemStack stack, int x, int y, int z, EntityPlayer player) { - boolean cancelHarvest = false; - for (ActiveToolMod mod : TConstructRegistry.activeModifiers) - { - if (mod.beforeBlockBreak(this, stack, x, y, z, player)) - cancelHarvest = true; - } + World world = player.worldObj; + if (stack.getTagCompound().getCompoundTag("InfiTool").getBoolean("Lava") && world.isRemote) + for (int i = 0; i < 5; i++) + { + float f = (float) x + random.nextFloat(); + float f1 = (float) y + random.nextFloat(); + float f2 = (float) z + random.nextFloat(); + float f3 = 0.52F; + float f4 = random.nextFloat() * 0.6F - 0.3F; + world.spawnParticle("smoke", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); + world.spawnParticle("flame", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); - return cancelHarvest; + world.spawnParticle("smoke", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); + world.spawnParticle("flame", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); + + world.spawnParticle("smoke", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D); + world.spawnParticle("flame", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D); + + world.spawnParticle("smoke", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D); + world.spawnParticle("flame", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D); + } + return false; } @Override diff --git a/src/main/java/tconstruct/modifiers/tools/TActiveOmniMod.java b/src/main/java/tconstruct/modifiers/tools/TActiveOmniMod.java index 076474ec..f8f82834 100644 --- a/src/main/java/tconstruct/modifiers/tools/TActiveOmniMod.java +++ b/src/main/java/tconstruct/modifiers/tools/TActiveOmniMod.java @@ -58,91 +58,6 @@ public class TActiveOmniMod extends ActiveToolMod return false; TRepo.modLapis.midStreamModify(stack, tool); - World world = entity.worldObj; - Block block = entity.worldObj.getBlock(x, y, z); - int meta = world.getBlockMetadata(x, y, z); - // TODO do we need the next to lines???????? - if (block == null) - return false; - - if (tags.getBoolean("Lava") && block.quantityDropped(meta, 0, random) != 0) - { - ItemStack smeltStack = new ItemStack(block.getItemDropped(meta, random, 0), block.quantityDropped(meta, 0, random), block.damageDropped(meta)); - if (smeltStack.getItem() == null) - return false; - ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(smeltStack); - if (result != null) - { - WorldHelper.setBlockToAir(world, x, y, z); - if (entity instanceof EntityPlayer && !((EntityPlayer) entity).capabilities.isCreativeMode) - tool.onBlockDestroyed(stack, world, block, x, y, z, entity); - if (!world.isRemote) - { - ItemStack spawnme = result.copy(); - if (!(result.getItem() instanceof ItemBlock) && PHConstruct.lavaFortuneInteraction) - { - int loot = EnchantmentHelper.getEnchantmentLevel(Enchantment.fortune.effectId, stack); - if (loot > 0) - { - spawnme.stackSize *= (random.nextInt(loot + 1) + 1); - } - } - EntityItem entityitem = new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, spawnme); - - entityitem.delayBeforeCanPickup = 10; - world.spawnEntityInWorld(entityitem); - world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(block) + (meta << 12)); - - int i = spawnme.stackSize; - float f = FurnaceRecipes.smelting().func_151398_b(spawnme); - int j; - - if (f == 0.0F) - { - i = 0; - } - else if (f < 1.0F) - { - j = MathHelper.floor_float((float) i * f); - - if (j < MathHelper.ceiling_float_int((float) i * f) && (float) Math.random() < (float) i * f - (float) j) - { - ++j; - } - - i = j; - } - - while (i > 0) - { - j = EntityXPOrb.getXPSplit(i); - i -= j; - entity.worldObj.spawnEntityInWorld(new EntityXPOrb(world, x, y + 0.5, z, j)); - } - } - for (int i = 0; i < 5; i++) - { - float f = (float) x + random.nextFloat(); - float f1 = (float) y + random.nextFloat(); - float f2 = (float) z + random.nextFloat(); - float f3 = 0.52F; - float f4 = random.nextFloat() * 0.6F - 0.3F; - world.spawnParticle("smoke", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); - world.spawnParticle("flame", f - f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); - - world.spawnParticle("smoke", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); - world.spawnParticle("flame", f + f3, f1, f2 + f4, 0.0D, 0.0D, 0.0D); - - world.spawnParticle("smoke", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D); - world.spawnParticle("flame", f + f4, f1, f2 - f3, 0.0D, 0.0D, 0.0D); - - world.spawnParticle("smoke", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D); - world.spawnParticle("flame", f + f4, f1, f2 + f3, 0.0D, 0.0D, 0.0D); - } - return true; - } - } - return false; } diff --git a/src/main/java/tconstruct/util/TEventHandler.java b/src/main/java/tconstruct/util/TEventHandler.java index 3dce4910..5521d2b8 100644 --- a/src/main/java/tconstruct/util/TEventHandler.java +++ b/src/main/java/tconstruct/util/TEventHandler.java @@ -50,6 +50,8 @@ import net.minecraftforge.event.entity.player.FillBucketEvent; import net.minecraftforge.event.entity.player.PlayerInteractEvent; import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action; import net.minecraftforge.oredict.OreDictionary.OreRegisterEvent; +import net.minecraftforge.event.world.BlockEvent.HarvestDropsEvent; +import net.minecraftforge.event.world.BlockEvent.BreakEvent; import tconstruct.TConstruct; import tconstruct.achievements.TAchievements; import tconstruct.blocks.LiquidMetalFinite; @@ -58,6 +60,7 @@ import tconstruct.common.TRepo; import tconstruct.entity.BlueSlime; import tconstruct.items.tools.FryingPan; import tconstruct.library.TConstructRegistry; +import tconstruct.library.ActiveToolMod; import tconstruct.library.event.PartBuilderEvent; import tconstruct.library.event.ToolCraftEvent; import tconstruct.library.tools.ArrowMaterial; @@ -747,4 +750,40 @@ public class TEventHandler } } + @SubscribeEvent + public void harvestBlock (HarvestDropsEvent event) + { + if (event.harvester == null) + return; + ItemStack stack = event.harvester.getCurrentEquippedItem(); + if (stack == null || stack.getItem() == null || !(stack.getItem() instanceof ToolCore)) + return; + if (stack.getTagCompound().getCompoundTag("InfiTool").getBoolean("Lava")) + { + for (int i = 0; i < event.drops.size(); i++) + { + ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(event.drops.get(i)); + if (result != null) + event.drops.set(i, result.copy()); + } + } + } + + @SubscribeEvent + public void breakBlock (BreakEvent event) + { + ItemStack stack = event.getPlayer().getCurrentEquippedItem(); + if (stack == null || stack.getItem() == null || !(stack.getItem() instanceof ToolCore)) + return; + if (stack.getTagCompound().getCompoundTag("InfiTool").getBoolean("Broken")) + { + event.setCanceled(true); + } + else + { + for (ActiveToolMod mod : TConstructRegistry.activeModifiers) + if (mod.beforeBlockBreak((ToolCore)stack.getItem(), stack, event.x, event.y, event.z, event.getPlayer())) + event.setCanceled(true); + } + } } From 3a127a7bf08f3b2f81733c65fc7ad4ff04bff427 Mon Sep 17 00:00:00 2001 From: Alexander Behrhof Date: Sat, 21 Jun 2014 13:38:24 -0400 Subject: [PATCH 06/12] Fix missing aluminium_dust texture, It should of been aluminum_dust. --- src/main/java/tconstruct/items/MaterialItem.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/tconstruct/items/MaterialItem.java b/src/main/java/tconstruct/items/MaterialItem.java index 1361712b..2cec4f4c 100644 --- a/src/main/java/tconstruct/items/MaterialItem.java +++ b/src/main/java/tconstruct/items/MaterialItem.java @@ -32,6 +32,6 @@ public class MaterialItem extends CraftingItem static String[] craftingTextures = new String[] { "paperstack", "slimecrystal", "searedbrick", "cobaltingot", "arditeingot", "manyullyningot", "mossball", "lavacrystal", "necroticbone", "copperingot", "tiningot", "aluminumingot", "aluminumraw", "bronzeingot", "alubrassingot", "alumiteingot", "steelingot", "blueslimecrystal", "obsidianingot", "nugget_iron", "nugget_copper", "nugget_tin", "nugget_aluminum", "", "nugget_alubrass", "silkycloth", "silkyjewel", "nugget_obsidian", "nugget_cobalt", "nugget_ardite", "nugget_manyullyn", - "nugget_bronze", "nugget_alumite", "nugget_steel", "pigironingot", "nugget_pigiron", "glueball", "searedbrick_nether", "ardite_dust", "cobalt_dust", "aluminium_dust", "manyullyn_dust", + "nugget_bronze", "nugget_alumite", "nugget_steel", "pigironingot", "nugget_pigiron", "glueball", "searedbrick_nether", "ardite_dust", "cobalt_dust", "aluminum_dust", "manyullyn_dust", "alubrass_dust" }; } From caf084edcadfa97d2757aedb59db05c8e390cefc Mon Sep 17 00:00:00 2001 From: Alexander Behrhof Date: Wed, 25 Jun 2014 21:01:20 -0400 Subject: [PATCH 07/12] Updating to 1.7.10_pre4 --- build.gradle | 8 ++++---- build.properties | 7 ++++--- src/main/java/tconstruct/TConstruct.java | 2 +- src/main/java/tconstruct/client/TClientEvents.java | 2 +- .../tconstruct/client/event/EventCloakRender.java | 12 ++++++------ src/main/java/tconstruct/entity/CartEntity.java | 8 ++++---- .../tconstruct/entity/projectile/ArrowEntity.java | 12 ++++++------ .../java/tconstruct/library/tools/AbilityHelper.java | 6 +++--- src/main/java/tconstruct/util/MiningExplosion.java | 4 ++-- 9 files changed, 31 insertions(+), 30 deletions(-) diff --git a/build.gradle b/build.gradle index acea60c1..d33b9d1b 100644 --- a/build.gradle +++ b/build.gradle @@ -65,10 +65,10 @@ configurations { dependencies { compile "mantle:Mantle:${config.minecraft_version}-${config.mantle_version}:deobf" - compile "codechicken:CodeChickenLib:${config.minecraft_version}-${config.CCLIB_version}:dev" - compile "codechicken:ForgeMultipart:${config.minecraft_version}-${config.FMP_version}:dev" - compile "codechicken:CodeChickenCore:${config.minecraft_version}-${config.ccc_version}:dev" - compile "codechicken:NotEnoughItems:${config.minecraft_version}-${config.NEI_version}:dev" + compile "codechicken:CodeChickenLib:${config.minecraft_version_old}-${config.CCLIB_version}:dev" + compile "codechicken:ForgeMultipart:${config.minecraft_version_old}-${config.FMP_version}:dev" + compile "codechicken:CodeChickenCore:${config.minecraft_version_old}-${config.ccc_version}:dev" + compile "codechicken:NotEnoughItems:${config.minecraft_version_old}-${config.NEI_version}:dev" compile "mcp.mobius.waila:Waila:${config.waila_version}:dev" deployerJars 'org.apache.maven.wagon:wagon-ssh:2.2' } diff --git a/build.properties b/build.properties index ef163b1f..d6282785 100644 --- a/build.properties +++ b/build.properties @@ -1,6 +1,7 @@ -minecraft_version=1.7.2 -forge_version=10.12.1.1101 -mantle_version=145.3a637c2 +minecraft_version=1.7.10_pre4 +minecraft_version_old=1.7.2 +forge_version=10.12.2.1143-prerelease +mantle_version=150.1d8388b FMP_version=1.1.0.268 CCLIB_version=1.1.0.77 NEI_version=1.0.1 diff --git a/src/main/java/tconstruct/TConstruct.java b/src/main/java/tconstruct/TConstruct.java index 767be6ca..de7249cc 100644 --- a/src/main/java/tconstruct/TConstruct.java +++ b/src/main/java/tconstruct/TConstruct.java @@ -182,7 +182,7 @@ public class TConstruct packetPipeline.initalise(); if (event.getSide() == Side.CLIENT) { - MinecraftForge.EVENT_BUS.register(new EventCloakRender()); + //MinecraftForge.EVENT_BUS.register(new EventCloakRender()); } DimensionBlacklist.getBadBimensions(); diff --git a/src/main/java/tconstruct/client/TClientEvents.java b/src/main/java/tconstruct/client/TClientEvents.java index 999e7496..8cb54552 100644 --- a/src/main/java/tconstruct/client/TClientEvents.java +++ b/src/main/java/tconstruct/client/TClientEvents.java @@ -111,7 +111,7 @@ public class TClientEvents { updateCounter++; - ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight); + ScaledResolution scaledresolution = new ScaledResolution(this.mc, this.mc.displayWidth, this.mc.displayHeight); int scaledWidth = scaledresolution.getScaledWidth(); int scaledHeight = scaledresolution.getScaledHeight(); int xBasePos = scaledWidth / 2 - 91; diff --git a/src/main/java/tconstruct/client/event/EventCloakRender.java b/src/main/java/tconstruct/client/event/EventCloakRender.java index 4e0e1dc8..2507d365 100644 --- a/src/main/java/tconstruct/client/event/EventCloakRender.java +++ b/src/main/java/tconstruct/client/event/EventCloakRender.java @@ -62,9 +62,9 @@ public class EventCloakRender capePlayers.add(abstractClientPlayer); - abstractClientPlayer.getTextureCape().textureUploaded = false; - new Thread(new CloakThread(abstractClientPlayer, cloakURL)).start(); - event.renderCape = true; + //abstractClientPlayer.getTextureCape().textureUploaded = false; + //new Thread(new CloakThread(abstractClientPlayer, cloakURL)).start(); + //event.renderCape = true; } } } @@ -132,9 +132,9 @@ public class EventCloakRender try { Image cape = new ImageIcon(new URL(cloakURL)).getImage(); - BufferedImage bo = new BufferedImage(cape.getWidth(null), cape.getHeight(null), BufferedImage.TYPE_INT_ARGB); - bo.getGraphics().drawImage(cape, 0, 0, null); - abstractClientPlayer.getTextureCape().setBufferedImage(bo); + //BufferedImage bo = new BufferedImage(cape.getWidth(null), cape.getHeight(null), BufferedImage.TYPE_INT_ARGB); + //bo.getGraphics().drawImage(cape, 0, 0, null); + //abstractClientPlayer.getTextureCape().setBufferedImage(bo); } catch (MalformedURLException e) { diff --git a/src/main/java/tconstruct/entity/CartEntity.java b/src/main/java/tconstruct/entity/CartEntity.java index c6b04377..8243007c 100644 --- a/src/main/java/tconstruct/entity/CartEntity.java +++ b/src/main/java/tconstruct/entity/CartEntity.java @@ -632,7 +632,7 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS par3 += 0.5D; } - return this.worldObj.getWorldVec3Pool().getVecFromPool(par1, par3, par5); + return Vec3.createVectorHelper(par1, par3, par5); } else { @@ -767,9 +767,9 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS { double var10 = par1Entity.posX - this.posX; double var12 = par1Entity.posZ - this.posZ; - Vec3 var14 = this.worldObj.getWorldVec3Pool().getVecFromPool(var10, 0.0D, var12).normalize(); - Vec3 var15 = this.worldObj.getWorldVec3Pool() - .getVecFromPool((double) MathHelper.cos(this.rotationYaw * (float) Math.PI / 180.0F), 0.0D, (double) MathHelper.sin(this.rotationYaw * (float) Math.PI / 180.0F)) + Vec3 var14 = Vec3.createVectorHelper(var10, 0.0D, var12).normalize(); + Vec3 var15 = Vec3.createVectorHelper + ((double) MathHelper.cos(this.rotationYaw * (float) Math.PI / 180.0F), 0.0D, (double) MathHelper.sin(this.rotationYaw * (float) Math.PI / 180.0F)) .normalize(); double var16 = Math.abs(var14.dotProduct(var15)); diff --git a/src/main/java/tconstruct/entity/projectile/ArrowEntity.java b/src/main/java/tconstruct/entity/projectile/ArrowEntity.java index 313a68b9..6dcfa97b 100644 --- a/src/main/java/tconstruct/entity/projectile/ArrowEntity.java +++ b/src/main/java/tconstruct/entity/projectile/ArrowEntity.java @@ -103,7 +103,7 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa i.setBlockBoundsBasedOnState(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f); AxisAlignedBB axisalignedbb = i.getCollisionBoundingBoxFromPool(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f); - if (axisalignedbb != null && axisalignedbb.isVecInside(this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ))) + if (axisalignedbb != null && axisalignedbb.isVecInside(Vec3.createVectorHelper(this.posX, this.posY, this.posZ))) { this.inGround = true; } @@ -143,15 +143,15 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa else { ++this.ticksInAir; - Vec3 vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); - Vec3 vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + Vec3 vec3 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); + Vec3 vec31 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); MovingObjectPosition movingobjectposition = this.worldObj.func_147447_a(vec3, vec31, false, true, false); - vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); - vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); + vec3 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ); + vec31 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); if (movingobjectposition != null) { - vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); + vec31 = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); } Entity entity = null; diff --git a/src/main/java/tconstruct/library/tools/AbilityHelper.java b/src/main/java/tconstruct/library/tools/AbilityHelper.java index a8c9f880..ea69abca 100644 --- a/src/main/java/tconstruct/library/tools/AbilityHelper.java +++ b/src/main/java/tconstruct/library/tools/AbilityHelper.java @@ -300,7 +300,7 @@ public class AbilityHelper { EntityWolf var3 = (EntityWolf) living; - if (var3.isTamed() && player.getDisplayName().equals(var3.getOwnerName())) + if (var3.isTamed() && player.getDisplayName().equals(var3.func_152113_b())) { return; } @@ -316,7 +316,7 @@ public class AbilityHelper { EntityWolf var5 = (EntityWolf) var4.next(); - if (var5.isTamed() && var5.getEntityToAttack() == null && player.getDisplayName().equals(var5.getOwnerName()) && (!par2 || !var5.isSitting())) + if (var5.isTamed() && var5.getEntityToAttack() == null && player.getDisplayName().equals(var5.func_152113_b()) && (!par2 || !var5.isSitting())) { var5.setSitting(false); var5.setTarget(living); @@ -621,7 +621,7 @@ public class AbilityHelper if (!world.isRemote && player instanceof EntityPlayer) d1 += 1.62D; double d2 = player.prevPosZ + (player.posZ - player.prevPosZ) * (double) f; - Vec3 vec3 = world.getWorldVec3Pool().getVecFromPool(d0, d1, d2); + Vec3 vec3 = Vec3.createVectorHelper(d0, d1, d2); float f3 = MathHelper.cos(-f2 * 0.017453292F - (float) Math.PI); float f4 = MathHelper.sin(-f2 * 0.017453292F - (float) Math.PI); float f5 = -MathHelper.cos(-f1 * 0.017453292F); diff --git a/src/main/java/tconstruct/util/MiningExplosion.java b/src/main/java/tconstruct/util/MiningExplosion.java index b36721e4..1fe2740c 100644 --- a/src/main/java/tconstruct/util/MiningExplosion.java +++ b/src/main/java/tconstruct/util/MiningExplosion.java @@ -104,7 +104,7 @@ public class MiningExplosion extends Explosion int i2 = MathHelper.floor_double(this.explosionZ - (double) this.explosionSize - 1.0D); int j2 = MathHelper.floor_double(this.explosionZ + (double) this.explosionSize + 1.0D); List list = this.world.getEntitiesWithinAABBExcludingEntity(this.exploder, AxisAlignedBB.getBoundingBox((double) i, (double) k, (double) i2, (double) j, (double) l1, (double) j2)); - Vec3 vec3 = this.world.getWorldVec3Pool().getVecFromPool(this.explosionX, this.explosionY, this.explosionZ); + Vec3 vec3 = Vec3.createVectorHelper(this.explosionX, this.explosionY, this.explosionZ); for (int k2 = 0; k2 < list.size(); ++k2) { @@ -134,7 +134,7 @@ public class MiningExplosion extends Explosion if (entity instanceof EntityPlayer) { - this.field_77288_k.put((EntityPlayer) entity, this.world.getWorldVec3Pool().getVecFromPool(d0 * d10, d1 * d10, d2 * d10)); + this.field_77288_k.put((EntityPlayer) entity, Vec3.createVectorHelper(d0 * d10, d1 * d10, d2 * d10)); } } } From 379af72147cee54931f4b295ebee3a2d01041a84 Mon Sep 17 00:00:00 2001 From: 61352151511 Date: Wed, 25 Jun 2014 22:19:15 -0300 Subject: [PATCH 08/12] Add Localizations for Dusts --- resources/assets/tinker/lang/en_US.lang | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resources/assets/tinker/lang/en_US.lang b/resources/assets/tinker/lang/en_US.lang index 379c4d23..6f20f2d7 100644 --- a/resources/assets/tinker/lang/en_US.lang +++ b/resources/assets/tinker/lang/en_US.lang @@ -255,6 +255,11 @@ item.tconstruct.Materials.SteelNugget.name=Steel Nugget item.tconstruct.Materials.PigIronIngot.name=Pig Iron Ingot item.tconstruct.Materials.PigIronNugget.name=Pig Iron Platter item.tconstruct.Materials.GlueBall.name=Ball of Glue +item.tconstruct.Materials.ArditeDust.name=Ardite Dust +item.tconstruct.Materials.CobaltDust.name=Cobalt Dust +item.tconstruct.Materials.AluminumDust.name=Aluminum Dust +item.tconstruct.Materials.ManyullunDust.name=Manyullyn Dust +item.tconstruct.Materials.AluBrassDust.name=Aluminum Brass Dust item.tconstruct.ArmorPattern.helmet.name=Helmet Cast item.tconstruct.ArmorPattern.chestplate.name=Chestplate Cast From d3a0fe679c7d2d5a6b12b1d46170c1aeda5a1afc Mon Sep 17 00:00:00 2001 From: 61352151511 Date: Wed, 25 Jun 2014 22:35:22 -0300 Subject: [PATCH 09/12] Fix Average Shot Damage Tooltip --- resources/assets/tinker/lang/en_US.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/assets/tinker/lang/en_US.lang b/resources/assets/tinker/lang/en_US.lang index 6f20f2d7..16a6d71b 100644 --- a/resources/assets/tinker/lang/en_US.lang +++ b/resources/assets/tinker/lang/en_US.lang @@ -811,4 +811,4 @@ materialtraits.thaumic=Thaumic creativeModLock.tooltip=Target Lock: -attribute.generic.ammo.attackDamage=Average Shot Damage +attribute.name.ammo.attackDamage=Average Shot Damage From 499906beb105774167041dfd9f1c82ae3b7f17f1 Mon Sep 17 00:00:00 2001 From: 61352151511 Date: Thu, 26 Jun 2014 09:59:32 -0300 Subject: [PATCH 10/12] Fix ManyullynDust typo I'm bad at typing D: --- resources/assets/tinker/lang/en_US.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/assets/tinker/lang/en_US.lang b/resources/assets/tinker/lang/en_US.lang index 16a6d71b..fe7f4d14 100644 --- a/resources/assets/tinker/lang/en_US.lang +++ b/resources/assets/tinker/lang/en_US.lang @@ -258,7 +258,7 @@ item.tconstruct.Materials.GlueBall.name=Ball of Glue item.tconstruct.Materials.ArditeDust.name=Ardite Dust item.tconstruct.Materials.CobaltDust.name=Cobalt Dust item.tconstruct.Materials.AluminumDust.name=Aluminum Dust -item.tconstruct.Materials.ManyullunDust.name=Manyullyn Dust +item.tconstruct.Materials.ManyullynDust.name=Manyullyn Dust item.tconstruct.Materials.AluBrassDust.name=Aluminum Brass Dust item.tconstruct.ArmorPattern.helmet.name=Helmet Cast From 716b06bbe656f721b313eee987faebe52859c4df Mon Sep 17 00:00:00 2001 From: TheVikingWarrior Date: Thu, 26 Jun 2014 20:03:34 +0200 Subject: [PATCH 11/12] Update it_IT.lang --- resources/assets/tinker/lang/it_IT.lang | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resources/assets/tinker/lang/it_IT.lang b/resources/assets/tinker/lang/it_IT.lang index f8e48d6b..51163d82 100644 --- a/resources/assets/tinker/lang/it_IT.lang +++ b/resources/assets/tinker/lang/it_IT.lang @@ -257,6 +257,11 @@ item.tconstruct.Materials.SteelNugget.name=Pepita d'Acciaio item.tconstruct.Materials.PigIronIngot.name=Lingotto di Ferro Suino item.tconstruct.Materials.PigIronNugget.name=Piatto di Ferro Suino item.tconstruct.Materials.GlueBall.name=Palla di Colla +item.tconstruct.Materials.ArditeDust.name=Polvere di Ardite +item.tconstruct.Materials.CobaltDust.name=Polvere di Coblato +item.tconstruct.Materials.AluminumDust.name=Polvere di Alluminio +item.tconstruct.Materials.ManyullynDust.name=Polvere di Manyullyn +item.tconstruct.Materials.AluBrassDust.name=Polvere di Ottone item.tconstruct.helmetWood.name=Elmo di Legno item.tconstruct.chestplateWood.name=Corazza di Legno From 6ca6f9eacf701d0ae98838db31690f49cf0ffbfd Mon Sep 17 00:00:00 2001 From: Alexander Behrhof Date: Thu, 26 Jun 2014 16:40:59 -0400 Subject: [PATCH 12/12] Updating to 1.7.10 :D Fixing glass --- build.properties | 6 +-- .../blocks/GlassBlockConnected.java | 51 ++++++++----------- .../tconstruct/blocks/GlassPaneConnected.java | 35 ++++++------- 3 files changed, 40 insertions(+), 52 deletions(-) diff --git a/build.properties b/build.properties index d6282785..9abbffbe 100644 --- a/build.properties +++ b/build.properties @@ -1,7 +1,7 @@ -minecraft_version=1.7.10_pre4 +minecraft_version=1.7.10 minecraft_version_old=1.7.2 -forge_version=10.12.2.1143-prerelease -mantle_version=150.1d8388b +forge_version=10.13.0.1151 +mantle_version=152.e3820d9 FMP_version=1.1.0.268 CCLIB_version=1.1.0.77 NEI_version=1.0.1 diff --git a/src/main/java/tconstruct/blocks/GlassBlockConnected.java b/src/main/java/tconstruct/blocks/GlassBlockConnected.java index fc469816..0733bdb6 100644 --- a/src/main/java/tconstruct/blocks/GlassBlockConnected.java +++ b/src/main/java/tconstruct/blocks/GlassBlockConnected.java @@ -61,18 +61,11 @@ public class GlassBlockConnected extends MantleBlock /** * This is checked to see if the texture should connect to this block - * - * @param par2 - * x - * @param par3 - * y - * @param par4 - * z - * @param par5 - * ID this block is asking to connect to (may be 0 if there is no - * block) - * @param par6 - * Metadata of the block this block is trying to connect to + * @param par2 x + * @param par3 y + * @param par4 z + * @param par5 ID this block is asking to connect to (may be 0 if there is no block) + * @param par6 Metadata of the block this block is trying to connect to * @return true if should connect */ public boolean shouldConnectToBlock (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, Block par5, int par6) @@ -371,11 +364,11 @@ public class GlassBlockConnected extends MantleBlock } else if (isOpenUp && isOpenDown && isOpenLeft) { - return icons[13]; + return icons[14]; } else if (isOpenUp && isOpenDown && isOpenRight) { - return icons[14]; + return icons[13]; } else if (isOpenUp && isOpenLeft && isOpenRight) { @@ -395,19 +388,19 @@ public class GlassBlockConnected extends MantleBlock } else if (isOpenDown && isOpenLeft) { - return icons[9]; + return icons[10]; } else if (isOpenDown && isOpenRight) { - return icons[10]; + return icons[9]; } else if (isOpenUp && isOpenLeft) { - return icons[7]; + return icons[8]; } else if (isOpenUp && isOpenRight) { - return icons[8]; + return icons[7]; } else if (isOpenDown) { @@ -419,11 +412,11 @@ public class GlassBlockConnected extends MantleBlock } else if (isOpenLeft) { - return icons[4]; + return icons[3]; } else if (isOpenRight) { - return icons[3]; + return icons[4]; } break; case 4: @@ -535,11 +528,11 @@ public class GlassBlockConnected extends MantleBlock } else if (isOpenUp && isOpenDown && isOpenLeft) { - return icons[14]; + return icons[13]; } else if (isOpenUp && isOpenDown && isOpenRight) { - return icons[13]; + return icons[14]; } else if (isOpenUp && isOpenLeft && isOpenRight) { @@ -559,19 +552,19 @@ public class GlassBlockConnected extends MantleBlock } else if (isOpenDown && isOpenLeft) { - return icons[10]; + return icons[9]; } else if (isOpenDown && isOpenRight) { - return icons[9]; + return icons[10]; } else if (isOpenUp && isOpenLeft) { - return icons[8]; + return icons[7]; } else if (isOpenUp && isOpenRight) { - return icons[7]; + return icons[8]; } else if (isOpenDown) { @@ -583,11 +576,11 @@ public class GlassBlockConnected extends MantleBlock } else if (isOpenLeft) { - return icons[3]; + return icons[4]; } else if (isOpenRight) { - return icons[4]; + return icons[3]; } break; } @@ -648,4 +641,4 @@ public class GlassBlockConnected extends MantleBlock { return true; } -} +} \ No newline at end of file diff --git a/src/main/java/tconstruct/blocks/GlassPaneConnected.java b/src/main/java/tconstruct/blocks/GlassPaneConnected.java index c3673e8f..a9b845fc 100644 --- a/src/main/java/tconstruct/blocks/GlassPaneConnected.java +++ b/src/main/java/tconstruct/blocks/GlassPaneConnected.java @@ -338,11 +338,11 @@ public class GlassPaneConnected extends GlassBlockConnected } else if (isOpenUp && isOpenDown && isOpenLeft) { - return icons[13]; + return icons[14]; } else if (isOpenUp && isOpenDown && isOpenRight) { - return icons[14]; + return icons[13]; } else if (isOpenUp && isOpenLeft && isOpenRight) { @@ -362,19 +362,19 @@ public class GlassPaneConnected extends GlassBlockConnected } else if (isOpenDown && isOpenLeft) { - return icons[9]; + return icons[10]; } else if (isOpenDown && isOpenRight) { - return icons[10]; + return icons[9]; } else if (isOpenUp && isOpenLeft) { - return icons[7]; + return icons[8]; } else if (isOpenUp && isOpenRight) { - return icons[8]; + return icons[7]; } else if (isOpenDown) { @@ -386,11 +386,11 @@ public class GlassPaneConnected extends GlassBlockConnected } else if (isOpenLeft) { - return icons[4]; + return icons[3]; } else if (isOpenRight) { - return icons[3]; + return icons[4]; } break; case 4: @@ -526,19 +526,19 @@ public class GlassPaneConnected extends GlassBlockConnected } else if (isOpenDown && isOpenLeft) { - return icons[10]; + return icons[9]; } else if (isOpenDown && isOpenRight) { - return icons[9]; + return icons[10]; } else if (isOpenUp && isOpenLeft) { - return icons[8]; + return icons[7]; } else if (isOpenUp && isOpenRight) { - return icons[7]; + return icons[8]; } else if (isOpenDown) { @@ -550,11 +550,11 @@ public class GlassPaneConnected extends GlassBlockConnected } else if (isOpenLeft) { - return icons[3]; + return icons[4]; } else if (isOpenRight) { - return icons[4]; + return icons[3]; } break; } @@ -690,11 +690,6 @@ public class GlassPaneConnected extends GlassBlockConnected @Override public boolean shouldSideBeRendered (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) { - // if(par5 == 0 || par5 == 1){ - // return par1IBlockAccess.getBlock(par2, par3, par4) != this.blockID; - // }else{ - // return true; - // } return true; } -} +} \ No newline at end of file