I'm not releasing I'm not releasing I'm not releasing

This commit is contained in:
Minecon724 2024-09-21 10:05:58 +02:00
parent ce96097808
commit 5279503b04
Signed by: Minecon724
GPG key ID: 3CCC4D267742C8E8
3 changed files with 3 additions and 3 deletions

View file

@ -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) {

View file

@ -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;

View file

@ -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());