Package net.minecraft.client.gui
Class Font.PreparedTextBuilder
java.lang.Object
net.minecraft.client.gui.Font.PreparedTextBuilder
- All Implemented Interfaces:
Font.PreparedText,FormattedCharSink
- Enclosing class:
Font
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate floatprivate final intprivate floatprivate floatprivate floatprivate floatprivate final intprivate final booleanprivate @Nullable List<TextRenderable> (package private) final List<TextRenderable.Styled> private final booleanprivate floatprivate floatprivate float(package private) float(package private) float -
Constructor Summary
ConstructorsConstructorDescriptionPreparedTextBuilder(float pX, float pY, int pColor, boolean pDrawShadow, boolean pIncludeEmpty) PreparedTextBuilder(float pX, float pY, int pColor, int pBackgroundColor, boolean pDrawShadow, boolean pIncludeEmpty) -
Method Summary
Modifier and TypeMethodDescriptionbooleanAccepts a single code point from aFormattedCharSequence.booleanaccept(int pPositionInCurrentSequence, Style pStyle, BakedGlyph pGlyph) private voidaddEffect(TextRenderable pEffect) private voidaddEmptyGlyph(EmptyArea pEmptyArea) private voidaddGlyph(TextRenderable.Styled pGlyph) @Nullable ScreenRectanglebounds()private intgetShadowColor(Style pStyle, int pTextColor) private intgetTextColor(@Nullable TextColor pTextColor) private voidmarkBackground(float pX, float pY, float pAdvance) private voidmarkSize(float pLeft, float pTop, float pRight, float pBottom) voidvisit(Font.GlyphVisitor p_425967_)
-
Field Details
-
drawShadow
private final boolean drawShadow -
color
private final int color -
backgroundColor
private final int backgroundColor -
includeEmpty
private final boolean includeEmpty -
x
float x -
y
float y -
left
private float left -
top
private float top -
right
private float right -
bottom
private float bottom -
backgroundLeft
private float backgroundLeft -
backgroundTop
private float backgroundTop -
backgroundRight
private float backgroundRight -
backgroundBottom
private float backgroundBottom -
glyphs
-
effects
-
emptyAreas
-
-
Constructor Details
-
PreparedTextBuilder
public PreparedTextBuilder(float pX, float pY, int pColor, boolean pDrawShadow, boolean pIncludeEmpty) -
PreparedTextBuilder
public PreparedTextBuilder(float pX, float pY, int pColor, int pBackgroundColor, boolean pDrawShadow, boolean pIncludeEmpty)
-
-
Method Details
-
markSize
private void markSize(float pLeft, float pTop, float pRight, float pBottom) -
markBackground
private void markBackground(float pX, float pY, float pAdvance) -
addGlyph
-
addEffect
-
addEmptyGlyph
-
accept
Description copied from interface:FormattedCharSinkAccepts a single code point from aFormattedCharSequence.- Specified by:
acceptin interfaceFormattedCharSink- Parameters:
p_425893_- Contains the relative position of the character in the current sub-sequence. If multiple formatted char sequences have been combined, this value will reset to0after each sequence has been fully consumed.- Returns:
trueto accept more characters,falseto stop traversing the sequence.
-
accept
-
visit
- Specified by:
visitin interfaceFont.PreparedText
-
getTextColor
-
getShadowColor
-
bounds
- Specified by:
boundsin interfaceFont.PreparedText
-