aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0092-LootTable-API-and-replenishable-lootables.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0092-LootTable-API-and-replenishable-lootables.patch')
-rw-r--r--patches/server/0092-LootTable-API-and-replenishable-lootables.patch4
1 files changed, 2 insertions, 2 deletions
diff --git a/patches/server/0092-LootTable-API-and-replenishable-lootables.patch b/patches/server/0092-LootTable-API-and-replenishable-lootables.patch
index 2f441da2cc..2c728e93f8 100644
--- a/patches/server/0092-LootTable-API-and-replenishable-lootables.patch
+++ b/patches/server/0092-LootTable-API-and-replenishable-lootables.patch
@@ -654,7 +654,7 @@ index e0fbacd574e0c83c2e1d164ded8e9ccf4af30480..7529751afa2932fd16bc4591189b0358
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
-index aa4181e59f88be04a3605352fa5ceb3e04149dd3..7cbd403f9e96e7ce35475c8102cd9f9c04819c27 100644
+index aa4181e59f88be04a3605352fa5ceb3e04149dd3..e4e827a57c2913c719282cc0d5da33586607677b 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
@@ -17,6 +17,7 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc
@@ -675,7 +675,7 @@ index aa4181e59f88be04a3605352fa5ceb3e04149dd3..7cbd403f9e96e7ce35475c8102cd9f9c
+ // Copied from super with changes, always check the original method
+ this.lootableData.loadNbt(nbt); // Paper
+ if (nbt.contains("LootTable", 8)) {
-+ this.setLootTable(new ResourceLocation(nbt.getString("LootTable")));
++ this.setLootTable(ResourceLocation.tryParse(nbt.getString("LootTable")));
+ try { org.bukkit.craftbukkit.util.CraftNamespacedKey.fromMinecraft(this.lootTable); } catch (IllegalArgumentException ex) { this.lootTable = null; } // Paper - validate
+ this.setLootTableSeed(nbt.getLong("LootTableSeed"));
+ return false; // Paper - always load the items, table may still remain