GuiGraphicsExtractor.java

net.minecraft.client.gui.GuiGraphicsExtractor

信息

  • 全限定名:net.minecraft.client.gui.GuiGraphicsExtractor
  • 类型:public class
  • 包:net.minecraft.client.gui
  • 源码路径:src/main/java/net/minecraft/client/gui/GuiGraphicsExtractor.java
  • 起始行号:L91
  • 职责:

    TODO

字段/常量

  • EXTRA_SPACE_AFTER_FIRST_TOOLTIP_LINE

    • 类型: int
    • 修饰符: private static final
    • 源码定位: L92
    • 说明:

      TODO

  • minecraft

    • 类型: Minecraft
    • 修饰符: private final
    • 源码定位: L93
    • 说明:

      TODO

  • pose

    • 类型: Matrix3x2fStack
    • 修饰符: private final
    • 源码定位: L94
    • 说明:

      TODO

  • scissorStack

    • 类型: GuiGraphicsExtractor.ScissorStack
    • 修饰符: private final
    • 源码定位: L95
    • 说明:

      TODO

  • sprites

    • 类型: SpriteGetter
    • 修饰符: private final
    • 源码定位: L96
    • 说明:

      TODO

  • guiSprites

    • 类型: TextureAtlas
    • 修饰符: private final
    • 源码定位: L97
    • 说明:

      TODO

  • guiRenderState

    • 类型: GuiRenderState
    • 修饰符: private final
    • 源码定位: L98
    • 说明:

      TODO

  • pendingCursor

    • 类型: CursorType
    • 修饰符: private
    • 源码定位: L99
    • 说明:

      TODO

  • mouseX

    • 类型: int
    • 修饰符: private final
    • 源码定位: L100
    • 说明:

      TODO

  • mouseY

    • 类型: int
    • 修饰符: private final
    • 源码定位: L101
    • 说明:

      TODO

  • deferredTooltip

    • 类型: Runnable
    • 修饰符: private
    • 源码定位: L102
    • 说明:

      TODO

  • hoveredTextStyle

    • 类型: Style
    • 修饰符: private
    • 源码定位: L103
    • 说明:

      TODO

  • clickableTextStyle

    • 类型: Style
    • 修饰符: private
    • 源码定位: L104
    • 说明:

      TODO

  • preeditOverlay

    • 类型: Renderable
    • 修饰符: private
    • 源码定位: L105
    • 说明:

      TODO

内部类/嵌套类型

  • net.minecraft.client.gui.GuiGraphicsExtractor.HoveredTextEffects

    • 类型: enum
    • 修饰符: public static
    • 源码定位: L1218
    • 说明:

      TODO

  • net.minecraft.client.gui.GuiGraphicsExtractor.RenderingTextCollector

    • 类型: class
    • 修饰符: private
    • 源码定位: L1237
    • 说明:

      TODO

  • net.minecraft.client.gui.GuiGraphicsExtractor.ScissorStack

    • 类型: class
    • 修饰符: private static
    • 源码定位: L1312
    • 说明:

      TODO

构造器

private GuiGraphicsExtractor(Minecraft minecraft, Matrix3x2fStack pose, GuiRenderState guiRenderState, int mouseX, int mouseY) @ L107

  • 构造器名:GuiGraphicsExtractor
  • 源码定位:L107
  • 修饰符:private

参数:

  • minecraft: Minecraft
  • pose: Matrix3x2fStack
  • guiRenderState: GuiRenderState
  • mouseX: int
  • mouseY: int

说明:

TODO

public GuiGraphicsExtractor(Minecraft minecraft, GuiRenderState guiRenderState, int mouseX, int mouseY) @ L118

  • 构造器名:GuiGraphicsExtractor
  • 源码定位:L118
  • 修饰符:public

参数:

  • minecraft: Minecraft
  • guiRenderState: GuiRenderState
  • mouseX: int
  • mouseY: int

说明:

TODO

方法

下面的方法块按源码顺序生成。

public void requestCursor(CursorType cursorType) @ L122

  • 方法名:requestCursor
  • 源码定位:L122
  • 返回类型:void
  • 修饰符:public

参数:

  • cursorType: CursorType

说明:

TODO

public void applyCursor(Window window) @ L126

  • 方法名:applyCursor
  • 源码定位:L126
  • 返回类型:void
  • 修饰符:public

参数:

  • window: Window

说明:

TODO

public int guiWidth() @ L130

  • 方法名:guiWidth
  • 源码定位:L130
  • 返回类型:int
  • 修饰符:public

参数:

说明:

TODO

public int guiHeight() @ L134

  • 方法名:guiHeight
  • 源码定位:L134
  • 返回类型:int
  • 修饰符:public

参数:

说明:

TODO

public Matrix3x2fStack pose() @ L138

  • 方法名:pose
  • 源码定位:L138
  • 返回类型:Matrix3x2fStack
  • 修饰符:public

参数:

说明:

TODO

public void nextStratum() @ L142

  • 方法名:nextStratum
  • 源码定位:L142
  • 返回类型:void
  • 修饰符:public

参数:

说明:

TODO

public void blurBeforeThisStratum() @ L146

  • 方法名:blurBeforeThisStratum
  • 源码定位:L146
  • 返回类型:void
  • 修饰符:public

参数:

说明:

TODO

public void enableScissor(int x0, int y0, int x1, int y1) @ L150

  • 方法名:enableScissor
  • 源码定位:L150
  • 返回类型:void
  • 修饰符:public

参数:

  • x0: int
  • y0: int
  • x1: int
  • y1: int

说明:

TODO

public void disableScissor() @ L155

  • 方法名:disableScissor
  • 源码定位:L155
  • 返回类型:void
  • 修饰符:public

参数:

说明:

TODO

public boolean containsPointInScissor(int x, int y) @ L159

  • 方法名:containsPointInScissor
  • 源码定位:L159
  • 返回类型:boolean
  • 修饰符:public

参数:

  • x: int
  • y: int

说明:

TODO

public void horizontalLine(int x0, int x1, int y, int col) @ L163

  • 方法名:horizontalLine
  • 源码定位:L163
  • 返回类型:void
  • 修饰符:public

参数:

  • x0: int
  • x1: int
  • y: int
  • col: int

说明:

TODO

public void verticalLine(int x, int y0, int y1, int col) @ L173

  • 方法名:verticalLine
  • 源码定位:L173
  • 返回类型:void
  • 修饰符:public

参数:

  • x: int
  • y0: int
  • y1: int
  • col: int

说明:

TODO

public void fill(int x0, int y0, int x1, int y1, int col) @ L183

  • 方法名:fill
  • 源码定位:L183
  • 返回类型:void
  • 修饰符:public

参数:

  • x0: int
  • y0: int
  • x1: int
  • y1: int
  • col: int

说明:

TODO

public void fill(RenderPipeline pipeline, int x0, int y0, int x1, int y1, int col) @ L187

  • 方法名:fill
  • 源码定位:L187
  • 返回类型:void
  • 修饰符:public

参数:

  • pipeline: RenderPipeline
  • x0: int
  • y0: int
  • x1: int
  • y1: int
  • col: int

说明:

TODO

public void fillGradient(int x0, int y0, int x1, int y1, int col1, int col2) @ L203

  • 方法名:fillGradient
  • 源码定位:L203
  • 返回类型:void
  • 修饰符:public

参数:

  • x0: int
  • y0: int
  • x1: int
  • y1: int
  • col1: int
  • col2: int

说明:

TODO

public void fill(RenderPipeline renderPipeline, TextureSetup textureSetup, int x0, int y0, int x1, int y1) @ L207

  • 方法名:fill
  • 源码定位:L207
  • 返回类型:void
  • 修饰符:public

参数:

  • renderPipeline: RenderPipeline
  • textureSetup: TextureSetup
  • x0: int
  • y0: int
  • x1: int
  • y1: int

说明:

TODO

public void outline(int x, int y, int width, int height, int color) @ L211

  • 方法名:outline
  • 源码定位:L211
  • 返回类型:void
  • 修饰符:public

参数:

  • x: int
  • y: int
  • width: int
  • height: int
  • color: int

说明:

TODO

private void innerFill(RenderPipeline renderPipeline, TextureSetup textureSetup, int x0, int y0, int x1, int y1, int color1, Integer color2) @ L218

  • 方法名:innerFill
  • 源码定位:L218
  • 返回类型:void
  • 修饰符:private

参数:

  • renderPipeline: RenderPipeline
  • textureSetup: TextureSetup
  • x0: int
  • y0: int
  • x1: int
  • y1: int
  • color1: int
  • color2: Integer

说明:

TODO

public void textHighlight(int x0, int y0, int x1, int y1, boolean invertText) @ L227

  • 方法名:textHighlight
  • 源码定位:L227
  • 返回类型:void
  • 修饰符:public

参数:

  • x0: int
  • y0: int
  • x1: int
  • y1: int
  • invertText: boolean

说明:

TODO

public void text(Font font, String str, int x, int y, int color) @ L235

  • 方法名:text
  • 源码定位:L235
  • 返回类型:void
  • 修饰符:public

参数:

  • font: Font
  • str: String
  • x: int
  • y: int
  • color: int

说明:

TODO

public void text(Font font, String str, int x, int y, int color, boolean dropShadow) @ L239

  • 方法名:text
  • 源码定位:L239
  • 返回类型:void
  • 修饰符:public

参数:

  • font: Font
  • str: String
  • x: int
  • y: int
  • color: int
  • dropShadow: boolean

说明:

TODO

public void text(Font font, FormattedCharSequence str, int x, int y, int color) @ L245

  • 方法名:text
  • 源码定位:L245
  • 返回类型:void
  • 修饰符:public

参数:

  • font: Font
  • str: FormattedCharSequence
  • x: int
  • y: int
  • color: int

说明:

TODO

public void text(Font font, FormattedCharSequence str, int x, int y, int color, boolean dropShadow) @ L249

  • 方法名:text
  • 源码定位:L249
  • 返回类型:void
  • 修饰符:public

参数:

  • font: Font
  • str: FormattedCharSequence
  • x: int
  • y: int
  • color: int
  • dropShadow: boolean

说明:

TODO

public void text(Font font, Component str, int x, int y, int color) @ L256

  • 方法名:text
  • 源码定位:L256
  • 返回类型:void
  • 修饰符:public

参数:

  • font: Font
  • str: Component
  • x: int
  • y: int
  • color: int

说明:

TODO

public void text(Font font, Component str, int x, int y, int color, boolean dropShadow) @ L260

  • 方法名:text
  • 源码定位:L260
  • 返回类型:void
  • 修饰符:public

参数:

  • font: Font
  • str: Component
  • x: int
  • y: int
  • color: int
  • dropShadow: boolean

说明:

TODO

public void centeredText(Font font, String str, int x, int y, int color) @ L264

  • 方法名:centeredText
  • 源码定位:L264
  • 返回类型:void
  • 修饰符:public

参数:

  • font: Font
  • str: String
  • x: int
  • y: int
  • color: int

说明:

TODO

public void centeredText(Font font, Component text, int x, int y, int color) @ L268

  • 方法名:centeredText
  • 源码定位:L268
  • 返回类型:void
  • 修饰符:public

参数:

  • font: Font
  • text: Component
  • x: int
  • y: int
  • color: int

说明:

TODO

public void centeredText(Font font, FormattedCharSequence text, int x, int y, int color) @ L273

  • 方法名:centeredText
  • 源码定位:L273
  • 返回类型:void
  • 修饰符:public

参数:

  • font: Font
  • text: FormattedCharSequence
  • x: int
  • y: int
  • color: int

说明:

TODO

public void textWithWordWrap(Font font, FormattedText string, int x, int y, int width, int col) @ L277

  • 方法名:textWithWordWrap
  • 源码定位:L277
  • 返回类型:void
  • 修饰符:public

参数:

  • font: Font
  • string: FormattedText
  • x: int
  • y: int
  • width: int
  • col: int

说明:

TODO

public void textWithWordWrap(Font font, FormattedText string, int x, int y, int width, int col, boolean dropShadow) @ L281

  • 方法名:textWithWordWrap
  • 源码定位:L281
  • 返回类型:void
  • 修饰符:public

参数:

  • font: Font
  • string: FormattedText
  • x: int
  • y: int
  • width: int
  • col: int
  • dropShadow: boolean

说明:

TODO

public void textWithBackdrop(Font font, Component str, int textX, int textY, int textWidth, int textColor) @ L288

  • 方法名:textWithBackdrop
  • 源码定位:L288
  • 返回类型:void
  • 修饰符:public

参数:

  • font: Font
  • str: Component
  • textX: int
  • textY: int
  • textWidth: int
  • textColor: int

说明:

TODO

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) @ L298

  • 方法名:blit
  • 源码定位:L298
  • 返回类型:void
  • 修饰符:public

参数:

  • renderPipeline: RenderPipeline
  • texture: Identifier
  • x: int
  • y: int
  • u: float
  • v: float
  • width: int
  • height: int
  • textureWidth: int
  • textureHeight: int
  • color: int

说明:

TODO

public void blit(RenderPipeline renderPipeline, Identifier texture, int x, int y, float u, float v, int width, int height, int textureWidth, int textureHeight) @ L314

  • 方法名:blit
  • 源码定位:L314
  • 返回类型:void
  • 修饰符:public

参数:

  • renderPipeline: RenderPipeline
  • texture: Identifier
  • x: int
  • y: int
  • u: float
  • v: float
  • width: int
  • height: int
  • textureWidth: int
  • textureHeight: int

说明:

TODO

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) @ L320

  • 方法名:blit
  • 源码定位:L320
  • 返回类型:void
  • 修饰符:public

参数:

  • renderPipeline: RenderPipeline
  • texture: Identifier
  • x: int
  • y: int
  • u: float
  • v: float
  • width: int
  • height: int
  • srcWidth: int
  • srcHeight: int
  • textureWidth: int
  • textureHeight: int

说明:

TODO

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) @ L337

  • 方法名:blit
  • 源码定位:L337
  • 返回类型:void
  • 修饰符:public

参数:

  • renderPipeline: RenderPipeline
  • texture: Identifier
  • x: int
  • y: int
  • u: float
  • v: float
  • width: int
  • height: int
  • srcWidth: int
  • srcHeight: int
  • textureWidth: int
  • textureHeight: int
  • color: int

说明:

TODO

public void blit(Identifier location, int x0, int y0, int x1, int y1, float u0, float u1, float v0, float v1) @ L367

  • 方法名:blit
  • 源码定位:L367
  • 返回类型:void
  • 修饰符:public

参数:

  • location: Identifier
  • x0: int
  • y0: int
  • x1: int
  • y1: int
  • u0: float
  • u1: float
  • v0: float
  • v1: float

说明:

TODO

public void blit(GpuTextureView textureView, GpuSampler sampler, int x0, int y0, int x1, int y1, float u0, float u1, float v0, float v1) @ L371

  • 方法名:blit
  • 源码定位:L371
  • 返回类型:void
  • 修饰符:public

参数:

  • textureView: GpuTextureView
  • sampler: GpuSampler
  • x0: int
  • y0: int
  • x1: int
  • y1: int
  • u0: float
  • u1: float
  • v0: float
  • v1: float

说明:

TODO

public void blitSprite(RenderPipeline renderPipeline, Identifier location, int x, int y, int width, int height) @ L375

  • 方法名:blitSprite
  • 源码定位:L375
  • 返回类型:void
  • 修饰符:public

参数:

  • renderPipeline: RenderPipeline
  • location: Identifier
  • x: int
  • y: int
  • width: int
  • height: int

说明:

TODO

public void blitSprite(RenderPipeline renderPipeline, Identifier location, int x, int y, int width, int height, float alpha) @ L379

  • 方法名:blitSprite
  • 源码定位:L379
  • 返回类型:void
  • 修饰符:public

参数:

  • renderPipeline: RenderPipeline
  • location: Identifier
  • x: int
  • y: int
  • width: int
  • height: int
  • alpha: float

说明:

TODO

public void blitSprite(RenderPipeline renderPipeline, Identifier location, int x, int y, int width, int height, int color) @ L383

  • 方法名:blitSprite
  • 源码定位:L383
  • 返回类型:void
  • 修饰符:public

参数:

  • renderPipeline: RenderPipeline
  • location: Identifier
  • x: int
  • y: int
  • width: int
  • height: int
  • color: int

说明:

TODO

public void blitSprite(RenderPipeline renderPipeline, Identifier location, int spriteWidth, int spriteHeight, int textureX, int textureY, int x, int y, int width, int height) @ L400

  • 方法名:blitSprite
  • 源码定位:L400
  • 返回类型:void
  • 修饰符:public

参数:

  • renderPipeline: RenderPipeline
  • location: Identifier
  • spriteWidth: int
  • spriteHeight: int
  • textureX: int
  • textureY: int
  • x: int
  • y: int
  • width: int
  • height: int

说明:

TODO

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) @ L406

  • 方法名:blitSprite
  • 源码定位:L406
  • 返回类型:void
  • 修饰符:public

参数:

  • renderPipeline: RenderPipeline
  • location: Identifier
  • spriteWidth: int
  • spriteHeight: int
  • textureX: int
  • textureY: int
  • x: int
  • y: int
  • width: int
  • height: int
  • color: int

说明:

TODO

public void blitSprite(RenderPipeline renderPipeline, TextureAtlasSprite sprite, int x, int y, int width, int height) @ L430

  • 方法名:blitSprite
  • 源码定位:L430
  • 返回类型:void
  • 修饰符:public

参数:

  • renderPipeline: RenderPipeline
  • sprite: TextureAtlasSprite
  • x: int
  • y: int
  • width: int
  • height: int

说明:

TODO

public void blitSprite(RenderPipeline renderPipeline, TextureAtlasSprite sprite, int x, int y, int width, int height, int color) @ L434

  • 方法名:blitSprite
  • 源码定位:L434
  • 返回类型:void
  • 修饰符:public

参数:

  • renderPipeline: RenderPipeline
  • sprite: TextureAtlasSprite
  • x: int
  • y: int
  • width: int
  • height: int
  • color: int

说明:

TODO

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) @ L442

  • 方法名:blitSprite
  • 源码定位:L442
  • 返回类型:void
  • 修饰符:private

参数:

  • renderPipeline: RenderPipeline
  • sprite: TextureAtlasSprite
  • spriteWidth: int
  • spriteHeight: int
  • textureX: int
  • textureY: int
  • x: int
  • y: int
  • width: int
  • height: int
  • color: int

说明:

TODO

private void blitNineSlicedSprite(RenderPipeline renderPipeline, TextureAtlasSprite sprite, GuiSpriteScaling.NineSlice nineSlice, int x, int y, int width, int height, int color) @ L472

  • 方法名:blitNineSlicedSprite
  • 源码定位:L472
  • 返回类型:void
  • 修饰符:private

参数:

  • renderPipeline: RenderPipeline
  • sprite: TextureAtlasSprite
  • nineSlice: GuiSpriteScaling.NineSlice
  • x: int
  • y: int
  • width: int
  • height: int
  • color: int

说明:

TODO

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) @ L668

  • 方法名:blitNineSliceInnerSegment
  • 源码定位:L668
  • 返回类型:void
  • 修饰符:private

参数:

  • renderPipeline: RenderPipeline
  • nineSlice: GuiSpriteScaling.NineSlice
  • sprite: TextureAtlasSprite
  • x: int
  • y: int
  • width: int
  • height: int
  • textureX: int
  • textureY: int
  • textureWidth: int
  • textureHeight: int
  • spriteWidth: int
  • spriteHeight: int
  • color: int

说明:

TODO

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) @ L707

  • 方法名:blitTiledSprite
  • 源码定位:L707
  • 返回类型:void
  • 修饰符:private

参数:

  • renderPipeline: RenderPipeline
  • sprite: TextureAtlasSprite
  • x: int
  • y: int
  • width: int
  • height: int
  • textureX: int
  • textureY: int
  • tileWidth: int
  • tileHeight: int
  • spriteWidth: int
  • spriteHeight: int
  • color: int

说明:

TODO

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) @ L748

  • 方法名:innerBlit
  • 源码定位:L748
  • 返回类型:void
  • 修饰符:private

参数:

  • renderPipeline: RenderPipeline
  • location: Identifier
  • x0: int
  • x1: int
  • y0: int
  • y1: int
  • u0: float
  • u1: float
  • v0: float
  • v1: float
  • color: int

说明:

TODO

private void innerBlit(RenderPipeline pipeline, GpuTextureView textureView, GpuSampler sampler, int x0, int y0, int x1, int y1, float u0, float u1, float v0, float v1, int color) @ L755

  • 方法名:innerBlit
  • 源码定位:L755
  • 返回类型:void
  • 修饰符:private

参数:

  • pipeline: RenderPipeline
  • textureView: GpuTextureView
  • sampler: GpuSampler
  • x0: int
  • y0: int
  • x1: int
  • y1: int
  • u0: float
  • u1: float
  • v0: float
  • v1: float
  • color: int

说明:

TODO

private void innerTiledBlit(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) @ L789

  • 方法名:innerTiledBlit
  • 源码定位:L789
  • 返回类型:void
  • 修饰符:private

参数:

  • pipeline: RenderPipeline
  • textureView: GpuTextureView
  • sampler: GpuSampler
  • tileWidth: int
  • tileHeight: int
  • x0: int
  • y0: int
  • x1: int
  • y1: int
  • u0: float
  • u1: float
  • v0: float
  • v1: float
  • color: int

说明:

TODO

private static GuiSpriteScaling getSpriteScaling(TextureAtlasSprite sprite) @ L827

  • 方法名:getSpriteScaling
  • 源码定位:L827
  • 返回类型:GuiSpriteScaling
  • 修饰符:private static

参数:

  • sprite: TextureAtlasSprite

说明:

TODO

public void item(ItemStack itemStack, int x, int y) @ L831

  • 方法名:item
  • 源码定位:L831
  • 返回类型:void
  • 修饰符:public

参数:

  • itemStack: ItemStack
  • x: int
  • y: int

说明:

TODO

public void item(ItemStack itemStack, int x, int y, int seed) @ L835

  • 方法名:item
  • 源码定位:L835
  • 返回类型:void
  • 修饰符:public

参数:

  • itemStack: ItemStack
  • x: int
  • y: int
  • seed: int

说明:

TODO

public void item(LivingEntity owner, ItemStack itemStack, int x, int y, int seed) @ L839

  • 方法名:item
  • 源码定位:L839
  • 返回类型:void
  • 修饰符:public

参数:

  • owner: LivingEntity
  • itemStack: ItemStack
  • x: int
  • y: int
  • seed: int

说明:

TODO

private void item(LivingEntity owner, Level level, ItemStack itemStack, int x, int y, int seed) @ L843

  • 方法名:item
  • 源码定位:L843
  • 返回类型:void
  • 修饰符:private

参数:

  • owner: LivingEntity
  • level: Level
  • itemStack: ItemStack
  • x: int
  • y: int
  • seed: int

说明:

TODO

public void fakeItem(ItemStack itemStack, int x, int y) @ L861

  • 方法名:fakeItem
  • 源码定位:L861
  • 返回类型:void
  • 修饰符:public

参数:

  • itemStack: ItemStack
  • x: int
  • y: int

说明:

TODO

public void fakeItem(ItemStack itemStack, int x, int y, int seed) @ L865

  • 方法名:fakeItem
  • 源码定位:L865
  • 返回类型:void
  • 修饰符:public

参数:

  • itemStack: ItemStack
  • x: int
  • y: int
  • seed: int

说明:

TODO

public void itemDecorations(Font font, ItemStack itemStack, int x, int y) @ L869

  • 方法名:itemDecorations
  • 源码定位:L869
  • 返回类型:void
  • 修饰符:public

参数:

  • font: Font
  • itemStack: ItemStack
  • x: int
  • y: int

说明:

TODO

public void itemDecorations(Font font, ItemStack itemStack, int x, int y, String countText) @ L873

  • 方法名:itemDecorations
  • 源码定位:L873
  • 返回类型:void
  • 修饰符:public

参数:

  • font: Font
  • itemStack: ItemStack
  • x: int
  • y: int
  • countText: String

说明:

TODO

private void itemBar(ItemStack itemStack, int x, int y) @ L883

  • 方法名:itemBar
  • 源码定位:L883
  • 返回类型:void
  • 修饰符:private

参数:

  • itemStack: ItemStack
  • x: int
  • y: int

说明:

TODO

private void itemCount(Font font, ItemStack itemStack, int x, int y, String countText) @ L892

  • 方法名:itemCount
  • 源码定位:L892
  • 返回类型:void
  • 修饰符:private

参数:

  • font: Font
  • itemStack: ItemStack
  • x: int
  • y: int
  • countText: String

说明:

TODO

private void itemCooldown(ItemStack itemStack, int x, int y) @ L899

  • 方法名:itemCooldown
  • 源码定位:L899
  • 返回类型:void
  • 修饰符:private

参数:

  • itemStack: ItemStack
  • x: int
  • y: int

说明:

TODO

public void map(MapRenderState mapRenderState) @ L911

  • 方法名:map
  • 源码定位:L911
  • 返回类型:void
  • 修饰符:public

参数:

  • mapRenderState: MapRenderState

说明:

TODO

public void entity(EntityRenderState renderState, float scale, Vector3f translation, Quaternionf rotation, Quaternionf overrideCameraAngle, int x0, int y0, int x1, int y1) @ L972

  • 方法名:entity
  • 源码定位:L972
  • 返回类型:void
  • 修饰符:public

参数:

  • renderState: EntityRenderState
  • scale: float
  • translation: Vector3f
  • rotation: Quaternionf
  • overrideCameraAngle: Quaternionf
  • x0: int
  • y0: int
  • x1: int
  • y1: int

说明:

TODO

public void skin(PlayerModel playerModel, Identifier texture, float scale, float rotationX, float rotationY, float pivotY, int x0, int y0, int x1, int y1) @ L990

  • 方法名:skin
  • 源码定位:L990
  • 返回类型:void
  • 修饰符:public

参数:

  • playerModel: PlayerModel
  • texture: Identifier
  • scale: float
  • rotationX: float
  • rotationY: float
  • pivotY: float
  • x0: int
  • y0: int
  • x1: int
  • y1: int

说明:

TODO

public void book(BookModel bookModel, Identifier texture, float scale, float open, float flip, int x0, int y0, int x1, int y1) @ L997

  • 方法名:book
  • 源码定位:L997
  • 返回类型:void
  • 修饰符:public

参数:

  • bookModel: BookModel
  • texture: Identifier
  • scale: float
  • open: float
  • flip: float
  • x0: int
  • y0: int
  • x1: int
  • y1: int

说明:

TODO

public void bannerPattern(BannerFlagModel flag, DyeColor baseColor, BannerPatternLayers resultBannerPatterns, int x0, int y0, int x1, int y1) @ L1002

  • 方法名:bannerPattern
  • 源码定位:L1002
  • 返回类型:void
  • 修饰符:public

参数:

  • flag: BannerFlagModel
  • baseColor: DyeColor
  • resultBannerPatterns: BannerPatternLayers
  • x0: int
  • y0: int
  • x1: int
  • y1: int

说明:

TODO

public void sign(Model.Simple signModel, float scale, WoodType woodType, int x0, int y0, int x1, int y1) @ L1007

  • 方法名:sign
  • 源码定位:L1007
  • 返回类型:void
  • 修饰符:public

参数:

  • signModel: Model.Simple
  • scale: float
  • woodType: WoodType
  • x0: int
  • y0: int
  • x1: int
  • y1: int

说明:

TODO

public void profilerChart(List<ResultField> chartData, int x0, int y0, int x1, int y1) @ L1011

  • 方法名:profilerChart
  • 源码定位:L1011
  • 返回类型:void
  • 修饰符:public

参数:

  • chartData: List
  • x0: int
  • y0: int
  • x1: int
  • y1: int

说明:

TODO

public void setTooltipForNextFrame(Component component, int x, int y) @ L1015

  • 方法名:setTooltipForNextFrame
  • 源码定位:L1015
  • 返回类型:void
  • 修饰符:public

参数:

  • component: Component
  • x: int
  • y: int

说明:

TODO

public void setTooltipForNextFrame(List<FormattedCharSequence> formattedCharSequences, int x, int y) @ L1019

  • 方法名:setTooltipForNextFrame
  • 源码定位:L1019
  • 返回类型:void
  • 修饰符:public

参数:

  • formattedCharSequences: List
  • x: int
  • y: int

说明:

TODO

public void setTooltipForNextFrame(Font font, ItemStack itemStack, int xo, int yo) @ L1023

  • 方法名:setTooltipForNextFrame
  • 源码定位:L1023
  • 返回类型:void
  • 修饰符:public

参数:

  • font: Font
  • itemStack: ItemStack
  • xo: int
  • yo: int

说明:

TODO

public void setTooltipForNextFrame(Font font, List<Component> texts, Optional<TooltipComponent> optionalImage, int xo, int yo) @ L1029

  • 方法名:setTooltipForNextFrame
  • 源码定位:L1029
  • 返回类型:void
  • 修饰符:public

参数:

  • font: Font
  • texts: List
  • optionalImage: Optional
  • xo: int
  • yo: int

说明:

TODO

public void setTooltipForNextFrame(Font font, List<Component> texts, Optional<TooltipComponent> optionalImage, int xo, int yo, Identifier style) @ L1033

  • 方法名:setTooltipForNextFrame
  • 源码定位:L1033
  • 返回类型:void
  • 修饰符:public

参数:

  • font: Font
  • texts: List
  • optionalImage: Optional
  • xo: int
  • yo: int
  • style: Identifier

说明:

TODO

public void setTooltipForNextFrame(Font font, List<FormattedCharSequence> tooltip, Optional<TooltipComponent> component, ClientTooltipPositioner positioner, int xo, int yo, boolean replaceExisting, Identifier style) @ L1042

  • 方法名:setTooltipForNextFrame
  • 源码定位:L1042
  • 返回类型:void
  • 修饰符:public

参数:

  • font: Font
  • tooltip: List
  • component: Optional
  • positioner: ClientTooltipPositioner
  • xo: int
  • yo: int
  • replaceExisting: boolean
  • style: Identifier

说明:

TODO

public void setTooltipForNextFrame(Font font, Component text, int xo, int yo) @ L1057

  • 方法名:setTooltipForNextFrame
  • 源码定位:L1057
  • 返回类型:void
  • 修饰符:public

参数:

  • font: Font
  • text: Component
  • xo: int
  • yo: int

说明:

TODO

public void setTooltipForNextFrame(Font font, Component text, int xo, int yo, Identifier style) @ L1061

  • 方法名:setTooltipForNextFrame
  • 源码定位:L1061
  • 返回类型:void
  • 修饰符:public

参数:

  • font: Font
  • text: Component
  • xo: int
  • yo: int
  • style: Identifier

说明:

TODO

public void setComponentTooltipForNextFrame(Font font, List<Component> lines, int xo, int yo) @ L1065

  • 方法名:setComponentTooltipForNextFrame
  • 源码定位:L1065
  • 返回类型:void
  • 修饰符:public

参数:

  • font: Font
  • lines: List
  • xo: int
  • yo: int

说明:

TODO

public void setComponentTooltipForNextFrame(Font font, List<Component> lines, int xo, int yo, Identifier style) @ L1069

  • 方法名:setComponentTooltipForNextFrame
  • 源码定位:L1069
  • 返回类型:void
  • 修饰符:public

参数:

  • font: Font
  • lines: List
  • xo: int
  • yo: int
  • style: Identifier

说明:

TODO

public void setTooltipForNextFrame(Font font, List<?extends FormattedCharSequence> lines, int xo, int yo) @ L1081

  • 方法名:setTooltipForNextFrame
  • 源码定位:L1081
  • 返回类型:void
  • 修饰符:public

参数:

  • font: Font
  • lines: List<?extends FormattedCharSequence>
  • xo: int
  • yo: int

说明:

TODO

public void setTooltipForNextFrame(Font font, List<?extends FormattedCharSequence> lines, int xo, int yo, Identifier style) @ L1085

  • 方法名:setTooltipForNextFrame
  • 源码定位:L1085
  • 返回类型:void
  • 修饰符:public

参数:

  • font: Font
  • lines: List<?extends FormattedCharSequence>
  • xo: int
  • yo: int
  • style: Identifier

说明:

TODO

public void setTooltipForNextFrame(Font font, List<FormattedCharSequence> tooltip, ClientTooltipPositioner positioner, int xo, int yo, boolean replaceExisting) @ L1091

  • 方法名:setTooltipForNextFrame
  • 源码定位:L1091
  • 返回类型:void
  • 修饰符:public

参数:

  • font: Font
  • tooltip: List
  • positioner: ClientTooltipPositioner
  • xo: int
  • yo: int
  • replaceExisting: boolean

说明:

TODO

private void setTooltipForNextFrameInternal(Font font, List<ClientTooltipComponent> lines, int xo, int yo, ClientTooltipPositioner positioner, Identifier style, boolean replaceExisting) @ L1099

  • 方法名:setTooltipForNextFrameInternal
  • 源码定位:L1099
  • 返回类型:void
  • 修饰符:private

参数:

  • font: Font
  • lines: List
  • xo: int
  • yo: int
  • positioner: ClientTooltipPositioner
  • style: Identifier
  • replaceExisting: boolean

说明:

TODO

public void tooltip(Font font, List<ClientTooltipComponent> lines, int xo, int yo, ClientTooltipPositioner positioner, Identifier style) @ L1109

  • 方法名:tooltip
  • 源码定位:L1109
  • 返回类型:void
  • 修饰符:public

参数:

  • font: Font
  • lines: List
  • xo: int
  • yo: int
  • positioner: ClientTooltipPositioner
  • style: Identifier

说明:

TODO

public void setPreeditOverlay(Renderable preeditOverlay) @ L1148

  • 方法名:setPreeditOverlay
  • 源码定位:L1148
  • 返回类型:void
  • 修饰符:public

参数:

  • preeditOverlay: Renderable

说明:

TODO

public void extractDeferredElements(int mouseX, int mouseY, float a) @ L1152

  • 方法名:extractDeferredElements
  • 源码定位:L1152
  • 返回类型:void
  • 修饰符:public

参数:

  • mouseX: int
  • mouseY: int
  • a: float

说明:

TODO

private void componentHoverEffect(Font font, Style hoveredStyle, int xMouse, int yMouse) @ L1173

  • 方法名:componentHoverEffect
  • 源码定位:L1173
  • 返回类型:void
  • 修饰符:private

参数:

  • font: Font
  • hoveredStyle: Style
  • xMouse: int
  • yMouse: int

说明:

TODO

public TextureAtlasSprite getSprite(SpriteId sprite) @ L1193

  • 方法名:getSprite
  • 源码定位:L1193
  • 返回类型:TextureAtlasSprite
  • 修饰符:public

参数:

  • sprite: SpriteId

说明:

TODO

public ActiveTextCollector textRendererForWidget(AbstractWidget owner, GuiGraphicsExtractor.HoveredTextEffects hoveredTextEffects) @ L1197

  • 方法名:textRendererForWidget
  • 源码定位:L1197
  • 返回类型:ActiveTextCollector
  • 修饰符:public

参数:

  • owner: AbstractWidget
  • hoveredTextEffects: GuiGraphicsExtractor.HoveredTextEffects

说明:

TODO

public ActiveTextCollector textRenderer() @ L1201

  • 方法名:textRenderer
  • 源码定位:L1201
  • 返回类型:ActiveTextCollector
  • 修饰符:public

参数:

说明:

TODO

public ActiveTextCollector textRenderer(GuiGraphicsExtractor.HoveredTextEffects hoveredTextEffects) @ L1205

  • 方法名:textRenderer
  • 源码定位:L1205
  • 返回类型:ActiveTextCollector
  • 修饰符:public

参数:

  • hoveredTextEffects: GuiGraphicsExtractor.HoveredTextEffects

说明:

TODO

public ActiveTextCollector textRenderer(GuiGraphicsExtractor.HoveredTextEffects hoveredTextEffects, Consumer<Style> additionalHoverStyleConsumer) @ L1209

  • 方法名:textRenderer
  • 源码定位:L1209
  • 返回类型:ActiveTextCollector
  • 修饰符:public

参数:

  • hoveredTextEffects: GuiGraphicsExtractor.HoveredTextEffects
  • additionalHoverStyleConsumer: Consumer

说明:

TODO

private ActiveTextCollector.Parameters createDefaultTextParameters(float opacity) @ L1213

  • 方法名:createDefaultTextParameters
  • 源码定位:L1213
  • 返回类型:ActiveTextCollector.Parameters
  • 修饰符:private

参数:

  • opacity: float

说明:

TODO

代码

@OnlyIn(Dist.CLIENT)
public class GuiGraphicsExtractor {
    private static final int EXTRA_SPACE_AFTER_FIRST_TOOLTIP_LINE = 2;
    private final Minecraft minecraft;
    private final Matrix3x2fStack pose;
    private final GuiGraphicsExtractor.ScissorStack scissorStack = new GuiGraphicsExtractor.ScissorStack();
    private final SpriteGetter sprites;
    private final TextureAtlas guiSprites;
    private final GuiRenderState guiRenderState;
    private CursorType pendingCursor = CursorType.DEFAULT;
    private final int mouseX;
    private final int mouseY;
    private @Nullable Runnable deferredTooltip;
    private @Nullable Style hoveredTextStyle;
    private @Nullable Style clickableTextStyle;
    private @Nullable Renderable preeditOverlay;
 
    private GuiGraphicsExtractor(Minecraft minecraft, Matrix3x2fStack pose, GuiRenderState guiRenderState, int mouseX, int mouseY) {
        this.minecraft = minecraft;
        this.pose = pose;
        this.mouseX = mouseX;
        this.mouseY = mouseY;
        AtlasManager atlasManager = minecraft.getAtlasManager();
        this.sprites = atlasManager;
        this.guiSprites = atlasManager.getAtlasOrThrow(AtlasIds.GUI);
        this.guiRenderState = guiRenderState;
    }
 
    public GuiGraphicsExtractor(Minecraft minecraft, GuiRenderState guiRenderState, int mouseX, int mouseY) {
        this(minecraft, new Matrix3x2fStack(16), guiRenderState, mouseX, mouseY);
    }
 
    public void requestCursor(CursorType cursorType) {
        this.pendingCursor = cursorType;
    }
 
    public void applyCursor(Window window) {
        window.selectCursor(this.pendingCursor);
    }
 
    public int guiWidth() {
        return this.minecraft.getWindow().getGuiScaledWidth();
    }
 
    public int guiHeight() {
        return this.minecraft.getWindow().getGuiScaledHeight();
    }
 
    public Matrix3x2fStack pose() {
        return this.pose;
    }
 
    public void nextStratum() {
        this.guiRenderState.nextStratum();
    }
 
    public void blurBeforeThisStratum() {
        this.guiRenderState.blurBeforeThisStratum();
    }
 
    public void enableScissor(int x0, int y0, int x1, int y1) {
        ScreenRectangle rectangle = new ScreenRectangle(x0, y0, x1 - x0, y1 - y0).transformAxisAligned(this.pose);
        this.scissorStack.push(rectangle);
    }
 
    public void disableScissor() {
        this.scissorStack.pop();
    }
 
    public boolean containsPointInScissor(int x, int y) {
        return this.scissorStack.containsPoint(x, y);
    }
 
    public void horizontalLine(int x0, int x1, int y, int col) {
        if (x1 < x0) {
            int tmp = x0;
            x0 = x1;
            x1 = tmp;
        }
 
        this.fill(x0, y, x1 + 1, y + 1, col);
    }
 
    public void verticalLine(int x, int y0, int y1, int col) {
        if (y1 < y0) {
            int tmp = y0;
            y0 = y1;
            y1 = tmp;
        }
 
        this.fill(x, y0 + 1, x + 1, y1, col);
    }
 
    public void fill(int x0, int y0, int x1, int y1, int col) {
        this.fill(RenderPipelines.GUI, x0, y0, x1, y1, col);
    }
 
    public void fill(RenderPipeline pipeline, int x0, int y0, int x1, int y1, int col) {
        if (x0 < x1) {
            int tmp = x0;
            x0 = x1;
            x1 = tmp;
        }
 
        if (y0 < y1) {
            int tmp = y0;
            y0 = y1;
            y1 = tmp;
        }
 
        this.innerFill(pipeline, TextureSetup.noTexture(), x0, y0, x1, y1, col, null);
    }
 
    public void fillGradient(int x0, int y0, int x1, int y1, int col1, int col2) {
        this.innerFill(RenderPipelines.GUI, TextureSetup.noTexture(), x0, y0, x1, y1, col1, col2);
    }
 
    public void fill(RenderPipeline renderPipeline, TextureSetup textureSetup, int x0, int y0, int x1, int y1) {
        this.innerFill(renderPipeline, textureSetup, x0, y0, x1, y1, -1, null);
    }
 
    public void outline(int x, int y, int width, int height, int color) {
        this.fill(x, y, x + width, y + 1, color);
        this.fill(x, y + height - 1, x + width, y + height, color);
        this.fill(x, y + 1, x + 1, y + height - 1, color);
        this.fill(x + width - 1, y + 1, x + width, y + height - 1, color);
    }
 
    private void innerFill(RenderPipeline renderPipeline, TextureSetup textureSetup, int x0, int y0, int x1, int y1, int color1, @Nullable Integer color2) {
        this.guiRenderState
            .addGuiElement(
                new ColoredRectangleRenderState(
                    renderPipeline, textureSetup, new Matrix3x2f(this.pose), x0, y0, x1, y1, color1, color2 != null ? color2 : color1, this.scissorStack.peek()
                )
            );
    }
 
    public void textHighlight(int x0, int y0, int x1, int y1, boolean invertText) {
        if (invertText) {
            this.fill(RenderPipelines.GUI_INVERT, x0, y0, x1, y1, -1);
        }
 
        this.fill(RenderPipelines.GUI_TEXT_HIGHLIGHT, x0, y0, x1, y1, -16776961);
    }
 
    public void text(Font font, @Nullable String str, int x, int y, int color) {
        this.text(font, str, x, y, color, true);
    }
 
    public void text(Font font, @Nullable String str, int x, int y, int color, boolean dropShadow) {
        if (str != null) {
            this.text(font, Language.getInstance().getVisualOrder(FormattedText.of(str)), x, y, color, dropShadow);
        }
    }
 
    public void text(Font font, FormattedCharSequence str, int x, int y, int color) {
        this.text(font, str, x, y, color, true);
    }
 
    public void text(Font font, FormattedCharSequence str, int x, int y, int color, boolean dropShadow) {
        if (ARGB.alpha(color) != 0) {
            this.guiRenderState
                .addText(new GuiTextRenderState(font, str, new Matrix3x2f(this.pose), x, y, color, 0, dropShadow, false, this.scissorStack.peek()));
        }
    }
 
    public void text(Font font, Component str, int x, int y, int color) {
        this.text(font, str, x, y, color, true);
    }
 
    public void text(Font font, Component str, int x, int y, int color, boolean dropShadow) {
        this.text(font, str.getVisualOrderText(), x, y, color, dropShadow);
    }
 
    public void centeredText(Font font, String str, int x, int y, int color) {
        this.text(font, str, x - font.width(str) / 2, y, color);
    }
 
    public void centeredText(Font font, Component text, int x, int y, int color) {
        FormattedCharSequence toRender = text.getVisualOrderText();
        this.text(font, toRender, x - font.width(toRender) / 2, y, color);
    }
 
    public void centeredText(Font font, FormattedCharSequence text, int x, int y, int color) {
        this.text(font, text, x - font.width(text) / 2, y, color);
    }
 
    public void textWithWordWrap(Font font, FormattedText string, int x, int y, int width, int col) {
        this.textWithWordWrap(font, string, x, y, width, col, true);
    }
 
    public void textWithWordWrap(Font font, FormattedText string, int x, int y, int width, int col, boolean dropShadow) {
        for (FormattedCharSequence line : font.split(string, width)) {
            this.text(font, line, x, y, col, dropShadow);
            y += 9;
        }
    }
 
    public void textWithBackdrop(Font font, Component str, int textX, int textY, int textWidth, int textColor) {
        int backgroundColor = this.minecraft.options.getBackgroundColor(0.0F);
        if (backgroundColor != 0) {
            int padding = 2;
            this.fill(textX - 2, textY - 2, textX + textWidth + 2, textY + 9 + 2, ARGB.multiply(backgroundColor, textColor));
        }
 
        this.text(font, str, textX, textY, textColor, true);
    }
 
    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
    ) {
        this.blit(renderPipeline, texture, x, y, u, v, width, height, width, height, textureWidth, textureHeight, color);
    }
 
    public void blit(
        RenderPipeline renderPipeline, Identifier texture, int x, int y, float u, float v, int width, int height, int textureWidth, int textureHeight
    ) {
        this.blit(renderPipeline, texture, x, y, u, v, width, height, width, height, textureWidth, textureHeight);
    }
 
    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
    ) {
        this.blit(renderPipeline, texture, x, y, u, v, width, height, srcWidth, srcHeight, textureWidth, textureHeight, -1);
    }
 
    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
    ) {
        this.innerBlit(
            renderPipeline,
            texture,
            x,
            x + width,
            y,
            y + height,
            (u + 0.0F) / textureWidth,
            (u + srcWidth) / textureWidth,
            (v + 0.0F) / textureHeight,
            (v + srcHeight) / textureHeight,
            color
        );
    }
 
    public void blit(Identifier location, int x0, int y0, int x1, int y1, float u0, float u1, float v0, float v1) {
        this.innerBlit(RenderPipelines.GUI_TEXTURED, location, x0, x1, y0, y1, u0, u1, v0, v1, -1);
    }
 
    public void blit(GpuTextureView textureView, GpuSampler sampler, int x0, int y0, int x1, int y1, float u0, float u1, float v0, float v1) {
        this.innerBlit(RenderPipelines.GUI_TEXTURED, textureView, sampler, x0, y0, x1, y1, u0, u1, v0, v1, -1);
    }
 
    public void blitSprite(RenderPipeline renderPipeline, Identifier location, int x, int y, int width, int height) {
        this.blitSprite(renderPipeline, location, x, y, width, height, -1);
    }
 
    public void blitSprite(RenderPipeline renderPipeline, Identifier location, int x, int y, int width, int height, float alpha) {
        this.blitSprite(renderPipeline, location, x, y, width, height, ARGB.white(alpha));
    }
 
    public void blitSprite(RenderPipeline renderPipeline, Identifier location, int x, int y, int width, int height, int color) {
        TextureAtlasSprite sprite = this.guiSprites.getSprite(location);
        GuiSpriteScaling scaling = getSpriteScaling(sprite);
        switch (scaling) {
            case GuiSpriteScaling.Stretch stretch:
                this.blitSprite(renderPipeline, sprite, x, y, width, height, color);
                break;
            case GuiSpriteScaling.Tile tile:
                this.blitTiledSprite(renderPipeline, sprite, x, y, width, height, 0, 0, tile.width(), tile.height(), tile.width(), tile.height(), color);
                break;
            case GuiSpriteScaling.NineSlice nineSlice:
                this.blitNineSlicedSprite(renderPipeline, sprite, nineSlice, x, y, width, height, color);
                break;
            default:
        }
    }
 
    public void blitSprite(
        RenderPipeline renderPipeline, Identifier location, int spriteWidth, int spriteHeight, int textureX, int textureY, int x, int y, int width, int height
    ) {
        this.blitSprite(renderPipeline, location, spriteWidth, spriteHeight, textureX, textureY, x, y, width, height, -1);
    }
 
    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
    ) {
        TextureAtlasSprite sprite = this.guiSprites.getSprite(location);
        GuiSpriteScaling scaling = getSpriteScaling(sprite);
        if (scaling instanceof GuiSpriteScaling.Stretch) {
            this.blitSprite(renderPipeline, sprite, spriteWidth, spriteHeight, textureX, textureY, x, y, width, height, color);
        } else {
            this.enableScissor(x, y, x + width, y + height);
            this.blitSprite(renderPipeline, location, x - textureX, y - textureY, spriteWidth, spriteHeight, color);
            this.disableScissor();
        }
    }
 
    public void blitSprite(RenderPipeline renderPipeline, TextureAtlasSprite sprite, int x, int y, int width, int height) {
        this.blitSprite(renderPipeline, sprite, x, y, width, height, -1);
    }
 
    public void blitSprite(RenderPipeline renderPipeline, TextureAtlasSprite sprite, int x, int y, int width, int height, int color) {
        if (width != 0 && height != 0) {
            this.innerBlit(
                renderPipeline, sprite.atlasLocation(), x, x + width, y, y + height, sprite.getU0(), sprite.getU1(), sprite.getV0(), sprite.getV1(), color
            );
        }
    }
 
    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
    ) {
        if (width != 0 && height != 0) {
            this.innerBlit(
                renderPipeline,
                sprite.atlasLocation(),
                x,
                x + width,
                y,
                y + height,
                sprite.getU((float)textureX / spriteWidth),
                sprite.getU((float)(textureX + width) / spriteWidth),
                sprite.getV((float)textureY / spriteHeight),
                sprite.getV((float)(textureY + height) / spriteHeight),
                color
            );
        }
    }
 
    private void blitNineSlicedSprite(
        RenderPipeline renderPipeline, TextureAtlasSprite sprite, GuiSpriteScaling.NineSlice nineSlice, int x, int y, int width, int height, int color
    ) {
        GuiSpriteScaling.NineSlice.Border border = nineSlice.border();
        int borderLeft = Math.min(border.left(), width / 2);
        int borderRight = Math.min(border.right(), width / 2);
        int borderTop = Math.min(border.top(), height / 2);
        int borderBottom = Math.min(border.bottom(), height / 2);
        if (width == nineSlice.width() && height == nineSlice.height()) {
            this.blitSprite(renderPipeline, sprite, nineSlice.width(), nineSlice.height(), 0, 0, x, y, width, height, color);
        } else if (height == nineSlice.height()) {
            this.blitSprite(renderPipeline, sprite, nineSlice.width(), nineSlice.height(), 0, 0, x, y, borderLeft, height, color);
            this.blitNineSliceInnerSegment(
                renderPipeline,
                nineSlice,
                sprite,
                x + borderLeft,
                y,
                width - borderRight - borderLeft,
                height,
                borderLeft,
                0,
                nineSlice.width() - borderRight - borderLeft,
                nineSlice.height(),
                nineSlice.width(),
                nineSlice.height(),
                color
            );
            this.blitSprite(
                renderPipeline,
                sprite,
                nineSlice.width(),
                nineSlice.height(),
                nineSlice.width() - borderRight,
                0,
                x + width - borderRight,
                y,
                borderRight,
                height,
                color
            );
        } else if (width == nineSlice.width()) {
            this.blitSprite(renderPipeline, sprite, nineSlice.width(), nineSlice.height(), 0, 0, x, y, width, borderTop, color);
            this.blitNineSliceInnerSegment(
                renderPipeline,
                nineSlice,
                sprite,
                x,
                y + borderTop,
                width,
                height - borderBottom - borderTop,
                0,
                borderTop,
                nineSlice.width(),
                nineSlice.height() - borderBottom - borderTop,
                nineSlice.width(),
                nineSlice.height(),
                color
            );
            this.blitSprite(
                renderPipeline,
                sprite,
                nineSlice.width(),
                nineSlice.height(),
                0,
                nineSlice.height() - borderBottom,
                x,
                y + height - borderBottom,
                width,
                borderBottom,
                color
            );
        } else {
            this.blitSprite(renderPipeline, sprite, nineSlice.width(), nineSlice.height(), 0, 0, x, y, borderLeft, borderTop, color);
            this.blitNineSliceInnerSegment(
                renderPipeline,
                nineSlice,
                sprite,
                x + borderLeft,
                y,
                width - borderRight - borderLeft,
                borderTop,
                borderLeft,
                0,
                nineSlice.width() - borderRight - borderLeft,
                borderTop,
                nineSlice.width(),
                nineSlice.height(),
                color
            );
            this.blitSprite(
                renderPipeline,
                sprite,
                nineSlice.width(),
                nineSlice.height(),
                nineSlice.width() - borderRight,
                0,
                x + width - borderRight,
                y,
                borderRight,
                borderTop,
                color
            );
            this.blitSprite(
                renderPipeline,
                sprite,
                nineSlice.width(),
                nineSlice.height(),
                0,
                nineSlice.height() - borderBottom,
                x,
                y + height - borderBottom,
                borderLeft,
                borderBottom,
                color
            );
            this.blitNineSliceInnerSegment(
                renderPipeline,
                nineSlice,
                sprite,
                x + borderLeft,
                y + height - borderBottom,
                width - borderRight - borderLeft,
                borderBottom,
                borderLeft,
                nineSlice.height() - borderBottom,
                nineSlice.width() - borderRight - borderLeft,
                borderBottom,
                nineSlice.width(),
                nineSlice.height(),
                color
            );
            this.blitSprite(
                renderPipeline,
                sprite,
                nineSlice.width(),
                nineSlice.height(),
                nineSlice.width() - borderRight,
                nineSlice.height() - borderBottom,
                x + width - borderRight,
                y + height - borderBottom,
                borderRight,
                borderBottom,
                color
            );
            this.blitNineSliceInnerSegment(
                renderPipeline,
                nineSlice,
                sprite,
                x,
                y + borderTop,
                borderLeft,
                height - borderBottom - borderTop,
                0,
                borderTop,
                borderLeft,
                nineSlice.height() - borderBottom - borderTop,
                nineSlice.width(),
                nineSlice.height(),
                color
            );
            this.blitNineSliceInnerSegment(
                renderPipeline,
                nineSlice,
                sprite,
                x + borderLeft,
                y + borderTop,
                width - borderRight - borderLeft,
                height - borderBottom - borderTop,
                borderLeft,
                borderTop,
                nineSlice.width() - borderRight - borderLeft,
                nineSlice.height() - borderBottom - borderTop,
                nineSlice.width(),
                nineSlice.height(),
                color
            );
            this.blitNineSliceInnerSegment(
                renderPipeline,
                nineSlice,
                sprite,
                x + width - borderRight,
                y + borderTop,
                borderRight,
                height - borderBottom - borderTop,
                nineSlice.width() - borderRight,
                borderTop,
                borderRight,
                nineSlice.height() - borderBottom - borderTop,
                nineSlice.width(),
                nineSlice.height(),
                color
            );
        }
    }
 
    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
    ) {
        if (width > 0 && height > 0) {
            if (nineSlice.stretchInner()) {
                this.innerBlit(
                    renderPipeline,
                    sprite.atlasLocation(),
                    x,
                    x + width,
                    y,
                    y + height,
                    sprite.getU((float)textureX / spriteWidth),
                    sprite.getU((float)(textureX + textureWidth) / spriteWidth),
                    sprite.getV((float)textureY / spriteHeight),
                    sprite.getV((float)(textureY + textureHeight) / spriteHeight),
                    color
                );
            } else {
                this.blitTiledSprite(
                    renderPipeline, sprite, x, y, width, height, textureX, textureY, textureWidth, textureHeight, spriteWidth, spriteHeight, color
                );
            }
        }
    }
 
    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
    ) {
        if (width > 0 && height > 0) {
            if (tileWidth > 0 && tileHeight > 0) {
                AbstractTexture spriteTexture = this.minecraft.getTextureManager().getTexture(sprite.atlasLocation());
                GpuTextureView texture = spriteTexture.getTextureView();
                this.innerTiledBlit(
                    renderPipeline,
                    texture,
                    spriteTexture.getSampler(),
                    tileWidth,
                    tileHeight,
                    x,
                    y,
                    x + width,
                    y + height,
                    sprite.getU((float)textureX / spriteWidth),
                    sprite.getU((float)(textureX + tileWidth) / spriteWidth),
                    sprite.getV((float)textureY / spriteHeight),
                    sprite.getV((float)(textureY + tileHeight) / spriteHeight),
                    color
                );
            } else {
                throw new IllegalArgumentException("Tile size must be positive, got " + tileWidth + "x" + tileHeight);
            }
        }
    }
 
    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
    ) {
        AbstractTexture texture = this.minecraft.getTextureManager().getTexture(location);
        this.innerBlit(renderPipeline, texture.getTextureView(), texture.getSampler(), x0, y0, x1, y1, u0, u1, v0, v1, color);
    }
 
    private void innerBlit(
        RenderPipeline pipeline,
        GpuTextureView textureView,
        GpuSampler sampler,
        int x0,
        int y0,
        int x1,
        int y1,
        float u0,
        float u1,
        float v0,
        float v1,
        int color
    ) {
        this.guiRenderState
            .addGuiElement(
                new BlitRenderState(
                    pipeline,
                    TextureSetup.singleTexture(textureView, sampler),
                    new Matrix3x2f(this.pose),
                    x0,
                    y0,
                    x1,
                    y1,
                    u0,
                    u1,
                    v0,
                    v1,
                    color,
                    this.scissorStack.peek()
                )
            );
    }
 
    private void innerTiledBlit(
        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
    ) {
        this.guiRenderState
            .addGuiElement(
                new TiledBlitRenderState(
                    pipeline,
                    TextureSetup.singleTexture(textureView, sampler),
                    new Matrix3x2f(this.pose),
                    tileWidth,
                    tileHeight,
                    x0,
                    y0,
                    x1,
                    y1,
                    u0,
                    u1,
                    v0,
                    v1,
                    color,
                    this.scissorStack.peek()
                )
            );
    }
 
    private static GuiSpriteScaling getSpriteScaling(TextureAtlasSprite sprite) {
        return sprite.contents().getAdditionalMetadata(GuiMetadataSection.TYPE).orElse(GuiMetadataSection.DEFAULT).scaling();
    }
 
    public void item(ItemStack itemStack, int x, int y) {
        this.item(this.minecraft.player, this.minecraft.level, itemStack, x, y, 0);
    }
 
    public void item(ItemStack itemStack, int x, int y, int seed) {
        this.item(this.minecraft.player, this.minecraft.level, itemStack, x, y, seed);
    }
 
    public void item(LivingEntity owner, ItemStack itemStack, int x, int y, int seed) {
        this.item(owner, owner.level(), itemStack, x, y, seed);
    }
 
    private void item(@Nullable LivingEntity owner, @Nullable Level level, ItemStack itemStack, int x, int y, int seed) {
        if (!itemStack.isEmpty()) {
            TrackingItemStackRenderState itemStackRenderState = new TrackingItemStackRenderState();
            this.minecraft.getItemModelResolver().updateForTopItem(itemStackRenderState, itemStack, ItemDisplayContext.GUI, level, owner, seed);
 
            try {
                this.guiRenderState.addItem(new GuiItemRenderState(new Matrix3x2f(this.pose), itemStackRenderState, x, y, this.scissorStack.peek()));
            } catch (Throwable var11) {
                CrashReport report = CrashReport.forThrowable(var11, "Rendering item");
                CrashReportCategory category = report.addCategory("Item being rendered");
                category.setDetail("Item Type", () -> String.valueOf(itemStack.getItem()));
                category.setDetail("Item Components", () -> String.valueOf(itemStack.getComponents()));
                category.setDetail("Item Foil", () -> String.valueOf(itemStack.hasFoil()));
                throw new ReportedException(report);
            }
        }
    }
 
    public void fakeItem(ItemStack itemStack, int x, int y) {
        this.fakeItem(itemStack, x, y, 0);
    }
 
    public void fakeItem(ItemStack itemStack, int x, int y, int seed) {
        this.item(null, this.minecraft.level, itemStack, x, y, seed);
    }
 
    public void itemDecorations(Font font, ItemStack itemStack, int x, int y) {
        this.itemDecorations(font, itemStack, x, y, null);
    }
 
    public void itemDecorations(Font font, ItemStack itemStack, int x, int y, @Nullable String countText) {
        if (!itemStack.isEmpty()) {
            this.pose.pushMatrix();
            this.itemBar(itemStack, x, y);
            this.itemCooldown(itemStack, x, y);
            this.itemCount(font, itemStack, x, y, countText);
            this.pose.popMatrix();
        }
    }
 
    private void itemBar(ItemStack itemStack, int x, int y) {
        if (itemStack.isBarVisible()) {
            int left = x + 2;
            int top = y + 13;
            this.fill(RenderPipelines.GUI, left, top, left + 13, top + 2, -16777216);
            this.fill(RenderPipelines.GUI, left, top, left + itemStack.getBarWidth(), top + 1, ARGB.opaque(itemStack.getBarColor()));
        }
    }
 
    private void itemCount(Font font, ItemStack itemStack, int x, int y, @Nullable String countText) {
        if (itemStack.getCount() != 1 || countText != null) {
            String amount = countText == null ? String.valueOf(itemStack.getCount()) : countText;
            this.text(font, amount, x + 19 - 2 - font.width(amount), y + 6 + 3, -1, true);
        }
    }
 
    private void itemCooldown(ItemStack itemStack, int x, int y) {
        LocalPlayer player = this.minecraft.player;
        float cooldown = player == null
            ? 0.0F
            : player.getCooldowns().getCooldownPercent(itemStack, this.minecraft.getDeltaTracker().getGameTimeDeltaPartialTick(true));
        if (cooldown > 0.0F) {
            int top = y + Mth.floor(16.0F * (1.0F - cooldown));
            int bottom = top + Mth.ceil(16.0F * cooldown);
            this.fill(RenderPipelines.GUI, x, top, x + 16, bottom, Integer.MAX_VALUE);
        }
    }
 
    public void map(MapRenderState mapRenderState) {
        Minecraft minecraft = Minecraft.getInstance();
        TextureManager textureManager = minecraft.getTextureManager();
        AbstractTexture texture = textureManager.getTexture(mapRenderState.texture);
        this.innerBlit(RenderPipelines.GUI_TEXTURED, texture.getTextureView(), texture.getSampler(), 0, 0, 128, 128, 0.0F, 1.0F, 0.0F, 1.0F, -1);
 
        for (MapRenderState.MapDecorationRenderState decoration : mapRenderState.decorations) {
            if (decoration.renderOnFrame) {
                this.pose.pushMatrix();
                this.pose.translate(decoration.x / 2.0F + 64.0F, decoration.y / 2.0F + 64.0F);
                this.pose.rotate((float) (Math.PI / 180.0) * decoration.rot * 360.0F / 16.0F);
                this.pose.scale(4.0F, 4.0F);
                this.pose.translate(-0.125F, 0.125F);
                TextureAtlasSprite atlasSprite = decoration.atlasSprite;
                if (atlasSprite != null) {
                    AbstractTexture decorationTexture = textureManager.getTexture(atlasSprite.atlasLocation());
                    this.innerBlit(
                        RenderPipelines.GUI_TEXTURED,
                        decorationTexture.getTextureView(),
                        decorationTexture.getSampler(),
                        -1,
                        -1,
                        1,
                        1,
                        atlasSprite.getU0(),
                        atlasSprite.getU1(),
                        atlasSprite.getV1(),
                        atlasSprite.getV0(),
                        -1
                    );
                }
 
                this.pose.popMatrix();
                if (decoration.name != null) {
                    Font font = minecraft.font;
                    float width = font.width(decoration.name);
                    float scale = Mth.clamp(25.0F / width, 0.0F, 6.0F / 9.0F);
                    this.pose.pushMatrix();
                    this.pose.translate(decoration.x / 2.0F + 64.0F - width * scale / 2.0F, decoration.y / 2.0F + 64.0F + 4.0F);
                    this.pose.scale(scale, scale);
                    this.guiRenderState
                        .addText(
                            new GuiTextRenderState(
                                font,
                                decoration.name.getVisualOrderText(),
                                new Matrix3x2f(this.pose),
                                0,
                                0,
                                -1,
                                Integer.MIN_VALUE,
                                false,
                                false,
                                this.scissorStack.peek()
                            )
                        );
                    this.pose.popMatrix();
                }
            }
        }
    }
 
    public void entity(
        EntityRenderState renderState,
        float scale,
        Vector3f translation,
        Quaternionf rotation,
        @Nullable Quaternionf overrideCameraAngle,
        int x0,
        int y0,
        int x1,
        int y1
    ) {
        renderState.lightCoords = 15728880;
        this.guiRenderState
            .addPicturesInPictureState(
                new GuiEntityRenderState(renderState, translation, rotation, overrideCameraAngle, x0, y0, x1, y1, scale, this.scissorStack.peek())
            );
    }
 
    public void skin(PlayerModel playerModel, Identifier texture, float scale, float rotationX, float rotationY, float pivotY, int x0, int y0, int x1, int y1) {
        this.guiRenderState
            .addPicturesInPictureState(
                new GuiSkinRenderState(playerModel, texture, rotationX, rotationY, pivotY, x0, y0, x1, y1, scale, this.scissorStack.peek())
            );
    }
 
    public void book(BookModel bookModel, Identifier texture, float scale, float open, float flip, int x0, int y0, int x1, int y1) {
        this.guiRenderState
            .addPicturesInPictureState(new GuiBookModelRenderState(bookModel, texture, open, flip, x0, y0, x1, y1, scale, this.scissorStack.peek()));
    }
 
    public void bannerPattern(BannerFlagModel flag, DyeColor baseColor, BannerPatternLayers resultBannerPatterns, int x0, int y0, int x1, int y1) {
        this.guiRenderState
            .addPicturesInPictureState(new GuiBannerResultRenderState(flag, baseColor, resultBannerPatterns, x0, y0, x1, y1, this.scissorStack.peek()));
    }
 
    public void sign(Model.Simple signModel, float scale, WoodType woodType, int x0, int y0, int x1, int y1) {
        this.guiRenderState.addPicturesInPictureState(new GuiSignRenderState(signModel, woodType, x0, y0, x1, y1, scale, this.scissorStack.peek()));
    }
 
    public void profilerChart(List<ResultField> chartData, int x0, int y0, int x1, int y1) {
        this.guiRenderState.addPicturesInPictureState(new GuiProfilerChartRenderState(chartData, x0, y0, x1, y1, this.scissorStack.peek()));
    }
 
    public void setTooltipForNextFrame(Component component, int x, int y) {
        this.setTooltipForNextFrame(List.of(component.getVisualOrderText()), x, y);
    }
 
    public void setTooltipForNextFrame(List<FormattedCharSequence> formattedCharSequences, int x, int y) {
        this.setTooltipForNextFrame(this.minecraft.font, formattedCharSequences, DefaultTooltipPositioner.INSTANCE, x, y, false);
    }
 
    public void setTooltipForNextFrame(Font font, ItemStack itemStack, int xo, int yo) {
        this.setTooltipForNextFrame(
            font, Screen.getTooltipFromItem(this.minecraft, itemStack), itemStack.getTooltipImage(), xo, yo, itemStack.get(DataComponents.TOOLTIP_STYLE)
        );
    }
 
    public void setTooltipForNextFrame(Font font, List<Component> texts, Optional<TooltipComponent> optionalImage, int xo, int yo) {
        this.setTooltipForNextFrame(font, texts, optionalImage, xo, yo, null);
    }
 
    public void setTooltipForNextFrame(Font font, List<Component> texts, Optional<TooltipComponent> optionalImage, int xo, int yo, @Nullable Identifier style) {
        List<ClientTooltipComponent> components = texts.stream()
            .map(Component::getVisualOrderText)
            .map(ClientTooltipComponent::create)
            .collect(Util.toMutableList());
        optionalImage.ifPresent(image -> components.add(components.isEmpty() ? 0 : 1, ClientTooltipComponent.create(image)));
        this.setTooltipForNextFrameInternal(font, components, xo, yo, DefaultTooltipPositioner.INSTANCE, style, false);
    }
 
    public void setTooltipForNextFrame(
        Font font,
        List<FormattedCharSequence> tooltip,
        Optional<TooltipComponent> component,
        ClientTooltipPositioner positioner,
        int xo,
        int yo,
        boolean replaceExisting,
        @Nullable Identifier style
    ) {
        List<ClientTooltipComponent> components = tooltip.stream().map(ClientTooltipComponent::create).collect(Collectors.toList());
        component.ifPresent(tooltipComponent -> components.add(components.isEmpty() ? 0 : 1, ClientTooltipComponent.create(tooltipComponent)));
        this.setTooltipForNextFrameInternal(font, components, xo, yo, positioner, style, replaceExisting);
    }
 
    public void setTooltipForNextFrame(Font font, Component text, int xo, int yo) {
        this.setTooltipForNextFrame(font, text, xo, yo, null);
    }
 
    public void setTooltipForNextFrame(Font font, Component text, int xo, int yo, @Nullable Identifier style) {
        this.setTooltipForNextFrame(font, List.of(text.getVisualOrderText()), xo, yo, style);
    }
 
    public void setComponentTooltipForNextFrame(Font font, List<Component> lines, int xo, int yo) {
        this.setComponentTooltipForNextFrame(font, lines, xo, yo, null);
    }
 
    public void setComponentTooltipForNextFrame(Font font, List<Component> lines, int xo, int yo, @Nullable Identifier style) {
        this.setTooltipForNextFrameInternal(
            font,
            lines.stream().map(Component::getVisualOrderText).map(ClientTooltipComponent::create).toList(),
            xo,
            yo,
            DefaultTooltipPositioner.INSTANCE,
            style,
            false
        );
    }
 
    public void setTooltipForNextFrame(Font font, List<? extends FormattedCharSequence> lines, int xo, int yo) {
        this.setTooltipForNextFrame(font, lines, xo, yo, null);
    }
 
    public void setTooltipForNextFrame(Font font, List<? extends FormattedCharSequence> lines, int xo, int yo, @Nullable Identifier style) {
        this.setTooltipForNextFrameInternal(
            font, lines.stream().map(ClientTooltipComponent::create).collect(Collectors.toList()), xo, yo, DefaultTooltipPositioner.INSTANCE, style, false
        );
    }
 
    public void setTooltipForNextFrame(
        Font font, List<FormattedCharSequence> tooltip, ClientTooltipPositioner positioner, int xo, int yo, boolean replaceExisting
    ) {
        this.setTooltipForNextFrameInternal(
            font, tooltip.stream().map(ClientTooltipComponent::create).collect(Collectors.toList()), xo, yo, positioner, null, replaceExisting
        );
    }
 
    private void setTooltipForNextFrameInternal(
        Font font, List<ClientTooltipComponent> lines, int xo, int yo, ClientTooltipPositioner positioner, @Nullable Identifier style, boolean replaceExisting
    ) {
        if (!lines.isEmpty()) {
            if (this.deferredTooltip == null || replaceExisting) {
                this.deferredTooltip = () -> this.tooltip(font, lines, xo, yo, positioner, style);
            }
        }
    }
 
    public void tooltip(Font font, List<ClientTooltipComponent> lines, int xo, int yo, ClientTooltipPositioner positioner, @Nullable Identifier style) {
        int textWidth = 0;
        int tempHeight = lines.size() == 1 ? -2 : 0;
 
        for (ClientTooltipComponent line : lines) {
            int lineWidth = line.getWidth(font);
            if (lineWidth > textWidth) {
                textWidth = lineWidth;
            }
 
            tempHeight += line.getHeight(font);
        }
 
        int w = textWidth;
        int h = tempHeight;
        Vector2ic positionedTooltip = positioner.positionTooltip(this.guiWidth(), this.guiHeight(), xo, yo, textWidth, tempHeight);
        int x = positionedTooltip.x();
        int y = positionedTooltip.y();
        this.pose.pushMatrix();
        TooltipRenderUtil.extractTooltipBackground(this, x, y, textWidth, tempHeight, style);
        int localY = y;
 
        for (int i = 0; i < lines.size(); i++) {
            ClientTooltipComponent line = lines.get(i);
            line.extractText(this, font, x, localY);
            localY += line.getHeight(font) + (i == 0 ? 2 : 0);
        }
 
        localY = y;
 
        for (int i = 0; i < lines.size(); i++) {
            ClientTooltipComponent line = lines.get(i);
            line.extractImage(font, x, localY, w, h, this);
            localY += line.getHeight(font) + (i == 0 ? 2 : 0);
        }
 
        this.pose.popMatrix();
    }
 
    public void setPreeditOverlay(Renderable preeditOverlay) {
        this.preeditOverlay = preeditOverlay;
    }
 
    public void extractDeferredElements(int mouseX, int mouseY, float a) {
        if (this.hoveredTextStyle != null) {
            this.componentHoverEffect(this.minecraft.font, this.hoveredTextStyle, mouseX, mouseY);
        }
 
        if (this.clickableTextStyle != null && this.clickableTextStyle.getClickEvent() != null) {
            this.requestCursor(CursorTypes.POINTING_HAND);
        }
 
        if (this.preeditOverlay != null) {
            this.nextStratum();
            this.preeditOverlay.extractRenderState(this, mouseX, mouseY, a);
        }
 
        if (this.deferredTooltip != null) {
            this.nextStratum();
            this.deferredTooltip.run();
            this.deferredTooltip = null;
        }
    }
 
    private void componentHoverEffect(Font font, Style hoveredStyle, int xMouse, int yMouse) {
        if (hoveredStyle.getHoverEvent() != null) {
            switch (hoveredStyle.getHoverEvent()) {
                case HoverEvent.ShowItem(ItemStackTemplate var17):
                    this.setTooltipForNextFrame(font, var17.create(), xMouse, yMouse);
                    break;
                case HoverEvent.ShowEntity(HoverEvent.EntityTooltipInfo var22):
                    HoverEvent.EntityTooltipInfo var18 = var22;
                    if (this.minecraft.options.advancedItemTooltips) {
                        this.setComponentTooltipForNextFrame(font, var18.getTooltipLines(), xMouse, yMouse);
                    }
                    break;
                case HoverEvent.ShowText(Component var13):
                    this.setTooltipForNextFrame(font, font.split(var13, Math.max(this.guiWidth() / 2, 200)), xMouse, yMouse);
                    break;
                default:
            }
        }
    }
 
    public TextureAtlasSprite getSprite(SpriteId sprite) {
        return this.sprites.get(sprite);
    }
 
    public ActiveTextCollector textRendererForWidget(AbstractWidget owner, GuiGraphicsExtractor.HoveredTextEffects hoveredTextEffects) {
        return new GuiGraphicsExtractor.RenderingTextCollector(this.createDefaultTextParameters(owner.getAlpha()), hoveredTextEffects, null);
    }
 
    public ActiveTextCollector textRenderer() {
        return this.textRenderer(GuiGraphicsExtractor.HoveredTextEffects.TOOLTIP_ONLY);
    }
 
    public ActiveTextCollector textRenderer(GuiGraphicsExtractor.HoveredTextEffects hoveredTextEffects) {
        return this.textRenderer(hoveredTextEffects, null);
    }
 
    public ActiveTextCollector textRenderer(GuiGraphicsExtractor.HoveredTextEffects hoveredTextEffects, @Nullable Consumer<Style> additionalHoverStyleConsumer) {
        return new GuiGraphicsExtractor.RenderingTextCollector(this.createDefaultTextParameters(1.0F), hoveredTextEffects, additionalHoverStyleConsumer);
    }
 
    private ActiveTextCollector.Parameters createDefaultTextParameters(float opacity) {
        return new ActiveTextCollector.Parameters(new Matrix3x2f(this.pose), opacity, this.scissorStack.peek());
    }
 
    @OnlyIn(Dist.CLIENT)
    public static enum HoveredTextEffects {
        NONE(false, false),
        TOOLTIP_ONLY(true, false),
        TOOLTIP_AND_CURSOR(true, true);
 
        public final boolean allowTooltip;
        public final boolean allowCursorChanges;
 
        private HoveredTextEffects(boolean allowTooltip, boolean allowCursorChanges) {
            this.allowTooltip = allowTooltip;
            this.allowCursorChanges = allowCursorChanges;
        }
 
        public static GuiGraphicsExtractor.HoveredTextEffects notClickable(boolean canTooltip) {
            return canTooltip ? TOOLTIP_ONLY : NONE;
        }
    }
 
    @OnlyIn(Dist.CLIENT)
    private class RenderingTextCollector implements ActiveTextCollector, Consumer<Style> {
        private ActiveTextCollector.Parameters defaultParameters;
        private final GuiGraphicsExtractor.HoveredTextEffects hoveredTextEffects;
        private final @Nullable Consumer<Style> additionalConsumer;
 
        private RenderingTextCollector(
            ActiveTextCollector.Parameters initialParameters,
            GuiGraphicsExtractor.@Nullable HoveredTextEffects hoveredTextEffects,
            Consumer<Style> additonalConsumer
        ) {
            Objects.requireNonNull(GuiGraphicsExtractor.this);
            super();
            this.defaultParameters = initialParameters;
            this.hoveredTextEffects = hoveredTextEffects;
            this.additionalConsumer = additonalConsumer;
        }
 
        @Override
        public ActiveTextCollector.Parameters defaultParameters() {
            return this.defaultParameters;
        }
 
        @Override
        public void defaultParameters(ActiveTextCollector.Parameters newParameters) {
            this.defaultParameters = newParameters;
        }
 
        public void accept(Style style) {
            if (this.hoveredTextEffects.allowTooltip && style.getHoverEvent() != null) {
                GuiGraphicsExtractor.this.hoveredTextStyle = style;
            }
 
            if (this.hoveredTextEffects.allowCursorChanges && style.getClickEvent() != null) {
                GuiGraphicsExtractor.this.clickableTextStyle = style;
            }
 
            if (this.additionalConsumer != null) {
                this.additionalConsumer.accept(style);
            }
        }
 
        @Override
        public void accept(TextAlignment alignment, int anchorX, int y, ActiveTextCollector.Parameters parameters, FormattedCharSequence text) {
            boolean needsFullStyleScan = this.hoveredTextEffects.allowCursorChanges || this.hoveredTextEffects.allowTooltip || this.additionalConsumer != null;
            int leftX = alignment.calculateLeft(anchorX, GuiGraphicsExtractor.this.minecraft.font, text);
            GuiTextRenderState renderState = new GuiTextRenderState(
                GuiGraphicsExtractor.this.minecraft.font,
                text,
                parameters.pose(),
                leftX,
                y,
                ARGB.white(parameters.opacity()),
                0,
                true,
                needsFullStyleScan,
                parameters.scissor()
            );
            if (ARGB.as8BitChannel(parameters.opacity()) != 0) {
                GuiGraphicsExtractor.this.guiRenderState.addText(renderState);
            }
 
            if (needsFullStyleScan) {
                ActiveTextCollector.findElementUnderCursor(renderState, GuiGraphicsExtractor.this.mouseX, GuiGraphicsExtractor.this.mouseY, this);
            }
        }
 
        @Override
        public void acceptScrolling(Component message, int centerX, int left, int right, int top, int bottom, ActiveTextCollector.Parameters parameters) {
            int lineWidth = GuiGraphicsExtractor.this.minecraft.font.width(message);
            int lineHeight = 9;
            this.defaultScrollingHelper(message, centerX, left, right, top, bottom, lineWidth, lineHeight, parameters);
        }
    }
 
    @OnlyIn(Dist.CLIENT)
    private static class ScissorStack {
        private final Deque<ScreenRectangle> stack = new ArrayDeque<>();
 
        public ScreenRectangle push(ScreenRectangle rectangle) {
            ScreenRectangle lastRectangle = this.stack.peekLast();
            if (lastRectangle != null) {
                ScreenRectangle intersection = Objects.requireNonNullElse(rectangle.intersection(lastRectangle), ScreenRectangle.empty());
                this.stack.addLast(intersection);
                return intersection;
            } else {
                this.stack.addLast(rectangle);
                return rectangle;
            }
        }
 
        public @Nullable ScreenRectangle pop() {
            if (this.stack.isEmpty()) {
                throw new IllegalStateException("Scissor stack underflow");
            } else {
                this.stack.removeLast();
                return this.stack.peekLast();
            }
        }
 
        public @Nullable ScreenRectangle peek() {
            return this.stack.peekLast();
        }
 
        public boolean containsPoint(int x, int y) {
            return this.stack.isEmpty() ? true : this.stack.peek().containsPoint(x, y);
        }
    }
}

引用的其他类