Do not add passengers of entities that were above save limit (#5073)

Co-authored-by: Spottedleaf <spottedleaf@spottedleaf.dev>
This commit is contained in:
Jason Penilla 2021-01-16 16:05:33 -08:00
parent bdf29bd952
commit 6a84ae3d30

View File

@ -80,7 +80,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ final int saveLimit = world.paperConfig.entityPerChunkSaveLimits.getOrDefault(entityType, -1);
+ if (saveLimit > -1) {
+ if (loadedEntityCounts.getOrDefault(entityType, 0) >= saveLimit) {
+ return entity;
+ return null;
+ }
+ loadedEntityCounts.merge(entityType, 1, Integer::sum);
+ }