summaryrefslogtreecommitdiffstats
path: root/src/Mobs
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-02-02 18:11:53 +0100
committerTycho <work.tycho+git@gmail.com>2014-02-02 18:11:53 +0100
commit1e4e6c4619696e95b7b3f19650fe32c6a42d18b6 (patch)
tree9e8416c008a2e8b4f5f86d30de0224f9021b40a1 /src/Mobs
parentRemoved register keyword from Messinne Twister (diff)
parentFixed dark oak and acacia placement. (diff)
downloadcuberite-1e4e6c4619696e95b7b3f19650fe32c6a42d18b6.tar
cuberite-1e4e6c4619696e95b7b3f19650fe32c6a42d18b6.tar.gz
cuberite-1e4e6c4619696e95b7b3f19650fe32c6a42d18b6.tar.bz2
cuberite-1e4e6c4619696e95b7b3f19650fe32c6a42d18b6.tar.lz
cuberite-1e4e6c4619696e95b7b3f19650fe32c6a42d18b6.tar.xz
cuberite-1e4e6c4619696e95b7b3f19650fe32c6a42d18b6.tar.zst
cuberite-1e4e6c4619696e95b7b3f19650fe32c6a42d18b6.zip
Diffstat (limited to 'src/Mobs')
-rw-r--r--src/Mobs/Monster.cpp2
-rw-r--r--src/Mobs/Villager.cpp5
-rw-r--r--src/Mobs/Wolf.cpp1
3 files changed, 6 insertions, 2 deletions
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp
index 42c7d2899..283ef36e6 100644
--- a/src/Mobs/Monster.cpp
+++ b/src/Mobs/Monster.cpp
@@ -276,7 +276,7 @@ void cMonster::Tick(float a_Dt, cChunk & a_Chunk)
{
Distance.y = 0;
Distance.Normalize();
- Distance *= 3;
+ Distance *= 5;
SetSpeedX(Distance.x);
SetSpeedZ(Distance.z);
diff --git a/src/Mobs/Villager.cpp b/src/Mobs/Villager.cpp
index 44ec14295..08e5e4315 100644
--- a/src/Mobs/Villager.cpp
+++ b/src/Mobs/Villager.cpp
@@ -5,6 +5,7 @@
#include "../World.h"
#include "../BlockArea.h"
#include "../Blocks/BlockHandler.h"
+#include "../BlockInServerPluginInterface.h"
@@ -150,7 +151,9 @@ void cVillager::HandleFarmerTryHarvestCrops()
if (IsBlockFarmable(CropBlock) && m_World->GetBlockMeta(m_CropsPos.x, m_CropsPos.y, m_CropsPos.z) == 0x7)
{
cBlockHandler * Handler = cBlockHandler::GetBlockHandler(CropBlock);
- Handler->DropBlock(m_World, this, m_CropsPos.x, m_CropsPos.y, m_CropsPos.z);
+ cChunkInterface ChunkInterface(m_World->GetChunkMap());
+ cBlockInServerPluginInterface PluginInterface(*m_World);
+ Handler->DropBlock(ChunkInterface, *m_World, PluginInterface, this, m_CropsPos.x, m_CropsPos.y, m_CropsPos.z);
m_World->SetBlock(m_CropsPos.x, m_CropsPos.y, m_CropsPos.z, E_BLOCK_AIR, 0);
m_ActionCountDown = 20;
}
diff --git a/src/Mobs/Wolf.cpp b/src/Mobs/Wolf.cpp
index c0c7892e3..ff324d073 100644
--- a/src/Mobs/Wolf.cpp
+++ b/src/Mobs/Wolf.cpp
@@ -204,6 +204,7 @@ void cWolf::TickFollowPlayer()
{
if (!IsSitting())
{
+ Callback.OwnerPos.y = FindFirstNonAirBlockPosition(Callback.OwnerPos.x, Callback.OwnerPos.z);
TeleportToCoords(Callback.OwnerPos.x, Callback.OwnerPos.y, Callback.OwnerPos.z);
}
}