diff options
author | Ascynx <78341107+Ascynx@users.noreply.github.com> | 2022-08-26 16:53:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-26 16:53:41 +0200 |
commit | 063e19e367e19ef2e0cf1809a18dcbfdbefa9a86 (patch) | |
tree | 43e03ced0bd254703c193987fb8e13dd3cc45255 | |
parent | dfd2f6b05bce74d7feb5d28e7a388dbb871ecf6a (diff) | |
download | NotEnoughUpdates-063e19e367e19ef2e0cf1809a18dcbfdbefa9a86.tar.gz NotEnoughUpdates-063e19e367e19ef2e0cf1809a18dcbfdbefa9a86.tar.bz2 NotEnoughUpdates-063e19e367e19ef2e0cf1809a18dcbfdbefa9a86.zip |
Fix for 1006832334638678057/1011342800840839298 (#246)
returns an empty string to avoid the mod crashing when the drop chance doesn't exist
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/recipes/MobLootRecipe.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/recipes/MobLootRecipe.java b/src/main/java/io/github/moulberry/notenoughupdates/recipes/MobLootRecipe.java index 82d56363..61749593 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/recipes/MobLootRecipe.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/recipes/MobLootRecipe.java @@ -72,6 +72,10 @@ public class MobLootRecipe implements NeuRecipe { } private String formatDropChance() { + if (chance == null) { + return ""; + } + if (!chance.endsWith("%")) { return chance; } |