diff --git a/src/pocketmine/block/LitPumpkin.php b/src/pocketmine/block/LitPumpkin.php index 8da0b423e9..465d052247 100644 --- a/src/pocketmine/block/LitPumpkin.php +++ b/src/pocketmine/block/LitPumpkin.php @@ -32,7 +32,7 @@ class LitPumpkin 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(); + $this->meta = ((int) $player->getDirection() + 5) % 4; } $this->getLevel()->setBlock($block, $this, true, true); diff --git a/src/pocketmine/block/Pumpkin.php b/src/pocketmine/block/Pumpkin.php index fd179f0626..ca2ad84cd9 100644 --- a/src/pocketmine/block/Pumpkin.php +++ b/src/pocketmine/block/Pumpkin.php @@ -21,6 +21,8 @@ namespace pocketmine\block; +use pocketmine\item\Item; +use pocketmine\Player; class Pumpkin extends Solid{ public function __construct(){ @@ -28,4 +30,13 @@ class Pumpkin extends Solid{ $this->hardness = 5; } + 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; + } + } \ No newline at end of file