From c2ff6a3a9213636d0b6ec6ff2ba83f1679ddf380 Mon Sep 17 00:00:00 2001 From: Justin Aquadro Date: Sat, 4 Jun 2011 02:03:40 +0000 Subject: [PATCH] Fixed serious lighting (heightmap) bug that messes with MC's normal lighting and generation behavior. --- Substrate/SubstrateCS/Source/BlockLight.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Substrate/SubstrateCS/Source/BlockLight.cs b/Substrate/SubstrateCS/Source/BlockLight.cs index 3e6a7e2..f2a2dcb 100644 --- a/Substrate/SubstrateCS/Source/BlockLight.cs +++ b/Substrate/SubstrateCS/Source/BlockLight.cs @@ -153,7 +153,7 @@ namespace Substrate for (int y = ydim - 1; y >= 0; y--) { BlockInfo info = _blockset.GetInfo(x, y, z); if (info.Opacity > BlockInfo.MIN_OPACITY || !info.TransmitsLight) { - _blockset.SetHeight(x, z, y); + _blockset.SetHeight(x, z, Math.Min(y + 1, ydim - 1)); break; } }