--- a/net/minecraft/world/level/block/entity/ChestBlockEntity.java
+++ b/net/minecraft/world/level/block/entity/ChestBlockEntity.java
@@ -27,7 +_,7 @@
 public class ChestBlockEntity extends RandomizableContainerBlockEntity implements LidBlockEntity {
     private static final int EVENT_SET_OPEN_COUNT = 1;
     private NonNullList<ItemStack> items = NonNullList.withSize(27, ItemStack.EMPTY);
-    private final ContainerOpenersCounter openersCounter = new ContainerOpenersCounter() {
+    public final ContainerOpenersCounter openersCounter = new ContainerOpenersCounter() {
         @Override
         protected void onOpen(Level level, BlockPos pos, BlockState state) {
             ChestBlockEntity.playSound(level, pos, state, SoundEvents.CHEST_OPEN);
@@ -56,6 +_,36 @@
     };
     private final ChestLidController chestLidController = new ChestLidController();
 
+    // CraftBukkit start - add fields and methods
+    public java.util.List<org.bukkit.entity.HumanEntity> transaction = new java.util.ArrayList<>();
+    private int maxStack = MAX_STACK;
+
+    public java.util.List<net.minecraft.world.item.ItemStack> getContents() {
+        return this.items;
+    }
+
+    public void onOpen(org.bukkit.craftbukkit.entity.CraftHumanEntity player) {
+        this.transaction.add(player);
+    }
+
+    public void onClose(org.bukkit.craftbukkit.entity.CraftHumanEntity player) {
+        this.transaction.remove(player);
+    }
+
+    public java.util.List<org.bukkit.entity.HumanEntity> getViewers() {
+        return this.transaction;
+    }
+
+    @Override
+    public int getMaxStackSize() {
+        return this.maxStack;
+    }
+
+    public void setMaxStackSize(int size) {
+        this.maxStack = size;
+    }
+    // CraftBukkit end
+
     protected ChestBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState blockState) {
         super(type, pos, blockState);
     }
@@ -71,7 +_,7 @@
 
     @Override
     protected Component getDefaultName() {
-        return Component.translatable("container.chest");
+        return Component.translatable("container.chest"); // Paper - diff on change - CraftStandardInventoryViewBuilder.defaultTitle
     }
 
     @Override
@@ -95,7 +_,7 @@
         blockEntity.chestLidController.tickLid();
     }
 
-    static void playSound(Level level, BlockPos pos, BlockState state, SoundEvent sound) {
+    public static void playSound(Level level, BlockPos pos, BlockState state, SoundEvent sound) {
         ChestType chestType = state.getValue(ChestBlock.TYPE);
         if (chestType != ChestType.LEFT) {
             double d = pos.getX() + 0.5;
