diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-06-16 17:06:14 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-06-16 17:06:14 +0200 |
commit | 18a99085f468dfcb4ec2d9f93361b23874364d82 (patch) | |
tree | 6a610615d559eea98a9af8a2b34bac35a44b4517 /source/cWorld.cpp | |
parent | Proper kick reasons! (diff) | |
download | cuberite-18a99085f468dfcb4ec2d9f93361b23874364d82.tar cuberite-18a99085f468dfcb4ec2d9f93361b23874364d82.tar.gz cuberite-18a99085f468dfcb4ec2d9f93361b23874364d82.tar.bz2 cuberite-18a99085f468dfcb4ec2d9f93361b23874364d82.tar.lz cuberite-18a99085f468dfcb4ec2d9f93361b23874364d82.tar.xz cuberite-18a99085f468dfcb4ec2d9f93361b23874364d82.tar.zst cuberite-18a99085f468dfcb4ec2d9f93361b23874364d82.zip |
Diffstat (limited to 'source/cWorld.cpp')
-rw-r--r-- | source/cWorld.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/source/cWorld.cpp b/source/cWorld.cpp index 0616fcf44..e5bff4c11 100644 --- a/source/cWorld.cpp +++ b/source/cWorld.cpp @@ -747,9 +747,9 @@ void cWorld::TickSpawnMobs(float a_Dt) if (m_WorldTime >= 12000 + 1000) { - if (GetBiomeAt(SpawnPos.x, SpawnPos.z) == biHell) // Spawn nether mobs + if (GetBiomeAt((int)SpawnPos.x, (int)SpawnPos.z) == biHell) // Spawn nether mobs { - if (nightRand == 1 && GetBiomeAt(SpawnPos.x, SpawnPos.z) == biHell) + if (nightRand == 1) Monster = new cZombie(); else if (nightRand == 5) Monster = new cGhast(); @@ -1753,9 +1753,18 @@ void cWorld::ChunkLoadFailed(int a_ChunkX, int a_ChunkY, int a_ChunkZ) -void cWorld::UpdateSign(int a_X, int a_Y, int a_Z, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4) +void cWorld::UpdateSign(int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4) { - m_ChunkMap->UpdateSign(a_X, a_Y, a_Z, a_Line1, a_Line2, a_Line3, a_Line4); + AString Line1(a_Line1); + AString Line2(a_Line2); + AString Line3(a_Line3); + AString Line4(a_Line4); + if (cRoot::Get()->GetPluginManager()->CallHookUpdatingSign(this, a_BlockX, a_BlockY, a_BlockZ, Line1, Line2, Line3, Line4)) + { + return; + } + m_ChunkMap->UpdateSign(a_BlockX, a_BlockY, a_BlockZ, Line1, Line2, Line3, Line4); + cRoot::Get()->GetPluginManager()->CallHookUpdatedSign(this, a_BlockX, a_BlockY, a_BlockZ, Line1, Line2, Line3, Line4); } |