From ddfc98870f671f57c2219417635ca4e25a8c1045 Mon Sep 17 00:00:00 2001 From: Yasin Date: Tue, 18 Jun 2024 14:32:19 +0200 Subject: fix and adding stuff slot text - change most of aggresive text color to more unobtrusive text color - added 4 more slot text (Your essence, essence shop, Stats Tuning, Power Stones Guide) Farming hud: - No Counter doesnt show an counter anymore commision waypoints: - still works if commision hud is turned off --- src/main/java/de/hysky/skyblocker/skyblock/garden/FarmingHud.java | 5 ++++- .../java/de/hysky/skyblocker/skyblock/garden/FarmingHudWidget.java | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src/main/java/de/hysky/skyblocker/skyblock/garden') diff --git a/src/main/java/de/hysky/skyblocker/skyblock/garden/FarmingHud.java b/src/main/java/de/hysky/skyblocker/skyblock/garden/FarmingHud.java index b845e07a..5837ea20 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/garden/FarmingHud.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/garden/FarmingHud.java @@ -135,7 +135,7 @@ public class FarmingHud { } public enum CounterType { - NONE("", "No Counter: "), + NONE("", "No Counter"), COUNTER("mined_crops", "Counter: "), CULTIVATING("farmed_cultivating", "Cultivating Counter: "); @@ -146,5 +146,8 @@ public class FarmingHud { this.nbtKey = nbtKey; this.text = text; } + public boolean matchesText(String textToMatch) { + return this.text.equals(textToMatch); + } } } diff --git a/src/main/java/de/hysky/skyblocker/skyblock/garden/FarmingHudWidget.java b/src/main/java/de/hysky/skyblocker/skyblock/garden/FarmingHudWidget.java index c413ad44..84013f0b 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/garden/FarmingHudWidget.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/garden/FarmingHudWidget.java @@ -66,7 +66,10 @@ public class FarmingHudWidget extends Widget { String cropItemId = FARMING_TOOLS.get(ItemUtils.getItemId(farmingToolStack)); ItemStack cropStack = ItemRepository.getItemStack(ItemTooltip.getNeuName(cropItemId, cropItemId)); // The cropItemId is being used as the api id in the second parameter because the skyblock id and api id are the same for all crops. - addSimpleIcoText(cropStack, FarmingHud.counterText(), Formatting.YELLOW, FarmingHud.NUMBER_FORMAT.format(FarmingHud.counter())); + String counterText = FarmingHud.counterText(); + String counterNumber = FarmingHud.NUMBER_FORMAT.format(FarmingHud.counter()); + if (FarmingHud.CounterType.NONE.matchesText(counterText)) counterNumber = ""; + addSimpleIcoText(cropStack, counterText, Formatting.YELLOW, counterNumber); float cropsPerMinute = FarmingHud.cropsPerMinute(); addSimpleIcoText(cropStack, "Crops/min: ", Formatting.YELLOW, FarmingHud.NUMBER_FORMAT.format((int) cropsPerMinute / 10 * 10)); addSimpleIcoText(Ico.GOLD, "Coins/h: ", Formatting.GOLD, getPriceText(cropItemId, cropsPerMinute)); -- cgit