diff --git a/paper-server/nms-patches/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.patch b/paper-server/nms-patches/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.patch new file mode 100644 index 0000000000..29f01df753 --- /dev/null +++ b/paper-server/nms-patches/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.patch @@ -0,0 +1,61 @@ +--- a/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java ++++ b/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java +@@ -21,7 +21,58 @@ + import net.minecraft.world.level.block.state.properties.BlockProperties; + 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 TileEntity implements RandomizableContainer, ContainerSingleItem { ++ ++ // CraftBukkit start - add fields and methods ++ public List transaction = new ArrayList<>(); ++ private int maxStack = MAX_STACK; ++ ++ @Override ++ public List getContents() { ++ return Arrays.asList(this.item); ++ } ++ ++ @Override ++ public void onOpen(CraftHumanEntity who) { ++ transaction.add(who); ++ } ++ ++ @Override ++ public void onClose(CraftHumanEntity who) { ++ transaction.remove(who); ++ } ++ ++ @Override ++ public List getViewers() { ++ return transaction; ++ } ++ ++ @Override ++ public int getMaxStackSize() { ++ return maxStack; ++ } ++ ++ @Override ++ public void setMaxStackSize(int i) { ++ maxStack = i; ++ } ++ ++ @Override ++ public Location getLocation() { ++ if (level == null) return null; ++ return CraftLocation.toBukkit(worldPosition, level.getWorld()); ++ } ++ // CraftBukkit end + + public static final String TAG_SHERDS = "sherds"; + public static final String TAG_ITEM = "item";