java.lang.Object
design.aeonic.nifty.api.client.screen.input.AbstractGizmo
design.aeonic.nifty.api.client.screen.input.gizmos.FluidStackGizmo
All Implemented Interfaces:
Gizmo

public class FluidStackGizmo extends AbstractGizmo
  • Constructor Details

    • FluidStackGizmo

      public FluidStackGizmo(int x, int y, int width, int height, Supplier<FluidStack> fluidStack)
      Parameters:
      x - the x position
      y - the y position
      width - the width
      height - the height
      fluidStack - the fluid stack
    • FluidStackGizmo

      public FluidStackGizmo(int x, int y, int width, int height, Supplier<FluidStack> fluidStack, @Nullable Supplier<Integer> capacity)
      Parameters:
      x - the x position
      y - the y position
      width - the width
      height - the height
      fluidStack - the fluid stack
      capacity - the capacity, used to render partially full tanks - if null will just fill the given height
    • FluidStackGizmo

      public FluidStackGizmo(int x, int y, Supplier<FluidStack> fluidStack, @Nullable Supplier<Integer> capacity, @Nonnull Texture tankOverlay)
      Parameters:
      x - the x position
      y - the y position
      fluidStack - the fluid stack
      capacity - the capacity, used to render partially full tanks - if null will just fill the given height
      tankOverlay - the tank overlay texture - nonnull; this constructor infers dimensions from the texture size
    • FluidStackGizmo

      public FluidStackGizmo(int x, int y, int width, int height, Supplier<FluidStack> fluidStack, @Nullable Supplier<Integer> capacity, @Nullable Texture tankOverlay)
      Parameters:
      x - the x position
      y - the y position
      width - the width
      height - the height
      fluidStack - the fluid stack
      capacity - the capacity, used to render partially full tanks - if null will just fill the given height
      tankOverlay - the tank overlay texture, if null will not render an overlay
  • Method Details

    • draw

      public void draw(com.mojang.blaze3d.vertex.PoseStack stack, GizmoScreen screen, int mouseX, int mouseY, float partialTicks)
    • getTooltip

      @Nullable public List<net.minecraft.network.chat.Component> getTooltip(GizmoScreen screen, int mouseX, int mouseY)
    • getTooltipStyle

      public TooltipStyle getTooltipStyle(GizmoScreen screen, int mouseX, int mouseY)
    • getWidth

      public int getWidth()
    • setWidth

      public void setWidth(int width)
    • getHeight

      public int getHeight()
    • setHeight

      public void setHeight(int height)