From 00480a1d9a4c0c48b32cfe7b2f3f20270dcb19ce Mon Sep 17 00:00:00 2001 From: Samuel Barney Date: Wed, 23 Oct 2013 17:51:14 -0600 Subject: Using provided UnboundedRelGetBlockBlockLight and UnboundedRelGetBlockSkyLight. --- source/Chunk.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'source') diff --git a/source/Chunk.cpp b/source/Chunk.cpp index e4e5a7ca1..35da4c266 100644 --- a/source/Chunk.cpp +++ b/source/Chunk.cpp @@ -536,15 +536,13 @@ void cChunk::SpawnMobs(cMobSpawner& a_MobSpawner) // check player and playerspawn presence < 24 blocks // check mobs presence on the block - // 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 - NIBBLETYPE SkyLight = UnboundedRelGetSkyLight(Try_X, Try_Y, Try_Z); + NIBBLETYPE SkyLight = 0; - NIBBLETYPE BlockLight = UnboundedRelGetBlockLight(Try_X, Try_Y, Try_Z); + NIBBLETYPE BlockLight = 0; - if (IsLightValid() && (SkyLight != 127) && (BlockLight != 127)) + if (IsLightValid() && (UnboundedRelGetBlockBlockLight(Try_X, Try_Y, Try_Z, BlockLight)) && (UnboundedRelGetBlockSkyLight(Try_X, Try_Y, Try_Z, SkyLight))) { cEntity* newMob = a_MobSpawner.TryToSpawnHere(BlockType, BlockMeta, BlockType_below, BlockMeta_below, BlockType_above, BlockMeta_above, SkyLight, BlockLight, Biome, Try_Y, MaxNbOfSuccess); if (newMob) -- cgit v1.2.3