InteractionTarget

Represents the target of an interaction. See nested classes for available options.

Inheritors

Types

Link copied to clipboard
class BlockEntity(val blockEntity: BlockEntity) : InteractionTarget

Represents the target of an interaction as a block entity.

Link copied to clipboard
class Computed(val compute: () -> Any?) : InteractionTarget

An interaction target, which gets computed on each game tick, so be sure to write optimized code in order to avoid performance issues.

Link copied to clipboard
class Entity(val entity: Entity) : InteractionTarget

Represents the target of an interaction as an entity.

Link copied to clipboard

Represents an interaction without a target. The interaction data returned by computeInteractionData will always be null as preprocessors are unavailable.

Link copied to clipboard
class Preprocessed(interactionData: Any?) : InteractionTarget

Represents an already processed interaction.

Functions

Link copied to clipboard
abstract fun computeInteractionData(): Any?

Calculates the interaction data by the given target entity.