mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-16 06:30:46 +01:00
even even even even even more patches
This commit is contained in:
parent
9019aab535
commit
28459aeafe
7 changed files with 9 additions and 7 deletions
|
@ -17,7 +17,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
+ protected long updateCount; // Paper - correctly handle recursion
|
||||
protected void updateFutures(ChunkMap chunkStorage, Executor executor) {
|
||||
io.papermc.paper.util.TickThread.ensureTickThread("Async ticket level update"); // Paper
|
||||
+ long updateCount = ++this.updateCount; // Paper - correctly handle recursion
|
||||
ChunkStatus chunkstatus = ChunkHolder.getStatus(this.oldTicketLevel);
|
||||
ChunkStatus chunkstatus1 = ChunkHolder.getStatus(this.ticketLevel);
|
||||
|
@ -34,4 +33,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ // Paper end - correctly handle recursion
|
||||
}
|
||||
// CraftBukkit end
|
||||
CompletableFuture completablefuture;
|
||||
|
|
@ -17,7 +17,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
+ boolean unloadingPlayerChunk = false; // Paper - do not allow ticket level changes while unloading chunks
|
||||
public ChunkMap(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureManager structureManager, Executor executor, BlockableEventLoop<Runnable> mainThreadExecutor, LightChunkGetter chunkProvider, ChunkGenerator chunkGenerator, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier<DimensionDataStorage> persistentStateManagerFactory, int viewDistance, boolean dsync) {
|
||||
super(new File(session.getDimensionPath(world.dimension()), "region"), dataFixer, dsync);
|
||||
super(session.getDimensionPath(world.dimension()).resolve("region"), dataFixer, dsync);
|
||||
this.visibleChunkMap = this.updatingChunkMap.clone();
|
||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
|
||||
|
@ -53,9 +53,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -0,0 +0,0 @@ public class ServerChunkCache extends ChunkSource {
|
||||
}
|
||||
|
||||
public boolean runDistanceManagerUpdates() {
|
||||
if (distanceManager.delayDistanceManagerTick) return false; // Paper - Chunk priority
|
||||
+ if (this.chunkMap.unloadingPlayerChunk) { net.minecraft.server.MinecraftServer.LOGGER.fatal("Cannot tick distance manager while unloading playerchunks", new Throwable()); throw new IllegalStateException("Cannot tick distance manager while unloading playerchunks"); } // Paper
|
||||
boolean flag = this.distanceManager.runAllUpdates(this.chunkMap);
|
||||
boolean flag1 = this.chunkMap.promoteChunkMap();
|
|
@ -49,7 +49,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ // Paper end - special close for unloaded inventory
|
||||
|
||||
public void doCloseContainer() {
|
||||
this.containerMenu.removed((Player) this);
|
||||
this.containerMenu.removed(this);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
|
@ -14,7 +14,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- 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
|
||||
chunk.unpackTicks();
|
||||
|
||||
return chunk;
|
||||
});
|
||||
- }, (runnable) -> {
|
|
@ -26,7 +26,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ // Paper start - revert CB changes
|
||||
+ org.spigotmc.AsyncCatcher.catchOp("Callback Executor execute");
|
||||
+ if (this.queued != null) {
|
||||
+ MinecraftServer.LOGGER.fatal("Failed to schedule runnable", new IllegalStateException("Already queued"));
|
||||
+ net.minecraft.server.MinecraftServer.LOGGER.fatal("Failed to schedule runnable", new IllegalStateException("Already queued"));
|
||||
+ throw new IllegalStateException("Already queued");
|
||||
+ }
|
||||
+ this.queued = runnable;
|
||||
|
|
3
todo.txt
3
todo.txt
|
@ -23,3 +23,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
initial = blockState.getCollisionShape(world, mutableBlockPos, context).collide(axis3, box.move((double)(-mutableBlockPos.getX()), (double)(-mutableBlockPos.getY()), (double)(-mutableBlockPos.getZ())), initial);
|
||||
if (Math.abs(initial) < 1.0E-7D) {
|
||||
|
||||
|
||||
|
||||
check ChunkHolder#updateFutures async catcher
|
||||
|
|
Loading…
Reference in a new issue