public enum SpawnGroup extends Enum<SpawnGroup> implements StringIdentifiable
Enum Constant and Description |
---|
AMBIENT |
CREATURE |
MISC |
MONSTER |
WATER_AMBIENT |
WATER_CREATURE |
Modifier and Type | Field and 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 |
Modifier and Type | Method and 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.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
createCodec, createCodec, method_28142
public static final SpawnGroup MONSTER
public static final SpawnGroup CREATURE
public static final SpawnGroup AMBIENT
public static final SpawnGroup WATER_CREATURE
public static final SpawnGroup WATER_AMBIENT
public static final SpawnGroup MISC
public static final com.mojang.serialization.Codec<SpawnGroup> CODEC
private static final Map<String,SpawnGroup> BY_NAME
private final int capacity
private final boolean peaceful
private final boolean animal
private final String name
private final int despawnStartRange
private final int immediateDespawnRange
public static SpawnGroup[] values()
for (SpawnGroup c : SpawnGroup.values()) System.out.println(c);
public static SpawnGroup valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getName()
public String asString()
asString
in interface StringIdentifiable
public static SpawnGroup byName(String name)
public int getCapacity()
public boolean isPeaceful()
public boolean isAnimal()
public int getImmediateDespawnRange()
public int getDespawnStartRange()