I'm not releasing I'm not releasing I'm not releasing
This commit is contained in:
parent
ce96097808
commit
5279503b04
3 changed files with 3 additions and 3 deletions
|
@ -85,7 +85,7 @@ public class Configuration {
|
||||||
|
|
||||||
int min = (int) dropMap.get("quantityMin");
|
int min = (int) dropMap.get("quantityMin");
|
||||||
int max = (int) dropMap.get("quantityMax");
|
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));
|
drops.add(new Drop(itemStack, min, max, chance));
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import java.util.concurrent.ThreadLocalRandom;
|
||||||
public class Drop {
|
public class Drop {
|
||||||
public final ItemStack itemStack;
|
public final ItemStack itemStack;
|
||||||
public final int min, max;
|
public final int min, max;
|
||||||
public final float chance;
|
public final double chance;
|
||||||
|
|
||||||
public Drop(ItemStack itemStack, int min, int max, float chance) {
|
public Drop(ItemStack itemStack, int min, int max, float chance) {
|
||||||
this.itemStack = itemStack;
|
this.itemStack = itemStack;
|
||||||
|
|
|
@ -138,7 +138,7 @@ public class GiantProcessor implements Listener {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (e.getEntityType() == EntityType.ZOMBIE) {
|
if (e.getEntityType() == EntityType.ZOMBIE) {
|
||||||
if (configuration.chance > random.nextFloat()) {
|
if (configuration.chance > random.nextDouble()) {
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
spawnGiant(e.getLocation());
|
spawnGiant(e.getLocation());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue