MountModelEvent

Triggered when an entity mounts a model's hitbox.

This event allows plugins/mods to intercept and potentially cancel the mounting process.

Since

2.0.0

Constructors

Link copied to clipboard
@ApiStatus.Internal
constructor(@NotNull tracker: @NotNull EntityTracker, @NotNull bone: @NotNull RenderedBone, @NotNull hitBox: @NotNull HitBox, @NotNull entity: @NotNull PlatformEntity)
Creates a new MountModelEvent.

Functions

Link copied to clipboard
@NotNull
open fun bone(): @NotNull RenderedBone
Returns the bone associated with the hitbox.
Link copied to clipboard
open fun call(): Boolean
Dispatches this event to the global event bus.
Link copied to clipboard
Returns the entity attempting to mount the hitbox.
Link copied to clipboard
@NotNull
open fun hitbox(): @NotNull HitBox
Returns the hitbox being mounted.
Link copied to clipboard
abstract fun isCancelled(): Boolean
Checks if the event has been canceled.
Link copied to clipboard
abstract fun setCancelled(cancel: Boolean)
Sets the cancellation state of the event.
Link copied to clipboard
@NotNull
open fun tracker(): @NotNull EntityTracker
Returns the entity tracker associated with the model.