mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-01-31 14:49:35 +01:00
No need to check if this is wheat...
This commit is contained in:
parent
659e982c47
commit
d2cb88d93b
@ -80,11 +80,9 @@ public class Herbalism {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!block.getType().equals(Material.WHEAT)) {
|
||||
inventory.removeItem(new ItemStack(Material.SEEDS));
|
||||
player.updateInventory(); // Needed until replacement available
|
||||
greenTerraConvert(player, block);
|
||||
}
|
||||
inventory.removeItem(new ItemStack(Material.SEEDS));
|
||||
player.updateInventory(); // Needed until replacement available
|
||||
greenTerraConvert(player, block);
|
||||
}
|
||||
|
||||
public static void greenTerraConvert(Player player, Block block) {
|
||||
@ -338,9 +336,7 @@ public class Herbalism {
|
||||
public static void hylianLuck(Block block, Player player, BlockBreakEvent event) {
|
||||
int skillLevel = Users.getProfile(player).getSkillLevel(SkillType.HERBALISM);
|
||||
|
||||
float chance = (float) ((hylianLuckMaxChance / hylianLuckMaxLevel) * skillLevel);
|
||||
if (chance > hylianLuckMaxChance) chance = (float) hylianLuckMaxChance;
|
||||
|
||||
double chance = (hylianLuckMaxChance / hylianLuckMaxLevel) * Misc.skillCheck(skillLevel, hylianLuckMaxLevel);
|
||||
int activationChance = Misc.calculateActivationChance(Permissions.luckyHerbalism(player));
|
||||
|
||||
if (chance > Misc.getRandom().nextInt(activationChance)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user