From cfa498ca2abc3dbceb26d07e30f3d14058fea197 Mon Sep 17 00:00:00 2001 From: ah-OOG-ah <75745146+ah-OOG-ah@users.noreply.github.com> Date: Wed, 1 Oct 2025 14:12:14 -0400 Subject: [PATCH] flat shading --- .../gtnewhorizon/gtnhlib/client/model/ModelISBRH.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/gtnewhorizon/gtnhlib/client/model/ModelISBRH.java b/src/main/java/com/gtnewhorizon/gtnhlib/client/model/ModelISBRH.java index 6da1d32b..4d8bb54c 100644 --- a/src/main/java/com/gtnewhorizon/gtnhlib/client/model/ModelISBRH.java +++ b/src/main/java/com/gtnewhorizon/gtnhlib/client/model/ModelISBRH.java @@ -51,11 +51,6 @@ public class ModelISBRH implements ISimpleBlockRenderingHandler { int color = model.getColor(world, x, y, z, block, meta, random); - tesselator.setBrightness( - world instanceof World worldIn - ? worldIn.getBlockLightValue_do(x, y, z, block.getUseNeighborBrightness()) - : block.getMixedBrightnessForBlock(world, x, y, z)); - var rendered = false; for (ForgeDirection dir : DirectionUtil.ALL_DIRECTIONS) { // TODO: face culling @@ -76,7 +71,11 @@ public class ModelISBRH implements ISimpleBlockRenderingHandler { final int b = color >> 16 & 255; // TODO: look into 21.5+ model-based AO and the NeoForge light pipeline - + final int lx = x + dir.offsetX; + final int ly = y + dir.offsetY; + final int lz = z + dir.offsetZ; + final int lm = block.getMixedBrightnessForBlock(world, lx, ly, lz); + tesselator.setBrightness(lm); tesselator.setColorOpaque(r, g, b); renderQuad(quad, x, y, z, tesselator, null); }