From 7ce731f859febc0786be29b95fd0edc64707f9c9 Mon Sep 17 00:00:00 2001 From: Hazem <79111320+7azeemm@users.noreply.github.com> Date: Tue, 24 Dec 2024 22:07:32 +0100 Subject: [PATCH] Slayer Widget preview for Tab HUD (#1105) --- .../skyblock/slayers/hud/SlayerHudWidget.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/de/hysky/skyblocker/skyblock/slayers/hud/SlayerHudWidget.java b/src/main/java/de/hysky/skyblocker/skyblock/slayers/hud/SlayerHudWidget.java index 6338329ff4..9fcbfdeba8 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/slayers/hud/SlayerHudWidget.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/slayers/hud/SlayerHudWidget.java @@ -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; @@ -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();