MCEntityType
Link to mcentitytype
Importing the class
Link to 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.
ZenScript Copyimport crafttweaker.api.entity.MCEntityType;
Implemented Interfaces
Link to implemented-interfaces
MCEntityType implements the following interfaces. That means all methods defined in these interfaces are also available in MCEntityType
Static Methods
Link to static-methods
Name: setNameplateHandler
Sets the global nameplate handler for all EntityTypes.
Return Type: void
ZenScript Copy// MCEntityType.setNameplateHandler(function as INameplateFunction) as void
MCEntityType.setNameplateHandler((entity, result) => {
result.setAllow();
result.content = "Custom name! Position: " + entity.position;
}));
Parameter | Type | Description |
---|---|---|
Parameter function | Type INameplateFunction | Description The function that controls how all EntityType's nameplate are rendered. |
Casters
Link to casters
반환 자료형 | 암묵적 |
---|---|
반환 자료형 EntityIngredient | 암묵적 true |
Methods
Link to methods
Name: getRegistryName
Gets the registry name of this EntityType
Returns: The registry name of this EntityType as a ResourceLocation
Return Type: MCResourceLocation
ZenScript Copy// MCEntityType.getRegistryName() as MCResourceLocation
myMCEntityType.getRegistryName();
Name: setNameplate
Sets the nameplate handler for this EntityType.
Return Type: void
ZenScript Copy// MCEntityType.setNameplate(function as INameplateFunction) as void
myMCEntityType.setNameplate((entity, result) => {
result.setAllow();
result.content = "Custom name! Position: " + entity.position;
}));
Parameter | Type | Description |
---|---|---|
Parameter function | Type INameplateFunction | Description The function that controls how this EntityType's nameplate is rendered. |
연산자
Link to 연산자
Name: OR
ZenScript CopymyMCEntityType | other as EntityIngredient
Properties
Link to properties
이름 | Type | Has Getter | Has Setter | Description |
---|---|---|---|---|
이름 classification | Type MCEntityClassification | Has Getter true | Has Setter false | Description No Description Provided |
이름 commandString | Type string | Has Getter true | Has Setter false | Description No Description Provided |
이름 height | Type float | Has Getter true | Has Setter false | Description No Description Provided |
이름 immuneToFire | Type boolean | Has Getter true | Has Setter false | Description No Description Provided |
이름 lootTable | Type string | Has Getter true | Has Setter false | Description No Description Provided |
이름 name | Type string | Has Getter true | Has Setter false | Description No Description Provided |
이름 registryName | Type MCResourceLocation | Has Getter true | Has Setter false | Description Gets the registry name of this EntityType |
이름 serializable | Type boolean | Has Getter true | Has Setter false | Description No Description Provided |
이름 summonable | Type boolean | Has Getter true | Has Setter false | Description No Description Provided |
이름 translationKey | Type string | Has Getter true | Has Setter false | Description No Description Provided |
이름 width | Type float | Has Getter true | Has Setter false | Description No Description Provided |