--- a/net/minecraft/world/level/storage/loot/functions/SetContainerContents.java
+++ b/net/minecraft/world/level/storage/loot/functions/SetContainerContents.java
@@ -46,7 +46,7 @@
             NonNullList<ItemStack> nonNullList = NonNullList.create();
             this.entries.forEach((entry) -> {
                 entry.expand(context, (choice) -> {
-                    choice.createItemStack(LootTable.createStackSplitter(nonNullList::add), context);
+                    choice.createItemStack(LootTable.createStackSplitter(nonNullList::add, context.getLevel()), context); // Paper - preserve overstacked items
                 });
             });
             CompoundTag compoundTag = new CompoundTag();
