MountInteraction
Package: com.hypixel.hytale.builtin.mounts.interactions
public class MountInteraction extends SimpleInstantInteractionAn entity interaction that mounts the interacting player onto a target entity. Registered on Interaction.CODEC with the key "Mount" by MountPlugin.
public static final BuilderCodec<MountInteraction> CODECExtends SimpleInstantInteraction.CODEC with:
AttachmentOffset(Vector3f) — position offset from the mount point. Defaults to(0, 0, 0).Controller(MountControllerenum) — the mount controller type. Required (validated non-null).
Behavior
Section titled “Behavior”@Overrideprotected void firstRun(@Nonnull InteractionType type, @Nonnull InteractionContext context, @Nonnull CooldownHandler cooldownHandler)- If no target entity exists, sets state to
Failed. - If the player already has a MountedComponent, removes it (dismounts) and sets state to
Failed. - If the target already has passengers (non-empty MountedByComponent), sets state to
Failed. - Otherwise, adds a
MountedComponentto the player targeting the entity with the configured attachment offset and controller.
Related Types
Section titled “Related Types”- MountPlugin — registers this interaction
- MountedComponent — created by this interaction
- MountedByComponent — checked for existing passengers
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.