Class EffectRenderer

java.lang.Object
net.minecraftforge.client.EffectRenderer

public abstract class EffectRenderer extends Object
  • Field Details

  • Constructor Details

    • EffectRenderer

      public EffectRenderer()
  • Method Details

    • shouldRender

      public boolean shouldRender(MobEffectInstance effect)
      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

      public boolean shouldRenderInvText(MobEffectInstance effect)
      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

      public boolean shouldRenderHUD(MobEffectInstance effect)
      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 effectInstance, EffectRenderingInventoryScreen<?> gui, PoseStack poseStack, 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:
      effectInstance - the effect instance
      gui - the gui instance
      poseStack - the pose stack
      x - the x coordinate
      y - the y coordinate
      z - the z level
    • renderHUDEffect

      public abstract void renderHUDEffect(MobEffectInstance effectInstance, GuiComponent gui, PoseStack poseStack, 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:
      effectInstance - the active PotionEffect
      gui - the gui instance
      poseStack - the pose stack
      x - the x coordinate
      y - the y coordinate
      z - the z level
      alpha - the alpha value, blinks when the potion is about to run out