Update to Minecraft 1.19

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2022-06-08 02:00:00 +10:00
parent 91d9aa9a89
commit 25f3b50f6b
332 changed files with 3628 additions and 2559 deletions

View File

@@ -5,7 +5,7 @@
import net.minecraft.world.item.enchantment.EnchantmentManager;
+// CraftBukkit start
+import net.minecraft.network.chat.ChatMessage;
+import net.minecraft.network.chat.IChatBaseComponent;
+import org.bukkit.craftbukkit.inventory.CraftInventoryCrafting;
+import org.bukkit.craftbukkit.inventory.CraftInventoryView;
+// CraftBukkit end
@@ -30,7 +30,7 @@
+ private PlayerInventory player;
+ // CraftBukkit end
public ContainerPlayer(PlayerInventory playerinventory, boolean flag, EntityHuman entityhuman) {
public ContainerPlayer(PlayerInventory playerinventory, boolean flag, final EntityHuman entityhuman) {
super((Containers) null, 0);
this.active = flag;
this.owner = entityhuman;
@@ -39,12 +39,12 @@
+ this.craftSlots = new InventoryCrafting(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(new ChatMessage("container.crafting")); // SPIGOT-4722: Allocate title for player inventory
+ setTitle(IChatBaseComponent.translatable("container.crafting")); // SPIGOT-4722: Allocate title for player inventory
+ // CraftBukkit end
this.addSlot(new SlotResult(playerinventory.player, this.craftSlots, this.resultSlots, 0, 154, 28));
int i;
@@ -242,4 +261,17 @@
@@ -250,4 +269,17 @@
public boolean shouldMoveToInventory(int i) {
return i != this.getResultSlotIndex();
}