mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 17:01:56 +01:00
Fix some runtime issues
This commit is contained in:
parent
b64ce880b7
commit
b372f891aa
8 changed files with 31 additions and 10 deletions
|
@ -121,7 +121,7 @@ index 1dd793d2fb..61ea2818b1 100644
|
|||
}
|
||||
// CraftBukkit end
|
||||
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
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
|
|
|
@ -64,7 +64,7 @@ index b7c94fe238..80eea5dfbd 100644
|
|||
|
||||
public NBTTagList() {}
|
||||
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
|
||||
+++ b/src/main/java/net/minecraft/server/RegionFile.java
|
||||
@@ -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 final RandomAccessFile b; private RandomAccessFile getDataFile() { return this.b; } // Paper - OBFHELPER
|
||||
@@ -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();
|
||||
java.nio.IntBuffer headerAsInts = header.asIntBuffer();
|
||||
|
@ -94,6 +102,11 @@ index e68f901943..995a893774 100644
|
|||
// Spigot end
|
||||
this.e.set((k >> 8) + l, false);
|
||||
@@ -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
|
||||
|
|
|
@ -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.
|
||||
|
||||
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
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
|
|
|
@ -37,7 +37,7 @@ affect save performance if the startup flag is used (especially on
|
|||
HDDs).
|
||||
|
||||
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
|
||||
+++ b/src/main/java/net/minecraft/server/RegionFile.java
|
||||
@@ -0,0 +0,0 @@ public class RegionFile implements AutoCloseable {
|
||||
|
|
|
@ -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
|
||||
index 5ecf446e11..26dafe0d29 100644
|
||||
index 5dc8e62021..4be53f89bb 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 {
|
||||
|
|
|
@ -9,7 +9,7 @@ from triggering monster spawns on a server.
|
|||
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
|
||||
index 26dafe0d29..99beb30093 100644
|
||||
index 4be53f89bb..34f97ce222 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 {
|
||||
|
|
|
@ -77,7 +77,7 @@ index 315c3d9165..aaf3a54b08 100644
|
|||
|
||||
this.c();
|
||||
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
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
|
|
|
@ -792,7 +792,7 @@ index 4de927416b..4c1c914132 100644
|
|||
this.methodProfiler.exit();
|
||||
}
|
||||
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
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -0,0 +0,0 @@
|
||||
|
@ -820,8 +820,11 @@ index 755c0406e1..ee65b01f43 100644
|
|||
+ PlayerChunk neighborPlayer = getUpdatingChunk(ChunkCoordIntPair.pair(currentChunkPair.x + x, currentChunkPair.z + z));
|
||||
+ if (neighborPlayer != null) {
|
||||
+ Chunk neighbor = neighborPlayer.getChunk();
|
||||
+ neighbor.setNeighborLoaded(-x, -z);
|
||||
+ playerchunk.getChunk().setNeighborLoaded(x, z);
|
||||
+ Chunk player = playerchunk.getChunk();
|
||||
+ if (neighbor != null && player != null) {
|
||||
+ neighbor.setNeighborLoaded(-x, -z);
|
||||
+ player.setNeighborLoaded(x, z);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
|
@ -882,6 +885,11 @@ index 755c0406e1..ee65b01f43 100644
|
|||
while (objectiterator.hasNext()) {
|
||||
playerchunkmap_entitytracker = (PlayerChunkMap.EntityTracker) objectiterator.next();
|
||||
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
|
||||
index 78a090ac75..e07f4a9680 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
|
|
Loading…
Reference in a new issue