Fixed Anvil chunks not having NBT set

This commit is contained in:
Shoghi Cervantes 2015-05-12 16:52:11 +02:00
parent 9791071262
commit f3bdef7513

View File

@ -46,6 +46,8 @@ class Chunk extends BaseChunk{
return; return;
} }
$this->nbt = $nbt;
if(!isset($this->nbt->Entities) or !($this->nbt->Entities instanceof Enum)){ if(!isset($this->nbt->Entities) or !($this->nbt->Entities instanceof Enum)){
$this->nbt->Entities = new Enum("Entities", []); $this->nbt->Entities = new Enum("Entities", []);
$this->nbt->Entities->setTagType(NBT::TAG_Compound); $this->nbt->Entities->setTagType(NBT::TAG_Compound);