pass more stuff

This commit is contained in:
Owen1212055 2024-04-25 09:01:54 -04:00
parent a47a33b837
commit 8fa2c4d4fd

View file

@ -19639,7 +19639,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public PoiManager(
RegionStorageInfo storageKey, Path directory, DataFixer dataFixer, boolean dsync, RegistryAccess registryManager, LevelHeightAccessor world
@@ -0,0 +0,0 @@ public class PoiManager extends SectionStorage<PoiSection> {
) {
super(
+ // Paper start
+ storageKey,
+ directory,
+ dsync,
+ // Paper end
new SimpleRegionStorage(storageKey, directory, dataFixer, dsync, DataFixTypes.POI_CHUNK),
PoiSection::codec,
PoiSection::new,
registryManager,
world
);
@ -21003,6 +21012,14 @@ diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorag
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java
@@ -0,0 +0,0 @@ import it.unimi.dsi.fastutil.longs.Long2ObjectMap;
import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap;
import it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet;
import java.io.IOException;
+import java.nio.file.Path;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.CompletableFuture;
@@ -0,0 +0,0 @@ import net.minecraft.world.level.ChunkPos;
import net.minecraft.world.level.LevelHeightAccessor;
import org.slf4j.Logger;
@ -21022,12 +21039,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
protected final LevelHeightAccessor levelHeightAccessor;
public SectionStorage(
@@ -0,0 +0,0 @@ public class SectionStorage<R> implements AutoCloseable {
+ // Paper start
+ RegionStorageInfo regionStorageInfo,
+ Path path,
+ boolean dsync,
+ // Paper end
SimpleRegionStorage storageAccess,
Function<Runnable, Codec<R>> codecFactory,
Function<Runnable, R> factory,
RegistryAccess registryManager,
LevelHeightAccessor world
) {
- this.simpleRegionStorage = storageAccess;
+ super(,path, dsync); // Paper - remove mojang I/O thread TODO this trash
+ super(regionStorageInfo, path, dsync); // Paper - remove mojang I/O thread
this.codec = codecFactory;
this.factory = factory;
this.registryAccess = registryManager;