Package net.minecraft.world.storage
Class StorageIoWorker
java.lang.Object
net.minecraft.world.storage.StorageIoWorker
- All Implemented Interfaces:
AutoCloseable
public class StorageIoWorker extends Object implements AutoCloseable
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
StorageIoWorker.Priority
(package private) static class
StorageIoWorker.Result
-
Field Summary
Fields Modifier and Type Field Description private AtomicBoolean
closed
private TaskExecutor<TaskQueue.PrioritizedTask>
field_24468
private static Logger
LOGGER
private Map<ChunkPos,StorageIoWorker.Result>
results
private RegionBasedStorage
storage
-
Constructor Summary
Constructors Modifier Constructor Description protected
StorageIoWorker(File file, boolean bool, String string)
-
Method Summary
Modifier and Type Method Description void
close()
CompletableFuture<Void>
completeAll()
CompoundTag
getNbt(ChunkPos pos)
private void
method_27945()
protected CompletableFuture<CompoundTag>
method_31738(ChunkPos chunkPos)
private <T> CompletableFuture<T>
run(Supplier<com.mojang.datafixers.util.Either<T,Exception>> supplier)
CompletableFuture<Void>
setResult(ChunkPos pos, CompoundTag nbt)
private void
write(ChunkPos pos, StorageIoWorker.Result result)
private void
writeResult()
-
Field Details
-
LOGGER
-
closed
-
field_24468
-
storage
-
results
-
-
Constructor Details
-
StorageIoWorker
-
-
Method Details
-
setResult
-
getNbt
- Throws:
IOException
-
method_31738
-
completeAll
-
run
private <T> CompletableFuture<T> run(Supplier<com.mojang.datafixers.util.Either<T,Exception>> supplier) -
writeResult
private void writeResult() -
method_27945
private void method_27945() -
write
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
IOException
-