mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-18 19:55:33 +00:00
"Better" Tall Grass drops
This commit is contained in:
parent
cf5bc916c0
commit
0f01570d01
@ -44,23 +44,24 @@ class TallGrassBlock extends FlowableBlock{
|
|||||||
|
|
||||||
public function getDrops(Item $item, Player $player){
|
public function getDrops(Item $item, Player $player){
|
||||||
$drops = array();
|
$drops = array();
|
||||||
if(mt_rand(1,10) === 1){//Seeds
|
$possibleDrops = array(
|
||||||
$drops[] = array(WHEAT_SEEDS, 0, 1);
|
array(WHEAT_SEEDS, 0, 1),
|
||||||
}
|
array(CARROT, 0, 1),
|
||||||
if(mt_rand(1,15) === 1){//Carrots
|
array(POTATO, 0, 1),
|
||||||
$drops[] = array(CARROT, 0, 1);
|
array(BEETROOT_SEEDS, 0, 1),
|
||||||
}
|
array(MELON_SEEDS, 0, 1),
|
||||||
if(mt_rand(1,15) === 1){//Potatoes
|
array(PUMPKIN_SEEDS, 0, 1),
|
||||||
$drops[] = array(POTATO, 0, 1);
|
0,
|
||||||
}
|
0,
|
||||||
if(mt_rand(1,15) === 1){//Beetroot Seeds
|
0,
|
||||||
$drops[] = array(BEETROOT_SEEDS, 0, 1);
|
0,
|
||||||
}
|
0,
|
||||||
if(mt_rand(1,20) === 1){//Melon Seeds
|
0,
|
||||||
$drops[] = array(MELON_SEEDS, 0, 1);
|
0,
|
||||||
}
|
0,
|
||||||
if(mt_rand(1,15) === 1){//Melon Seeds
|
);
|
||||||
$drops[] = array(PUMPKIN_SEEDS, 0, 1);
|
if(($item = $possibleDrops[mt_rand(0, count($possibleDrops) - 1)]) !== 0){
|
||||||
|
$drops[] = $item;
|
||||||
}
|
}
|
||||||
return $drops;
|
return $drops;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user