Skip to content

Commit

Permalink
Slayer Widget preview for Tab HUD (SkyblockerMod#1105)
Browse files Browse the repository at this point in the history
  • Loading branch information
7azeemm authored Dec 24, 2024
1 parent 2bf0f7f commit 7ce731f
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import de.hysky.skyblocker.skyblock.slayers.SlayerManager;
import de.hysky.skyblocker.skyblock.slayers.SlayerTier;
import de.hysky.skyblocker.skyblock.slayers.SlayerType;
import de.hysky.skyblocker.skyblock.tabhud.config.WidgetsConfigurationScreen;
import de.hysky.skyblocker.skyblock.tabhud.util.Ico;
import de.hysky.skyblocker.skyblock.tabhud.widget.ComponentBasedWidget;
import de.hysky.skyblocker.skyblock.tabhud.widget.component.IcoTextComponent;
Expand Down Expand Up @@ -55,6 +56,16 @@ public boolean shouldRender(Location location) {

@Override
public void updateContent() {
if (MinecraftClient.getInstance().currentScreen instanceof WidgetsConfigurationScreen) {
SlayerType type = SlayerType.REVENANT;
SlayerTier tier = SlayerTier.V;

addSimpleIcoText(type.icon, "", tier.color, type.bossName + " " + tier);
addSimpleIcoText(Ico.EXPERIENCE_BOTTLE, "XP: ", Formatting.LIGHT_PURPLE, "100,000/400,000");
addComponent(new IcoTextComponent(Ico.NETHER_STAR, Text.translatable("skyblocker.slayer.hud.levelUpIn", Text.literal("200").formatted(Formatting.LIGHT_PURPLE))));
return;
}

if (client.player == null || SlayerManager.getSlayerQuest() == null) return;

SlayerType type = SlayerManager.getSlayerType();
Expand Down

0 comments on commit 7ce731f

Please sign in to comment.