mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-24 11:38:29 +01:00
Fixed crash with dispensers dispensing dispensables
This commit is contained in:
parent
fa7ad9a264
commit
5412d6f5a8
@ -43,11 +43,13 @@ public final class ItemStack {
|
||||
public ItemStack(int id, int count, int data, NBTTagList enchantments) {
|
||||
this(id, count, data);
|
||||
// taken from .addEnchantment
|
||||
if (Item.byId[this.id].getMaxStackSize() == 1) {
|
||||
if (this.tag == null) {
|
||||
this.setTag(new NBTTagCompound());
|
||||
}
|
||||
|
||||
this.tag.set("ench", enchantments); // modify this part to use passed in enchantments list
|
||||
this.tag.set("ench", enchantments.clone()); // modify this part to use passed in enchantments list
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user