mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 10:53:05 +00:00
Fix some non-properly-implemented blocks killing people and bad inheritances
This commit is contained in:
@ -25,7 +25,7 @@ use pocketmine\item\Item;
|
||||
use pocketmine\item\Tool;
|
||||
use pocketmine\Player;
|
||||
|
||||
class LitPumpkin extends Solid{
|
||||
class LitPumpkin extends Pumpkin{
|
||||
|
||||
protected $id = self::LIT_PUMPKIN;
|
||||
|
||||
@ -33,28 +33,7 @@ class LitPumpkin extends Solid{
|
||||
return 15;
|
||||
}
|
||||
|
||||
public function getHardness(){
|
||||
return 1;
|
||||
}
|
||||
|
||||
public function getToolType(){
|
||||
return Tool::TYPE_AXE;
|
||||
}
|
||||
|
||||
public function getName(){
|
||||
return "Jack o'Lantern";
|
||||
}
|
||||
|
||||
public function __construct($meta = 0){
|
||||
$this->meta = $meta;
|
||||
}
|
||||
|
||||
public function place(Item $item, Block $block, Block $target, $face, $fx, $fy, $fz, Player $player = null){
|
||||
if($player instanceof Player){
|
||||
$this->meta = ((int) $player->getDirection() + 5) % 4;
|
||||
}
|
||||
$this->getLevel()->setBlock($block, $this, true, true);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user