Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
don't try to load protochunks, we don't save them
no reason to try to load them when we don't save them!
Dieser Commit ist enthalten in:
Ursprung
f835a91d15
Commit
6666adc92c
@ -1,4 +1,4 @@
|
|||||||
From 4056bf53bae443cb843da8ad7b8a0dc7927b4a3d Mon Sep 17 00:00:00 2001
|
From e898f5e48550519d801479423c19d692e2c64fea Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sun, 22 Jul 2018 21:21:41 -0400
|
Date: Sun, 22 Jul 2018 21:21:41 -0400
|
||||||
Subject: [PATCH] Don't save Proto Chunks
|
Subject: [PATCH] Don't save Proto Chunks
|
||||||
@ -8,7 +8,7 @@ the loadChunk method refuses to acknoledge they exists, and will restart
|
|||||||
a new chunk generation process to begin with, so saving them serves no benefit.
|
a new chunk generation process to begin with, so saving them serves no benefit.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||||
index ea8684747d..a97e024ec4 100644
|
index ea868474..a97e024e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||||
@@ -282,6 +282,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
@@ -282,6 +282,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||||
@ -20,7 +20,7 @@ index ea8684747d..a97e024ec4 100644
|
|||||||
world.checkSession();
|
world.checkSession();
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
||||||
index 5d9118daa8..7629e0d054 100644
|
index 5d9118da..ca1516f2 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
--- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
+++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
||||||
@@ -23,7 +23,7 @@ public class ChunkTaskScheduler extends Scheduler<ChunkCoordIntPair, ChunkStatus
|
@@ -23,7 +23,7 @@ public class ChunkTaskScheduler extends Scheduler<ChunkCoordIntPair, ChunkStatus
|
||||||
@ -32,6 +32,14 @@ index 5d9118daa8..7629e0d054 100644
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -64,6 +64,7 @@ public class ChunkTaskScheduler extends Scheduler<ChunkCoordIntPair, ChunkStatus
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
private ProtoChunk a(int i, int j) {
|
||||||
|
+ if (true) return null; // Paper - we don't save proto chunks
|
||||||
|
try {
|
||||||
|
return this.e.b(this.c, i, j, (ichunkaccess) -> {
|
||||||
|
});
|
||||||
--
|
--
|
||||||
2.18.0
|
2.18.0
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
From 58232527da5cfef622e6c0dbbd9df9ca88c7f412 Mon Sep 17 00:00:00 2001
|
From 2bf2afcdc2d11ab205a42710969e4b1ddec97137 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Mon, 23 Jul 2018 19:13:06 -0400
|
Date: Mon, 23 Jul 2018 19:13:06 -0400
|
||||||
Subject: [PATCH] Thread Safe Iteration of Chunk Scheduler
|
Subject: [PATCH] Thread Safe Iteration of Chunk Scheduler
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
||||||
index 7629e0d054..5ee8bedf34 100644
|
index ca1516f2..94ba21f9 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
--- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
+++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
||||||
@@ -1,8 +1,10 @@
|
@@ -1,8 +1,10 @@
|
||||||
@ -19,7 +19,7 @@ index 7629e0d054..5ee8bedf34 100644
|
|||||||
import java.util.EnumMap;
|
import java.util.EnumMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
@@ -85,7 +87,13 @@ public class ChunkTaskScheduler extends Scheduler<ChunkCoordIntPair, ChunkStatus
|
@@ -86,7 +88,13 @@ public class ChunkTaskScheduler extends Scheduler<ChunkCoordIntPair, ChunkStatus
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a() {
|
public void a() {
|
||||||
@ -34,7 +34,7 @@ index 7629e0d054..5ee8bedf34 100644
|
|||||||
ProtoChunk protochunk = (ProtoChunk) scheduler_a.a();
|
ProtoChunk protochunk = (ProtoChunk) scheduler_a.a();
|
||||||
|
|
||||||
if (protochunk.h() && protochunk.i().d() == ChunkStatus.Type.PROTOCHUNK) {
|
if (protochunk.h() && protochunk.i().d() == ChunkStatus.Type.PROTOCHUNK) {
|
||||||
@@ -93,6 +101,7 @@ public class ChunkTaskScheduler extends Scheduler<ChunkCoordIntPair, ChunkStatus
|
@@ -94,6 +102,7 @@ public class ChunkTaskScheduler extends Scheduler<ChunkCoordIntPair, ChunkStatus
|
||||||
protochunk.setLastSaved(this.c.getTime());
|
protochunk.setLastSaved(this.c.getTime());
|
||||||
this.e.saveChunk(this.c, protochunk);
|
this.e.saveChunk(this.c, protochunk);
|
||||||
protochunk.a(false);
|
protochunk.a(false);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren