Class IOWorker
java.lang.Object
net.minecraft.world.level.chunk.storage.IOWorker
- All Implemented Interfaces:
AutoCloseable
,ChunkScanAccess
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static class
(package private) static enum
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
private final ProcessorMailbox
<StrictQueue.IntRunnable> private final Map
<ChunkPos, IOWorker.PendingStore> private static final int
private final it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap
<CompletableFuture<BitSet>> private final AtomicBoolean
private final RegionFileStorage
-
Constructor Summary
ModifierConstructorDescriptionprotected
IOWorker
(RegionStorageInfo p_335181_, Path p_196930_, boolean p_196931_) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
private CompletableFuture
<BitSet> createOldDataForRegion
(int p_223490_, int p_223491_) private CompletableFuture
<BitSet> getOrCreateOldDataForRegion
(int p_223464_, int p_223465_) private boolean
isOldChunk
(CompoundTag p_223485_) boolean
isOldChunkAround
(ChunkPos p_223472_, int p_223473_) private void
runStore
(ChunkPos p_63536_, IOWorker.PendingStore p_63537_) scanChunk
(ChunkPos p_196939_, StreamTagVisitor p_196940_) store
(ChunkPos p_63539_, CompoundTag p_63540_) private void
private <T> CompletableFuture
<T> submitTask
(Supplier<com.mojang.datafixers.util.Either<T, Exception>> p_63546_) synchronize
(boolean p_182499_) private void
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
shutdownRequested
-
mailbox
-
storage
-
pendingWrites
-
regionCacheForBlender
private final it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap<CompletableFuture<BitSet>> regionCacheForBlender -
REGION_CACHE_SIZE
private static final int REGION_CACHE_SIZE- See Also:
-
-
Constructor Details
-
IOWorker
-
-
Method Details
-
isOldChunkAround
-
getOrCreateOldDataForRegion
-
createOldDataForRegion
-
isOldChunk
-
store
-
loadAsync
-
synchronize
-
scanChunk
- Specified by:
scanChunk
in interfaceChunkScanAccess
-
submitTask
private <T> CompletableFuture<T> submitTask(Supplier<com.mojang.datafixers.util.Either<T, Exception>> p_63546_) -
storePendingChunk
private void storePendingChunk() -
tellStorePending
private void tellStorePending() -
runStore
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
IOException
-
storageInfo
-