Class HighlightEvent.Hand

java.lang.Object
dev.myriadclient.api.event.events.HighlightEvent
dev.myriadclient.api.event.events.HighlightEvent.Hand
Enclosing class:
HighlightEvent

public static final class HighlightEvent.Hand extends HighlightEvent
A part of your first-person view model is being drawn this frame: call highlight(HighlightStyle, int) to highlight it. Hand highlights are drawn over the hand, after the world's highlights; nothing is ever in front of the hand, so a style's through walls makes no difference. Parts that look alike connect, so an arm and the item it holds highlighted alike get one outline around both. The first listener to highlight a part wins.

Vanilla only draws a bare arm while the main hand is empty (and around a held map); a hidden hand (a module hiding it) isn't asked about. One instance is reused for every part: don't keep it past the handler.

  • Constructor Details

    • Hand

      @Internal public Hand()
      Core's; only Myriad makes these.
  • Method Details

    • reset

      @Internal public HighlightEvent.Hand reset(HighlightEvent.Hand.Part part, net.minecraft.world.InteractionHand hand, net.minecraft.world.entity.HumanoidArm side, net.minecraft.world.item.ItemStack item, float tickDelta)
      Core's: readies the shared instance for the next part.
    • part

      public HighlightEvent.Hand.Part part()
      Whether it's the bare arm or the held item.
    • hand

      public net.minecraft.world.InteractionHand hand()
      The hand it's in: main or off.
    • side

      public net.minecraft.world.entity.HumanoidArm side()
      The side of the screen it's drawn on (the main hand is on the right unless your main arm is the left).
    • item

      public net.minecraft.world.item.ItemStack item()
      The held item; empty for HighlightEvent.Hand.Part.ARM.
    • tickDelta

      public float tickDelta()
      The partial tick the hand is drawn at.
    • highlight

      public void highlight(@Nullable HighlightStyle style, int color)
      Highlights the part in style and color (ARGB). Ignored if already highlighted, if style is null, or if color's alpha is 0.
    • isHighlighted

      public boolean isHighlighted()
      Whether a handler before this one highlighted it.
    • style

      @Internal public @Nullable HighlightStyle style()
      Core's: the style a handler asked for, or null.
    • color

      @Internal public int color()
      Core's: the colour a handler asked for.