Class RegionFileStorage
java.lang.Object
net.minecraft.world.level.chunk.storage.RegionFileStorage
- All Implemented Interfaces:
AutoCloseable
Handles reading and writing the
region files
for a Level
.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
private final Path
private final RegionStorageInfo
private static final int
private final it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap
<RegionFile> private final boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
flush()
private RegionFile
getRegionFile
(ChunkPos pChunkPos) info()
void
scanChunk
(ChunkPos pChunkPos, StreamTagVisitor pVisitor) protected void
write
(ChunkPos pChunkPos, CompoundTag pChunkData)
-
Field Details
-
ANVIL_EXTENSION
- See Also:
-
MAX_CACHE_SIZE
private static final int MAX_CACHE_SIZE- See Also:
-
regionCache
-
info
-
folder
-
sync
private final boolean sync
-
-
Constructor Details
-
RegionFileStorage
RegionFileStorage(RegionStorageInfo pInfo, Path pFolder, boolean pSync)
-
-
Method Details
-
getRegionFile
- Throws:
IOException
-
read
- Throws:
IOException
-
scanChunk
- Throws:
IOException
-
write
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
IOException
-
flush
- Throws:
IOException
-
info
-