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 fd4c86fe0..455626438 100644 --- a/src/main/java/com/gmail/nossr50/skills/herbalism/Herbalism.java +++ b/src/main/java/com/gmail/nossr50/skills/herbalism/Herbalism.java @@ -204,7 +204,7 @@ public class Herbalism { int maximumDropAmount = customBlock.getMaximumDropAmount(); if (minimumDropAmount != maximumDropAmount) { - Misc.randomDropItems(location, dropItem, 50, maximumDropAmount - minimumDropAmount); + Misc.randomDropItems(location, dropItem, maximumDropAmount - minimumDropAmount); } Misc.dropItems(location, dropItem, minimumDropAmount); diff --git a/src/main/java/com/gmail/nossr50/skills/mining/Mining.java b/src/main/java/com/gmail/nossr50/skills/mining/Mining.java index f5476812a..3e5e0efc7 100644 --- a/src/main/java/com/gmail/nossr50/skills/mining/Mining.java +++ b/src/main/java/com/gmail/nossr50/skills/mining/Mining.java @@ -225,7 +225,7 @@ public class Mining { if (config.getGlowstoneDoubleDropsEnabled()) { item = new ItemStack(Material.GLOWSTONE_DUST); Misc.dropItems(location, item, 2); - Misc.randomDropItems(location, item, 50, 2); + Misc.randomDropItems(location, item, 2); } break; @@ -245,7 +245,7 @@ public class Mining { if (config.getLapisDoubleDropsEnabled()) { item = new ItemStack(Material.INK_SACK, 1, DyeColor.BLUE.getDyeData()); Misc.dropItems(location, item, 4); - Misc.randomDropItems(location, item, 50, 4); + Misc.randomDropItems(location, item, 4); } break; @@ -297,7 +297,7 @@ public class Mining { if (minimumDropAmount != maximumDropAmount) { Misc.dropItems(location, item, minimumDropAmount); - Misc.randomDropItems(location, item, 50, maximumDropAmount - minimumDropAmount); + Misc.randomDropItems(location, item, maximumDropAmount - minimumDropAmount); } else { Misc.dropItems(location, item, minimumDropAmount); diff --git a/src/main/java/com/gmail/nossr50/skills/woodcutting/TreeFeller.java b/src/main/java/com/gmail/nossr50/skills/woodcutting/TreeFeller.java index 90b875099..276dc5b7f 100644 --- a/src/main/java/com/gmail/nossr50/skills/woodcutting/TreeFeller.java +++ b/src/main/java/com/gmail/nossr50/skills/woodcutting/TreeFeller.java @@ -193,10 +193,10 @@ public final class TreeFeller { } if (material == Material.HUGE_MUSHROOM_1) { - Misc.randomDropItems(block.getLocation(), new ItemStack(Material.BROWN_MUSHROOM), 50, 2); + Misc.randomDropItems(block.getLocation(), new ItemStack(Material.BROWN_MUSHROOM), 2); } else { - Misc.randomDropItems(block.getLocation(), new ItemStack(Material.RED_MUSHROOM), 50, 2); + Misc.randomDropItems(block.getLocation(), new ItemStack(Material.RED_MUSHROOM), 2); } break; @@ -229,7 +229,7 @@ public final class TreeFeller { Misc.dropItems(location, item, minimumDropAmount); if (minimumDropAmount < maximumDropAmount) { - Misc.randomDropItems(location, item, 50, maximumDropAmount - minimumDropAmount); + Misc.randomDropItems(location, item, maximumDropAmount - minimumDropAmount); } } else if (ModChecks.isCustomLeafBlock(block)) { diff --git a/src/main/java/com/gmail/nossr50/skills/woodcutting/Woodcutting.java b/src/main/java/com/gmail/nossr50/skills/woodcutting/Woodcutting.java index 2800948bd..dc82c79e6 100644 --- a/src/main/java/com/gmail/nossr50/skills/woodcutting/Woodcutting.java +++ b/src/main/java/com/gmail/nossr50/skills/woodcutting/Woodcutting.java @@ -163,7 +163,7 @@ public final class Woodcutting { Misc.dropItems(location, item, minimumDropAmount); if (minimumDropAmount != maximumDropAmount) { - Misc.randomDropItems(location, item, 50, maximumDropAmount - minimumDropAmount); + Misc.randomDropItems(location, item, maximumDropAmount - minimumDropAmount); } } else { diff --git a/src/main/java/com/gmail/nossr50/util/Misc.java b/src/main/java/com/gmail/nossr50/util/Misc.java index d8deb2f40..fac7f02c4 100644 --- a/src/main/java/com/gmail/nossr50/util/Misc.java +++ b/src/main/java/com/gmail/nossr50/util/Misc.java @@ -211,13 +211,13 @@ public final class Misc { * @param chance The percentage chance for the item to drop * @param quantity The amount of items to drop */ - public static void randomDropItems(Location location, ItemStack is, int chance, int quantity) { - int dropCount = random.nextInt(quantity + 1); - - if(dropCount > 0) { - is.setAmount(dropCount); - dropItem(location, is); - } + public static void randomDropItems(Location location, ItemStack is, int quantity) { + int dropCount = random.nextInt(quantity + 1); + + if (dropCount > 0) { + is.setAmount(dropCount); + dropItem(location, is); + } } /**