EntityType

@CataloguedBy(catalogue = EntityTypes::class)
interface EntityType<out T : Entity> : Keyed, Translatable

A type of entity.

Parameters

T

the type of entity

Functions

Link copied to clipboard
abstract fun isImmuneTo(block: BlockState): Boolean

Checks if entities of this type are immune (they will not be damaged by) the given block.

Link copied to clipboard
@NotNull
abstract fun key(): @NotNull Key
Link copied to clipboard
@NotNull
abstract fun translationKey(): @NotNull String

Properties

Link copied to clipboard
@get:JvmName(name = "category")
abstract val category: EntityCategory

The category entities of this type are part of.

Link copied to clipboard
@get:JvmName(name = "clientTrackingRange")
abstract val clientTrackingRange: Int

The radius of the circle in which the client will track the movement of entities of this type.

Link copied to clipboard
@get:JvmName(name = "height")
abstract val height: Float

The base height of entities of this type.

Link copied to clipboard
@get:JvmName(name = "immuneTo")
abstract val immuneTo: Set<Block>

All blocks that entities of this type will not take damage from.

Link copied to clipboard
abstract val isImmuneToFire: Boolean

If entities of this type are immune to all types of fire damage.

Link copied to clipboard
abstract val isSummonable: Boolean

If this entity type can be summoned, with the /summon command, or by spawning the entity through org.kryptonmc.api.world.World.spawnEntity.

Link copied to clipboard
@get:JvmName(name = "lootTable")
abstract val lootTable: Key

The identifier for the loot table that entities of this type will use to determine what drops they will have when they are killed.

Link copied to clipboard
@get:JvmName(name = "updateInterval")
abstract val updateInterval: Int

The interval between when entities of this type will be updated.

Link copied to clipboard
@get:JvmName(name = "width")
abstract val width: Float

The base width of entities of this type.