Class FluidRenderingHelpers

java.lang.Object
top.girlkisser.lazuli.api.client.FluidRenderingHelpers

public final class FluidRenderingHelpers extends Object
Provides helpers for rendering fluids, primarily on GUIs.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    renderFluidGui(net.neoforged.neoforge.fluids.FluidStack fluidStack, net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int width, int height)
    Renders the provided fluid stack in the GUI.
    static void
    renderFluidTankGui(net.neoforged.neoforge.fluids.FluidStack fluidStack, int capacity, net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int tankWidth, int tankHeight)
    Renders the provided fluid stack in the GUI.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • renderFluidGui

      public static void renderFluidGui(net.neoforged.neoforge.fluids.FluidStack fluidStack, net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int width, int height)
      Renders the provided fluid stack in the GUI. This does not handle gaseous fluids, see renderFluidTankGui(FluidStack, int, GuiGraphics, int, int, int, int) for that.
      References: - Getting fluid textures: Create's FluidRenderer - Rendering: (mojmaps) net.minecraft.client.gui.GuiGraphics#innerBlit(ResourceLocation, int, int, int, int, int, float, float, float, float, float, float, float, float)
      Parameters:
      fluidStack - The fluid stack to render.
      graphics - Graphics to render using.
      x - X coordinate for where to render the fluid at.
      y - Y coordinate for where to render the fluid at.
      width - Width of the "tank" in the GUI.
      height - Height of the "tank" in the GUI.
    • renderFluidTankGui

      public static void renderFluidTankGui(net.neoforged.neoforge.fluids.FluidStack fluidStack, int capacity, net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int tankWidth, int tankHeight)
      Renders the provided fluid stack in the GUI.
      Parameters:
      fluidStack - The fluid stack to render.
      capacity - The capacity of the tank.
      graphics - Graphics to render using.
      x - X coordinate for where to render the fluid at.
      y - Y coordinate for where to render the fluid at.
      tankWidth - Width of the "tank" in the GUI.
      tankHeight - Height of the "tank" in the GUI.