Cod

interface Cod : SchoolingFish

A cod.

Functions

Link copied to clipboard
abstract fun addPassenger(entity: Entity)

Adds the given entity as a passenger of this entity.

Link copied to clipboard
abstract fun asBucket(): ItemStack

Creates a new bucket from this entity. Does not remove the entity from the world.

Link copied to clipboard
@NotNull
open fun asHoverEvent(): @NotNull HoverEvent<HoverEvent.ShowEntity>
@NotNull
abstract fun asHoverEvent(@NotNull op: @NotNull UnaryOperator<HoverEvent.ShowEntity>): @NotNull HoverEvent<HoverEvent.ShowEntity>
Link copied to clipboard

Converts this subject to its equivalent Adventure permission checker.

Link copied to clipboard
abstract fun bucket(): ItemStack

Buckets this entity, removing it from the world and returning the created bucket containing this entity.

Link copied to clipboard
open fun clearTitle()
Link copied to clipboard
abstract fun damage(source: DamageSource, damage: Float): Boolean

Damages this entity with the given source.

Link copied to clipboard
open fun deleteMessage(@NotNull signedMessage: @NotNull SignedMessage)
open fun deleteMessage(signature: @NotNull SignedMessage.Signature)
Link copied to clipboard
abstract fun ejectPassengers()

Ejects all passengers from this entity.

Link copied to clipboard
abstract fun ejectVehicle()

Ejects this entity from it's vehicle.

Link copied to clipboard
@NotNull
open fun filterAudience(@NotNull filter: @NotNull Predicate<in Audience>): @NotNull Audience
Link copied to clipboard
open fun forEachAudience(@NotNull action: @NotNull Consumer<in Audience>)
Link copied to clipboard
@NotNull
open operator fun <T : Any> get(@NotNull pointer: @NotNull Pointer<T>): @NotNull Optional<T>
Link copied to clipboard
abstract fun getArmor(slot: ArmorSlot): ItemStack

Gets the armour item that this mob has equipped in the given slot.

Link copied to clipboard
abstract fun getAttribute(type: AttributeType): Attribute?

Gets the attribute for the specified type, or returns null if there is no attribute for the given type.

Link copied to clipboard
abstract fun getEquipment(slot: EquipmentSlot): ItemStack

Gets the equipment item that this mob has equipped in the given slot.

Link copied to clipboard
abstract fun getHeldItem(hand: Hand): ItemStack

Gets the item that this equipable holds in the given hand.

Link copied to clipboard
@Contract(value = "_, null -> _; _, !null -> !null")
@Nullable
open fun <T : Any> getOrDefault(@NotNull pointer: @NotNull Pointer<T>, @Nullable defaultValue: @Nullable T?): @Nullable T?
Link copied to clipboard
open fun <T : Any> getOrDefaultFrom(@NotNull pointer: @NotNull Pointer<T>, @NotNull defaultValue: @NotNull Supplier<out T>): @UnknownNullability T
Link copied to clipboard
abstract fun getPermissionValue(permission: String): TriState

Gets the value for the given permission.

Link copied to clipboard
open fun hasPermission(permission: String): Boolean

Checks if this subject has the given permission.

Link copied to clipboard
open fun hideBossBar(@NotNull bar: @NotNull BossBar)
Link copied to clipboard
@NotNull
abstract fun identity(): @NotNull Identity
Link copied to clipboard
abstract fun isInLava(): Boolean

If this entity is currently touching lava.

Link copied to clipboard
abstract fun isInWater(): Boolean

If this entity is currently touching water.

Link copied to clipboard
abstract fun isPassenger(): Boolean

If this entity is a passenger of another entity.

Link copied to clipboard
abstract fun isUnderwater(): Boolean

If this entity is currently fully submerged under water, meaning its entire hitbox must be under water.

Link copied to clipboard
abstract fun isVehicle(): Boolean

If this entity is a vehicle for another entity.

Link copied to clipboard
open fun openBook(@NotNull book: @NotNull Book)
open fun openBook(book: @NotNull Book.Builder)
Link copied to clipboard
open fun playSound(@NotNull sound: @NotNull Sound)
open fun playSound(@NotNull sound: @NotNull Sound, emitter: @NotNull Sound.Emitter)
open fun playSound(@NotNull sound: @NotNull Sound, x: Double, y: Double, z: Double)
Link copied to clipboard
@NotNull
open fun pointers(): @NotNull Pointers
Link copied to clipboard
abstract fun remove()

Removes this entity from the world it is currently in.

Link copied to clipboard
abstract fun removePassenger(entity: Entity)

Removes the given entity as a passenger of this entity.

Link copied to clipboard
open fun resetTitle()
Link copied to clipboard
open fun sendActionBar(@NotNull message: @NotNull Component)
open fun sendActionBar(@NotNull message: @NotNull ComponentLike)
Link copied to clipboard
open fun sendMessage(@NotNull message: @NotNull Component)
open fun sendMessage(@NotNull message: @NotNull ComponentLike)
open fun sendMessage(@NotNull signedMessage: @NotNull SignedMessage, boundChatType: @NotNull ChatType.Bound)
open fun sendMessage(@NotNull source: @NotNull Identified, @NotNull message: @NotNull Component)
open fun sendMessage(@NotNull source: @NotNull Identified, @NotNull message: @NotNull ComponentLike)
open fun sendMessage(@NotNull source: @NotNull Identity, @NotNull message: @NotNull Component)
open fun sendMessage(@NotNull source: @NotNull Identity, @NotNull message: @NotNull ComponentLike)
@ApiStatus.ScheduledForRemoval(inVersion = "5.0.0")
open fun sendMessage(@NotNull message: @NotNull Component, @NotNull type: @NotNull MessageType)
open fun sendMessage(@NotNull message: @NotNull Component, boundChatType: @NotNull ChatType.Bound)
@ApiStatus.ScheduledForRemoval(inVersion = "5.0.0")
open fun sendMessage(@NotNull message: @NotNull ComponentLike, @NotNull type: @NotNull MessageType)
open fun sendMessage(@NotNull message: @NotNull ComponentLike, boundChatType: @NotNull ChatType.Bound)
@ApiStatus.ScheduledForRemoval(inVersion = "5.0.0")
open fun sendMessage(@NotNull source: @NotNull Identified, @NotNull message: @NotNull Component, @NotNull type: @NotNull MessageType)
@ApiStatus.ScheduledForRemoval(inVersion = "5.0.0")
open fun sendMessage(@NotNull source: @NotNull Identified, @NotNull message: @NotNull ComponentLike, @NotNull type: @NotNull MessageType)
@ApiStatus.ScheduledForRemoval(inVersion = "5.0.0")
open fun sendMessage(@NotNull source: @NotNull Identity, @NotNull message: @NotNull Component, @NotNull type: @NotNull MessageType)
@ApiStatus.ScheduledForRemoval(inVersion = "5.0.0")
open fun sendMessage(@NotNull source: @NotNull Identity, @NotNull message: @NotNull ComponentLike, @NotNull type: @NotNull MessageType)
Link copied to clipboard
open fun sendPlayerListFooter(@NotNull footer: @NotNull Component)
open fun sendPlayerListFooter(@NotNull footer: @NotNull ComponentLike)
Link copied to clipboard
open fun sendPlayerListHeader(@NotNull header: @NotNull Component)
open fun sendPlayerListHeader(@NotNull header: @NotNull ComponentLike)
Link copied to clipboard
open fun sendPlayerListHeaderAndFooter(@NotNull header: @NotNull Component, @NotNull footer: @NotNull Component)
open fun sendPlayerListHeaderAndFooter(@NotNull header: @NotNull ComponentLike, @NotNull footer: @NotNull ComponentLike)
Link copied to clipboard
open fun <T : Any> sendTitlePart(@NotNull part: @NotNull TitlePart<T>, @NotNull value: @NotNull T)
Link copied to clipboard
abstract fun setArmor(slot: ArmorSlot, item: ItemStack)

Sets the armour item that this mob has equipped in the given slot to the given item.

Link copied to clipboard
abstract fun setEquipment(slot: EquipmentSlot, item: ItemStack)

Sets the equipment item that this mob has equipped in the given slot to the given item.

Link copied to clipboard
abstract fun setHeldItem(hand: Hand, item: ItemStack)

Sets the item that this mob holds in the given hand to the given item.

Link copied to clipboard
open fun showBossBar(@NotNull bar: @NotNull BossBar)
Link copied to clipboard
open fun showTitle(@NotNull title: @NotNull Title)
Link copied to clipboard
@NotNull
abstract fun soundSource(): @NotNull Sound.Source
Link copied to clipboard
open fun stopSound(@NotNull sound: @NotNull Sound)
open fun stopSound(@NotNull stop: @NotNull SoundStop)
Link copied to clipboard
open fun teleport(entity: Entity)

Teleports this entity to the given other entity.

abstract fun teleport(position: Position)

Teleports this entity to the given position.

Link copied to clipboard

If this entity was spawned from a bucket.

Properties

Link copied to clipboard
abstract var absorption: Float

The amount of absorption this living entity has.

Link copied to clipboard
abstract val airSupply: Int

How much air this entity has, in ticks.

Link copied to clipboard
abstract val boundingBox: BoundingBox

The current bounding box of this entity. This is used to determine the area in which an entity can be interacted with, also known as a hitbox.

Link copied to clipboard

The sound that is played when the entity is picked up in a bucket.

Link copied to clipboard
abstract val bucketType: ItemType

The type of the bucket this entity can be captured in.

Link copied to clipboard
@get:JvmName(name = "canPickUpLoot")
abstract var canPickUpLoot: Boolean

If this mob can pick up loot.

Link copied to clipboard
abstract var customName: Component?

The custom name of the entity. May be null if the custom name has not been set.

Link copied to clipboard
abstract val deathTime: Int

The number of ticks this entity has been dead for. This is used to control death animations.

Link copied to clipboard
abstract val displayName: Component

The display name of this entity in their current team, if they are in a team.

Link copied to clipboard
abstract val fallDistance: Float

The distance this entity has fallen.

Link copied to clipboard
abstract val frozenTicks: Int

The amount of ticks this entity has been freezing for.

Link copied to clipboard

The goal selector for selecting goals and targets.

Link copied to clipboard
abstract var hand: Hand

The hand the entity is currently using.

Link copied to clipboard
@get:JvmName(name = "hasAI")
abstract var hasAI: Boolean

If this mob has artificial intelligence.

Link copied to clipboard
@get:JvmName(name = "hasGravity")
abstract var hasGravity: Boolean

If this entity is affected by gravity.

Link copied to clipboard
abstract var health: Float

The current health of this entity.

Link copied to clipboard
abstract val hurtTime: Int

The number of ticks this entity will turn red for after being hit.

Link copied to clipboard
abstract val id: Int

The ID of this entity.

Link copied to clipboard
abstract var isAggressive: Boolean

If this mob is hostile.

Link copied to clipboard

If the current custom name is visible or not.

Link copied to clipboard
abstract val isDead: Boolean

If this entity is dead or not.

Link copied to clipboard
abstract var isGliding: Boolean

If this entity is gliding with an elytra.

Link copied to clipboard
abstract var isGlowing: Boolean

If this entity has a glowing outline.

Link copied to clipboard

If this entity is in a riptide spin attack.

Link copied to clipboard
abstract var isInvisible: Boolean

If this entity is invisible.

Link copied to clipboard
abstract var isInvulnerable: Boolean

If this entity should not take damage from any source.

Link copied to clipboard
abstract var isOnFire: Boolean

If this entity is currently on fire.

Link copied to clipboard
abstract val isOnGround: Boolean

If this entity is on terra firma.

Link copied to clipboard
abstract var isPersistent: Boolean

If this mob is persistent (will have its data saved on removal).

Link copied to clipboard
abstract var isSilent: Boolean

If this entity is silenced, meaning it does not produce any sounds.

Link copied to clipboard
abstract var isSneaking: Boolean

If this entity is sneaking.

Link copied to clipboard
abstract var isSprinting: Boolean

If this entity is sprinting.

Link copied to clipboard
abstract var isSwimming: Boolean

If this entity is swimming.

Link copied to clipboard
abstract var isUsingItem: Boolean

If this entity is currently using an item.

Link copied to clipboard
abstract val lastHurtTimestamp: Int

The last time, in ticks, this entity was damaged.

Link copied to clipboard
abstract var mainHand: MainHand

The main hand of this mob.

Link copied to clipboard
abstract val maxHealth: Float

The maximum health of this entity.

Link copied to clipboard
abstract val name: String

The name of the sender.

Link copied to clipboard
abstract val navigator: Navigator

The navigator used for pathfinding.

Link copied to clipboard
abstract val passengers: List<Entity>

The passengers this entity currently has.

Link copied to clipboard
abstract val position: Position

The current position of this entity.

Link copied to clipboard
abstract val remainingFireTicks: Int

This value can mean one of two things, depending on if the value is positive or negative.

Link copied to clipboard
abstract val scheduler: Scheduler

The scheduler for this entity.

Link copied to clipboard
abstract val server: Server

The server that the sender is on.

Link copied to clipboard
abstract var sleepingPosition: Vec3i?

The current position this entity is sleeping at.

Link copied to clipboard
abstract val team: Team?

If the member is currently part of a team, the team the member is part of.

Link copied to clipboard

How this member will be represented in a team.

Link copied to clipboard
abstract val ticksExisted: Int

The amount of ticks this entity has existed for.

Link copied to clipboard
abstract val type: EntityType<Entity>

The type of this entity.

Link copied to clipboard
abstract val uuid: UUID

The UUID of this entity.

Link copied to clipboard
abstract val vehicle: Entity?

The entity that this entity is a passenger of.

Link copied to clipboard
abstract var velocity: Vec3d

The current delta X, Y, and Z values of this entity, in metres per tick.

Link copied to clipboard
abstract val world: World

The world this entity is currently in.