Data

data class Data(val player: PlayerEntity, val world: World, val hand: Hand, val hitResult: HitResult?, val extra: Any?, val blockEntity: BlockEntity?, val entity: Entity?)(source)

Details about an interaction.

Parameters

player

The interacting player

world

The world the interaction happened in. Must be client world

hand

The player's interacting hand

extra

Extra properties to supply to the filters. Can be mutable

blockEntity

The target block entity. Is null, if entity is not null

entity

The target entity. Is null, if blockEntity is not null

Constructors

Link copied to clipboard
constructor(player: PlayerEntity, world: World, hand: Hand, hitResult: HitResult?, extra: Any?, blockEntity: BlockEntity?, entity: Entity?)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Gets entity if not null, or the entity player is sitting on. Preferred over entity.

Link copied to clipboard
val extra: Any?
Link copied to clipboard
val hand: Hand
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard