mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-03 23:07:40 +01:00
SPIGOT-5534: ItemStack copy constructor can cause legacy layer to load
By: md_5 <git@md-5.net>
This commit is contained in:
parent
902b81e2dd
commit
b0cb90fa04
@ -101,7 +101,9 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
|
||||
Validate.notNull(stack, "Cannot copy null stack");
|
||||
this.type = stack.getType();
|
||||
this.amount = stack.getAmount();
|
||||
this.data = stack.getData();
|
||||
if (this.type.isLegacy()) {
|
||||
this.data = stack.getData();
|
||||
}
|
||||
if (stack.hasItemMeta()) {
|
||||
setItemMeta0(stack.getItemMeta(), type);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user