diff --git a/paper-server/patches/sources/net/minecraft/world/level/storage/loot/LootTable.java.patch b/paper-server/patches/sources/net/minecraft/world/level/storage/loot/LootTable.java.patch index ae76a3e0e5..29133b2303 100644 --- a/paper-server/patches/sources/net/minecraft/world/level/storage/loot/LootTable.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/level/storage/loot/LootTable.java.patch @@ -22,7 +22,19 @@ LootTable(ContextKeySet type, Optional randomSequenceId, List pools, List functions) { this.paramSet = type; -@@ -157,10 +165,23 @@ +@@ -64,9 +72,10 @@ + } + + public static Consumer createStackSplitter(ServerLevel world, Consumer consumer) { ++ boolean skipSplitter = world != null && !world.paperConfig().fixes.splitOverstackedLoot; // Paper - preserve overstacked items + return (itemstack) -> { + if (itemstack.isItemEnabled(world.enabledFeatures())) { +- if (itemstack.getCount() < itemstack.getMaxStackSize()) { ++ if (skipSplitter || itemstack.getCount() < itemstack.getMaxStackSize()) { // Paper - preserve overstacked items + consumer.accept(itemstack); + } else { + int i = itemstack.getCount(); +@@ -157,10 +166,23 @@ } public void fill(Container inventory, LootParams parameters, long seed) { @@ -48,7 +60,7 @@ this.shuffleAndSplitItems(objectarraylist, list.size(), randomsource); ObjectListIterator objectlistiterator = objectarraylist.iterator(); -@@ -174,9 +195,9 @@ +@@ -174,9 +196,9 @@ } if (itemstack.isEmpty()) { @@ -60,7 +72,7 @@ } } -@@ -238,8 +259,8 @@ +@@ -238,8 +260,8 @@ public static class Builder implements FunctionUserBuilder {