mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-27 10:41:27 +01:00
[Bleeding] Cleanup clone method.
By: Wesley Wolfe <weswolf@aol.com>
This commit is contained in:
parent
da4df32343
commit
39944f7043
@ -216,7 +216,11 @@ public class CraftItemStack extends ItemStack {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftItemStack clone() {
|
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) {
|
public static net.minecraft.server.ItemStack createNMSItemStack(ItemStack original) {
|
||||||
|
Loading…
Reference in New Issue
Block a user