Class ManaComponent

java.lang.Object
vazkii.botania.client.patchouli.component.ManaComponent
All Implemented Interfaces:
vazkii.patchouli.api.ICustomComponent, vazkii.patchouli.api.IVariablesAvailableCallback

public class ManaComponent extends Object implements vazkii.patchouli.api.ICustomComponent
A custom component that renders a mana bar. It only has one custom parameter, mana, which is a semicolon-separated list of mana values. Setting x to -1 will center the component.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    vazkii.patchouli.api.IVariable
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    build(int componentX, int componentY, int pageNum)
     
    void
    onVariablesAvailable(UnaryOperator<vazkii.patchouli.api.IVariable> lookup, net.minecraft.core.HolderLookup.Provider registries)
     
    void
    render(net.minecraft.client.gui.GuiGraphics gui, vazkii.patchouli.api.IComponentRenderContext context, float pticks, int mouseX, int mouseY)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface vazkii.patchouli.api.ICustomComponent

    mouseClicked, onDisplayed
  • Field Details

    • mana

      public vazkii.patchouli.api.IVariable mana
  • Constructor Details

    • ManaComponent

      public ManaComponent()
  • Method Details

    • build

      public void build(int componentX, int componentY, int pageNum)
      Specified by:
      build in interface vazkii.patchouli.api.ICustomComponent
    • render

      public void render(net.minecraft.client.gui.GuiGraphics gui, vazkii.patchouli.api.IComponentRenderContext context, float pticks, int mouseX, int mouseY)
      Specified by:
      render in interface vazkii.patchouli.api.ICustomComponent
    • onVariablesAvailable

      public void onVariablesAvailable(UnaryOperator<vazkii.patchouli.api.IVariable> lookup, net.minecraft.core.HolderLookup.Provider registries)
      Specified by:
      onVariablesAvailable in interface vazkii.patchouli.api.IVariablesAvailableCallback