Interface IClientMobEffectExtensions
public interface IClientMobEffectExtensions
Client-only extensions to 
MobEffect.- See Also:
- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptiondefault booleanisVisibleInGui(MobEffectInstance instance) Queries whether the given effect should be shown in the HUD.default booleanisVisibleInInventory(MobEffectInstance instance) Queries whether the given effect should be shown in the player's inventory.static IClientMobEffectExtensionsstatic IClientMobEffectExtensionsof(MobEffectInstance instance) default booleanrenderGuiIcon(MobEffectInstance instance, Gui gui, GuiGraphics guiGraphics, int x, int y, float z, float alpha) Renders the icon of the specified effect on the player's HUD.default booleanrenderInventoryIcon(MobEffectInstance instance, EffectRenderingInventoryScreen<?> screen, GuiGraphics guiGraphics, int x, int y, int blitOffset) Renders the icon of the specified effect in the player's inventory.default booleanrenderInventoryText(MobEffectInstance instance, EffectRenderingInventoryScreen<?> screen, GuiGraphics guiGraphics, int x, int y, int blitOffset) Renders the text of the specified effect in the player's inventory.
- 
Field Details- 
DEFAULT
 
- 
- 
Method Details- 
of
- 
of
- 
isVisibleInInventoryQueries whether the given effect should be shown in the player's inventory.By default, this returns true.
- 
isVisibleInGuiQueries whether the given effect should be shown in the HUD.By default, this returns true.
- 
renderInventoryIcondefault boolean renderInventoryIcon(MobEffectInstance instance, EffectRenderingInventoryScreen<?> screen, GuiGraphics guiGraphics, int x, int y, int blitOffset) Renders the icon of the specified effect in the player's inventory. This can be used to render icons from your own texture sheet.- Parameters:
- instance- The effect instance
- screen- The effect-rendering screen
- guiGraphics- The gui graphics
- x- The x coordinate
- y- The y coordinate
- blitOffset- The blit offset
- Returns:
- true to prevent default rendering, false otherwise
 
- 
renderInventoryTextdefault boolean renderInventoryText(MobEffectInstance instance, EffectRenderingInventoryScreen<?> screen, GuiGraphics guiGraphics, int x, int y, int blitOffset) Renders the text of the specified effect in the player's inventory.- Parameters:
- instance- The effect instance
- screen- The effect-rendering screen
- guiGraphics- The gui graphics
- x- The x coordinate
- y- The y coordinate
- blitOffset- The blit offset
- Returns:
- true to prevent default rendering, false otherwise
 
- 
renderGuiIcondefault boolean renderGuiIcon(MobEffectInstance instance, Gui gui, GuiGraphics guiGraphics, int x, int y, float z, float alpha) Renders the icon of the specified effect on the player's HUD. This can be used to render icons from your own texture sheet.- Parameters:
- instance- The effect instance
- gui- The gui
- guiGraphics- The gui graphics
- x- The x coordinate
- y- The y coordinate
- z- The z depth
- alpha- The alpha value. Blinks when the effect is about to run out
- Returns:
- true to prevent default rendering, false otherwise
 
 
-