Fixed a crash when looking at effect powder with TOP

Closes #177
This commit is contained in:
Ell 2021-01-11 22:50:11 +01:00
parent 94d38e5a81
commit 548050b6e9

View file

@ -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;
}