mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-06 02:35:49 +01:00
[Bleeding] Cleanup clone method.
This commit is contained in:
parent
4d89a21a25
commit
39048be430
1 changed files with 5 additions and 1 deletions
|
@ -216,7 +216,11 @@ public class CraftItemStack extends ItemStack {
|
|||
|
||||
@Override
|
||||
public CraftItemStack clone() {
|
||||
return new CraftItemStack(this.item == null ? this.item : this.item.cloneItemStack());
|
||||
CraftItemStack itemStack = (CraftItemStack) super.clone();
|
||||
if (this.item != null) {
|
||||
itemStack.item = this.item.cloneItemStack();
|
||||
}
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
public static net.minecraft.server.ItemStack createNMSItemStack(ItemStack original) {
|
||||
|
|
Loading…
Reference in a new issue