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 Supplier<LegacyTagFixer> private final IOWorker -
Constructor Summary
ConstructorsConstructorDescriptionSimpleRegionStorage(RegionStorageInfo info, Path folder, com.mojang.datafixers.DataFixer fixerUpper, boolean sync, DataFixTypes dataFixType) SimpleRegionStorage(RegionStorageInfo info, Path folder, com.mojang.datafixers.DataFixer fixerUpper, boolean sync, DataFixTypes dataFixType, Supplier<LegacyTagFixer> legacyFixer) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()static voidinjectDatafixingContext(CompoundTag tag, @Nullable CompoundTag context) booleanisOldChunkAround(ChunkPos chunkPos, int radius) protected voidmarkChunkDone(ChunkPos chunkPos) private static voidsynchronize(boolean flushStorage) com.mojang.serialization.Dynamic<Tag> upgradeChunkTag(com.mojang.serialization.Dynamic<Tag> tag, int fallbackVersion) upgradeChunkTag(CompoundTag tag, int fallbackVersion) upgradeChunkTag(CompoundTag tag, int fallbackVersion, @Nullable CompoundTag context) write(ChunkPos chunkPos, Supplier<CompoundTag> dataSupplier) write(ChunkPos chunkPos, CompoundTag data)
-
Field Details
-
worker
-
fixerUpper
private final com.mojang.datafixers.DataFixer fixerUpper -
dataFixType
-
legacyFixer
-
-
Constructor Details
-
SimpleRegionStorage
public SimpleRegionStorage(RegionStorageInfo info, Path folder, com.mojang.datafixers.DataFixer fixerUpper, boolean sync, DataFixTypes dataFixType) -
SimpleRegionStorage
public SimpleRegionStorage(RegionStorageInfo info, Path folder, com.mojang.datafixers.DataFixer fixerUpper, boolean sync, DataFixTypes dataFixType, Supplier<LegacyTagFixer> legacyFixer)
-
-
Method Details
-
isOldChunkAround
-
read
-
write
-
write
-
upgradeChunkTag
public CompoundTag upgradeChunkTag(CompoundTag tag, int fallbackVersion, @Nullable CompoundTag context) -
upgradeChunkTag
-
upgradeChunkTag
-
injectDatafixingContext
-
removeDatafixingContext
-
markChunkDone
-
synchronize
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-
chunkScanner
-
storageInfo
-