--- a/net/minecraft/world/item/component/ItemContainerContents.java
+++ b/net/minecraft/world/item/component/ItemContainerContents.java
@@ -28,6 +_,7 @@
         .xmap(ItemContainerContents::fromSlots, ItemContainerContents::asSlots);
     public static final StreamCodec<RegistryFriendlyByteBuf, ItemContainerContents> STREAM_CODEC = ItemStack.OPTIONAL_STREAM_CODEC
         .apply(ByteBufCodecs.list(256))
+        .apply(ByteBufCodecs::increaseDepth) // Paper - Track codec depth
         .map(ItemContainerContents::new, contents -> contents.items);
     public final NonNullList<ItemStack> items;
     private final int hashCode;
