Class SimpleRegionStorage
java.lang.Object
net.minecraft.world.level.chunk.storage.SimpleRegionStorage
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
ChunkMap, RecreatingSimpleRegionStorage
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DataFixTypesprivate final com.mojang.datafixers.DataFixerprivate final IOWorker -
Constructor Summary
ConstructorsConstructorDescriptionSimpleRegionStorage(RegionStorageInfo info, Path folder, com.mojang.datafixers.DataFixer fixerUpper, boolean syncWrites, DataFixTypes dataFixType) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()static voidinjectDatafixingContext(CompoundTag chunkTag, @Nullable CompoundTag contextTag) booleanisOldChunkAround(ChunkPos pos, int range) private static voidremoveDatafixingContext(CompoundTag chunkTag) synchronize(boolean flush) com.mojang.serialization.Dynamic<Tag> upgradeChunkTag(com.mojang.serialization.Dynamic<Tag> chunkTag, int defaultVersion) upgradeChunkTag(CompoundTag chunkTag, int defaultVersion) upgradeChunkTag(CompoundTag chunkTag, int defaultVersion, @Nullable CompoundTag dataFixContextTag, int targetVersion) write(ChunkPos pos, Supplier<CompoundTag> supplier) write(ChunkPos pos, CompoundTag value)
-
Field Details
-
worker
-
fixerUpper
private final com.mojang.datafixers.DataFixer fixerUpper -
dataFixType
-
-
Constructor Details
-
SimpleRegionStorage
public SimpleRegionStorage(RegionStorageInfo info, Path folder, com.mojang.datafixers.DataFixer fixerUpper, boolean syncWrites, DataFixTypes dataFixType)
-
-
Method Details
-
isOldChunkAround
-
read
-
write
-
write
-
upgradeChunkTag
public CompoundTag upgradeChunkTag(CompoundTag chunkTag, int defaultVersion, @Nullable CompoundTag dataFixContextTag, int targetVersion) -
upgradeChunkTag
-
upgradeChunkTag
-
injectDatafixingContext
-
removeDatafixingContext
-
synchronize
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-
chunkScanner
-
storageInfo
-