From 424329f1644e29d5042ed5fa3f6ed7287a807a15 Mon Sep 17 00:00:00 2001 From: Christian Date: Fri, 28 Dec 2012 15:29:35 -0500 Subject: [PATCH] Update for MCP updates with MC1.4.7 --- common/buildcraft/BuildCraftTransport.java | 10 ++-- .../api/blueprints/BlueprintManager.java | 2 +- .../buildcraft/api/blueprints/BptBlock.java | 2 +- common/buildcraft/builders/BlockMarker.java | 4 +- .../gui/ContainerBlueprintLibrary.java | 4 +- .../builders/gui/ContainerTemplate.java | 4 +- .../core/render/RenderingEntityBlocks.java | 16 +++---- common/buildcraft/energy/BlockEngine.java | 2 +- .../energy/gui/ContainerEngine.java | 4 +- .../factory/gui/ContainerAutoWorkbench.java | 16 +++---- .../factory/gui/ContainerRefinery.java | 4 +- common/buildcraft/silicon/BlockLaser.java | 4 +- .../silicon/SiliconRenderBlock.java | 28 +++++------ .../ContainerAssemblyAdvancedWorkbench.java | 4 +- .../silicon/gui/ContainerAssemblyTable.java | 4 +- .../transport/BlockGenericPipe.java | 16 +++---- common/buildcraft/transport/Gate.java | 2 +- common/buildcraft/transport/GateVanilla.java | 2 +- common/buildcraft/transport/ItemPipe.java | 2 +- .../transport/TransportProxyClient.java | 42 ++++++++--------- .../transport/gui/ContainerGateInterface.java | 4 +- .../transport/render/FacadeItemRenderer.java | 4 +- .../transport/render/PipeItemRenderer.java | 2 +- .../transport/render/PipeWorldRenderer.java | 46 +++++++++---------- 24 files changed, 114 insertions(+), 114 deletions(-) diff --git a/common/buildcraft/BuildCraftTransport.java b/common/buildcraft/BuildCraftTransport.java index 04a84237..c358dfa2 100644 --- a/common/buildcraft/BuildCraftTransport.java +++ b/common/buildcraft/BuildCraftTransport.java @@ -382,11 +382,11 @@ public class BuildCraftTransport { new BptBlockPipe(genericPipeBlock.blockID); - BuildCraftCore.itemBptProps[pipeItemsWood.shiftedIndex] = new BptItemPipeWooden(); - BuildCraftCore.itemBptProps[pipeLiquidsWood.shiftedIndex] = new BptItemPipeWooden(); - BuildCraftCore.itemBptProps[pipeItemsIron.shiftedIndex] = new BptItemPipeIron(); - BuildCraftCore.itemBptProps[pipeLiquidsIron.shiftedIndex] = new BptItemPipeIron(); - BuildCraftCore.itemBptProps[pipeItemsDiamond.shiftedIndex] = new BptItemPipeDiamond(); + BuildCraftCore.itemBptProps[pipeItemsWood.itemID] = new BptItemPipeWooden(); + BuildCraftCore.itemBptProps[pipeLiquidsWood.itemID] = new BptItemPipeWooden(); + BuildCraftCore.itemBptProps[pipeItemsIron.itemID] = new BptItemPipeIron(); + BuildCraftCore.itemBptProps[pipeLiquidsIron.itemID] = new BptItemPipeIron(); + BuildCraftCore.itemBptProps[pipeItemsDiamond.itemID] = new BptItemPipeDiamond(); ActionManager.registerTriggerProvider(new PipeTriggerProvider()); diff --git a/common/buildcraft/api/blueprints/BlueprintManager.java b/common/buildcraft/api/blueprints/BlueprintManager.java index c74b455f..4a528bef 100644 --- a/common/buildcraft/api/blueprints/BlueprintManager.java +++ b/common/buildcraft/api/blueprints/BlueprintManager.java @@ -12,7 +12,7 @@ public class BlueprintManager { public static ItemSignature getItemSignature(Item item) { ItemSignature sig = new ItemSignature(); - if (item.shiftedIndex >= Block.blocksList.length + BuildCraftAPI.LAST_ORIGINAL_ITEM) { + if (item.itemID >= Block.blocksList.length + BuildCraftAPI.LAST_ORIGINAL_ITEM) { sig.itemClassName = item.getClass().getSimpleName(); } diff --git a/common/buildcraft/api/blueprints/BptBlock.java b/common/buildcraft/api/blueprints/BptBlock.java index 6df0158b..d1785b46 100644 --- a/common/buildcraft/api/blueprints/BptBlock.java +++ b/common/buildcraft/api/blueprints/BptBlock.java @@ -102,7 +102,7 @@ public class BptBlock { if (stack.stackSize == 0 && stack.getItem().getContainerItem() != null) { Item container = stack.getItem().getContainerItem(); - stack.itemID = container.shiftedIndex; + stack.itemID = container.itemID; stack.stackSize = 1; stack.setItemDamage(0); } diff --git a/common/buildcraft/builders/BlockMarker.java b/common/buildcraft/builders/BlockMarker.java index 6004e2cb..e2142863 100644 --- a/common/buildcraft/builders/BlockMarker.java +++ b/common/buildcraft/builders/BlockMarker.java @@ -157,8 +157,8 @@ public class BlockMarker extends BlockContainer { } @Override - public int func_85104_a(World world, int x, int y, int z, int side, float par6, float par7, float par8, int meta) { - super.func_85104_a(world, x, y, z, side, par6, par7, par8, meta); + public int onBlockPlaced(World world, int x, int y, int z, int side, float par6, float par7, float par8, int meta) { + super.onBlockPlaced(world, x, y, z, side, par6, par7, par8, meta); if (side == 1 && BuildersProxy.canPlaceTorch(world, x, y - 1, z)) { meta = 5; diff --git a/common/buildcraft/builders/gui/ContainerBlueprintLibrary.java b/common/buildcraft/builders/gui/ContainerBlueprintLibrary.java index 9858d3e2..59478181 100644 --- a/common/buildcraft/builders/gui/ContainerBlueprintLibrary.java +++ b/common/buildcraft/builders/gui/ContainerBlueprintLibrary.java @@ -49,8 +49,8 @@ public class ContainerBlueprintLibrary extends BuildCraftContainer { } @Override - public void updateCraftingResults() { - super.updateCraftingResults(); + public void detectAndSendChanges() { + super.detectAndSendChanges(); for (int i = 0; i < crafters.size(); i++) { ICrafting icrafting = (ICrafting) crafters.get(i); if (progressIn != library.progressIn) { diff --git a/common/buildcraft/builders/gui/ContainerTemplate.java b/common/buildcraft/builders/gui/ContainerTemplate.java index 3f1d18e9..060fa920 100644 --- a/common/buildcraft/builders/gui/ContainerTemplate.java +++ b/common/buildcraft/builders/gui/ContainerTemplate.java @@ -49,8 +49,8 @@ public class ContainerTemplate extends BuildCraftContainer { */ @Override - public void updateCraftingResults() { - super.updateCraftingResults(); + public void detectAndSendChanges() { + super.detectAndSendChanges(); for (int i = 0; i < crafters.size(); i++) { ICrafting icrafting = (ICrafting) crafters.get(i); if (computingTime != template.computingTime) { diff --git a/common/buildcraft/core/render/RenderingEntityBlocks.java b/common/buildcraft/core/render/RenderingEntityBlocks.java index 9ba3fbb4..943817d8 100644 --- a/common/buildcraft/core/render/RenderingEntityBlocks.java +++ b/common/buildcraft/core/render/RenderingEntityBlocks.java @@ -57,7 +57,7 @@ public class RenderingEntityBlocks implements ISimpleBlockRenderingHandler { Tessellator tessellator = Tessellator.instance; block.setBlockBounds(Utils.pipeMinPos, 0.0F, Utils.pipeMinPos, Utils.pipeMaxPos, 1.0F, Utils.pipeMaxPos); - renderer.updateCustomBlockBounds(block); + renderer.setRenderBoundsFromBlock(block); block.setBlockBoundsForItemRender(); GL11.glTranslatef(-0.5F, -0.5F, -0.5F); tessellator.startDrawingQuads(); @@ -120,42 +120,42 @@ public class RenderingEntityBlocks implements ISimpleBlockRenderingHandler { float maxSize = Utils.pipeMaxPos; block.setBlockBounds(minSize, minSize, minSize, maxSize, maxSize, maxSize); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, i, j, k); if (Utils.checkLegacyPipesConnections(iblockaccess, i, j, k, i - 1, j, k)) { block.setBlockBounds(0.0F, minSize, minSize, minSize, maxSize, maxSize); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, i, j, k); } if (Utils.checkLegacyPipesConnections(iblockaccess, i, j, k, i + 1, j, k)) { block.setBlockBounds(maxSize, minSize, minSize, 1.0F, maxSize, maxSize); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, i, j, k); } if (Utils.checkLegacyPipesConnections(iblockaccess, i, j, k, i, j - 1, k)) { block.setBlockBounds(minSize, 0.0F, minSize, maxSize, minSize, maxSize); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, i, j, k); } if (Utils.checkLegacyPipesConnections(iblockaccess, i, j, k, i, j + 1, k)) { block.setBlockBounds(minSize, maxSize, minSize, maxSize, 1.0F, maxSize); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, i, j, k); } if (Utils.checkLegacyPipesConnections(iblockaccess, i, j, k, i, j, k - 1)) { block.setBlockBounds(minSize, minSize, 0.0F, maxSize, maxSize, minSize); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, i, j, k); } if (Utils.checkLegacyPipesConnections(iblockaccess, i, j, k, i, j, k + 1)) { block.setBlockBounds(minSize, minSize, maxSize, maxSize, maxSize, 1.0F); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, i, j, k); } diff --git a/common/buildcraft/energy/BlockEngine.java b/common/buildcraft/energy/BlockEngine.java index b0397510..67760330 100644 --- a/common/buildcraft/energy/BlockEngine.java +++ b/common/buildcraft/energy/BlockEngine.java @@ -111,7 +111,7 @@ public class BlockEngine extends BlockContainer { } @Override - public void func_85105_g(World world, int x, int y, int z, int par5) { + public void onPostBlockPlaced(World world, int x, int y, int z, int par5) { TileEngine tile = (TileEngine) world.getBlockTileEntity(x, y, z); tile.orientation = ForgeDirection.UP.ordinal(); tile.switchOrientation(); diff --git a/common/buildcraft/energy/gui/ContainerEngine.java b/common/buildcraft/energy/gui/ContainerEngine.java index a09710b0..27855183 100644 --- a/common/buildcraft/energy/gui/ContainerEngine.java +++ b/common/buildcraft/energy/gui/ContainerEngine.java @@ -45,8 +45,8 @@ public class ContainerEngine extends BuildCraftContainer { } @Override - public void updateCraftingResults() { - super.updateCraftingResults(); + public void detectAndSendChanges() { + super.detectAndSendChanges(); for (int i = 0; i < crafters.size(); i++) { engine.engine.sendGUINetworkData(this, (ICrafting) crafters.get(i)); diff --git a/common/buildcraft/factory/gui/ContainerAutoWorkbench.java b/common/buildcraft/factory/gui/ContainerAutoWorkbench.java index dab30ec6..c892548e 100644 --- a/common/buildcraft/factory/gui/ContainerAutoWorkbench.java +++ b/common/buildcraft/factory/gui/ContainerAutoWorkbench.java @@ -50,19 +50,19 @@ public class ContainerAutoWorkbench extends BuildCraftContainer { CoreProxy.proxy.onCraftingPickup(thePlayer.worldObj, thePlayer, itemstack); if (itemstack.itemID == Block.workbench.blockID) { thePlayer.addStat(AchievementList.buildWorkBench, 1); - } else if (itemstack.itemID == Item.pickaxeWood.shiftedIndex) { + } else if (itemstack.itemID == Item.pickaxeWood.itemID) { thePlayer.addStat(AchievementList.buildPickaxe, 1); } else if (itemstack.itemID == Block.stoneOvenIdle.blockID) { thePlayer.addStat(AchievementList.buildFurnace, 1); - } else if (itemstack.itemID == Item.hoeWood.shiftedIndex) { + } else if (itemstack.itemID == Item.hoeWood.itemID) { thePlayer.addStat(AchievementList.buildHoe, 1); - } else if (itemstack.itemID == Item.bread.shiftedIndex) { + } else if (itemstack.itemID == Item.bread.itemID) { thePlayer.addStat(AchievementList.makeBread, 1); - } else if (itemstack.itemID == Item.cake.shiftedIndex) { + } else if (itemstack.itemID == Item.cake.itemID) { thePlayer.addStat(AchievementList.bakeCake, 1); - } else if (itemstack.itemID == Item.pickaxeStone.shiftedIndex) { + } else if (itemstack.itemID == Item.pickaxeStone.itemID) { thePlayer.addStat(AchievementList.buildBetterPickaxe, 1); - } else if (itemstack.itemID == Item.swordWood.shiftedIndex) { + } else if (itemstack.itemID == Item.swordWood.itemID) { thePlayer.addStat(AchievementList.buildSword, 1); } else if (itemstack.itemID == Block.enchantmentTable.blockID) { thePlayer.addStat(AchievementList.enchantments, 1); @@ -106,8 +106,8 @@ public class ContainerAutoWorkbench extends BuildCraftContainer { } @Override - public void updateCraftingResults() { - super.updateCraftingResults(); + public void detectAndSendChanges() { + super.detectAndSendChanges(); craftResult.setInventorySlotContents(0, tile.findRecipe()); } diff --git a/common/buildcraft/factory/gui/ContainerRefinery.java b/common/buildcraft/factory/gui/ContainerRefinery.java index 32b6cfc1..8986f597 100644 --- a/common/buildcraft/factory/gui/ContainerRefinery.java +++ b/common/buildcraft/factory/gui/ContainerRefinery.java @@ -80,8 +80,8 @@ public class ContainerRefinery extends BuildCraftContainer { } @Override - public void updateCraftingResults() { - super.updateCraftingResults(); + public void detectAndSendChanges() { + super.detectAndSendChanges(); for (int i = 0; i < crafters.size(); i++) { refinery.sendGUINetworkData(this, (ICrafting) crafters.get(i)); } diff --git a/common/buildcraft/silicon/BlockLaser.java b/common/buildcraft/silicon/BlockLaser.java index 03243051..c7be002d 100644 --- a/common/buildcraft/silicon/BlockLaser.java +++ b/common/buildcraft/silicon/BlockLaser.java @@ -69,8 +69,8 @@ public class BlockLaser extends BlockContainer { } @Override - public int func_85104_a(World world, int x, int y, int z, int side, float par6, float par7, float par8, int meta) { - super.func_85104_a(world, x, y, z, side, par6, par7, par8, meta); + public int onBlockPlaced(World world, int x, int y, int z, int side, float par6, float par7, float par8, int meta) { + super.onBlockPlaced(world, x, y, z, side, par6, par7, par8, meta); if (side <= 6) { meta = side; diff --git a/common/buildcraft/silicon/SiliconRenderBlock.java b/common/buildcraft/silicon/SiliconRenderBlock.java index 79920507..7ab5956f 100644 --- a/common/buildcraft/silicon/SiliconRenderBlock.java +++ b/common/buildcraft/silicon/SiliconRenderBlock.java @@ -43,11 +43,11 @@ public class SiliconRenderBlock implements ISimpleBlockRenderingHandler { renderblocks.uvRotateBottom = 2; block.setBlockBounds(0.0F, 0.0F, 0.0F, 4F / 16F, 1, 1); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); block.setBlockBounds(4F / 16F, 5F / 16F, 5F / 16F, 13F / 16F, 11F / 16F, 11F / 16F); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); } else if (meta == ForgeDirection.WEST.ordinal()) { renderblocks.uvRotateEast = 1; @@ -56,22 +56,22 @@ public class SiliconRenderBlock implements ISimpleBlockRenderingHandler { renderblocks.uvRotateBottom = 1; block.setBlockBounds(1F - 4F / 16F, 0.0F, 0.0F, 1, 1, 1); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); block.setBlockBounds(1F - 13F / 16F, 5F / 16F, 5F / 16F, 1F - 4F / 16F, 11F / 16F, 11F / 16F); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); } else if (meta == ForgeDirection.NORTH.ordinal()) { renderblocks.uvRotateSouth = 1; renderblocks.uvRotateNorth = 2; block.setBlockBounds(0.0F, 0.0F, 1F - 4F / 16F, 1, 1, 1); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); block.setBlockBounds(5F / 16F, 5F / 16F, 1F - 13F / 16F, 11F / 16F, 11F / 16F, 1F - 4F / 16F); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); } else if (meta == ForgeDirection.SOUTH.ordinal()) { renderblocks.uvRotateSouth = 2; @@ -80,11 +80,11 @@ public class SiliconRenderBlock implements ISimpleBlockRenderingHandler { renderblocks.uvRotateBottom = 3; block.setBlockBounds(0.0F, 0.0F, 0.0F, 1, 1, 4F / 16F); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); block.setBlockBounds(5F / 16F, 5F / 16F, 4F / 16F, 11F / 16F, 11F / 16F, 13F / 16F); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); } else if (meta == ForgeDirection.DOWN.ordinal()) { renderblocks.uvRotateEast = 3; @@ -93,19 +93,19 @@ public class SiliconRenderBlock implements ISimpleBlockRenderingHandler { renderblocks.uvRotateNorth = 3; block.setBlockBounds(0.0F, 1.0F - 4F / 16F, 0.0F, 1.0F, 1.0F, 1.0F); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); block.setBlockBounds(5F / 16F, 1F - 13F / 16F, 5F / 16F, 11F / 16F, 1F - 4F / 16F, 11F / 16F); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); } else if (meta == ForgeDirection.UP.ordinal()) { block.setBlockBounds(0.0F, 0.0F, 0.0F, 1, 4F / 16F, 1); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); block.setBlockBounds(5F / 16F, 4F / 16F, 5F / 16F, 11F / 16F, 13F / 16F, 11F / 16F); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); } @@ -127,11 +127,11 @@ public class SiliconRenderBlock implements ISimpleBlockRenderingHandler { GL11.glTranslatef(-0.5F, -0.5F, -0.5F); block.setBlockBounds(0.0F, 0.0F, 0.0F, 1, 4F / 16F, 1); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderBlockInInv(renderblocks, block, 0); block.setBlockBounds(5F / 16F, 4F / 16F, 5F / 16F, 11F / 16F, 13F / 16F, 11F / 16F); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderBlockInInv(renderblocks, block, 1); GL11.glTranslatef(0.5F, 0.5F, 0.5F); diff --git a/common/buildcraft/silicon/gui/ContainerAssemblyAdvancedWorkbench.java b/common/buildcraft/silicon/gui/ContainerAssemblyAdvancedWorkbench.java index 993dcafb..dfc58e16 100644 --- a/common/buildcraft/silicon/gui/ContainerAssemblyAdvancedWorkbench.java +++ b/common/buildcraft/silicon/gui/ContainerAssemblyAdvancedWorkbench.java @@ -47,8 +47,8 @@ public class ContainerAssemblyAdvancedWorkbench extends BuildCraftContainer { } @Override - public void updateCraftingResults() { - super.updateCraftingResults(); + public void detectAndSendChanges() { + super.detectAndSendChanges(); for (int i = 0; i < workbench.getCraftingSlots().getSizeInventory(); i++) { Iterator var4 = this.crafters.iterator(); diff --git a/common/buildcraft/silicon/gui/ContainerAssemblyTable.java b/common/buildcraft/silicon/gui/ContainerAssemblyTable.java index 0cfb8ec1..e802057d 100644 --- a/common/buildcraft/silicon/gui/ContainerAssemblyTable.java +++ b/common/buildcraft/silicon/gui/ContainerAssemblyTable.java @@ -63,8 +63,8 @@ public class ContainerAssemblyTable extends BuildCraftContainer { } @Override - public void updateCraftingResults() { - super.updateCraftingResults(); + public void detectAndSendChanges() { + super.detectAndSendChanges(); for (int i = 0; i < crafters.size(); i++) { table.sendGUINetworkData(this, (ICrafting) crafters.get(i)); diff --git a/common/buildcraft/transport/BlockGenericPipe.java b/common/buildcraft/transport/BlockGenericPipe.java index 77995ff4..dcada481 100644 --- a/common/buildcraft/transport/BlockGenericPipe.java +++ b/common/buildcraft/transport/BlockGenericPipe.java @@ -352,8 +352,8 @@ public class BlockGenericPipe extends BlockContainer { } @Override - public int func_85104_a(World world, int x, int y, int z, int side, float par6, float par7, float par8, int meta) { - super.func_85104_a(world, x, y, z, side, par6, par7, par8, meta); + public int onBlockPlaced(World world, int x, int y, int z, int side, float par6, float par7, float par8, int meta) { + super.onBlockPlaced(world, x, y, z, side, par6, par7, par8, meta); Pipe pipe = getPipe(world, x, y, z); if (isValid(pipe)) { @@ -384,7 +384,7 @@ public class BlockGenericPipe extends BlockContainer { } else if (entityplayer.getCurrentEquippedItem() == null) { // Fall through the end of the test - } else if (entityplayer.getCurrentEquippedItem().itemID == Item.sign.shiftedIndex) + } else if (entityplayer.getCurrentEquippedItem().itemID == Item.sign.itemID) // Sign will be placed anyway, so lets show the sign gui return false; else if (entityplayer.getCurrentEquippedItem().getItem() instanceof ItemPipe) @@ -433,8 +433,8 @@ public class BlockGenericPipe extends BlockContainer { pipe.container.scheduleNeighborChange(); return true; } - } else if (entityplayer.getCurrentEquippedItem().itemID == BuildCraftTransport.pipeGate.shiftedIndex - || entityplayer.getCurrentEquippedItem().itemID == BuildCraftTransport.pipeGateAutarchic.shiftedIndex) + } else if (entityplayer.getCurrentEquippedItem().itemID == BuildCraftTransport.pipeGate.itemID + || entityplayer.getCurrentEquippedItem().itemID == BuildCraftTransport.pipeGateAutarchic.itemID) if (!pipe.hasInterface()) { pipe.gate = new GateVanilla(pipe, entityplayer.getCurrentEquippedItem()); @@ -541,7 +541,7 @@ public class BlockGenericPipe extends BlockContainer { } @Override - public boolean canConnectRedstone(IBlockAccess world, int x, int y, int z, int side) { + public boolean canMakeRedstoneConnectionOnSide(IBlockAccess world, int x, int y, int z, int side) { Pipe pipe = getPipe(world, x, y, z); if (isValid(pipe)) @@ -595,9 +595,9 @@ public class BlockGenericPipe extends BlockContainer { public static ItemPipe registerPipe(int key, Class clas) { ItemPipe item = new ItemPipe(key); - pipes.put(item.shiftedIndex, clas); + pipes.put(item.itemID, clas); - Pipe dummyPipe = createPipe(item.shiftedIndex); + Pipe dummyPipe = createPipe(item.itemID); if (dummyPipe != null) { item.setTextureFile(dummyPipe.getTextureFile()); item.setTextureIndex(dummyPipe.getTextureIndexForItem()); diff --git a/common/buildcraft/transport/Gate.java b/common/buildcraft/transport/Gate.java index 896517fe..6498a1cb 100644 --- a/common/buildcraft/transport/Gate.java +++ b/common/buildcraft/transport/Gate.java @@ -101,7 +101,7 @@ public abstract class Gate { public abstract String getGuiFile(); public static boolean isGateItem(ItemStack stack) { - return stack.itemID == BuildCraftTransport.pipeGate.shiftedIndex || stack.itemID == BuildCraftTransport.pipeGateAutarchic.shiftedIndex; + return stack.itemID == BuildCraftTransport.pipeGate.itemID || stack.itemID == BuildCraftTransport.pipeGateAutarchic.itemID; } } diff --git a/common/buildcraft/transport/GateVanilla.java b/common/buildcraft/transport/GateVanilla.java index f34e8ac9..4d2e4851 100644 --- a/common/buildcraft/transport/GateVanilla.java +++ b/common/buildcraft/transport/GateVanilla.java @@ -31,7 +31,7 @@ public class GateVanilla extends Gate { public GateVanilla(Pipe pipe, ItemStack stack) { super(pipe, stack); - if (stack.itemID == BuildCraftTransport.pipeGateAutarchic.shiftedIndex) { + if (stack.itemID == BuildCraftTransport.pipeGateAutarchic.itemID) { addEnergyPulser(pipe); } } diff --git a/common/buildcraft/transport/ItemPipe.java b/common/buildcraft/transport/ItemPipe.java index e6e56afc..513803d3 100644 --- a/common/buildcraft/transport/ItemPipe.java +++ b/common/buildcraft/transport/ItemPipe.java @@ -66,7 +66,7 @@ public class ItemPipe extends ItemBuildCraft implements IItemPipe { return false; if (entityplayer.canCurrentToolHarvestBlock(i, j, k) && world.canPlaceEntityOnSide(blockID, i, j, k, false, side, entityplayer)) { - Pipe pipe = BlockGenericPipe.createPipe(shiftedIndex); + Pipe pipe = BlockGenericPipe.createPipe(itemID); if (BlockGenericPipe.placePipe(pipe, world, i, j, k, blockID, 0)) { Block.blocksList[blockID].onBlockPlacedBy(world, i, j, k, entityplayer); diff --git a/common/buildcraft/transport/TransportProxyClient.java b/common/buildcraft/transport/TransportProxyClient.java index 303502c4..6d22e4fc 100644 --- a/common/buildcraft/transport/TransportProxyClient.java +++ b/common/buildcraft/transport/TransportProxyClient.java @@ -26,31 +26,31 @@ public class TransportProxyClient extends TransportProxy { @Override public void registerRenderers() { - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsWood.shiftedIndex, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsCobblestone.shiftedIndex, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsStone.shiftedIndex, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsIron.shiftedIndex, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsGold.shiftedIndex, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsDiamond.shiftedIndex, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsObsidian.shiftedIndex, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsWood.itemID, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsCobblestone.itemID, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsStone.itemID, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsIron.itemID, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsGold.itemID, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsDiamond.itemID, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsObsidian.itemID, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsWood.shiftedIndex, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsCobblestone.shiftedIndex, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsStone.shiftedIndex, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsIron.shiftedIndex, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsGold.shiftedIndex, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsWood.itemID, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsCobblestone.itemID, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsStone.itemID, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsIron.itemID, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsGold.itemID, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerWood.shiftedIndex, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerStone.shiftedIndex, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerGold.shiftedIndex, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeStructureCobblestone.shiftedIndex, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerWood.itemID, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerStone.itemID, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerGold.itemID, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeStructureCobblestone.itemID, pipeItemRenderer); // MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsStipes.shiftedIndex, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsVoid.shiftedIndex, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsVoid.shiftedIndex, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsSandstone.shiftedIndex, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsSandstone.shiftedIndex, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsVoid.itemID, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsVoid.itemID, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsSandstone.itemID, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsSandstone.itemID, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.facadeItem.shiftedIndex, facadeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.facadeItem.itemID, facadeItemRenderer); TransportProxy.pipeModel = RenderingRegistry.getNextAvailableRenderId(); RenderingRegistry.registerBlockHandler(pipeWorldRenderer); diff --git a/common/buildcraft/transport/gui/ContainerGateInterface.java b/common/buildcraft/transport/gui/ContainerGateInterface.java index 84d5ed8d..21f97a8b 100644 --- a/common/buildcraft/transport/gui/ContainerGateInterface.java +++ b/common/buildcraft/transport/gui/ContainerGateInterface.java @@ -246,8 +246,8 @@ public class ContainerGateInterface extends BuildCraftContainer { } @Override - public void updateCraftingResults() { - super.updateCraftingResults(); + public void detectAndSendChanges() { + super.detectAndSendChanges(); int state = calculateTriggerState(); if (state != lastTriggerState) { for (int i = 0; i < this.crafters.size(); i++) { diff --git a/common/buildcraft/transport/render/FacadeItemRenderer.java b/common/buildcraft/transport/render/FacadeItemRenderer.java index e54bdeab..1c2820cb 100644 --- a/common/buildcraft/transport/render/FacadeItemRenderer.java +++ b/common/buildcraft/transport/render/FacadeItemRenderer.java @@ -31,7 +31,7 @@ public class FacadeItemRenderer implements IItemRenderer { GL11.glPushMatrix(); ForgeHooksClient.bindTexture(block.getTextureFile(), 0); block.setBlockBounds(0F, 0F, 1F - 1F / 16F, 1F, 1F, 1F); - render.updateCustomBlockBounds(block); + render.setRenderBoundsFromBlock(block); GL11.glTranslatef(translateX, translateY, translateZ); tessellator.startDrawingQuads(); @@ -67,7 +67,7 @@ public class FacadeItemRenderer implements IItemRenderer { int textureID = 7 * 16 + 13; // Structure pipe block.setBlockBounds(Utils.pipeMinPos, Utils.pipeMinPos, Utils.pipeMinPos, Utils.pipeMaxPos, Utils.pipeMaxPos, Utils.pipeMaxPos - 1F / 16F); block.setBlockBoundsForItemRender(); - render.updateCustomBlockBounds(block); + render.setRenderBoundsFromBlock(block); GL11.glTranslatef(translateX, translateY, translateZ + 0.25F); tessellator.startDrawingQuads(); diff --git a/common/buildcraft/transport/render/PipeItemRenderer.java b/common/buildcraft/transport/render/PipeItemRenderer.java index 3657e4eb..8c0735e0 100644 --- a/common/buildcraft/transport/render/PipeItemRenderer.java +++ b/common/buildcraft/transport/render/PipeItemRenderer.java @@ -28,7 +28,7 @@ public class PipeItemRenderer implements IItemRenderer { block.setBlockBounds(Utils.pipeMinPos, 0.0F, Utils.pipeMinPos, Utils.pipeMaxPos, 1.0F, Utils.pipeMaxPos); block.setBlockBoundsForItemRender(); - render.updateCustomBlockBounds(block); + render.setRenderBoundsFromBlock(block); GL11.glTranslatef(translateX, translateY, translateZ); tessellator.startDrawingQuads(); diff --git a/common/buildcraft/transport/render/PipeWorldRenderer.java b/common/buildcraft/transport/render/PipeWorldRenderer.java index d60ddc12..3ee581cc 100644 --- a/common/buildcraft/transport/render/PipeWorldRenderer.java +++ b/common/buildcraft/transport/render/PipeWorldRenderer.java @@ -85,48 +85,48 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler { state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.UNKNOWN); block.setBlockBounds(minSize, minSize, minSize, maxSize, maxSize, maxSize); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); if (state.pipeConnectionMatrix.isConnected(ForgeDirection.WEST)) { state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.WEST); block.setBlockBounds(0.0F, minSize, minSize, minSize, maxSize, maxSize); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); } if (state.pipeConnectionMatrix.isConnected(ForgeDirection.EAST)) { state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.EAST); block.setBlockBounds(maxSize, minSize, minSize, 1.0F, maxSize, maxSize); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); } if (state.pipeConnectionMatrix.isConnected(ForgeDirection.DOWN)) { state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.DOWN); block.setBlockBounds(minSize, 0.0F, minSize, maxSize, minSize, maxSize); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); } if (state.pipeConnectionMatrix.isConnected(ForgeDirection.UP)) { state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.UP); block.setBlockBounds(minSize, maxSize, minSize, maxSize, 1.0F, maxSize); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); } if (state.pipeConnectionMatrix.isConnected(ForgeDirection.NORTH)) { state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.NORTH); block.setBlockBounds(minSize, minSize, 0.0F, maxSize, maxSize, minSize); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); } if (state.pipeConnectionMatrix.isConnected(ForgeDirection.SOUTH)) { state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.SOUTH); block.setBlockBounds(minSize, minSize, maxSize, maxSize, maxSize, 1.0F); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); } @@ -190,7 +190,7 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler { rotated[1][0] -= zFightOffset / 2; transform(rotated, direction); block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); rotated = deepClone(zeroState); @@ -198,7 +198,7 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler { rotated[1][0] -= zFightOffset / 2; transform(rotated, direction); block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); rotated = deepClone(zeroState); @@ -207,7 +207,7 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler { rotated[1][1] -= zFightOffset; transform(rotated, direction); block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); rotated = deepClone(zeroState); @@ -216,13 +216,13 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler { rotated[1][1] -= zFightOffset; transform(rotated, direction); block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); } else { // Solid facade float[][] rotated = deepClone(zeroState); transform(rotated, direction); block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); } } @@ -247,7 +247,7 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler { transform(rotated, direction); block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); } } @@ -441,7 +441,7 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler { if (minZ != Utils.pipeMinPos || maxZ != Utils.pipeMaxPos || !found) { block.setBlockBounds(cx == Utils.pipeMinPos ? cx - 0.05F : cx, cy == Utils.pipeMinPos ? cy - 0.05F : cy, minZ, cx == Utils.pipeMinPos ? cx : cx + 0.05F, cy == Utils.pipeMinPos ? cy : cy + 0.05F, maxZ); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); } @@ -450,7 +450,7 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler { if (minX != Utils.pipeMinPos || maxX != Utils.pipeMaxPos || !found) { block.setBlockBounds(minX, cy == Utils.pipeMinPos ? cy - 0.05F : cy, cz == Utils.pipeMinPos ? cz - 0.05F : cz, maxX, cy == Utils.pipeMinPos ? cy : cy + 0.05F, cz == Utils.pipeMinPos ? cz : cz + 0.05F); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); } @@ -459,14 +459,14 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler { if (minY != Utils.pipeMinPos || maxY != Utils.pipeMaxPos || !found) { block.setBlockBounds(cx == Utils.pipeMinPos ? cx - 0.05F : cx, minY, cz == Utils.pipeMinPos ? cz - 0.05F : cz, cx == Utils.pipeMinPos ? cx : cx + 0.05F, maxY, cz == Utils.pipeMinPos ? cz : cz + 0.05F); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); } if (center || !found) { block.setBlockBounds(cx == Utils.pipeMinPos ? cx - 0.05F : cx, cy == Utils.pipeMinPos ? cy - 0.05F : cy, cz == Utils.pipeMinPos ? cz - 0.05F : cz, cx == Utils.pipeMinPos ? cx : cx + 0.05F, cy == Utils.pipeMinPos ? cy : cy + 0.05F, cz == Utils.pipeMinPos ? cz : cz + 0.05F); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); } @@ -481,37 +481,37 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler { if (!state.pipeConnectionMatrix.isConnected(ForgeDirection.WEST) && !state.facadeMatrix.isConnected(ForgeDirection.WEST)) { block.setBlockBounds(Utils.pipeMinPos - 0.10F, min, min, Utils.pipeMinPos, max, max); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); } if (!state.pipeConnectionMatrix.isConnected(ForgeDirection.EAST) && !state.facadeMatrix.isConnected(ForgeDirection.EAST)) { block.setBlockBounds(Utils.pipeMaxPos, min, min, Utils.pipeMaxPos + 0.10F, max, max); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); } if (!state.pipeConnectionMatrix.isConnected(ForgeDirection.DOWN) && !state.facadeMatrix.isConnected(ForgeDirection.DOWN)) { block.setBlockBounds(min, Utils.pipeMinPos - 0.10F, min, max, Utils.pipeMinPos, max); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); } if (!state.pipeConnectionMatrix.isConnected(ForgeDirection.UP) && !state.facadeMatrix.isConnected(ForgeDirection.UP)) { block.setBlockBounds(min, Utils.pipeMaxPos, min, max, Utils.pipeMaxPos + 0.10F, max); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); } if (!state.pipeConnectionMatrix.isConnected(ForgeDirection.NORTH) && !state.facadeMatrix.isConnected(ForgeDirection.NORTH)) { block.setBlockBounds(min, min, Utils.pipeMinPos - 0.10F, max, max, Utils.pipeMinPos); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); } if (!state.pipeConnectionMatrix.isConnected(ForgeDirection.SOUTH) && !state.facadeMatrix.isConnected(ForgeDirection.SOUTH)) { block.setBlockBounds(min, min, Utils.pipeMaxPos, max, max, Utils.pipeMaxPos + 0.10F); - renderblocks.updateCustomBlockBounds(block); + renderblocks.setRenderBoundsFromBlock(block); renderblocks.renderStandardBlock(block, x, y, z); } }