mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
random.nextInt() has 0 inclusive, we need to add 1
This commit is contained in:
parent
4c6f2da78a
commit
08882e58b6
@ -212,7 +212,7 @@ public final class Misc {
|
|||||||
* @param quantity The amount of items to drop
|
* @param quantity The amount of items to drop
|
||||||
*/
|
*/
|
||||||
public static void randomDropItems(Location location, ItemStack is, int chance, int quantity) {
|
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) {
|
if(dropCount > 0) {
|
||||||
is.setAmount(dropCount);
|
is.setAmount(dropCount);
|
||||||
|
Loading…
Reference in New Issue
Block a user