Success

data class Success(val swing: Boolean = false, val action: ItemAction? = null) : InteractionResult

An interaction completed successfully, stop processing further handlers.

Constructors

Link copied to clipboard
constructor(swing: Boolean = false, action: ItemAction? = null)

Properties

Link copied to clipboard

The action to perform on the item used for the interaction.

Link copied to clipboard

Whether the interacting entity's hand should swing. Note that depending on client-side predictions, a hand swing may occur even if this is set to false.

Link copied to clipboard

Whether the held item was involved in the interaction.

Functions

Link copied to clipboard
fun performActions(entity: LivingEntity, hand: EquipmentSlot, applyPostUseSideEffects: Boolean = entity.activeItemRemainingTime == 0)

Performs the actions associated with this result as if it was entity that used hand. Conditionally applies post-use side effects based on applyPostUseSideEffects.