From eba66e0182fc1321e94b26024863185f71c20c10 Mon Sep 17 00:00:00 2001 From: Progwml6 Date: Wed, 8 Jan 2014 23:46:45 -0500 Subject: [PATCH] misc fixes --- .../blocks/component/SmelteryComponent.java | 4 +-- .../blocks/component/SmelteryScan.java | 10 +++--- .../blocks/logic/AdaptiveDrainLogic.java | 12 +++---- .../blocks/logic/AdaptiveSmelteryLogic.java | 4 +-- .../blocks/logic/CastingChannelLogic.java | 34 +++++++++---------- .../blocks/logic/CraftingStationLogic.java | 4 +-- .../tconstruct/blocks/logic/FaucetLogic.java | 4 +-- .../blocks/logic/LandmineExplodeLogic.java | 2 +- .../logic/LandmineSpecialStackLogic.java | 2 +- .../blocks/logic/PartBuilderLogic.java | 2 +- .../blocks/logic/SmelteryDrainLogic.java | 8 ++--- .../blocks/logic/SmelteryLogic.java | 13 +++---- .../blocks/logic/TileEntityLandmine.java | 8 ++--- .../tconstruct/blocks/slime/SlimeGel.java | 2 +- .../tconstruct/blocks/slime/SlimeSapling.java | 4 +-- .../blocks/traps/BarricadeBlock.java | 8 ++--- .../client/entity/FancyItemRender.java | 17 +++++----- .../tconstruct/client/gui/GuiButtonTool.java | 14 ++++---- .../tconstruct/client/tabs/AbstractTab.java | 16 ++++----- .../tconstruct/client/tabs/TabRegistry.java | 8 ++--- .../preloader/AccessTransformers.java | 2 +- .../preloader/TConstructLoaderContainer.java | 26 +++++++------- .../preloader/helpers/PropertyManager.java | 2 +- .../java/tconstruct/util/TEventHandler.java | 1 - .../java/tconstruct/util/landmine/Helper.java | 12 +++---- .../util/landmine/behavior/Behavior.java | 16 ++++----- .../stackCombo/SpecialStackHandler.java | 2 +- 27 files changed, 120 insertions(+), 117 deletions(-) diff --git a/src/main/java/tconstruct/blocks/component/SmelteryComponent.java b/src/main/java/tconstruct/blocks/component/SmelteryComponent.java index 2e828c2f550..77bf4c7206b 100644 --- a/src/main/java/tconstruct/blocks/component/SmelteryComponent.java +++ b/src/main/java/tconstruct/blocks/component/SmelteryComponent.java @@ -145,7 +145,7 @@ void updateFuelGague () return; } - TileEntity tankContainer = world.getBlockTileEntity(activeLavaTank.x, activeLavaTank.y, activeLavaTank.z); + TileEntity tankContainer = world.func_147438_o(activeLavaTank.x, activeLavaTank.y, activeLavaTank.z); if (tankContainer == null) { fuelAmount = 0; @@ -182,7 +182,7 @@ void updateFuelGague () while (!foundTank) { CoordTuple possibleTank = structure.lavaTanks.get(iter); - TileEntity newTankContainer = world.getBlockTileEntity(possibleTank.x, possibleTank.y, possibleTank.z); + TileEntity newTankContainer = world.func_147438_o(possibleTank.x, possibleTank.y, possibleTank.z); if (newTankContainer instanceof IFluidHandler) { FluidStack newliquid = ((IFluidHandler) newTankContainer).drain(ForgeDirection.UNKNOWN, drainFuelAmount(), false); diff --git a/src/main/java/tconstruct/blocks/component/SmelteryScan.java b/src/main/java/tconstruct/blocks/component/SmelteryScan.java index c9014f6abca..be2f22e1637 100644 --- a/src/main/java/tconstruct/blocks/component/SmelteryScan.java +++ b/src/main/java/tconstruct/blocks/component/SmelteryScan.java @@ -50,7 +50,7 @@ protected boolean checkServant (int x, int y, int z) if (!block.hasTileEntity(world.getBlockMetadata(x, y, z))) return false; - TileEntity be = world.getBlockTileEntity(x, y, z); + TileEntity be = world.func_147438_o(x, y, z); if (be instanceof IServantLogic) { boolean ret = ((IServantLogic) be).setPotentialMaster(this.imaster, this.world, x, y, z); @@ -75,7 +75,7 @@ protected void finalizeStructure () if (world.func_147439_a(coord.x, coord.y, coord.z) != TRepo.tankAir) { world.setBlock(coord.x, coord.y, coord.z, TRepo.tankAir); - IServantLogic servant = (IServantLogic) world.getBlockTileEntity(coord.x, coord.y, coord.z); + IServantLogic servant = (IServantLogic) world.func_147438_o(coord.x, coord.y, coord.z); servant.verifyMaster(imaster, world, master.field_145851_c, master.field_145848_d, master.field_145849_e); } } @@ -88,7 +88,7 @@ protected void invalidateStructure () super.invalidateStructure(); for (CoordTuple coord : airCoords) { - TileEntity servant = world.getBlockTileEntity(coord.x, coord.y, coord.z); + TileEntity servant = world.func_147438_o(coord.x, coord.y, coord.z); if (servant instanceof IServantLogic) ((IServantLogic) servant).invalidateMaster(imaster, world, master.field_145851_c, master.field_145848_d, master.field_145849_e); } @@ -102,7 +102,7 @@ protected void invalidateBlocksAbove (int height) if (coord.y < height) continue; - TileEntity servant = world.getBlockTileEntity(coord.x, coord.y, coord.z); + TileEntity servant = world.func_147438_o(coord.x, coord.y, coord.z); if (servant instanceof IServantLogic) ((IServantLogic) servant).invalidateMaster(imaster, world, master.field_145851_c, master.field_145848_d, master.field_145849_e); } @@ -116,7 +116,7 @@ public void cleanup () while (i.hasNext()) { CoordTuple coord = (CoordTuple) i.next(); - TileEntity te = world.getBlockTileEntity(coord.x, coord.y, coord.z); + TileEntity te = world.func_147438_o(coord.x, coord.y, coord.z); if (te != null && te instanceof IServantLogic) { ((IServantLogic) te).invalidateMaster(imaster, world, master.field_145851_c, master.field_145848_d, master.field_145849_e); diff --git a/src/main/java/tconstruct/blocks/logic/AdaptiveDrainLogic.java b/src/main/java/tconstruct/blocks/logic/AdaptiveDrainLogic.java index 702898c01f8..d1056d4bcf8 100644 --- a/src/main/java/tconstruct/blocks/logic/AdaptiveDrainLogic.java +++ b/src/main/java/tconstruct/blocks/logic/AdaptiveDrainLogic.java @@ -37,7 +37,7 @@ public int fill (ForgeDirection from, FluidStack resource, boolean doFill) { if (hasValidMaster() && canDrain(from, null)) { - AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) field_145850_b.getBlockTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z); + AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) field_145850_b.func_147438_o(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z); return smeltery.fill(from, resource, doFill); } return 0; @@ -49,7 +49,7 @@ public FluidStack drain (ForgeDirection from, int maxDrain, boolean doDrain) // TConstruct.logger.info("Attempting drain " + hasValidMaster()); if (hasValidMaster() && canDrain(from, null)) { - AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) field_145850_b.getBlockTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z); + AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) field_145850_b.func_147438_o(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z); // TConstruct.logger.info("Found master"); return smeltery.drain(from, maxDrain, doDrain); } @@ -61,7 +61,7 @@ public FluidStack drain (ForgeDirection from, FluidStack resource, boolean doDra { if (hasValidMaster() && canDrain(from, null)) { - AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) field_145850_b.getBlockTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z); + AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) field_145850_b.func_147438_o(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z); return smeltery.drain(from, resource, doDrain); } return null; @@ -72,7 +72,7 @@ public boolean canFill (ForgeDirection from, Fluid fluid) { if (hasValidMaster()) { - AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) field_145850_b.getBlockTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z); + AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) field_145850_b.func_147438_o(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z); return smeltery.getFillState() < 2; } return false; @@ -83,7 +83,7 @@ public boolean canDrain (ForgeDirection from, Fluid fluid) { if (hasValidMaster()) { - AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) field_145850_b.getBlockTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z); + AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) field_145850_b.func_147438_o(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z); return smeltery.getFillState() > 0; } return false; @@ -94,7 +94,7 @@ public FluidTankInfo[] getTankInfo (ForgeDirection from) { if (hasValidMaster() && (from == getForgeDirection() || from == getForgeDirection().getOpposite() || from == ForgeDirection.UNKNOWN)) { - AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) field_145850_b.getBlockTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z); + AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) field_145850_b.func_147438_o(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z); return smeltery.getTankInfo(ForgeDirection.UNKNOWN); } return null; diff --git a/src/main/java/tconstruct/blocks/logic/AdaptiveSmelteryLogic.java b/src/main/java/tconstruct/blocks/logic/AdaptiveSmelteryLogic.java index d15f65e53bf..1e37f8b7d1f 100644 --- a/src/main/java/tconstruct/blocks/logic/AdaptiveSmelteryLogic.java +++ b/src/main/java/tconstruct/blocks/logic/AdaptiveSmelteryLogic.java @@ -285,7 +285,7 @@ void updateWorldBlock (int slot, ItemStack itemstack) CoordTuple air = structure.getAirByIndex(slot); if (air != null) { - TileEntity te = field_145850_b.getBlockTileEntity(air.x, air.y, air.z); + TileEntity te = field_145850_b.func_147438_o(air.x, air.y, air.z); if (te != null && te instanceof TankAirLogic) { ((TankAirLogic) te).setInventorySlotContents(0, itemstack); @@ -407,7 +407,7 @@ protected void updateFluidBlocks () { Map.Entry pairs = (Map.Entry) iter.next(); CoordTuple coord = (CoordTuple) pairs.getKey(); - TileEntity te = field_145850_b.getBlockTileEntity(coord.x, coord.y, coord.z); + TileEntity te = field_145850_b.func_147438_o(coord.x, coord.y, coord.z); if (te instanceof TankAirLogic) { ((TankAirLogic) te).overrideFluids(((LiquidDataInstance) pairs.getValue()).fluids); diff --git a/src/main/java/tconstruct/blocks/logic/CastingChannelLogic.java b/src/main/java/tconstruct/blocks/logic/CastingChannelLogic.java index 5db89e7cb86..b1c2a4b0efe 100644 --- a/src/main/java/tconstruct/blocks/logic/CastingChannelLogic.java +++ b/src/main/java/tconstruct/blocks/logic/CastingChannelLogic.java @@ -83,7 +83,7 @@ void pullLiquids () boolean pullLiquid (int x, int y, int z, ForgeDirection direction) { - TileEntity tank = field_145850_b.getBlockTileEntity(x, y, z); + TileEntity tank = field_145850_b.func_147438_o(x, y, z); if (tank instanceof IFluidHandler && !(tank instanceof CastingChannelLogic)) { FluidStack templiquid = ((IFluidHandler) tank).drain(direction, 3, false); @@ -291,7 +291,7 @@ private void moveLiquidToTanks () @SideOnly(Side.CLIENT) public float tankBelow () { - TileEntity te = this.field_145850_b.getBlockTileEntity(this.field_145851_c, this.field_145848_d - 1, this.field_145849_e); + TileEntity te = this.field_145850_b.func_147438_o(this.field_145851_c, this.field_145848_d - 1, this.field_145849_e); if (te instanceof CastingChannelLogic) return -0.5f; if (te instanceof LavaTankLogic) @@ -311,15 +311,15 @@ public boolean hasChannelConnected (ForgeDirection dir) switch (dir) { case DOWN: - return (this.field_145850_b.getBlockTileEntity(this.field_145851_c, this.field_145848_d - 1, this.field_145849_e) instanceof CastingChannelLogic); + return (this.field_145850_b.func_147438_o(this.field_145851_c, this.field_145848_d - 1, this.field_145849_e) instanceof CastingChannelLogic); case NORTH: - return (this.field_145850_b.getBlockTileEntity(this.field_145851_c, this.field_145848_d, this.field_145849_e - 1) instanceof CastingChannelLogic); + return (this.field_145850_b.func_147438_o(this.field_145851_c, this.field_145848_d, this.field_145849_e - 1) instanceof CastingChannelLogic); case SOUTH: - return (this.field_145850_b.getBlockTileEntity(this.field_145851_c, this.field_145848_d, this.field_145849_e + 1) instanceof CastingChannelLogic); + return (this.field_145850_b.func_147438_o(this.field_145851_c, this.field_145848_d, this.field_145849_e + 1) instanceof CastingChannelLogic); case WEST: - return (this.field_145850_b.getBlockTileEntity(this.field_145851_c - 1, this.field_145848_d, this.field_145849_e) instanceof CastingChannelLogic); + return (this.field_145850_b.func_147438_o(this.field_145851_c - 1, this.field_145848_d, this.field_145849_e) instanceof CastingChannelLogic); case EAST: - return (this.field_145850_b.getBlockTileEntity(this.field_145851_c + 1, this.field_145848_d, this.field_145849_e) instanceof CastingChannelLogic); + return (this.field_145850_b.func_147438_o(this.field_145851_c + 1, this.field_145848_d, this.field_145849_e) instanceof CastingChannelLogic); default: return false; } @@ -330,15 +330,15 @@ public boolean hasTankConnected (ForgeDirection dir) switch (dir) { case DOWN: - return (this.field_145850_b.getBlockTileEntity(this.field_145851_c, this.field_145848_d - 1, this.field_145849_e) instanceof IFluidHandler); + return (this.field_145850_b.func_147438_o(this.field_145851_c, this.field_145848_d - 1, this.field_145849_e) instanceof IFluidHandler); case NORTH: - return (this.field_145850_b.getBlockTileEntity(this.field_145851_c, this.field_145848_d, this.field_145849_e - 1) instanceof IFluidHandler); + return (this.field_145850_b.func_147438_o(this.field_145851_c, this.field_145848_d, this.field_145849_e - 1) instanceof IFluidHandler); case SOUTH: - return (this.field_145850_b.getBlockTileEntity(this.field_145851_c, this.field_145848_d, this.field_145849_e + 1) instanceof IFluidHandler); + return (this.field_145850_b.func_147438_o(this.field_145851_c, this.field_145848_d, this.field_145849_e + 1) instanceof IFluidHandler); case WEST: - return (this.field_145850_b.getBlockTileEntity(this.field_145851_c - 1, this.field_145848_d, this.field_145849_e) instanceof IFluidHandler); + return (this.field_145850_b.func_147438_o(this.field_145851_c - 1, this.field_145848_d, this.field_145849_e) instanceof IFluidHandler); case EAST: - return (this.field_145850_b.getBlockTileEntity(this.field_145851_c + 1, this.field_145848_d, this.field_145849_e) instanceof IFluidHandler); + return (this.field_145850_b.func_147438_o(this.field_145851_c + 1, this.field_145848_d, this.field_145849_e) instanceof IFluidHandler); default: return false; } @@ -347,11 +347,11 @@ public boolean hasTankConnected (ForgeDirection dir) private HashMap getOutputs () { HashMap map = new HashMap(); - TileEntity tankXplus = this.field_145850_b.getBlockTileEntity(this.field_145851_c + 1, this.field_145848_d, this.field_145849_e); - TileEntity tankXminus = this.field_145850_b.getBlockTileEntity(this.field_145851_c - 1, this.field_145848_d, this.field_145849_e); - TileEntity tankZplus = this.field_145850_b.getBlockTileEntity(this.field_145851_c, this.field_145848_d, this.field_145849_e + 1); - TileEntity tankZminus = this.field_145850_b.getBlockTileEntity(this.field_145851_c, this.field_145848_d, this.field_145849_e - 1); - TileEntity tankYminus = this.field_145850_b.getBlockTileEntity(this.field_145851_c, this.field_145848_d - 1, this.field_145849_e); + TileEntity tankXplus = this.field_145850_b.func_147438_o(this.field_145851_c + 1, this.field_145848_d, this.field_145849_e); + TileEntity tankXminus = this.field_145850_b.func_147438_o(this.field_145851_c - 1, this.field_145848_d, this.field_145849_e); + TileEntity tankZplus = this.field_145850_b.func_147438_o(this.field_145851_c, this.field_145848_d, this.field_145849_e + 1); + TileEntity tankZminus = this.field_145850_b.func_147438_o(this.field_145851_c, this.field_145848_d, this.field_145849_e - 1); + TileEntity tankYminus = this.field_145850_b.func_147438_o(this.field_145851_c, this.field_145848_d - 1, this.field_145849_e); if (this.pullingLiquids) { diff --git a/src/main/java/tconstruct/blocks/logic/CraftingStationLogic.java b/src/main/java/tconstruct/blocks/logic/CraftingStationLogic.java index a30bce529ec..afbf565c7b7 100644 --- a/src/main/java/tconstruct/blocks/logic/CraftingStationLogic.java +++ b/src/main/java/tconstruct/blocks/logic/CraftingStationLogic.java @@ -45,7 +45,7 @@ public Container getGuiContainer (InventoryPlayer inventoryplayer, World world, { for (int zPos = z - 1; zPos <= z + 1; zPos++) { - TileEntity tile = world.getBlockTileEntity(xPos, yPos, zPos); + TileEntity tile = world.func_147438_o(xPos, yPos, zPos); if (chest == null && tile instanceof TileEntityChest) { chest = new WeakReference(tile); @@ -68,7 +68,7 @@ else if (tinkerTable == false && tile instanceof ToolStationLogic) void checkForChest (World world, int x, int y, int z) { - TileEntity tile = world.getBlockTileEntity(x, y, z); + TileEntity tile = world.func_147438_o(x, y, z); if (tile instanceof TileEntityChest) doubleChest = new WeakReference(tile); } diff --git a/src/main/java/tconstruct/blocks/logic/FaucetLogic.java b/src/main/java/tconstruct/blocks/logic/FaucetLogic.java index 89ad429d7ca..ada961c7921 100644 --- a/src/main/java/tconstruct/blocks/logic/FaucetLogic.java +++ b/src/main/java/tconstruct/blocks/logic/FaucetLogic.java @@ -43,8 +43,8 @@ public boolean activateFaucet () break; } - TileEntity drainte = field_145850_b.getBlockTileEntity(x, field_145848_d, z); - TileEntity tankte = field_145850_b.getBlockTileEntity(field_145851_c, field_145848_d - 1, field_145849_e); + TileEntity drainte = field_145850_b.func_147438_o(x, field_145848_d, z); + TileEntity tankte = field_145850_b.func_147438_o(field_145851_c, field_145848_d - 1, field_145849_e); if (drainte != null && drainte instanceof IFluidHandler && tankte != null && tankte instanceof IFluidHandler) { diff --git a/src/main/java/tconstruct/blocks/logic/LandmineExplodeLogic.java b/src/main/java/tconstruct/blocks/logic/LandmineExplodeLogic.java index e5dc6e45a2c..4ddc5c8dc33 100644 --- a/src/main/java/tconstruct/blocks/logic/LandmineExplodeLogic.java +++ b/src/main/java/tconstruct/blocks/logic/LandmineExplodeLogic.java @@ -28,7 +28,7 @@ public class LandmineExplodeLogic public LandmineExplodeLogic(World par1World, int par2, int par3, int par4, Entity entity) { worldObj = par1World; - this.tileEntity = (TileEntityLandmine) par1World.getBlockTileEntity(par2, par3, par4); + this.tileEntity = (TileEntityLandmine) par1World.func_147438_o(par2, par3, par4); this.x = par2; this.y = par3; this.z = par4; diff --git a/src/main/java/tconstruct/blocks/logic/LandmineSpecialStackLogic.java b/src/main/java/tconstruct/blocks/logic/LandmineSpecialStackLogic.java index 85894884569..4edcba0fb17 100644 --- a/src/main/java/tconstruct/blocks/logic/LandmineSpecialStackLogic.java +++ b/src/main/java/tconstruct/blocks/logic/LandmineSpecialStackLogic.java @@ -22,7 +22,7 @@ public class LandmineSpecialStackLogic public LandmineSpecialStackLogic(World par1World, int par2, int par3, int par4, Entity entity, boolean mayHurtPlayer, ArrayList items) { worldObj = par1World; - this.tileEntity = (TileEntityLandmine) par1World.getBlockTileEntity(par2, par3, par4); + this.tileEntity = (TileEntityLandmine) par1World.func_147438_o(par2, par3, par4); this.x = par2; this.y = par3; this.z = par4; diff --git a/src/main/java/tconstruct/blocks/logic/PartBuilderLogic.java b/src/main/java/tconstruct/blocks/logic/PartBuilderLogic.java index 62b0f467011..50254d09145 100644 --- a/src/main/java/tconstruct/blocks/logic/PartBuilderLogic.java +++ b/src/main/java/tconstruct/blocks/logic/PartBuilderLogic.java @@ -38,7 +38,7 @@ public Container getGuiContainer (InventoryPlayer inventoryplayer, World world, { for (int zPos = z - 1; zPos <= z + 1; zPos++) { - TileEntity tile = world.getBlockTileEntity(xPos, y, zPos); + TileEntity tile = world.func_147438_o(xPos, y, zPos); if (tile != null && tile instanceof PatternChestLogic) return new PartCrafterChestContainer(inventoryplayer, this, (PatternChestLogic) tile); } diff --git a/src/main/java/tconstruct/blocks/logic/SmelteryDrainLogic.java b/src/main/java/tconstruct/blocks/logic/SmelteryDrainLogic.java index 9a7fab83a99..41b3e8f7f8d 100644 --- a/src/main/java/tconstruct/blocks/logic/SmelteryDrainLogic.java +++ b/src/main/java/tconstruct/blocks/logic/SmelteryDrainLogic.java @@ -30,7 +30,7 @@ public int fill (ForgeDirection from, FluidStack resource, boolean doFill) { if (doFill) { - SmelteryLogic smeltery = (SmelteryLogic) field_145850_b.getBlockTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z); + SmelteryLogic smeltery = (SmelteryLogic) field_145850_b.func_147438_o(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z); return smeltery.fill(resource, doFill); } else @@ -49,7 +49,7 @@ public FluidStack drain (ForgeDirection from, int maxDrain, boolean doDrain) { if (hasValidMaster() && canDrain(from, null)) { - SmelteryLogic smeltery = (SmelteryLogic) field_145850_b.getBlockTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z); + SmelteryLogic smeltery = (SmelteryLogic) field_145850_b.func_147438_o(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z); return smeltery.drain(maxDrain, doDrain); } else @@ -80,7 +80,7 @@ public boolean canDrain (ForgeDirection from, Fluid fluid) boolean containsFluid = fluid == null; if (fluid != null) { - SmelteryLogic smeltery = (SmelteryLogic) field_145850_b.getBlockTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z); + SmelteryLogic smeltery = (SmelteryLogic) field_145850_b.func_147438_o(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z); for (FluidStack fstack : smeltery.moltenMetal) { if (fstack.fluidID == fluid.getID()) @@ -99,7 +99,7 @@ public FluidTankInfo[] getTankInfo (ForgeDirection from) { if (hasValidMaster() && (from == getForgeDirection() || from == getForgeDirection().getOpposite() || from == ForgeDirection.UNKNOWN)) { - SmelteryLogic smeltery = (SmelteryLogic) field_145850_b.getBlockTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z); + SmelteryLogic smeltery = (SmelteryLogic) field_145850_b.func_147438_o(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z); return smeltery.getMultiTankInfo(); //return new FluidTankInfo[] { smeltery.getInfo() }; } diff --git a/src/main/java/tconstruct/blocks/logic/SmelteryLogic.java b/src/main/java/tconstruct/blocks/logic/SmelteryLogic.java index 69d4ef6af94..99fc00c49ee 100644 --- a/src/main/java/tconstruct/blocks/logic/SmelteryLogic.java +++ b/src/main/java/tconstruct/blocks/logic/SmelteryLogic.java @@ -159,7 +159,7 @@ void adjustLayers (int lay, boolean forceAdjust) stack.stackSize -= itemSize; EntityItem entityitem = new EntityItem(field_145850_b, (double) ((float) field_145851_c + jumpX + offsetX), (double) ((float) field_145848_d + jumpY), - (double) ((float) field_145849_e + jumpZ + offsetZ), new ItemStack(stack.itemID, itemSize, stack.getItemDamage())); + (double) ((float) field_145849_e + jumpZ + offsetZ), new ItemStack(stack.getItem(), itemSize, stack.getItemDamage())); if (stack.hasTagCompound()) { @@ -532,7 +532,7 @@ public void updateFuelDisplay () return; } - TileEntity tankContainer = field_145850_b.getBlockTileEntity(activeLavaTank.x, activeLavaTank.y, activeLavaTank.z); + TileEntity tankContainer = field_145850_b.func_147438_o(activeLavaTank.x, activeLavaTank.y, activeLavaTank.z); if (tankContainer == null) { fuelAmount = 0; @@ -573,7 +573,7 @@ void updateFuelGague () //TODO: Call this method when the GUI is opened return; } - TileEntity tankContainer = field_145850_b.getBlockTileEntity(activeLavaTank.x, activeLavaTank.y, activeLavaTank.z); + TileEntity tankContainer = field_145850_b.func_147438_o(activeLavaTank.x, activeLavaTank.y, activeLavaTank.z); if (tankContainer == null) { fuelAmount = 0; @@ -610,7 +610,7 @@ void updateFuelGague () //TODO: Call this method when the GUI is opened while (!foundTank) { CoordTuple possibleTank = lavaTanks.get(iter); - TileEntity newTankContainer = field_145850_b.getBlockTileEntity(possibleTank.x, possibleTank.y, possibleTank.z); + TileEntity newTankContainer = field_145850_b.func_147438_o(possibleTank.x, possibleTank.y, possibleTank.z); if (newTankContainer instanceof IFluidHandler) { //TConstruct.logger.info("Tank: "+possibleTank.toString()); @@ -917,9 +917,9 @@ int checkBricks (int x, int y, int z) { int tempBricks = 0; Block block = field_145850_b.func_147439_a(x, y, z); - if (validBlock(block) || validTankID(block)) + if (validBlock(block) || validTank(block)) { - TileEntity te = field_145850_b.getBlockTileEntity(x, y, z); + TileEntity te = field_145850_b.func_147438_o(x, y, z); if (te == this) { tempBricks++; @@ -951,6 +951,7 @@ boolean validBlock (Block block) return block == TRepo.smeltery || block == TRepo.smelteryNether; } + boolean validTank (Block block) { return block == TRepo.lavaTank || block == TRepo.lavaTankNether; } diff --git a/src/main/java/tconstruct/blocks/logic/TileEntityLandmine.java b/src/main/java/tconstruct/blocks/logic/TileEntityLandmine.java index 0a96553a851..17ac7e07a57 100644 --- a/src/main/java/tconstruct/blocks/logic/TileEntityLandmine.java +++ b/src/main/java/tconstruct/blocks/logic/TileEntityLandmine.java @@ -101,7 +101,7 @@ public Packet getDescriptionPacket () { NBTTagCompound nbt = new NBTTagCompound(); writeToNBT(nbt); - return new Packet132TileEntityData(xCoord, field_145848_d, field_145849_e, 0, nbt); + return new Packet132TileEntityData(field_145851_c, field_145848_d, field_145849_e, 0, nbt); } @Override @@ -211,7 +211,7 @@ public void setGuiDisplayName (String par1Str) @Override public boolean isUseableByPlayer (EntityPlayer par1EntityPlayer) { - return this.field_145850_b.getBlockTileEntity(this.xCoord, this.field_145848_d, this.field_145849_e) != this ? false : par1EntityPlayer.getDistanceSq((double) this.xCoord + 0.5D, (double) this.field_145848_d + 0.5D, + return this.field_145850_b.func_147438_o(this.field_145851_c, this.field_145848_d, this.field_145849_e) != this ? false : par1EntityPlayer.getDistanceSq((double) this.field_145851_c + 0.5D, (double) this.field_145848_d + 0.5D, (double) this.field_145849_e + 0.5D) <= 64.0D; } @@ -229,7 +229,7 @@ public void closeChest () public void onInventoryChanged () { super.onInventoryChanged(); - this.field_145850_b.markBlockForUpdate(xCoord, field_145848_d, field_145849_e); + this.field_145850_b.markBlockForUpdate(field_145851_c, field_145848_d, field_145849_e); } @Override @@ -259,7 +259,7 @@ public void updateEntity () { if (shouldUpdateLogic) { - field_145850_b.markBlockForRenderUpdate(xCoord, field_145848_d, field_145849_e); + field_145850_b.markBlockForRenderUpdate(field_145851_c, field_145848_d, field_145849_e); shouldUpdateLogic = false; } if (soundcountything > 0) diff --git a/src/main/java/tconstruct/blocks/slime/SlimeGel.java b/src/main/java/tconstruct/blocks/slime/SlimeGel.java index 33f8a6f35ee..e87b9ea34b8 100644 --- a/src/main/java/tconstruct/blocks/slime/SlimeGel.java +++ b/src/main/java/tconstruct/blocks/slime/SlimeGel.java @@ -47,7 +47,7 @@ public void onEntityCollidedWithBlock (World world, int x, int y, int z, Entity { if (entity.motionY < -0.08F) { - Block var9 = Block.blocksList[this.blockID]; + Block var9 = (Block) this; world.playSoundEffect(x + 0.5F, y + 0.5F, z + 0.5F, var9.stepSound.getStepSound(), (var9.stepSound.getVolume()) / 2.0F, var9.stepSound.getPitch() * 0.65F); } entity.motionY *= -1.2F; diff --git a/src/main/java/tconstruct/blocks/slime/SlimeSapling.java b/src/main/java/tconstruct/blocks/slime/SlimeSapling.java index b6fe8249099..7a8c6ab91c9 100644 --- a/src/main/java/tconstruct/blocks/slime/SlimeSapling.java +++ b/src/main/java/tconstruct/blocks/slime/SlimeSapling.java @@ -106,13 +106,13 @@ public boolean boneFertilize (World world, int x, int y, int z, Random random, E public void growTree (World world, int x, int y, int z, Random random) { int md = world.getBlockMetadata(x, y, z) % 8; - world.setBlock(x, y, z, 0); + world.setBlock(x, y, z, Blocks.air); WorldGenerator obj = null; obj = new SlimeTreeGen(true, 5, 4, 1, 0); if (!(obj.generate(world, random, x, y, z))) - world.setBlock(x, y, z, blockID, md + 8, 3); + world.setBlock(x, y, z, Blocks.air, md + 8, 3); } public int damageDropped (int i) diff --git a/src/main/java/tconstruct/blocks/traps/BarricadeBlock.java b/src/main/java/tconstruct/blocks/traps/BarricadeBlock.java index 7afc4c3617a..1b147810d76 100644 --- a/src/main/java/tconstruct/blocks/traps/BarricadeBlock.java +++ b/src/main/java/tconstruct/blocks/traps/BarricadeBlock.java @@ -88,11 +88,11 @@ public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer int meta = world.getBlockMetadata(x, y, z); if (meta % 4 != 3) { - world.setBlock(x, y, z, this.blockID, meta + 1, 3); - Block.blocksList[this.blockID].onBlockPlacedBy(world, x, y, z, player, stack); - Block.blocksList[this.blockID].onPostBlockPlaced(world, x, y, z, meta); + world.setBlock(x, y, z, this, meta + 1, 3); + this..onBlockPlacedBy(world, x, y, z, player, stack); + this.blockID.onPostBlockPlaced(world, x, y, z, meta); - Block var9 = Block.blocksList[this.blockID]; + Block var9 = this; world.playSoundEffect(x + 0.5F, y + 0.5F, z + 0.5F, var9.stepSound.getStepSound(), (var9.stepSound.getVolume() + 1.0F) / 2.0F, var9.stepSound.getPitch() * 0.8F); player.swingItem(); if (!player.capabilities.isCreativeMode) diff --git a/src/main/java/tconstruct/client/entity/FancyItemRender.java b/src/main/java/tconstruct/client/entity/FancyItemRender.java index ad8155ae5b2..8ceb8d2887d 100644 --- a/src/main/java/tconstruct/client/entity/FancyItemRender.java +++ b/src/main/java/tconstruct/client/entity/FancyItemRender.java @@ -70,6 +70,7 @@ public void doRenderItem (EntityItem par1EntityItem, double par2, double par4, d int i; Block block = null; + if (itemstack.itemID < Block.blocksList.length) { block = Block.blocksList[itemstack.itemID]; @@ -314,14 +315,14 @@ public void renderItemIntoGUI (FontRenderer par1FontRenderer, TextureManager par public void renderItemIntoGUI (FontRenderer par1FontRenderer, TextureManager par2TextureManager, ItemStack par3ItemStack, int par4, int par5, boolean renderEffect) { - int k = par3ItemStack.itemID; + Item k = par3ItemStack.getItem(); int l = par3ItemStack.getItemDamage(); Object object = par3ItemStack.getIconIndex(); float f; int i1; float f1; float f2; - + //TODO make this be the block equivalent to k Block block = (k < Block.blocksList.length ? Block.blocksList[k] : null); if (par3ItemStack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.renderItemIn3d(Block.blocksList[k].getRenderType())) { @@ -333,7 +334,7 @@ public void renderItemIntoGUI (FontRenderer par1FontRenderer, TextureManager par GL11.glScalef(1.0F, 1.0F, -1.0F); GL11.glRotatef(210.0F, 1.0F, 0.0F, 0.0F); GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F); - i1 = Item.itemsList[k].getColorFromItemStack(par3ItemStack, 0); + i1 = k.getColorFromItemStack(par3ItemStack, 0); f = (float) (i1 >> 16 & 255) / 255.0F; f1 = (float) (i1 >> 8 & 255) / 255.0F; f2 = (float) (i1 & 255) / 255.0F; @@ -349,15 +350,15 @@ public void renderItemIntoGUI (FontRenderer par1FontRenderer, TextureManager par this.itemRenderBlocks.field_147844_c = true; GL11.glPopMatrix(); } - else if (Item.itemsList[k].requiresMultipleRenderPasses()) + else if (k.requiresMultipleRenderPasses()) { GL11.glDisable(GL11.GL_LIGHTING); - for (int j1 = 0; j1 < Item.itemsList[k].getRenderPasses(l); ++j1) + for (int j1 = 0; j1 < k.getRenderPasses(l); ++j1) { par2TextureManager.bindTexture(par3ItemStack.getItemSpriteNumber() == 0 ? TextureMap.locationBlocksTexture : TextureMap.locationItemsTexture); - IIcon icon = Item.itemsList[k].getIcon(par3ItemStack, j1); - int k1 = Item.itemsList[k].getColorFromItemStack(par3ItemStack, j1); + IIcon icon = k.getIcon(par3ItemStack, j1); + int k1 = k.getColorFromItemStack(par3ItemStack, j1); f1 = (float) (k1 >> 16 & 255) / 255.0F; f2 = (float) (k1 >> 8 & 255) / 255.0F; float f3 = (float) (k1 & 255) / 255.0F; @@ -388,7 +389,7 @@ else if (Item.itemsList[k].requiresMultipleRenderPasses()) object = ((TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture(resourcelocation)).getAtlasSprite("missingno"); } - i1 = Item.itemsList[k].getColorFromItemStack(par3ItemStack, 0); + i1 = k.getColorFromItemStack(par3ItemStack, 0); f = (float) (i1 >> 16 & 255) / 255.0F; f1 = (float) (i1 >> 8 & 255) / 255.0F; f2 = (float) (i1 & 255) / 255.0F; diff --git a/src/main/java/tconstruct/client/gui/GuiButtonTool.java b/src/main/java/tconstruct/client/gui/GuiButtonTool.java index 87996618dcb..bcdfb82b778 100644 --- a/src/main/java/tconstruct/client/gui/GuiButtonTool.java +++ b/src/main/java/tconstruct/client/gui/GuiButtonTool.java @@ -38,17 +38,17 @@ public GuiButtonTool(int id, int posX, int posY, int texX, int texY, String doma */ public void drawButton (Minecraft mc, int mouseX, int mouseY) { - if (this.drawButton) + if (this.field_146125_m) { - boolean var4 = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height; + boolean var4 = mouseX >= this.field_146128_h && mouseY >= this.field_146129_i && mouseX < this.field_146128_h + this.field_146120_f && mouseY < this.field_146129_i + this.field_146121_g; GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); mc.getTextureManager().bindTexture(background); - this.field_82253_i = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height; - int var5 = this.getHoverState(this.field_82253_i); - int index = 18 * getHoverState(field_82253_i); - this.drawTexturedModalRect(this.xPosition, this.yPosition, 144 + index * 2, 216, 18, 18); - this.drawTexturedModalRect(this.xPosition, this.yPosition, textureX * 18, textureY * 18, 18, 18); + this.field_146123_n = mouseX >= this.field_146128_h && mouseY >= this.field_146129_i && mouseX < this.field_146128_h + this.field_146120_f && mouseY < this.field_146129_i + this.field_146121_g; + int var5 = this.func_146114_a(this.field_146123_n); + int index = 18 * func_146114_a(field_146123_n); + this.drawTexturedModalRect(this.field_146128_h, this.field_146129_i, 144 + index * 2, 216, 18, 18); + this.drawTexturedModalRect(this.field_146128_h, this.field_146129_i, textureX * 18, textureY * 18, 18, 18); } } } diff --git a/src/main/java/tconstruct/client/tabs/AbstractTab.java b/src/main/java/tconstruct/client/tabs/AbstractTab.java index fba19e218f7..fe342fda911 100644 --- a/src/main/java/tconstruct/client/tabs/AbstractTab.java +++ b/src/main/java/tconstruct/client/tabs/AbstractTab.java @@ -24,24 +24,24 @@ public AbstractTab(int id, int posX, int posY, ItemStack renderStack) @Override public void drawButton (Minecraft mc, int mouseX, int mouseY) { - if (this.drawButton) + if (this.field_146125_m) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - int yTexPos = this.enabled ? 0 : 32; - int ySize = this.enabled ? 28 : 32; - int xOffset = this.id == 2 ? 0 : 1; + int yTexPos = this.field_146124_l ? 0 : 32; + int ySize = this.field_146124_l ? 28 : 32; + int xOffset = this.field_146127_k == 2 ? 0 : 1; mc.renderEngine.bindTexture(this.texture); - this.drawTexturedModalRect(this.xPosition, this.yPosition, xOffset * 28, yTexPos, 28, ySize); + this.drawTexturedModalRect(this.field_146128_h, this.field_146129_i, xOffset * 28, yTexPos, 28, ySize); RenderHelper.enableGUIStandardItemLighting(); this.zLevel = 100.0F; this.itemRenderer.zLevel = 100.0F; GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL12.GL_RESCALE_NORMAL); - this.itemRenderer.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.renderEngine, renderStack, xPosition + 6, yPosition + 8); - this.itemRenderer.renderItemOverlayIntoGUI(mc.fontRenderer, mc.renderEngine, renderStack, xPosition + 6, yPosition + 8); + this.itemRenderer.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.renderEngine, renderStack, field_146128_h + 6, field_146129_i + 8); + this.itemRenderer.renderItemOverlayIntoGUI(mc.fontRenderer, mc.renderEngine, renderStack, field_146128_h + 6, field_146129_i + 8); GL11.glDisable(GL11.GL_LIGHTING); this.itemRenderer.zLevel = 0.0F; this.zLevel = 0.0F; @@ -52,7 +52,7 @@ public void drawButton (Minecraft mc, int mouseX, int mouseY) @Override public boolean mousePressed (Minecraft mc, int mouseX, int mouseY) { - boolean inWindow = this.enabled && this.drawButton && mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.field_146294_l && mouseY < this.yPosition + this.field_146295_m; + boolean inWindow = this.field_146124_l && this.field_146125_m && mouseX >= this.field_146128_h && mouseY >= this.field_146129_i && mouseX < this.field_146128_h + this.field_146120_f && mouseY < this.field_146129_i + this.field_146121_g; if (inWindow) { diff --git a/src/main/java/tconstruct/client/tabs/TabRegistry.java b/src/main/java/tconstruct/client/tabs/TabRegistry.java index 9c762fdcfaa..57c28ea9f6c 100644 --- a/src/main/java/tconstruct/client/tabs/TabRegistry.java +++ b/src/main/java/tconstruct/client/tabs/TabRegistry.java @@ -55,10 +55,10 @@ public static void updateTabValues (int cornerX, int cornerY, Class selectedB if (t.shouldAddToList()) { - t.id = count; - t.xPosition = cornerX + (count - 2) * 28; - t.yPosition = cornerY - 28; - t.enabled = !t.getClass().equals(selectedButton); + t.field_146127_k = count; + t.field_146128_h = cornerX + (count - 2) * 28; + t.field_146129_i = cornerY - 28; + t.field_146124_l = !t.getClass().equals(selectedButton); count++; } } diff --git a/src/main/java/tconstruct/preloader/AccessTransformers.java b/src/main/java/tconstruct/preloader/AccessTransformers.java index 3ccdf283eef..df6aa4c70e4 100644 --- a/src/main/java/tconstruct/preloader/AccessTransformers.java +++ b/src/main/java/tconstruct/preloader/AccessTransformers.java @@ -20,7 +20,7 @@ private void readMapFile(String name) { me.setAccessible(true); me.invoke(this, name); } catch (Exception ex) { - TConstructLoaderContainer.logger.severe("[AT] Unknown failure occured: " + ex.getMessage()); + TConstructLoaderContainer.logger.error("[AT] Unknown failure occured: " + ex.getMessage()); ex.printStackTrace(); } } diff --git a/src/main/java/tconstruct/preloader/TConstructLoaderContainer.java b/src/main/java/tconstruct/preloader/TConstructLoaderContainer.java index d3223e3f7ad..b5de6164369 100644 --- a/src/main/java/tconstruct/preloader/TConstructLoaderContainer.java +++ b/src/main/java/tconstruct/preloader/TConstructLoaderContainer.java @@ -20,8 +20,10 @@ import java.util.Arrays; import java.util.Map; -import java.util.logging.Level; -import java.util.logging.Logger; + +import org.apache.logging.log4j.Level; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class TConstructLoaderContainer extends DummyModContainer implements IFMLLoadingPlugin { @@ -29,11 +31,11 @@ public class TConstructLoaderContainer extends DummyModContainer implements IFML private final String[] asmTransformers = new String[] { "tconstruct.preloader.ASMInterfaceRepair", "tconstruct.preloader.AccessTransformers" }; private final ModMetadata md = new ModMetadata(); - public static Logger logger = Logger.getLogger("TCorestruct"); + public static Logger logger = LogManager.getLogger("TCorestruct"); public TConstructLoaderContainer() { - logger.setParent(FMLLog.getLogger()); + //logger.setParent(FMLLog.getLogger()); logger.info("Scalpel. Suction. Lumber axe. CLEAR! *zap*"); logger.info("Constructing preloader (Modules: " + Arrays.toString(asmTransformers) + ")"); try @@ -42,23 +44,23 @@ public TConstructLoaderContainer() } catch (PropAccessException ex) { - logger.severe("Could not get or create properties file! Assuming defaults."); - logger.severe(Arrays.toString(ex.getStackTrace())); + logger.error("Could not get or create properties file! Assuming defaults."); + logger.error(Arrays.toString(ex.getStackTrace())); } if (PropertyManager.preloaderContainer_verboseLog) { // Log ALL the things. - logger.warning("The preloader will now log absolutely everything. To disable this, either change preloaderContainer_verboseLog"); - logger.warning("in (or delete the config file) '" + PropertyManager.propFileName + "'."); - logger.setLevel(Level.ALL); + logger.warn("The preloader will now log absolutely everything. To disable this, either change preloaderContainer_verboseLog"); + logger.warn("in (or delete the config file) '" + PropertyManager.propFileName + "'."); + //logger.setLevel(Level.ALL); } if (PropertyManager.asmInterfaceRepair_verboseLog) { - logger.warning("ASM Interface Repair is set to be verbose, this is NOT GOOD FOR SERVERS, as it will spam the logs!"); - logger.warning("The debug mode is for debug use only. Turn it off unless instructed otherwise by a TCon developer."); - logger.warning("To reset advanced settings to default, delete the '" + PropertyManager.propFileName + "' file from the config folder."); + logger.warn("ASM Interface Repair is set to be verbose, this is NOT GOOD FOR SERVERS, as it will spam the logs!"); + logger.warn("The debug mode is for debug use only. Turn it off unless instructed otherwise by a TCon developer."); + logger.warn("To reset advanced settings to default, delete the '" + PropertyManager.propFileName + "' file from the config folder."); } md.autogenerated = true; diff --git a/src/main/java/tconstruct/preloader/helpers/PropertyManager.java b/src/main/java/tconstruct/preloader/helpers/PropertyManager.java index d89439b6dc3..cdd03f5b1e7 100644 --- a/src/main/java/tconstruct/preloader/helpers/PropertyManager.java +++ b/src/main/java/tconstruct/preloader/helpers/PropertyManager.java @@ -65,7 +65,7 @@ public static boolean getOrCreateProps () throws PropAccessException throw new PropAccessException(); } catch (NullPointerException ex) { - TConstructLoaderContainer.logger.warning("Preloader config structure has changed; attempting to recreate."); + TConstructLoaderContainer.logger.warn("Preloader config structure has changed; attempting to recreate."); attemptCreate(fp, props); } } diff --git a/src/main/java/tconstruct/util/TEventHandler.java b/src/main/java/tconstruct/util/TEventHandler.java index 65169469e92..d2f12c38013 100644 --- a/src/main/java/tconstruct/util/TEventHandler.java +++ b/src/main/java/tconstruct/util/TEventHandler.java @@ -224,7 +224,6 @@ public static boolean matchesLeaves (ItemStack stack) { if (stack.itemID >= 4096) return false; - Block block = Block.blocksList[stack.itemID]; if (block != null) { diff --git a/src/main/java/tconstruct/util/landmine/Helper.java b/src/main/java/tconstruct/util/landmine/Helper.java index 47b5eb1fa84..3fa033013b7 100644 --- a/src/main/java/tconstruct/util/landmine/Helper.java +++ b/src/main/java/tconstruct/util/landmine/Helper.java @@ -44,32 +44,32 @@ public static void renderInventoryCube (Block block, int metadata, int modelID, tessellator.startDrawingQuads(); tessellator.setNormal(0.0F, 1.0F, 0.0F); - renderer.renderFaceYPos(block, 0, 0, 0, renderer.getBlockIconFromSideAndMetadata(block, 1, metadata)); + renderer.renderFaceYPos(block, 0, 0, 0, renderer.func_147787_a(block, 1, metadata)); tessellator.draw(); tessellator.startDrawingQuads(); tessellator.setNormal(0.0F, -1.0F, 0.0F); - renderer.renderFaceYNeg(block, 0, 0, 0, renderer.getBlockIconFromSideAndMetadata(block, 0, metadata)); + renderer.renderFaceYNeg(block, 0, 0, 0, renderer.func_147787_a(block, 0, metadata)); tessellator.draw(); tessellator.startDrawingQuads(); tessellator.setNormal(1.0F, 0.0F, 0.0F); - renderer.renderFaceXPos(block, 0, 0, 0, renderer.getBlockIconFromSideAndMetadata(block, 2, metadata)); + renderer.renderFaceXPos(block, 0, 0, 0, renderer.func_147787_a(block, 2, metadata)); tessellator.draw(); tessellator.startDrawingQuads(); tessellator.setNormal(-1.0F, 0.0F, 0.0F); - renderer.renderFaceXNeg(block, 0, 0, 0, renderer.getBlockIconFromSideAndMetadata(block, 3, metadata)); + renderer.renderFaceXNeg(block, 0, 0, 0, renderer.func_147787_a(block, 3, metadata)); tessellator.draw(); tessellator.startDrawingQuads(); tessellator.setNormal(0.0F, 0.0F, 1.0F); - renderer.renderFaceZPos(block, 0, 0, 0, renderer.getBlockIconFromSideAndMetadata(block, 4, metadata)); + renderer.renderFaceZPos(block, 0, 0, 0, renderer.func_147787_a(block, 4, metadata)); tessellator.draw(); tessellator.startDrawingQuads(); tessellator.setNormal(0.0F, 0.0F, -1.0F); - renderer.renderFaceZNeg(block, 0, 0, 0, renderer.getBlockIconFromSideAndMetadata(block, 5, metadata)); + renderer.renderFaceZNeg(block, 0, 0, 0, renderer.func_147787_a(block, 5, metadata)); tessellator.draw(); } diff --git a/src/main/java/tconstruct/util/landmine/behavior/Behavior.java b/src/main/java/tconstruct/util/landmine/behavior/Behavior.java index a8f2f0422c6..1232421390e 100644 --- a/src/main/java/tconstruct/util/landmine/behavior/Behavior.java +++ b/src/main/java/tconstruct/util/landmine/behavior/Behavior.java @@ -26,8 +26,8 @@ public abstract class Behavior { - public static HashMap behaviorsListItems = new HashMap(); - public static HashMap behaviorsListBlocks = new HashMap(); + public static HashMap behaviorsListItems = new HashMap(); + public static HashMap behaviorsListBlocks = new HashMap(); protected static Behavior defaultBehavior; public static Behavior dummy = new BehaviorDummy(); @@ -81,7 +81,7 @@ public static Behavior getBehaviorFromStack (ItemStack par1ItemStack) { if (!behaviorsListBlocks.isEmpty()) { - return behaviorsListBlocks.get(par1ItemStack.itemID); + return behaviorsListBlocks.get(par1ItemStack); } else { @@ -92,7 +92,7 @@ public static Behavior getBehaviorFromStack (ItemStack par1ItemStack) { if (!behaviorsListItems.isEmpty()) { - return behaviorsListItems.get(par1ItemStack.itemID); + return behaviorsListItems.get(par1ItemStack); } else { @@ -110,16 +110,16 @@ public static void addBehavior (ItemStack par1ItemStack, Behavior par2Behavior) { if (par1ItemStack.getItem() instanceof ItemBlock) { - if (!behaviorsListBlocks.containsKey(par1ItemStack.itemID)) + if (!behaviorsListBlocks.containsKey(par1ItemStack)) { - behaviorsListBlocks.put(par1ItemStack.itemID, par2Behavior); + behaviorsListBlocks.put(par1ItemStack, par2Behavior); } } else { - if (!behaviorsListItems.containsKey(par1ItemStack.itemID)) + if (!behaviorsListItems.containsKey(par1ItemStack)) { - behaviorsListItems.put(par1ItemStack.itemID, par2Behavior); + behaviorsListItems.put(par1ItemStack, par2Behavior); } } } diff --git a/src/main/java/tconstruct/util/landmine/behavior/stackCombo/SpecialStackHandler.java b/src/main/java/tconstruct/util/landmine/behavior/stackCombo/SpecialStackHandler.java index 0157078f8cb..74e48929abf 100644 --- a/src/main/java/tconstruct/util/landmine/behavior/stackCombo/SpecialStackHandler.java +++ b/src/main/java/tconstruct/util/landmine/behavior/stackCombo/SpecialStackHandler.java @@ -68,7 +68,7 @@ public final void removeItemFromInventory (World par1World, int x, int y, int z, return; } - TileEntityLandmine tileEntity = (TileEntityLandmine) par1World.getBlockTileEntity(x, y, z); + TileEntityLandmine tileEntity = (TileEntityLandmine) par1World.func_147438_o(x, y, z); while (item.stackSize > 0) {