Package net.minecraft.client.gui
Class GuiGraphics
java.lang.Object
net.minecraft.client.gui.GuiGraphics
- All Implemented Interfaces:
IGuiGraphicsExtension
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum(package private) class(package private) static classA utility class for managing a stack of screen rectangles for scissoring. -
Field Summary
FieldsModifier and TypeFieldDescription(package private) @Nullable Styleprivate @Nullable Runnableprivate static final int(package private) final GuiRenderStateprivate final TextureAtlas(package private) @Nullable Styleprivate final MaterialSet(package private) final Minecraft(package private) final int(package private) final intprivate CursorTypeprivate final Matrix3x2fStackprivate final GuiGraphics.ScissorStackprivate ItemStackFields inherited from interface net.neoforged.neoforge.client.extensions.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 pipeline, Identifier atlas, int x, int y, float u, float v, int width, int height, int textureWidth, int textureHeight) voidblit(RenderPipeline pipeline, Identifier atlas, int x, int y, float u, float v, int width, int height, int textureWidth, int textureHeight, int color) voidblit(RenderPipeline pipeline, Identifier atlas, int x, int y, float u, float v, int width, int height, int uWidth, int vHeight, int textureWidth, int textureHeight) voidblit(RenderPipeline pipeline, Identifier atlas, int x, int y, float u, float v, int width, int height, int uWidth, int vHeight, int textureWidth, int textureHeight, int color) voidblit(Identifier atlas, int x0, int y0, int x1, int y1, float u0, float u1, float v0, float v1) private voidblitNineSlicedSprite(RenderPipeline pipeline, TextureAtlasSprite sprite, GuiSpriteScaling.NineSlice nineSlice, int x, int y, int width, int height, int color) private voidblitNineSliceInnerSegment(RenderPipeline pipeline, GuiSpriteScaling.NineSlice nineSlice, TextureAtlasSprite sprite, int borderMinX, int borderMinY, int borderMaxX, int borderMaxY, int u, int v, int spriteWidth, int spriteHeight, int textureWidth, int textureHeight, int color) voidblitSprite(RenderPipeline pipeline, TextureAtlasSprite sprite, int x, int y, int width, int height) voidblitSprite(RenderPipeline pipeline, TextureAtlasSprite sprite, int x, int y, int width, int height, int color) private voidblitSprite(RenderPipeline pipeline, TextureAtlasSprite sprite, int textureWidth, int textureHeight, int u, int v, int x, int y, int width, int height, int color) voidblitSprite(RenderPipeline pipeline, Identifier sprite, int x, int y, int width, int height) voidblitSprite(RenderPipeline pipeline, Identifier sprite, int x, int y, int width, int height, float fade) voidblitSprite(RenderPipeline pipeline, Identifier sprite, int x, int y, int width, int height, int color) voidblitSprite(RenderPipeline pipeline, Identifier sprite, int textureWidth, int textureHeight, int u, int v, int x, int y, int width, int height) voidblitSprite(RenderPipeline pipeline, Identifier sprite, int textureWidth, int textureHeight, int u, int v, int x, int y, int width, int height, int color) private voidblitTiledSprite(RenderPipeline pipeline, TextureAtlasSprite sprite, int x, int y, int width, int height, int u, int v, int spriteWidth, int spriteHeight, int textureWidth, int textureHeight, int color) voidbooleancontainsPointInScissor(int x, int y) private ActiveTextCollector.ParameterscreateDefaultTextParameters(float opacity) voidvoiddrawCenteredString(Font font, String text, 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 text, int x, int y, int color) voiddrawString(Font font, @Nullable String text, int x, int y, int color, boolean drawShadow) voiddrawString(Font font, Component text, int x, int y, int color) voiddrawString(Font font, Component text, int x, int y, int color, boolean drawShadow) voiddrawString(Font font, FormattedCharSequence text, int x, int y, int color) voiddrawString(Font font, FormattedCharSequence text, int x, int y, int color, boolean drawShadow) voiddrawStringWithBackdrop(Font font, Component text, int x, int y, int width, int color) voiddrawWordWrap(Font font, FormattedText text, int x, int y, int lineWidth, int color) Draws a formatted text with word wrapping at the specified coordinates using the given font, text, line width, and color.voiddrawWordWrap(Font font, FormattedText text, int x, int y, int lineWidth, int color, boolean drawShadow) voidenableScissor(int minX, int minY, int maxX, int maxY) Enables scissoring with the specified screen coordinates.voidfill(int minX, int minY, int maxX, int maxY, int color) Fills a rectangle with the specified color using the given coordinates as the boundaries.voidfill(RenderPipeline pipeline, int minX, int minY, int maxX, int maxY, int color) voidfill(RenderPipeline pipeline, TextureSetup textureSetup, int minX, int minY, int maxX, int maxY) voidfillGradient(int minX, int minY, int maxX, int maxY, int colorFrom, int colorTo) 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 minX, int maxX, int y, int color) Draws a horizontal line from minX to maxX at the specified y-coordinate with the given color.private voidinnerBlit(RenderPipeline pipeline, Identifier atlas, 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 style, int mouseX, int mouseY) Renders a hover effect for a text component at the specified mouse coordinates.voidvoidrenderFakeItem(ItemStack stack, int x, int y) Renders a fake item stack at the specified coordinates.voidrenderFakeItem(ItemStack stack, int x, int y, int seed) private voidrenderItem(@Nullable LivingEntity entity, @Nullable Level level, ItemStack stack, 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 entity, ItemStack stack, int x, int y, int seed) Renders an item stack for a living entity at the specified coordinates with a random seed.voidrenderItem(ItemStack stack, int x, int y) Renders an item stack at the specified coordinates.voidrenderItem(ItemStack stack, int x, int y, int seed) Renders an item stack at the specified coordinates with a random seed.private voidrenderItemBar(ItemStack stack, int x, int y) private voidrenderItemCooldown(ItemStack stack, int x, int y) private voidrenderItemCount(Font font, ItemStack stack, int x, int y, @Nullable String text) voidrenderItemDecorations(Font font, ItemStack stack, int x, int y) Renders additional decorations for an item stack at the specified coordinates.voidrenderItemDecorations(Font font, ItemStack stack, int x, int y, @Nullable String text) 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> components, int x, int y, ClientTooltipPositioner positioner, @Nullable Identifier background) voidrenderTooltip(Font font, List<ClientTooltipComponent> components, int x, int y, ClientTooltipPositioner positioner, @Nullable Identifier background, ItemStack tooltipStack) voidrequestCursor(CursorType cursor) voidsetComponentTooltipForNextFrame(Font font, List<? extends FormattedText> lines, int x, int y, ItemStack stack) voidsetComponentTooltipForNextFrame(Font font, List<? extends FormattedText> lines, int x, int y, ItemStack stack, @Nullable Identifier backgroundTexture) voidsetComponentTooltipForNextFrame(Font font, List<Component> lines, int x, int y) voidsetComponentTooltipForNextFrame(Font font, List<Component> lines, int x, int y, @Nullable Identifier background) 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> lines, int x, int y) voidsetTooltipForNextFrame(Font font, List<? extends FormattedCharSequence> lines, int x, int y) voidsetTooltipForNextFrame(Font font, List<? extends FormattedCharSequence> lines, int x, int y, @Nullable Identifier background) voidsetTooltipForNextFrame(Font font, List<Component> lines, Optional<TooltipComponent> tooltipImage, int x, int y) voidsetTooltipForNextFrame(Font font, List<Component> lines, Optional<TooltipComponent> tooltipImage, int x, int y, @Nullable Identifier background) 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> lines, ClientTooltipPositioner positioner, int x, int y, boolean focused) voidsetTooltipForNextFrame(Font font, Component text, int x, int y) voidsetTooltipForNextFrame(Font font, Component text, int x, int y, @Nullable Identifier background) voidsetTooltipForNextFrame(Font font, ItemStack stack, int x, int y) voidsetTooltipForNextFrame(Component text, int x, int y) private voidsetTooltipForNextFrameInternal(Font font, List<ClientTooltipComponent> components, int x, int y, ClientTooltipPositioner positioner, @Nullable Identifier background, boolean focused) voidsubmitBannerPatternRenderState(BannerFlagModel flag, DyeColor baseColor, BannerPatternLayers resultBannerPatterns, int x0, int y0, int x1, int y1) private voidsubmitBlit(RenderPipeline pipeline, GpuTextureView atlasTexture, 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 open, float flip, float x0, int y0, int x1, int y1, int scale) private voidsubmitColoredRectangle(RenderPipeline pipeline, TextureSetup textureSetup, int minX, int minY, int maxX, int maxY, int colorFrom, @Nullable Integer colorTo) 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 renderState) 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 rotationX, float rotationY, float pivotY, float x0, int y0, int x1, int y1, int scale) private voidsubmitTiledBlit(RenderPipeline pipeline, GpuTextureView atlasTexture, 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 minX, int minY, int maxX, int maxY, boolean invert) textRenderer(GuiGraphics.HoveredTextEffects hoveredTextEffects) textRenderer(GuiGraphics.HoveredTextEffects hoveredTextEffects, @Nullable Consumer<Style> additionalConsumer) textRendererForWidget(AbstractWidget widget, GuiGraphics.HoveredTextEffects hoveredTextEffects) voidvLine(int x, int minY, int maxY, int color) Draws a vertical line from minY to maxY at the specified x-coordinate with the given color.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.client.extensions.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
-
materials
-
guiSprites
-
guiRenderState
-
pendingCursor
-
mouseX
final int mouseX -
mouseY
final int mouseY -
deferredTooltip
-
hoveredTextStyle
@Nullable Style hoveredTextStyle -
clickableTextStyle
@Nullable Style 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 minX, int maxX, int y, int color) Draws a horizontal line from minX to maxX at the specified y-coordinate with the given color.- Parameters:
minX- the x-coordinate of the start point.maxX- the x-coordinate of the end point.y- the y-coordinate of the line.color- the color of the line.
-
vLine
public void vLine(int x, int minY, int maxY, int color) 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.minY- the y-coordinate of the start point.maxY- the y-coordinate of the end point.color- the color of the line.
-
enableScissor
public void enableScissor(int minX, int minY, int maxX, int maxY) Enables scissoring with the specified screen coordinates.- Parameters:
minX- the minimum x-coordinate of the scissor region.minY- the minimum y-coordinate of the scissor region.maxX- the maximum x-coordinate of the scissor region.maxY- 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 minX, int minY, int maxX, int maxY, int color) Fills a rectangle with the specified color using the given coordinates as the boundaries.- Parameters:
minX- the minimum x-coordinate of the rectangle.minY- the minimum y-coordinate of the rectangle.maxX- the maximum x-coordinate of the rectangle.maxY- the maximum y-coordinate of the rectangle.color- the color to fill the rectangle with.
-
fill
-
fillGradient
public void fillGradient(int minX, int minY, int maxX, int maxY, int colorFrom, int colorTo) Fills a rectangle with a gradient color from colorFrom to colorTo using the given coordinates as the boundaries.- Parameters:
minX- the x-coordinate of the first corner of the rectangle.minY- the y-coordinate of the first corner of the rectangle.maxX- the x-coordinate of the second corner of the rectangle.maxY- the y-coordinate of the second corner of the rectangle.colorFrom- the starting color of the gradient.colorTo- the ending color of the gradient.
-
fill
public void fill(RenderPipeline pipeline, TextureSetup textureSetup, int minX, int minY, int maxX, int maxY) -
submitColoredRectangle
private void submitColoredRectangle(RenderPipeline pipeline, TextureSetup textureSetup, int minX, int minY, int maxX, int maxY, int colorFrom, @Nullable Integer colorTo) -
textHighlight
public void textHighlight(int minX, int minY, int maxX, int maxY, boolean invert) -
drawCenteredString
Draws a centered string at the specified coordinates using the given font, text, and color.- Parameters:
font- the font to use for rendering.text- 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 text, int x, int y, int color, boolean drawShadow) -
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.text- the formatted text to draw.x- the x-coordinate of the starting position.y- the y-coordinate of the starting position.lineWidth- the maximum width of each line before wrapping.color- the color of the text.
-
drawWordWrap
public void drawWordWrap(Font font, FormattedText text, int x, int y, int lineWidth, int color, boolean drawShadow) -
drawStringWithBackdrop
-
renderOutline
public void renderOutline(int x, int y, int width, int height, int color) -
blitSprite
public void blitSprite(RenderPipeline pipeline, Identifier sprite, int x, int y, int width, int height) -
blitSprite
public void blitSprite(RenderPipeline pipeline, Identifier sprite, int x, int y, int width, int height, float fade) -
getSpriteScaling
-
blitSprite
public void blitSprite(RenderPipeline pipeline, Identifier sprite, int x, int y, int width, int height, int color) -
blitSprite
public void blitSprite(RenderPipeline pipeline, Identifier sprite, int textureWidth, int textureHeight, int u, int v, int x, int y, int width, int height) -
blitSprite
public void blitSprite(RenderPipeline pipeline, Identifier sprite, int textureWidth, int textureHeight, int u, int v, int x, int y, int width, int height, int color) -
blitSprite
public void blitSprite(RenderPipeline pipeline, TextureAtlasSprite sprite, int x, int y, int width, int height) -
blitSprite
public void blitSprite(RenderPipeline pipeline, TextureAtlasSprite sprite, int x, int y, int width, int height, int color) -
blitSprite
private void blitSprite(RenderPipeline pipeline, TextureAtlasSprite sprite, int textureWidth, int textureHeight, int u, int v, int x, int y, int width, int height, int color) -
blitNineSlicedSprite
private void blitNineSlicedSprite(RenderPipeline pipeline, TextureAtlasSprite sprite, GuiSpriteScaling.NineSlice nineSlice, int x, int y, int width, int height, int color) -
blitNineSliceInnerSegment
private void blitNineSliceInnerSegment(RenderPipeline pipeline, GuiSpriteScaling.NineSlice nineSlice, TextureAtlasSprite sprite, int borderMinX, int borderMinY, int borderMaxX, int borderMaxY, int u, int v, int spriteWidth, int spriteHeight, int textureWidth, int textureHeight, int color) -
blitTiledSprite
private void blitTiledSprite(RenderPipeline pipeline, TextureAtlasSprite sprite, int x, int y, int width, int height, int u, int v, int spriteWidth, int spriteHeight, int textureWidth, int textureHeight, int color) -
blit
public void blit(RenderPipeline pipeline, Identifier atlas, int x, int y, float u, float v, int width, int height, int textureWidth, int textureHeight, int color) -
blit
public void blit(RenderPipeline pipeline, Identifier atlas, int x, int y, float u, float v, int width, int height, int textureWidth, int textureHeight) -
blit
public void blit(RenderPipeline pipeline, Identifier atlas, int x, int y, float u, float v, int width, int height, int uWidth, int vHeight, int textureWidth, int textureHeight) -
blit
public void blit(RenderPipeline pipeline, Identifier atlas, int x, int y, float u, float v, int width, int height, int uWidth, int vHeight, int textureWidth, int textureHeight, int color) -
blit
public void blit(Identifier atlas, int x0, int y0, int x1, int y1, float u0, float u1, float v0, float v1) -
innerBlit
private void innerBlit(RenderPipeline pipeline, Identifier atlas, 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 atlasTexture, 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 atlasTexture, 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:
stack- 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:
stack- 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:
stack- 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:
entity- the living entity.stack- 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 entity, @Nullable Level level, ItemStack stack, 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:
entity- the living entity. Can benull.level- the level in which the rendering occurs. Can benull.stack- 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.stack- the item stack to decorate.x- the x-coordinate of the rendering position.y- the y-coordinate of the rendering position.
-
renderItemDecorations
Renders additional decorations for an item stack at the specified coordinates with optional custom text.- Parameters:
font- the font used for rendering text.stack- the item stack to decorate.x- the x-coordinate of the rendering position.y- the y-coordinate of the rendering position.text- the custom text to display. Can benull.
-
setTooltipForNextFrame
-
setTooltipForNextFrame
-
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> lines, Optional<TooltipComponent> tooltipImage, int x, int y) -
setTooltipForNextFrame
public void setTooltipForNextFrame(Font font, List<Component> lines, Optional<TooltipComponent> tooltipImage, int x, int y, @Nullable Identifier background) -
setTooltipForNextFrame
-
setTooltipForNextFrame
public void setTooltipForNextFrame(Font font, Component text, int x, int y, @Nullable Identifier background) -
setComponentTooltipForNextFrame
-
setComponentTooltipForNextFrame
public void setComponentTooltipForNextFrame(Font font, List<Component> lines, int x, int y, @Nullable Identifier background) -
setComponentTooltipForNextFrame
public void setComponentTooltipForNextFrame(Font font, List<? extends FormattedText> lines, int x, int y, ItemStack stack) -
setComponentTooltipForNextFrame
public void setComponentTooltipForNextFrame(Font font, List<? extends FormattedText> lines, int x, int y, 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 x, int y) -
setTooltipForNextFrame
public void setTooltipForNextFrame(Font font, List<? extends FormattedCharSequence> lines, int x, int y, @Nullable Identifier background) -
setTooltipForNextFrame
public void setTooltipForNextFrame(Font font, List<FormattedCharSequence> lines, ClientTooltipPositioner positioner, int x, int y, boolean focused) -
setTooltipForNextFrameInternal
private void setTooltipForNextFrameInternal(Font font, List<ClientTooltipComponent> components, int x, int y, ClientTooltipPositioner positioner, @Nullable Identifier background, boolean focused) -
renderTooltip
public void renderTooltip(Font font, List<ClientTooltipComponent> components, int x, int y, ClientTooltipPositioner positioner, @Nullable Identifier background) -
renderTooltip
public void renderTooltip(Font font, List<ClientTooltipComponent> components, int x, int y, ClientTooltipPositioner positioner, @Nullable Identifier background, ItemStack tooltipStack) -
renderDeferredElements
public void renderDeferredElements() -
renderItemBar
-
renderItemCount
-
renderItemCooldown
-
renderComponentHoverEffect
Renders a hover effect for a text component at the specified mouse coordinates.- Parameters:
font- the font used for rendering text.style- the style of the text component. Can benull.mouseX- the x-coordinate of the mouse position.mouseY- 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 rotationX, float rotationY, float pivotY, float x0, int y0, int x1, int y1, int scale) -
submitBookModelRenderState
public void submitBookModelRenderState(BookModel bookModel, Identifier texture, float open, float flip, float x0, int y0, int x1, int y1, int scale) -
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 widget, GuiGraphics.HoveredTextEffects hoveredTextEffects) -
textRenderer
-
textRenderer
-
textRenderer
public ActiveTextCollector textRenderer(GuiGraphics.HoveredTextEffects hoveredTextEffects, @Nullable Consumer<Style> additionalConsumer) -
createDefaultTextParameters
-