diff --git a/patches/server/CB-fixes.patch b/patches/server/CB-fixes.patch index 6bcf851a89..714f4d6405 100644 --- a/patches/server/CB-fixes.patch +++ b/patches/server/CB-fixes.patch @@ -67,6 +67,22 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.storageAccess = chunkIoWorker; this.registryAccess = registryManager; this.structureTemplateManager = structureTemplateManager; +diff --git a/src/main/java/org/bukkit/craftbukkit/CraftLootTable.java b/src/main/java/org/bukkit/craftbukkit/CraftLootTable.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftLootTable.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftLootTable.java +@@ -0,0 +0,0 @@ public class CraftLootTable implements org.bukkit.loot.LootTable { + org.bukkit.loot.LootTable table = (org.bukkit.loot.LootTable) obj; + return table.getKey().equals(this.getKey()); + } ++ ++ // Paper start - satisfy equals/hashCode contract ++ @Override ++ public int hashCode() { ++ return java.util.Objects.hash(key); ++ } ++ // Paper end + } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/patches/server/Use-correct-variable-for-initializing-CraftLootTable.patch b/patches/server/Use-correct-variable-for-initializing-CraftLootTable.patch new file mode 100644 index 0000000000..3faa78a066 --- /dev/null +++ b/patches/server/Use-correct-variable-for-initializing-CraftLootTable.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jake Potrebic +Date: Tue, 10 Oct 2023 10:17:43 -0700 +Subject: [PATCH] Use correct variable for initializing CraftLootTable + + +diff --git a/src/main/java/net/minecraft/world/level/storage/loot/LootDataManager.java b/src/main/java/net/minecraft/world/level/storage/loot/LootDataManager.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/world/level/storage/loot/LootDataManager.java ++++ b/src/main/java/net/minecraft/world/level/storage/loot/LootDataManager.java +@@ -0,0 +0,0 @@ public class LootDataManager implements PreparableReloadListener, LootDataResolv + }); + // CraftBukkit start + map1.forEach((key, lootTable) -> { +- if (object instanceof LootTable table) { ++ if (lootTable instanceof LootTable table) { // Paper - use correct variable + table.craftLootTable = new CraftLootTable(CraftNamespacedKey.fromMinecraft(key.location()), table); + } + });