Home Commands Examples Getting Started With Scripts Global Keywords
BracketDumpers BracketHandlers BracketValidators ResourceLocationBracketHandler

EntityType

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

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

Implements

Undocumented Interfaces

FeatureElement,EntityTypeTest<Entity, Entity>

Operators

|(other as CTEntityIngredient) as CTEntityIngredient
script.zs
// (EntityType<T : Entity> | (other as CTEntityIngredient)) as CTEntityIngredient
myEntityType | myCTEntityIngredient

Parameters:

Return Type: EntityIngredient

Members

implicit as CTEntityIngredient
script.zs
// EntityType<T : Entity> as CTEntityIngredient
myEntityType as CTEntityIngredient

Return Type: EntityIngredient

Getter
script.zs
// EntityType<T : Entity>.canSpawnFarFromPlayer as bool
myEntityType.canSpawnFarFromPlayer

Return Type: bool

canSpawnFarFromPlayer() as bool
script.zs
// EntityType<T : Entity>.canSpawnFarFromPlayer() as bool;
myEntityType.canSpawnFarFromPlayer();

Return Type: bool

Getter
script.zs
// EntityType<T : Entity>.canSummon as bool
myEntityType.canSummon

Return Type: bool

canSummon() as bool
script.zs
// EntityType<T : Entity>.canSummon() as bool;
myEntityType.canSummon();

Return Type: bool

Getter
script.zs
// EntityType<T : Entity>.category as MobCategory
myEntityType.category

Return Type: MobCategory

category() as MobCategory
script.zs
// EntityType<T : Entity>.category() as MobCategory;
myEntityType.category();

Return Type: MobCategory

Getter
script.zs
// EntityType<T : Entity>.commandString as string
myEntityType.commandString

Return Type: string

create(level as Level) as Entity
script.zs
// EntityType<T : Entity>.create(level as Level) as Entity;
myEntityType.create(myLevel);

Parameters:

level Type: Level

Return Type: Entity

Getter
script.zs
// EntityType<T : Entity>.defaultLootTable as ResourceLocation
myEntityType.defaultLootTable

Return Type: ResourceLocation

defaultLootTable() as ResourceLocation
script.zs
// EntityType<T : Entity>.defaultLootTable() as ResourceLocation;
myEntityType.defaultLootTable();

Return Type: ResourceLocation

Getter
script.zs
// EntityType<T : Entity>.description as Component
myEntityType.description

Return Type: Component

description() as Component
script.zs
// EntityType<T : Entity>.description() as Component;
myEntityType.description();

Return Type: Component

Getter
script.zs
// EntityType<T : Entity>.descriptionId as string
myEntityType.descriptionId

Return Type: string

descriptionId() as string
script.zs
// EntityType<T : Entity>.descriptionId() as string;
myEntityType.descriptionId();

Return Type: string

Getter
script.zs
// EntityType<T : Entity>.dimensions as EntityDimensions
myEntityType.dimensions

Return Type: EntityDimensions

dimensions() as EntityDimensions
script.zs
// EntityType<T : Entity>.dimensions() as EntityDimensions;
myEntityType.dimensions();

Return Type: EntityDimensions

Getter
script.zs
// EntityType<T : Entity>.fireImmune as bool
myEntityType.fireImmune

Return Type: bool

fireImmune() as bool
script.zs
// EntityType<T : Entity>.fireImmune() as bool;
myEntityType.fireImmune();

Return Type: bool

Getter
script.zs
// EntityType<T : Entity>.height as float
myEntityType.height

Return Type: float

height() as float
script.zs
// EntityType<T : Entity>.height() as float;
myEntityType.height();

Return Type: float

isBlockDangerous(state as BlockState) as bool
script.zs
// EntityType<T : Entity>.isBlockDangerous(state as BlockState) as bool;
myEntityType.isBlockDangerous(myBlockState);

Parameters:

state Type: BlockState

Return Type: bool

isIn(tag as KnownTag<EntityType<Entity>>) as bool
script.zs
// EntityType<T : Entity>.isIn(tag as KnownTag<EntityType<Entity>>) as bool;
myEntityType.isIn(myKnownTag);

Parameters:

Return Type: bool

Getter
script.zs
// EntityType<T : Entity>.registryName as ResourceLocation
myEntityType.registryName

Return Type: ResourceLocation

registryName() as ResourceLocation
script.zs
// EntityType<T : Entity>.registryName() as ResourceLocation;
myEntityType.registryName();

Return Type: ResourceLocation

spawn(level as ServerLevel, spawnStack as IItemStack, spawningPlayer as Player, position as BlockPos, spawnType as MobSpawnType, alignPosition as bool, invertY as bool) as Entity
script.zs
// EntityType<T : Entity>.spawn(level as ServerLevel, spawnStack as IItemStack, spawningPlayer as Player, position as BlockPos, spawnType as MobSpawnType, alignPosition as bool, invertY as bool) as Entity;
myEntityType.spawn(myServerLevel, myIItemStack, myPlayer, myBlockPos, myMobSpawnType, myBool, myBool);

Parameters:

level Type: ServerLevel
spawnStack Type: IItemStack
spawningPlayer Type: Player
position Type: BlockPos
spawnType Type: MobSpawnType
alignPosition Type: bool
invertY Type: bool

Return Type: Entity

spawn(level as ServerLevel, position as BlockPos, spawnType as MobSpawnType) as Entity
script.zs
// EntityType<T : Entity>.spawn(level as ServerLevel, position as BlockPos, spawnType as MobSpawnType) as Entity;
myEntityType.spawn(myServerLevel, myBlockPos, myMobSpawnType);

Parameters:

level Type: ServerLevel
position Type: BlockPos
spawnType Type: MobSpawnType

Return Type: Entity

spawn(level as ServerLevel, data as MapData, onSpawn as function(t as Entity) as void, position as BlockPos, spawnType as MobSpawnType, alignPosition as bool, invertY as bool) as Entity
script.zs
// EntityType<T : Entity>.spawn(level as ServerLevel, data as MapData, onSpawn as function(t as Entity) as void, position as BlockPos, spawnType as MobSpawnType, alignPosition as bool, invertY as bool) as Entity;
myEntityType.spawn(myServerLevel, myMapData, myConsumer, myBlockPos, myMobSpawnType, myBool, myBool);

Parameters:

level Type: ServerLevel
data Type: MapData
onSpawn Type: function(t as Entity) as void
position Type: BlockPos
spawnType Type: MobSpawnType
alignPosition Type: bool
invertY Type: bool

Return Type: Entity

Getter
script.zs
// EntityType<T : Entity>.toShortString as string
myEntityType.toShortString

Return Type: string

toShortString() as string
script.zs
// EntityType<T : Entity>.toShortString() as string;
myEntityType.toShortString();

Return Type: string

Getter
script.zs
// EntityType<T : Entity>.width as float
myEntityType.width

Return Type: float

width() as float
script.zs
// EntityType<T : Entity>.width() as float;
myEntityType.width();

Return Type: float