Small fixes

Fixed pumpkins face direction
Added drop snowballs from snow
Added mobs spawn from his spawn eggs
This commit is contained in:
ArkQuark 2021-12-22 17:09:54 +03:00
parent 680ce226cd
commit 86cfb923f4
4 changed files with 29 additions and 7 deletions

View file

@ -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);