Class GuiUtils
java.lang.Object
me.desht.pneumaticcraft.client.util.GuiUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddrawFluid(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 appropriatestatic voiddrawPanel(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int panelHeight, int panelWidth) static voiddrawScaledText(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 voidrenderBlockInGui(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 voidrenderProgressingLine2d(net.minecraft.client.gui.GuiGraphics graphics, ProgressingLine line, int color, float lineWidth) Render a progressing line in GUI contextstatic net.minecraft.client.renderer.Rect2ishowPopupHelpScreen(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)
-
Field Details
-
TRANSLATION_LINE_BREAK
- See Also:
-
-
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 stackbounds- bounds in which to drawfluidStack- the fluid to drawtank- 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
-
xlateAndSplit
-
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 stackline- the line to rendercolor- line's colour
-