Search in sources :

Example 1 with FormattedCharSequence

use of net.minecraft.util.FormattedCharSequence in project MinecraftForge by MinecraftForge.

the class LoadingErrorScreen method drawMultiLineCenteredString.

private void drawMultiLineCenteredString(PoseStack mStack, Font fr, Component str, int x, int y) {
    for (FormattedCharSequence s : fr.split(str, this.width)) {
        fr.drawShadow(mStack, s, (float) (x - fr.width(s) / 2.0), y, 0xFFFFFF);
        y += fr.lineHeight;
    }
}
Also used : FormattedCharSequence(net.minecraft.util.FormattedCharSequence)

Aggregations

FormattedCharSequence (net.minecraft.util.FormattedCharSequence)1