Update LapisOre.php

This commit is contained in:
dog194 2016-04-14 23:51:33 +08:00
commit 78cd9b3b38

View file

@ -52,8 +52,12 @@ class LapisOre extends Solid{
[Item::LAPIS_ORE, 0, 1],
];
}else{
$fortunel = $item->getEnchantmentLevel(Enchantment::TYPE_MINING_FORTUNE);
$fortunel = $fortunel > 3 ? 3 : $fortunel;
$times = [1,1,2,3,4];
$time = $times[mt_rand(0, $fortunel + 1)];
return [
[Item::DYE, 4, mt_rand(4, 8)],
[Item::DYE, 4, mt_rand(4, 8) * $time],
];
}
}else{