PacketInteractionContext

public final class PacketInteractionContext extends Record

The interaction semantics carried by a client entity-use packet.

Attack packets do not carry a hand, so hand is null for ATTACK. Both interaction actions always carry either HAND or OFF_HAND.

Constructors

Link copied to clipboard
public void PacketInteractionContext(PacketInteractionContext.Action action, @Nullable() @Nullable() EquipmentSlot hand)

Types

Link copied to clipboard
public enum Action

Functions

Link copied to clipboard
Link copied to clipboard
public static PacketInteractionContext interact(EquipmentSlot hand)
Link copied to clipboard
public static PacketInteractionContext interactAt(EquipmentSlot hand)
Link copied to clipboard
public boolean isAttack()

Inherited functions

Link copied to clipboard
public abstract boolean equals(Object p)
Link copied to clipboard
public abstract int hashCode()
Link copied to clipboard
public abstract String toString()