summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/NBTChunkSerializer.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-06-26 15:56:44 +0200
committerHowaner <franzi.moos@googlemail.com>2014-06-26 15:56:44 +0200
commit9b7f1e3db87af8cb64d921b4b04d36e67a952c28 (patch)
treeb187f49105b7779d88c2336abc799facd66e25c8 /src/WorldStorage/NBTChunkSerializer.cpp
parentOptimize combining. (diff)
parentMerge pull request #1126 from mc-server/BlockInfoInit (diff)
downloadcuberite-9b7f1e3db87af8cb64d921b4b04d36e67a952c28.tar
cuberite-9b7f1e3db87af8cb64d921b4b04d36e67a952c28.tar.gz
cuberite-9b7f1e3db87af8cb64d921b4b04d36e67a952c28.tar.bz2
cuberite-9b7f1e3db87af8cb64d921b4b04d36e67a952c28.tar.lz
cuberite-9b7f1e3db87af8cb64d921b4b04d36e67a952c28.tar.xz
cuberite-9b7f1e3db87af8cb64d921b4b04d36e67a952c28.tar.zst
cuberite-9b7f1e3db87af8cb64d921b4b04d36e67a952c28.zip
Diffstat (limited to 'src/WorldStorage/NBTChunkSerializer.cpp')
-rw-r--r--src/WorldStorage/NBTChunkSerializer.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/WorldStorage/NBTChunkSerializer.cpp b/src/WorldStorage/NBTChunkSerializer.cpp
index 8294d4a00..f35b38859 100644
--- a/src/WorldStorage/NBTChunkSerializer.cpp
+++ b/src/WorldStorage/NBTChunkSerializer.cpp
@@ -345,6 +345,7 @@ void cNBTChunkSerializer::AddBasicEntity(cEntity * a_Entity, const AString & a_C
m_Writer.AddDouble("", a_Entity->GetYaw());
m_Writer.AddDouble("", a_Entity->GetPitch());
m_Writer.EndList();
+ m_Writer.AddShort("Health", a_Entity->GetHealth());
}
@@ -575,7 +576,6 @@ void cNBTChunkSerializer::AddPickupEntity(cPickup * a_Pickup)
m_Writer.BeginCompound("");
AddBasicEntity(a_Pickup, "Item");
AddItem(a_Pickup->GetItem(), -1, "Item");
- m_Writer.AddShort("Health", (Int16)(unsigned char)a_Pickup->GetHealth());
m_Writer.AddShort("Age", (Int16)a_Pickup->GetAge());
m_Writer.EndCompound();
}
@@ -678,7 +678,6 @@ void cNBTChunkSerializer::AddExpOrbEntity(cExpOrb * a_ExpOrb)
{
m_Writer.BeginCompound("");
AddBasicEntity(a_ExpOrb, "XPOrb");
- m_Writer.AddShort("Health", (Int16)(unsigned char)a_ExpOrb->GetHealth());
m_Writer.AddShort("Age", (Int16)a_ExpOrb->GetAge());
m_Writer.AddShort("Value", (Int16)a_ExpOrb->GetReward());
m_Writer.EndCompound();