mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-18 09:24:05 +00:00
Fixed #1966 Face Lit Pumkins correctly
This commit is contained in:
parent
f7de1ede3f
commit
2f2afe2336
@ -31,13 +31,9 @@ class LitPumpkin extends Solid{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function place(Item $item, Block $block, Block $target, $face, $fx, $fy, $fz, Player $player = null){
|
public function place(Item $item, Block $block, Block $target, $face, $fx, $fy, $fz, Player $player = null){
|
||||||
$faces = array(
|
if($player instanceof Player){
|
||||||
0 => 4,
|
$this->meta = (int) $player->getDirection();
|
||||||
1 => 2,
|
}
|
||||||
2 => 5,
|
|
||||||
3 => 3,
|
|
||||||
);
|
|
||||||
$this->meta = $faces[$player->getDirection()];
|
|
||||||
$this->getLevel()->setBlock($block, $this, true, false, true);
|
$this->getLevel()->setBlock($block, $this, true, false, true);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user