diff options
author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2023-01-25 02:19:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-25 02:19:48 +0100 |
commit | d25cfef7963debcf4adbcec7d086443132b6a213 (patch) | |
tree | 15347ecc0b493016bbfffbdc8f1dd85229fc61b8 | |
parent | 56a77d2b1767d7b3d88bb726ae6af5daab43f02c (diff) | |
download | skyhanni-d25cfef7963debcf4adbcec7d086443132b6a213.tar.gz skyhanni-d25cfef7963debcf4adbcec7d086443132b6a213.tar.bz2 skyhanni-d25cfef7963debcf4adbcec7d086443132b6a213.zip |
Red Number Scoreboard Hider (#10)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | FEATURES.md | 3 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/Misc.java | 5 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/mixins/transformers/MixinGuiIngame.java | 23 | ||||
-rw-r--r-- | src/main/resources/mixins.skyhanni.json | 1 |
5 files changed, 32 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index d3a400fc1..900092212 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ## Features + Adding green line around items that are clickable. (Inside the **Not Clickable Items Feature**) + Added **Odger waypoint** - Show the Odger waypoint when trophy fishes are in the inventory and no lava rod in hand. ++ Added the option to hide the red numbers in the scoreboard sidebar on the right side of the screen. ## Changes + Hide reputation boss waypoint when damage indicator is present. diff --git a/FEATURES.md b/FEATURES.md index 39d4faf9d..3b74d66c9 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -166,4 +166,5 @@ - Option to hide blaze particles. - Wishing compass uses amount display. - Brewing Stand Overlay. -- Crimson Isle Reputation Helper.
\ No newline at end of file +- Crimson Isle Reputation Helper. +- Red Scoreboard Numbers - Hides the red numbers in the scoreboard sidebar on the right side of the screen.
\ No newline at end of file diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java b/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java index 12df4bca4..40ecb5f8a 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java @@ -167,4 +167,9 @@ public class Misc { @ConfigOption(name = "Config Button", desc = "Add a button to the pause menu to configure SkyHanni.") @ConfigEditorBoolean public boolean configButtonOnPause = true; + + @Expose + @ConfigOption(name = "Red Scoreboard Numbers", desc = "Hide the red scoreboard numbers at the right side of the screen.") + @ConfigEditorBoolean + public boolean hideScoreboardNumbers = false; }
\ No newline at end of file diff --git a/src/main/java/at/hannibal2/skyhanni/mixins/transformers/MixinGuiIngame.java b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/MixinGuiIngame.java new file mode 100644 index 000000000..6a40eb2cf --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/MixinGuiIngame.java @@ -0,0 +1,23 @@ +package at.hannibal2.skyhanni.mixins.transformers; + +import at.hannibal2.skyhanni.SkyHanniMod; +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.gui.GuiIngame; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Redirect; + +@Mixin(GuiIngame.class) +public class MixinGuiIngame { + + @Redirect(method = "renderScoreboard", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/FontRenderer;drawString(Ljava/lang/String;III)I")) + private int renderItemOverlayPost(FontRenderer instance, String text, int x, int y, int color) { + if (SkyHanniMod.feature.misc.hideScoreboardNumbers) { + if (text.startsWith("§c") && text.length() <= 4) { + return 0; + } + } + + return instance.drawString(text, x, y, color); + } +} diff --git a/src/main/resources/mixins.skyhanni.json b/src/main/resources/mixins.skyhanni.json index 337fe91de..7fe2496a2 100644 --- a/src/main/resources/mixins.skyhanni.json +++ b/src/main/resources/mixins.skyhanni.json @@ -17,6 +17,7 @@ "tileentity.TileEntitySignMixin" ], "client": [ + "MixinGuiIngame", "gui.MixinGuiNewChat" ] } |