java.lang.Object
com.pixelmonmod.pixelmon.api.spawning.conditions.LocationType
Direct Known Subclasses:
TriggerLocation

public class LocationType extends Object
A type of location to spawn. This is used as a preliminary condition. All the default location types are statically defined inside this class, but adding custom types to locationTypes directly during pre-initialization will add support for those types during SpawnSet loading.
  • Field Details

  • Constructor Details

    • LocationType

      public LocationType(String name)
  • Method Details

    • setBaseBlockCondition

      public LocationType setBaseBlockCondition(Predicate<net.minecraft.world.level.block.state.BlockState> baseBlockCondition)
    • setSurroundingBlockCondition

      public LocationType setSurroundingBlockCondition(Predicate<net.minecraft.world.level.block.state.BlockState> surroundingBlockCondition)
    • setNeededNearbyBlockCondition

      public LocationType setNeededNearbyBlockCondition(Predicate<Set<net.minecraft.world.level.block.Block>> neededNearbyBlockCondition)
    • setSeesSky

      public LocationType setSeesSky(Boolean seesSky)
    • setLocationMutator

      public LocationType setLocationMutator(Consumer<SpawnLocation> mutator)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • of

      public static LocationType of(String name)
    • getPotentialTypes

      public static ArrayList<LocationType> getPotentialTypes(net.minecraft.world.level.block.state.BlockState state)
      Gets all the location types that the given block satisfies the baseBlockCondition for.
    • addPotentialTypes

      public static void addPotentialTypes(ArrayList<LocationType> types, net.minecraft.world.level.block.state.BlockState state)