Class LegacyStructureDataHandler
java.lang.Object
net.minecraft.world.level.levelgen.structure.LegacyStructureDataHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map
<String, it.unimi.dsi.fastutil.longs.Long2ObjectMap<CompoundTag>> private final boolean
private final Map
<String, StructureFeatureIndexSavedData> -
Constructor Summary
ConstructorsConstructorDescriptionLegacyStructureDataHandler
(DimensionDataStorage storage, List<String> legacyKeys, List<String> currentKeys) -
Method Summary
Modifier and TypeMethodDescriptionstatic LegacyStructureDataHandler
getLegacyStructureHandler
(ResourceKey<Level> level, DimensionDataStorage storage) private boolean
hasLegacyStart
(int chunkX, int chunkZ, String key) private boolean
isUnhandledStructureStart
(int chunkX, int chunkZ) private void
populateCaches
(DimensionDataStorage storage) void
removeIndex
(long packedChunkPos) private CompoundTag
updateStructureStart
(CompoundTag tag, ChunkPos chunkPos)
-
Field Details
-
CURRENT_TO_LEGACY_MAP
-
LEGACY_TO_CURRENT_MAP
-
OLD_STRUCTURE_REGISTRY_KEYS
-
hasLegacyData
private final boolean hasLegacyData -
dataMap
-
indexMap
-
legacyKeys
-
currentKeys
-
-
Constructor Details
-
LegacyStructureDataHandler
public LegacyStructureDataHandler(@Nullable DimensionDataStorage storage, List<String> legacyKeys, List<String> currentKeys)
-
-
Method Details
-
removeIndex
public void removeIndex(long packedChunkPos) -
updateFromLegacy
-
hasLegacyStart
-
isUnhandledStructureStart
private boolean isUnhandledStructureStart(int chunkX, int chunkZ) -
updateStructureStart
-
populateCaches
-
getLegacyStructureHandler
public static LegacyStructureDataHandler getLegacyStructureHandler(ResourceKey<Level> level, @Nullable DimensionDataStorage storage)
-