42        return $this->spawnCompoundCache === null;
 
 
   48    public function setDirty(
bool $dirty = 
true) : void{
 
   49        $this->clearSpawnCompoundCache();
 
 
   52    public function clearSpawnCompoundCache() : void{
 
   53        $this->spawnCompoundCache = null;
 
   79        if($this->spawnCompoundCache === null){
 
   80            $this->spawnCompoundCache = 
new CacheableNbt($this->getSpawnCompound());
 
   83        return $this->spawnCompoundCache;
 
 
   86    final public function getSpawnCompound() : 
CompoundTag{
 
   88            ->setString(self::TAG_ID, TileFactory::getInstance()->getSaveId(get_class($this))) 
 
   89            ->setInt(self::TAG_X, $this->position->x)
 
   90            ->setInt(self::TAG_Y, $this->position->y)
 
   91            ->setInt(self::TAG_Z, $this->position->z);
 
   92        $this->addAdditionalSpawnData($nbt);