Updated Position to use Weak / strong references for Level objects

This commit is contained in:
Shoghi Cervantes
2014-05-22 04:14:06 +02:00
parent 6328834681
commit c1546aac9c
60 changed files with 584 additions and 291 deletions

View File

@ -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);
}
}