From d2cb88d93be653206c16ad8528c094e86d10036c Mon Sep 17 00:00:00 2001 From: gmcferrin Date: Tue, 29 Jan 2013 10:07:32 -0500 Subject: [PATCH] No need to check if this is wheat... --- .../gmail/nossr50/skills/herbalism/Herbalism.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/skills/herbalism/Herbalism.java b/src/main/java/com/gmail/nossr50/skills/herbalism/Herbalism.java index faf00d295..abb2a4321 100644 --- a/src/main/java/com/gmail/nossr50/skills/herbalism/Herbalism.java +++ b/src/main/java/com/gmail/nossr50/skills/herbalism/Herbalism.java @@ -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)) {