Package top.girlkisser.lazuli.api.client
Class FluidRenderingHelpers
java.lang.Object
top.girlkisser.lazuli.api.client.FluidRenderingHelpers
Provides helpers for rendering fluids, primarily on GUIs.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidrenderFluidGui(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 voidrenderFluidTankGui(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.
-
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, seerenderFluidTankGui(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.
-