mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Updated Position to use Weak / strong references for Level objects
This commit is contained in:
@ -56,6 +56,20 @@ class Chunk extends BaseChunk{
|
||||
$this->nbt->TileTicks->setTagType(NBT::TAG_Compound);
|
||||
}
|
||||
|
||||
if($this->nbt->Sections instanceof Enum){
|
||||
$this->nbt->Sections->setTagType(NBT::TAG_Compound);
|
||||
}else{
|
||||
$this->nbt->Sections = new Enum("Sections", array());
|
||||
$this->nbt->Sections->setTagType(NBT::TAG_Compound);
|
||||
}
|
||||
|
||||
$sections = array();
|
||||
foreach($this->nbt->Sections as $section){
|
||||
if($section instanceof Compound){
|
||||
$sections[(int) $section["Y"]] = new ChunkSection($section);
|
||||
}
|
||||
}
|
||||
|
||||
parent::__construct($level, $this->nbt["xPos"], $this->nbt["zPos"], $sections);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user