Class HighlightEvent.Hand
java.lang.Object
dev.myriadclient.api.event.events.HighlightEvent
dev.myriadclient.api.event.events.HighlightEvent.Hand
- Enclosing class:
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.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class HighlightEvent
HighlightEvent.EntityHighlight, HighlightEvent.Hand -
Field Summary
Fields inherited from class HighlightEvent
ENTITY_HIGHLIGHT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcolor()Core's: the colour a handler asked for.net.minecraft.world.InteractionHandhand()The hand it's in: main or off.voidhighlight(@Nullable HighlightStyle style, int color) Highlights the part instyleandcolor(ARGB).booleanWhether a handler before this one highlighted it.net.minecraft.world.item.ItemStackitem()The held item; empty forHighlightEvent.Hand.Part.ARM.part()Whether it's the bare arm or the held item.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.net.minecraft.world.entity.HumanoidArmside()The side of the screen it's drawn on (the main hand is on the right unless your main arm is the left).@Nullable HighlightStylestyle()Core's: the style a handler asked for, or null.floatThe partial tick the hand is drawn at.
-
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
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 forHighlightEvent.Hand.Part.ARM. -
tickDelta
public float tickDelta()The partial tick the hand is drawn at. -
highlight
Highlights the part instyleandcolor(ARGB). Ignored if already highlighted, ifstyleis null, or ifcolor's alpha is 0. -
isHighlighted
public boolean isHighlighted()Whether a handler before this one highlighted it. -
style
Core's: the style a handler asked for, or null. -
color
@Internal public int color()Core's: the colour a handler asked for.
-