Package net.minecraftforge.client
Class EffectRenderer
java.lang.Object
net.minecraftforge.client.EffectRenderer
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidrenderHUDEffect(MobEffectInstance effect, GuiComponent gui, PoseStack mStack, int x, int y, float z, float alpha)Called to draw the this Potion onto the player's ingame HUD when it's active.abstract voidrenderInventoryEffect(MobEffectInstance effect, EffectRenderingInventoryScreen<?> gui, PoseStack mStack, int x, int y, float z)Called to draw the this Potion onto the player's inventory when it's active.booleanshouldRender(MobEffectInstance effect)If the Potion effect should be displayed in the players inventorybooleanshouldRenderHUD(MobEffectInstance effect)If the Potion effect should be displayed in the player's ingame HUDbooleanshouldRenderInvText(MobEffectInstance effect)If the standard PotionEffect text (name and duration) should be drawn when this potion is active.
-
Field Details
-
DUMMY
-
-
Constructor Details
-
EffectRenderer
public EffectRenderer()
-
-
Method Details
-
shouldRender
If the Potion effect should be displayed in the players inventory- Parameters:
effect- the active PotionEffect- Returns:
- true to display it (default), false to hide it.
-
shouldRenderInvText
If the standard PotionEffect text (name and duration) should be drawn when this potion is active.- Parameters:
effect- the active PotionEffect- Returns:
- true to draw the standard text
-
shouldRenderHUD
If the Potion effect should be displayed in the player's ingame HUD- Parameters:
effect- the active PotionEffect- Returns:
- true to display it (default), false to hide it.
-
renderInventoryEffect
public abstract void renderInventoryEffect(MobEffectInstance effect, EffectRenderingInventoryScreen<?> gui, PoseStack mStack, int x, int y, float z)Called to draw the this Potion onto the player's inventory when it's active. This can be used to e.g. render Potion icons from your own texture.- Parameters:
effect- the active PotionEffectgui- the gui instancemStack- The PoseStackx- the x coordinatey- the y coordinatez- the z level
-
renderHUDEffect
public abstract void renderHUDEffect(MobEffectInstance effect, GuiComponent gui, PoseStack mStack, int x, int y, float z, float alpha)Called to draw the this Potion onto the player's ingame HUD when it's active. This can be used to e.g. render Potion icons from your own texture.- Parameters:
effect- the active PotionEffectgui- the gui instancemStack- The PoseStackx- the x coordinatey- the y coordinatez- the z levelalpha- the alpha value, blinks when the potion is about to run out
-