From 063e19e367e19ef2e0cf1809a18dcbfdbefa9a86 Mon Sep 17 00:00:00 2001 From: Ascynx <78341107+Ascynx@users.noreply.github.com> Date: Fri, 26 Aug 2022 16:53:41 +0200 Subject: Fix for 1006832334638678057/1011342800840839298 (#246) returns an empty string to avoid the mod crashing when the drop chance doesn't exist --- .../io/github/moulberry/notenoughupdates/recipes/MobLootRecipe.java | 4 ++++ 1 file changed, 4 insertions(+) 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; } -- cgit