Skip to content

InteractionType

Package: com.hypixel.hytale.protocol

public enum InteractionType

Identifies the trigger type for an interaction, covering primary/secondary attacks, abilities, item use, collisions, projectile events, wielding, and equipment changes.

ConstantOrdinalDescription
Primary0Left-click / primary attack.
Secondary1Right-click / secondary action.
Ability12First ability slot.
Ability23Second ability slot.
Ability34Third ability slot.
Use5Generic use action on a block or entity.
Pick6Middle-click / block picking.
Pickup7Item pickup trigger.
CollisionEnter8Fired when entity enters a collision volume.
CollisionLeave9Fired when entity exits a collision volume.
Collision10Fired while entity remains in a collision volume.
EntityStatEffect11Triggered by an entity stat threshold.
SwapTo12Triggered when this item is selected in the hotbar.
SwapFrom13Triggered when this item is deselected from the hotbar.
Death14Triggered on entity death.
Wielding15Idle/wielding loop while item is held.
ProjectileSpawn16Triggered when a projectile is spawned.
ProjectileHit17Triggered when a projectile hits a target.
ProjectileMiss18Triggered when a projectile misses.
ProjectileBounce19Triggered when a projectile bounces.
Held20Triggered while the item is held in the main hand.
HeldOffhand21Triggered while the item is held in the off hand.
Equipped22Triggered when the item is equipped as armor.
Dodge23Triggered by a dodge action.
GameModeSwap24Triggered on game mode change.
public int getValue()

Returns the integer wire value for this InteractionType constant.

public static InteractionType fromValue(int value)

Returns the InteractionType constant for the given wire value. Throws ProtocolException if the value is out of range.

Serialized as a single byte (024). The static VALUES array is used for O(1) lookup by ordinal.

Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.