Class GatherEffectScreenTooltipsEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.GatherEffectScreenTooltipsEvent
public class GatherEffectScreenTooltipsEvent
extends net.neoforged.bus.api.Event
This event is called when the cursor is hovering over an
MobEffectInstance rendered by
EffectsInInventory in an AbstractContainerScreen.
It can be used to create or modify the tooltip.
This event is only fired on the physical client.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final MobEffectInstanceprotected final AbstractContainerScreen<?> -
Constructor Summary
ConstructorsConstructorDescriptionGatherEffectScreenTooltipsEvent(AbstractContainerScreen<?> screen, MobEffectInstance effectInst, List<Component> tooltip) -
Method Summary
Modifier and TypeMethodDescriptionReturns The effect whose tooltip is being drawn.Returns the screen which will be rendering the tooltip lines.Returns a mutable list of tooltip lines.
-
Field Details
-
screen
-
effectInst
-
tooltip
-
-
Constructor Details
-
GatherEffectScreenTooltipsEvent
public GatherEffectScreenTooltipsEvent(AbstractContainerScreen<?> screen, MobEffectInstance effectInst, List<Component> tooltip)
-
-
Method Details
-
getScreen
Returns the screen which will be rendering the tooltip lines.- Returns:
- the screen which will be rendering the tooltip lines
-
getEffectInstance
Returns The effect whose tooltip is being drawn.- Returns:
- The effect whose tooltip is being drawn
-
getTooltip
Returns a mutable list of tooltip lines. If this list is empty, no tooltip will be rendered.This list will be initially empty when hovering over an effect widget which has no tooltip by default (when the effect information is fully visible).
- Returns:
- a mutable list of tooltip lines
-