summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/WSSAnvil.cpp
diff options
context:
space:
mode:
authorandrew <xdotftw@gmail.com>2014-03-25 19:59:33 +0100
committerandrew <xdotftw@gmail.com>2014-03-25 19:59:33 +0100
commit2e28c09770a937b253680d7f62b9b2f4c8f4670c (patch)
tree60bc0e8da8940df8acd338692ac8a95327b2347e /src/WorldStorage/WSSAnvil.cpp
parentPlugins can set flying speed. (diff)
downloadcuberite-2e28c09770a937b253680d7f62b9b2f4c8f4670c.tar
cuberite-2e28c09770a937b253680d7f62b9b2f4c8f4670c.tar.gz
cuberite-2e28c09770a937b253680d7f62b9b2f4c8f4670c.tar.bz2
cuberite-2e28c09770a937b253680d7f62b9b2f4c8f4670c.tar.lz
cuberite-2e28c09770a937b253680d7f62b9b2f4c8f4670c.tar.xz
cuberite-2e28c09770a937b253680d7f62b9b2f4c8f4670c.tar.zst
cuberite-2e28c09770a937b253680d7f62b9b2f4c8f4670c.zip
Diffstat (limited to '')
-rw-r--r--src/WorldStorage/WSSAnvil.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/WorldStorage/WSSAnvil.cpp b/src/WorldStorage/WSSAnvil.cpp
index 7a2366755..1214089a1 100644
--- a/src/WorldStorage/WSSAnvil.cpp
+++ b/src/WorldStorage/WSSAnvil.cpp
@@ -32,6 +32,7 @@
#include "../Mobs/IncludeAllMonsters.h"
#include "../Entities/Boat.h"
+#include "../Entities/EnderCrystal.h"
#include "../Entities/FallingBlock.h"
#include "../Entities/Minecart.h"
#include "../Entities/Pickup.h"
@@ -1057,6 +1058,10 @@ void cWSSAnvil::LoadEntityFromNBT(cEntityList & a_Entities, const cParsedNBT & a
{
LoadBoatFromNBT(a_Entities, a_NBT, a_EntityTagIdx);
}
+ else if (strncmp(a_IDTag, "EnderCrystal", a_IDTagLength) == 0)
+ {
+ LoadEnderCrystalFromNBT(a_Entities, a_NBT, a_EntityTagIdx);
+ }
else if (strncmp(a_IDTag, "FallingBlock", a_IDTagLength) == 0)
{
LoadFallingBlockFromNBT(a_Entities, a_NBT, a_EntityTagIdx);
@@ -1275,6 +1280,20 @@ void cWSSAnvil::LoadBoatFromNBT(cEntityList & a_Entities, const cParsedNBT & a_N
+void cWSSAnvil::LoadEnderCrystalFromNBT(cEntityList & a_Entities, const cParsedNBT & a_NBT, int a_TagIdx)
+{
+ std::auto_ptr<cEnderCrystal> EnderCrystal(new cEnderCrystal(0, 0, 0));
+ if (!LoadEntityBaseFromNBT(*EnderCrystal.get(), a_NBT, a_TagIdx))
+ {
+ return;
+ }
+ a_Entities.push_back(EnderCrystal.release());
+}
+
+
+
+
+
void cWSSAnvil::LoadFallingBlockFromNBT(cEntityList & a_Entities, const cParsedNBT & a_NBT, int a_TagIdx)
{
int TypeIdx = a_NBT.FindChildByName(a_TagIdx, "TileID");