diff --git a/src/main/java/eu/m724/giants/Configuration.java b/src/main/java/eu/m724/giants/Configuration.java index aeb9561..11b8d40 100644 --- a/src/main/java/eu/m724/giants/Configuration.java +++ b/src/main/java/eu/m724/giants/Configuration.java @@ -85,7 +85,7 @@ public class Configuration { int min = (int) dropMap.get("quantityMin"); int max = (int) dropMap.get("quantityMax"); - float chance = (float) dropMap.get("chance"); + double chance = (double) dropMap.get("chance"); drops.add(new Drop(itemStack, min, max, chance)); } catch (IllegalArgumentException e) { diff --git a/src/main/java/eu/m724/giants/Drop.java b/src/main/java/eu/m724/giants/Drop.java index b2e8cdc..a0920d7 100644 --- a/src/main/java/eu/m724/giants/Drop.java +++ b/src/main/java/eu/m724/giants/Drop.java @@ -7,7 +7,7 @@ import java.util.concurrent.ThreadLocalRandom; public class Drop { public final ItemStack itemStack; public final int min, max; - public final float chance; + public final double chance; public Drop(ItemStack itemStack, int min, int max, float chance) { this.itemStack = itemStack; diff --git a/src/main/java/eu/m724/giants/GiantProcessor.java b/src/main/java/eu/m724/giants/GiantProcessor.java index 40b5396..41645cd 100644 --- a/src/main/java/eu/m724/giants/GiantProcessor.java +++ b/src/main/java/eu/m724/giants/GiantProcessor.java @@ -138,7 +138,7 @@ public class GiantProcessor implements Listener { return; if (e.getEntityType() == EntityType.ZOMBIE) { - if (configuration.chance > random.nextFloat()) { + if (configuration.chance > random.nextDouble()) { e.setCancelled(true); spawnGiant(e.getLocation());