AT bullshit
This commit is contained in:
parent
2eb94202ea
commit
a1d90ea32f
48 changed files with 191 additions and 638 deletions
|
@ -2369,30 +2369,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
private final PoiManager poiManager;
|
||||
public final LongSet toDrop;
|
||||
private boolean modified;
|
||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
private final ChunkStatusUpdateListener chunkStatusListener;
|
||||
public final ChunkMap.ChunkDistanceManager distanceManager;
|
||||
private final AtomicInteger tickingGenerated;
|
||||
- private final StructureManager structureManager;
|
||||
+ public final StructureManager structureManager; // Paper - private -> public
|
||||
private final File storageFolder;
|
||||
private final PlayerMap playerMap;
|
||||
public final Int2ObjectMap<ChunkMap.TrackedEntity> entityMap;
|
||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
|
||||
@Nullable
|
||||
- protected ChunkHolder getUpdatingChunkIfPresent(long pos) {
|
||||
+ public final ChunkHolder getUpdatingChunkIfPresent(long pos) { // Paper - protected -> public
|
||||
return (ChunkHolder) this.updatingChunkMap.get(pos);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
- protected ChunkHolder getVisibleChunkIfPresent(long pos) {
|
||||
+ public final ChunkHolder getVisibleChunkIfPresent(long pos) { // Paper - protected -> public
|
||||
return (ChunkHolder) this.visibleChunkMap.get(pos);
|
||||
}
|
||||
|
||||
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
public void close() throws IOException {
|
||||
try {
|
||||
|
@ -2680,15 +2656,6 @@ diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/sr
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -0,0 +0,0 @@ public class ServerChunkCache extends ChunkSource {
|
||||
final ServerLevel level;
|
||||
public final Thread mainThread; // Paper - package-private -> public
|
||||
final ThreadedLevelLightEngine lightEngine;
|
||||
- private final ServerChunkCache.MainThreadExecutor mainThreadProcessor;
|
||||
+ public final ServerChunkCache.MainThreadExecutor mainThreadProcessor; // Paper - private -> public
|
||||
public final ChunkMap chunkMap;
|
||||
private final DimensionDataStorage dataStorage;
|
||||
private long lastInhabitedUpdate;
|
||||
@@ -0,0 +0,0 @@ public class ServerChunkCache extends ChunkSource {
|
||||
return ret;
|
||||
}
|
||||
|
@ -3446,16 +3413,7 @@ diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileSto
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
@@ -0,0 +0,0 @@ import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.ExceptionCollector;
|
||||
import net.minecraft.world.level.ChunkPos;
|
||||
|
||||
-public final class RegionFileStorage implements AutoCloseable {
|
||||
+public class RegionFileStorage implements AutoCloseable { // Paper - no final
|
||||
|
||||
public static final String ANVIL_EXTENSION = ".mca";
|
||||
private static final int MAX_CACHE_SIZE = 256;
|
||||
@@ -0,0 +0,0 @@ public final class RegionFileStorage implements AutoCloseable {
|
||||
@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable {
|
||||
this.sync = dsync;
|
||||
}
|
||||
|
||||
|
@ -3471,7 +3429,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ return regionfile != null ? regionfile.hasChunk(pos) : false;
|
||||
+ }
|
||||
+
|
||||
+ public synchronized RegionFile getFile(ChunkPos chunkcoordintpair, boolean existingOnly) throws IOException { // CraftBukkit // Paper - public
|
||||
+ public synchronized RegionFile getFile(ChunkPos chunkcoordintpair, boolean existingOnly) throws IOException { // CraftBukkit
|
||||
+ return this.getFile(chunkcoordintpair, existingOnly, false);
|
||||
+ }
|
||||
+ public synchronized RegionFile getFile(ChunkPos chunkcoordintpair, boolean existingOnly, boolean lock) throws IOException {
|
||||
|
@ -3489,7 +3447,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
return regionfile;
|
||||
} else {
|
||||
if (this.regionCache.size() >= com.destroystokyo.paper.PaperConfig.regionFileCacheSize) { // Paper - configurable
|
||||
@@ -0,0 +0,0 @@ public final class RegionFileStorage implements AutoCloseable {
|
||||
@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable {
|
||||
RegionFile regionfile1 = new RegionFile(file1, this.folder, this.sync);
|
||||
|
||||
this.regionCache.putAndMoveToFirst(i, regionfile1);
|
||||
|
@ -3502,7 +3460,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
return regionfile1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public final class RegionFileStorage implements AutoCloseable {
|
||||
@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable {
|
||||
@Nullable
|
||||
public CompoundTag read(ChunkPos pos) throws IOException {
|
||||
// CraftBukkit start - SPIGOT-5680: There's no good reason to preemptively create files on read, save that for writing
|
||||
|
@ -3516,7 +3474,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
DataInputStream datainputstream = regionfile.getChunkDataInputStream(pos);
|
||||
|
||||
CompoundTag nbttagcompound;
|
||||
@@ -0,0 +0,0 @@ public final class RegionFileStorage implements AutoCloseable {
|
||||
@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable {
|
||||
}
|
||||
|
||||
return nbttagcompound;
|
||||
|
@ -3532,7 +3490,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
int attempts = 0; Exception laste = null; while (attempts++ < 5) { try { // Paper
|
||||
|
||||
if (nbt == null) {
|
||||
@@ -0,0 +0,0 @@ public final class RegionFileStorage implements AutoCloseable {
|
||||
@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable {
|
||||
MinecraftServer.LOGGER.error("Failed to save chunk", laste);
|
||||
}
|
||||
// Paper end
|
||||
|
@ -3546,7 +3504,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
ExceptionCollector<IOException> exceptionsuppressor = new ExceptionCollector<>();
|
||||
ObjectIterator objectiterator = this.regionCache.values().iterator();
|
||||
|
||||
@@ -0,0 +0,0 @@ public final class RegionFileStorage implements AutoCloseable {
|
||||
@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable {
|
||||
exceptionsuppressor.throwIfPresent();
|
||||
}
|
||||
|
||||
|
@ -3570,11 +3528,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
- private final IOWorker worker;
|
||||
+ // Paper - remove mojang I/O thread
|
||||
private final Long2ObjectMap<Optional<R>> storage = new Long2ObjectOpenHashMap<>();
|
||||
- private final LongLinkedOpenHashSet dirty = new LongLinkedOpenHashSet();
|
||||
+ public final LongLinkedOpenHashSet dirty = new LongLinkedOpenHashSet(); // Paper - private -> public
|
||||
public final LongLinkedOpenHashSet dirty = new LongLinkedOpenHashSet();
|
||||
private final Function<Runnable, Codec<R>> codec;
|
||||
private final Function<Runnable, R> factory;
|
||||
private final DataFixer fixerUpper;
|
||||
@@ -0,0 +0,0 @@ public class SectionStorage<R> implements AutoCloseable {
|
||||
protected final LevelHeightAccessor levelHeightAccessor;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue