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
    drawFluid(net.minecraft.client.gui.GuiGraphics graphics, 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
    drawPanel(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int panelHeight, int panelWidth)
     
    static void
    drawScaledText(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.client.gui.Font fr, net.minecraft.network.chat.Component text, int x, int y, int color, float scale, boolean dropShadow)
     
    static void
    renderBlockInGui(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.world.level.block.state.BlockState block, float x, float y, float z, float rotate, float scale)
     
    static void
    renderProgressingLine2d(net.minecraft.client.gui.GuiGraphics graphics, ProgressingLine line, int color, float lineWidth)
    Render a progressing line in GUI context
    static net.minecraft.client.renderer.Rect2i
    showPopupHelpScreen(net.minecraft.client.gui.GuiGraphics graphics, 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(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.world.level.block.state.BlockState block, float x, float y, float z, float rotate, float scale)
    • drawFluid

      public static void drawFluid(net.minecraft.client.gui.GuiGraphics graphics, 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:
      graphics - 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(net.minecraft.client.gui.GuiGraphics graphics, 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(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int panelHeight, int panelWidth)
    • drawScaledText

      public static void drawScaledText(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.client.gui.Font fr, net.minecraft.network.chat.Component text, int x, int y, int color, float scale, boolean dropShadow)
    • 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)
    • renderProgressingLine2d

      public static void renderProgressingLine2d(net.minecraft.client.gui.GuiGraphics graphics, ProgressingLine line, int color, float lineWidth)
      Render a progressing line in GUI context
      Parameters:
      graphics - the matrix stack
      line - the line to render
      color - line's colour