Class LegacyStructureDataHandler
java.lang.Object
net.minecraft.world.level.levelgen.structure.LegacyStructureDataHandler
- All Implemented Interfaces:
LegacyTagFixer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate final com.mojang.datafixers.DataFixerprivate final Map<String, it.unimi.dsi.fastutil.longs.Long2ObjectMap<CompoundTag>> private final @Nullable DimensionDataStorageprivate final booleanprivate final Map<String, StructureFeatureIndexSavedData> static final intFields inherited from interface net.minecraft.world.level.chunk.storage.LegacyTagFixer
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionLegacyStructureDataHandler(@Nullable DimensionDataStorage dimensionDataStorage, List<String> legacyKeys, List<String> currentKeys, com.mojang.datafixers.DataFixer dataFixer) -
Method Summary
Modifier and TypeMethodDescriptionapplyFix(CompoundTag p_459183_) static Supplier<LegacyTagFixer> getLegacyTagFixer(ResourceKey<Level> dimension, Supplier<@Nullable DimensionDataStorage> storageSupplier, com.mojang.datafixers.DataFixer dataFixer) private booleanhasLegacyStart(int chunkX, int chunkZ, String key) private booleanisUnhandledStructureStart(int chunkX, int chunkZ) voidmarkChunkDone(ChunkPos p_458919_) private voidpopulateCaches(DimensionDataStorage storage) intprivate CompoundTagprivate CompoundTagupdateStructureStart(CompoundTag tag, ChunkPos chunkPos)
-
Field Details
-
LAST_MONOLYTH_STRUCTURE_DATA_VERSION
public static final int LAST_MONOLYTH_STRUCTURE_DATA_VERSION- See Also:
-
CURRENT_TO_LEGACY_MAP
-
LEGACY_TO_CURRENT_MAP
-
OLD_STRUCTURE_REGISTRY_KEYS
-
hasLegacyData
private final boolean hasLegacyData -
dataMap
-
indexMap
-
dimensionDataStorage
-
legacyKeys
-
currentKeys
-
dataFixer
private final com.mojang.datafixers.DataFixer dataFixer -
cachesInitialized
private boolean cachesInitialized
-
-
Constructor Details
-
LegacyStructureDataHandler
public LegacyStructureDataHandler(@Nullable DimensionDataStorage dimensionDataStorage, List<String> legacyKeys, List<String> currentKeys, com.mojang.datafixers.DataFixer dataFixer)
-
-
Method Details
-
markChunkDone
- Specified by:
markChunkDonein interfaceLegacyTagFixer
-
targetDataVersion
public int targetDataVersion()- Specified by:
targetDataVersionin interfaceLegacyTagFixer
-
applyFix
- Specified by:
applyFixin interfaceLegacyTagFixer
-
updateFromLegacy
-
hasLegacyStart
-
isUnhandledStructureStart
private boolean isUnhandledStructureStart(int chunkX, int chunkZ) -
updateStructureStart
-
populateCaches
-
getLegacyTagFixer
public static Supplier<LegacyTagFixer> getLegacyTagFixer(ResourceKey<Level> dimension, Supplier<@Nullable DimensionDataStorage> storageSupplier, com.mojang.datafixers.DataFixer dataFixer)
-