Fixed spell registry leaving empty nbt tags on unenchanted items

This commit is contained in:
Sollace 2019-01-13 22:06:54 +02:00
parent 16d39c781e
commit 26fbda8b76

View file

@ -87,6 +87,10 @@ public class SpellRegistry {
public ItemStack disenchantStack(ItemStack stack) {
if (stackHasEnchantment(stack)) {
stack.getTagCompound().removeTag("spell");
if (stack.getTagCompound().isEmpty()) {
stack.setTagCompound(null);
}
}
return stack;