summaryrefslogtreecommitdiffstats
path: root/source/cWorld.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/cWorld.cpp')
-rw-r--r--source/cWorld.cpp17
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);
}