This commit is contained in:
Michael Yoo
2013-12-14 16:14:41 +10:30
parent 01e9ca7852
commit 050d3424f0
2 changed files with 13 additions and 2 deletions

View File

@@ -24,5 +24,16 @@ class LitPumpkinBlock extends SolidBlock{
parent::__construct(LIT_PUMPKIN, "Jack o'Lantern");
$this->hardness = 5;
}
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
$faces = array(
0 => 4,
1 => 2,
2 => 5,
3 => 3,
);
$this->meta = $faces[$player->entity->getDirection()];
$this->level->setBlock($block, $this, true, false, true);
return true;
}
}