mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-24 05:47:59 +01:00
Fixed spell registry wiping out existing nbt when enchanting a stack
This commit is contained in:
parent
45d5840f82
commit
7abd4cbae6
1 changed files with 3 additions and 1 deletions
|
@ -127,7 +127,9 @@ public class SpellRegistry {
|
|||
}
|
||||
|
||||
public ItemStack enchantStack(ItemStack stack, String name) {
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
if (!stack.hasTagCompound()) {
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
stack.getTagCompound().setString("spell", name);
|
||||
|
||||
return stack;
|
||||
|
|
Loading…
Reference in a new issue