From c805b1792970fbde72ac9124cc8f0b9f64c62a1f Mon Sep 17 00:00:00 2001 From: nossr50 Date: Tue, 14 Feb 2012 14:37:10 -0800 Subject: [PATCH] Fixed Green Thumb going off when Green Terra is in use. --- .../com/gmail/nossr50/listeners/mcBlockListener.java | 4 ++-- src/main/java/com/gmail/nossr50/skills/Herbalism.java | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/listeners/mcBlockListener.java b/src/main/java/com/gmail/nossr50/listeners/mcBlockListener.java index 5302134b9..ce2dfb46a 100644 --- a/src/main/java/com/gmail/nossr50/listeners/mcBlockListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/mcBlockListener.java @@ -169,7 +169,7 @@ public class mcBlockListener implements Listener //Wheat && Triple drops if(PP.getGreenTerraMode() && Herbalism.canBeGreenTerra(block)) { - Herbalism.herbalismProcCheck(block, player, event, plugin, true); + Herbalism.herbalismProcCheck(block, player, event, plugin); Herbalism.greenTerraWheat(player, block, event, plugin); } @@ -277,7 +277,7 @@ public class mcBlockListener implements Listener } if(mcPermissions.getInstance().herbalism(player) && block.getData() != (byte) 5) - Herbalism.herbalismProcCheck(block, player, event, plugin, false); + Herbalism.herbalismProcCheck(block, player, event, plugin); //Change the byte back when broken if(block.getData() == 5 && m.shouldBeWatched(block)) diff --git a/src/main/java/com/gmail/nossr50/skills/Herbalism.java b/src/main/java/com/gmail/nossr50/skills/Herbalism.java index 4e73ea7be..24747735a 100644 --- a/src/main/java/com/gmail/nossr50/skills/Herbalism.java +++ b/src/main/java/com/gmail/nossr50/skills/Herbalism.java @@ -90,8 +90,8 @@ public class Herbalism is = new ItemStack(mat, 1, (byte)0, (byte)0); m.mcDropItem(loc, is); - herbalismProcCheck(block, player, event, plugin, true); - herbalismProcCheck(block, player, event, plugin, true); + herbalismProcCheck(block, player, event, plugin); + herbalismProcCheck(block, player, event, plugin); block.setData((byte) 0x03); } } @@ -145,7 +145,7 @@ public class Herbalism } } - public static void herbalismProcCheck(Block block, Player player, BlockBreakEvent event, mcMMO plugin, boolean isGreenTerra) + public static void herbalismProcCheck(Block block, Player player, BlockBreakEvent event, mcMMO plugin) { PlayerProfile PP = Users.getProfile(player); int herbLevel = PP.getSkillLevel(SkillType.HERBALISM); @@ -170,9 +170,11 @@ public class Herbalism if(herbLevel > 1000 || (Math.random() * 1000 <= herbLevel)) m.mcDropItem(loc, is); } + //GREEN THUMB - if(!isGreenTerra && (herbLevel > 1500 || (Math.random() * 1500 <= herbLevel))) + if(!PP.getGreenTerraMode() && (herbLevel > 1500 || (Math.random() * 1500 <= herbLevel))) { + System.out.println("DEBUG: GREEN THUMB ACTIVATED"); event.setCancelled(true); m.mcDropItem(loc, is); //DROP SOME SEEDS