13
0
geforkt von Mirrors/Paper

Allow ProtoChunks to be loaded

Reverts 6666adc92c
Fixes GH-1348
Dieser Commit ist enthalten in:
Zach Brown 2018-08-23 15:40:00 -04:00
Ursprung ac5ba5bcc8
Commit a420df2fd4
2 geänderte Dateien mit 8 neuen und 16 gelöschten Zeilen

Datei anzeigen

@ -1,4 +1,4 @@
From 4febb90a55cb21eafa7a61834b43993a6abd5362 Mon Sep 17 00:00:00 2001 From 2b358efe73c8290c49ba53ace56360cea3ea7c11 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
@ -20,7 +20,7 @@ index ea8684747..a97e024ec 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 5d9118daa..ca1516f2a 100644 index 5d9118daa..7629e0d05 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,14 +32,6 @@ index 5d9118daa..ca1516f2a 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.17.1

Datei anzeigen

@ -1,11 +1,11 @@
From 08a7dc49c5a6a7b0742f31d1aaa6a29c1d892924 Mon Sep 17 00:00:00 2001 From 45ee83d420ff59370323cd99ace9e65a1579884b 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 ca1516f2a..94ba21f92 100644 index 7629e0d05..5ee8bedf3 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 ca1516f2a..94ba21f92 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;
@@ -86,7 +88,13 @@ public class ChunkTaskScheduler extends Scheduler<ChunkCoordIntPair, ChunkStatus @@ -85,7 +87,13 @@ public class ChunkTaskScheduler extends Scheduler<ChunkCoordIntPair, ChunkStatus
} }
public void a() { public void a() {
@ -34,7 +34,7 @@ index ca1516f2a..94ba21f92 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) {
@@ -94,6 +102,7 @@ public class ChunkTaskScheduler extends Scheduler<ChunkCoordIntPair, ChunkStatus @@ -93,6 +101,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);
@ -43,5 +43,5 @@ index ca1516f2a..94ba21f92 100644
ChunkTaskScheduler.b.error("Couldn\'t save chunk", ioexception); ChunkTaskScheduler.b.error("Couldn\'t save chunk", ioexception);
} catch (ExceptionWorldConflict exceptionworldconflict) { } catch (ExceptionWorldConflict exceptionworldconflict) {
-- --
2.18.0 2.17.1