From 08882e58b6d41e923a2cf18b339650f8843cac29 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Sat, 16 Feb 2013 14:44:41 -0800 Subject: [PATCH] random.nextInt() has 0 inclusive, we need to add 1 --- src/main/java/com/gmail/nossr50/util/Misc.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/util/Misc.java b/src/main/java/com/gmail/nossr50/util/Misc.java index 9a4ffe8d0..d8deb2f40 100644 --- a/src/main/java/com/gmail/nossr50/util/Misc.java +++ b/src/main/java/com/gmail/nossr50/util/Misc.java @@ -212,7 +212,7 @@ public final class Misc { * @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); + int dropCount = random.nextInt(quantity + 1); if(dropCount > 0) { is.setAmount(dropCount);