summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-05-28 19:32:20 +0200
committerHowaner <franzi.moos@googlemail.com>2014-05-28 19:32:20 +0200
commit142fa83124fc3b766916ac79fb037fea91a19a1e (patch)
treea52bebee7aaceb5c6e25a25910cbf35536522d75
parentFix hay place sound. (diff)
downloadcuberite-142fa83124fc3b766916ac79fb037fea91a19a1e.tar
cuberite-142fa83124fc3b766916ac79fb037fea91a19a1e.tar.gz
cuberite-142fa83124fc3b766916ac79fb037fea91a19a1e.tar.bz2
cuberite-142fa83124fc3b766916ac79fb037fea91a19a1e.tar.lz
cuberite-142fa83124fc3b766916ac79fb037fea91a19a1e.tar.xz
cuberite-142fa83124fc3b766916ac79fb037fea91a19a1e.tar.zst
cuberite-142fa83124fc3b766916ac79fb037fea91a19a1e.zip
-rw-r--r--src/BlockEntities/MobHeadEntity.cpp7
-rw-r--r--src/Blocks/BlockMobHead.h8
-rw-r--r--src/WorldStorage/NBTChunkSerializer.cpp1
3 files changed, 4 insertions, 12 deletions
diff --git a/src/BlockEntities/MobHeadEntity.cpp b/src/BlockEntities/MobHeadEntity.cpp
index 60d6a123f..ce895eb6f 100644
--- a/src/BlockEntities/MobHeadEntity.cpp
+++ b/src/BlockEntities/MobHeadEntity.cpp
@@ -70,11 +70,8 @@ void cMobHeadEntity::SetOwner(const AString & a_Owner)
void cMobHeadEntity::SendTo(cClientHandle & a_Client)
{
- BLOCKTYPE Block;
- NIBBLETYPE Meta;
- a_Client.GetPlayer()->GetWorld()->GetBlockTypeMeta(m_PosX, m_PosY, m_PosZ, Block, Meta);
-
- a_Client.SendBlockChange(m_PosX, m_PosY, m_PosZ, Block, Meta);
+ cWorld * World = a_Client.GetPlayer()->GetWorld();
+ a_Client.SendBlockChange(m_PosX, m_PosY, m_PosZ, m_BlockType, World->GetBlockMeta(m_PosX, m_PosY, m_PosZ));
a_Client.SendUpdateBlockEntity(*this);
}
diff --git a/src/Blocks/BlockMobHead.h b/src/Blocks/BlockMobHead.h
index 248f20d49..fe4099835 100644
--- a/src/Blocks/BlockMobHead.h
+++ b/src/Blocks/BlockMobHead.h
@@ -19,7 +19,7 @@ public:
virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
{
- // The drops spawns in OnDestroyed
+ // The drop spawn is in OnDestroyed method
}
virtual void OnDestroyedByPlayer(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ) override
@@ -51,11 +51,7 @@ public:
a_MobHeadEntity->GetWorld()->SpawnItemPickups(Pickups, MicroX, MicroY, MicroZ);
return false;
}
-
- public:
- cCallback() {}
- };
- cCallback Callback;
+ } Callback;
cWorld * World = (cWorld *) &a_WorldInterface;
World->DoWithMobHeadAt(a_BlockX, a_BlockY, a_BlockZ, Callback);
diff --git a/src/WorldStorage/NBTChunkSerializer.cpp b/src/WorldStorage/NBTChunkSerializer.cpp
index cc1ffe8f9..82e8ee8bd 100644
--- a/src/WorldStorage/NBTChunkSerializer.cpp
+++ b/src/WorldStorage/NBTChunkSerializer.cpp
@@ -609,7 +609,6 @@ void cNBTChunkSerializer::AddProjectileEntity(cProjectileEntity * a_Projectile)
{
m_Writer.AddInt("ExplosionPower", 1);
break;
- // fall-through:
}
case cProjectileEntity::pkFireCharge:
case cProjectileEntity::pkWitherSkull: