Class GuiGraphics
java.lang.Object
net.minecraft.client.gui.GuiGraphics
- All Implemented Interfaces:
IGuiGraphicsExtension
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumprivate classprivate static classA utility class for managing a stack of screen rectangles for scissoring. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate @Nullable Styleprivate @Nullable Runnableprivate static final intprivate final GuiRenderStateprivate final TextureAtlasprivate @Nullable Styleprivate final Minecraftprivate final intprivate final intprivate CursorTypeprivate final Matrix3x2fStackprivate final GuiGraphics.ScissorStackprivate final SpriteGetterprivate ItemStackFields inherited from interface IGuiGraphicsExtension
DEFAULT_BACKGROUND_COLOR, DEFAULT_BORDER_COLOR_END, DEFAULT_BORDER_COLOR_START, INVALID, RESET_CHAR, TEXT_COLOR_CODES, UNDO_CHAR, VALID -
Constructor Summary
ConstructorsModifierConstructorDescriptionGuiGraphics(Minecraft minecraft, GuiRenderState guiRenderState, int mouseX, int mouseY) privateGuiGraphics(Minecraft minecraft, Matrix3x2fStack pose, GuiRenderState guiRenderState, int mouseX, int mouseY) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyCursor(Window window) voidblit(RenderPipeline renderPipeline, Identifier texture, int x, int y, float u, float v, int width, int height, int textureWidth, int textureHeight) voidblit(RenderPipeline renderPipeline, Identifier texture, int x, int y, float u, float v, int width, int height, int textureWidth, int textureHeight, int color) voidblit(RenderPipeline renderPipeline, Identifier texture, int x, int y, float u, float v, int width, int height, int srcWidth, int srcHeight, int textureWidth, int textureHeight) voidblit(RenderPipeline renderPipeline, Identifier texture, int x, int y, float u, float v, int width, int height, int srcWidth, int srcHeight, int textureWidth, int textureHeight, int color) voidblit(GpuTextureView textureView, GpuSampler sampler, int x0, int y0, int x1, int y1, float u0, float u1, float v0, float v1) voidblit(Identifier location, int x0, int y0, int x1, int y1, float u0, float u1, float v0, float v1) private voidblitNineSlicedSprite(RenderPipeline renderPipeline, TextureAtlasSprite sprite, GuiSpriteScaling.NineSlice nineSlice, int x, int y, int width, int height, int color) private voidblitNineSliceInnerSegment(RenderPipeline renderPipeline, GuiSpriteScaling.NineSlice nineSlice, TextureAtlasSprite sprite, int x, int y, int width, int height, int textureX, int textureY, int textureWidth, int textureHeight, int spriteWidth, int spriteHeight, int color) voidblitSprite(RenderPipeline renderPipeline, TextureAtlasSprite sprite, int x, int y, int width, int height) voidblitSprite(RenderPipeline renderPipeline, TextureAtlasSprite sprite, int x, int y, int width, int height, int color) private voidblitSprite(RenderPipeline renderPipeline, TextureAtlasSprite sprite, int spriteWidth, int spriteHeight, int textureX, int textureY, int x, int y, int width, int height, int color) voidblitSprite(RenderPipeline renderPipeline, Identifier location, int x, int y, int width, int height) voidblitSprite(RenderPipeline renderPipeline, Identifier location, int x, int y, int width, int height, float alpha) voidblitSprite(RenderPipeline renderPipeline, Identifier location, int x, int y, int width, int height, int color) voidblitSprite(RenderPipeline renderPipeline, Identifier location, int spriteWidth, int spriteHeight, int textureX, int textureY, int x, int y, int width, int height) voidblitSprite(RenderPipeline renderPipeline, Identifier location, int spriteWidth, int spriteHeight, int textureX, int textureY, int x, int y, int width, int height, int color) private voidblitTiledSprite(RenderPipeline renderPipeline, TextureAtlasSprite sprite, int x, int y, int width, int height, int textureX, int textureY, int tileWidth, int tileHeight, int spriteWidth, int spriteHeight, int color) voidbooleancontainsPointInScissor(int x, int y) private ActiveTextCollector.ParameterscreateDefaultTextParameters(float opacity) voidvoiddrawCenteredString(Font font, String str, int x, int y, int color) Draws a centered string at the specified coordinates using the given font, text, and color.voiddrawCenteredString(Font font, Component text, int x, int y, int color) Draws a centered string at the specified coordinates using the given font, text component, and color.voiddrawCenteredString(Font font, FormattedCharSequence text, int x, int y, int color) Draws a centered string at the specified coordinates using the given font, formatted character sequence, and color.voiddrawString(Font font, @Nullable String str, int x, int y, int color) voiddrawString(Font font, @Nullable String str, int x, int y, int color, boolean dropShadow) voiddrawString(Font font, Component str, int x, int y, int color) voiddrawString(Font font, Component str, int x, int y, int color, boolean dropShadow) voiddrawString(Font font, FormattedCharSequence str, int x, int y, int color) voiddrawString(Font font, FormattedCharSequence str, int x, int y, int color, boolean dropShadow) voiddrawStringWithBackdrop(Font font, Component str, int textX, int textY, int textWidth, int textColor) voiddrawWordWrap(Font font, FormattedText string, int x, int y, int w, int col) Draws a formatted text with word wrapping at the specified coordinates using the given font, text, line width, and color.voiddrawWordWrap(Font font, FormattedText string, int x, int y, int w, int col, boolean dropShadow) voidenableScissor(int x0, int y0, int x1, int y1) Enables scissoring with the specified screen coordinates.voidfill(int x0, int y0, int x1, int y1, int col) Fills a rectangle with the specified color using the given coordinates as the boundaries.voidfill(RenderPipeline pipeline, int x0, int y0, int x1, int y1, int col) voidfill(RenderPipeline renderPipeline, TextureSetup textureSetup, int x0, int y0, int x1, int y1) voidfillGradient(int x0, int y0, int x1, int y1, int col1, int col2) Fills a rectangle with a gradient color from colorFrom to colorTo using the given coordinates as the boundaries.private static GuiSpriteScalinggetSpriteScaling(TextureAtlasSprite sprite) intintguiWidth()voidhLine(int x0, int x1, int y, int col) Draws a horizontal line from minX to maxX at the specified y-coordinate with the given color.private voidinnerBlit(RenderPipeline renderPipeline, Identifier location, int x0, int x1, int y0, int y1, float u0, float u1, float v0, float v1, int color) void@Nullable ScreenRectangleNeo: Returns the top-most scissor rectangle, if present, for use with customGuiElementRenderStates andPictureInPictureRenderStatespose()voidrenderComponentHoverEffect(Font font, @Nullable Style hoveredStyle, int xMouse, int yMouse) Renders a hover effect for a text component at the specified mouse coordinates.voidvoidrenderFakeItem(ItemStack itemStack, int x, int y) Renders a fake item stack at the specified coordinates.voidrenderFakeItem(ItemStack itemStack, int x, int y, int seed) private voidrenderItem(@Nullable LivingEntity owner, @Nullable Level level, ItemStack itemStack, int x, int y, int seed) Renders an item stack for a living entity in a specific level at the specified coordinates with a random seed.voidrenderItem(LivingEntity owner, ItemStack itemStack, int x, int y, int seed) Renders an item stack for a living entity at the specified coordinates with a random seed.voidrenderItem(ItemStack itemStack, int x, int y) Renders an item stack at the specified coordinates.voidrenderItem(ItemStack itemStack, int x, int y, int seed) Renders an item stack at the specified coordinates with a random seed.private voidrenderItemBar(ItemStack itemStack, int x, int y) private voidrenderItemCooldown(ItemStack itemStack, int x, int y) private voidrenderItemCount(Font font, ItemStack itemStack, int x, int y, @Nullable String countText) voidrenderItemDecorations(Font font, ItemStack itemStack, int x, int y) Renders additional decorations for an item stack at the specified coordinates.voidrenderItemDecorations(Font font, ItemStack itemStack, int x, int y, @Nullable String countText) Renders additional decorations for an item stack at the specified coordinates with optional custom text.voidrenderOutline(int x, int y, int width, int height, int color) voidrenderTooltip(Font font, List<ClientTooltipComponent> lines, int xo, int yo, ClientTooltipPositioner positioner, @Nullable Identifier style) voidrenderTooltip(Font font, List<ClientTooltipComponent> lines, int xo, int yo, ClientTooltipPositioner positioner, @Nullable Identifier style, ItemStack tooltipStack) voidrequestCursor(CursorType cursorType) voidsetComponentTooltipForNextFrame(Font font, List<? extends FormattedText> tooltips, int mouseX, int mouseY, ItemStack stack) voidsetComponentTooltipForNextFrame(Font font, List<? extends FormattedText> tooltips, int mouseX, int mouseY, ItemStack stack, @Nullable Identifier backgroundTexture) voidsetComponentTooltipForNextFrame(Font font, List<Component> lines, int xo, int yo) voidsetComponentTooltipForNextFrame(Font font, List<Component> lines, int xo, int yo, @Nullable Identifier style) voidsetComponentTooltipFromElementsForNextFrame(Font font, List<com.mojang.datafixers.util.Either<FormattedText, TooltipComponent>> elements, int mouseX, int mouseY, ItemStack stack) voidsetComponentTooltipFromElementsForNextFrame(Font font, List<com.mojang.datafixers.util.Either<FormattedText, TooltipComponent>> elements, int mouseX, int mouseY, ItemStack stack, @Nullable Identifier backgroundTexture) voidsetTooltipForNextFrame(List<FormattedCharSequence> formattedCharSequences, int x, int y) voidsetTooltipForNextFrame(Font font, List<? extends FormattedCharSequence> lines, int xo, int yo) voidsetTooltipForNextFrame(Font font, List<? extends FormattedCharSequence> lines, int xo, int yo, @Nullable Identifier style) voidsetTooltipForNextFrame(Font font, List<Component> texts, Optional<TooltipComponent> optionalImage, int xo, int yo) voidsetTooltipForNextFrame(Font font, List<Component> texts, Optional<TooltipComponent> optionalImage, int xo, int yo, @Nullable Identifier style) voidsetTooltipForNextFrame(Font font, List<Component> textComponents, Optional<TooltipComponent> tooltipComponent, ItemStack stack, int mouseX, int mouseY) voidsetTooltipForNextFrame(Font font, List<Component> textComponents, Optional<TooltipComponent> tooltipComponent, ItemStack stack, int mouseX, int mouseY, @Nullable Identifier backgroundTexture) voidsetTooltipForNextFrame(Font font, List<FormattedCharSequence> tooltip, Optional<TooltipComponent> component, ClientTooltipPositioner positioner, int xo, int yo, boolean replaceExisting, @Nullable Identifier style) voidsetTooltipForNextFrame(Font font, List<FormattedCharSequence> tooltip, ClientTooltipPositioner positioner, int xo, int yo, boolean replaceExisting) voidsetTooltipForNextFrame(Font font, Component text, int xo, int yo) voidsetTooltipForNextFrame(Font font, Component text, int xo, int yo, @Nullable Identifier style) voidsetTooltipForNextFrame(Font font, ItemStack itemStack, int xo, int yo) voidsetTooltipForNextFrame(Component component, int x, int y) private voidsetTooltipForNextFrameInternal(Font font, List<ClientTooltipComponent> lines, int xo, int yo, ClientTooltipPositioner positioner, @Nullable Identifier style, boolean replaceExisting) voidsubmitBannerPatternRenderState(BannerFlagModel flag, DyeColor baseColor, BannerPatternLayers resultBannerPatterns, int x0, int y0, int x1, int y1) private voidsubmitBlit(RenderPipeline pipeline, GpuTextureView textureView, GpuSampler sampler, int x0, int y0, int x1, int y1, float u0, float u1, float v0, float v1, int color) voidsubmitBookModelRenderState(BookModel bookModel, Identifier texture, float scale, float open, float flip, int x0, int y0, int x1, int y1) private voidsubmitColoredRectangle(RenderPipeline renderPipeline, TextureSetup textureSetup, int x0, int y0, int x1, int y1, int color1, @Nullable Integer color2) voidsubmitEntityRenderState(EntityRenderState renderState, float scale, Vector3f translation, Quaternionf rotation, @Nullable Quaternionf overrideCameraAngle, int x0, int y0, int x1, int y1) voidsubmitGuiElementRenderState(GuiElementRenderState renderState) Neo: Submit a customGuiElementRenderStatefor renderingvoidsubmitMapRenderState(MapRenderState mapRenderState) voidNeo: Submit a customPictureInPictureRenderStatefor renderingvoidsubmitProfilerChartRenderState(List<ResultField> chartData, int x0, int y0, int x1, int y1) voidsubmitSignRenderState(Model.Simple signModel, float scale, WoodType woodType, int x0, int y0, int x1, int y1) voidsubmitSkinRenderState(PlayerModel playerModel, Identifier texture, float scale, float rotationX, float rotationY, float pivotY, int x0, int y0, int x1, int y1) private voidsubmitTiledBlit(RenderPipeline pipeline, GpuTextureView textureView, GpuSampler sampler, int tileWidth, int tileHeight, int x0, int y0, int x1, int y1, float u0, float u1, float v0, float v1, int color) voidtextHighlight(int x0, int y0, int x1, int y1, boolean invertText) textRenderer(GuiGraphics.HoveredTextEffects hoveredTextEffects) textRenderer(GuiGraphics.HoveredTextEffects hoveredTextEffects, @Nullable Consumer<Style> additionalHoverStyleConsumer) textRendererForWidget(AbstractWidget owner, GuiGraphics.HoveredTextEffects hoveredTextEffects) voidvLine(int x, int y0, int y1, int col) Draws a vertical line from minY to maxY at the specified x-coordinate with the given color.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IGuiGraphicsExtension
blitInscribed, blitInscribed, drawScrollingString, getColorFromFormattingCharacter
-
Field Details
-
EXTRA_SPACE_AFTER_FIRST_TOOLTIP_LINE
private static final int EXTRA_SPACE_AFTER_FIRST_TOOLTIP_LINE- See Also:
-
minecraft
-
pose
-
scissorStack
-
sprites
-
guiSprites
-
guiRenderState
-
pendingCursor
-
mouseX
private final int mouseX -
mouseY
private final int mouseY -
deferredTooltip
-
hoveredTextStyle
-
clickableTextStyle
-
tooltipStack
-
-
Constructor Details
-
GuiGraphics
private GuiGraphics(Minecraft minecraft, Matrix3x2fStack pose, GuiRenderState guiRenderState, int mouseX, int mouseY) -
GuiGraphics
-
-
Method Details
-
requestCursor
-
applyCursor
-
guiWidth
public int guiWidth() -
guiHeight
public int guiHeight() -
nextStratum
public void nextStratum() -
blurBeforeThisStratum
public void blurBeforeThisStratum() -
pose
-
hLine
public void hLine(int x0, int x1, int y, int col) Draws a horizontal line from minX to maxX at the specified y-coordinate with the given color.- Parameters:
x0- the x-coordinate of the start point.x1- the x-coordinate of the end point.y- the y-coordinate of the line.col- the color of the line.
-
vLine
public void vLine(int x, int y0, int y1, int col) Draws a vertical line from minY to maxY at the specified x-coordinate with the given color.- Parameters:
x- the x-coordinate of the line.y0- the y-coordinate of the start point.y1- the y-coordinate of the end point.col- the color of the line.
-
enableScissor
public void enableScissor(int x0, int y0, int x1, int y1) Enables scissoring with the specified screen coordinates.- Parameters:
x0- the minimum x-coordinate of the scissor region.y0- the minimum y-coordinate of the scissor region.x1- the maximum x-coordinate of the scissor region.y1- the maximum y-coordinate of the scissor region.
-
disableScissor
public void disableScissor() -
containsPointInScissor
public boolean containsPointInScissor(int x, int y) -
fill
public void fill(int x0, int y0, int x1, int y1, int col) Fills a rectangle with the specified color using the given coordinates as the boundaries.- Parameters:
x0- the minimum x-coordinate of the rectangle.y0- the minimum y-coordinate of the rectangle.x1- the maximum x-coordinate of the rectangle.y1- the maximum y-coordinate of the rectangle.col- the color to fill the rectangle with.
-
fill
-
fillGradient
public void fillGradient(int x0, int y0, int x1, int y1, int col1, int col2) Fills a rectangle with a gradient color from colorFrom to colorTo using the given coordinates as the boundaries.- Parameters:
x0- the x-coordinate of the first corner of the rectangle.y0- the y-coordinate of the first corner of the rectangle.x1- the x-coordinate of the second corner of the rectangle.y1- the y-coordinate of the second corner of the rectangle.col1- the starting color of the gradient.col2- the ending color of the gradient.
-
fill
public void fill(RenderPipeline renderPipeline, TextureSetup textureSetup, int x0, int y0, int x1, int y1) -
submitColoredRectangle
private void submitColoredRectangle(RenderPipeline renderPipeline, TextureSetup textureSetup, int x0, int y0, int x1, int y1, int color1, @Nullable Integer color2) -
textHighlight
public void textHighlight(int x0, int y0, int x1, int y1, boolean invertText) -
drawCenteredString
Draws a centered string at the specified coordinates using the given font, text, and color.- Parameters:
font- the font to use for rendering.str- the text to draw.x- the x-coordinate of the center of the string.y- the y-coordinate of the string.color- the color of the string.
-
drawCenteredString
Draws a centered string at the specified coordinates using the given font, text component, and color.- Parameters:
font- the font to use for rendering.text- the text component to draw.x- the x-coordinate of the center of the string.y- the y-coordinate of the string.color- the color of the string.
-
drawCenteredString
Draws a centered string at the specified coordinates using the given font, formatted character sequence, and color.- Parameters:
font- the font to use for rendering.text- the formatted character sequence to draw.x- the x-coordinate of the center of the string.y- the y-coordinate of the string.color- the color of the string.
-
drawString
-
drawString
-
drawString
-
drawString
public void drawString(Font font, FormattedCharSequence str, int x, int y, int color, boolean dropShadow) -
drawString
-
drawString
-
drawWordWrap
Draws a formatted text with word wrapping at the specified coordinates using the given font, text, line width, and color.- Parameters:
font- the font to use for rendering.string- the formatted text to draw.x- the x-coordinate of the starting position.y- the y-coordinate of the starting position.w- the maximum width of each line before wrapping.col- the color of the text.
-
drawWordWrap
public void drawWordWrap(Font font, FormattedText string, int x, int y, int w, int col, boolean dropShadow) -
drawStringWithBackdrop
-
renderOutline
public void renderOutline(int x, int y, int width, int height, int color) -
blitSprite
public void blitSprite(RenderPipeline renderPipeline, Identifier location, int x, int y, int width, int height) -
blitSprite
public void blitSprite(RenderPipeline renderPipeline, Identifier location, int x, int y, int width, int height, float alpha) -
getSpriteScaling
-
blitSprite
public void blitSprite(RenderPipeline renderPipeline, Identifier location, int x, int y, int width, int height, int color) -
blitSprite
public void blitSprite(RenderPipeline renderPipeline, Identifier location, int spriteWidth, int spriteHeight, int textureX, int textureY, int x, int y, int width, int height) -
blitSprite
public void blitSprite(RenderPipeline renderPipeline, Identifier location, int spriteWidth, int spriteHeight, int textureX, int textureY, int x, int y, int width, int height, int color) -
blitSprite
public void blitSprite(RenderPipeline renderPipeline, TextureAtlasSprite sprite, int x, int y, int width, int height) -
blitSprite
public void blitSprite(RenderPipeline renderPipeline, TextureAtlasSprite sprite, int x, int y, int width, int height, int color) -
blitSprite
private void blitSprite(RenderPipeline renderPipeline, TextureAtlasSprite sprite, int spriteWidth, int spriteHeight, int textureX, int textureY, int x, int y, int width, int height, int color) -
blitNineSlicedSprite
private void blitNineSlicedSprite(RenderPipeline renderPipeline, TextureAtlasSprite sprite, GuiSpriteScaling.NineSlice nineSlice, int x, int y, int width, int height, int color) -
blitNineSliceInnerSegment
private void blitNineSliceInnerSegment(RenderPipeline renderPipeline, GuiSpriteScaling.NineSlice nineSlice, TextureAtlasSprite sprite, int x, int y, int width, int height, int textureX, int textureY, int textureWidth, int textureHeight, int spriteWidth, int spriteHeight, int color) -
blitTiledSprite
private void blitTiledSprite(RenderPipeline renderPipeline, TextureAtlasSprite sprite, int x, int y, int width, int height, int textureX, int textureY, int tileWidth, int tileHeight, int spriteWidth, int spriteHeight, int color) -
blit
public void blit(RenderPipeline renderPipeline, Identifier texture, int x, int y, float u, float v, int width, int height, int textureWidth, int textureHeight, int color) -
blit
public void blit(RenderPipeline renderPipeline, Identifier texture, int x, int y, float u, float v, int width, int height, int textureWidth, int textureHeight) -
blit
public void blit(RenderPipeline renderPipeline, Identifier texture, int x, int y, float u, float v, int width, int height, int srcWidth, int srcHeight, int textureWidth, int textureHeight) -
blit
public void blit(RenderPipeline renderPipeline, Identifier texture, int x, int y, float u, float v, int width, int height, int srcWidth, int srcHeight, int textureWidth, int textureHeight, int color) -
blit
public void blit(Identifier location, int x0, int y0, int x1, int y1, float u0, float u1, float v0, float v1) -
blit
public void blit(GpuTextureView textureView, GpuSampler sampler, int x0, int y0, int x1, int y1, float u0, float u1, float v0, float v1) -
innerBlit
private void innerBlit(RenderPipeline renderPipeline, Identifier location, int x0, int x1, int y0, int y1, float u0, float u1, float v0, float v1, int color) -
submitBlit
private void submitBlit(RenderPipeline pipeline, GpuTextureView textureView, GpuSampler sampler, int x0, int y0, int x1, int y1, float u0, float u1, float v0, float v1, int color) -
submitTiledBlit
private void submitTiledBlit(RenderPipeline pipeline, GpuTextureView textureView, GpuSampler sampler, int tileWidth, int tileHeight, int x0, int y0, int x1, int y1, float u0, float u1, float v0, float v1, int color) -
renderItem
Renders an item stack at the specified coordinates.- Parameters:
itemStack- the item stack to render.x- the x-coordinate of the rendering position.y- the y-coordinate of the rendering position.
-
renderItem
Renders an item stack at the specified coordinates with a random seed.- Parameters:
itemStack- the item stack to render.x- the x-coordinate of the rendering position.y- the y-coordinate of the rendering position.seed- the random seed.
-
renderFakeItem
Renders a fake item stack at the specified coordinates.- Parameters:
itemStack- the fake item stack to render.x- the x-coordinate of the rendering position.y- the y-coordinate of the rendering position.
-
renderFakeItem
-
renderItem
Renders an item stack for a living entity at the specified coordinates with a random seed.- Parameters:
owner- the living entity.itemStack- the item stack to render.x- the x-coordinate of the rendering position.y- the y-coordinate of the rendering position.seed- the random seed.
-
renderItem
private void renderItem(@Nullable LivingEntity owner, @Nullable Level level, ItemStack itemStack, int x, int y, int seed) Renders an item stack for a living entity in a specific level at the specified coordinates with a random seed.- Parameters:
owner- the living entity. Can be null.level- the level in which the rendering occurs. Can be null.itemStack- the item stack to render.x- the x-coordinate of the rendering position.y- the y-coordinate of the rendering position.seed- the random seed.
-
renderItemDecorations
Renders additional decorations for an item stack at the specified coordinates.- Parameters:
font- the font used for rendering text.itemStack- the item stack to decorate.x- the x-coordinate of the rendering position.y- the y-coordinate of the rendering position.
-
renderItemDecorations
public void renderItemDecorations(Font font, ItemStack itemStack, int x, int y, @Nullable String countText) Renders additional decorations for an item stack at the specified coordinates with optional custom text.- Parameters:
font- the font used for rendering text.itemStack- the item stack to decorate.x- the x-coordinate of the rendering position.y- the y-coordinate of the rendering position.countText- the custom text to display. Can be null.
-
setTooltipForNextFrame
-
setTooltipForNextFrame
public void setTooltipForNextFrame(List<FormattedCharSequence> formattedCharSequences, int x, int y) -
setTooltipForNextFrame
-
setTooltipForNextFrame
-
setTooltipForNextFrame
public void setTooltipForNextFrame(Font font, List<Component> textComponents, Optional<TooltipComponent> tooltipComponent, ItemStack stack, int mouseX, int mouseY, @Nullable Identifier backgroundTexture) -
setTooltipForNextFrame
public void setTooltipForNextFrame(Font font, List<Component> texts, Optional<TooltipComponent> optionalImage, int xo, int yo) -
setTooltipForNextFrame
public void setTooltipForNextFrame(Font font, List<Component> texts, Optional<TooltipComponent> optionalImage, int xo, int yo, @Nullable Identifier style) -
setTooltipForNextFrame
public void setTooltipForNextFrame(Font font, List<FormattedCharSequence> tooltip, Optional<TooltipComponent> component, ClientTooltipPositioner positioner, int xo, int yo, boolean replaceExisting, @Nullable Identifier style) -
setTooltipForNextFrame
-
setTooltipForNextFrame
public void setTooltipForNextFrame(Font font, Component text, int xo, int yo, @Nullable Identifier style) -
setComponentTooltipForNextFrame
-
setComponentTooltipForNextFrame
public void setComponentTooltipForNextFrame(Font font, List<Component> lines, int xo, int yo, @Nullable Identifier style) -
setComponentTooltipForNextFrame
public void setComponentTooltipForNextFrame(Font font, List<? extends FormattedText> tooltips, int mouseX, int mouseY, ItemStack stack) -
setComponentTooltipForNextFrame
public void setComponentTooltipForNextFrame(Font font, List<? extends FormattedText> tooltips, int mouseX, int mouseY, ItemStack stack, @Nullable Identifier backgroundTexture) -
setComponentTooltipFromElementsForNextFrame
public void setComponentTooltipFromElementsForNextFrame(Font font, List<com.mojang.datafixers.util.Either<FormattedText, TooltipComponent>> elements, int mouseX, int mouseY, ItemStack stack) -
setComponentTooltipFromElementsForNextFrame
public void setComponentTooltipFromElementsForNextFrame(Font font, List<com.mojang.datafixers.util.Either<FormattedText, TooltipComponent>> elements, int mouseX, int mouseY, ItemStack stack, @Nullable Identifier backgroundTexture) -
setTooltipForNextFrame
public void setTooltipForNextFrame(Font font, List<? extends FormattedCharSequence> lines, int xo, int yo) -
setTooltipForNextFrame
public void setTooltipForNextFrame(Font font, List<? extends FormattedCharSequence> lines, int xo, int yo, @Nullable Identifier style) -
setTooltipForNextFrame
public void setTooltipForNextFrame(Font font, List<FormattedCharSequence> tooltip, ClientTooltipPositioner positioner, int xo, int yo, boolean replaceExisting) -
setTooltipForNextFrameInternal
private void setTooltipForNextFrameInternal(Font font, List<ClientTooltipComponent> lines, int xo, int yo, ClientTooltipPositioner positioner, @Nullable Identifier style, boolean replaceExisting) -
renderTooltip
public void renderTooltip(Font font, List<ClientTooltipComponent> lines, int xo, int yo, ClientTooltipPositioner positioner, @Nullable Identifier style) -
renderTooltip
public void renderTooltip(Font font, List<ClientTooltipComponent> lines, int xo, int yo, ClientTooltipPositioner positioner, @Nullable Identifier style, ItemStack tooltipStack) -
renderDeferredElements
public void renderDeferredElements() -
renderItemBar
-
renderItemCount
-
renderItemCooldown
-
renderComponentHoverEffect
public void renderComponentHoverEffect(Font font, @Nullable Style hoveredStyle, int xMouse, int yMouse) Renders a hover effect for a text component at the specified mouse coordinates.- Parameters:
font- the font used for rendering text.hoveredStyle- the style of the text component. Can be null.xMouse- the x-coordinate of the mouse position.yMouse- the y-coordinate of the mouse position.
-
submitMapRenderState
-
submitEntityRenderState
public void submitEntityRenderState(EntityRenderState renderState, float scale, Vector3f translation, Quaternionf rotation, @Nullable Quaternionf overrideCameraAngle, int x0, int y0, int x1, int y1) -
submitSkinRenderState
public void submitSkinRenderState(PlayerModel playerModel, Identifier texture, float scale, float rotationX, float rotationY, float pivotY, int x0, int y0, int x1, int y1) -
submitBookModelRenderState
public void submitBookModelRenderState(BookModel bookModel, Identifier texture, float scale, float open, float flip, int x0, int y0, int x1, int y1) -
submitBannerPatternRenderState
public void submitBannerPatternRenderState(BannerFlagModel flag, DyeColor baseColor, BannerPatternLayers resultBannerPatterns, int x0, int y0, int x1, int y1) -
submitSignRenderState
public void submitSignRenderState(Model.Simple signModel, float scale, WoodType woodType, int x0, int y0, int x1, int y1) -
submitProfilerChartRenderState
public void submitProfilerChartRenderState(List<ResultField> chartData, int x0, int y0, int x1, int y1) -
submitGuiElementRenderState
Neo: Submit a customGuiElementRenderStatefor rendering -
submitPictureInPictureRenderState
Neo: Submit a customPictureInPictureRenderStatefor rendering- See Also:
-
peekScissorStack
Neo: Returns the top-most scissor rectangle, if present, for use with customGuiElementRenderStates andPictureInPictureRenderStates -
getSprite
-
textRendererForWidget
public ActiveTextCollector textRendererForWidget(AbstractWidget owner, GuiGraphics.HoveredTextEffects hoveredTextEffects) -
textRenderer
-
textRenderer
-
textRenderer
public ActiveTextCollector textRenderer(GuiGraphics.HoveredTextEffects hoveredTextEffects, @Nullable Consumer<Style> additionalHoverStyleConsumer) -
createDefaultTextParameters
-