Импорт класса

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
Copy
import crafttweaker.api.entity.EntityType;
Тип результатаЯвляется неявным
Тип результата
EntityIngredient
Является неявным
true

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
ПараметрТипОписание
Параметр
level
Тип
Level
Описание
No Description Provided

Name: create

Return Type: Entity

ZenScript
Copy
EntityType.create(param0 as ServerLevel, param1 as MapData, param2 as Component, param3 as Player, param4 as BlockPos, param5 as MobSpawnType, alignPosition as boolean, invertY as boolean) as Entity
ПараметрТипОписание
Параметр
param0
Тип
ServerLevel
Описание
No Description Provided
Параметр
param1
Тип
MapData
Описание
No Description Provided
Параметр
param2
Тип
Component
Описание
No Description Provided
Параметр
param3
Тип
Player
Описание
No Description Provided
Параметр
param4
Тип
BlockPos
Описание
No Description Provided
Параметр
param5
Тип
MobSpawnType
Описание
No Description Provided
Параметр
alignPosition
Тип
boolean
Описание
No Description Provided
Параметр
invertY
Тип
boolean
Описание
No Description Provided

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
ПараметрТипОписание
Параметр
state
Тип
BlockState
Описание
No Description Provided

Name: isIn

Return Type: boolean

ZenScript
Copy
EntityType.isIn(tag as MCTag<EntityType>) as boolean
ПараметрТипОписание
Параметр
tag
Тип
MCTag<EntityType>
Описание
No Description Provided

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
ПараметрТипОписание
Параметр
level
Тип
ServerLevel
Описание
No Description Provided
Параметр
data
Тип
MapData
Описание
No Description Provided
Параметр
displayName
Тип
Component
Описание
No Description Provided
Параметр
spawningPlayer
Тип
Player
Описание
No Description Provided
Параметр
pos
Тип
BlockPos
Описание
No Description Provided
Параметр
spawnType
Тип
MobSpawnType
Описание
No Description Provided
Параметр
alignPosition
Тип
boolean
Описание
No Description Provided
Параметр
invertY
Тип
boolean
Описание
No Description Provided

Name: toShortString

Return Type: string

ZenScript
Copy
// EntityType.toShortString() as string

myEntityType.toShortString();

Свойства

Link to свойства

НазваниеТипИмеет GetterИмеет SetterОписание
Название
canSpawnFarFromPlayer
Тип
boolean
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
canSummon
Тип
boolean
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
category
Тип
MobCategory
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
commandString
Тип
string
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
defaultLootTable
Тип
ResourceLocation
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
description
Тип
Component
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
descriptionId
Тип
string
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
dimensions
Тип
EntityDimensions
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
fireImmune
Тип
boolean
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
height
Тип
float
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
toShortString
Тип
string
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
width
Тип
float
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided