summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/NBTChunkSerializer.cpp
diff options
context:
space:
mode:
authorJulian Laubstein <julianlaubstein@yahoo.de>2015-08-24 23:05:15 +0200
committerJulian Laubstein <julianlaubstein@yahoo.de>2015-11-16 14:13:44 +0100
commit48f84cc3e9204d8481aab32a3c51da5f29fd4306 (patch)
tree40562005a66d6114c6f25d5d1bbd6540226f9312 /src/WorldStorage/NBTChunkSerializer.cpp
parentFixed some markdown. (diff)
downloadcuberite-48f84cc3e9204d8481aab32a3c51da5f29fd4306.tar
cuberite-48f84cc3e9204d8481aab32a3c51da5f29fd4306.tar.gz
cuberite-48f84cc3e9204d8481aab32a3c51da5f29fd4306.tar.bz2
cuberite-48f84cc3e9204d8481aab32a3c51da5f29fd4306.tar.lz
cuberite-48f84cc3e9204d8481aab32a3c51da5f29fd4306.tar.xz
cuberite-48f84cc3e9204d8481aab32a3c51da5f29fd4306.tar.zst
cuberite-48f84cc3e9204d8481aab32a3c51da5f29fd4306.zip
Diffstat (limited to 'src/WorldStorage/NBTChunkSerializer.cpp')
-rw-r--r--src/WorldStorage/NBTChunkSerializer.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/WorldStorage/NBTChunkSerializer.cpp b/src/WorldStorage/NBTChunkSerializer.cpp
index 607a9c182..855fcea09 100644
--- a/src/WorldStorage/NBTChunkSerializer.cpp
+++ b/src/WorldStorage/NBTChunkSerializer.cpp
@@ -572,7 +572,7 @@ void cNBTChunkSerializer::AddMonsterEntity(cMonster * a_Monster)
m_Writer.AddInt ("Style", Horse->GetHorseStyle());
m_Writer.AddInt ("ArmorType", Horse->GetHorseArmour());
m_Writer.AddByte("Saddle", Horse->IsSaddled()? 1 : 0);
- m_Writer.AddByte("Age", static_cast<Byte>(Horse->GetAge()));
+ m_Writer.AddInt ("Age", Horse->GetAge());
break;
}
case mtMagmaCube:
@@ -585,7 +585,7 @@ void cNBTChunkSerializer::AddMonsterEntity(cMonster * a_Monster)
const cSheep *Sheep = reinterpret_cast<const cSheep *>(a_Monster);
m_Writer.AddByte("Sheared", Sheep->IsSheared()? 1 : 0);
m_Writer.AddByte("Color", static_cast<Byte>(Sheep->GetFurColor()));
- m_Writer.AddByte("Age", static_cast<Byte>(Sheep->GetAge()));
+ m_Writer.AddInt ("Age", Sheep->GetAge());
break;
}
case mtSlime:
@@ -602,7 +602,7 @@ void cNBTChunkSerializer::AddMonsterEntity(cMonster * a_Monster)
{
const cVillager *Villager = reinterpret_cast<const cVillager *>(a_Monster);
m_Writer.AddInt("Profession", Villager->GetVilType());
- m_Writer.AddByte("Age", static_cast<Byte>(Villager->GetAge()));
+ m_Writer.AddInt("Age", Villager->GetAge());
break;
}
case mtWither:
@@ -624,7 +624,7 @@ void cNBTChunkSerializer::AddMonsterEntity(cMonster * a_Monster)
m_Writer.AddByte("Sitting", Wolf->IsSitting() ? 1 : 0);
m_Writer.AddByte("Angry", Wolf->IsAngry() ? 1 : 0);
m_Writer.AddByte("CollarColor", static_cast<Byte>(Wolf->GetCollarColor()));
- m_Writer.AddByte("Age", static_cast<Byte>(Wolf->GetAge()));
+ m_Writer.AddInt ("Age", Wolf->GetAge());
break;
}
case mtZombie:
@@ -632,30 +632,30 @@ void cNBTChunkSerializer::AddMonsterEntity(cMonster * a_Monster)
const cZombie *Zombie = reinterpret_cast<const cZombie *>(a_Monster);
m_Writer.AddByte("IsVillager", Zombie->IsVillagerZombie() ? 1 : 0);
m_Writer.AddByte("IsConverting", Zombie->IsConverting() ? 1 : 0);
- m_Writer.AddByte("Age", static_cast<Byte>(Zombie->GetAge()));
+ m_Writer.AddInt ("Age", Zombie->GetAge());
break;
}
case mtZombiePigman:
{
- m_Writer.AddByte("Age", static_cast<Byte>(reinterpret_cast<const cZombiePigman *>(a_Monster)->GetAge()));
+ m_Writer.AddInt("Age", reinterpret_cast<const cZombiePigman *>(a_Monster)->GetAge());
break;
}
case mtOcelot:
{
- m_Writer.AddByte("Age", static_cast<Byte>(reinterpret_cast<const cOcelot *>(a_Monster)->GetAge()));
+ m_Writer.AddInt("Age", reinterpret_cast<const cOcelot *>(a_Monster)->GetAge());
break;
}
case mtPig:
{
- m_Writer.AddByte("Age", static_cast<Byte>(reinterpret_cast<const cPig *>(a_Monster)->GetAge()));
+ m_Writer.AddInt("Age", reinterpret_cast<const cPig *>(a_Monster)->GetAge());
break;
}
case mtRabbit:
{
const cRabbit *Rabbit = reinterpret_cast<const cRabbit *>(a_Monster);
- m_Writer.AddInt("RabbitType", Rabbit->GetRabbitTypeAsNumber());
+ m_Writer.AddInt("RabbitType", Rabbit->GetRabbitTypeAsNumber());
m_Writer.AddInt("MoreCarrotTicks", Rabbit->GetMoreCarrotTicks());
- m_Writer.AddByte("Age", static_cast<Byte>(Rabbit->GetAge()));
+ m_Writer.AddInt("Age", Rabbit->GetAge());
break;
}
case mtInvalidType: