mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-17 10:24:23 +01:00
Fixed spell registry leaving empty nbt tags on unenchanted items
This commit is contained in:
parent
16d39c781e
commit
26fbda8b76
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue