Class InteractEvent

java.lang.Object
dev.myriadclient.api.event.Cancellable
dev.myriadclient.api.event.events.InteractEvent
Direct Known Subclasses:
InteractEvent.Block, InteractEvent.EntityTarget, InteractEvent.Item

public abstract class InteractEvent extends Cancellable
The local player is about to right-click: a block, an item in the air, or an entity. Posted for clicks from the mouse and from features alike. Cancel to stop the interaction: nothing is sent and vanilla treats it as failed. Posted on the render thread, only while something listens.
  • Constructor Details

    • InteractEvent

      protected InteractEvent(net.minecraft.world.InteractionHand hand)
      Core's; addons don't make these.
  • Method Details

    • hand

      public net.minecraft.world.InteractionHand hand()
      The hand used: main or off (vanilla tries the main hand first, then the off hand).