Class MountModelEvent
java.lang.Object
kr.toxicity.model.api.event.MountModelEvent
- All Implemented Interfaces:
CancellableEvent, ModelEvent
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
-
Constructor Summary
ConstructorsConstructorDescriptionMountModelEvent(@NotNull EntityTracker tracker, @NotNull RenderedBone bone, @NotNull HitBox hitBox, @NotNull PlatformEntity entity) Creates a new MountModelEvent. -
Method Summary
Modifier and TypeMethodDescription@NotNull RenderedBonebone()Returns the bone associated with the hitbox.entity()Returns the entity attempting to mount the hitbox.@NotNull HitBoxhitbox()Returns the hitbox being mounted.@NotNull EntityTrackertracker()Returns the entity tracker associated with the model.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CancellableEvent
call, isCancelled, setCancelled
-
Constructor Details
-
MountModelEvent
@Internal public MountModelEvent(@NotNull @NotNull EntityTracker tracker, @NotNull @NotNull RenderedBone bone, @NotNull @NotNull HitBox hitBox, @NotNull @NotNull PlatformEntity entity) Creates a new MountModelEvent.- Parameters:
tracker- the entity tracker associated with the modelbone- the bone associated with the hitboxhitBox- the hitbox being mountedentity- the entity attempting to mount- Since:
- 2.0.0
-
-
Method Details
-
tracker
Returns the entity tracker associated with the model.- Returns:
- the entity tracker
- Since:
- 2.0.0
-
bone
Returns the bone associated with the hitbox.- Returns:
- the rendered bone
- Since:
- 2.0.0
-
hitbox
Returns the hitbox being mounted.- Returns:
- the hitbox
- Since:
- 2.0.0
-
entity
Returns the entity attempting to mount the hitbox.- Returns:
- the passenger entity
- Since:
- 2.0.0
-