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.EntityType;
Result TypeImplicito
Result Type
EntityIngredient
Implicito

Link to canSpawnFarFromPlayer

Name: canSpawnFarFromPlayer

Return Type: boolean

ZenScript
Copy
// EntityType.canSpawnFarFromPlayer() as boolean

myEntityType.canSpawnFarFromPlayer();

Name: canSummon

Return Type: boolean

ZenScript
Copy
// EntityType.canSummon() as boolean

myEntityType.canSummon();

Name: create

Return Type: Entity?

ZenScript
Copy
EntityType.create(level as Level) as Entity?
ParametroTipo
Parametro
level
Tipo
Level

Name: create

Return Type: Entity?

ZenScript
Copy
EntityType.create(level as ServerLevel, data as MapData?, displayName as Component?, spawningPlayer as Player?, pos as BlockPos, spawnType as MobSpawnType, alignPosition as boolean, invertY as boolean) as Entity?
ParametroTipo
Parametro
level
Tipo
ServerLevel
Parametro
data
Tipo
MapData?
Parametro
displayName
Tipo
Component?
Parametro
spawningPlayer
Tipo
Player?
Parametro
pos
Tipo
BlockPos
Parametro
spawnType
Tipo
MobSpawnType
Parametro
alignPosition
Tipo
boolean
Parametro
invertY
Tipo
boolean

Name: fireImmune

Return Type: boolean

ZenScript
Copy
// EntityType.fireImmune() as boolean

myEntityType.fireImmune();

Name: getCategory

Return Type: MobCategory

ZenScript
Copy
// EntityType.getCategory() as MobCategory

myEntityType.getCategory();

Link to getDefaultLootTable

Name: getDefaultLootTable

Return Type: ResourceLocation

ZenScript
Copy
// EntityType.getDefaultLootTable() as ResourceLocation

myEntityType.getDefaultLootTable();

Name: getDescription

Return Type: Component

ZenScript
Copy
// EntityType.getDescription() as Component

myEntityType.getDescription();

Link to getDescriptionId

Name: getDescriptionId

Return Type: string

ZenScript
Copy
// EntityType.getDescriptionId() as string

myEntityType.getDescriptionId();

Name: getDimensions

Return Type: EntityDimensions

ZenScript
Copy
// EntityType.getDimensions() as EntityDimensions

myEntityType.getDimensions();

Name: getHeight

Return Type: float

ZenScript
Copy
// EntityType.getHeight() as float

myEntityType.getHeight();

Name: getWidth

Return Type: float

ZenScript
Copy
// EntityType.getWidth() as float

myEntityType.getWidth();

Link to isBlockDangerous

Name: isBlockDangerous

Return Type: boolean

ZenScript
Copy
EntityType.isBlockDangerous(state as BlockState) as boolean
ParametroTipo
Parametro
state
Tipo
BlockState

Name: isIn

Return Type: boolean

ZenScript
Copy
EntityType.isIn(tag as KnownTag<EntityType<Entity>>) as boolean
ParametroTipo
Parametro
tag
Tipo
KnownTag<EntityType<Entity>>

Name: spawn

Return Type: Entity?

ZenScript
Copy
EntityType.spawn(level as ServerLevel, data as MapData?, displayName as Component?, spawningPlayer as Player?, pos as BlockPos, spawnType as MobSpawnType, alignPosition as boolean, invertY as boolean) as Entity?
ParametroTipo
Parametro
level
Tipo
ServerLevel
Parametro
data
Tipo
MapData?
Parametro
displayName
Tipo
Component?
Parametro
spawningPlayer
Tipo
Player?
Parametro
pos
Tipo
BlockPos
Parametro
spawnType
Tipo
MobSpawnType
Parametro
alignPosition
Tipo
boolean
Parametro
invertY
Tipo
boolean

Name: toShortString

Return Type: string

ZenScript
Copy
// EntityType.toShortString() as string

myEntityType.toShortString();
NomeTipoHa GetterHa Setter
Nome
canSpawnFarFromPlayer
Tipo
boolean
Ha Getter
Ha Setter
no
Nome
canSummon
Tipo
boolean
Ha Getter
Ha Setter
no
Nome
category
Tipo
MobCategory
Ha Getter
Ha Setter
no
Nome
commandString
Tipo
string
Ha Getter
Ha Setter
no
Nome
defaultLootTable
Tipo
ResourceLocation
Ha Getter
Ha Setter
no
Nome
description
Tipo
Component
Ha Getter
Ha Setter
no
Nome
descriptionId
Tipo
string
Ha Getter
Ha Setter
no
Nome
dimensions
Tipo
EntityDimensions
Ha Getter
Ha Setter
no
Nome
fireImmune
Tipo
boolean
Ha Getter
Ha Setter
no
Nome
height
Tipo
float
Ha Getter
Ha Setter
no
Nome
toShortString
Tipo
string
Ha Getter
Ha Setter
no
Nome
width
Tipo
float
Ha Getter
Ha Setter
no