From 0f41381c985b6454b641b69bce8cc7cf5b19ae16 Mon Sep 17 00:00:00 2001 From: Grant Date: Wed, 1 Feb 2012 03:45:46 -0500 Subject: [PATCH] Herbalism double drop updates --- .../com/gmail/nossr50/skills/Herbalism.java | 28 +++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/skills/Herbalism.java b/src/main/java/com/gmail/nossr50/skills/Herbalism.java index 60eb33063..63765b813 100644 --- a/src/main/java/com/gmail/nossr50/skills/Herbalism.java +++ b/src/main/java/com/gmail/nossr50/skills/Herbalism.java @@ -213,6 +213,13 @@ public class Herbalism if(Math.random() * 1000 <= PP.getSkillLevel(SkillType.HERBALISM)) { m.mcDropItem(loc, is); + m.mcDropItem(loc, is); + if(Math.random() * 10 > 5) + m.mcDropItem(loc, item); + if(Math.random() * 10 > 5) + m.mcDropItem(loc, item); + if(Math.random() * 10 > 5) + m.mcDropItem(loc, item); } } } @@ -317,12 +324,23 @@ public class Herbalism if(type == 103) { mat = Material.getMaterial(360); - int slices = (int) ((Math.random() + 3) + (int)(Math.random() * 4)); //drop 3-7 melon slices rather than melon blocks - is = new ItemStack(mat, slices, (byte)0, (byte)0); - - if(Math.random() * 1000 <= PP.getSkillLevel(SkillType.HERBALISM)) + is = new ItemStack(mat, 1, (byte)0, (byte)0); + if(player != null) { - m.mcDropItem(loc, is); + if(Math.random() * 1000 <= PP.getSkillLevel(SkillType.HERBALISM)) + { + m.mcDropItem(loc, is); + m.mcDropItem(loc, is); + m.mcDropItem(loc, is); + if(Math.random() * 10 > 5) + m.mcDropItem(loc, item); + if(Math.random() * 10 > 5) + m.mcDropItem(loc, item); + if(Math.random() * 10 > 5) + m.mcDropItem(loc, item); + if(Math.random() * 10 > 5) + m.mcDropItem(loc, item); + } } PP.addXP(SkillType.HERBALISM, LoadProperties.mmelon, player); }