From 3d972a11a8347995b92cf3a48a52fcdbdc024e26 Mon Sep 17 00:00:00 2001 From: RainWarrior Date: Thu, 29 Oct 2015 13:14:14 +0300 Subject: [PATCH] Changed how the forge lighting system handles holey models for opaque blocks; it now mimics vanilla behaviour, which allows light to pass through them. --- .../client/model/pipeline/VertexLighterFlat.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/java/net/minecraftforge/client/model/pipeline/VertexLighterFlat.java b/src/main/java/net/minecraftforge/client/model/pipeline/VertexLighterFlat.java index a0bc15feb..ad57d4175 100644 --- a/src/main/java/net/minecraftforge/client/model/pipeline/VertexLighterFlat.java +++ b/src/main/java/net/minecraftforge/client/model/pipeline/VertexLighterFlat.java @@ -169,16 +169,15 @@ public class VertexLighterFlat extends QuadGatheringTransformer protected void updateLightmap(float[] normal, float[] lightmap, float x, float y, float z) { - float e1 = 1 - 1e-2f; float e2 = 0.95f; BlockPos pos = blockInfo.getBlockPos(); - if(y < -e1 && normal[1] < -e2) pos = pos.down(); - if(y > e1 && normal[1] > e2) pos = pos.up(); - if(z < -e1 && normal[2] < -e2) pos = pos.north(); - if(z > e1 && normal[2] > e2) pos = pos.south(); - if(x < -e1 && normal[0] < -e2) pos = pos.west(); - if(x > e1 && normal[0] > e2) pos = pos.east(); + if(normal[1] < -e2) pos = pos.down(); + if(normal[1] > e2) pos = pos.up(); + if(normal[2] < -e2) pos = pos.north(); + if(normal[2] > e2) pos = pos.south(); + if(normal[0] < -e2) pos = pos.west(); + if(normal[0] > e2) pos = pos.east(); int brightness = blockInfo.getBlock().getMixedBrightnessForBlock(blockInfo.getWorld(), pos);