mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-04 22:22:18 -07:00
Revert "Remove "Implement-Chunk-Priority-Urgency-System-for-Chunks" (Fixes #5980)"
This reverts commit 701cceb170
.
This commit is contained in:
@@ -1,36 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Sat, 14 Aug 2021 14:49:45 +0100
|
||||
Subject: [PATCH] ChunkMap.mainInvokingExecutor
|
||||
|
||||
This is a temp patch, this should maybe be moved to a more generic map or potentially wrapped into mcutil for the sake of this being such a generic concept
|
||||
anyways
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
public final ServerLevel level;
|
||||
private final ThreadedLevelLightEngine lightEngine;
|
||||
private final BlockableEventLoop<Runnable> mainThreadExecutor;
|
||||
+ final java.util.concurrent.Executor mainInvokingExecutor; // Paper // Paper - Move to MCUtil?
|
||||
public final ChunkGenerator generator;
|
||||
public final Supplier<DimensionDataStorage> overworldDataStorage;
|
||||
private final PoiManager poiManager;
|
||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
this.level = world;
|
||||
this.generator = chunkGenerator;
|
||||
this.mainThreadExecutor = mainThreadExecutor;
|
||||
+ // Paper start
|
||||
+ this.mainInvokingExecutor = (run) -> {
|
||||
+ if (MCUtil.isMainThread()) {
|
||||
+ run.run();
|
||||
+ } else {
|
||||
+ mainThreadExecutor.execute(run);
|
||||
+ }
|
||||
+ };
|
||||
+ // Paper end
|
||||
ProcessorMailbox<Runnable> threadedmailbox = ProcessorMailbox.create(executor, "worldgen");
|
||||
|
||||
Objects.requireNonNull(mainThreadExecutor);
|
Reference in New Issue
Block a user