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

@ -149,7 +149,7 @@ define("SPAWN_EGG", 383);
define("CARROT", 391);
define("CARROTS", 391);
define("POTATO", 392);
define("POTATOES", 392);
define("POTATOES", 392);//@shoghicp Why the heck do we need plural redundant Item ID here????
define("BAKED_POTATO", 393);
define("BAKED_POTATOES", 393);

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;
}
}