From 74c3ce0552539526f460a2594364b54980a994d6 Mon Sep 17 00:00:00 2001 From: gmcferrin Date: Thu, 10 Jan 2013 12:55:54 -0500 Subject: [PATCH] Support for auto-replanting cocoa. --- .../java/com/gmail/nossr50/skills/gathering/Herbalism.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/skills/gathering/Herbalism.java b/src/main/java/com/gmail/nossr50/skills/gathering/Herbalism.java index 456ef88a7..10ed1cb95 100644 --- a/src/main/java/com/gmail/nossr50/skills/gathering/Herbalism.java +++ b/src/main/java/com/gmail/nossr50/skills/gathering/Herbalism.java @@ -422,12 +422,11 @@ public class Herbalism { hasSeeds = inventory.contains(Material.SEEDS); break; case COCOA: - // Broken: Requires an update to bukkit to enable seaching for variable-sized ItemStacks. try { - hasSeeds = inventory.contains(new ItemStack(Material.INK_SACK, 1, DyeColor.BROWN.getDyeData()), 1); + hasSeeds = inventory.containsAtLeast(new ItemStack(Material.INK_SACK, 1, DyeColor.BROWN.getDyeData()), 1); } catch(Exception e) { - hasSeeds = inventory.contains(new ItemStack(Material.INK_SACK, 1, (short) 3), 1); + hasSeeds = inventory.containsAtLeast(new ItemStack(Material.INK_SACK, 1, (short) 3), 1); } break; case CARROT: