Package net.minecraft.entity
Enum SpawnGroup
- All Implemented Interfaces:
Serializable
,Comparable<SpawnGroup>
,java.lang.constant.Constable
,StringIdentifiable
public enum SpawnGroup extends Enum<SpawnGroup> implements StringIdentifiable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants Enum Constant Description AMBIENT
CREATURE
MISC
MONSTER
WATER_AMBIENT
WATER_CREATURE
-
Field Summary
Fields Modifier and Type Field Description private boolean
animal
private static Map<String,SpawnGroup>
BY_NAME
private int
capacity
static com.mojang.serialization.Codec<SpawnGroup>
CODEC
private int
despawnStartRange
private int
immediateDespawnRange
private String
name
private boolean
peaceful
-
Constructor Summary
Constructors Modifier Constructor Description private
SpawnGroup(String name, int spawnCap, boolean peaceful, boolean bool, int int2)
-
Method Summary
Modifier and Type Method Description String
asString()
static SpawnGroup
byName(String name)
int
getCapacity()
int
getDespawnStartRange()
int
getImmediateDespawnRange()
String
getName()
boolean
isAnimal()
boolean
isPeaceful()
static SpawnGroup
valueOf(String name)
Returns the enum constant of this type with the specified name.static SpawnGroup[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
MONSTER
-
CREATURE
-
AMBIENT
-
WATER_CREATURE
-
WATER_AMBIENT
-
MISC
-
-
Field Details
-
CODEC
-
BY_NAME
-
capacity
private final int capacity -
peaceful
private final boolean peaceful -
animal
private final boolean animal -
name
-
despawnStartRange
private final int despawnStartRange- See Also:
- Constant Field Values
-
immediateDespawnRange
private final int immediateDespawnRange
-
-
Constructor Details
-
SpawnGroup
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getName
-
asString
- Specified by:
asString
in interfaceStringIdentifiable
-
byName
-
getCapacity
public int getCapacity() -
isPeaceful
public boolean isPeaceful() -
isAnimal
public boolean isAnimal() -
getImmediateDespawnRange
public int getImmediateDespawnRange() -
getDespawnStartRange
public int getDespawnStartRange()
-