Class RegionFileStorage
java.lang.Object
net.minecraft.world.level.chunk.storage.RegionFileStorage
- All Implemented Interfaces:
AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprivate final Pathprivate final RegionStorageInfoprivate static final intprivate final it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap<Optional<RegionFile>> private final boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcache(long key, Optional<RegionFile> entry) voidclose()voidflush()private RegionFileprivate @Nullable RegionFilegetRegionFile(ChunkPos pos, boolean create) info()private PathregionPath(ChunkPos pos) voidscanChunk(ChunkPos pos, StreamTagVisitor scanner) voidwrite(ChunkPos pos, @Nullable CompoundTag value)
-
Field Details
-
ANVIL_EXTENSION
- See Also:
-
MAX_CACHE_SIZE
private static final int MAX_CACHE_SIZE- See Also:
-
regionCache
private final it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap<Optional<RegionFile>> regionCache -
info
-
folder
-
sync
private final boolean sync
-
-
Constructor Details
-
RegionFileStorage
-
-
Method Details
-
regionPath
-
getRegionFile
- Throws:
IOException
-
getOrCreateRegionFile
- Throws:
IOException
-
cache
- Throws:
IOException
-
read
- Throws:
IOException
-
scanChunk
- Throws:
IOException
-
write
- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-
flush
- Throws:
IOException
-
info
-