--- a/net/minecraft/world/entity/vehicle/ChestBoat.java
+++ b/net/minecraft/world/entity/vehicle/ChestBoat.java
@@ -4,6 +4,7 @@
 import net.minecraft.core.NonNullList;
 import net.minecraft.nbt.CompoundTag;
 import net.minecraft.resources.ResourceLocation;
+import net.minecraft.world.Container;
 import net.minecraft.world.Containers;
 import net.minecraft.world.InteractionHand;
 import net.minecraft.world.InteractionResult;
@@ -22,24 +23,33 @@
 import net.minecraft.world.item.Items;
 import net.minecraft.world.level.Level;
 import net.minecraft.world.level.gameevent.GameEvent;
+// CraftBukkit start
+import java.util.List;
+import org.bukkit.Location;
+import org.bukkit.craftbukkit.v1_19_R1.entity.CraftHumanEntity;
+import org.bukkit.entity.HumanEntity;
+import org.bukkit.inventory.InventoryHolder;
+// CraftBukkit end
 
 public class ChestBoat extends Boat implements HasCustomInventoryScreen, ContainerEntity {
+
     private static final int CONTAINER_SIZE = 27;
-    private NonNullList<ItemStack> itemStacks = NonNullList.withSize(27, ItemStack.EMPTY);
+    private NonNullList<ItemStack> itemStacks;
     @Nullable
     private ResourceLocation lootTable;
     private long lootTableSeed;
 
     public ChestBoat(EntityType<? extends Boat> type, Level world) {
         super(type, world);
+        this.itemStacks = NonNullList.withSize(27, ItemStack.EMPTY);
     }
 
-    public ChestBoat(Level world, double d, double e, double f) {
+    public ChestBoat(Level world, double d0, double d1, double d2) {
         this(EntityType.CHEST_BOAT, world);
-        this.setPos(d, e, f);
-        this.xo = d;
-        this.yo = e;
-        this.zo = f;
+        this.setPos(d0, d1, d2);
+        this.xo = d0;
+        this.yo = d1;
+        this.zo = d2;
     }
 
     @Override
@@ -55,12 +65,14 @@
     @Override
     protected void addAdditionalSaveData(CompoundTag nbt) {
         super.addAdditionalSaveData(nbt);
+        this.lootableData.loadNbt(nbt); // Paper
         this.addChestVehicleSaveData(nbt);
     }
 
     @Override
     protected void readAdditionalSaveData(CompoundTag nbt) {
         super.readAdditionalSaveData(nbt);
+        this.lootableData.loadNbt(nbt); // Paper
         this.readChestVehicleSaveData(nbt);
     }
 
@@ -73,7 +85,7 @@
     @Override
     public void remove(Entity.RemovalReason reason) {
         if (!this.level.isClientSide && reason.shouldDestroy()) {
-            Containers.dropContents(this.level, this, this);
+            Containers.dropContents(this.level, (Entity) this, (Container) this);
         }
 
         super.remove(reason);
@@ -96,31 +108,32 @@
 
     @Override
     public Item getDropItem() {
-        Item var10000;
+        Item item;
+
         switch (this.getBoatType()) {
             case SPRUCE:
-                var10000 = Items.SPRUCE_CHEST_BOAT;
+                item = Items.SPRUCE_CHEST_BOAT;
                 break;
             case BIRCH:
-                var10000 = Items.BIRCH_CHEST_BOAT;
+                item = Items.BIRCH_CHEST_BOAT;
                 break;
             case JUNGLE:
-                var10000 = Items.JUNGLE_CHEST_BOAT;
+                item = Items.JUNGLE_CHEST_BOAT;
                 break;
             case ACACIA:
-                var10000 = Items.ACACIA_CHEST_BOAT;
+                item = Items.ACACIA_CHEST_BOAT;
                 break;
             case DARK_OAK:
-                var10000 = Items.DARK_OAK_CHEST_BOAT;
+                item = Items.DARK_OAK_CHEST_BOAT;
                 break;
             case MANGROVE:
-                var10000 = Items.MANGROVE_CHEST_BOAT;
+                item = Items.MANGROVE_CHEST_BOAT;
                 break;
             default:
-                var10000 = Items.OAK_CHEST_BOAT;
+                item = Items.OAK_CHEST_BOAT;
         }
 
-        return var10000;
+        return item;
     }
 
     @Override
@@ -159,8 +172,7 @@
     }
 
     @Override
-    public void setChanged() {
-    }
+    public void setChanged() {}
 
     @Override
     public boolean stillValid(Player player) {
@@ -212,4 +224,65 @@
     public void clearItemStacks() {
         this.itemStacks = NonNullList.withSize(this.getContainerSize(), ItemStack.EMPTY);
     }
+
+    // Paper start
+    {
+        this.lootableData = new com.destroystokyo.paper.loottable.PaperLootableInventoryData(new com.destroystokyo.paper.loottable.PaperContainerEntityLootableInventory(this));
+    }
+    @Override
+    public Entity getEntity() {
+        return this;
+    }
+
+    @Override
+    public com.destroystokyo.paper.loottable.PaperLootableInventoryData getLootableData() {
+        return this.lootableData;
+    }
+    // Paper end
+    // CraftBukkit start
+    public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
+    private int maxStack = MAX_STACK;
+
+    @Override
+    public List<ItemStack> getContents() {
+        return this.itemStacks;
+    }
+
+    @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 InventoryHolder getOwner() {
+        org.bukkit.entity.Entity entity = getBukkitEntity();
+        if (entity instanceof InventoryHolder) return (InventoryHolder) entity;
+        return null;
+    }
+
+    @Override
+    public int getMaxStackSize() {
+        return this.maxStack;
+    }
+
+    @Override
+    public void setMaxStackSize(int size) {
+        this.maxStack = size;
+    }
+
+    @Override
+    public Location getLocation() {
+        return getBukkitEntity().getLocation();
+    }
+    // CraftBukkit end
 }
