Class StructureCheck
java.lang.Object
net.minecraft.world.level.levelgen.structure.StructureCheck
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BiomeSourceprivate final ChunkGeneratorprivate final ResourceKey<Level> private final com.mojang.datafixers.DataFixerprivate final LevelHeightAccessorprivate final it.unimi.dsi.fastutil.longs.Long2ObjectMap<it.unimi.dsi.fastutil.objects.Object2IntMap<Structure>> private static final org.slf4j.Loggerprivate static final intprivate final RandomStateprivate final RegistryAccessprivate final longprivate final ChunkScanAccessprivate final StructureTemplateManager -
Constructor Summary
ConstructorsConstructorDescriptionStructureCheck(ChunkScanAccess storageAccess, RegistryAccess registryAccess, StructureTemplateManager structureTemplateManager, ResourceKey<Level> dimension, ChunkGenerator chunkGenerator, RandomState randomState, LevelHeightAccessor heightAccessor, BiomeSource biomeSource, long seed, com.mojang.datafixers.DataFixer fixerUpper) -
Method Summary
Modifier and TypeMethodDescriptionprivate booleancanCreateStructure(ChunkPos chunkPos, Structure structure) checkStart(ChunkPos chunkPos, Structure structure, StructurePlacement placement, boolean skipKnownStructures) private StructureCheckResultcheckStructureInfo(it.unimi.dsi.fastutil.objects.Object2IntMap<Structure> structureChunks, Structure structure, boolean skipKnownStructures) private static it.unimi.dsi.fastutil.objects.Object2IntMap<Structure> deduplicateEmptyMap(it.unimi.dsi.fastutil.objects.Object2IntMap<Structure> map) voidincrementReference(ChunkPos pos, Structure structure) private it.unimi.dsi.fastutil.objects.Object2IntMap<Structure> voidonStructureLoad(ChunkPos chunkPos, Map<Structure, StructureStart> chunkStarts) private voidstoreFullResults(long chunkPos, it.unimi.dsi.fastutil.objects.Object2IntMap<Structure> structureChunks) private StructureCheckResulttryLoadFromStorage(ChunkPos chunkPos, Structure structure, boolean skipKnownStructures, long packedChunkPos)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
NO_STRUCTURE
private static final int NO_STRUCTURE- See Also:
-
storageAccess
-
registryAccess
-
structureTemplateManager
-
dimension
-
chunkGenerator
-
randomState
-
heightAccessor
-
biomeSource
-
seed
private final long seed -
fixerUpper
private final com.mojang.datafixers.DataFixer fixerUpper -
loadedChunks
private final it.unimi.dsi.fastutil.longs.Long2ObjectMap<it.unimi.dsi.fastutil.objects.Object2IntMap<Structure>> loadedChunks -
featureChecks
-
-
Constructor Details
-
StructureCheck
public StructureCheck(ChunkScanAccess storageAccess, RegistryAccess registryAccess, StructureTemplateManager structureTemplateManager, ResourceKey<Level> dimension, ChunkGenerator chunkGenerator, RandomState randomState, LevelHeightAccessor heightAccessor, BiomeSource biomeSource, long seed, com.mojang.datafixers.DataFixer fixerUpper)
-
-
Method Details
-
checkStart
public StructureCheckResult checkStart(ChunkPos chunkPos, Structure structure, StructurePlacement placement, boolean skipKnownStructures) -
canCreateStructure
-
tryLoadFromStorage
@Nullable private StructureCheckResult tryLoadFromStorage(ChunkPos chunkPos, Structure structure, boolean skipKnownStructures, long packedChunkPos) -
loadStructures
@Nullable private it.unimi.dsi.fastutil.objects.Object2IntMap<Structure> loadStructures(CompoundTag tag) -
deduplicateEmptyMap
-
checkStructureInfo
private StructureCheckResult checkStructureInfo(it.unimi.dsi.fastutil.objects.Object2IntMap<Structure> structureChunks, Structure structure, boolean skipKnownStructures) -
onStructureLoad
-
storeFullResults
private void storeFullResults(long chunkPos, it.unimi.dsi.fastutil.objects.Object2IntMap<Structure> structureChunks) -
incrementReference
-