summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/NBTChunkSerializer.cpp
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2018-02-03 12:24:19 +0100
committerAlexander Harkness <me@bearbin.net>2020-04-10 01:50:45 +0200
commit8438def87e40e43fd66d38dbf8cc287cea7de29b (patch)
tree647b7674cca3df58507e5311e5578d14084bc691 /src/WorldStorage/NBTChunkSerializer.cpp
parentRe-enable darwin download from easyinstall.sh script (diff)
downloadcuberite-8438def87e40e43fd66d38dbf8cc287cea7de29b.tar
cuberite-8438def87e40e43fd66d38dbf8cc287cea7de29b.tar.gz
cuberite-8438def87e40e43fd66d38dbf8cc287cea7de29b.tar.bz2
cuberite-8438def87e40e43fd66d38dbf8cc287cea7de29b.tar.lz
cuberite-8438def87e40e43fd66d38dbf8cc287cea7de29b.tar.xz
cuberite-8438def87e40e43fd66d38dbf8cc287cea7de29b.tar.zst
cuberite-8438def87e40e43fd66d38dbf8cc287cea7de29b.zip
Diffstat (limited to 'src/WorldStorage/NBTChunkSerializer.cpp')
-rw-r--r--src/WorldStorage/NBTChunkSerializer.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/WorldStorage/NBTChunkSerializer.cpp b/src/WorldStorage/NBTChunkSerializer.cpp
index 3e8994786..138921264 100644
--- a/src/WorldStorage/NBTChunkSerializer.cpp
+++ b/src/WorldStorage/NBTChunkSerializer.cpp
@@ -738,10 +738,17 @@ public:
case mtVillager: EntityClass = "Villager"; break;
case mtWitch: EntityClass = "Witch"; break;
case mtWither: EntityClass = "WitherBoss"; break;
+<<<<<<< HEAD
case mtWitherSkeleton: EntityClass = "WitherSkeleton"; break;
case mtWolf: EntityClass = "Wolf"; break;
case mtZombie: EntityClass = "Zombie"; break;
case mtZombiePigman: EntityClass = "PigZombie"; break;
+=======
+ case mtWolf: EntityClass = "Wolf"; break;
+ case mtZombie: EntityClass = "Zombie"; break;
+ case mtZombiePigman: EntityClass = "PigZombie"; break;
+ case mtZombieVillager: EntityClass = "ZombieVillager"; break;
+>>>>>>> Add Zombie Villagers
default:
{
ASSERT(!"Unhandled monster type");
@@ -901,10 +908,7 @@ public:
}
case mtZombie:
{
- const cZombie *Zombie = static_cast<const cZombie *>(a_Monster);
- mWriter.AddByte("IsVillager", Zombie->IsVillagerZombie() ? 1 : 0);
- mWriter.AddByte("IsConverting", Zombie->IsConverting() ? 1 : 0);
- mWriter.AddInt ("Age", Zombie->GetAge());
+ mWriter.AddInt("Age", static_cast<const cZombie *>(a_Monster)->GetAge());
break;
}
case mtZombiePigman:
@@ -912,6 +916,13 @@ public:
mWriter.AddInt("Age", static_cast<const cZombiePigman *>(a_Monster)->GetAge());
break;
}
+ case mtZombieVillager:
+ {
+ const cZombieVillager *ZombieVillager = reinterpret_cast<const cZombieVillager *>(a_Monster);
+ mWriter.AddInt("Profession", ZombieVillager->GetProfession());
+ mWriter.AddInt("ConversionTime", ZombieVillager->ConversionTime());
+ mWriter.AddInt("Age", ZombieVillager->GetAge());
+ }
case mtBlaze:
case mtCaveSpider:
case mtChicken: