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 TypeClassDescription(package private) static class
A utility class for managing a stack of screen rectangles for scissoring. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Runnable
private static final int
private final GuiRenderState
private final Minecraft
private final org.joml.Matrix3x2fStack
private final GuiGraphics.ScissorStack
private final GuiSpriteManager
private ItemStack
Fields 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 pMinecraft, GuiRenderState pGuiRenderState) private
GuiGraphics
(Minecraft p_282144_, org.joml.Matrix3x2fStack p_415937_, GuiRenderState p_415955_) -
Method Summary
Modifier and TypeMethodDescriptionvoid
blit
(RenderPipeline pPipeline, ResourceLocation pAtlas, int pX, int pY, float pU, float pV, int pWidth, int pHeight, int pTextureWidth, int pTextureHeight) void
blit
(RenderPipeline pPipeline, ResourceLocation pAtlas, int pX, int pY, float pU, float pV, int pWidth, int pHeight, int pTextureWidth, int pTextureHeight, int pColor) void
blit
(RenderPipeline pPipeline, ResourceLocation pAtlas, int pX, int pY, float pU, float pV, int pWidth, int pHeight, int pUWidth, int pVHeight, int pTextureWidth, int pTextureHeight) void
blit
(RenderPipeline pPipeline, ResourceLocation pAtlas, int pX, int pY, float pU, float pV, int pWidth, int pHeight, int pUWidth, int pVHeight, int pTextureWidth, int pTextureHeight, int pColor) void
blit
(ResourceLocation pAtlas, int pX0, int pY0, int pX1, int pY1, float pU0, float pU1, float pV0, float pV1) private void
blitNineSlicedSprite
(RenderPipeline pPipeline, TextureAtlasSprite pSprite, GuiSpriteScaling.NineSlice pNineSlice, int pX, int pY, int pWidth, int pHeight, int pColor) private void
blitNineSliceInnerSegment
(RenderPipeline pPipeline, GuiSpriteScaling.NineSlice pNineSlice, TextureAtlasSprite pSprite, int pBorderMinX, int pBorderMinY, int pBorderMaxX, int pBorderMaxY, int pU, int pV, int pSpriteWidth, int pSpriteHeight, int pTextureWidth, int pTextureHeight, int pColor) void
blitSprite
(RenderPipeline pPipeline, TextureAtlasSprite pSprite, int pX, int pWidth, int pY, int pHeight) void
blitSprite
(RenderPipeline pPipeline, TextureAtlasSprite pSprite, int pX, int pY, int pWidth, int pHeight, int pColor) private void
blitSprite
(RenderPipeline pPipeline, TextureAtlasSprite pSprite, int pTextureWidth, int pTextureHeight, int pU, int pV, int pX, int pY, int pWidth, int pHeight, int pColor) void
blitSprite
(RenderPipeline pPipeline, ResourceLocation pSprite, int pX, int pY, int pWidth, int pHeight) void
blitSprite
(RenderPipeline pPipeline, ResourceLocation pSprite, int pX, int pY, int pWidth, int pHeight, float pFade) void
blitSprite
(RenderPipeline pPipeline, ResourceLocation pSprite, int pX, int pY, int pWidth, int pHeight, int pColor) void
blitSprite
(RenderPipeline pPipeline, ResourceLocation pSprite, int pTextureWidth, int pTextureHeight, int pU, int pV, int pX, int pY, int pWidth, int pHeight) void
blitSprite
(RenderPipeline pPipeline, ResourceLocation pSprite, int pTextureWidth, int pTextureHeight, int pU, int pV, int pX, int pY, int pWidth, int pHeight, int pColor) private void
blitTiledSprite
(RenderPipeline pPipeline, TextureAtlasSprite pSprite, int pX, int pY, int pWidth, int pHeight, int pU, int pV, int pSpriteWidth, int pSpriteHeight, int pTextureWidth, int pTextureHeight, int pColor) void
boolean
containsPointInScissor
(int pX, int pY) void
void
drawCenteredString
(Font pFont, String pText, int pX, int pY, int pColor) Draws a centered string at the specified coordinates using the given font, text, and color.void
drawCenteredString
(Font pFont, Component pText, int pX, int pY, int pColor) Draws a centered string at the specified coordinates using the given font, text component, and color.void
drawCenteredString
(Font pFont, FormattedCharSequence pText, int pX, int pY, int pColor) Draws a centered string at the specified coordinates using the given font, formatted character sequence, and color.void
drawString
(Font pFont, String pText, int pX, int pY, int pColor) void
drawString
(Font pFont, String pText, int pX, int pY, int pColor, boolean pDrawShadow) void
drawString
(Font pFont, Component pText, int pX, int pY, int pColor) void
drawString
(Font pFont, Component pText, int pX, int pY, int pColor, boolean pDrawShadow) void
drawString
(Font pFont, FormattedCharSequence pText, int pX, int pY, int pColor) void
drawString
(Font pFont, FormattedCharSequence pText, int pX, int pY, int pColor, boolean pDrawShadow) void
drawStringWithBackdrop
(Font pFont, Component pText, int pX, int pY, int pWidth, int pColor) void
drawWordWrap
(Font pFont, FormattedText pText, int pX, int pY, int pLineWidth, int pColor) Draws a formatted text with word wrapping at the specified coordinates using the given font, text, line width, and color.void
drawWordWrap
(Font pFont, FormattedText pText, int pX, int pY, int pLineWidth, int pColor, boolean pDropShadow) void
enableScissor
(int pMinX, int pMinY, int pMaxX, int pMaxY) Enables scissoring with the specified screen coordinates.void
fill
(int pMinX, int pMinY, int pMaxX, int pMaxY, int pColor) Fills a rectangle with the specified color using the given coordinates as the boundaries.void
fill
(RenderPipeline pPipeline, int pMinX, int pMinY, int pMaxX, int pMaxY, int pColor) void
fill
(RenderPipeline pPipeline, TextureSetup pTextureSetup, int pMinX, int pMinY, int pMaxX, int pMaxY) void
fillGradient
(int pMinX, int pMinY, int pMaxX, int pMaxY, int pColorFrom, int pColorTo) Fills a rectangle with a gradient color from colorFrom to colorTo using the given coordinates as the boundaries.int
int
guiWidth()
void
hLine
(int pMinX, int pMaxX, int pY, int pColor) Draws a horizontal line from minX to maxX at the specified y-coordinate with the given color.private void
innerBlit
(RenderPipeline pPipeline, ResourceLocation pAtlas, int pX0, int pX1, int pY0, int pY1, float pU0, float pU1, float pV0, float pV1, int pColor) void
Neo: Returns the top-most scissor rectangle, if present, for use with customGuiElementRenderState
s andPictureInPictureRenderState
sorg.joml.Matrix3x2fStack
pose()
void
renderComponentHoverEffect
(Font pFont, Style pStyle, int pMouseX, int pMouseY) Renders a hover effect for a text component at the specified mouse coordinates.void
void
renderFakeItem
(ItemStack pStack, int pX, int pY) Renders a fake item stack at the specified coordinates.void
renderFakeItem
(ItemStack pStack, int pX, int pY, int pSeed) void
renderItem
(LivingEntity pEntity, ItemStack pStack, int pX, int pY, int pSeed) Renders an item stack for a living entity at the specified coordinates with a random seed.private void
renderItem
(LivingEntity pEntity, Level pLevel, ItemStack pStack, int pX, int pY, int pSeed) Renders an item stack for a living entity in a specific level at the specified coordinates with a random seed.void
renderItem
(ItemStack pStack, int pX, int pY) Renders an item stack at the specified coordinates.void
renderItem
(ItemStack pStack, int pX, int pY, int pSeed) Renders an item stack at the specified coordinates with a random seed.private void
renderItemBar
(ItemStack pStack, int pX, int pY) private void
renderItemCooldown
(ItemStack pStack, int pX, int pY) private void
renderItemCount
(Font pFont, ItemStack pStack, int pX, int pY, String pText) void
renderItemDecorations
(Font pFont, ItemStack pStack, int pX, int pY) Renders additional decorations for an item stack at the specified coordinates.void
renderItemDecorations
(Font pFont, ItemStack pStack, int pX, int pY, String pText) Renders additional decorations for an item stack at the specified coordinates with optional custom text.void
renderOutline
(int pX, int pY, int pWidth, int pHeight, int pColor) Renders an outline rectangle on the screen with the specified color.void
renderTooltip
(Font pFont, List<ClientTooltipComponent> pComponents, int pX, int pY, ClientTooltipPositioner pPositioner, ResourceLocation pBackground) void
renderTooltip
(Font pFont, List<ClientTooltipComponent> pComponents, int pX, int pY, ClientTooltipPositioner pPositioner, ResourceLocation pBackground, ItemStack tooltipStack) void
setComponentTooltipForNextFrame
(Font pFont, List<? extends FormattedText> pLines, int pX, int pY, ItemStack stack) void
setComponentTooltipForNextFrame
(Font pFont, List<? extends FormattedText> pLines, int pX, int pY, ItemStack stack, ResourceLocation backgroundTexture) void
setComponentTooltipForNextFrame
(Font pFont, List<Component> pLines, int pX, int pY) void
setComponentTooltipForNextFrame
(Font pFont, List<Component> pLines, int pX, int pY, ResourceLocation pBackground) void
setComponentTooltipFromElementsForNextFrame
(Font font, List<com.mojang.datafixers.util.Either<FormattedText, TooltipComponent>> elements, int mouseX, int mouseY, ItemStack stack) void
setComponentTooltipFromElementsForNextFrame
(Font font, List<com.mojang.datafixers.util.Either<FormattedText, TooltipComponent>> elements, int mouseX, int mouseY, ItemStack stack, ResourceLocation backgroundTexture) void
setTooltipForNextFrame
(List<FormattedCharSequence> pLines, int pX, int pY) void
setTooltipForNextFrame
(Font pFont, List<? extends FormattedCharSequence> pLines, int pX, int pY) void
setTooltipForNextFrame
(Font pFont, List<? extends FormattedCharSequence> pLines, int pX, int pY, ResourceLocation pBackground) void
setTooltipForNextFrame
(Font pFont, List<Component> pLines, Optional<TooltipComponent> pTooltipImage, int pX, int pY) void
setTooltipForNextFrame
(Font pFont, List<Component> pLines, Optional<TooltipComponent> pTooltipImage, int pX, int pY, ResourceLocation pBackground) void
setTooltipForNextFrame
(Font font, List<Component> textComponents, Optional<TooltipComponent> tooltipComponent, ItemStack stack, int mouseX, int mouseY) void
setTooltipForNextFrame
(Font font, List<Component> textComponents, Optional<TooltipComponent> tooltipComponent, ItemStack stack, int mouseX, int mouseY, ResourceLocation backgroundTexture) void
setTooltipForNextFrame
(Font pFont, List<FormattedCharSequence> pLines, ClientTooltipPositioner pPositioner, int pX, int pY, boolean pFocused) void
setTooltipForNextFrame
(Font pFont, Component pText, int pX, int pY) void
setTooltipForNextFrame
(Font pFont, Component pText, int pX, int pY, ResourceLocation pBackground) void
setTooltipForNextFrame
(Font pFont, ItemStack pStack, int pX, int pY) void
setTooltipForNextFrame
(Component pText, int pX, int pY) private void
setTooltipForNextFrameInternal
(Font pFont, List<ClientTooltipComponent> pComponents, int pX, int pY, ClientTooltipPositioner pPositioner, ResourceLocation pBackground, boolean pFocused) void
submitBannerPatternRenderState
(ModelPart pFlag, DyeColor pBaseColor, BannerPatternLayers pResultBannerPatterns, int pX0, int pY0, int pX1, int pY1) private void
submitBlit
(RenderPipeline pPipeline, GpuTextureView pAtlasTexture, int pX0, int pY0, int pX1, int pY1, float pU0, float pU1, float pV0, float pV1, int pColor) void
submitBookModelRenderState
(BookModel pBookModel, ResourceLocation pTexture, float pScale, float pOpen, float pFlip, int pX0, int pY0, int pX1, int pY1) private void
submitColoredRectangle
(RenderPipeline pPipeline, TextureSetup pTextureSetup, int pMinX, int pMinY, int pMaxX, int pMaxY, int pColorFrom, Integer pColorTo) void
submitEntityRenderState
(EntityRenderState p_415907_, float p_415695_, org.joml.Vector3f p_415772_, org.joml.Quaternionf p_416089_, org.joml.Quaternionf p_416355_, int p_416675_, int p_416412_, int p_415766_, int p_416432_) void
submitGuiElementRenderState
(GuiElementRenderState renderState) Neo: Submit a customGuiElementRenderState
for renderingvoid
submitMapRenderState
(MapRenderState pRenderState) void
Neo: Submit a customPictureInPictureRenderState
for renderingvoid
submitProfilerChartRenderState
(List<ResultField> pChartData, int pX0, int pY0, int pX1, int pY1) void
submitSignRenderState
(Model pSignModel, float pScale, WoodType pWoodType, int pX0, int pY0, int pX1, int pY1) void
submitSkinRenderState
(PlayerModel pPlayerModel, ResourceLocation pTexture, float pScale, float pRotationX, float pRotationY, float pPivotY, int pX0, int pY0, int pX1, int pY1) void
textHighlight
(int p_428831_, int p_428851_, int p_428846_, int p_428835_) void
vLine
(int pX, int pMinY, int pMaxY, int pColor) 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, wait
Methods 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
private final org.joml.Matrix3x2fStack pose -
scissorStack
-
sprites
-
guiRenderState
-
deferredTooltip
-
tooltipStack
-
-
Constructor Details
-
GuiGraphics
private GuiGraphics(Minecraft p_282144_, org.joml.Matrix3x2fStack p_415937_, GuiRenderState p_415955_) -
GuiGraphics
-
-
Method Details
-
guiWidth
public int guiWidth() -
guiHeight
public int guiHeight() -
nextStratum
public void nextStratum() -
blurBeforeThisStratum
public void blurBeforeThisStratum() -
pose
public org.joml.Matrix3x2fStack pose() -
hLine
public void hLine(int pMinX, int pMaxX, int pY, int pColor) Draws a horizontal line from minX to maxX at the specified y-coordinate with the given color.- Parameters:
pMinX
- the x-coordinate of the start point.pMaxX
- the x-coordinate of the end point.pY
- the y-coordinate of the line.pColor
- the color of the line.
-
vLine
public void vLine(int pX, int pMinY, int pMaxY, int pColor) Draws a vertical line from minY to maxY at the specified x-coordinate with the given color.- Parameters:
pX
- the x-coordinate of the line.pMinY
- the y-coordinate of the start point.pMaxY
- the y-coordinate of the end point.pColor
- the color of the line.
-
enableScissor
public void enableScissor(int pMinX, int pMinY, int pMaxX, int pMaxY) Enables scissoring with the specified screen coordinates.- Parameters:
pMinX
- the minimum x-coordinate of the scissor region.pMinY
- the minimum y-coordinate of the scissor region.pMaxX
- the maximum x-coordinate of the scissor region.pMaxY
- the maximum y-coordinate of the scissor region.
-
disableScissor
public void disableScissor() -
containsPointInScissor
public boolean containsPointInScissor(int pX, int pY) -
fill
public void fill(int pMinX, int pMinY, int pMaxX, int pMaxY, int pColor) Fills a rectangle with the specified color using the given coordinates as the boundaries.- Parameters:
pMinX
- the minimum x-coordinate of the rectangle.pMinY
- the minimum y-coordinate of the rectangle.pMaxX
- the maximum x-coordinate of the rectangle.pMaxY
- the maximum y-coordinate of the rectangle.pColor
- the color to fill the rectangle with.
-
fill
-
fillGradient
public void fillGradient(int pMinX, int pMinY, int pMaxX, int pMaxY, int pColorFrom, int pColorTo) Fills a rectangle with a gradient color from colorFrom to colorTo using the given coordinates as the boundaries.- Parameters:
pMinX
- the x-coordinate of the first corner of the rectangle.pMinY
- the y-coordinate of the first corner of the rectangle.pMaxX
- the x-coordinate of the second corner of the rectangle.pMaxY
- the y-coordinate of the second corner of the rectangle.pColorFrom
- the starting color of the gradient.pColorTo
- the ending color of the gradient.
-
fill
public void fill(RenderPipeline pPipeline, TextureSetup pTextureSetup, int pMinX, int pMinY, int pMaxX, int pMaxY) -
submitColoredRectangle
private void submitColoredRectangle(RenderPipeline pPipeline, TextureSetup pTextureSetup, int pMinX, int pMinY, int pMaxX, int pMaxY, int pColorFrom, @Nullable Integer pColorTo) -
textHighlight
public void textHighlight(int p_428831_, int p_428851_, int p_428846_, int p_428835_) -
drawCenteredString
Draws a centered string at the specified coordinates using the given font, text, and color.- Parameters:
pFont
- the font to use for rendering.pText
- the text to draw.pX
- the x-coordinate of the center of the string.pY
- the y-coordinate of the string.pColor
- the color of the string.
-
drawCenteredString
Draws a centered string at the specified coordinates using the given font, text component, and color.- Parameters:
pFont
- the font to use for rendering.pText
- the text component to draw.pX
- the x-coordinate of the center of the string.pY
- the y-coordinate of the string.pColor
- the color of the string.
-
drawCenteredString
Draws a centered string at the specified coordinates using the given font, formatted character sequence, and color.- Parameters:
pFont
- the font to use for rendering.pText
- the formatted character sequence to draw.pX
- the x-coordinate of the center of the string.pY
- the y-coordinate of the string.pColor
- the color of the string.
-
drawString
-
drawString
-
drawString
-
drawString
public void drawString(Font pFont, FormattedCharSequence pText, int pX, int pY, int pColor, boolean pDrawShadow) -
drawString
-
drawString
-
drawWordWrap
public void drawWordWrap(Font pFont, FormattedText pText, int pX, int pY, int pLineWidth, int pColor) Draws a formatted text with word wrapping at the specified coordinates using the given font, text, line width, and color.- Parameters:
pFont
- the font to use for rendering.pText
- the formatted text to draw.pX
- the x-coordinate of the starting position.pY
- the y-coordinate of the starting position.pLineWidth
- the maximum width of each line before wrapping.pColor
- the color of the text.
-
drawWordWrap
public void drawWordWrap(Font pFont, FormattedText pText, int pX, int pY, int pLineWidth, int pColor, boolean pDropShadow) -
drawStringWithBackdrop
-
renderOutline
public void renderOutline(int pX, int pY, int pWidth, int pHeight, int pColor) Renders an outline rectangle on the screen with the specified color.- Parameters:
pX
- the x-coordinate of the top-left corner of the rectangle.pY
- the y-coordinate of the top-left corner of the rectangle.pWidth
- the width of the blitted portion.pHeight
- the height of the rectangle.pColor
- the color of the outline.
-
blitSprite
public void blitSprite(RenderPipeline pPipeline, ResourceLocation pSprite, int pX, int pY, int pWidth, int pHeight) -
blitSprite
public void blitSprite(RenderPipeline pPipeline, ResourceLocation pSprite, int pX, int pY, int pWidth, int pHeight, float pFade) -
blitSprite
public void blitSprite(RenderPipeline pPipeline, ResourceLocation pSprite, int pX, int pY, int pWidth, int pHeight, int pColor) -
blitSprite
public void blitSprite(RenderPipeline pPipeline, ResourceLocation pSprite, int pTextureWidth, int pTextureHeight, int pU, int pV, int pX, int pY, int pWidth, int pHeight) -
blitSprite
public void blitSprite(RenderPipeline pPipeline, ResourceLocation pSprite, int pTextureWidth, int pTextureHeight, int pU, int pV, int pX, int pY, int pWidth, int pHeight, int pColor) -
blitSprite
public void blitSprite(RenderPipeline pPipeline, TextureAtlasSprite pSprite, int pX, int pWidth, int pY, int pHeight) -
blitSprite
public void blitSprite(RenderPipeline pPipeline, TextureAtlasSprite pSprite, int pX, int pY, int pWidth, int pHeight, int pColor) -
blitSprite
private void blitSprite(RenderPipeline pPipeline, TextureAtlasSprite pSprite, int pTextureWidth, int pTextureHeight, int pU, int pV, int pX, int pY, int pWidth, int pHeight, int pColor) -
blitNineSlicedSprite
private void blitNineSlicedSprite(RenderPipeline pPipeline, TextureAtlasSprite pSprite, GuiSpriteScaling.NineSlice pNineSlice, int pX, int pY, int pWidth, int pHeight, int pColor) -
blitNineSliceInnerSegment
private void blitNineSliceInnerSegment(RenderPipeline pPipeline, GuiSpriteScaling.NineSlice pNineSlice, TextureAtlasSprite pSprite, int pBorderMinX, int pBorderMinY, int pBorderMaxX, int pBorderMaxY, int pU, int pV, int pSpriteWidth, int pSpriteHeight, int pTextureWidth, int pTextureHeight, int pColor) -
blitTiledSprite
private void blitTiledSprite(RenderPipeline pPipeline, TextureAtlasSprite pSprite, int pX, int pY, int pWidth, int pHeight, int pU, int pV, int pSpriteWidth, int pSpriteHeight, int pTextureWidth, int pTextureHeight, int pColor) -
blit
public void blit(RenderPipeline pPipeline, ResourceLocation pAtlas, int pX, int pY, float pU, float pV, int pWidth, int pHeight, int pTextureWidth, int pTextureHeight, int pColor) -
blit
public void blit(RenderPipeline pPipeline, ResourceLocation pAtlas, int pX, int pY, float pU, float pV, int pWidth, int pHeight, int pTextureWidth, int pTextureHeight) -
blit
public void blit(RenderPipeline pPipeline, ResourceLocation pAtlas, int pX, int pY, float pU, float pV, int pWidth, int pHeight, int pUWidth, int pVHeight, int pTextureWidth, int pTextureHeight) -
blit
public void blit(RenderPipeline pPipeline, ResourceLocation pAtlas, int pX, int pY, float pU, float pV, int pWidth, int pHeight, int pUWidth, int pVHeight, int pTextureWidth, int pTextureHeight, int pColor) -
blit
public void blit(ResourceLocation pAtlas, int pX0, int pY0, int pX1, int pY1, float pU0, float pU1, float pV0, float pV1) -
innerBlit
private void innerBlit(RenderPipeline pPipeline, ResourceLocation pAtlas, int pX0, int pX1, int pY0, int pY1, float pU0, float pU1, float pV0, float pV1, int pColor) -
submitBlit
private void submitBlit(RenderPipeline pPipeline, GpuTextureView pAtlasTexture, int pX0, int pY0, int pX1, int pY1, float pU0, float pU1, float pV0, float pV1, int pColor) -
renderItem
Renders an item stack at the specified coordinates.- Parameters:
pStack
- the item stack to render.pX
- the x-coordinate of the rendering position.pY
- the y-coordinate of the rendering position.
-
renderItem
Renders an item stack at the specified coordinates with a random seed.- Parameters:
pStack
- the item stack to render.pX
- the x-coordinate of the rendering position.pY
- the y-coordinate of the rendering position.pSeed
- the random seed.
-
renderFakeItem
Renders a fake item stack at the specified coordinates.- Parameters:
pStack
- the fake item stack to render.pX
- the x-coordinate of the rendering position.pY
- 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:
pEntity
- the living entity.pStack
- the item stack to render.pX
- the x-coordinate of the rendering position.pY
- the y-coordinate of the rendering position.pSeed
- the random seed.
-
renderItem
private void renderItem(@Nullable LivingEntity pEntity, @Nullable Level pLevel, ItemStack pStack, int pX, int pY, int pSeed) Renders an item stack for a living entity in a specific level at the specified coordinates with a random seed.- Parameters:
pEntity
- the living entity. Can be null.pLevel
- the level in which the rendering occurs. Can be null.pStack
- the item stack to render.pX
- the x-coordinate of the rendering position.pY
- the y-coordinate of the rendering position.pSeed
- the random seed.
-
renderItemDecorations
Renders additional decorations for an item stack at the specified coordinates.- Parameters:
pFont
- the font used for rendering text.pStack
- the item stack to decorate.pX
- the x-coordinate of the rendering position.pY
- the y-coordinate of the rendering position.
-
renderItemDecorations
public void renderItemDecorations(Font pFont, ItemStack pStack, int pX, int pY, @Nullable String pText) Renders additional decorations for an item stack at the specified coordinates with optional custom text.- Parameters:
pFont
- the font used for rendering text.pStack
- the item stack to decorate.pX
- the x-coordinate of the rendering position.pY
- the y-coordinate of the rendering position.pText
- the custom text to display. Can be null.
-
setTooltipForNextFrame
-
setTooltipForNextFrame
-
setTooltipForNextFrame
-
setTooltipForNextFrame
-
setTooltipForNextFrame
public void setTooltipForNextFrame(Font font, List<Component> textComponents, Optional<TooltipComponent> tooltipComponent, ItemStack stack, int mouseX, int mouseY, @Nullable ResourceLocation backgroundTexture) -
setTooltipForNextFrame
public void setTooltipForNextFrame(Font pFont, List<Component> pLines, Optional<TooltipComponent> pTooltipImage, int pX, int pY) -
setTooltipForNextFrame
public void setTooltipForNextFrame(Font pFont, List<Component> pLines, Optional<TooltipComponent> pTooltipImage, int pX, int pY, @Nullable ResourceLocation pBackground) -
setTooltipForNextFrame
-
setTooltipForNextFrame
public void setTooltipForNextFrame(Font pFont, Component pText, int pX, int pY, @Nullable ResourceLocation pBackground) -
setComponentTooltipForNextFrame
-
setComponentTooltipForNextFrame
public void setComponentTooltipForNextFrame(Font pFont, List<Component> pLines, int pX, int pY, @Nullable ResourceLocation pBackground) -
setComponentTooltipForNextFrame
public void setComponentTooltipForNextFrame(Font pFont, List<? extends FormattedText> pLines, int pX, int pY, ItemStack stack) -
setComponentTooltipForNextFrame
public void setComponentTooltipForNextFrame(Font pFont, List<? extends FormattedText> pLines, int pX, int pY, ItemStack stack, @Nullable ResourceLocation 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 ResourceLocation backgroundTexture) -
setTooltipForNextFrame
public void setTooltipForNextFrame(Font pFont, List<? extends FormattedCharSequence> pLines, int pX, int pY) -
setTooltipForNextFrame
public void setTooltipForNextFrame(Font pFont, List<? extends FormattedCharSequence> pLines, int pX, int pY, @Nullable ResourceLocation pBackground) -
setTooltipForNextFrame
public void setTooltipForNextFrame(Font pFont, List<FormattedCharSequence> pLines, ClientTooltipPositioner pPositioner, int pX, int pY, boolean pFocused) -
setTooltipForNextFrameInternal
private void setTooltipForNextFrameInternal(Font pFont, List<ClientTooltipComponent> pComponents, int pX, int pY, ClientTooltipPositioner pPositioner, @Nullable ResourceLocation pBackground, boolean pFocused) -
renderTooltip
public void renderTooltip(Font pFont, List<ClientTooltipComponent> pComponents, int pX, int pY, ClientTooltipPositioner pPositioner, @Nullable ResourceLocation pBackground) -
renderTooltip
public void renderTooltip(Font pFont, List<ClientTooltipComponent> pComponents, int pX, int pY, ClientTooltipPositioner pPositioner, @Nullable ResourceLocation pBackground, ItemStack tooltipStack) -
renderDeferredTooltip
public void renderDeferredTooltip() -
renderItemBar
-
renderItemCount
-
renderItemCooldown
-
renderComponentHoverEffect
public void renderComponentHoverEffect(Font pFont, @Nullable Style pStyle, int pMouseX, int pMouseY) Renders a hover effect for a text component at the specified mouse coordinates.- Parameters:
pFont
- the font used for rendering text.pStyle
- the style of the text component. Can be null.pMouseX
- the x-coordinate of the mouse position.pMouseY
- the y-coordinate of the mouse position.
-
submitMapRenderState
-
submitEntityRenderState
public void submitEntityRenderState(EntityRenderState p_415907_, float p_415695_, org.joml.Vector3f p_415772_, org.joml.Quaternionf p_416089_, @Nullable org.joml.Quaternionf p_416355_, int p_416675_, int p_416412_, int p_415766_, int p_416432_) -
submitSkinRenderState
public void submitSkinRenderState(PlayerModel pPlayerModel, ResourceLocation pTexture, float pScale, float pRotationX, float pRotationY, float pPivotY, int pX0, int pY0, int pX1, int pY1) -
submitBookModelRenderState
public void submitBookModelRenderState(BookModel pBookModel, ResourceLocation pTexture, float pScale, float pOpen, float pFlip, int pX0, int pY0, int pX1, int pY1) -
submitBannerPatternRenderState
public void submitBannerPatternRenderState(ModelPart pFlag, DyeColor pBaseColor, BannerPatternLayers pResultBannerPatterns, int pX0, int pY0, int pX1, int pY1) -
submitSignRenderState
-
submitProfilerChartRenderState
public void submitProfilerChartRenderState(List<ResultField> pChartData, int pX0, int pY0, int pX1, int pY1) -
submitGuiElementRenderState
Neo: Submit a customGuiElementRenderState
for rendering -
submitPictureInPictureRenderState
Neo: Submit a customPictureInPictureRenderState
for rendering- See Also:
-
peekScissorStack
Neo: Returns the top-most scissor rectangle, if present, for use with customGuiElementRenderState
s andPictureInPictureRenderState
s
-