mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Fix class cast exception with food default chance
This commit is contained in:
@@ -69,7 +69,7 @@ index 513343d225a71e242b0f237eefcd25147709d9d1..1f65bba67cd4fab1dee115f24b213075
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
index 93429c792513f213dcc0c18373774943c0b0d7ad..a9dcc82be19c89c3d66c1662a0273fd763507287 100644
|
||||
index 0075a0f744c860c68cbfe7efa5b8aa2b4a30c5b6..df7a687114789836e5248a88a43cfbc4d3c8a5ac 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
@@ -430,4 +430,57 @@ public class PurpurConfig {
|
||||
@@ -115,7 +115,7 @@ index 93429c792513f213dcc0c18373774943c0b0d7ad..a9dcc82be19c89c3d66c1662a0273fd7
|
||||
+ return;
|
||||
+ }
|
||||
+ food.getEffects().removeIf(pair -> pair.getFirst().getEffect() == effect);
|
||||
+ float chance = (float) effects.getDouble(effectKey + ".chance", (double) effectDefaults.get("chance"));
|
||||
+ float chance = (float) effects.getDouble(effectKey + ".chance", ((Float) effectDefaults.get("chance")).doubleValue());
|
||||
+ int duration = effects.getInt(effectKey + ".duration", (int) effectDefaults.get("duration"));
|
||||
+ if (chance <= 0.0F || duration < 0) {
|
||||
+ return;
|
||||
|
||||
Reference in New Issue
Block a user