1
0

Swapped which block is checked for light first.

This commit is contained in:
Samuel Barney 2013-10-21 10:03:05 -06:00
parent d73a0cd8b0
commit 56fa632d5e

View File

@ -539,15 +539,15 @@ void cChunk::SpawnMobs(cMobSpawner& a_MobSpawner)
// MG TODO: fix the "light" thing, I'm pretty sure that UnboundedRelGetBlock s not returning the right thing // MG TODO: fix the "light" thing, I'm pretty sure that UnboundedRelGetBlock s not returning the right thing
// MG TODO : check that "Level" really means Y // MG TODO : check that "Level" really means Y
NIBBLETYPE SkyLight = GetSkyLight(Try_X, Try_Y+1, Try_Z); NIBBLETYPE SkyLight = GetSkyLight(Try_X, Try_Y, Try_Z);
if (!SkyLight) if (!SkyLight)
SkyLight = GetSkyLight(Try_X, Try_Y, Try_Z); SkyLight = GetSkyLight(Try_X, Try_Y + 1, Try_Z);
if (!SkyLight) if (!SkyLight)
SkyLight = GetSkyLight(Try_X, Try_Y - 1, Try_Z); SkyLight = GetSkyLight(Try_X, Try_Y - 1, Try_Z);
NIBBLETYPE BlockLight = GetBlockLight(Try_X, Try_Y+1, Try_Z); NIBBLETYPE BlockLight = GetBlockLight(Try_X, Try_Y, Try_Z);
if (!BlockLight) if (!BlockLight)
BlockLight = GetBlockLight(Try_X, Try_Y, Try_Z); BlockLight = GetBlockLight(Try_X, Try_Y + 1, Try_Z);
if (!BlockLight) if (!BlockLight)
BlockLight = GetBlockLight(Try_X, Try_Y - 1, Try_Z); BlockLight = GetBlockLight(Try_X, Try_Y - 1, Try_Z);