Skip to content

Package net.minecraft.client.gui.font.glyphs

Part 1/1


BakedGlyph

  • Full name: net.minecraft.client.gui.font.glyphs.BakedGlyph
  • Package: net.minecraft.client.gui.font.glyphs
  • Source: clientOnlynet/minecraft/client/gui/font/glyphs/BakedGlyph.java
  • Type: class
  • Modifiers: public

net.minecraft.client.gui.font.glyphs.BakedGlyph#BakedGlyph(GlyphRenderTypes,float,float,float,float,float,float,float,float)

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/font/glyphs/BakedGlyph.java:25
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ BakedGlyph ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: renderTypes, u0, u1, v0, v1, left.

Parameters

  • GlyphRenderTypes glyphRenderTypes
  • float f
  • float g
  • float h
  • float i
  • float j
  • float k
  • float l
  • float m

ตัวอย่างใช้งาน

GlyphRenderTypes glyphRenderTypes = ...;
BakedGlyph instance = new BakedGlyph(glyphRenderTypes, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F);

net.minecraft.client.gui.font.glyphs.BakedGlyph#renderChar(BakedGlyph.GlyphInstance,Matrix4f,VertexConsumer,int)

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/font/glyphs/BakedGlyph.java:37
  • Modifiers: public
  • Return: void

คืออะไร

เรนเดอร์ Char

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: style(), isItalic(), x(), y(), color(), shadowColor(), isBold(), hasShadow().

Parameters

  • BakedGlyph.GlyphInstance glyphInstance
  • Matrix4f matrix4f
  • VertexConsumer vertexConsumer
  • int i

ตัวอย่างใช้งาน

BakedGlyph instance = ...;
BakedGlyph.GlyphInstance glyphInstance = ...;
Matrix4f matrix4f = ...;
VertexConsumer vertexConsumer = ...;
instance.renderChar(glyphInstance, matrix4f, vertexConsumer, 0);

net.minecraft.client.gui.font.glyphs.BakedGlyph#renderEffect(BakedGlyph.Effect,Matrix4f,VertexConsumer,int)

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/font/glyphs/BakedGlyph.java:82
  • Modifiers: public
  • Return: void

คืออะไร

เรนเดอร์ Effect

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: hasShadow(), buildEffect(), shadowOffset(), shadowColor().

Parameters

  • BakedGlyph.Effect effect
  • Matrix4f matrix4f
  • VertexConsumer vertexConsumer
  • int i

ตัวอย่างใช้งาน

BakedGlyph instance = ...;
BakedGlyph.Effect effect = ...;
Matrix4f matrix4f = ...;
VertexConsumer vertexConsumer = ...;
instance.renderEffect(effect, matrix4f, vertexConsumer, 0);

net.minecraft.client.gui.font.glyphs.BakedGlyph#renderType(Font.DisplayMode)

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/font/glyphs/BakedGlyph.java:98
  • Modifiers: public
  • Return: RenderType

คืออะไร

เรนเดอร์ Type

ทำงานยังไง

เรียกต่อ: select(). คืนค่า: this.renderTypes.select(displayMode).

Parameters

  • Font.DisplayMode displayMode

ตัวอย่างใช้งาน

BakedGlyph instance = ...;
Font.DisplayMode displayMode = ...;
RenderType result = instance.renderType(displayMode);

BakedGlyph$Effect

  • Full name: net.minecraft.client.gui.font.glyphs.BakedGlyph$Effect
  • Package: net.minecraft.client.gui.font.glyphs
  • Source: clientOnlynet/minecraft/client/gui/font/glyphs/BakedGlyph.java
  • Type: record
  • Modifiers: public

net.minecraft.client.gui.font.glyphs.BakedGlyph$Effect#Effect(float,float,float,float,float,int)

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/font/glyphs/BakedGlyph.java:105
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ BakedGlyph.Effect ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • float f
  • float g
  • float h
  • float i
  • float j
  • int k

ตัวอย่างใช้งาน

BakedGlyph.Effect instance = new BakedGlyph.Effect(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0);

EmptyGlyph

  • Full name: net.minecraft.client.gui.font.glyphs.EmptyGlyph
  • Package: net.minecraft.client.gui.font.glyphs
  • Source: clientOnlynet/minecraft/client/gui/font/glyphs/EmptyGlyph.java
  • Type: class
  • Modifiers: public
  • Extends: BakedGlyph

net.minecraft.client.gui.font.glyphs.EmptyGlyph#EmptyGlyph()

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/font/glyphs/EmptyGlyph.java:14
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ EmptyGlyph ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

เรียกต่อ: createForColorTexture(), withDefaultNamespace().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

EmptyGlyph instance = new EmptyGlyph();

net.minecraft.client.gui.font.glyphs.EmptyGlyph#renderChar(BakedGlyph.GlyphInstance,Matrix4f,VertexConsumer,int)

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/font/glyphs/EmptyGlyph.java:18
  • Modifiers: public
  • Return: void

คืออะไร

เรนเดอร์ Char

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • BakedGlyph.GlyphInstance glyphInstance
  • Matrix4f matrix4f
  • VertexConsumer vertexConsumer
  • int i

ตัวอย่างใช้งาน

EmptyGlyph instance = ...;
BakedGlyph.GlyphInstance glyphInstance = ...;
Matrix4f matrix4f = ...;
VertexConsumer vertexConsumer = ...;
instance.renderChar(glyphInstance, matrix4f, vertexConsumer, 0);

SpecialGlyphs

  • Full name: net.minecraft.client.gui.font.glyphs.SpecialGlyphs
  • Package: net.minecraft.client.gui.font.glyphs
  • Source: clientOnlynet/minecraft/client/gui/font/glyphs/SpecialGlyphs.java
  • Type: enum
  • Modifiers: public
  • Implements: GlyphInfo

net.minecraft.client.gui.font.glyphs.SpecialGlyphs#bake(Function<SheetGlyphInfo, BakedGlyph>)

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/font/glyphs/SpecialGlyphs.java:47
  • Modifiers: public
  • Return: BakedGlyph

คืออะไร

ดำเนินการ bake ตาม implementation ของ SpecialGlyphs

ทำงานยังไง

เรียกต่อ: apply(), getPixelWidth(), getWidth(), getPixelHeight(), getHeight(), getOversample(), upload(), isColored(). สร้างออบเจ็กต์: SheetGlyphInfo. มีจุด return อย่างน้อย 4 จุด.

Parameters

  • Function<SheetGlyphInfo, BakedGlyph> function

ตัวอย่างใช้งาน

SpecialGlyphs instance = ...;
Function<SheetGlyphInfo, BakedGlyph> function = ...;
BakedGlyph result = instance.bake(function);

net.minecraft.client.gui.font.glyphs.SpecialGlyphs#getAdvance()

  • Origin: clientOnly
  • Source: net/minecraft/client/gui/font/glyphs/SpecialGlyphs.java:42
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Advance

ทำงานยังไง

เรียกต่อ: getWidth(). คืนค่า: this.image.getWidth() + 1.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SpecialGlyphs instance = ...;
float result = instance.getAdvance();