Class StructureManager
java.lang.Object
net.minecraft.world.level.StructureManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LevelAccessorprivate final StructureCheckprivate final WorldOptions -
Constructor Summary
ConstructorsConstructorDescriptionStructureManager(LevelAccessor level, WorldOptions worldOptions, StructureCheck structureCheck) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddReference(StructureStart start) voidaddReferenceForStructure(SectionPos pos, Structure structure, long reference, StructureAccess chunk) checkStructurePresence(ChunkPos pos, Structure structure, StructurePlacement placement, boolean createReference) voidfillStartsForStructure(Structure structure, it.unimi.dsi.fastutil.longs.LongSet referencesForStructure, Consumer<StructureStart> consumer) forWorldGenRegion(WorldGenRegion region) @Nullable StructureStartgetStartForStructure(SectionPos pos, Structure structure, StructureAccess chunk) getStructureAt(BlockPos blockPos, Structure structure) getStructureWithPieceAt(BlockPos blockPos, Predicate<Holder<Structure>> predicate) getStructureWithPieceAt(BlockPos blockPos, HolderSet<Structure> structures) getStructureWithPieceAt(BlockPos blockPos, TagKey<Structure> structureTag) getStructureWithPieceAt(BlockPos blockPos, Structure structure) booleanvoidsetStartForStructure(SectionPos pos, Structure structure, StructureStart start, StructureAccess chunk) booleanstartsForStructure(SectionPos pos, Structure structure) startsForStructure(ChunkPos pos, Predicate<Structure> matcher) booleanstructureHasPieceAt(BlockPos blockPos, StructureStart structureStart)
-
Field Details
-
level
-
worldOptions
-
structureCheck
-
-
Constructor Details
-
StructureManager
public StructureManager(LevelAccessor level, WorldOptions worldOptions, StructureCheck structureCheck)
-
-
Method Details
-
forWorldGenRegion
-
startsForStructure
-
startsForStructure
-
fillStartsForStructure
public void fillStartsForStructure(Structure structure, it.unimi.dsi.fastutil.longs.LongSet referencesForStructure, Consumer<StructureStart> consumer) -
getStartForStructure
public @Nullable StructureStart getStartForStructure(SectionPos pos, Structure structure, StructureAccess chunk) -
setStartForStructure
public void setStartForStructure(SectionPos pos, Structure structure, StructureStart start, StructureAccess chunk) -
addReferenceForStructure
public void addReferenceForStructure(SectionPos pos, Structure structure, long reference, StructureAccess chunk) -
shouldGenerateStructures
public boolean shouldGenerateStructures() -
getStructureAt
-
getStructureWithPieceAt
-
getStructureWithPieceAt
-
getStructureWithPieceAt
public StructureStart getStructureWithPieceAt(BlockPos blockPos, Predicate<Holder<Structure>> predicate) -
getStructureWithPieceAt
-
structureHasPieceAt
-
hasAnyStructureAt
-
getAllStructuresAt
-
checkStructurePresence
public StructureCheckResult checkStructurePresence(ChunkPos pos, Structure structure, StructurePlacement placement, boolean createReference) -
addReference
-
registryAccess
-