From 5cd542002e10b7ad4f49217fd09fb2925fcaf50f Mon Sep 17 00:00:00 2001 From: GJ Date: Sun, 24 Feb 2013 14:04:54 -0500 Subject: [PATCH] Only remove seed on greenThumb - Green Terra's already had the seed removed the first time. --- .../nossr50/skills/herbalism/Herbalism.java | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 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 9c3f44fbf..27450291d 100644 --- a/src/main/java/com/gmail/nossr50/skills/herbalism/Herbalism.java +++ b/src/main/java/com/gmail/nossr50/skills/herbalism/Herbalism.java @@ -320,22 +320,19 @@ public class Herbalism { * @return true if the ability was successful, false otherwise */ private static boolean processGreenThumbPlants(BlockState blockState, Player player) { - PlayerInventory playerInventory = player.getInventory(); - ItemStack seed = HerbalismBlock.getHerbalismBlock(blockState.getType()).getDropItem(); - - if (!playerInventory.containsAtLeast(seed, 1)) { - return false; - } - PlayerProfile playerProfile = Users.getPlayer(player).getProfile(); if (playerProfile.getAbilityMode(AbilityType.GREEN_TERRA)) { - playerInventory.removeItem(seed); - player.updateInventory(); // Needed until replacement available - return convertGreenTerraPlants(blockState); } else if (SkillTools.activationSuccessful(player, SkillType.HERBALISM, greenThumbMaxChance, greenThumbMaxLevel)) { + PlayerInventory playerInventory = player.getInventory(); + ItemStack seed = HerbalismBlock.getHerbalismBlock(blockState.getType()).getDropItem(); + + if (!playerInventory.containsAtLeast(seed, 1)) { + return false; + } + playerInventory.removeItem(seed); player.updateInventory(); // Needed until replacement available