mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 11:44:19 +01:00
Fix removing enchantments causing the enchantment tag to remain.
By: feildmaster <admin@feildmaster.com>
This commit is contained in:
parent
4bd54dfd92
commit
2d0ea62fb2
1 changed files with 2 additions and 1 deletions
|
@ -233,11 +233,12 @@ public final class CraftItemStack extends ItemStack {
|
||||||
if (index == Integer.MIN_VALUE) {
|
if (index == Integer.MIN_VALUE) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (index == 0 && size == 0) {
|
if (index == 0 && size == 1) {
|
||||||
handle.tag.o(ENCHANTMENTS.NBT);
|
handle.tag.o(ENCHANTMENTS.NBT);
|
||||||
if (handle.tag.d()) {
|
if (handle.tag.d()) {
|
||||||
handle.tag = null;
|
handle.tag = null;
|
||||||
}
|
}
|
||||||
|
return ((NBTTagCompound) list.get(0)).getShort(ENCHANTMENTS_ID.NBT);
|
||||||
}
|
}
|
||||||
|
|
||||||
listCopy = new NBTTagList(ENCHANTMENTS.NBT);
|
listCopy = new NBTTagList(ENCHANTMENTS.NBT);
|
||||||
|
|
Loading…
Reference in a new issue