Home Commands Examples Getting Started With Scripts Global Keywords

MobCategory

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.api.entity.MobCategory;

Implements

MobCategory implements the following interfaces:

StringRepresentable

Undocumented Interfaces

IExtensibleEnum,Comparable<Enum>

Enum Constants

MobCategory is an enum with 8 constants. They are accessible like so:

script.zs
// MobCategory.AMBIENT
<constant:minecraft:mobcategory:ambient>
// MobCategory.AXOLOTLS
<constant:minecraft:mobcategory:axolotls>
// MobCategory.CREATURE
<constant:minecraft:mobcategory:creature>
// MobCategory.MISC
<constant:minecraft:mobcategory:misc>
// MobCategory.MONSTER
<constant:minecraft:mobcategory:monster>
// MobCategory.UNDERGROUND_WATER_CREATURE
<constant:minecraft:mobcategory:underground_water_creature>
// MobCategory.WATER_AMBIENT
<constant:minecraft:mobcategory:water_ambient>
// MobCategory.WATER_CREATURE
<constant:minecraft:mobcategory:water_creature>

Members

Getter
script.zs
// MobCategory.despawnDistance as int
<constant:minecraft:mobcategory:ambient>.despawnDistance

Return Type: int

despawnDistance() as int
script.zs
// MobCategory.despawnDistance() as int;
<constant:minecraft:mobcategory:ambient>.despawnDistance();

Return Type: int

Getter
script.zs
// MobCategory.friendly as bool
<constant:minecraft:mobcategory:ambient>.friendly

Return Type: bool

friendly() as bool
script.zs
// MobCategory.friendly() as bool;
<constant:minecraft:mobcategory:ambient>.friendly();

Return Type: bool

getName() as string
script.zs
// MobCategory.getName() as string;
<constant:minecraft:mobcategory:ambient>.getName();

Return Type: string

Getter
script.zs
// MobCategory.maxInstancesPerChunk as int
<constant:minecraft:mobcategory:ambient>.maxInstancesPerChunk

Return Type: int

maxInstancesPerChunk() as int
script.zs
// MobCategory.maxInstancesPerChunk() as int;
<constant:minecraft:mobcategory:ambient>.maxInstancesPerChunk();

Return Type: int

Getter
script.zs
// MobCategory.noDespawnDistance as int
<constant:minecraft:mobcategory:ambient>.noDespawnDistance

Return Type: int

noDespawnDistance() as int
script.zs
// MobCategory.noDespawnDistance() as int;
<constant:minecraft:mobcategory:ambient>.noDespawnDistance();

Return Type: int

Getter
script.zs
// MobCategory.persistent as bool
<constant:minecraft:mobcategory:ambient>.persistent

Return Type: bool

persistent() as bool
script.zs
// MobCategory.persistent() as bool;
<constant:minecraft:mobcategory:ambient>.persistent();

Return Type: bool

Getter
Gets the serialized name.
script.zs
// MobCategory.serializedName as string
<constant:minecraft:mobcategory:ambient>.serializedName

Return Type: string

serializedName() as string
Gets the serialized name.

Returns: the serialized name.

script.zs
// MobCategory.serializedName() as string;
<constant:minecraft:mobcategory:ambient>.serializedName();

Return Type: string