summaryrefslogtreecommitdiffstats
path: root/source/Chunk.cpp
diff options
context:
space:
mode:
authorSamuel Barney <samjbarney@gmail.com>2013-10-29 17:44:51 +0100
committerSamuel Barney <samjbarney@gmail.com>2013-10-29 17:44:51 +0100
commite1a06153b2e93473af58e1d801998ff7f388dc6d (patch)
tree080e0f9744333fe7936bcda1da47757dfa9fb10f /source/Chunk.cpp
parentMerge branch 'master' of https://github.com/SamJBarney/MCServer into MobSpawning (diff)
downloadcuberite-e1a06153b2e93473af58e1d801998ff7f388dc6d.tar
cuberite-e1a06153b2e93473af58e1d801998ff7f388dc6d.tar.gz
cuberite-e1a06153b2e93473af58e1d801998ff7f388dc6d.tar.bz2
cuberite-e1a06153b2e93473af58e1d801998ff7f388dc6d.tar.lz
cuberite-e1a06153b2e93473af58e1d801998ff7f388dc6d.tar.xz
cuberite-e1a06153b2e93473af58e1d801998ff7f388dc6d.tar.zst
cuberite-e1a06153b2e93473af58e1d801998ff7f388dc6d.zip
Diffstat (limited to 'source/Chunk.cpp')
-rw-r--r--source/Chunk.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/source/Chunk.cpp b/source/Chunk.cpp
index c419cf7f2..b38f5ea19 100644
--- a/source/Chunk.cpp
+++ b/source/Chunk.cpp
@@ -533,8 +533,7 @@ void cChunk::SpawnMobs(cMobSpawner& a_MobSpawner)
if (IsLightValid())
{
- int TimeOfDay = m_World->GetTimeOfDay();
- cEntity* newMob = a_MobSpawner.TryToSpawnHere(this, Try_X, Try_Y, Try_Z, Biome, TimeOfDay, MaxNbOfSuccess);
+ cEntity* newMob = a_MobSpawner.TryToSpawnHere(this, Try_X, Try_Y, Try_Z, Biome, MaxNbOfSuccess);
if (newMob)
{
int WorldX, WorldY, WorldZ;
@@ -2787,6 +2786,16 @@ Vector3i cChunk::PositionToWorldPosition(int a_RelX, int a_RelY, int a_RelZ)
+NIBBLETYPE cChunk::GetTimeAlteredLight(NIBBLETYPE a_Skylight) const
+{
+ a_Skylight -= m_World->GetSkyDarkness();
+ return (a_Skylight < 16)? a_Skylight : 0;
+}
+
+
+
+
+
#if !C_CHUNK_USE_INLINE
# include "cChunk.inl.h"
#endif