Package net.minecraft.world.entity
Enum Class MobCategory
- All Implemented Interfaces:
Serializable
,Comparable<MobCategory>
,Constable
,StringRepresentable
,IExtensibleEnum
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface net.minecraft.util.StringRepresentable
StringRepresentable.EnumCodec<E extends Enum<E> & StringRepresentable>, StringRepresentable.StringRepresentableCodec<S extends StringRepresentable>
-
Enum Constant Summary
Enum ConstantDescription -
Field Summary
Modifier and TypeFieldDescriptionprivate static final Map<String,
MobCategory> static final com.mojang.serialization.Codec<MobCategory>
private final int
private final boolean
private final boolean
private final int
private final String
private final int
Fields inherited from interface net.minecraft.util.StringRepresentable
PRE_BUILT_MAP_THRESHOLD
-
Constructor Summary
ModifierConstructorDescriptionprivate
MobCategory
(String p_21597_, int p_21598_, boolean p_21599_, boolean p_21600_, int p_21601_) -
Method Summary
Modifier and TypeMethodDescriptionstatic MobCategory
static MobCategory
create
(String name, String id, int maxNumberOfCreatureIn, boolean isPeacefulCreatureIn, boolean isAnimalIn, int despawnDistance) int
int
getName()
int
void
init()
Deprecated.boolean
boolean
static MobCategory
Returns the enum constant of this class with the specified name.static MobCategory[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MONSTER
-
CREATURE
-
AMBIENT
-
AXOLOTLS
-
UNDERGROUND_WATER_CREATURE
-
WATER_CREATURE
-
WATER_AMBIENT
-
MISC
-
-
Field Details
-
CODEC
-
BY_NAME
-
max
private final int max -
isFriendly
private final boolean isFriendly -
isPersistent
private final boolean isPersistent -
name
-
noDespawnDistance
private final int noDespawnDistance- See Also:
-
despawnDistance
private final int despawnDistance
-
-
Constructor Details
-
MobCategory
private MobCategory(String p_21597_, int p_21598_, boolean p_21599_, boolean p_21600_, int p_21601_)
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getName
-
getSerializedName
- Specified by:
getSerializedName
in interfaceStringRepresentable
-
getMaxInstancesPerChunk
public int getMaxInstancesPerChunk() -
isFriendly
public boolean isFriendly() -
isPersistent
public boolean isPersistent() -
create
public static MobCategory create(String name, String id, int maxNumberOfCreatureIn, boolean isPeacefulCreatureIn, boolean isAnimalIn, int despawnDistance) -
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
-
byName
-
getDespawnDistance
public int getDespawnDistance() -
getNoDespawnDistance
public int getNoDespawnDistance()
-