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 final record(package private) static classA utility class for managing a stack of screen rectangles for scissoring. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<GuiGraphics.OutlineBox> private Runnableprivate static final intprivate final GuiRenderStateprivate final TextureAtlasprivate final MaterialSetprivate final Minecraftprivate 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 pMinecraft, GuiRenderState pGuiRenderState) privateGuiGraphics(Minecraft pMinecraft, Matrix3x2fStack pPose, GuiRenderState pGuiRenderState) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyCursor(Window pWindow) voidblit(RenderPipeline pPipeline, ResourceLocation pAtlas, int pX, int pY, float pU, float pV, int pWidth, int pHeight, int pTextureWidth, int pTextureHeight) voidblit(RenderPipeline pPipeline, ResourceLocation pAtlas, int pX, int pY, float pU, float pV, int pWidth, int pHeight, int pTextureWidth, int pTextureHeight, int pColor) voidblit(RenderPipeline pPipeline, ResourceLocation pAtlas, int pX, int pY, float pU, float pV, int pWidth, int pHeight, int pUWidth, int pVHeight, int pTextureWidth, int pTextureHeight) voidblit(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) voidblit(ResourceLocation pAtlas, int pX0, int pY0, int pX1, int pY1, float pU0, float pU1, float pV0, float pV1) private voidblitNineSlicedSprite(RenderPipeline pPipeline, TextureAtlasSprite pSprite, GuiSpriteScaling.NineSlice pNineSlice, int pX, int pY, int pWidth, int pHeight, int pColor) private voidblitNineSliceInnerSegment(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) voidblitSprite(RenderPipeline pPipeline, TextureAtlasSprite pSprite, int pX, int pWidth, int pY, int pHeight) voidblitSprite(RenderPipeline pPipeline, TextureAtlasSprite pSprite, int pX, int pY, int pWidth, int pHeight, int pColor) private voidblitSprite(RenderPipeline pPipeline, TextureAtlasSprite pSprite, int pTextureWidth, int pTextureHeight, int pU, int pV, int pX, int pY, int pWidth, int pHeight, int pColor) voidblitSprite(RenderPipeline pPipeline, ResourceLocation pSprite, int pX, int pY, int pWidth, int pHeight) voidblitSprite(RenderPipeline pPipeline, ResourceLocation pSprite, int pX, int pY, int pWidth, int pHeight, float pFade) voidblitSprite(RenderPipeline pPipeline, ResourceLocation pSprite, int pX, int pY, int pWidth, int pHeight, int pColor) voidblitSprite(RenderPipeline pPipeline, ResourceLocation pSprite, int pTextureWidth, int pTextureHeight, int pU, int pV, int pX, int pY, int pWidth, int pHeight) voidblitSprite(RenderPipeline pPipeline, ResourceLocation pSprite, int pTextureWidth, int pTextureHeight, int pU, int pV, int pX, int pY, int pWidth, int pHeight, int pColor) private voidblitTiledSprite(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) voidbooleancontainsPointInScissor(int pX, int pY) voidvoiddrawCenteredString(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.voiddrawCenteredString(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.voiddrawCenteredString(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.voiddrawString(Font pFont, String pText, int pX, int pY, int pColor) voiddrawString(Font pFont, String pText, int pX, int pY, int pColor, boolean pDrawShadow) voiddrawString(Font pFont, Component pText, int pX, int pY, int pColor) voiddrawString(Font pFont, Component pText, int pX, int pY, int pColor, boolean pDrawShadow) voiddrawString(Font pFont, FormattedCharSequence pText, int pX, int pY, int pColor) voiddrawString(Font pFont, FormattedCharSequence pText, int pX, int pY, int pColor, boolean pDrawShadow) voiddrawStringWithBackdrop(Font pFont, Component pText, int pX, int pY, int pWidth, int pColor) voiddrawWordWrap(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.voiddrawWordWrap(Font pFont, FormattedText pText, int pX, int pY, int pLineWidth, int pColor, boolean pDropShadow) voidenableScissor(int pMinX, int pMinY, int pMaxX, int pMaxY) Enables scissoring with the specified screen coordinates.voidfill(int pMinX, int pMinY, int pMaxX, int pMaxY, int pColor) Fills a rectangle with the specified color using the given coordinates as the boundaries.voidfill(RenderPipeline pPipeline, int pMinX, int pMinY, int pMaxX, int pMaxY, int pColor) voidfill(RenderPipeline pPipeline, TextureSetup pTextureSetup, int pMinX, int pMinY, int pMaxX, int pMaxY) voidfillGradient(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.private static GuiSpriteScalinggetSpriteScaling(TextureAtlasSprite pSprite) intintguiWidth()voidhLine(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 voidinnerBlit(RenderPipeline pPipeline, ResourceLocation pAtlas, int pX0, int pX1, int pY0, int pY1, float pU0, float pU1, float pV0, float pV1, int pColor) voidNeo: Returns the top-most scissor rectangle, if present, for use with customGuiElementRenderStates andPictureInPictureRenderStatespose()voidrenderComponentHoverEffect(Font pFont, Style pStyle, int pMouseX, int pMouseY) Renders a hover effect for a text component at the specified mouse coordinates.voidvoidrenderFakeItem(ItemStack pStack, int pX, int pY) Renders a fake item stack at the specified coordinates.voidrenderFakeItem(ItemStack pStack, int pX, int pY, int pSeed) voidrenderItem(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 voidrenderItem(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.voidrenderItem(ItemStack pStack, int pX, int pY) Renders an item stack at the specified coordinates.voidrenderItem(ItemStack pStack, int pX, int pY, int pSeed) Renders an item stack at the specified coordinates with a random seed.private voidrenderItemBar(ItemStack pStack, int pX, int pY) private voidrenderItemCooldown(ItemStack pStack, int pX, int pY) private voidrenderItemCount(Font pFont, ItemStack pStack, int pX, int pY, String pText) voidrenderItemDecorations(Font pFont, ItemStack pStack, int pX, int pY) Renders additional decorations for an item stack at the specified coordinates.voidrenderItemDecorations(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.voidrenderTooltip(Font pFont, List<ClientTooltipComponent> pComponents, int pX, int pY, ClientTooltipPositioner pPositioner, ResourceLocation pBackground) voidrenderTooltip(Font pFont, List<ClientTooltipComponent> pComponents, int pX, int pY, ClientTooltipPositioner pPositioner, ResourceLocation pBackground, ItemStack tooltipStack) voidrequestCursor(CursorType pCursor) voidsetComponentTooltipForNextFrame(Font pFont, List<? extends FormattedText> pLines, int pX, int pY, ItemStack stack) voidsetComponentTooltipForNextFrame(Font pFont, List<? extends FormattedText> pLines, int pX, int pY, ItemStack stack, ResourceLocation backgroundTexture) voidsetComponentTooltipForNextFrame(Font pFont, List<Component> pLines, int pX, int pY) voidsetComponentTooltipForNextFrame(Font pFont, List<Component> pLines, int pX, int pY, ResourceLocation pBackground) 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, ResourceLocation backgroundTexture) voidsetTooltipForNextFrame(List<FormattedCharSequence> pLines, int pX, int pY) voidsetTooltipForNextFrame(Font pFont, List<? extends FormattedCharSequence> pLines, int pX, int pY) voidsetTooltipForNextFrame(Font pFont, List<? extends FormattedCharSequence> pLines, int pX, int pY, ResourceLocation pBackground) voidsetTooltipForNextFrame(Font pFont, List<Component> pLines, Optional<TooltipComponent> pTooltipImage, int pX, int pY) voidsetTooltipForNextFrame(Font pFont, List<Component> pLines, Optional<TooltipComponent> pTooltipImage, int pX, int pY, ResourceLocation pBackground) 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, ResourceLocation backgroundTexture) voidsetTooltipForNextFrame(Font pFont, List<FormattedCharSequence> pLines, ClientTooltipPositioner pPositioner, int pX, int pY, boolean pFocused) voidsetTooltipForNextFrame(Font pFont, Component pText, int pX, int pY) voidsetTooltipForNextFrame(Font pFont, Component pText, int pX, int pY, ResourceLocation pBackground) voidsetTooltipForNextFrame(Font pFont, ItemStack pStack, int pX, int pY) voidsetTooltipForNextFrame(Component pText, int pX, int pY) private voidsetTooltipForNextFrameInternal(Font pFont, List<ClientTooltipComponent> pComponents, int pX, int pY, ClientTooltipPositioner pPositioner, ResourceLocation pBackground, boolean pFocused) voidsubmitBannerPatternRenderState(BannerFlagModel pFlag, DyeColor pBaseColor, BannerPatternLayers pResultBannerPatterns, int pX0, int pY0, int pX1, int pY1) private voidsubmitBlit(RenderPipeline pPipeline, GpuTextureView pAtlasTexture, int pX0, int pY0, int pX1, int pY1, float pU0, float pU1, float pV0, float pV1, int pColor) voidsubmitBookModelRenderState(BookModel pBookModel, ResourceLocation pTexture, float pScale, float pOpen, float pFlip, int pX0, int pY0, int pX1, int pY1) private voidsubmitColoredRectangle(RenderPipeline pPipeline, TextureSetup pTextureSetup, int pMinX, int pMinY, int pMaxX, int pMaxY, int pColorFrom, Integer pColorTo) voidsubmitEntityRenderState(EntityRenderState pRenderState, float pScale, Vector3f pTranslation, Quaternionf pRotation, Quaternionf pOverrideCameraAngle, int pX0, int pY0, int pX1, int pY1) voidsubmitGuiElementRenderState(GuiElementRenderState renderState) Neo: Submit a customGuiElementRenderStatefor renderingvoidsubmitMapRenderState(MapRenderState pRenderState) voidsubmitOutline(int pX, int pY, int pWidth, int pHeight, int pColor) voidNeo: Submit a customPictureInPictureRenderStatefor renderingvoidsubmitProfilerChartRenderState(List<ResultField> pChartData, int pX0, int pY0, int pX1, int pY1) voidsubmitSignRenderState(Model.Simple pSignModel, float pScale, WoodType pWoodType, int pX0, int pY0, int pX1, int pY1) voidsubmitSkinRenderState(PlayerModel pPlayerModel, ResourceLocation pTexture, float pScale, float pRotationX, float pRotationY, float pPivotY, int pX0, int pY0, int pX1, int pY1) private voidsubmitTiledBlit(RenderPipeline pPipeline, GpuTextureView pAtlasTexture, int pTileWidth, int pTileHeight, int pX0, int pX1, int pY0, int pY1, float pU0, float pU1, float pV0, float pV1, int pColor) voidtextHighlight(int pMinX, int pMinY, int pMaxX, int pMaxY) voidvLine(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, 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
-
deferredTooltip
-
deferredOutlines
-
tooltipStack
-
-
Constructor Details
-
GuiGraphics
-
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 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 pMinX, int pMinY, int pMaxX, int pMaxY) -
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
-
submitOutline
public void submitOutline(int pX, int pY, int pWidth, int pHeight, int pColor) -
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) -
getSpriteScaling
-
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) -
submitTiledBlit
private void submitTiledBlit(RenderPipeline pPipeline, GpuTextureView pAtlasTexture, int pTileWidth, int pTileHeight, int pX0, int pX1, int pY0, 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) -
renderDeferredElements
public void renderDeferredElements() -
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 pRenderState, float pScale, Vector3f pTranslation, Quaternionf pRotation, @Nullable Quaternionf pOverrideCameraAngle, int pX0, int pY0, int pX1, int pY1) -
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(BannerFlagModel pFlag, DyeColor pBaseColor, BannerPatternLayers pResultBannerPatterns, int pX0, int pY0, int pX1, int pY1) -
submitSignRenderState
public void submitSignRenderState(Model.Simple pSignModel, float pScale, WoodType pWoodType, int pX0, int pY0, int pX1, int pY1) -
submitProfilerChartRenderState
public void submitProfilerChartRenderState(List<ResultField> pChartData, int pX0, int pY0, int pX1, int pY1) -
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
-