aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0944-Expose-LootTable-of-DecoratedPot.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0944-Expose-LootTable-of-DecoratedPot.patch')
-rw-r--r--patches/server/0944-Expose-LootTable-of-DecoratedPot.patch14
1 files changed, 4 insertions, 10 deletions
diff --git a/patches/server/0944-Expose-LootTable-of-DecoratedPot.patch b/patches/server/0944-Expose-LootTable-of-DecoratedPot.patch
index 6b5fd029f3..afa86977a9 100644
--- a/patches/server/0944-Expose-LootTable-of-DecoratedPot.patch
+++ b/patches/server/0944-Expose-LootTable-of-DecoratedPot.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Expose LootTable of DecoratedPot
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftDecoratedPot.java b/src/main/java/org/bukkit/craftbukkit/block/CraftDecoratedPot.java
-index 6e0258d4d6a07e0f471640a9edda0adf7ef6cd9e..6015565aeedc1b2cdddcdb488f8de71bc84b61f2 100644
+index 6e0258d4d6a07e0f471640a9edda0adf7ef6cd9e..47cc3ec5ccd3bb51a08b3f179cb29030948b8c11 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftDecoratedPot.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftDecoratedPot.java
-@@ -43,6 +43,39 @@ public class CraftDecoratedPot extends CraftBlockEntityState<DecoratedPotBlockEn
+@@ -43,6 +43,33 @@ public class CraftDecoratedPot extends CraftBlockEntityState<DecoratedPotBlockEn
return new CraftInventoryDecoratedPot(this.getTileEntity());
}
@@ -20,18 +20,12 @@ index 6e0258d4d6a07e0f471640a9edda0adf7ef6cd9e..6015565aeedc1b2cdddcdb488f8de71b
+
+ @Override
+ public void setLootTable(org.bukkit.loot.LootTable table, long seed) {
-+ net.minecraft.resources.ResourceKey<net.minecraft.world.level.storage.loot.LootTable> key = (table == null) ? null : net.minecraft.resources.ResourceKey.create(net.minecraft.core.registries.Registries.LOOT_TABLE, org.bukkit.craftbukkit.util.CraftNamespacedKey.toMinecraft(table.getKey()));
-+ this.getSnapshot().setLootTable(key, seed);
++ this.getSnapshot().setLootTable(org.bukkit.craftbukkit.CraftLootTable.bukkitToMinecraft(table), seed);
+ }
+
+ @Override
+ public org.bukkit.loot.LootTable getLootTable() {
-+ if (this.getSnapshot().getLootTable() == null) {
-+ return null;
-+ }
-+
-+ net.minecraft.resources.ResourceKey<net.minecraft.world.level.storage.loot.LootTable> key = this.getSnapshot().getLootTable();
-+ return org.bukkit.Bukkit.getLootTable(org.bukkit.craftbukkit.util.CraftNamespacedKey.fromMinecraft(key.location()));
++ return org.bukkit.craftbukkit.CraftLootTable.minecraftToBukkit(this.getSnapshot().getLootTable());
+ }
+
+ @Override