Enum Class SpawnLocationType

java.lang.Object
java.lang.Enum<SpawnLocationType>
com.pixelmonmod.pixelmon.entities.SpawnLocationType
All Implemented Interfaces:
Serializable, Comparable<SpawnLocationType>, Constable

public enum SpawnLocationType extends Enum<SpawnLocationType>
Enum representation of spawn location.
  • Enum Constant Details

  • Method Details

    • values

      public static SpawnLocationType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SpawnLocationType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getSpawnLocation

      public net.minecraft.core.BlockPos getSpawnLocation(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos xy)
    • getSpawnLocations

      public static SpawnLocationType[] getSpawnLocations(ArrayList<String> list)
      Gets the spawn locations from a list of string representations of spawn locations.
      Parameters:
      list - A list of string representations of spawn locations.
      Returns:
      An array of spawn locations corresponding to the list's contents.
    • getSpawnLocation

      public static SpawnLocationType getSpawnLocation(String location)
      Gets the spawn location from a string
      Parameters:
      location - The string representation of that spawn location
      Returns:
      The spawn location corresponding to the string or null if there is no match
    • getFromIndex

      public static SpawnLocationType getFromIndex(int integer)
      Gets a spawn location from its enum index.
      Parameters:
      integer - The index of the spawn location enum.
      Returns:
      The corresponding spawn location, or null if the index is out of bounds.
    • nextLocation

      public static SpawnLocationType nextLocation(SpawnLocationType spawnLocation)
      Gets the next spawn location (in enum index order) from an existing one.
      Parameters:
      spawnLocation - The current spawn location.
      Returns:
      The next spawn location.
    • contains

      public static boolean contains(SpawnLocationType[] locations, SpawnLocationType location)
      Checks if an array of spawn locations contains a certain type of spawn location.
      Parameters:
      locations - The array of spawn locations to search.
      location - The spawn location to find.
      Returns:
      Whether the array of spawn locations contains the specified spawn location.
    • containsOnly

      public static boolean containsOnly(SpawnLocationType[] locations, SpawnLocationType location)
      Checks if an array of spawn locations contains a certain type of spawn location and no other locations.
      Parameters:
      locations - The array of spawn locations to search.
      location - The spawn location to find.
      Returns:
      Whether the array of spawn locations contains the specified spawn location and no other locations.
    • getLocalizedName

      public String getLocalizedName()
      Gets the localized name of the spawn location.
      Returns:
      The localized name of the spawn location.