From 4ceeff21a1afcced4f1b00031aaa1a2ceab8d6a2 Mon Sep 17 00:00:00 2001 From: Aaron <51387595+AzureAaron@users.noreply.github.com> Date: Fri, 31 Mar 2023 02:20:08 -0400 Subject: Eclipse decided not to commit this .-. --- src/main/resources/assets/skyblocker/lang/en_us.json | 1 + 1 file changed, 1 insertion(+) (limited to 'src/main/resources/assets/skyblocker/lang/en_us.json') diff --git a/src/main/resources/assets/skyblocker/lang/en_us.json b/src/main/resources/assets/skyblocker/lang/en_us.json index 8e7e4041..3e4ab9b9 100644 --- a/src/main/resources/assets/skyblocker/lang/en_us.json +++ b/src/main/resources/assets/skyblocker/lang/en_us.json @@ -60,6 +60,7 @@ "text.autoconfig.skyblocker.option.locations.dungeons.croesusHelper": "Croesus Helper", "text.autoconfig.skyblocker.option.locations.dungeons.croesusHelper.@Tooltip": "Gray out chests that have already been opened.", "text.autoconfig.skyblocker.option.locations.dungeons.enableMap": "Enable Map", + "text.autoconfig.skyblocker.option.locations.dungeons.mapScaling": "Map Scaling", "text.autoconfig.skyblocker.option.locations.dungeons.solveThreeWeirdos": "Solve Three Weirdos Puzzle", "text.autoconfig.skyblocker.option.locations.dungeons.blazesolver": "Solve Blaze Puzzle", "text.autoconfig.skyblocker.option.locations.dungeons.solveTrivia": "Solve Trivia Puzzle", -- cgit From 515f7fcf6f284030538ca57142a39c32e045d95e Mon Sep 17 00:00:00 2001 From: msg-programs Date: Sat, 15 Apr 2023 17:05:05 +0200 Subject: Add option to hide empty tooltips in inventories. Hypixel's inventory menus sometimes use items with empty names. When the game draws the tooltip for such an item, a small dark rectangle is seen. Mixin into the function that draws tooltips and disable it when that is the case. --- .../skyblocker/config/SkyblockerConfig.java | 1 + .../me/xmrvizzy/skyblocker/mixin/ScreenMixin.java | 26 ++++++++++++++++++++++ .../resources/assets/skyblocker/lang/en_us.json | 1 + src/main/resources/skyblocker.mixins.json | 3 ++- 4 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 src/main/java/me/xmrvizzy/skyblocker/mixin/ScreenMixin.java (limited to 'src/main/resources/assets/skyblocker/lang/en_us.json') diff --git a/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java b/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java index a13f86b3..05ffc2e9 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java +++ b/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java @@ -124,6 +124,7 @@ public class SkyblockerConfig implements ConfigData { public static class General { public boolean enableUpdateNotification = true; public boolean backpackPreviewWithoutShift = false; + public boolean hideEmptyTooltips = true; @ConfigEntry.Gui.Excluded public String apiKey; diff --git a/src/main/java/me/xmrvizzy/skyblocker/mixin/ScreenMixin.java b/src/main/java/me/xmrvizzy/skyblocker/mixin/ScreenMixin.java new file mode 100644 index 00000000..01f0f2a9 --- /dev/null +++ b/src/main/java/me/xmrvizzy/skyblocker/mixin/ScreenMixin.java @@ -0,0 +1,26 @@ +package me.xmrvizzy.skyblocker.mixin; + +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +import me.xmrvizzy.skyblocker.config.SkyblockerConfig; +import net.minecraft.client.gui.screen.Screen; +import net.minecraft.client.util.math.MatrixStack; +import net.minecraft.item.ItemStack; +import net.minecraft.text.Text; + +@Mixin(Screen.class) +public abstract class ScreenMixin { + + @Inject(at = @At("HEAD"), method = "renderTooltip(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/item/ItemStack;II)V", cancellable = true) + public void skyblocker$renderTooltip(MatrixStack matrices, ItemStack itemStack, int x, int y, CallbackInfo ci) { + Text stackName = itemStack.getName(); + String strName = stackName.getString(); + if (SkyblockerConfig.get().general.hideEmptyTooltips && strName.equals(" ")) { + ci.cancel(); + } + } + +} diff --git a/src/main/resources/assets/skyblocker/lang/en_us.json b/src/main/resources/assets/skyblocker/lang/en_us.json index 8e7e4041..c0ee7809 100644 --- a/src/main/resources/assets/skyblocker/lang/en_us.json +++ b/src/main/resources/assets/skyblocker/lang/en_us.json @@ -95,6 +95,7 @@ "skyblocker.update.update_message_end" : " §ato find out about latest features.", "skyblocker.update.hover_text": "Open Modrinth", "text.autoconfig.skyblocker.option.general.enableUpdateNotification": "Update Notification", + "text.autoconfig.skyblocker.option.general.hideEmptyTooltips": "Hide empty tooltips in inventory menus", "skyblocker.api.got_key": "§b[§6Skyblocker§b] §2Automatically set your API key!" } diff --git a/src/main/resources/skyblocker.mixins.json b/src/main/resources/skyblocker.mixins.json index fc37cfb0..4a6be779 100644 --- a/src/main/resources/skyblocker.mixins.json +++ b/src/main/resources/skyblocker.mixins.json @@ -16,7 +16,8 @@ "HandledScreenMixin", "InventoryScreenMixin", "RecipeBookWidgetAccessor", - "HandledScreenAccessor" + "HandledScreenAccessor", + "ScreenMixin" ], "injectors": { "defaultRequire": 1 -- cgit From 111e94e880ecc2a4dd85affbe5b29bdc75f4d26a Mon Sep 17 00:00:00 2001 From: msg-programs Date: Sun, 16 Apr 2023 10:20:40 +0200 Subject: Update english and add german translation --- src/main/resources/assets/skyblocker/lang/de_de.json | 1 + src/main/resources/assets/skyblocker/lang/en_us.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/resources/assets/skyblocker/lang/en_us.json') diff --git a/src/main/resources/assets/skyblocker/lang/de_de.json b/src/main/resources/assets/skyblocker/lang/de_de.json index a74b39ff..e50888a0 100644 --- a/src/main/resources/assets/skyblocker/lang/de_de.json +++ b/src/main/resources/assets/skyblocker/lang/de_de.json @@ -7,6 +7,7 @@ "text.autoconfig.skyblocker.category.general": "Allgemein", "text.autoconfig.skyblocker.option.general.bars": "Gesundheits-, Mana-, Verteidigungs- und XP-Balken", "text.autoconfig.skyblocker.option.general.bars.enableBars": "Balken aktivieren", + "text.autoconfig.skyblocker.option.general.hideEmptyTooltips": "Leere Item-Tooltips in Menüs verstecken", "text.autoconfig.skyblocker.category.locations": "Standorte", "text.autoconfig.skyblocker.option.locations.dungeons": "Dungeons", diff --git a/src/main/resources/assets/skyblocker/lang/en_us.json b/src/main/resources/assets/skyblocker/lang/en_us.json index 15ba6216..d0a253c5 100644 --- a/src/main/resources/assets/skyblocker/lang/en_us.json +++ b/src/main/resources/assets/skyblocker/lang/en_us.json @@ -108,7 +108,7 @@ "skyblocker.update.update_message_end" : " §ato find out about latest features.", "skyblocker.update.hover_text": "Open Modrinth", "text.autoconfig.skyblocker.option.general.enableUpdateNotification": "Update Notification", - "text.autoconfig.skyblocker.option.general.hideEmptyTooltips": "Hide empty tooltips in inventory menus", + "text.autoconfig.skyblocker.option.general.hideEmptyTooltips": "Hide empty item tooltips in menus", "skyblocker.api.got_key": "§b[§6Skyblocker§b] §2Automatically set your API key!" } -- cgit From 65edef61a52fc728032d10941e84bba57cb2a021 Mon Sep 17 00:00:00 2001 From: Yasin Date: Mon, 1 May 2023 01:21:12 +0200 Subject: add new en_us translations --- .../resources/assets/skyblocker/lang/en_us.json | 84 ++++++++++++++++++++++ 1 file changed, 84 insertions(+) (limited to 'src/main/resources/assets/skyblocker/lang/en_us.json') diff --git a/src/main/resources/assets/skyblocker/lang/en_us.json b/src/main/resources/assets/skyblocker/lang/en_us.json index ddfcdfee..210c6969 100644 --- a/src/main/resources/assets/skyblocker/lang/en_us.json +++ b/src/main/resources/assets/skyblocker/lang/en_us.json @@ -50,17 +50,101 @@ "text.autoconfig.skyblocker.category.quickNav" : "Quick Navigation", "text.autoconfig.skyblocker.option.quickNav.enableQuickNav" : "Enable Quick Navigation", "text.autoconfig.skyblocker.option.quickNav.button1" : "Button 1", + "text.autoconfig.skyblocker.option.quickNav.button1.render" : "Render", + "text.autoconfig.skyblocker.option.quickNav.button1.item" : "Item", + "text.autoconfig.skyblocker.option.quickNav.button1.item.itemName" : "Item name", + "text.autoconfig.skyblocker.option.quickNav.button1.item.count" : "Item Count", + "text.autoconfig.skyblocker.option.quickNav.button1.item.nbt" : "NBT", + "text.autoconfig.skyblocker.option.quickNav.button1.uiTitle" : "UI Title", + "text.autoconfig.skyblocker.option.quickNav.button1.clickEvent" : "Click event", "text.autoconfig.skyblocker.option.quickNav.button2" : "Button 2", + "text.autoconfig.skyblocker.option.quickNav.button2.render" : "Render", + "text.autoconfig.skyblocker.option.quickNav.button2.item" : "Item", + "text.autoconfig.skyblocker.option.quickNav.button2.item.itemName" : "Item name", + "text.autoconfig.skyblocker.option.quickNav.button2.item.count" : "Item Count", + "text.autoconfig.skyblocker.option.quickNav.button2.item.nbt" : "NBT", + "text.autoconfig.skyblocker.option.quickNav.button2.uiTitle" : "UI Title", + "text.autoconfig.skyblocker.option.quickNav.button2.clickEvent" : "Click event", "text.autoconfig.skyblocker.option.quickNav.button3" : "Button 3", + "text.autoconfig.skyblocker.option.quickNav.button3.render" : "Render", + "text.autoconfig.skyblocker.option.quickNav.button3.item" : "Item", + "text.autoconfig.skyblocker.option.quickNav.button3.item.itemName" : "Item name", + "text.autoconfig.skyblocker.option.quickNav.button3.item.count" : "Item Count", + "text.autoconfig.skyblocker.option.quickNav.button3.item.nbt" : "NBT", + "text.autoconfig.skyblocker.option.quickNav.button3.uiTitle" : "UI Title", + "text.autoconfig.skyblocker.option.quickNav.button3.clickEvent" : "Click event", "text.autoconfig.skyblocker.option.quickNav.button4" : "Button 4", + "text.autoconfig.skyblocker.option.quickNav.button4.render" : "Render", + "text.autoconfig.skyblocker.option.quickNav.button4.item" : "Item", + "text.autoconfig.skyblocker.option.quickNav.button4.item.itemName" : "Item name", + "text.autoconfig.skyblocker.option.quickNav.button4.item.count" : "Item Count", + "text.autoconfig.skyblocker.option.quickNav.button4.item.nbt" : "NBT", + "text.autoconfig.skyblocker.option.quickNav.button4.uiTitle" : "UI Title", + "text.autoconfig.skyblocker.option.quickNav.button4.clickEvent" : "Click event", "text.autoconfig.skyblocker.option.quickNav.button5" : "Button 5", + "text.autoconfig.skyblocker.option.quickNav.button5.render" : "Render", + "text.autoconfig.skyblocker.option.quickNav.button5.item" : "Item", + "text.autoconfig.skyblocker.option.quickNav.button5.item.itemName" : "Item name", + "text.autoconfig.skyblocker.option.quickNav.button5.item.count" : "Item Count", + "text.autoconfig.skyblocker.option.quickNav.button5.item.nbt" : "NBT", + "text.autoconfig.skyblocker.option.quickNav.button5.uiTitle" : "UI Title", + "text.autoconfig.skyblocker.option.quickNav.button5.clickEvent" : "Click event", "text.autoconfig.skyblocker.option.quickNav.button6" : "Button 6", + "text.autoconfig.skyblocker.option.quickNav.button6.render" : "Render", + "text.autoconfig.skyblocker.option.quickNav.button6.item" : "Item", + "text.autoconfig.skyblocker.option.quickNav.button6.item.itemName" : "Item name", + "text.autoconfig.skyblocker.option.quickNav.button6.item.count" : "Item Count", + "text.autoconfig.skyblocker.option.quickNav.button6.item.nbt" : "NBT", + "text.autoconfig.skyblocker.option.quickNav.button6.uiTitle" : "UI Title", + "text.autoconfig.skyblocker.option.quickNav.button6.clickEvent" : "Click event", "text.autoconfig.skyblocker.option.quickNav.button7" : "Button 7", + "text.autoconfig.skyblocker.option.quickNav.button7.render" : "Render", + "text.autoconfig.skyblocker.option.quickNav.button7.item" : "Item", + "text.autoconfig.skyblocker.option.quickNav.button7.item.itemName" : "Item name", + "text.autoconfig.skyblocker.option.quickNav.button7.item.count" : "Item Count", + "text.autoconfig.skyblocker.option.quickNav.button7.item.nbt" : "NBT", + "text.autoconfig.skyblocker.option.quickNav.button7.uiTitle" : "UI Title", + "text.autoconfig.skyblocker.option.quickNav.button7.clickEvent" : "Click event", "text.autoconfig.skyblocker.option.quickNav.button8" : "Button 8", + "text.autoconfig.skyblocker.option.quickNav.button8.render" : "Render", + "text.autoconfig.skyblocker.option.quickNav.button8.item" : "Item", + "text.autoconfig.skyblocker.option.quickNav.button8.item.itemName" : "Item name", + "text.autoconfig.skyblocker.option.quickNav.button8.item.count" : "Item Count", + "text.autoconfig.skyblocker.option.quickNav.button8.item.nbt" : "NBT", + "text.autoconfig.skyblocker.option.quickNav.button8.uiTitle" : "UI Title", + "text.autoconfig.skyblocker.option.quickNav.button8.clickEvent" : "Click event", "text.autoconfig.skyblocker.option.quickNav.button9" : "Button 9", + "text.autoconfig.skyblocker.option.quickNav.button9.render" : "Render", + "text.autoconfig.skyblocker.option.quickNav.button9.item" : "Item", + "text.autoconfig.skyblocker.option.quickNav.button9.item.itemName" : "Item name", + "text.autoconfig.skyblocker.option.quickNav.button9.item.count" : "Item Count", + "text.autoconfig.skyblocker.option.quickNav.button9.item.nbt" : "NBT", + "text.autoconfig.skyblocker.option.quickNav.button9.uiTitle" : "UI Title", + "text.autoconfig.skyblocker.option.quickNav.button9.clickEvent" : "Click event", "text.autoconfig.skyblocker.option.quickNav.button10" : "Button 10", + "text.autoconfig.skyblocker.option.quickNav.button10.render" : "Render", + "text.autoconfig.skyblocker.option.quickNav.button10.item" : "Item", + "text.autoconfig.skyblocker.option.quickNav.button10.item.itemName" : "Item name", + "text.autoconfig.skyblocker.option.quickNav.button10.item.count" : "Item Count", + "text.autoconfig.skyblocker.option.quickNav.button10.item.nbt" : "NBT", + "text.autoconfig.skyblocker.option.quickNav.button10.uiTitle" : "UI Title", + "text.autoconfig.skyblocker.option.quickNav.button10.clickEvent" : "Click event", "text.autoconfig.skyblocker.option.quickNav.button11" : "Button 11", + "text.autoconfig.skyblocker.option.quickNav.button11.render" : "Render", + "text.autoconfig.skyblocker.option.quickNav.button11.item" : "Item", + "text.autoconfig.skyblocker.option.quickNav.button11.item.itemName" : "Item name", + "text.autoconfig.skyblocker.option.quickNav.button11.item.count" : "Item Count", + "text.autoconfig.skyblocker.option.quickNav.button11.item.nbt" : "NBT", + "text.autoconfig.skyblocker.option.quickNav.button11.uiTitle" : "UI Title", + "text.autoconfig.skyblocker.option.quickNav.button11.clickEvent" : "Click event", "text.autoconfig.skyblocker.option.quickNav.button12" : "Button 12", + "text.autoconfig.skyblocker.option.quickNav.button12.render" : "Render", + "text.autoconfig.skyblocker.option.quickNav.button12.item" : "Item", + "text.autoconfig.skyblocker.option.quickNav.button12.item.itemName" : "Item name", + "text.autoconfig.skyblocker.option.quickNav.button12.item.count" : "Item Count", + "text.autoconfig.skyblocker.option.quickNav.button12.item.nbt" : "NBT", + "text.autoconfig.skyblocker.option.quickNav.button12.uiTitle" : "UI Title", + "text.autoconfig.skyblocker.option.quickNav.button12.clickEvent" : "Click event", "text.autoconfig.skyblocker.option.general.itemList": "Item List", "text.autoconfig.skyblocker.option.general.itemList.enableItemList": "Enable Item List", -- cgit