From 27f51b39dd89dd7bcd8b5f783517946477f294cf Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 20 Oct 2024 11:55:53 +0200 Subject: [PATCH] return an empty string on getLegacyStringSubtypeInfo for effect powders with no effect closes #363 --- .../ellpeck/naturesaura/compat/jei/JEINaturesAuraPlugin.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/ellpeck/naturesaura/compat/jei/JEINaturesAuraPlugin.java b/src/main/java/de/ellpeck/naturesaura/compat/jei/JEINaturesAuraPlugin.java index cc164a9d..45ef4648 100644 --- a/src/main/java/de/ellpeck/naturesaura/compat/jei/JEINaturesAuraPlugin.java +++ b/src/main/java/de/ellpeck/naturesaura/compat/jei/JEINaturesAuraPlugin.java @@ -57,7 +57,8 @@ public class JEINaturesAuraPlugin implements IModPlugin { @Override public String getLegacyStringSubtypeInfo(ItemStack ingredient, UidContext context) { - return ItemEffectPowder.getEffect(ingredient).toString(); + var effect = ItemEffectPowder.getEffect(ingredient); + return effect != null ? effect.toString() : ""; } }); registration.registerSubtypeInterpreter(VanillaTypes.ITEM_STACK, ModItems.AURA_BOTTLE, new ISubtypeInterpreter<>() {