diff --git a/paper-server/patches/sources/net/minecraft/server/level/ChunkMap.java.patch b/paper-server/patches/sources/net/minecraft/server/level/ChunkMap.java.patch index 9dd0a5c14..fd8783a42 100644 --- a/paper-server/patches/sources/net/minecraft/server/level/ChunkMap.java.patch +++ b/paper-server/patches/sources/net/minecraft/server/level/ChunkMap.java.patch @@ -67,19 +67,20 @@ this.mainThreadExecutor = mainThreadExecutor; ConsecutiveExecutor consecutiveexecutor = new ConsecutiveExecutor(executor, "worldgen"); -@@ -198,6 +235,12 @@ - this.chunksToEagerlySave.add(pos.toLong()); - } +@@ -196,7 +233,13 @@ + private void setChunkUnsaved(ChunkPos pos) { + this.chunksToEagerlySave.add(pos.toLong()); ++ } ++ + // Paper start + public int getMobCountNear(final ServerPlayer player, final net.minecraft.world.entity.MobCategory mobCategory) { + return -1; -+ } + } + // Paper end -+ + protected ChunkGenerator generator() { return this.worldGenContext.generator(); - } @@ -325,7 +368,7 @@ throw this.debugFuturesAndCreateReportedException(new IllegalStateException("At least one of the chunk futures were null"), "n/a"); } @@ -357,8 +358,12 @@ protected ChunkDistanceManager(final Executor workerExecutor, final Executor mainThreadExecutor) { super(workerExecutor, mainThreadExecutor); -@@ -1424,7 +1511,7 @@ - public final Set seenBy = Sets.newIdentityHashSet(); +@@ -1421,10 +1508,10 @@ + final Entity entity; + private final int range; + SectionPos lastSectionPos; +- public final Set seenBy = Sets.newIdentityHashSet(); ++ public final Set seenBy = new it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet<>(); // Paper - Perf: optimise map impl public TrackedEntity(final Entity entity, final int i, final int j, final boolean flag) { - this.serverEntity = new ServerEntity(ChunkMap.this.level, entity, j, flag, this::broadcast);