net.minecraft.world.storage

public final class RegionBasedStorage

implements AutoCloseable

net.minecraft.world.level.chunk.storage.RegionFileStorage
net.minecraft.class_2867
net.minecraft.world.storage.RegionBasedStorage

Field summary

Modifier and TypeField
public static final String
ANVIL_EXTENSION
field_31425
MCA_EXTENSION
private static final int
MAX_CACHE_SIZE
field_31426
MAX_CACHE_SIZE
private final it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap<Optional<RegionFile>>
regionCache
field_17657
cachedRegionFiles
private final StorageKey
info
field_49103
storageKey
private final Path
folder
field_18690
directory
private final boolean
sync
field_23748
dsync

Constructor summary

ModifierConstructor
public (StorageKey storageKey, Path directory, boolean dsync)

Method summary

Modifier and TypeMethod
private Path
regionPath(ChunkPos pos)
method_1_10063(class_1923 arg0)
getRegionFilePath(ChunkPos chunkPos)
private RegionFile
getRegionFile(ChunkPos pos, boolean create)
method_12440(class_1923 arg0, boolean arg1)
getRegionFile(ChunkPos chunkPos, boolean write)
private RegionFile
getOrCreateRegionFile(ChunkPos pos)
method_1_10062(class_1923 arg0)
getRegionFileForWriting(ChunkPos chunkPos)
private void
cache(long key, Optional<RegionFile> entry)
method_1_10061(long arg0, Optional<class_2861> arg1)
addRegionFileToCache(long chunkPos, Optional<RegionFile> regionFile)
public NbtCompound
read(ChunkPos pos)
method_17911(class_1923 arg0)
getTagAt(ChunkPos pos)
public void
scanChunk(ChunkPos pos, StreamTagVisitor scanner)
method_39802(class_1923 arg0, class_6836 arg1)
scanChunk(ChunkPos chunkPos, NbtScanner scanner)
public void
write(ChunkPos pos, CompoundTag value)
method_23726(class_1923 arg0, class_2487 arg1)
write(ChunkPos pos, NbtCompound nbt)
public void
close()
public void
flush()
method_26982()
sync()
public StorageKey
info()
method_61005()
getStorageKey()