Class GuiUtils
java.lang.Object
me.desht.pneumaticcraft.client.util.GuiUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbindTexture(net.minecraft.resources.ResourceLocation texture) static voidbindTexture(net.minecraft.resources.ResourceLocation texture, float r, float g, float b, float a) static voiddrawFluid(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 appropriatestatic voiddrawOutline(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 voiddrawPanel(com.mojang.blaze3d.vertex.PoseStack matrixStack, int x, int y, int panelHeight, int panelWidth) static voiddrawScaledText(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.gui.Font fr, String text, int x, int y, int color, float scale) static voiddrawTexture(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.resources.ResourceLocation texture, int x, int y) static voiddrawUntexturedQuad(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 voidrenderBlockInGui(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 voidrenderProgressingLine2d(com.mojang.blaze3d.vertex.PoseStack matrixStack, ProgressingLine line, int color, float lineWidth) Render a progressing line in GUI contextstatic net.minecraft.client.renderer.Rect2ishowPopupHelpScreen(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)
-
Field Details
-
TRANSLATION_LINE_BREAK
- See Also:
-
-
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 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(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
-
xlateAndSplit
-
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 stackline- the line to rendercolor- line's colour
-