diff options
author | Spottedleaf <[email protected]> | 2024-08-18 11:14:39 -0700 |
---|---|---|
committer | Spottedleaf <[email protected]> | 2024-08-18 11:14:39 -0700 |
commit | b4bc512cac4d75f9e366479c5d8fdcf4275c85ce (patch) | |
tree | f8a1944f8fe1afb0f41f551cc706417cc7f3f177 | |
parent | 64c9ee6584ce15e5b486bdc7183fe902e22fddf3 (diff) | |
download | Paper-b4bc512cac4d75f9e366479c5d8fdcf4275c85ce.tar.gz Paper-b4bc512cac4d75f9e366479c5d8fdcf4275c85ce.zip |
Fix entity limit patch deleting unnecessary entities
We need to continue the save loop, not break from it
when a limit is reached.
-rw-r--r-- | patches/server/1006-Entity-load-save-limit-per-chunk.patch | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/patches/server/1006-Entity-load-save-limit-per-chunk.patch b/patches/server/1006-Entity-load-save-limit-per-chunk.patch index 380beda077..9a5959e34f 100644 --- a/patches/server/1006-Entity-load-save-limit-per-chunk.patch +++ b/patches/server/1006-Entity-load-save-limit-per-chunk.patch @@ -9,7 +9,7 @@ defaults are only included for certain entites, this allows setting limits for any entity type. diff --git a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java -index 997b05167c19472acb98edac32d4548cc65efa8e..87d2b3ec165e2e9e4bdbedd7adddaa2130ed507b 100644 +index 997b05167c19472acb98edac32d4548cc65efa8e..5c7f2471a0b15ac2e714527296ad2aa7291999eb 100644 --- a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java +++ b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java @@ -100,7 +100,18 @@ public final class ChunkEntitySlices { @@ -23,7 +23,7 @@ index 997b05167c19472acb98edac32d4548cc65efa8e..87d2b3ec165e2e9e4bdbedd7adddaa21 + final int saveLimit = world.paperConfig().chunks.entityPerChunkSaveLimit.getOrDefault(entityType, -1); + if (saveLimit > -1) { + if (savedEntityCounts.getOrDefault(entityType, 0) >= saveLimit) { -+ break; ++ continue; + } + savedEntityCounts.merge(entityType, 1, Integer::sum); + } |