aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenBestCropTime.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/mixins/transformers/AccessorGuiPlayerTabOverlay.java4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/command/CopyTabListCommand.kt13
3 files changed, 12 insertions, 7 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenBestCropTime.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenBestCropTime.kt
index c72983934..4e5b87140 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenBestCropTime.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenBestCropTime.kt
@@ -108,7 +108,7 @@ class GardenBestCropTime {
val cropName = if (!config.cropMilestoneBestCompact) crop.cropName + " " else ""
- val tier = if (!config.cropMilestoneBestCompact) "$currentTier->$nextTier " else ""
+ val tier = if (!config.cropMilestoneBestCompact) "$currentTier->$nextTier§r " else ""
list.add("$color$contestFormat$cropName$tier§b$duration")
if (gardenExp && !config.cropMilestoneBestCompact) {
diff --git a/src/main/java/at/hannibal2/skyhanni/mixins/transformers/AccessorGuiPlayerTabOverlay.java b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/AccessorGuiPlayerTabOverlay.java
index 41091580e..d83fe603b 100644
--- a/src/main/java/at/hannibal2/skyhanni/mixins/transformers/AccessorGuiPlayerTabOverlay.java
+++ b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/AccessorGuiPlayerTabOverlay.java
@@ -8,5 +8,7 @@ import org.spongepowered.asm.mixin.gen.Accessor;
@Mixin(GuiPlayerTabOverlay.class)
public interface AccessorGuiPlayerTabOverlay {
@Accessor("footer")
- IChatComponent getFooter();
+ IChatComponent getFooter_skyhanni();
+ @Accessor("header")
+ IChatComponent getHeader_skyhanni();
}
diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/CopyTabListCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/CopyTabListCommand.kt
index fc41c4009..c5c94b8a2 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/command/CopyTabListCommand.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/command/CopyTabListCommand.kt
@@ -1,5 +1,6 @@
package at.hannibal2.skyhanni.test.command
+import at.hannibal2.skyhanni.mixins.transformers.AccessorGuiPlayerTabOverlay
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.OSUtils
import at.hannibal2.skyhanni.utils.StringUtils.removeColor
@@ -15,14 +16,16 @@ object CopyTabListCommand {
val tabListLine = if (noColor) line.removeColor() else line
if (tabListLine != "") resultList.add("'$tabListLine'")
}
- val tabHeader = Minecraft.getMinecraft().ingameGUI.tabList.header.formattedText
- val tabFooter = Minecraft.getMinecraft().ingameGUI.tabList.footer.formattedText
- val string = "Header:\n\n" + tabHeader.toString() + "\n\nBody:\n\n" + resultList.joinToString("\n") + "\nFooter:\n\n" + tabFooter.toString()
+ val tabList = Minecraft.getMinecraft().ingameGUI.tabList as AccessorGuiPlayerTabOverlay
+ val tabHeader = tabList.header_skyhanni.formattedText
+ val tabFooter = tabList.footer_skyhanni.formattedText
+ val string = "Header:\n\n$tabHeader\n\nBody:\n\n${resultList.joinToString("\n")}\nFooter:\n\n$tabFooter"
OSUtils.copyToClipboard(string)
- LorenzUtils.chat("§e[SkyHanni] tablist copied into the clipboard!")
+ LorenzUtils.chat("§e[SkyHanni] Tab list copied into the clipboard!")
}
catch (_: Throwable) {
- LorenzUtils.chat("§c[SkyHanni] Nothing in tablist")
+ // TODO: Note: why are we ignoring this exception? This user facing error message seems out of place to me
+ LorenzUtils.chat("§c[SkyHanni] Nothing in tab list")
}
}
} \ No newline at end of file