From 548050b6e90c67acfdc61ef17d724155bd9bd16d Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 11 Jan 2021 22:50:11 +0100 Subject: [PATCH] Fixed a crash when looking at effect powder with TOP Closes #177 --- .../java/de/ellpeck/naturesaura/items/ItemEffectPowder.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/de/ellpeck/naturesaura/items/ItemEffectPowder.java b/src/main/java/de/ellpeck/naturesaura/items/ItemEffectPowder.java index 31ca19ab..30c9e4cc 100644 --- a/src/main/java/de/ellpeck/naturesaura/items/ItemEffectPowder.java +++ b/src/main/java/de/ellpeck/naturesaura/items/ItemEffectPowder.java @@ -1,6 +1,5 @@ package de.ellpeck.naturesaura.items; -import de.ellpeck.naturesaura.NaturesAura; import de.ellpeck.naturesaura.api.NaturesAuraAPI; import de.ellpeck.naturesaura.entities.EntityEffectInhibitor; import de.ellpeck.naturesaura.reg.IColorProvidingItem; @@ -34,7 +33,7 @@ public class ItemEffectPowder extends ItemImpl implements IColorProvidingItem { } public static ItemStack setEffect(ItemStack stack, ResourceLocation effect) { - stack.getOrCreateTag().putString("effect", effect.toString()); + stack.getOrCreateTag().putString("effect", effect != null ? effect.toString() : ""); return stack; }