mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-17 03:08:58 +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);
|
PMFLevel::getXZ($index, $X, $Z);
|
||||||
$nbt = new NBT(NBT::BIG_ENDIAN);
|
$nbt = new NBT(NBT::BIG_ENDIAN);
|
||||||
$nbt->setData(new NBTTag_Compound("", array(
|
$nbt->setData(new NBTTag_Compound("", array(
|
||||||
"Entities" => new NBTTag_List("Entities", array()),
|
"Entities" => new NBTTag_List("Entities", array()),
|
||||||
"TileEntities" => new NBTTag_List("TileEntities", array()),
|
"TileEntities" => new NBTTag_List("TileEntities", array()),
|
||||||
)));
|
)));
|
||||||
$nbt->Entities->setTagType(NBTTag::TAG_Compound);
|
$nbt->Entities->setTagType(NBTTag::TAG_Compound);
|
||||||
@ -239,6 +239,7 @@ class Level{
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
foreach($this->chunkEntities[$index] as $entity){
|
foreach($this->chunkEntities[$index] as $entity){
|
||||||
if($entity->closed !== true){
|
if($entity->closed !== true){
|
||||||
|
$nbt->Entities[$i]->saveNBT();
|
||||||
$nbt->Entities[$i] = $entity->namedtag;
|
$nbt->Entities[$i] = $entity->namedtag;
|
||||||
++$i;
|
++$i;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user