diff options
author | Samuel Barney <samjbarney@gmail.com> | 2013-10-24 01:51:14 +0200 |
---|---|---|
committer | Samuel Barney <samjbarney@gmail.com> | 2013-10-24 01:51:14 +0200 |
commit | 00480a1d9a4c0c48b32cfe7b2f3f20270dcb19ce (patch) | |
tree | 1d4bef77e5b208f7d431f7276ffe409853f3d092 /source | |
parent | Merge branch 'master' of https://github.com/SamJBarney/MCServer into MobSpawning (diff) | |
download | cuberite-00480a1d9a4c0c48b32cfe7b2f3f20270dcb19ce.tar cuberite-00480a1d9a4c0c48b32cfe7b2f3f20270dcb19ce.tar.gz cuberite-00480a1d9a4c0c48b32cfe7b2f3f20270dcb19ce.tar.bz2 cuberite-00480a1d9a4c0c48b32cfe7b2f3f20270dcb19ce.tar.lz cuberite-00480a1d9a4c0c48b32cfe7b2f3f20270dcb19ce.tar.xz cuberite-00480a1d9a4c0c48b32cfe7b2f3f20270dcb19ce.tar.zst cuberite-00480a1d9a4c0c48b32cfe7b2f3f20270dcb19ce.zip |
Diffstat (limited to '')
-rw-r--r-- | source/Chunk.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
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) |