Even more patches for 1.14

This commit is contained in:
Shane Freeder
2019-04-30 02:20:24 +01:00
parent cab9529fe8
commit 86e7cee50c
35 changed files with 504 additions and 847 deletions

View File

@@ -7,37 +7,16 @@ These chunks are unfinished, and waste cpu time saving these unfinished chunks.
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.
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 0fc4d9f520..2c4a4fc6b7 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 3fab45aa9..26fd5dd1e 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
public void saveChunk(World world, IChunkAccess ichunkaccess, boolean unloaded) throws IOException, ExceptionWorldConflict {
+ if (ichunkaccess.i().d() == ChunkStatus.Type.PROTOCHUNK) { return; } // Paper - don't save proto chunks
// Spigot end
world.checkSession();
diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
index 70a95c2636..56958a5ce3 100644
--- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
+++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
@@ -0,0 +0,0 @@ public class ChunkTaskScheduler extends Scheduler<ChunkCoordIntPair, ChunkStatus
protected boolean a(Scheduler<ChunkCoordIntPair, ChunkStatus, ProtoChunk>.a scheduler_a) {
ProtoChunk protochunk = (ProtoChunk) scheduler_a.a();
- return !protochunk.ab_() && !protochunk.h();
+ return !protochunk.ab_() /*&& !protochunk.h()*/; // Paper
}
};
@@ -0,0 +0,0 @@ public class ChunkTaskScheduler extends Scheduler<ChunkCoordIntPair, ChunkStatus
}
public void a(BooleanSupplier booleansupplier) {
+ if (true) return; // Paper - we don't save proto chunks, and don't want to block thread
IChunkLoader ichunkloader = this.e;
synchronized (this.e) {
public void saveChunk(IChunkAccess ichunkaccess, boolean save) {
+ if (ichunkaccess.getChunkStatus().getType() == ChunkStatus.Type.PROTOCHUNK) { return; } // Paper - don't save proto chunks
// CraftBukkit end
this.n.a(ichunkaccess.getPos());
if (save) { // CraftBukkit
--