From 5279503b040c1a8c720ee631c0423cc5434f8384 Mon Sep 17 00:00:00 2001 From: Minecon724 Date: Sat, 21 Sep 2024 10:05:58 +0200 Subject: [PATCH] I'm not releasing I'm not releasing I'm not releasing --- src/main/java/eu/m724/giants/Configuration.java | 2 +- src/main/java/eu/m724/giants/Drop.java | 2 +- src/main/java/eu/m724/giants/GiantProcessor.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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());