diff options
| author | Aaron <51387595+AzureAaron@users.noreply.github.com> | 2024-02-04 12:49:53 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-04 12:49:53 -0500 |
| commit | fe1bc0589caef8ff9f2d616a3742e63e2668f00e (patch) | |
| tree | 06e8e1b2ee3e3a9381dc042650f4fe6ac86582c5 /src/main/java/de/hysky/skyblocker/skyblock/tabhud | |
| parent | ce90376c4a8a934cc4d2f8bc4dd0e5e1c71b3748 (diff) | |
| parent | 71467890a61eb4e05793b1856f6303787216f2ec (diff) | |
| download | Skyblocker-fe1bc0589caef8ff9f2d616a3742e63e2668f00e.tar.gz Skyblocker-fe1bc0589caef8ff9f2d616a3742e63e2668f00e.tar.bz2 Skyblocker-fe1bc0589caef8ff9f2d616a3742e63e2668f00e.zip | |
Merge pull request #523 from olim88/crystal-hollows-fetures
Crystal hollows fetures
Diffstat (limited to 'src/main/java/de/hysky/skyblocker/skyblock/tabhud')
| -rw-r--r-- | src/main/java/de/hysky/skyblocker/skyblock/tabhud/widget/hud/HudPowderWidget.java | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/main/java/de/hysky/skyblocker/skyblock/tabhud/widget/hud/HudPowderWidget.java b/src/main/java/de/hysky/skyblocker/skyblock/tabhud/widget/hud/HudPowderWidget.java new file mode 100644 index 00000000..1d11c2a6 --- /dev/null +++ b/src/main/java/de/hysky/skyblocker/skyblock/tabhud/widget/hud/HudPowderWidget.java @@ -0,0 +1,40 @@ +package de.hysky.skyblocker.skyblock.tabhud.widget.hud; + +import de.hysky.skyblocker.skyblock.tabhud.util.Ico; +import de.hysky.skyblocker.skyblock.tabhud.widget.Widget; +import net.minecraft.text.MutableText; +import net.minecraft.text.Text; +import net.minecraft.util.Formatting; + +// this widget shows the status of the king's commissions. +// (dwarven mines and crystal hollows) +// USE ONLY WITH THE DWARVEN HUD! + +public class HudPowderWidget extends Widget { + + private static final MutableText TITLE = Text.literal("Powders").formatted(Formatting.DARK_AQUA, + Formatting.BOLD); + + + // disgusting hack to get around text renderer issues. + // the ctor eventually tries to get the font's height, which doesn't work + // when called before the client window is created (roughly). + // the rebdering god 2 from the fabricord explained that detail, thanks! + //coppied from the HodCommsWidget to be used in the same place + public static final HudPowderWidget INSTANCE = new HudPowderWidget(); + public static final HudPowderWidget INSTANCE_CFG = new HudPowderWidget(); + + // another repulsive hack to make this widget-like hud element work with the new widget class + // DON'T USE WITH THE WIDGET SYSTEM, ONLY USE FOR DWARVENHUD! + public HudPowderWidget() { + super(TITLE, Formatting.DARK_AQUA.getColorValue()); + } + + + @Override + public void updateContent() { + this.addSimpleIcoText(Ico.MITHRIL, "Mithril:", Formatting.AQUA, 46); + this.addSimpleIcoText(Ico.AMETHYST_SHARD, "Gemstone:", Formatting.DARK_PURPLE, 47); + } + +} |
