locate Structure
fun locateStructure(structureKey: ResourceKey<Structure>, level: ServerLevel, startPos: BlockPos = BlockPos.ZERO): BlockPos?
Locate a structure by ResourceKey.
Return
nearest BlockPos of the structure or null if not found
Parameters
structure Key
structure resource key
level
server level to search in
start Pos
starting position for search
fun locateStructure(structureKey: TagKey<Structure>, level: ServerLevel, startPos: BlockPos = BlockPos.ZERO): BlockPos?
Locate a structure by TagKey.
Return
nearest BlockPos or null if not found
Parameters
structure Key
structure tag key
level
server level to search in
start Pos
starting position