Update to Minecraft 1.20

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2023-06-08 01:30:00 +10:00
parent bac55e67d6
commit 9d740b84b0
269 changed files with 2605 additions and 2568 deletions

View File

@@ -17,10 +17,10 @@
public static final MinecraftKey EMPTY_ARMOR_SLOT_SHIELD = new MinecraftKey("item/empty_armor_slot_shield");
static final MinecraftKey[] TEXTURE_EMPTY_SLOTS = new MinecraftKey[]{ContainerPlayer.EMPTY_ARMOR_SLOT_BOOTS, ContainerPlayer.EMPTY_ARMOR_SLOT_LEGGINGS, ContainerPlayer.EMPTY_ARMOR_SLOT_CHESTPLATE, ContainerPlayer.EMPTY_ARMOR_SLOT_HELMET};
private static final EnumItemSlot[] SLOT_IDS = new EnumItemSlot[]{EnumItemSlot.HEAD, EnumItemSlot.CHEST, EnumItemSlot.LEGS, EnumItemSlot.FEET};
- private final InventoryCrafting craftSlots = new InventoryCrafting(this, 2, 2);
- private final InventoryCrafting craftSlots = new TransientCraftingContainer(this, 2, 2);
- private final InventoryCraftResult resultSlots = new InventoryCraftResult();
+ // CraftBukkit start
+ private final InventoryCrafting craftSlots;
+ private final TransientCraftingContainer craftSlots;
+ private final InventoryCraftResult resultSlots;
+ // CraftBukkit end
public final boolean active;
@@ -36,7 +36,7 @@
this.owner = entityhuman;
+ // CraftBukkit start
+ this.resultSlots = new InventoryCraftResult(); // CraftBukkit - moved to before InventoryCrafting construction
+ this.craftSlots = new InventoryCrafting(this, 2, 2, playerinventory.player); // CraftBukkit - pass player
+ this.craftSlots = new TransientCraftingContainer(this, 2, 2, playerinventory.player); // CraftBukkit - pass player
+ this.craftSlots.resultInventory = this.resultSlots; // CraftBukkit - let InventoryCrafting know about its result slot
+ this.player = playerinventory; // CraftBukkit - save player
+ setTitle(IChatBaseComponent.translatable("container.crafting")); // SPIGOT-4722: Allocate title for player inventory