Fixed Green Thumb going off when Green Terra is in use.

This commit is contained in:
nossr50 2012-02-14 14:37:10 -08:00
parent 877bf7905b
commit c805b17929
2 changed files with 8 additions and 6 deletions

View File

@ -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))

View File

@ -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