summaryrefslogtreecommitdiffstats
path: root/source/WorldStorage
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2013-08-16 12:23:24 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2013-08-16 12:23:24 +0200
commit7f87d6c3d6a116742f25f1846d747a33afdc63f0 (patch)
treefdc0a24c2b6145c16a78612589cdb48533ac7e6c /source/WorldStorage
parentGeneration and simulation defaults (diff)
downloadcuberite-7f87d6c3d6a116742f25f1846d747a33afdc63f0.tar
cuberite-7f87d6c3d6a116742f25f1846d747a33afdc63f0.tar.gz
cuberite-7f87d6c3d6a116742f25f1846d747a33afdc63f0.tar.bz2
cuberite-7f87d6c3d6a116742f25f1846d747a33afdc63f0.tar.lz
cuberite-7f87d6c3d6a116742f25f1846d747a33afdc63f0.tar.xz
cuberite-7f87d6c3d6a116742f25f1846d747a33afdc63f0.tar.zst
cuberite-7f87d6c3d6a116742f25f1846d747a33afdc63f0.zip
Diffstat (limited to 'source/WorldStorage')
-rw-r--r--source/WorldStorage/NBTChunkSerializer.cpp2
-rw-r--r--source/WorldStorage/NBTChunkSerializer.h2
-rw-r--r--source/WorldStorage/WSSAnvil.cpp2
-rw-r--r--source/WorldStorage/WSSAnvil.h2
4 files changed, 8 insertions, 0 deletions
diff --git a/source/WorldStorage/NBTChunkSerializer.cpp b/source/WorldStorage/NBTChunkSerializer.cpp
index da1b9e1c4..fe8630318 100644
--- a/source/WorldStorage/NBTChunkSerializer.cpp
+++ b/source/WorldStorage/NBTChunkSerializer.cpp
@@ -274,6 +274,8 @@ void cNBTChunkSerializer::AddMinecartEntity(cMinecart * a_Minecart)
case cMinecart::mpNone: EntityClass = "MinecartRideable"; break;
case cMinecart::mpChest: EntityClass = "MinecartChest"; break;
case cMinecart::mpFurnace: EntityClass = "MinecartFurnace"; break;
+ case cMinecart::mpTNT: EntityClass = "MinecartTNT"; break;
+ case cMinecart::mpHopper: EntityClass = "MinecartHopper"; break;
default:
{
ASSERT(!"Unhandled minecart payload type");
diff --git a/source/WorldStorage/NBTChunkSerializer.h b/source/WorldStorage/NBTChunkSerializer.h
index 1ccd356b0..cd1388f89 100644
--- a/source/WorldStorage/NBTChunkSerializer.h
+++ b/source/WorldStorage/NBTChunkSerializer.h
@@ -31,6 +31,8 @@ class cFallingBlock;
class cMinecart;
class cMinecartWithChest;
class cMinecartWithFurnace;
+class cMinecartWithTNT;
+class cMinecartWithHopper;
class cMonster;
class cPickup;
class cItemGrid;
diff --git a/source/WorldStorage/WSSAnvil.cpp b/source/WorldStorage/WSSAnvil.cpp
index 8f23cc773..3648d4462 100644
--- a/source/WorldStorage/WSSAnvil.cpp
+++ b/source/WorldStorage/WSSAnvil.cpp
@@ -928,6 +928,8 @@ void cWSSAnvil::LoadEntityFromNBT(cEntityList & a_Entities, const cParsedNBT & a
case 0: LoadMinecartRFromNBT(a_Entities, a_NBT, a_EntityTagIdx); break; // Rideable minecart
case 1: LoadMinecartCFromNBT(a_Entities, a_NBT, a_EntityTagIdx); break; // Minecart with chest
case 2: LoadMinecartFFromNBT(a_Entities, a_NBT, a_EntityTagIdx); break; // Minecart with furnace
+ case 3: LoadMinecartTFromNBT(a_Entities, a_NBT, a_EntityTagIdx); break; // Minecart with TNT
+ case 4: LoadMinecartHFromNBT(a_Entities, a_NBT, a_EntityTagIdx); break; // Minecart with Hopper
}
}
else if (strncmp(a_IDTag, "MinecartRideable", a_IDTagLength) == 0)
diff --git a/source/WorldStorage/WSSAnvil.h b/source/WorldStorage/WSSAnvil.h
index bd2108b30..47fda3f7b 100644
--- a/source/WorldStorage/WSSAnvil.h
+++ b/source/WorldStorage/WSSAnvil.h
@@ -142,6 +142,8 @@ protected:
void LoadMinecartRFromNBT (cEntityList & a_Entities, const cParsedNBT & a_NBT, int a_TagIdx);
void LoadMinecartCFromNBT (cEntityList & a_Entities, const cParsedNBT & a_NBT, int a_TagIdx);
void LoadMinecartFFromNBT (cEntityList & a_Entities, const cParsedNBT & a_NBT, int a_TagIdx);
+ void LoadMinecartTFromNBT (cEntityList & a_Entities, const cParsedNBT & a_NBT, int a_TagIdx);
+ void LoadMinecartHFromNBT (cEntityList & a_Entities, const cParsedNBT & a_NBT, int a_TagIdx);
void LoadPickupFromNBT (cEntityList & a_Entities, const cParsedNBT & a_NBT, int a_TagIdx);
/// Loads entity common data from the NBT compound; returns true if successful