--- a/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java
+++ b/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java
@@ -11,6 +11,7 @@
 import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket;
 import net.minecraft.resources.ResourceKey;
 import net.minecraft.world.RandomizableContainer;
+import net.minecraft.world.entity.player.Player;
 import net.minecraft.world.item.ItemStack;
 import net.minecraft.world.item.Items;
 import net.minecraft.world.item.component.ItemContainerContents;
@@ -19,7 +20,59 @@
 import net.minecraft.world.level.storage.loot.LootTable;
 import net.minecraft.world.ticks.ContainerSingleItem;
 
+// CraftBukkit start
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.bukkit.Location;
+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
+import org.bukkit.craftbukkit.util.CraftLocation;
+import org.bukkit.entity.HumanEntity;
+// CraftBukkit end
+
 public class DecoratedPotBlockEntity extends BlockEntity implements RandomizableContainer, ContainerSingleItem.BlockContainerSingleItem {
+
+    // CraftBukkit start - add fields and methods
+    public List<HumanEntity> transaction = new ArrayList<>();
+    private int maxStack = MAX_STACK;
+
+    @Override
+    public List<ItemStack> getContents() {
+        return Arrays.asList(this.item);
+    }
+
+    @Override
+    public void onOpen(CraftHumanEntity who) {
+        this.transaction.add(who);
+    }
+
+    @Override
+    public void onClose(CraftHumanEntity who) {
+        this.transaction.remove(who);
+    }
+
+    @Override
+    public List<HumanEntity> getViewers() {
+        return this.transaction;
+    }
+
+    @Override
+    public int getMaxStackSize() {
+       return this.maxStack;
+    }
+
+    @Override
+    public void setMaxStackSize(int i) {
+        this.maxStack = i;
+    }
+
+    @Override
+    public Location getLocation() {
+        if (this.level == null) return null;
+        return CraftLocation.toBukkit(this.worldPosition, this.level.getWorld());
+    }
+    // CraftBukkit end
+
     public static final String TAG_SHERDS = "sherds";
     public static final String TAG_ITEM = "item";
     public static final int EVENT_POT_WOBBLES = 1;
@@ -27,13 +80,14 @@
     @Nullable
     public DecoratedPotBlockEntity.WobbleStyle lastWobbleStyle;
     public PotDecorations decorations;
-    private ItemStack item = ItemStack.EMPTY;
+    private ItemStack item;
     @Nullable
     protected ResourceKey<LootTable> lootTable;
     protected long lootTableSeed;
 
     public DecoratedPotBlockEntity(BlockPos pos, BlockState state) {
         super(BlockEntityType.DECORATED_POT, pos, state);
+        this.item = ItemStack.EMPTY;
         this.decorations = PotDecorations.EMPTY;
     }
 
@@ -44,6 +98,7 @@
         if (!this.trySaveLootTable(nbt) && !this.item.isEmpty()) {
             nbt.put("item", this.item.save(registryLookup));
         }
+
     }
 
     @Override
@@ -52,11 +107,12 @@
         this.decorations = PotDecorations.load(nbt);
         if (!this.tryLoadLootTable(nbt)) {
             if (nbt.contains("item", 10)) {
-                this.item = ItemStack.parse(registryLookup, nbt.getCompound("item")).orElse(ItemStack.EMPTY);
+                this.item = (ItemStack) ItemStack.parse(registryLookup, nbt.getCompound("item")).orElse(ItemStack.EMPTY);
             } else {
                 this.item = ItemStack.EMPTY;
             }
         }
+
     }
 
     @Override
@@ -70,7 +126,7 @@
     }
 
     public Direction getDirection() {
-        return this.getBlockState().getValue(BlockStateProperties.HORIZONTAL_FACING);
+        return (Direction) this.getBlockState().getValue(BlockStateProperties.HORIZONTAL_FACING);
     }
 
     public PotDecorations getDecorations() {
@@ -82,15 +138,17 @@
     }
 
     public ItemStack getPotAsItem() {
-        ItemStack itemStack = Items.DECORATED_POT.getDefaultInstance();
-        itemStack.applyComponents(this.collectComponents());
-        return itemStack;
+        ItemStack itemstack = Items.DECORATED_POT.getDefaultInstance();
+
+        itemstack.applyComponents(this.collectComponents());
+        return itemstack;
     }
 
     public static ItemStack createDecoratedPotItem(PotDecorations sherds) {
-        ItemStack itemStack = Items.DECORATED_POT.getDefaultInstance();
-        itemStack.set(DataComponents.POT_DECORATIONS, sherds);
-        return itemStack;
+        ItemStack itemstack = Items.DECORATED_POT.getDefaultInstance();
+
+        itemstack.set(DataComponents.POT_DECORATIONS, sherds);
+        return itemstack;
     }
 
     @Nullable
@@ -124,8 +182,8 @@
     @Override
     protected void applyImplicitComponents(BlockEntity.DataComponentInput components) {
         super.applyImplicitComponents(components);
-        this.decorations = components.getOrDefault(DataComponents.POT_DECORATIONS, PotDecorations.EMPTY);
-        this.item = components.getOrDefault(DataComponents.CONTAINER, ItemContainerContents.EMPTY).copyOne();
+        this.decorations = (PotDecorations) components.getOrDefault(DataComponents.POT_DECORATIONS, PotDecorations.EMPTY);
+        this.item = ((ItemContainerContents) components.getOrDefault(DataComponents.CONTAINER, ItemContainerContents.EMPTY)).copyOne();
     }
 
     @Override
@@ -137,24 +195,25 @@
 
     @Override
     public ItemStack getTheItem() {
-        this.unpackLootTable(null);
+        this.unpackLootTable((Player) null);
         return this.item;
     }
 
     @Override
     public ItemStack splitTheItem(int count) {
-        this.unpackLootTable(null);
-        ItemStack itemStack = this.item.split(count);
+        this.unpackLootTable((Player) null);
+        ItemStack itemstack = this.item.split(count);
+
         if (this.item.isEmpty()) {
             this.item = ItemStack.EMPTY;
         }
 
-        return itemStack;
+        return itemstack;
     }
 
     @Override
     public void setTheItem(ItemStack stack) {
-        this.unpackLootTable(null);
+        this.unpackLootTable((Player) null);
         this.item = stack;
     }
 
@@ -181,13 +240,13 @@
     }
 
     public static enum WobbleStyle {
-        POSITIVE(7),
-        NEGATIVE(10);
+
+        POSITIVE(7), NEGATIVE(10);
 
         public final int duration;
 
-        private WobbleStyle(final int lengthInTicks) {
-            this.duration = lengthInTicks;
+        private WobbleStyle(final int i) {
+            this.duration = i;
         }
     }
 }
