mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-23 16:56:31 +01:00
[Bleeding] Cleanup clone method.
By: Wesley Wolfe <weswolf@aol.com>
This commit is contained in:
parent
da4df32343
commit
39944f7043
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…
Add table
Reference in a new issue