13
0
geforkt von Mirrors/Paper

Fix some runtime issues

Dieser Commit ist enthalten in:
Spottedleaf 2019-05-06 13:45:02 -07:00
Ursprung b64ce880b7
Commit b372f891aa
8 geänderte Dateien mit 31 neuen und 10 gelöschten Zeilen

Datei anzeigen

@ -121,7 +121,7 @@ index 1dd793d2fb..61ea2818b1 100644
} }
// CraftBukkit end // CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 0a64432384..5ecf446e11 100644 index 4bbf9244f2..5dc8e62021 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/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 { @@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {

Datei anzeigen

@ -64,7 +64,7 @@ index b7c94fe238..80eea5dfbd 100644
public NBTTagList() {} public NBTTagList() {}
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
index e68f901943..995a893774 100644 index e68f901943..ed2ccebb23 100644
--- a/src/main/java/net/minecraft/server/RegionFile.java --- a/src/main/java/net/minecraft/server/RegionFile.java
+++ b/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java
@@ -0,0 +0,0 @@ public class RegionFile implements AutoCloseable { @@ -0,0 +0,0 @@ public class RegionFile implements AutoCloseable {
@ -77,6 +77,14 @@ index e68f901943..995a893774 100644
private static final byte[] a = new byte[4096]; private static final byte[] a = new byte[4096];
private final RandomAccessFile b; private RandomAccessFile getDataFile() { return this.b; } // Paper - OBFHELPER private final RandomAccessFile b; private RandomAccessFile getDataFile() { return this.b; } // Paper - OBFHELPER
@@ -0,0 +0,0 @@ public class RegionFile implements AutoCloseable { @@ -0,0 +0,0 @@ public class RegionFile implements AutoCloseable {
public RegionFile(File file) throws IOException {
this.b = new RandomAccessFile(file, "rw");
+ this.file = file; // Spigot // Paper - We need this earlier
if (this.b.length() < 8192L) { // Paper - headers should be 8192
this.b.write(RegionFile.a);
this.b.write(RegionFile.a);
@@ -0,0 +0,0 @@ public class RegionFile implements AutoCloseable {
} }
header.clear(); header.clear();
java.nio.IntBuffer headerAsInts = header.asIntBuffer(); java.nio.IntBuffer headerAsInts = header.asIntBuffer();
@ -94,6 +102,11 @@ index e68f901943..995a893774 100644
// Spigot end // Spigot end
this.e.set((k >> 8) + l, false); this.e.set((k >> 8) + l, false);
@@ -0,0 +0,0 @@ public class RegionFile implements AutoCloseable { @@ -0,0 +0,0 @@ public class RegionFile implements AutoCloseable {
if (offsets[j] != 0) this.timestamps[j] = k; // Paper - don't set timestamp if it got 0'd above due to corruption
}
- this.file = file; // Spigot
+ // Paper - we need this earlier
} }
@Nullable @Nullable

Datei anzeigen

@ -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/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 99beb30093..bfcd57aa5f 100644 index 34f97ce222..804824bfe2 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/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 { @@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {

Datei anzeigen

@ -37,7 +37,7 @@ affect save performance if the startup flag is used (especially on
HDDs). HDDs).
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
index 995a893774..66d87d64b5 100644 index ed2ccebb23..2e14d84657 100644
--- a/src/main/java/net/minecraft/server/RegionFile.java --- a/src/main/java/net/minecraft/server/RegionFile.java
+++ b/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java
@@ -0,0 +0,0 @@ public class RegionFile implements AutoCloseable { @@ -0,0 +0,0 @@ public class RegionFile implements AutoCloseable {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Make targetSize more aggressive in the chunk unload queue
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 5ecf446e11..26dafe0d29 100644 index 5dc8e62021..4be53f89bb 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/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 { @@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {

Datei anzeigen

@ -9,7 +9,7 @@ from triggering monster spawns on a server.
Also a highly more effecient way to blanket block spawns in a world Also a highly more effecient way to blanket block spawns in a world
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 26dafe0d29..99beb30093 100644 index 4be53f89bb..34f97ce222 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/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 { @@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {

Datei anzeigen

@ -77,7 +77,7 @@ index 315c3d9165..aaf3a54b08 100644
this.c(); this.c();
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index ee65b01f43..0a64432384 100644 index 5816c7bcc7..4bbf9244f2 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/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 { @@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {

Datei anzeigen

@ -792,7 +792,7 @@ index 4de927416b..4c1c914132 100644
this.methodProfiler.exit(); this.methodProfiler.exit();
} }
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 755c0406e1..ee65b01f43 100644 index 755c0406e1..5816c7bcc7 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -0,0 +0,0 @@ @@ -0,0 +0,0 @@
@ -820,8 +820,11 @@ index 755c0406e1..ee65b01f43 100644
+ PlayerChunk neighborPlayer = getUpdatingChunk(ChunkCoordIntPair.pair(currentChunkPair.x + x, currentChunkPair.z + z)); + PlayerChunk neighborPlayer = getUpdatingChunk(ChunkCoordIntPair.pair(currentChunkPair.x + x, currentChunkPair.z + z));
+ if (neighborPlayer != null) { + if (neighborPlayer != null) {
+ Chunk neighbor = neighborPlayer.getChunk(); + Chunk neighbor = neighborPlayer.getChunk();
+ neighbor.setNeighborLoaded(-x, -z); + Chunk player = playerchunk.getChunk();
+ playerchunk.getChunk().setNeighborLoaded(x, z); + if (neighbor != null && player != null) {
+ neighbor.setNeighborLoaded(-x, -z);
+ player.setNeighborLoaded(x, z);
+ }
+ } + }
+ } + }
+ } + }
@ -882,6 +885,11 @@ index 755c0406e1..ee65b01f43 100644
while (objectiterator.hasNext()) { while (objectiterator.hasNext()) {
playerchunkmap_entitytracker = (PlayerChunkMap.EntityTracker) objectiterator.next(); playerchunkmap_entitytracker = (PlayerChunkMap.EntityTracker) objectiterator.next();
playerchunkmap_entitytracker.track(list); playerchunkmap_entitytracker.track(list);
}
+ world.timings.tracker2.stopTiming(); // Paper
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 78a090ac75..e07f4a9680 100644 index 78a090ac75..e07f4a9680 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java