Only write to cached header in RegionFile if write potentially succeeds (#2294)
This commit is contained in:
@@ -197,7 +197,7 @@ index 0911880c9d..86fb51b90a 100644
|
||||
boolean isOutsideOfRange(ChunkCoordIntPair chunkcoordintpair) {
|
||||
// Spigot start
|
||||
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
|
||||
index 2e14d84657..66c8b0307f 100644
|
||||
index b0ec9edf67..41f1e15cb0 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 {
|
||||
@@ -240,7 +240,7 @@ index 2e14d84657..66c8b0307f 100644
|
||||
return this.getOffset(chunkcoordintpair) != 0;
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class RegionFile implements AutoCloseable {
|
||||
this.writeInt(i); // Paper - Avoid 3 io write calls
|
||||
this.c[j] = i; // Paper - move this to after the write
|
||||
}
|
||||
|
||||
+ private final int getChunkLocation(ChunkCoordIntPair chunkcoordintpair) { return this.f(chunkcoordintpair); } // Paper - OBFHELPER
|
||||
|
||||
Reference in New Issue
Block a user