Class GuiUtils

java.lang.Object
me.desht.pneumaticcraft.client.util.GuiUtils

public class GuiUtils extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    bindTexture(net.minecraft.resources.ResourceLocation texture)
     
    static void
    bindTexture(net.minecraft.resources.ResourceLocation texture, float r, float g, float b, float a)
     
    static void
    drawFluid(com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.Rect2i bounds, net.minecraftforge.fluids.FluidStack fluidStack, net.minecraftforge.fluids.IFluidTank tank)
    Draw a fluid texture, tiling as appropriate
    static void
    drawOutline(com.mojang.blaze3d.vertex.PoseStack matrixStack, com.mojang.blaze3d.vertex.BufferBuilder renderer, float x, float y, float z, float width, float height, int red, int green, int blue, int alpha)
     
    static void
    drawPanel(com.mojang.blaze3d.vertex.PoseStack matrixStack, int x, int y, int panelHeight, int panelWidth)
     
    static void
    drawScaledText(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.gui.Font fr, String text, int x, int y, int color, float scale)
     
    static void
    drawTexture(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.resources.ResourceLocation texture, int x, int y)
     
    static void
    drawUntexturedQuad(com.mojang.blaze3d.vertex.PoseStack matrixStack, com.mojang.blaze3d.vertex.BufferBuilder renderer, float x, float y, float z, float width, float height, int red, int green, int blue, int alpha)
     
    static void
    renderBlockInGui(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.world.level.block.state.BlockState block, float x, float y, float z, float rotate, float scale)
     
    static void
    renderProgressingLine2d(com.mojang.blaze3d.vertex.PoseStack matrixStack, ProgressingLine line, int color, float lineWidth)
    Render a progressing line in GUI context
    static net.minecraft.client.renderer.Rect2i
    showPopupHelpScreen(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.gui.screens.Screen screen, net.minecraft.client.gui.Font fontRenderer, List<net.minecraft.network.chat.Component> helpText)
     
    static List<net.minecraft.util.FormattedCharSequence>
    wrapTextComponentList(List<net.minecraft.network.chat.Component> text, int maxWidth, net.minecraft.client.gui.Font font)
     
    static List<net.minecraft.network.chat.Component>
    xlateAndSplit(String key, Object... params)
     

    Methods inherited from class java.lang.Object

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

  • Constructor Details

    • GuiUtils

      public GuiUtils()
  • Method Details

    • renderBlockInGui

      public static void renderBlockInGui(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.world.level.block.state.BlockState block, float x, float y, float z, float rotate, float scale)
    • drawFluid

      public static void drawFluid(com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.Rect2i bounds, @Nullable net.minecraftforge.fluids.FluidStack fluidStack, @Nullable net.minecraftforge.fluids.IFluidTank tank)
      Draw a fluid texture, tiling as appropriate
      Parameters:
      poseStack - the pose stack
      bounds - bounds in which to draw
      fluidStack - the fluid to draw
      tank - a fluid tank; if non-null, fluid Y size is scaled according to the tank's capacity
    • showPopupHelpScreen

      public static net.minecraft.client.renderer.Rect2i showPopupHelpScreen(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.gui.screens.Screen screen, net.minecraft.client.gui.Font fontRenderer, List<net.minecraft.network.chat.Component> helpText)
    • drawPanel

      public static void drawPanel(com.mojang.blaze3d.vertex.PoseStack matrixStack, int x, int y, int panelHeight, int panelWidth)
    • drawTexture

      public static void drawTexture(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.resources.ResourceLocation texture, int x, int y)
    • drawUntexturedQuad

      public static void drawUntexturedQuad(com.mojang.blaze3d.vertex.PoseStack matrixStack, com.mojang.blaze3d.vertex.BufferBuilder renderer, float x, float y, float z, float width, float height, int red, int green, int blue, int alpha)
    • drawOutline

      public static void drawOutline(com.mojang.blaze3d.vertex.PoseStack matrixStack, com.mojang.blaze3d.vertex.BufferBuilder renderer, float x, float y, float z, float width, float height, int red, int green, int blue, int alpha)
    • drawScaledText

      public static void drawScaledText(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.gui.Font fr, String text, int x, int y, int color, float scale)
    • wrapTextComponentList

      public static List<net.minecraft.util.FormattedCharSequence> wrapTextComponentList(List<net.minecraft.network.chat.Component> text, int maxWidth, net.minecraft.client.gui.Font font)
    • xlateAndSplit

      public static List<net.minecraft.network.chat.Component> xlateAndSplit(String key, Object... params)
    • bindTexture

      public static void bindTexture(net.minecraft.resources.ResourceLocation texture, float r, float g, float b, float a)
    • bindTexture

      public static void bindTexture(net.minecraft.resources.ResourceLocation texture)
    • renderProgressingLine2d

      public static void renderProgressingLine2d(com.mojang.blaze3d.vertex.PoseStack matrixStack, ProgressingLine line, int color, float lineWidth)
      Render a progressing line in GUI context
      Parameters:
      matrixStack - the matrix stack
      line - the line to render
      color - line's colour