SkullType)){ $nbt->SkullType = new ByteTag("SkullType", 0); } if(!isset($nbt->Rot)){ $nbt->Rot = new ByteTag("Rot", 0); } parent::__construct($chunk, $nbt); } public function setType($type){ if($type >= 0 && $type <= 4){ $this->namedtag->SkullType = new ByteTag("SkullType", $type); $this->spawnToAll(); if($this->chunk){ $this->chunk->setChanged(); $this->level->clearChunkCache($this->chunk->getX(), $this->chunk->getZ()); } return true; } return false; } public function getType(){ return $this->namedtag["SkullType"]; } public function getSpawnCompound(){ return new CompoundTag("", [ new StringTag("id", Tile::SKULL), $this->namedtag->SkullType, $this->namedtag->Rot, new IntTag("x", (int) $this->x), new IntTag("y", (int) $this->y), new IntTag("z", (int) $this->z) ]); } }