meta = $meta; } public function getHardness() : float{ return 1; } public function getName() : string{ return "Mob Head"; } protected function recalculateBoundingBox() : ?AxisAlignedBB{ //TODO: different bounds depending on attached face (meta) return new AxisAlignedBB( $this->x + 0.25, $this->y, $this->z + 0.25, $this->x + 0.75, $this->y + 0.5, $this->z + 0.75 ); } public function place(Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector, Player $player = null) : bool{ if($face === Vector3::SIDE_DOWN){ return false; } $this->meta = $face; $this->getLevelNonNull()->setBlock($blockReplace, $this, true); Tile::createTile(Tile::SKULL, $this->getLevelNonNull(), TileSkull::createNBT($this, $face, $item, $player)); return true; } private function getItem() : Item{ $tile = $this->level->getTile($this); return ItemFactory::get(Item::SKULL, $tile instanceof TileSkull ? $tile->getType() : 0); } public function getDropsForCompatibleTool(Item $item) : array{ return [$this->getItem()]; } public function isAffectedBySilkTouch() : bool{ return false; } public function getPickedItem() : Item{ return $this->getItem(); } }