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 x, float y, int color, boolean drawShadow, boolean includeEmpty) PreparedTextBuilder(float x, float y, int color, int backgroundColor, boolean drawShadow, boolean includeEmpty) -
Method Summary
Modifier and TypeMethodDescriptionbooleanAccepts a single code point from aFormattedCharSequence.booleanaccept(int positionInCurrentSequence, Style style, BakedGlyph glyph) private voidaddEffect(TextRenderable effect) private voidaddEmptyGlyph(EmptyArea emptyArea) private voidaddGlyph(TextRenderable.Styled glyph) @Nullable ScreenRectanglebounds()private intgetShadowColor(Style style, int textColor) private intgetTextColor(@Nullable TextColor textColor) private voidmarkBackground(float x, float y, float width) private voidmarkSize(float left, float top, float right, float bottom) 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 x, float y, int color, boolean drawShadow, boolean includeEmpty) -
PreparedTextBuilder
public PreparedTextBuilder(float x, float y, int color, int backgroundColor, boolean drawShadow, boolean includeEmpty)
-
-
Method Details
-
markSize
private void markSize(float left, float top, float right, float bottom) -
markBackground
private void markBackground(float x, float y, float width) -
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
-