MCEntityClassification #MC实体分类
Link to mcentityclassification-mc实体分类
导入类
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.MCEntityClassification;
Enum Constants
Link to enum-constants
MCEntityClassification is an enum. It has 6 enum constants. They are accessible using the code below.
ZenScript CopyMCEntityClassification.MONSTER
MCEntityClassification.CREATURE
MCEntityClassification.AMBIENT
MCEntityClassification.WATER_CREATURE
MCEntityClassification.WATER_AMBIENT
MCEntityClassification.MISC
使用方式
Link to 使用方式
Name: getCommandString
Gets the command string for this EntityClassification
Returns: The command string for this EntityClassification
Return Type: string
ZenScript Copy// MCEntityClassification.getCommandString() as string
<entityclassification:monster>.getCommandString();
Name: getMaxNumberOfCreature
Gets how many Entities with this EntityClassification can be in the same area at the same time.
Returns: How many Entities of this EntityClassification can be in the same area at the same time.
Return Type: int
ZenScript Copy// MCEntityClassification.getMaxNumberOfCreature() as int
<entityclassification:monster>.getMaxNumberOfCreature();
Name: getName
Gets the name of this Entity Classification
Returns: The name of this Entity Classification
Return Type: string
ZenScript Copy// MCEntityClassification.getName() as string
<entityclassification:monster>.getName();
Name: isAnimal
Checks if this EntityClassification is an animal.
Returns: True if this EntityClassification is an animal. False otherwise.
Return Type: boolean
ZenScript Copy// MCEntityClassification.isAnimal() as boolean
<entityclassification:monster>.isAnimal();
Name: isPeacefulCreature
Checks if this EntityClassification is peaceful.
Returns: True if this EntityClassification is peaceful. False otherwise.
Return Type: boolean
ZenScript Copy// MCEntityClassification.isPeacefulCreature() as boolean
<entityclassification:monster>.isPeacefulCreature();
名称 | 类型 | 可获得 | 可设置 | 描述 |
---|---|---|---|---|
名称 commandString #命令字符串 | 类型 string | 可获得 true | 可设置 false | 描述 Gets the command string for this EntityClassification |
名称 isAnimal #识别为动物 | 类型 布尔值 | 可获得 true | 可设置 false | 描述 Checks if this EntityClassification is an animal. |
名称 isPeaceful #友好生物 | 类型 布尔值 | 可获得 true | 可设置 false | 描述 Checks if this EntityClassification is peaceful. |
名称 maxNumberOfEntity #实体最大值 | 类型 int | 可获得 true | 可设置 false | 描述 Gets how many Entities with this EntityClassification can be in the same area at the same time. |
名称 name(名称) | 类型 string | 可获得 true | 可设置 false | 描述 Gets the name of this Entity Classification |