From bfd41f8ff591b7101d71fc53b7c1ec42f7685416 Mon Sep 17 00:00:00 2001 From: 初夏同学 <30284813+wohaopa@users.noreply.github.com> Date: Fri, 7 Jun 2024 04:40:16 +0800 Subject: Fix a small logic bug in Bartworks' glass (#2640) --- .../bartworks/client/renderer/RendererGlasBlock.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererGlasBlock.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererGlasBlock.java index ce87e4a68a..3beeb8d2ea 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererGlasBlock.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererGlasBlock.java @@ -81,21 +81,22 @@ public class RendererGlasBlock implements ISimpleBlockRenderingHandler { @Override public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { + boolean flag = false; if (block instanceof BW_GlasBlocks) { - renderer.renderStandardBlock(ItemRegistry.bw_fake_glasses, x, y, z); - renderer.renderStandardBlockWithColorMultiplier(block, x, y, z, + flag |= renderer.renderStandardBlock(ItemRegistry.bw_fake_glasses, x, y, z); + flag |= renderer.renderStandardBlockWithColorMultiplier(block, x, y, z, ((BW_GlasBlocks) block).getColor(world.getBlockMetadata(x, y, z))[0] / 255f, ((BW_GlasBlocks) block).getColor(world.getBlockMetadata(x, y, z))[1] / 255f, ((BW_GlasBlocks) block).getColor(world.getBlockMetadata(x, y, z))[2] / 255f); } if (block instanceof BW_GlasBlocks2) { - renderer.renderStandardBlock(ItemRegistry.bw_fake_glasses2, x, y, z); - renderer.renderStandardBlockWithColorMultiplier(block, x, y, z, + flag |= renderer.renderStandardBlock(ItemRegistry.bw_fake_glasses2, x, y, z); + flag |= renderer.renderStandardBlockWithColorMultiplier(block, x, y, z, ((BW_GlasBlocks2) block).getColor(world.getBlockMetadata(x, y, z))[0] / 255f, ((BW_GlasBlocks2) block).getColor(world.getBlockMetadata(x, y, z))[1] / 255f, ((BW_GlasBlocks2) block).getColor(world.getBlockMetadata(x, y, z))[2] / 255f); } - return true; + return flag; } // spotless:on -- cgit