2024-01-23 21:57:17 +01:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: FireInstall <kettnerl@hu-berlin.de>
|
|
|
|
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
|
2024-05-26 21:51:15 +02:00
|
|
|
index 6e0258d4d6a07e0f471640a9edda0adf7ef6cd9e..47cc3ec5ccd3bb51a08b3f179cb29030948b8c11 100644
|
2024-01-23 21:57:17 +01:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftDecoratedPot.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftDecoratedPot.java
|
2024-05-26 21:51:15 +02:00
|
|
|
@@ -43,6 +43,33 @@ public class CraftDecoratedPot extends CraftBlockEntityState<DecoratedPotBlockEn
|
2024-01-23 21:57:17 +01:00
|
|
|
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) {
|
2024-05-26 21:51:15 +02:00
|
|
|
+ this.getSnapshot().setLootTable(org.bukkit.craftbukkit.CraftLootTable.bukkitToMinecraft(table), seed);
|
2024-01-23 21:57:17 +01:00
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public org.bukkit.loot.LootTable getLootTable() {
|
2024-05-26 21:51:15 +02:00
|
|
|
+ return org.bukkit.craftbukkit.CraftLootTable.minecraftToBukkit(this.getSnapshot().getLootTable());
|
2024-01-23 21:57:17 +01:00
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @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");
|