Class StructureCheck
java.lang.Object
net.minecraft.world.level.levelgen.structure.StructureCheck
-
Field Summary
Modifier and TypeFieldDescriptionprivate final BiomeSource
private final ChunkGenerator
private final ResourceKey<Level>
private final Map<ConfiguredStructureFeature<?,
?>, it.unimi.dsi.fastutil.longs.Long2BooleanMap> private final com.mojang.datafixers.DataFixer
private final LevelHeightAccessor
private final it.unimi.dsi.fastutil.longs.Long2ObjectMap<it.unimi.dsi.fastutil.objects.Object2IntMap<ConfiguredStructureFeature<?,
?>>> private static final org.slf4j.Logger
private static final int
private final RegistryAccess
private final long
private final ChunkScanAccess
private final Registry<ConfiguredStructureFeature<?,
?>> private final StructureManager
-
Constructor Summary
ConstructorDescriptionStructureCheck
(ChunkScanAccess p_197251_, RegistryAccess p_197252_, StructureManager p_197253_, ResourceKey<Level> p_197254_, ChunkGenerator p_197255_, LevelHeightAccessor p_197256_, BiomeSource p_197257_, long p_197258_, com.mojang.datafixers.DataFixer p_197259_) -
Method Summary
Modifier and TypeMethodDescriptionprivate <FC extends FeatureConfiguration,
F extends StructureFeature<FC>>
booleancanCreateStructure
(ChunkPos p_209991_, ConfiguredStructureFeature<FC, F> p_209992_) checkStart
(ChunkPos p_209965_, ConfiguredStructureFeature<?, ?> p_209966_, boolean p_209967_) private StructureCheckResult
checkStructureInfo
(it.unimi.dsi.fastutil.objects.Object2IntMap<ConfiguredStructureFeature<?, ?>> p_209987_, ConfiguredStructureFeature<?, ?> p_209988_, boolean p_209989_) private static it.unimi.dsi.fastutil.objects.Object2IntMap<ConfiguredStructureFeature<?,
?>> deduplicateEmptyMap
(it.unimi.dsi.fastutil.objects.Object2IntMap<ConfiguredStructureFeature<?, ?>> p_197299_) void
incrementReference
(ChunkPos p_209958_, ConfiguredStructureFeature<?, ?> p_209959_) private it.unimi.dsi.fastutil.objects.Object2IntMap<ConfiguredStructureFeature<?,
?>> loadStructures
(CompoundTag p_197312_) void
onStructureLoad
(ChunkPos p_197283_, Map<ConfiguredStructureFeature<?, ?>, StructureStart> p_197284_) private void
storeFullResults
(long p_197264_, it.unimi.dsi.fastutil.objects.Object2IntMap<ConfiguredStructureFeature<?, ?>> p_197265_) private StructureCheckResult
tryLoadFromStorage
(ChunkPos p_209969_, ConfiguredStructureFeature<?, ?> p_209970_, boolean p_209971_, long p_209972_)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
NO_STRUCTURE
private static final int NO_STRUCTURE- See Also:
-
storageAccess
-
registryAccess
-
biomes
-
structureConfigs
-
structureManager
-
dimension
-
chunkGenerator
-
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<ConfiguredStructureFeature<?,?>>> loadedChunks -
featureChecks
private final Map<ConfiguredStructureFeature<?,?>, featureChecksit.unimi.dsi.fastutil.longs.Long2BooleanMap>
-
-
Constructor Details
-
StructureCheck
public StructureCheck(ChunkScanAccess p_197251_, RegistryAccess p_197252_, StructureManager p_197253_, ResourceKey<Level> p_197254_, ChunkGenerator p_197255_, LevelHeightAccessor p_197256_, BiomeSource p_197257_, long p_197258_, com.mojang.datafixers.DataFixer p_197259_)
-
-
Method Details
-
checkStart
public StructureCheckResult checkStart(ChunkPos p_209965_, ConfiguredStructureFeature<?, ?> p_209966_, boolean p_209967_) -
canCreateStructure
private <FC extends FeatureConfiguration,F extends StructureFeature<FC>> boolean canCreateStructure(ChunkPos p_209991_, ConfiguredStructureFeature<FC, F> p_209992_) -
tryLoadFromStorage
@Nullable private StructureCheckResult tryLoadFromStorage(ChunkPos p_209969_, ConfiguredStructureFeature<?, ?> p_209970_, boolean p_209971_, long p_209972_) -
loadStructures
@Nullable private it.unimi.dsi.fastutil.objects.Object2IntMap<ConfiguredStructureFeature<?,?>> loadStructures(CompoundTag p_197312_) -
deduplicateEmptyMap
private static it.unimi.dsi.fastutil.objects.Object2IntMap<ConfiguredStructureFeature<?,?>> deduplicateEmptyMap(it.unimi.dsi.fastutil.objects.Object2IntMap<ConfiguredStructureFeature<?, ?>> p_197299_) -
checkStructureInfo
private StructureCheckResult checkStructureInfo(it.unimi.dsi.fastutil.objects.Object2IntMap<ConfiguredStructureFeature<?, ?>> p_209987_, ConfiguredStructureFeature<?, ?> p_209988_, boolean p_209989_) -
onStructureLoad
public void onStructureLoad(ChunkPos p_197283_, Map<ConfiguredStructureFeature<?, ?>, StructureStart> p_197284_) -
storeFullResults
private void storeFullResults(long p_197264_, it.unimi.dsi.fastutil.objects.Object2IntMap<ConfiguredStructureFeature<?, ?>> p_197265_) -
incrementReference
-