summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/WSSAnvil.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-09-24 15:17:20 +0200
committerHowaner <franzi.moos@googlemail.com>2014-09-24 15:17:20 +0200
commit1d588b5195507f52c25d57a627c3304c024770ce (patch)
tree7d8e0f404ae062a37049e9532e2dceb9ae5ddb09 /src/WorldStorage/WSSAnvil.cpp
parentMerge branch 'master' into WorldLoader (diff)
downloadcuberite-1d588b5195507f52c25d57a627c3304c024770ce.tar
cuberite-1d588b5195507f52c25d57a627c3304c024770ce.tar.gz
cuberite-1d588b5195507f52c25d57a627c3304c024770ce.tar.bz2
cuberite-1d588b5195507f52c25d57a627c3304c024770ce.tar.lz
cuberite-1d588b5195507f52c25d57a627c3304c024770ce.tar.xz
cuberite-1d588b5195507f52c25d57a627c3304c024770ce.tar.zst
cuberite-1d588b5195507f52c25d57a627c3304c024770ce.zip
Diffstat (limited to '')
-rw-r--r--src/WorldStorage/WSSAnvil.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/WorldStorage/WSSAnvil.cpp b/src/WorldStorage/WSSAnvil.cpp
index 3821ad976..bd814e2c7 100644
--- a/src/WorldStorage/WSSAnvil.cpp
+++ b/src/WorldStorage/WSSAnvil.cpp
@@ -51,6 +51,7 @@
#include "../Entities/ItemFrame.h"
#include "../Protocol/MojangAPI.h"
+#include "Server.h"
@@ -99,7 +100,7 @@ cWSSAnvil::cWSSAnvil(cWorld * a_World, int a_CompressionFactor) :
Writer.BeginCompound("Data");
Writer.AddByte("allowCommands", 1);
Writer.AddByte("Difficulty", 2);
- Writer.AddByte("hardcore", 0);
+ Writer.AddByte("hardcore", cRoot::Get()->GetServer()->IsHardcore() ? 1 : 0);
Writer.AddByte("initialized", 1);
Writer.AddByte("MapFeatures", 1);
Writer.AddByte("raining", a_World->IsWeatherRain() ? 1 : 0);
@@ -457,12 +458,6 @@ bool cWSSAnvil::SaveChunkToNBT(const cChunkCoords & a_Chunk, cFastNBTWriter & a_
a_Writer.AddInt("xPos", a_Chunk.m_ChunkX);
a_Writer.AddInt("zPos", a_Chunk.m_ChunkZ);
- // Add "Entities" and "TileEntities". MCEdit can't load the chunk if one of these lists doesn't exists.
- a_Writer.BeginList("Entities", TAG_Compound);
- a_Writer.EndList();
- a_Writer.BeginList("TileEntities", TAG_Compound);
- a_Writer.EndList();
-
cNBTChunkSerializer Serializer(a_Writer);
if (!m_World->GetChunkData(a_Chunk.m_ChunkX, a_Chunk.m_ChunkZ, Serializer))
{