mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-16 18:59:00 +00:00
Save correct NBT Compound tag on Level chunk save
This commit is contained in:
parent
5241d8ff13
commit
980ee223d0
@ -230,7 +230,7 @@ class Level{
|
||||
PMFLevel::getXZ($index, $X, $Z);
|
||||
$nbt = new NBT(NBT::BIG_ENDIAN);
|
||||
$nbt->setData(new NBTTag_Compound("", array(
|
||||
"Entities" => new NBTTag_List("Entities", array()),
|
||||
"Entities" => new NBTTag_List("Entities", array()),
|
||||
"TileEntities" => new NBTTag_List("TileEntities", array()),
|
||||
)));
|
||||
$nbt->Entities->setTagType(NBTTag::TAG_Compound);
|
||||
@ -239,6 +239,7 @@ class Level{
|
||||
$i = 0;
|
||||
foreach($this->chunkEntities[$index] as $entity){
|
||||
if($entity->closed !== true){
|
||||
$nbt->Entities[$i]->saveNBT();
|
||||
$nbt->Entities[$i] = $entity->namedtag;
|
||||
++$i;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user