Update to Minecraft 1.18-pre5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-11-22 09:00:00 +11:00
parent a852b81a69
commit 43702a9e10
700 changed files with 10286 additions and 10098 deletions

View File

@@ -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);
}