--- a/net/minecraft/world/level/chunk/storage/EntityStorage.java
+++ b/net/minecraft/world/level/chunk/storage/EntityStorage.java
@@ -31,10 +_,10 @@
     private static final Logger LOGGER = LogUtils.getLogger();
     private static final String ENTITIES_TAG = "Entities";
     private static final String POSITION_TAG = "Position";
-    private final ServerLevel level;
+    public final ServerLevel level;
     private final SimpleRegionStorage simpleRegionStorage;
     private final LongSet emptyChunks = new LongOpenHashSet();
-    private final ConsecutiveExecutor entityDeserializerQueue;
+    public final ConsecutiveExecutor entityDeserializerQueue;
 
     public EntityStorage(SimpleRegionStorage simpleRegionStorage, ServerLevel level, Executor executor) {
         this.simpleRegionStorage = simpleRegionStorage;
@@ -95,7 +_,18 @@
         } else {
             try (ProblemReporter.ScopedCollector scopedCollector = new ProblemReporter.ScopedCollector(ChunkAccess.problemPath(pos), LOGGER)) {
                 ListTag listTag = new ListTag();
+                final java.util.Map<net.minecraft.world.entity.EntityType<?>, Integer> savedEntityCounts = new java.util.HashMap<>(); // Paper - Entity load/save limit per chunk
                 entities.getEntities().forEach(entity -> {
+                    // Paper start - Entity load/save limit per chunk
+                    final EntityType<?> entityType = entity.getType();
+                    final int saveLimit = this.level.paperConfig().chunks.entityPerChunkSaveLimit.getOrDefault(entityType, -1);
+                    if (saveLimit > -1) {
+                        if (savedEntityCounts.getOrDefault(entityType, 0) >= saveLimit) {
+                            return;
+                        }
+                        savedEntityCounts.merge(entityType, 1, Integer::sum);
+                    }
+                    // Paper end - Entity load/save limit per chunk
                     TagValueOutput tagValueOutput = TagValueOutput.createWithContext(scopedCollector.forChild(entity.problemPath()), entity.registryAccess());
                     if (entity.save(tagValueOutput)) {
                         CompoundTag compoundTag1 = tagValueOutput.buildResult();
