Package net.minecraft.client.gui
Class DrawableHelper
java.lang.Object
net.minecraft.client.gui.DrawableHelper
- Direct Known Subclasses:
AbstractButtonWidget,AbstractParentElement,AdvancementTab,AdvancementWidget,BossBarHud,ChatHud,DebugHud,InGameHud,Overlay,PlayerListHud,RecipeAlternativesWidget,RecipeBookWidget,SpectatorHud,SubtitlesHud,ToastManager
@Environment(CLIENT) public abstract class DrawableHelper extends Object
- Mappings:
Namespace Name official drhintermediary net/minecraft/class_332named net/minecraft/client/gui/DrawableHelper
-
Field Summary
Fields Modifier and Type Field Description static IdentifierGUI_ICONS_TEXTUREThe texture of various icons and widgets used for rendering ingame indicators.static IdentifierOPTIONS_BACKGROUND_TEXTUREThe texture used by options for background.static IdentifierSTATS_ICON_TEXTUREThe texture of icons used in the stats screen.private intzOffsetThe z offset used byDrawableHelper. -
Constructor Summary
Constructors Constructor Description DrawableHelper() -
Method Summary
Modifier and Type Method Description static voiddrawCenteredString(MatrixStack matrices, TextRenderer textRenderer, String text, int centerX, int y, int color)static voiddrawCenteredText(MatrixStack matrices, TextRenderer textRenderer, Text text, int centerX, int y, int color)protected voiddrawHorizontalLine(MatrixStack matrices, int x1, int x2, int y, int color)static voiddrawSprite(MatrixStack matrices, int x, int y, int z, int width, int height, Sprite sprite)static voiddrawStringWithShadow(MatrixStack matrices, TextRenderer textRenderer, String text, int x, int y, int color)static voiddrawTexture(MatrixStack matrices, int x, int y, float u, float v, int width, int height, int textureWidth, int textureHeight)Draws a textured rectangle from a region in a texture.static voiddrawTexture(MatrixStack matrices, int x, int y, int z, float u, float v, int width, int height, int textureHeight, int textureWidth)Draws a textured rectangle from a region in a texture.static voiddrawTexture(MatrixStack matrices, int x, int y, int width, int height, float u, float v, int regionWidth, int regionHeight, int textureWidth, int textureHeight)Draws a textured rectangle from a region in a texture.voiddrawTexture(MatrixStack matrices, int x, int y, int u, int v, int width, int height)Draws a textured rectangle from a region in a 256x256 texture.private static voiddrawTexture(MatrixStack matrices, int x0, int y0, int x1, int y1, int z, int regionWidth, int regionHeight, float u, float v, int textureWidth, int textureHeight)private static voiddrawTexturedQuad(Matrix4f matrices, int x0, int x1, int y0, int y1, int z, float u0, float u1, float v0, float v1)static voiddrawTextWithShadow(MatrixStack matrices, TextRenderer textRenderer, Text text, int x, int y, int color)protected voiddrawVerticalLine(MatrixStack matrices, int x, int y1, int y2, int color)static voidfill(MatrixStack matrices, int x1, int y1, int x2, int y2, int color)private static voidfill(Matrix4f matrix, int x1, int y1, int x2, int y2, int color)protected voidfillGradient(MatrixStack matrices, int xStart, int yStart, int xEnd, int yEnd, int colorStart, int colorEnd)protected static voidfillGradient(Matrix4f matrix, BufferBuilder bufferBuilder, int xStart, int yStart, int xEnd, int yEnd, int z, int colorStart, int colorEnd)intgetZOffset()voidmethod_29343(int int2, int int3, BiConsumer<Integer,Integer> biConsumer)protected static voidmethod_33284(MatrixStack matrixStack, int int2, int int3, int int4, int int5, int int6, int int7, int int8)voidsetZOffset(int zOffset)
-
Field Details
-
OPTIONS_BACKGROUND_TEXTURE
The texture used by options for background.- Mappings:
Namespace Name Mixin selector official fLdrh;f:Lwb;intermediary field_22735Lnet/minecraft/class_332;field_22735:Lnet/minecraft/class_2960;named OPTIONS_BACKGROUND_TEXTURELnet/minecraft/client/gui/DrawableHelper;OPTIONS_BACKGROUND_TEXTURE:Lnet/minecraft/util/Identifier;
-
STATS_ICON_TEXTURE
The texture of icons used in the stats screen.- Mappings:
Namespace Name Mixin selector official gLdrh;g:Lwb;intermediary field_22736Lnet/minecraft/class_332;field_22736:Lnet/minecraft/class_2960;named STATS_ICON_TEXTURELnet/minecraft/client/gui/DrawableHelper;STATS_ICON_TEXTURE:Lnet/minecraft/util/Identifier;
-
GUI_ICONS_TEXTURE
The texture of various icons and widgets used for rendering ingame indicators.- Mappings:
Namespace Name Mixin selector official hLdrh;h:Lwb;intermediary field_22737Lnet/minecraft/class_332;field_22737:Lnet/minecraft/class_2960;named GUI_ICONS_TEXTURELnet/minecraft/client/gui/DrawableHelper;GUI_ICONS_TEXTURE:Lnet/minecraft/util/Identifier;
-
zOffset
private int zOffsetThe z offset used byDrawableHelper.- Mappings:
Namespace Name Mixin selector official aLdrh;a:Iintermediary field_22734Lnet/minecraft/class_332;field_22734:Inamed zOffsetLnet/minecraft/client/gui/DrawableHelper;zOffset:I
-
-
Constructor Details
-
DrawableHelper
public DrawableHelper()
-
-
Method Details
-
drawHorizontalLine
- Mappings:
Namespace Name Mixin selector official aLdrh;a(Ldlr;IIII)Vintermediary method_25292Lnet/minecraft/class_332;method_25292(Lnet/minecraft/class_4587;IIII)Vnamed drawHorizontalLineLnet/minecraft/client/gui/DrawableHelper;drawHorizontalLine(Lnet/minecraft/client/util/math/MatrixStack;IIII)V
-
drawVerticalLine
- Mappings:
Namespace Name Mixin selector official bLdrh;b(Ldlr;IIII)Vintermediary method_25301Lnet/minecraft/class_332;method_25301(Lnet/minecraft/class_4587;IIII)Vnamed drawVerticalLineLnet/minecraft/client/gui/DrawableHelper;drawVerticalLine(Lnet/minecraft/client/util/math/MatrixStack;IIII)V
-
fill
- Mappings:
Namespace Name Mixin selector official aLdrh;a(Ldlr;IIIII)Vintermediary method_25294Lnet/minecraft/class_332;method_25294(Lnet/minecraft/class_4587;IIIII)Vnamed fillLnet/minecraft/client/gui/DrawableHelper;fill(Lnet/minecraft/client/util/math/MatrixStack;IIIII)V
-
fill
- Mappings:
Namespace Name Mixin selector official aLdrh;a(Lb;IIIII)Vintermediary method_25299Lnet/minecraft/class_332;method_25299(Lnet/minecraft/class_1159;IIIII)Vnamed fillLnet/minecraft/client/gui/DrawableHelper;fill(Lnet/minecraft/util/math/Matrix4f;IIIII)V
-
fillGradient
protected void fillGradient(MatrixStack matrices, int xStart, int yStart, int xEnd, int yEnd, int colorStart, int colorEnd)- Mappings:
Namespace Name Mixin selector official aLdrh;a(Ldlr;IIIIII)Vintermediary method_25296Lnet/minecraft/class_332;method_25296(Lnet/minecraft/class_4587;IIIIII)Vnamed fillGradientLnet/minecraft/client/gui/DrawableHelper;fillGradient(Lnet/minecraft/client/util/math/MatrixStack;IIIIII)V
-
method_33284
protected static void method_33284(MatrixStack matrixStack, int int2, int int3, int int4, int int5, int int6, int int7, int int8)- Mappings:
Namespace Name Mixin selector official aLdrh;a(Ldlr;IIIIIII)Vintermediary method_33284Lnet/minecraft/class_332;method_33284(Lnet/minecraft/class_4587;IIIIIII)Vnamed method_33284Lnet/minecraft/client/gui/DrawableHelper;method_33284(Lnet/minecraft/client/util/math/MatrixStack;IIIIIII)V
-
fillGradient
protected static void fillGradient(Matrix4f matrix, BufferBuilder bufferBuilder, int xStart, int yStart, int xEnd, int yEnd, int z, int colorStart, int colorEnd)- Mappings:
Namespace Name Mixin selector official aLdrh;a(Lb;Ldlm;IIIIIII)Vintermediary method_27533Lnet/minecraft/class_332;method_27533(Lnet/minecraft/class_1159;Lnet/minecraft/class_287;IIIIIII)Vnamed fillGradientLnet/minecraft/client/gui/DrawableHelper;fillGradient(Lnet/minecraft/util/math/Matrix4f;Lnet/minecraft/client/render/BufferBuilder;IIIIIII)V
-
drawCenteredString
public static void drawCenteredString(MatrixStack matrices, TextRenderer textRenderer, String text, int centerX, int y, int color)- Mappings:
Namespace Name Mixin selector official aLdrh;a(Ldlr;Ldrf;Ljava/lang/String;III)Vintermediary method_25300Lnet/minecraft/class_332;method_25300(Lnet/minecraft/class_4587;Lnet/minecraft/class_327;Ljava/lang/String;III)Vnamed drawCenteredStringLnet/minecraft/client/gui/DrawableHelper;drawCenteredString(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/font/TextRenderer;Ljava/lang/String;III)V
-
drawCenteredText
public static void drawCenteredText(MatrixStack matrices, TextRenderer textRenderer, Text text, int centerX, int y, int color)- Mappings:
Namespace Name Mixin selector official aLdrh;a(Ldlr;Ldrf;Loi;III)Vintermediary method_27534Lnet/minecraft/class_332;method_27534(Lnet/minecraft/class_4587;Lnet/minecraft/class_327;Lnet/minecraft/class_2561;III)Vnamed drawCenteredTextLnet/minecraft/client/gui/DrawableHelper;drawCenteredText(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/font/TextRenderer;Lnet/minecraft/text/Text;III)V
-
drawStringWithShadow
public static void drawStringWithShadow(MatrixStack matrices, TextRenderer textRenderer, String text, int x, int y, int color)- Mappings:
Namespace Name Mixin selector official bLdrh;b(Ldlr;Ldrf;Ljava/lang/String;III)Vintermediary method_25303Lnet/minecraft/class_332;method_25303(Lnet/minecraft/class_4587;Lnet/minecraft/class_327;Ljava/lang/String;III)Vnamed drawStringWithShadowLnet/minecraft/client/gui/DrawableHelper;drawStringWithShadow(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/font/TextRenderer;Ljava/lang/String;III)V
-
drawTextWithShadow
public static void drawTextWithShadow(MatrixStack matrices, TextRenderer textRenderer, Text text, int x, int y, int color)- Mappings:
Namespace Name Mixin selector official bLdrh;b(Ldlr;Ldrf;Loi;III)Vintermediary method_27535Lnet/minecraft/class_332;method_27535(Lnet/minecraft/class_4587;Lnet/minecraft/class_327;Lnet/minecraft/class_2561;III)Vnamed drawTextWithShadowLnet/minecraft/client/gui/DrawableHelper;drawTextWithShadow(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/font/TextRenderer;Lnet/minecraft/text/Text;III)V
-
method_29343
- Mappings:
Namespace Name Mixin selector official aLdrh;a(IILjava/util/function/BiConsumer;)Vintermediary method_29343Lnet/minecraft/class_332;method_29343(IILjava/util/function/BiConsumer;)Vnamed method_29343Lnet/minecraft/client/gui/DrawableHelper;method_29343(IILjava/util/function/BiConsumer;)V
-
drawSprite
public static void drawSprite(MatrixStack matrices, int x, int y, int z, int width, int height, Sprite sprite)- Mappings:
Namespace Name Mixin selector official aLdrh;a(Ldlr;IIIIILeru;)Vintermediary method_25298Lnet/minecraft/class_332;method_25298(Lnet/minecraft/class_4587;IIIIILnet/minecraft/class_1058;)Vnamed drawSpriteLnet/minecraft/client/gui/DrawableHelper;drawSprite(Lnet/minecraft/client/util/math/MatrixStack;IIIIILnet/minecraft/client/texture/Sprite;)V
-
drawTexture
Draws a textured rectangle from a region in a 256x256 texture.The Z coordinate of the rectangle is
zOffset.The width and height of the region are the same as the dimensions of the rectangle.
- Parameters:
matrices- the matrix stack used for renderingx- the X coordinate of the rectangley- the Y coordinate of the rectangleu- the left-most coordinate of the texture regionv- the top-most coordinate of the texture regionwidth- the widthheight- the height- Mappings:
Namespace Name Mixin selector official bLdrh;b(Ldlr;IIIIII)Vintermediary method_25302Lnet/minecraft/class_332;method_25302(Lnet/minecraft/class_4587;IIIIII)Vnamed drawTextureLnet/minecraft/client/gui/DrawableHelper;drawTexture(Lnet/minecraft/client/util/math/MatrixStack;IIIIII)V
-
drawTexture
public static void drawTexture(MatrixStack matrices, int x, int y, int z, float u, float v, int width, int height, int textureHeight, int textureWidth)Draws a textured rectangle from a region in a texture.The width and height of the region are the same as the dimensions of the rectangle.
- Parameters:
matrices- the matrix stack used for renderingx- the X coordinate of the rectangley- the Y coordinate of the rectanglez- the Z coordinate of the rectangleu- the left-most coordinate of the texture regionv- the top-most coordinate of the texture regionwidth- the width of the rectangleheight- the height of the rectangletextureHeight- the height of the entire texturetextureWidth- the width of the entire texture- Mappings:
Namespace Name Mixin selector official aLdrh;a(Ldlr;IIIFFIIII)Vintermediary method_25291Lnet/minecraft/class_332;method_25291(Lnet/minecraft/class_4587;IIIFFIIII)Vnamed drawTextureLnet/minecraft/client/gui/DrawableHelper;drawTexture(Lnet/minecraft/client/util/math/MatrixStack;IIIFFIIII)V
-
drawTexture
public static void drawTexture(MatrixStack matrices, int x, int y, int width, int height, float u, float v, int regionWidth, int regionHeight, int textureWidth, int textureHeight)Draws a textured rectangle from a region in a texture.- Parameters:
matrices- the matrix stack used for renderingx- the X coordinate of the rectangley- the Y coordinate of the rectanglewidth- the width of the rectangleheight- the height of the rectangleu- the left-most coordinate of the texture regionv- the top-most coordinate of the texture regionregionWidth- the width of the texture regionregionHeight- the height of the texture regiontextureWidth- the width of the entire texturetextureHeight- the height of the entire texture- Mappings:
Namespace Name Mixin selector official aLdrh;a(Ldlr;IIIIFFIIII)Vintermediary method_25293Lnet/minecraft/class_332;method_25293(Lnet/minecraft/class_4587;IIIIFFIIII)Vnamed drawTextureLnet/minecraft/client/gui/DrawableHelper;drawTexture(Lnet/minecraft/client/util/math/MatrixStack;IIIIFFIIII)V
-
drawTexture
public static void drawTexture(MatrixStack matrices, int x, int y, float u, float v, int width, int height, int textureWidth, int textureHeight)Draws a textured rectangle from a region in a texture.The width and height of the region are the same as the dimensions of the rectangle.
- Parameters:
matrices- the matrix stack used for renderingx- the X coordinate of the rectangley- the Y coordinate of the rectangleu- the left-most coordinate of the texture regionv- the top-most coordinate of the texture regionwidth- the width of the rectangleheight- the height of the rectangletextureWidth- the width of the entire texturetextureHeight- the height of the entire texture- Mappings:
Namespace Name Mixin selector official aLdrh;a(Ldlr;IIFFIIII)Vintermediary method_25290Lnet/minecraft/class_332;method_25290(Lnet/minecraft/class_4587;IIFFIIII)Vnamed drawTextureLnet/minecraft/client/gui/DrawableHelper;drawTexture(Lnet/minecraft/client/util/math/MatrixStack;IIFFIIII)V
-
drawTexture
private static void drawTexture(MatrixStack matrices, int x0, int y0, int x1, int y1, int z, int regionWidth, int regionHeight, float u, float v, int textureWidth, int textureHeight)- Mappings:
Namespace Name Mixin selector official aLdrh;a(Ldlr;IIIIIIIFFII)Vintermediary method_25297Lnet/minecraft/class_332;method_25297(Lnet/minecraft/class_4587;IIIIIIIFFII)Vnamed drawTextureLnet/minecraft/client/gui/DrawableHelper;drawTexture(Lnet/minecraft/client/util/math/MatrixStack;IIIIIIIFFII)V
-
drawTexturedQuad
private static void drawTexturedQuad(Matrix4f matrices, int x0, int x1, int y0, int y1, int z, float u0, float u1, float v0, float v1)- Mappings:
Namespace Name Mixin selector official aLdrh;a(Lb;IIIIIFFFF)Vintermediary method_25295Lnet/minecraft/class_332;method_25295(Lnet/minecraft/class_1159;IIIIIFFFF)Vnamed drawTexturedQuadLnet/minecraft/client/gui/DrawableHelper;drawTexturedQuad(Lnet/minecraft/util/math/Matrix4f;IIIIIFFFF)V
-
getZOffset
public int getZOffset()- Mappings:
Namespace Name Mixin selector official xLdrh;x()Iintermediary method_25305Lnet/minecraft/class_332;method_25305()Inamed getZOffsetLnet/minecraft/client/gui/DrawableHelper;getZOffset()I
-
setZOffset
public void setZOffset(int zOffset)- Mappings:
Namespace Name Mixin selector official dLdrh;d(I)Vintermediary method_25304Lnet/minecraft/class_332;method_25304(I)Vnamed setZOffsetLnet/minecraft/client/gui/DrawableHelper;setZOffset(I)V
-