return an empty string on getLegacyStringSubtypeInfo for effect powders with no effect

closes #363
This commit is contained in:
Ell 2024-10-20 11:55:53 +02:00
parent 7dd63845af
commit 27f51b39dd

View file

@ -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<>() {