diff --git a/src/material/block/solid/LitPumpkin.php b/src/material/block/solid/LitPumpkin.php index 91c0dd07..df6fdaef 100644 --- a/src/material/block/solid/LitPumpkin.php +++ b/src/material/block/solid/LitPumpkin.php @@ -20,17 +20,17 @@ */ class LitPumpkinBlock extends SolidBlock{ - public function __construct(){ - parent::__construct(LIT_PUMPKIN, "Jack o'Lantern"); + public function __construct($meta = 0){ + parent::__construct(LIT_PUMPKIN, $meta, "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, + 0 => 1, 1 => 2, - 2 => 5, - 3 => 3, + 2 => 3, + 3 => 0, ); $this->meta = $faces[$player->entity->getDirection()]; $this->level->setBlock($block, $this, true, false, true); diff --git a/src/material/block/solid/Pumpkin.php b/src/material/block/solid/Pumpkin.php index e69e96df..eba27853 100644 --- a/src/material/block/solid/Pumpkin.php +++ b/src/material/block/solid/Pumpkin.php @@ -20,9 +20,20 @@ */ class PumpkinBlock extends SolidBlock{ - public function __construct(){ - parent::__construct(PUMPKIN, "Pumpkin"); + public function __construct($meta = 0){ + parent::__construct(PUMPKIN, $meta, "Pumpkin"); $this->hardness = 5; } + public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){ + $faces = array( + 0 => 1, + 1 => 2, + 2 => 3, + 3 => 0, + ); + $this->meta = $faces[$player->entity->getDirection()]; + $this->level->setBlock($block, $this, true, false, true); + return true; + } } \ No newline at end of file diff --git a/src/material/block/solid/Snow.php b/src/material/block/solid/Snow.php index d5fbf6dd..809ef7dd 100644 --- a/src/material/block/solid/Snow.php +++ b/src/material/block/solid/Snow.php @@ -24,5 +24,11 @@ class SnowBlock extends SolidBlock{ parent::__construct(SNOW_BLOCK, 0, "Snow Block"); $this->hardness = 1; } + + public function getDrops(Item $item, Player $player){ + return array( + array(SNOWBALL, 0, 4), + ); + } } \ No newline at end of file diff --git a/src/material/item/generic/SpawnEgg.php b/src/material/item/generic/SpawnEgg.php index 2c9d1329..a6ce0604 100644 --- a/src/material/item/generic/SpawnEgg.php +++ b/src/material/item/generic/SpawnEgg.php @@ -32,6 +32,11 @@ class SpawnEggItem extends Item{ case MOB_SHEEP: case MOB_COW: case MOB_PIG: + case MOB_ZOMBIE: + case MOB_CREEPER: + case MOB_SKELETON: + case MOB_SPIDER: + case MOB_PIGMAN: $data = array( "x" => $block->x + 0.5, "y" => $block->y,