diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/bartworks/client/renderer/RendererGlassBlock.java | 19 | ||||
-rw-r--r-- | src/main/java/bartworks/client/renderer/RendererSwitchingColorFluid.java | 2 |
2 files changed, 11 insertions, 10 deletions
diff --git a/src/main/java/bartworks/client/renderer/RendererGlassBlock.java b/src/main/java/bartworks/client/renderer/RendererGlassBlock.java index 1af553ff59..6a288751e7 100644 --- a/src/main/java/bartworks/client/renderer/RendererGlassBlock.java +++ b/src/main/java/bartworks/client/renderer/RendererGlassBlock.java @@ -79,22 +79,21 @@ public class RendererGlassBlock implements ISimpleBlockRenderingHandler { // spotless:off @Override - public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, - RenderBlocks renderer) { + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { boolean flag = false; if (block instanceof BWBlocksGlass) { + final short[] color = ((BWBlocksGlass) block).getColor(world.getBlockMetadata(x, y, z)); flag |= renderer.renderStandardBlock(ItemRegistry.bw_fake_glasses, x, y, z); - flag |= renderer.renderStandardBlockWithColorMultiplier(block, x, y, z, - ((BWBlocksGlass) block).getColor(world.getBlockMetadata(x, y, z))[0] / 255f, - ((BWBlocksGlass) block).getColor(world.getBlockMetadata(x, y, z))[1] / 255f, - ((BWBlocksGlass) block).getColor(world.getBlockMetadata(x, y, z))[2] / 255f); + flag |= renderer.renderStandardBlockWithColorMultiplier(block, + x, y, z, + color[0] / 255f, color[1] / 255f, color[2] / 255f); } if (block instanceof BWBlocksGlass2) { + final short[] color = ((BWBlocksGlass2) block).getColor(world.getBlockMetadata(x, y, z)); flag |= renderer.renderStandardBlock(ItemRegistry.bw_fake_glasses2, x, y, z); - flag |= renderer.renderStandardBlockWithColorMultiplier(block, x, y, z, - ((BWBlocksGlass2) block).getColor(world.getBlockMetadata(x, y, z))[0] / 255f, - ((BWBlocksGlass2) block).getColor(world.getBlockMetadata(x, y, z))[1] / 255f, - ((BWBlocksGlass2) block).getColor(world.getBlockMetadata(x, y, z))[2] / 255f); + flag |= renderer.renderStandardBlockWithColorMultiplier(block, + x, y, z, + color[0] / 255f, color[1] / 255f, color[2] / 255f); } return flag; } diff --git a/src/main/java/bartworks/client/renderer/RendererSwitchingColorFluid.java b/src/main/java/bartworks/client/renderer/RendererSwitchingColorFluid.java index ba565cc2aa..ae48a109d0 100644 --- a/src/main/java/bartworks/client/renderer/RendererSwitchingColorFluid.java +++ b/src/main/java/bartworks/client/renderer/RendererSwitchingColorFluid.java @@ -31,6 +31,7 @@ import bartworks.common.loaders.FluidLoader; import bartworks.common.tileentities.multis.MTEBioVat; import bartworks.util.Coords; import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; +import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -49,6 +50,7 @@ public class RendererSwitchingColorFluid implements ISimpleBlockRenderingHandler public static void register() { instance = new RendererSwitchingColorFluid(); + RenderingRegistry.registerBlockHandler(instance); } private float getFluidHeightAverage(float[] flow) { |