MobCategory
Link to mobcategory
Импорт класса
Link to импорт-класса
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 Copyimport crafttweaker.api.entity.MobCategory;
Implemented Interfaces
Link to implemented-interfaces
MobCategory implements the following interfaces. That means all methods defined in these interfaces are also available in MobCategory
Enum Constants
Link to enum-constants
MobCategory is an enum. It has 8 enum constants. They are accessible using the code below.
ZenScript Copy<constant:minecraft:mobcategory:monster>
<constant:minecraft:mobcategory:creature>
<constant:minecraft:mobcategory:ambient>
<constant:minecraft:mobcategory:axolotls>
<constant:minecraft:mobcategory:underground_water_creature>
<constant:minecraft:mobcategory:water_creature>
<constant:minecraft:mobcategory:water_ambient>
<constant:minecraft:mobcategory:misc>
Методы
Link to методы
Name: getDespawnDistance
Return Type: int
ZenScript Copy// MobCategory.getDespawnDistance() as int
myMobCategory.getDespawnDistance();
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();
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();
Свойства
Link to свойства
Название | Тип | Имеет Getter | Имеет Setter |
---|---|---|---|
Название despawnDistance | Тип int | Имеет Getter true | Имеет Setter false |
Название friendly | Тип boolean | Имеет Getter true | Имеет Setter false |
Название maxInstancesPerChunk | Тип int | Имеет Getter true | Имеет Setter false |
Название noDespawnDistance | Тип int | Имеет Getter true | Имеет Setter false |
Название persistent | Тип boolean | Имеет Getter true | Имеет Setter false |