Save enderchest block entities to storage
+ Add EnderChest saving, as Vanilla does - Remove CreateBlockEntities. Storage should save & load everything so looping over chunk data is not needed
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include "../BlockEntities/CommandBlockEntity.h"
|
||||
#include "../BlockEntities/DispenserEntity.h"
|
||||
#include "../BlockEntities/DropperEntity.h"
|
||||
#include "../BlockEntities/EnderChestEntity.h"
|
||||
#include "../BlockEntities/FurnaceEntity.h"
|
||||
#include "../BlockEntities/HopperEntity.h"
|
||||
#include "../BlockEntities/JukeboxEntity.h"
|
||||
@@ -214,7 +215,7 @@ public:
|
||||
case E_BLOCK_COMMAND_BLOCK: AddCommandBlockEntity(static_cast<cCommandBlockEntity *>(a_Entity)); break;
|
||||
case E_BLOCK_DISPENSER: AddDispenserEntity (static_cast<cDispenserEntity *> (a_Entity)); break;
|
||||
case E_BLOCK_DROPPER: AddDropperEntity (static_cast<cDropperEntity *> (a_Entity)); break;
|
||||
case E_BLOCK_ENDER_CHEST: /* No data to be saved */ break;
|
||||
case E_BLOCK_ENDER_CHEST: AddEnderchestEntity (static_cast<cEnderChestEntity *> (a_Entity)); break;
|
||||
case E_BLOCK_FLOWER_POT: AddFlowerPotEntity (static_cast<cFlowerPotEntity *> (a_Entity)); break;
|
||||
case E_BLOCK_FURNACE: AddFurnaceEntity (static_cast<cFurnaceEntity *> (a_Entity)); break;
|
||||
case E_BLOCK_HEAD: AddMobHeadEntity (static_cast<cMobHeadEntity *> (a_Entity)); break;
|
||||
@@ -460,6 +461,17 @@ public:
|
||||
|
||||
|
||||
|
||||
void AddEnderchestEntity(cEnderChestEntity * a_Entity)
|
||||
{
|
||||
mWriter.BeginCompound("");
|
||||
AddBasicTileEntity(a_Entity, "EnderChest");
|
||||
mWriter.EndCompound();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void AddFurnaceEntity(cFurnaceEntity * a_Furnace)
|
||||
{
|
||||
mWriter.BeginCompound("");
|
||||
|
||||
Reference in New Issue
Block a user