Class StructureSpawnManager


  • public class StructureSpawnManager
    extends java.lang.Object
    Class to help manage entity spawns inside of structures
    • Constructor Detail

      • StructureSpawnManager

        public StructureSpawnManager()
    • Method Detail

      • gatherEntitySpawns

        public static void gatherEntitySpawns()
        Gathers potential entity spawns for all the different registered structures.
      • getStructureSpawns

        @Nullable
        public static java.util.List<MobSpawnInfo.Spawners> getStructureSpawns​(StructureManager structureManager,
                                                                               EntityClassification classification,
                                                                               BlockPos pos)
        Looks up if a given position is within a structure and returns any entity spawns that structure has for the given classification, or null if none are found.
        Parameters:
        structureManager - Structure Manager, used to check if a position is within a structure.
        classification - Entity classification
        pos - Position to get entity spawns of
      • getSpawnList

        public static java.util.List<MobSpawnInfo.Spawners> getSpawnList​(Structure<?> structure,
                                                                         EntityClassification classification)
        Gets the entity spawn lists for entities of a given classification for a given structure.
        Parameters:
        structure - The Structure
        classification - The classification to lookup