Importare la Classe

Link to importare-la-classe

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

ZenScript
Copy
import crafttweaker.api.entity.MobCategory;

Interfacce Implementate

Link to interfacce-implementate

MobCategory implements the following interfaces. That means all methods defined in these interfaces are also available in MobCategory

MobCategory is an enum. It has 7 enum constants. They are accessible using the code below.

ZenScript
Copy
MobCategory.MONSTER
MobCategory.CREATURE
MobCategory.AMBIENT
MobCategory.UNDERGROUND_WATER_CREATURE
MobCategory.WATER_CREATURE
MobCategory.WATER_AMBIENT
MobCategory.MISC

Link to getDespawnDistance

Name: getDespawnDistance

Return Type: int

ZenScript
Copy
// MobCategory.getDespawnDistance() as int

myMobCategory.getDespawnDistance();

Link to getMaxInstancesPerChunk

Name: getMaxInstancesPerChunk

Return Type: int

ZenScript
Copy
// MobCategory.getMaxInstancesPerChunk() as int

myMobCategory.getMaxInstancesPerChunk();

Name: getName

Return Type: string

ZenScript
Copy
// MobCategory.getName() as string

myMobCategory.getName();

Link to getNoDespawnDistance

Name: getNoDespawnDistance

Return Type: int

ZenScript
Copy
// MobCategory.getNoDespawnDistance() as int

myMobCategory.getNoDespawnDistance();

Name: isFriendly

Return Type: boolean

ZenScript
Copy
// MobCategory.isFriendly() as boolean

myMobCategory.isFriendly();

Name: isPersistent

Return Type: boolean

ZenScript
Copy
// MobCategory.isPersistent() as boolean

myMobCategory.isPersistent();
NomeTipoHa GetterHa SetterDescrizione
Nome
despawnDistance
Tipo
int
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
friendly
Tipo
boolean
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
maxInstancesPerChunk
Tipo
int
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
noDespawnDistance
Tipo
int
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
persistent
Tipo
boolean
Ha Getter
Ha Setter
no
Descrizione
No Description Provided