Class ChunkStorage
java.lang.Object
net.minecraft.world.level.chunk.storage.ChunkStorage
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
ChunkMap,RecreatingChunkStorage
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final com.mojang.datafixers.DataFixerstatic final intprivate LegacyStructureDataHandlerprivate final IOWorker -
Constructor Summary
ConstructorsConstructorDescriptionChunkStorage(RegionStorageInfo pInfo, Path pFolder, com.mojang.datafixers.DataFixer pFixerUpper, boolean pSync) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidprivate LegacyStructureDataHandlergetLegacyStructureHandler(ResourceKey<Level> pLevel, Supplier<DimensionDataStorage> pStorage) static intgetVersion(CompoundTag pChunkData) protected voidhandleLegacyStructureIndex(ChunkPos pChunkPos) static voidinjectDatafixingContext(CompoundTag pChunkData, ResourceKey<Level> pLevelKey, Optional<ResourceKey<com.mojang.serialization.MapCodec<? extends ChunkGenerator>>> pChunkGeneratorKey) booleanisOldChunkAround(ChunkPos pPos, int pRadius) private static voidprotected RegionStorageInfoupgradeChunkTag(ResourceKey<Level> pLevelKey, Supplier<DimensionDataStorage> pStorage, CompoundTag pChunkData, Optional<ResourceKey<com.mojang.serialization.MapCodec<? extends ChunkGenerator>>> pChunkGeneratorKey) write(ChunkPos pChunkPos, CompoundTag pData)
-
Field Details
-
LAST_MONOLYTH_STRUCTURE_DATA_VERSION
public static final int LAST_MONOLYTH_STRUCTURE_DATA_VERSION- See Also:
-
worker
-
fixerUpper
protected final com.mojang.datafixers.DataFixer fixerUpper -
legacyStructureHandler
-
-
Constructor Details
-
ChunkStorage
public ChunkStorage(RegionStorageInfo pInfo, Path pFolder, com.mojang.datafixers.DataFixer pFixerUpper, boolean pSync)
-
-
Method Details
-
isOldChunkAround
-
upgradeChunkTag
public CompoundTag upgradeChunkTag(ResourceKey<Level> pLevelKey, Supplier<DimensionDataStorage> pStorage, CompoundTag pChunkData, Optional<ResourceKey<com.mojang.serialization.MapCodec<? extends ChunkGenerator>>> pChunkGeneratorKey) -
getLegacyStructureHandler
private LegacyStructureDataHandler getLegacyStructureHandler(ResourceKey<Level> pLevel, Supplier<DimensionDataStorage> pStorage) -
injectDatafixingContext
public static void injectDatafixingContext(CompoundTag pChunkData, ResourceKey<Level> pLevelKey, Optional<ResourceKey<com.mojang.serialization.MapCodec<? extends ChunkGenerator>>> pChunkGeneratorKey) -
removeDatafixingContext
-
getVersion
-
read
-
write
-
handleLegacyStructureIndex
-
flushWorker
public void flushWorker() -
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-
chunkScanner
-
storageInfo
-