Package net.minecraft.entity
Enum EntityClassification
- java.lang.Object
-
- java.lang.Enum<EntityClassification>
-
- net.minecraft.entity.EntityClassification
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<EntityClassification>
,IStringSerializable
,IExtensibleEnum
public enum EntityClassification extends java.lang.Enum<EntityClassification> implements IStringSerializable, IExtensibleEnum
-
-
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 static java.util.Map<java.lang.String,EntityClassification>
BY_NAME
static com.mojang.serialization.Codec<EntityClassification>
CODEC
private int
despawnDistance
private boolean
isFriendly
private boolean
isPersistent
private int
max
private java.lang.String
name
private int
noDespawnDistance
-
Constructor Summary
Constructors Modifier Constructor Description private
EntityClassification(java.lang.String p_i231492_3_, int p_i231492_4_, boolean p_i231492_5_, boolean p_i231492_6_, int p_i231492_7_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static EntityClassification
byName(java.lang.String p_233670_0_)
static EntityClassification
create(java.lang.String name, java.lang.String id, int maxNumberOfCreatureIn, boolean isPeacefulCreatureIn, boolean isAnimalIn, int despawnDistance)
int
getDespawnDistance()
int
getMaxInstancesPerChunk()
java.lang.String
getName()
int
getNoDespawnDistance()
java.lang.String
getSerializedName()
void
init()
Deprecated.boolean
isFriendly()
boolean
isPersistent()
static EntityClassification
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static EntityClassification[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
MONSTER
public static final EntityClassification MONSTER
-
CREATURE
public static final EntityClassification CREATURE
-
AMBIENT
public static final EntityClassification AMBIENT
-
WATER_CREATURE
public static final EntityClassification WATER_CREATURE
-
WATER_AMBIENT
public static final EntityClassification WATER_AMBIENT
-
MISC
public static final EntityClassification MISC
-
-
Field Detail
-
CODEC
public static final com.mojang.serialization.Codec<EntityClassification> CODEC
-
BY_NAME
private static final java.util.Map<java.lang.String,EntityClassification> BY_NAME
-
max
private final int max
-
isFriendly
private final boolean isFriendly
-
isPersistent
private final boolean isPersistent
-
name
private final java.lang.String name
-
noDespawnDistance
private final int noDespawnDistance
- See Also:
- Constant Field Values
-
despawnDistance
private final int despawnDistance
-
-
Method Detail
-
values
public static EntityClassification[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (EntityClassification c : EntityClassification.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EntityClassification valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getName
public java.lang.String getName()
-
getSerializedName
public java.lang.String getSerializedName()
- Specified by:
getSerializedName
in interfaceIStringSerializable
-
byName
public static EntityClassification byName(java.lang.String p_233670_0_)
-
getMaxInstancesPerChunk
public int getMaxInstancesPerChunk()
-
isFriendly
public boolean isFriendly()
-
isPersistent
public boolean isPersistent()
-
create
public static EntityClassification create(java.lang.String name, java.lang.String id, int maxNumberOfCreatureIn, boolean isPeacefulCreatureIn, boolean isAnimalIn, int despawnDistance)
-
init
@Deprecated public void init()
Deprecated.Description copied from interface:IExtensibleEnum
Called by generated factory code to do any post-constructor setup required by the enum. Should not be called manually.- Specified by:
init
in interfaceIExtensibleEnum
-
getDespawnDistance
public int getDespawnDistance()
-
getNoDespawnDistance
public int getNoDespawnDistance()
-
-