From 3e484deafc7ff1c251e086783de080f6193a4b6e Mon Sep 17 00:00:00 2001 From: LexManos Date: Tue, 1 Jan 2013 21:54:25 -0800 Subject: [PATCH] Fixed incorrect lighting in some cases. Closes issue #349 --- patches/minecraft/net/minecraft/block/Block.java.patch | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/patches/minecraft/net/minecraft/block/Block.java.patch b/patches/minecraft/net/minecraft/block/Block.java.patch index fb1c22999..a43bef911 100644 --- a/patches/minecraft/net/minecraft/block/Block.java.patch +++ b/patches/minecraft/net/minecraft/block/Block.java.patch @@ -141,14 +141,14 @@ { ItemStack var8 = this.createStackedBlock(par6); -@@ -1364,4 +1380,835 @@ +@@ -1364,4 +1380,840 @@ canBlockGrass[0] = true; StatList.initBreakableStats(); } + + /* =================================================== FORGE START =====================================*/ + /** -+ * Get a light value for this block, normal ranges are between 0 and 15 ++ * Get a light value for the block at the specified coordinates, normal ranges are between 0 and 15 + * + * @param world The current world + * @param x X Position @@ -158,6 +158,11 @@ + */ + public int getLightValue(IBlockAccess world, int x, int y, int z) + { ++ Block block = blocksList[world.getBlockId(x, y, z)]; ++ if (block != null && block != this) ++ { ++ return block.getLightValue(world, x, y, z); ++ } + return lightValue[blockID]; + } +