mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-20 06:43:49 -07:00
Reduce allocation rate for checkBlock
Use ObjectOpenHashSet instead of HashSet Remove unnecessary chunkToSave modification
This commit is contained in:
@@ -15713,17 +15713,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
this.theLightEngine.relightChunks(chunks, (ChunkPos chunkPos) -> {
|
||||
chunkLightCallback.accept(chunkPos);
|
||||
((java.util.concurrent.Executor)((ServerLevel)this.theLightEngine.getWorld()).getChunkSource().mainThreadProcessor).execute(() -> {
|
||||
@@ -0,0 +0,0 @@ public class ThreadedLevelLightEngine extends LevelLightEngine implements AutoCl
|
||||
for (int dz = -1; dz <= 1; ++dz) {
|
||||
ChunkHolder neighbour = world.getChunkSource().chunkMap.getUpdatingChunkIfPresent(CoordinateUtils.getChunkKey(dx + chunkX, dz + chunkZ));
|
||||
if (neighbour != null) {
|
||||
- neighbour.chunkToSave = neighbour.chunkToSave.thenCombine(updateFuture, (final ChunkAccess curr, final Void ignore) -> {
|
||||
- return curr;
|
||||
- });
|
||||
+ // Paper - rewrite chunk system - not needed, light ticket will keep these chunks loaded
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class ThreadedLevelLightEngine extends LevelLightEngine implements AutoCl
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user