diff options
author | Roman / Linnea Gräf <nea@nea.moe> | 2023-05-15 22:50:48 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-05-17 10:50:22 +0200 |
commit | 55d6bfc64f0a2ef36aebbcc49dabfa4128612895 (patch) | |
tree | ea348b0e822d35fbaf2bbea653857848c45abdbb /src | |
parent | 29dfcf213f1183ca382d8d7604a08e914e0918c2 (diff) | |
download | skyhanni-55d6bfc64f0a2ef36aebbcc49dabfa4128612895.tar.gz skyhanni-55d6bfc64f0a2ef36aebbcc49dabfa4128612895.tar.bz2 skyhanni-55d6bfc64f0a2ef36aebbcc49dabfa4128612895.zip |
Fix compile errors introduced in 068cc5db57af16b25dd5115498ddf0e6f1fc… (#109)
Diffstat (limited to 'src')
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 |