Fix some non-properly-implemented blocks killing people and bad inheritances

This commit is contained in:
Dylan K. Taylor
2017-02-21 11:17:33 +00:00
parent 408f63f8fa
commit f933107af0
19 changed files with 29 additions and 42 deletions

View File

@ -29,8 +29,8 @@ class Pumpkin extends Solid{
protected $id = self::PUMPKIN;
public function __construct(){
public function __construct($meta = 0){
$this->meta = $meta;
}
public function getHardness(){
@ -47,7 +47,7 @@ class Pumpkin extends Solid{
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->meta = ((int) $player->getDirection() + 1) % 4;
}
$this->getLevel()->setBlock($block, $this, true, true);