diff options
Diffstat (limited to 'patches/server/0929-Expose-LootTable-of-DecoratedPot.patch')
-rw-r--r-- | patches/server/0929-Expose-LootTable-of-DecoratedPot.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/patches/server/0929-Expose-LootTable-of-DecoratedPot.patch b/patches/server/0929-Expose-LootTable-of-DecoratedPot.patch new file mode 100644 index 0000000000..afa86977a9 --- /dev/null +++ b/patches/server/0929-Expose-LootTable-of-DecoratedPot.patch @@ -0,0 +1,44 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: FireInstall <[email protected]> +Date: Sat, 20 Jan 2024 16:20:06 +0100 +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..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,33 @@ public class CraftDecoratedPot extends CraftBlockEntityState<DecoratedPotBlockEn + return new CraftInventoryDecoratedPot(this.getTileEntity()); + } + ++ // Paper start - expose loot table ++ @Override ++ public void setLootTable(final org.bukkit.loot.LootTable table) { ++ this.setLootTable(table, this.getSeed()); ++ } ++ ++ @Override ++ public void setLootTable(org.bukkit.loot.LootTable table, long seed) { ++ this.getSnapshot().setLootTable(org.bukkit.craftbukkit.CraftLootTable.bukkitToMinecraft(table), seed); ++ } ++ ++ @Override ++ public org.bukkit.loot.LootTable getLootTable() { ++ return org.bukkit.craftbukkit.CraftLootTable.minecraftToBukkit(this.getSnapshot().getLootTable()); ++ } ++ ++ @Override ++ public void setSeed(final long seed) { ++ this.getSnapshot().setLootTableSeed(seed); ++ } ++ ++ @Override ++ public long getSeed() { ++ return this.getSnapshot().getLootTableSeed(); ++ } ++ // Paper end - expose loot table ++ + @Override + public void setSherd(Side face, Material sherd) { + Preconditions.checkArgument(face != null, "face must not be null"); |