mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Move mana label to a static
This commit is contained in:
parent
1181399977
commit
3b0a64326e
1 changed files with 3 additions and 2 deletions
|
@ -19,6 +19,7 @@ import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
|
|
||||||
public class SpellbookProfilePageContent implements SpellbookChapterList.Content {
|
public class SpellbookProfilePageContent implements SpellbookChapterList.Content {
|
||||||
|
private static final Text MANA_LABEL = Text.translatable("gui.unicopia.spellbook.page.mana");
|
||||||
private final MinecraftClient client = MinecraftClient.getInstance();
|
private final MinecraftClient client = MinecraftClient.getInstance();
|
||||||
private final Pony pony = Pony.of(client.player);
|
private final Pony pony = Pony.of(client.player);
|
||||||
private final TextRenderer font = client.textRenderer;
|
private final TextRenderer font = client.textRenderer;
|
||||||
|
@ -140,8 +141,8 @@ public class SpellbookProfilePageContent implements SpellbookChapterList.Content
|
||||||
String manaString = (int)reserves.getMana().get() + "/" + (int)reserves.getMana().getMax();
|
String manaString = (int)reserves.getMana().get() + "/" + (int)reserves.getMana().getMax();
|
||||||
|
|
||||||
y = 15;
|
y = 15;
|
||||||
Text manaLabel = Text.translatable("gui.unicopia.spellbook.page.mana");
|
|
||||||
context.drawText(font, manaLabel, -font.getWidth(manaLabel) / 2, y, SpellbookScreen.TITLE_COLOR, false);
|
context.drawText(font, MANA_LABEL, -font.getWidth(MANA_LABEL) / 2, y, SpellbookScreen.TITLE_COLOR, false);
|
||||||
context.drawText(font, manaString, -font.getWidth(manaString) / 2, y += font.fontHeight, SpellbookScreen.TITLE_COLOR, false);
|
context.drawText(font, manaString, -font.getWidth(manaString) / 2, y += font.fontHeight, SpellbookScreen.TITLE_COLOR, false);
|
||||||
|
|
||||||
Text levelString = Text.literal(Romanizer.romanize(currentLevel + 1));
|
Text levelString = Text.literal(Romanizer.romanize(currentLevel + 1));
|
||||||
|
|
Loading…
Reference in a new issue