Enum SpawnGroup

java.lang.Object
java.lang.Enum<SpawnGroup>
net.minecraft.entity.SpawnGroup
All Implemented Interfaces:
Serializable, Comparable<SpawnGroup>, java.lang.constant.Constable, StringIdentifiable

public enum SpawnGroup
extends Enum<SpawnGroup>
implements StringIdentifiable
  • Enum Constant Details

    • MONSTER

      public static final SpawnGroup MONSTER
    • CREATURE

      public static final SpawnGroup CREATURE
    • AMBIENT

      public static final SpawnGroup AMBIENT
    • WATER_CREATURE

      public static final SpawnGroup WATER_CREATURE
    • WATER_AMBIENT

      public static final SpawnGroup WATER_AMBIENT
    • MISC

      public static final SpawnGroup MISC
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<SpawnGroup> CODEC
    • BY_NAME

      private static final Map<String,​SpawnGroup> BY_NAME
    • capacity

      private final int capacity
    • peaceful

      private final boolean peaceful
    • animal

      private final boolean animal
    • name

      private final String name
    • despawnStartRange

      private final int despawnStartRange
      See Also:
      Constant Field Values
    • immediateDespawnRange

      private final int immediateDespawnRange
  • Constructor Details

    • SpawnGroup

      private SpawnGroup​(String name, int spawnCap, boolean peaceful, boolean bool, int int2)
  • Method Details

    • values

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

      public static SpawnGroup valueOf​(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null
    • getName

      public String getName()
    • asString

      public String asString()
      Specified by:
      asString in interface StringIdentifiable
    • byName

      public static SpawnGroup byName​(String name)
    • getCapacity

      public int getCapacity()
    • isPeaceful

      public boolean isPeaceful()
    • isAnimal

      public boolean isAnimal()
    • getImmediateDespawnRange

      public int getImmediateDespawnRange()
    • getDespawnStartRange

      public int getDespawnStartRange()