From 047120b32413d295516c139f5b84cdf023d46ef1 Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 24 Oct 2012 01:15:33 -0400 Subject: [PATCH] Fix pipe rendering for 1.4.1. Fix facades handling block ids > 2097, hopefully. Gold pipes are on by default now. --- common/buildcraft/BuildCraftBuilders.java | 12 ++++----- common/buildcraft/BuildCraftEnergy.java | 6 ++--- .../core/render/RenderingEntityBlocks.java | 8 ++++++ .../silicon/SiliconRenderBlock.java | 14 ++++++++++ common/buildcraft/transport/ItemFacade.java | 8 +++--- .../transport/pipes/PipeItemsGold.java | 12 ++++----- .../transport/render/FacadeItemRenderer.java | 18 +++++++------ .../transport/render/PipeItemRenderer.java | 8 +++--- .../transport/render/PipeWorldRenderer.java | 27 ++++++++++++++++--- 9 files changed, 79 insertions(+), 34 deletions(-) diff --git a/common/buildcraft/BuildCraftBuilders.java b/common/buildcraft/BuildCraftBuilders.java index 14abab14..947ddf23 100644 --- a/common/buildcraft/BuildCraftBuilders.java +++ b/common/buildcraft/BuildCraftBuilders.java @@ -221,12 +221,12 @@ public class BuildCraftBuilders { public void initialize(FMLPreInitializationEvent evt) { Property templateItemId = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_ITEM,"templateItem.id", DefaultProps.TEMPLATE_ITEM_ID); Property blueprintItemId = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_ITEM,"blueprintItem.id", DefaultProps.BLUEPRINT_ITEM_ID); - Property markerId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"marker.id", DefaultProps.MARKER_ID); - Property pathMarkerId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"pathMarker.id", DefaultProps.PATH_MARKER_ID); - Property fillerId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"filler.id", DefaultProps.FILLER_ID); - Property builderId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"builder.id", DefaultProps.BUILDER_ID); - Property architectId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"architect.id", DefaultProps.ARCHITECT_ID); - Property libraryId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"blueprintLibrary.id", DefaultProps.BLUEPRINT_LIBRARY_ID); + Property markerId = BuildCraftCore.mainConfiguration.getBlock("marker.id", DefaultProps.MARKER_ID); + Property pathMarkerId = BuildCraftCore.mainConfiguration.getBlock("pathMarker.id", DefaultProps.PATH_MARKER_ID); + Property fillerId = BuildCraftCore.mainConfiguration.getBlock("filler.id", DefaultProps.FILLER_ID); + Property builderId = BuildCraftCore.mainConfiguration.getBlock("builder.id", DefaultProps.BUILDER_ID); + Property architectId = BuildCraftCore.mainConfiguration.getBlock("architect.id", DefaultProps.ARCHITECT_ID); + Property libraryId = BuildCraftCore.mainConfiguration.getBlock("blueprintLibrary.id", DefaultProps.BLUEPRINT_LIBRARY_ID); Property fillerDestroyProp = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_GENERAL,"filler.destroy", DefaultProps.FILLER_DESTROY); fillerDestroyProp.comment = "If true, Filler will destroy blocks instead of breaking them."; diff --git a/common/buildcraft/BuildCraftEnergy.java b/common/buildcraft/BuildCraftEnergy.java index 8334cc70..2aa92553 100644 --- a/common/buildcraft/BuildCraftEnergy.java +++ b/common/buildcraft/BuildCraftEnergy.java @@ -103,9 +103,9 @@ public class BuildCraftEnergy { @PreInit public void initialize(FMLPreInitializationEvent evt) { - Property engineId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"engine.id", DefaultProps.ENGINE_ID); - Property oilStillId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"oilStill.id", DefaultProps.OIL_STILL_ID); - Property oilMovingId = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_BLOCK,"oilMoving.id", DefaultProps.OIL_MOVING_ID); + Property engineId = BuildCraftCore.mainConfiguration.getBlock("engine.id", DefaultProps.ENGINE_ID); + Property oilStillId = BuildCraftCore.mainConfiguration.getBlock("oilStill.id", DefaultProps.OIL_STILL_ID); + Property oilMovingId = BuildCraftCore.mainConfiguration.getBlock("oilMoving.id", DefaultProps.OIL_MOVING_ID); Property bucketOilId = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_ITEM,"bucketOil.id", DefaultProps.BUCKET_OIL_ID); Property bucketFuelId = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_ITEM,"bucketFuel.id", DefaultProps.BUCKET_FUEL_ID); Property itemFuelId = BuildCraftCore.mainConfiguration.get( Configuration.CATEGORY_ITEM,"fuel.id", DefaultProps.FUEL_ID); diff --git a/common/buildcraft/core/render/RenderingEntityBlocks.java b/common/buildcraft/core/render/RenderingEntityBlocks.java index aae84447..693c8785 100644 --- a/common/buildcraft/core/render/RenderingEntityBlocks.java +++ b/common/buildcraft/core/render/RenderingEntityBlocks.java @@ -56,6 +56,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.func_83018_a(block); block.setBlockBoundsForItemRender(); GL11.glTranslatef(-0.5F, -0.5F, -0.5F); tessellator.startDrawingQuads(); @@ -119,35 +120,42 @@ public class RenderingEntityBlocks implements ISimpleBlockRenderingHandler { float maxSize = Utils.pipeMaxPos; block.setBlockBounds(minSize, minSize, minSize, maxSize, maxSize, maxSize); + renderblocks.func_83018_a(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.func_83018_a(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.func_83018_a(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.func_83018_a(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.func_83018_a(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.func_83018_a(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.func_83018_a(block); renderblocks.renderStandardBlock(block, i, j, k); } diff --git a/common/buildcraft/silicon/SiliconRenderBlock.java b/common/buildcraft/silicon/SiliconRenderBlock.java index 98bb1ec2..b6046b0a 100644 --- a/common/buildcraft/silicon/SiliconRenderBlock.java +++ b/common/buildcraft/silicon/SiliconRenderBlock.java @@ -44,9 +44,11 @@ public class SiliconRenderBlock implements ISimpleBlockRenderingHandler { renderblocks.uvRotateBottom = 2; block.setBlockBounds(0.0F, 0.0F, 0.0F, 4F / 16F, 1, 1); + renderblocks.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); block.setBlockBounds(4F / 16F, 5F / 16F, 5F / 16F, 13F / 16F, 11F / 16F, 11F / 16F); + renderblocks.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); } else if (meta == Orientations.XNeg.ordinal()) { renderblocks.uvRotateEast = 1; @@ -55,18 +57,22 @@ public class SiliconRenderBlock implements ISimpleBlockRenderingHandler { renderblocks.uvRotateBottom = 1; block.setBlockBounds(1F - 4F / 16F, 0.0F, 0.0F, 1, 1, 1); + renderblocks.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); block.setBlockBounds(1F - 13F / 16F, 5F / 16F, 5F / 16F, 1F - 4F / 16F, 11F / 16F, 11F / 16F); + renderblocks.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); } else if (meta == Orientations.ZNeg.ordinal()) { renderblocks.uvRotateSouth = 1; renderblocks.uvRotateNorth = 2; block.setBlockBounds(0.0F, 0.0F, 1F - 4F / 16F, 1, 1, 1); + renderblocks.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); block.setBlockBounds(5F / 16F, 5F / 16F, 1F - 13F / 16F, 11F / 16F, 11F / 16F, 1F - 4F / 16F); + renderblocks.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); } else if (meta == Orientations.ZPos.ordinal()) { renderblocks.uvRotateSouth = 2; @@ -75,9 +81,11 @@ public class SiliconRenderBlock implements ISimpleBlockRenderingHandler { renderblocks.uvRotateBottom = 3; block.setBlockBounds(0.0F, 0.0F, 0.0F, 1, 1, 4F / 16F); + renderblocks.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); block.setBlockBounds(5F / 16F, 5F / 16F, 4F / 16F, 11F / 16F, 11F / 16F, 13F / 16F); + renderblocks.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); } else if (meta == Orientations.YNeg.ordinal()) { renderblocks.uvRotateEast = 3; @@ -86,15 +94,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.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); block.setBlockBounds(5F / 16F, 1F - 13F / 16F, 5F / 16F, 11F / 16F, 1F - 4F / 16F, 11F / 16F); + renderblocks.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); } else if (meta == Orientations.YPos.ordinal()) { block.setBlockBounds(0.0F, 0.0F, 0.0F, 1, 4F / 16F, 1); + renderblocks.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); block.setBlockBounds(5F / 16F, 4F / 16F, 5F / 16F, 11F / 16F, 13F / 16F, 11F / 16F); + renderblocks.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); } @@ -116,9 +128,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.func_83018_a(block); renderBlockInInv(renderblocks, block, 0); block.setBlockBounds(5F / 16F, 4F / 16F, 5F / 16F, 11F / 16F, 13F / 16F, 11F / 16F); + renderblocks.func_83018_a(block); renderBlockInInv(renderblocks, block, 1); GL11.glTranslatef(0.5F, 0.5F, 0.5F); diff --git a/common/buildcraft/transport/ItemFacade.java b/common/buildcraft/transport/ItemFacade.java index bc446a45..9a4621da 100644 --- a/common/buildcraft/transport/ItemFacade.java +++ b/common/buildcraft/transport/ItemFacade.java @@ -98,8 +98,8 @@ public class ItemFacade extends ItemBuildCraft { if (stack.getItem() instanceof ItemBlock){ ItemBlock itemBlock = (ItemBlock) stack.getItem(); int blockId = itemBlock.getBlockID(); - //Block certain IDs (Bedrock, leaves and spunge) - if (blockId == 7 || blockId == 18 || blockId == 19) continue; + //Block certain IDs (Bedrock, leaves, sponge, lockedchest) + if (blockId == 7 || blockId == 18 || blockId == 19 || blockId == 95) continue; if (Block.blocksList[blockId] != null && Block.blocksList[blockId].isOpaqueCube() @@ -154,7 +154,7 @@ public class ItemFacade extends ItemBuildCraft { } public static int encode(int blockId, int metaData){ - return metaData + (blockId << 4); + return metaData & 0xF | ((blockId & 0xFFF) << 4); } public static int getMetaData(int encoded){ @@ -162,7 +162,7 @@ public class ItemFacade extends ItemBuildCraft { } public static int getBlockId(int encoded){ - return encoded >>> 4; + return ((encoded & 0xFFF0) >>> 4); } diff --git a/common/buildcraft/transport/pipes/PipeItemsGold.java b/common/buildcraft/transport/pipes/PipeItemsGold.java index fc2630da..8c5d46e4 100644 --- a/common/buildcraft/transport/pipes/PipeItemsGold.java +++ b/common/buildcraft/transport/pipes/PipeItemsGold.java @@ -33,15 +33,15 @@ public class PipeItemsGold extends Pipe implements IPipeTransportItemsHook { public String getTextureFile() { return DefaultProps.TEXTURE_BLOCKS; } - + @Override public int getTextureIndex(Orientations direction) { - if (broadcastRedstone || worldObj != null && worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)) + if (!broadcastRedstone && worldObj != null && !worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)) return 1 * 16 + 14; else return 1 * 16 + 4; } - + @Override public boolean isPipeConnected(TileEntity tile) { if (!super.isPipeConnected(tile)) @@ -66,7 +66,7 @@ public class PipeItemsGold extends Pipe implements IPipeTransportItemsHook { @Override public void entityEntered(IPipedItem item, Orientations orientation) { - if (broadcastRedstone || worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)) + if (!broadcastRedstone && !worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)) item.setSpeed(Utils.pipeNormalSpeed * 20F); } @@ -74,9 +74,9 @@ public class PipeItemsGold extends Pipe implements IPipeTransportItemsHook { public void readjustSpeed(IPipedItem item) { ((PipeTransportItems) transport).defaultReajustSpeed(item); } - + @Override - public boolean canConnectRedstone() { + public boolean canConnectRedstone() { return true; } } diff --git a/common/buildcraft/transport/render/FacadeItemRenderer.java b/common/buildcraft/transport/render/FacadeItemRenderer.java index 719c7b94..f1bfc873 100644 --- a/common/buildcraft/transport/render/FacadeItemRenderer.java +++ b/common/buildcraft/transport/render/FacadeItemRenderer.java @@ -22,18 +22,19 @@ public class FacadeItemRenderer implements IItemRenderer { int decodedBlockId = ItemFacade.getBlockId(item.getItemDamage()); Tessellator tessellator = Tessellator.instance; - + Block block = Block.blocksList[decodedBlockId]; if (block == null){ return; } - + //Render Facade GL11.glPushMatrix(); ForgeHooksClient.bindTexture(block.getTextureFile(), 0); block.setBlockBounds(0F, 0F, 1F - 1F/16F, 1F, 1F, 1F); + render.func_83018_a(block); GL11.glTranslatef(translateX, translateY, translateZ); - + tessellator.startDrawingQuads(); tessellator.setNormal(0.0F, -1F, 0.0F); render.renderBottomFace(block, 0.0D, 0.0D, 0.0D, block.getBlockTextureFromSideAndMetadata(0, decodedMeta)); @@ -60,16 +61,17 @@ public class FacadeItemRenderer implements IItemRenderer { tessellator.draw(); block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); GL11.glPopMatrix(); - - + + //Render StructurePipe ForgeHooksClient.bindTexture(DefaultProps.TEXTURE_BLOCKS, 0); block = BuildCraftTransport.genericPipeBlock; 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.func_83018_a(block); GL11.glTranslatef(translateX, translateY, translateZ + 0.25F); - + tessellator.startDrawingQuads(); tessellator.setNormal(0.0F, -0F, 0.0F); render.renderBottomFace(block, 0.0D, 0.0D, 0.0D, textureID); @@ -98,7 +100,7 @@ public class FacadeItemRenderer implements IItemRenderer { block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); } - + @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { switch (type){ @@ -117,7 +119,7 @@ public class FacadeItemRenderer implements IItemRenderer { @Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { - + switch (type) { case ENTITY: GL11.glScalef(0.50F, 0.50F, 0.50F); diff --git a/common/buildcraft/transport/render/PipeItemRenderer.java b/common/buildcraft/transport/render/PipeItemRenderer.java index 229a666f..6b962208 100644 --- a/common/buildcraft/transport/render/PipeItemRenderer.java +++ b/common/buildcraft/transport/render/PipeItemRenderer.java @@ -14,7 +14,7 @@ import net.minecraft.src.Tessellator; import net.minecraftforge.client.IItemRenderer; public class PipeItemRenderer implements IItemRenderer { - + private void renderPipeItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ) { // GL11.glBindTexture(GL11.GL_TEXTURE_2D, 10); @@ -27,6 +27,8 @@ public class PipeItemRenderer implements IItemRenderer { block.setBlockBounds(Utils.pipeMinPos, 0.0F, Utils.pipeMinPos, Utils.pipeMaxPos, 1.0F, Utils.pipeMaxPos); block.setBlockBoundsForItemRender(); + render.func_83018_a(block); + GL11.glTranslatef(translateX, translateY, translateZ); tessellator.startDrawingQuads(); tessellator.setNormal(0.0F, -1F, 0.0F); @@ -56,9 +58,9 @@ public class PipeItemRenderer implements IItemRenderer { block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); } - + /** IItemRenderer implementation **/ - + @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { switch (type) { diff --git a/common/buildcraft/transport/render/PipeWorldRenderer.java b/common/buildcraft/transport/render/PipeWorldRenderer.java index baf72701..890f6eba 100644 --- a/common/buildcraft/transport/render/PipeWorldRenderer.java +++ b/common/buildcraft/transport/render/PipeWorldRenderer.java @@ -83,41 +83,48 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler { state.currentTextureIndex = state.textureMatrix.getTextureIndex(Orientations.Unknown); block.setBlockBounds(minSize, minSize, minSize, maxSize, maxSize, maxSize); + renderblocks.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); if (state.pipeConnectionMatrix.isConnected(Orientations.XNeg)) { state.currentTextureIndex = state.textureMatrix.getTextureIndex(Orientations.XNeg); block.setBlockBounds(0.0F, minSize, minSize, minSize, maxSize, maxSize); + renderblocks.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); } if (state.pipeConnectionMatrix.isConnected(Orientations.XPos)) { state.currentTextureIndex = state.textureMatrix.getTextureIndex(Orientations.XPos); block.setBlockBounds(maxSize, minSize, minSize, 1.0F, maxSize, maxSize); + renderblocks.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); } if (state.pipeConnectionMatrix.isConnected(Orientations.YNeg)) { state.currentTextureIndex = state.textureMatrix.getTextureIndex(Orientations.YNeg); block.setBlockBounds(minSize, 0.0F, minSize, maxSize, minSize, maxSize); + renderblocks.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); } if (state.pipeConnectionMatrix.isConnected(Orientations.YPos)) { state.currentTextureIndex = state.textureMatrix.getTextureIndex(Orientations.YPos); block.setBlockBounds(minSize, maxSize, minSize, maxSize, 1.0F, maxSize); + renderblocks.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); } if (state.pipeConnectionMatrix.isConnected(Orientations.ZNeg)) { state.currentTextureIndex = state.textureMatrix.getTextureIndex(Orientations.ZNeg); block.setBlockBounds(minSize, minSize, 0.0F, maxSize, maxSize, minSize); + renderblocks.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); } if (state.pipeConnectionMatrix.isConnected(Orientations.ZPos)) { state.currentTextureIndex = state.textureMatrix.getTextureIndex(Orientations.ZPos); block.setBlockBounds(minSize, minSize, maxSize, maxSize, maxSize, 1.0F); + renderblocks.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); } @@ -184,6 +191,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.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); rotated = deepClone(zeroState); @@ -191,6 +199,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.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); rotated = deepClone(zeroState); @@ -199,6 +208,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.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); rotated = deepClone(zeroState); @@ -207,11 +217,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.func_83018_a(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.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); } } @@ -236,6 +248,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.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); } } @@ -424,7 +437,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.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); } @@ -433,7 +446,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.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); } @@ -442,7 +455,7 @@ 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.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); } @@ -450,7 +463,7 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler { 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.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); } @@ -465,31 +478,37 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler { if (!state.pipeConnectionMatrix.isConnected(Orientations.XNeg) && !state.facadeMatrix.isConnected(Orientations.XNeg)) { block.setBlockBounds(Utils.pipeMinPos - 0.10F, min, min, Utils.pipeMinPos, max, max); + renderblocks.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); } if (!state.pipeConnectionMatrix.isConnected(Orientations.XPos) && !state.facadeMatrix.isConnected(Orientations.XPos)) { block.setBlockBounds(Utils.pipeMaxPos, min, min, Utils.pipeMaxPos + 0.10F, max, max); + renderblocks.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); } if (!state.pipeConnectionMatrix.isConnected(Orientations.YNeg) && !state.facadeMatrix.isConnected(Orientations.YNeg)) { block.setBlockBounds(min, Utils.pipeMinPos - 0.10F, min, max, Utils.pipeMinPos, max); + renderblocks.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); } if (!state.pipeConnectionMatrix.isConnected(Orientations.YPos) && !state.facadeMatrix.isConnected(Orientations.YPos)) { block.setBlockBounds(min, Utils.pipeMaxPos, min, max, Utils.pipeMaxPos + 0.10F, max); + renderblocks.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); } if (!state.pipeConnectionMatrix.isConnected(Orientations.ZNeg) && !state.facadeMatrix.isConnected(Orientations.ZNeg)) { block.setBlockBounds(min, min, Utils.pipeMinPos - 0.10F, max, max, Utils.pipeMinPos); + renderblocks.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); } if (!state.pipeConnectionMatrix.isConnected(Orientations.ZPos) && !state.facadeMatrix.isConnected(Orientations.ZPos)) { block.setBlockBounds(min, min, Utils.pipeMaxPos, max, max, Utils.pipeMaxPos + 0.10F); + renderblocks.func_83018_a(block); renderblocks.renderStandardBlock(block, x, y, z); } }