PaperMC/patches/server/1026-Use-correct-variable-for-initializing-CraftLootTable.patch

20 lines
1.1 KiB
Diff
Raw Normal View History

2023-10-10 19:35:49 +02:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jake Potrebic <jake.m.potrebic@gmail.com>
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
2023-12-06 19:18:53 +01:00
index 973b786368cf628815f099eefe968338c97c52ed..3b740b1fcada96a6fac18a22ea77d1d3ad2a9cce 100644
2023-10-10 19:35:49 +02:00
--- a/src/main/java/net/minecraft/world/level/storage/loot/LootDataManager.java
+++ b/src/main/java/net/minecraft/world/level/storage/loot/LootDataManager.java
2023-12-06 19:18:53 +01:00
@@ -103,7 +103,7 @@ public class LootDataManager implements PreparableReloadListener, LootDataResolv
2023-10-10 19:35:49 +02:00
});
// 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);
}
});