@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/InventorySubcontainer.java
|
||||
+++ b/net/minecraft/world/InventorySubcontainer.java
|
||||
@@ -13,13 +13,71 @@
|
||||
@@ -14,6 +14,12 @@
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
public class InventorySubcontainer implements IInventory, AutoRecipeOutput {
|
||||
|
||||
private final int size;
|
||||
public final NonNullList<ItemStack> items;
|
||||
@@ -21,7 +27,59 @@
|
||||
@Nullable
|
||||
private List<IInventoryListener> listeners;
|
||||
|
||||
+ // CraftBukkit start - add fields and methods
|
||||
@@ -58,7 +59,7 @@
|
||||
+ public InventorySubcontainer(InventorySubcontainer original) {
|
||||
+ this(original.size);
|
||||
+ for (int slot = 0; slot < original.size; slot++) {
|
||||
+ this.items.set(slot, original.items.get(slot).cloneItemStack());
|
||||
+ this.items.set(slot, original.items.get(slot).copy());
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
@@ -70,5 +71,5 @@
|
||||
+ this.bukkitOwner = owner;
|
||||
+ // CraftBukkit end
|
||||
this.size = i;
|
||||
this.items = NonNullList.a(i, ItemStack.EMPTY);
|
||||
this.items = NonNullList.withSize(i, ItemStack.EMPTY);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user