mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 19:02:59 +00:00
Automate creation and deletion of Tiles for appropriate blocks
closes #880
This commit is contained in:
@ -28,10 +28,8 @@ use pocketmine\item\Item;
|
||||
use pocketmine\item\TieredTool;
|
||||
use pocketmine\math\AxisAlignedBB;
|
||||
use pocketmine\math\Facing;
|
||||
use pocketmine\math\Vector3;
|
||||
use pocketmine\Player;
|
||||
use pocketmine\tile\EnchantTable as TileEnchantingTable;
|
||||
use pocketmine\tile\TileFactory;
|
||||
|
||||
class EnchantingTable extends Transparent{
|
||||
|
||||
@ -41,13 +39,8 @@ class EnchantingTable extends Transparent{
|
||||
|
||||
}
|
||||
|
||||
public function place(Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector, Player $player = null) : bool{
|
||||
if(parent::place($item, $blockReplace, $blockClicked, $face, $clickVector, $player)){
|
||||
$this->level->addTile(TileFactory::createFromItem(TileEnchantingTable::class, $this->getLevel(), $this->asVector3(), $item));
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
protected function getTileClass() : ?string{
|
||||
return TileEnchantingTable::class;
|
||||
}
|
||||
|
||||
public function getHardness() : float{
|
||||
|
Reference in New Issue
Block a user