mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 12:39:43 +00:00
fixed bugs 71,72,43 and 32
This commit is contained in:
parent
7fb11d97fd
commit
d02c98b2b3
7 changed files with 31 additions and 19 deletions
|
|
@ -57,9 +57,11 @@ class BeetrootBlock extends FlowableBlock{
|
|||
$drops = array();
|
||||
if($this->meta >= 0x07){
|
||||
$drops[] = array(BEETROOT, 0, 1);
|
||||
$drops[] = array(BEETROOT_SEEDS, 0, mt_rand(0, 3));
|
||||
}else{
|
||||
$drops[] = array(BEETROOT_SEEDS, 0, 1);
|
||||
}
|
||||
for($i = 0; $i < 3; ++$i){
|
||||
if(mt_rand(0,15) <= $this->meta){ //a way from 1.4.7
|
||||
$drops[] = array(BEETROOT_SEEDS, 0, 1);
|
||||
}
|
||||
}
|
||||
return $drops;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,9 +56,12 @@ class CarrotBlock extends FlowableBlock{
|
|||
public function getDrops(Item $item, Player $player){
|
||||
$drops = array();
|
||||
if($this->meta >= 0x07){
|
||||
$drops[] = array(CARROT, 0, mt_rand(1, 4));
|
||||
}else{
|
||||
$drops[] = array(CARROT, 0, 1);
|
||||
$drops[] = array(CARROT, 0, mt_rand(1));
|
||||
}
|
||||
for($i = 0; $i < 3; ++$i){
|
||||
if(mt_rand(0,15) <= $this->meta){ //a way from 1.4.7
|
||||
$drops[] = array(CARROT, 0, 1);
|
||||
}
|
||||
}
|
||||
return $drops;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,12 @@ class WheatBlock extends FlowableBlock{
|
|||
$drops[] = array(WHEAT, 0, 1);
|
||||
$drops[] = array(WHEAT_SEEDS, 0, mt_rand(0, 3));
|
||||
}else{
|
||||
$drops[] = array(WHEAT_SEEDS, 0, 1);
|
||||
for($i = 0; $i < 3; ++$i){
|
||||
if(mt_rand(0,15) <= $this->meta){ //a way from 1.4.7
|
||||
$drops[] = array(WHEAT_SEEDS, 0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return $drops;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue