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
EffectsInInventory
draws the tooltip lines for a hovered MobEffectInstance
in an AbstractContainerScreen
.
It can be used to modify the tooltip.
This event is only fired on the physical client.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final net.minecraft.world.effect.MobEffectInstance
protected final net.minecraft.client.gui.screens.inventory.AbstractContainerScreen
<?> protected final List
<net.minecraft.network.chat.Component> -
Constructor Summary
ConstructorsConstructorDescriptionGatherEffectScreenTooltipsEvent
(net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<?> screen, net.minecraft.world.effect.MobEffectInstance effectInst, List<net.minecraft.network.chat.Component> tooltip) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.effect.MobEffectInstance
net.minecraft.client.gui.screens.inventory.AbstractContainerScreen
<?> List
<net.minecraft.network.chat.Component>
-
Field Details
-
screen
protected final net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<?> screen -
effectInst
protected final net.minecraft.world.effect.MobEffectInstance effectInst -
tooltip
-
-
Constructor Details
-
GatherEffectScreenTooltipsEvent
public GatherEffectScreenTooltipsEvent(net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<?> screen, net.minecraft.world.effect.MobEffectInstance effectInst, List<net.minecraft.network.chat.Component> tooltip)
-
-
Method Details
-
getScreen
public net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<?> getScreen()- Returns:
- The screen which will be rendering the tooltip lines.
-
getEffectInstance
public net.minecraft.world.effect.MobEffectInstance getEffectInstance()- Returns:
- The effect whose tooltip is being drawn.
-
getTooltip
- Returns:
- A mutable list of tooltip lines.
-