Plants fix

This commit is contained in:
ArkQuark 2023-01-28 22:14:12 +03:00
parent c8c92048ba
commit 7853a14458
6 changed files with 23 additions and 26 deletions

View file

@ -64,15 +64,15 @@ class MelonStemBlock extends FlowableBlock{
}
public function getDrops(Item $item, Player $player){
$drops = array();
$drops = [];
if($this->meta >= 0x07){
$drops[] = array(MELON_SEEDS, 0, mt_rand(1, 2));
$drops[] = [MELON_SEEDS, 0, mt_rand(1, 2)];
}
elseif($this->meta >= 0x01 and $this->meta <= 0x07){
$drops[] = array(MELON_SEEDS, 0, 1);
$drops[] = [MELON_SEEDS, 0, 1];
}
else{
$drops[] = array(MELON_SEEDS, 0, 0);
$drops[] = [MELON_SEEDS, 0, 0];
}
return $drops;
}