Home Migration Guide Getting Started With Scripts Commands Examples
BracketHandlers

MCEntityClassification

Importing the class

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.

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

Enum Constants

MCEntityClassification is an enum. It has 6 enum constants. They are accessible using the code below.

script.zs
MCEntityClassification.MONSTER
MCEntityClassification.CREATURE
MCEntityClassification.AMBIENT
MCEntityClassification.WATER_CREATURE
MCEntityClassification.WATER_AMBIENT
MCEntityClassification.MISC

Methods

Gets the command string for this EntityClassification

Returns: The command string for this EntityClassification
Return Type: string

script.zs
// MCEntityClassification.getCommandString() as string
<entityclassification:monster>.getCommandString();

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

script.zs
// MCEntityClassification.getMaxNumberOfCreature() as int
<entityclassification:monster>.getMaxNumberOfCreature();

Gets the name of this Entity Classification

Returns: The name of this Entity Classification
Return Type: string

script.zs
// MCEntityClassification.getName() as string
<entityclassification:monster>.getName();

Checks if this EntityClassification is an animal.

Returns: True if this EntityClassification is an animal. False otherwise.
Return Type: boolean

script.zs
// MCEntityClassification.isAnimal() as boolean
<entityclassification:monster>.isAnimal();

Checks if this EntityClassification is peaceful.

Returns: True if this EntityClassification is peaceful. False otherwise.
Return Type: boolean

script.zs
// MCEntityClassification.isPeacefulCreature() as boolean
<entityclassification:monster>.isPeacefulCreature();

Properties

NameTypeHas GetterHas SetterDescription
Name
commandString
Type
string
Has Getter
true
Has Setter
false
Description
Gets the command string for this EntityClassification
Name
isAnimal
Type
boolean
Has Getter
true
Has Setter
false
Description
Checks if this EntityClassification is an animal.
Name
isPeaceful
Type
boolean
Has Getter
true
Has Setter
false
Description
Checks if this EntityClassification is peaceful.
Name
maxNumberOfEntity
Type
int
Has Getter
true
Has Setter
false
Description
Gets how many Entities with this EntityClassification can be in the same area at the same time.
Name
name
Type
string
Has Getter
true
Has Setter
false
Description
Gets the name of this Entity Classification