Adding new blocks

This commit is contained in:
ArkQuark 2023-02-26 15:16:34 +03:00
parent 37bbfe2d81
commit 4a861c0f5d
11 changed files with 135 additions and 6 deletions

View file

@ -0,0 +1,19 @@
<?php
class RedMushroomSolidBlock extends SolidBlock{
public function __construct($meta = 0){
parent::__construct(RED_MUSHROOM_BLOCK, $meta, "Mushroom");
$this->hardness = 0.2;
}
public function place(Item $item, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
//todo
$this->level->setBlock($this, $this, true, false, true);
}
public function getDrops(Item $item, Player $player){
return [
[RED_MUSHROOM, 0, mt_rand(0, 2)]
];
}
}