From 41dde7b568278953bf1c5a68ae09e50f2bb8d9b8 Mon Sep 17 00:00:00 2001 From: Miraculixx Date: Tue, 31 Jan 2023 13:09:27 +0100 Subject: Adding QuickNav Customization Adding a way to customize the quick navigation buttons in the inventory. Every button can be toggled, has a display icon with nbt data, a click event and GUI name for highlighting. On default, everything is like before. The only problem is cloth config translation. I never worked before with cloth and don't want to copy paste the same key 12 times for the 12 buttons. If anyone is good with cloth config and know how to change the path, just edit it or message me :+1: --- .../skyblocker/config/SkyblockerConfig.java | 101 +++++++++++++++++++-- .../skyblocker/mixin/HandledScreenMixin.java | 2 +- .../skyblocker/skyblock/quicknav/QuickNav.java | 41 ++++++--- .../java/me/xmrvizzy/skyblocker/utils/Utils.java | 1 + .../resources/assets/skyblocker/lang/en_us.json | 15 +++ 5 files changed, 138 insertions(+), 22 deletions(-) (limited to 'src/main') diff --git a/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java b/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java index 236fb361..fedec208 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java +++ b/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java @@ -6,6 +6,7 @@ import me.shedaniel.autoconfig.annotation.Config; import me.shedaniel.autoconfig.annotation.ConfigEntry; import me.shedaniel.autoconfig.serializer.GsonConfigSerializer; import me.xmrvizzy.skyblocker.chat.ChatFilterResult; +import net.minecraft.item.ItemStack; import java.util.ArrayList; import java.util.List; @@ -29,6 +30,98 @@ public class SkyblockerConfig implements ConfigData { @ConfigEntry.Gui.TransitiveObject public RichPresence richPresence = new RichPresence(); + @ConfigEntry.Category("quickNav") + @ConfigEntry.Gui.TransitiveObject + public QuickNav quickNav = new QuickNav(); + + public static class QuickNav { + public boolean enableQuickNav = true; + + @ConfigEntry.Category("button1") + @ConfigEntry.Gui.CollapsibleObject(startExpanded = false) + public QuickNavItem button1 = new QuickNavItem(true, new ItemData("diamond_sword"), "Your Skills", "/skills"); + + @ConfigEntry.Category("button2") + @ConfigEntry.Gui.CollapsibleObject(startExpanded = false) + public QuickNavItem button2 = new QuickNavItem(true, new ItemData("painting"), "Collection", "/collection"); + + @ConfigEntry.Category("button3") + @ConfigEntry.Gui.CollapsibleObject(startExpanded = false) + public QuickNavItem button3 = new QuickNavItem(false, new ItemData("air"), "", ""); + + @ConfigEntry.Category("button4") + @ConfigEntry.Gui.CollapsibleObject(startExpanded = false) + public QuickNavItem button4 = new QuickNavItem(true, new ItemData("bone"), "Pets", "/pets"); + + @ConfigEntry.Category("button5") + @ConfigEntry.Gui.CollapsibleObject(startExpanded = false) + public QuickNavItem button5 = new QuickNavItem(true, new ItemData("leather_chestplate", 1, "tag:{display:{color:8991416}}"), "Wardrobe", "/wardrobe"); + + @ConfigEntry.Category("button6") + @ConfigEntry.Gui.CollapsibleObject(startExpanded = false) + public QuickNavItem button6 = new QuickNavItem(true, new ItemData("ender_chest"), "Storage", "/storage"); + + @ConfigEntry.Category("button7") + @ConfigEntry.Gui.CollapsibleObject(startExpanded = false) + public QuickNavItem button7 = new QuickNavItem(true, new ItemData("player_head", 1, "tag:{SkullOwner:{Id:[I;-300151517,-631415889,-1193921967,-1821784279],Properties:{textures:[{Value:\"e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDdjYzY2ODc0MjNkMDU3MGQ1NTZhYzUzZTA2NzZjYjU2M2JiZGQ5NzE3Y2Q4MjY5YmRlYmVkNmY2ZDRlN2JmOCJ9fX0=\"}]}}}"), "", "/hub"); + + @ConfigEntry.Category("button8") + @ConfigEntry.Gui.CollapsibleObject(startExpanded = false) + public QuickNavItem button8 = new QuickNavItem(true, new ItemData("player_head", 1, "tag:{SkullOwner:{Id:[I;1605800870,415127827,-1236127084,15358548],Properties:{textures:[{Value:\"e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNzg5MWQ1YjI3M2ZmMGJjNTBjOTYwYjJjZDg2ZWVmMWM0MGExYjk0MDMyYWU3MWU3NTQ3NWE1NjhhODI1NzQyMSJ9fX0=\"}]}}}"), "", "/warp dungeon"); + + @ConfigEntry.Category("button9") + @ConfigEntry.Gui.CollapsibleObject(startExpanded = false) + public QuickNavItem button9 = new QuickNavItem(false, new ItemData("air"), "", ""); + + @ConfigEntry.Category("button10") + @ConfigEntry.Gui.CollapsibleObject(startExpanded = false) + public QuickNavItem button10 = new QuickNavItem(true, new ItemData("enchanting_table"), "Enchant", "/enchant"); + + @ConfigEntry.Category("button11") + @ConfigEntry.Gui.CollapsibleObject(startExpanded = false) + public QuickNavItem button11 = new QuickNavItem(true, new ItemData("anvil"), "Anvil", "/anvil"); + + @ConfigEntry.Category("button12") + @ConfigEntry.Gui.CollapsibleObject(startExpanded = false) + public QuickNavItem button12 = new QuickNavItem(true, new ItemData("crafting_table"), "Craft Item", "/craft"); + } + + public static class QuickNavItem { + public QuickNavItem(Boolean render, ItemData itemData, String uiTitle, String clickEvent) { + this.render = render; + this.item = itemData; + this.clickEvent = clickEvent; + this.uiTitle = uiTitle; + } + + public Boolean render; + + @ConfigEntry.Category("item") + @ConfigEntry.Gui.CollapsibleObject(startExpanded = false) + public ItemData item; + + public String uiTitle; + public String clickEvent; + } + + public static class ItemData { + public ItemData(String itemName, int count, String nbt) { + this.itemName = itemName; + this.count = count; + this.nbt = nbt; + } + + public ItemData(String itemName) { + this.itemName = itemName; + this.count = 1; + this.nbt = ""; + } + + public String itemName; + public int count; + public String nbt; + } + public static class General { public boolean enableUpdateNotification = true; public boolean backpackPreviewWithoutShift = false; @@ -44,10 +137,6 @@ public class SkyblockerConfig implements ConfigData { @ConfigEntry.Gui.CollapsibleObject(startExpanded = false) public ItemList itemList = new ItemList(); - @ConfigEntry.Category("quicknav") - @ConfigEntry.Gui.CollapsibleObject(startExpanded = false) - public Quicknav quicknav = new Quicknav(); - @ConfigEntry.Category("itemTooltip") @ConfigEntry.Gui.CollapsibleObject(startExpanded = false) public ItemTooltip itemTooltip = new ItemTooltip(); @@ -123,10 +212,6 @@ public class SkyblockerConfig implements ConfigData { public boolean enableItemList = true; } - public static class Quicknav { - public boolean enableQuicknav = true; - } - public enum Average { ONE_DAY, THREE_DAY, diff --git a/src/main/java/me/xmrvizzy/skyblocker/mixin/HandledScreenMixin.java b/src/main/java/me/xmrvizzy/skyblocker/mixin/HandledScreenMixin.java index 0303bca2..0cd82aad 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/mixin/HandledScreenMixin.java +++ b/src/main/java/me/xmrvizzy/skyblocker/mixin/HandledScreenMixin.java @@ -36,7 +36,7 @@ public abstract class HandledScreenMixin extends Screen { @Inject(method = "init()V", at = @At("TAIL")) private void init(CallbackInfo ci) { // quicknav - if (Utils.isOnSkyblock && SkyblockerConfig.get().general.quicknav.enableQuicknav) { + if (Utils.isOnSkyblock && SkyblockerConfig.get().quickNav.enableQuickNav) { String screenTitle = super.getTitle().getString().trim(); List buttons = QuickNav.init(screenTitle); for (QuickNavButton button : buttons) super.addDrawableChild(button); diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNav.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNav.java index bcc57a00..4ea7fb99 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNav.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/quicknav/QuickNav.java @@ -1,35 +1,50 @@ package me.xmrvizzy.skyblocker.skyblock.quicknav; import com.mojang.brigadier.exceptions.CommandSyntaxException; +import me.xmrvizzy.skyblocker.config.SkyblockerConfig; import net.minecraft.item.ItemStack; import net.minecraft.item.Items; import net.minecraft.nbt.StringNbtReader; import java.util.ArrayList; import java.util.List; +import java.util.Locale; +import java.util.Objects; public class QuickNav { private static final String skyblockHubIconNbt = "{id:\"minecraft:player_head\",Count:1,tag:{SkullOwner:{Id:[I;-300151517,-631415889,-1193921967,-1821784279],Properties:{textures:[{Value:\"e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDdjYzY2ODc0MjNkMDU3MGQ1NTZhYzUzZTA2NzZjYjU2M2JiZGQ5NzE3Y2Q4MjY5YmRlYmVkNmY2ZDRlN2JmOCJ9fX0=\"}]}}}}"; private static final String dungeonHubIconNbt = "{id:\"minecraft:player_head\",Count:1,tag:{SkullOwner:{Id:[I;1605800870,415127827,-1236127084,15358548],Properties:{textures:[{Value:\"e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNzg5MWQ1YjI3M2ZmMGJjNTBjOTYwYjJjZDg2ZWVmMWM0MGExYjk0MDMyYWU3MWU3NTQ3NWE1NjhhODI1NzQyMSJ9fX0=\"}]}}}}"; public static List init(String screenTitle) { List buttons = new ArrayList<>(); + SkyblockerConfig.QuickNav data = SkyblockerConfig.get().quickNav; try { - buttons.add(new QuickNavButton(0, screenTitle.contains("Your Skills"), "/skills", new ItemStack(Items.DIAMOND_SWORD))); - buttons.add(new QuickNavButton(1, screenTitle.contains("Collection"), "/collection", new ItemStack(Items.PAINTING))); - - buttons.add(new QuickNavButton(3, screenTitle.contains("Pets"), "/pets", new ItemStack(Items.BONE))); - buttons.add(new QuickNavButton(4, screenTitle.contains("Wardrobe"), "/wardrobe", ItemStack.fromNbt(StringNbtReader.parse("{id:\"minecraft:leather_chestplate\", Count:1, tag:{display:{color:8991416}}}")))); - buttons.add(new QuickNavButton(5, screenTitle.contains("Storage"), "/storage", new ItemStack(Items.ENDER_CHEST))); - - buttons.add(new QuickNavButton(6, false, "/warp hub", ItemStack.fromNbt(StringNbtReader.parse(skyblockHubIconNbt)))); - buttons.add(new QuickNavButton(7, false, "/warp dungeon_hub", ItemStack.fromNbt(StringNbtReader.parse(dungeonHubIconNbt)))); - - buttons.add(new QuickNavButton(9, screenTitle.contains("Enchant Item"), "/etable", new ItemStack(Items.ENCHANTING_TABLE))); - buttons.add(new QuickNavButton(10, screenTitle.contains("Anvil"), "/anvil", new ItemStack(Items.ANVIL))); - buttons.add(new QuickNavButton(11, screenTitle.contains("Craft Item"), "/craft", new ItemStack(Items.CRAFTING_TABLE))); + if (data.button1.render) buttons.add(parseButton(data.button1, screenTitle, 0)); + if (data.button2.render) buttons.add(parseButton(data.button2, screenTitle, 1)); + if (data.button3.render) buttons.add(parseButton(data.button3, screenTitle, 2)); + if (data.button4.render) buttons.add(parseButton(data.button4, screenTitle, 3)); + if (data.button5.render) buttons.add(parseButton(data.button5, screenTitle, 4)); + if (data.button6.render) buttons.add(parseButton(data.button6, screenTitle, 5)); + if (data.button7.render) buttons.add(parseButton(data.button7, screenTitle, 6)); + if (data.button8.render) buttons.add(parseButton(data.button8, screenTitle, 7)); + if (data.button9.render) buttons.add(parseButton(data.button9, screenTitle, 8)); + if (data.button10.render) buttons.add(parseButton(data.button10, screenTitle, 9)); + if (data.button11.render) buttons.add(parseButton(data.button11, screenTitle, 10)); + if (data.button12.render) buttons.add(parseButton(data.button12, screenTitle, 11)); } catch (CommandSyntaxException e) { e.printStackTrace(); } return buttons; } + + private static QuickNavButton parseButton(SkyblockerConfig.QuickNavItem buttonInfo, String screenTitle, int id) throws CommandSyntaxException { + SkyblockerConfig.ItemData itemData = buttonInfo.item; + String nbtString = "{id:\"minecraft:" + itemData.itemName.toLowerCase(Locale.ROOT) + "\",Count:1"; + if (itemData.nbt.length() > 2) nbtString += "," + itemData.nbt; + nbtString += "}"; + return new QuickNavButton(id, + screenTitle.contains(buttonInfo.uiTitle), + buttonInfo.clickEvent, + ItemStack.fromNbt(StringNbtReader.parse(nbtString)) + ); + } } diff --git a/src/main/java/me/xmrvizzy/skyblocker/utils/Utils.java b/src/main/java/me/xmrvizzy/skyblocker/utils/Utils.java index 46f3a7e1..d9389b58 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/utils/Utils.java +++ b/src/main/java/me/xmrvizzy/skyblocker/utils/Utils.java @@ -22,6 +22,7 @@ public class Utils { public static void sbChecker() { MinecraftClient client = MinecraftClient.getInstance(); List sidebar; + if (client.world == null || client.isInSingleplayer() || (sidebar = getSidebar()) == null) { isOnSkyblock = false; isInDungeons = false; diff --git a/src/main/resources/assets/skyblocker/lang/en_us.json b/src/main/resources/assets/skyblocker/lang/en_us.json index a792e2e7..8e7e4041 100644 --- a/src/main/resources/assets/skyblocker/lang/en_us.json +++ b/src/main/resources/assets/skyblocker/lang/en_us.json @@ -37,6 +37,21 @@ "text.autoconfig.skyblocker.option.richPresence.enableRichPresence": "Enabled", "text.autoconfig.skyblocker.option.richPresence.customMessage": "Custom Message", + "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.button2" : "Button 2", + "text.autoconfig.skyblocker.option.quickNav.button3" : "Button 3", + "text.autoconfig.skyblocker.option.quickNav.button4" : "Button 4", + "text.autoconfig.skyblocker.option.quickNav.button5" : "Button 5", + "text.autoconfig.skyblocker.option.quickNav.button6" : "Button 6", + "text.autoconfig.skyblocker.option.quickNav.button7" : "Button 7", + "text.autoconfig.skyblocker.option.quickNav.button8" : "Button 8", + "text.autoconfig.skyblocker.option.quickNav.button9" : "Button 9", + "text.autoconfig.skyblocker.option.quickNav.button10" : "Button 10", + "text.autoconfig.skyblocker.option.quickNav.button11" : "Button 11", + "text.autoconfig.skyblocker.option.quickNav.button12" : "Button 12", + "text.autoconfig.skyblocker.option.general.itemList": "Item List", "text.autoconfig.skyblocker.option.general.itemList.enableItemList": "Enable Item List", -- cgit From 75d931fe2372badc54adddb458c54e1c8010953c Mon Sep 17 00:00:00 2001 From: Miraculixx Date: Tue, 31 Jan 2023 16:43:42 +0100 Subject: Remove visual highlight The teleports are now unselected by default (like before). And /enchant was replaced by /etable --- src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main') diff --git a/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java b/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java index fedec208..97284bc1 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java +++ b/src/main/java/me/xmrvizzy/skyblocker/config/SkyblockerConfig.java @@ -63,11 +63,11 @@ public class SkyblockerConfig implements ConfigData { @ConfigEntry.Category("button7") @ConfigEntry.Gui.CollapsibleObject(startExpanded = false) - public QuickNavItem button7 = new QuickNavItem(true, new ItemData("player_head", 1, "tag:{SkullOwner:{Id:[I;-300151517,-631415889,-1193921967,-1821784279],Properties:{textures:[{Value:\"e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDdjYzY2ODc0MjNkMDU3MGQ1NTZhYzUzZTA2NzZjYjU2M2JiZGQ5NzE3Y2Q4MjY5YmRlYmVkNmY2ZDRlN2JmOCJ9fX0=\"}]}}}"), "", "/hub"); + public QuickNavItem button7 = new QuickNavItem(true, new ItemData("player_head", 1, "tag:{SkullOwner:{Id:[I;-300151517,-631415889,-1193921967,-1821784279],Properties:{textures:[{Value:\"e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDdjYzY2ODc0MjNkMDU3MGQ1NTZhYzUzZTA2NzZjYjU2M2JiZGQ5NzE3Y2Q4MjY5YmRlYmVkNmY2ZDRlN2JmOCJ9fX0=\"}]}}}"), "none", "/hub"); @ConfigEntry.Category("button8") @ConfigEntry.Gui.CollapsibleObject(startExpanded = false) - public QuickNavItem button8 = new QuickNavItem(true, new ItemData("player_head", 1, "tag:{SkullOwner:{Id:[I;1605800870,415127827,-1236127084,15358548],Properties:{textures:[{Value:\"e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNzg5MWQ1YjI3M2ZmMGJjNTBjOTYwYjJjZDg2ZWVmMWM0MGExYjk0MDMyYWU3MWU3NTQ3NWE1NjhhODI1NzQyMSJ9fX0=\"}]}}}"), "", "/warp dungeon"); + public QuickNavItem button8 = new QuickNavItem(true, new ItemData("player_head", 1, "tag:{SkullOwner:{Id:[I;1605800870,415127827,-1236127084,15358548],Properties:{textures:[{Value:\"e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNzg5MWQ1YjI3M2ZmMGJjNTBjOTYwYjJjZDg2ZWVmMWM0MGExYjk0MDMyYWU3MWU3NTQ3NWE1NjhhODI1NzQyMSJ9fX0=\"}]}}}"), "none", "/warp dungeon"); @ConfigEntry.Category("button9") @ConfigEntry.Gui.CollapsibleObject(startExpanded = false) @@ -75,7 +75,7 @@ public class SkyblockerConfig implements ConfigData { @ConfigEntry.Category("button10") @ConfigEntry.Gui.CollapsibleObject(startExpanded = false) - public QuickNavItem button10 = new QuickNavItem(true, new ItemData("enchanting_table"), "Enchant", "/enchant"); + public QuickNavItem button10 = new QuickNavItem(true, new ItemData("enchanting_table"), "Enchant", "/etable"); @ConfigEntry.Category("button11") @ConfigEntry.Gui.CollapsibleObject(startExpanded = false) -- cgit From b5a0cb1f6ee4c27eba93f58e3aaf8f0f4d3d780d Mon Sep 17 00:00:00 2001 From: catandA <3047354896@qq.com> Date: Wed, 8 Feb 2023 00:46:42 +0800 Subject: Add Chinese translation --- .../resources/assets/skyblocker/lang/zh_cn.json | 85 ++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 src/main/resources/assets/skyblocker/lang/zh_cn.json (limited to 'src/main') diff --git a/src/main/resources/assets/skyblocker/lang/zh_cn.json b/src/main/resources/assets/skyblocker/lang/zh_cn.json new file mode 100644 index 00000000..86475c3e --- /dev/null +++ b/src/main/resources/assets/skyblocker/lang/zh_cn.json @@ -0,0 +1,85 @@ +{ + "key.categories.skyblocker": "Skyblocker", + "key.hotbarSlotLock": "锁定快捷栏", + "key.wikiLookup": "查阅Wiki", + + "text.autoconfig.skyblocker.title": "Skyblocker设置", + + "text.autoconfig.skyblocker.category.general": "通用", + "text.autoconfig.skyblocker.option.general.bars": "生命,法力,防御以及经验条", + "text.autoconfig.skyblocker.option.general.bars.enableBars": "启用属性条", + "text.autoconfig.skyblocker.option.general.bars.barpositions": "配置属性条位置", + "text.autoconfig.skyblocker.option.general.bars.barpositions.healthBarPosition": "生命条位置", + "text.autoconfig.skyblocker.option.general.bars.barpositions.manaBarPosition": "法力条位置", + "text.autoconfig.skyblocker.option.general.bars.barpositions.defenceBarPosition": "防御条位置", + "text.autoconfig.skyblocker.option.general.bars.barpositions.experienceBarPosition": "经验条位置", + "text.autoconfig.skyblocker.option.general.quicknav": "快速导航", + "text.autoconfig.skyblocker.option.general.quicknav.enableQuicknav": "启用快速导航", + "text.autoconfig.skyblocker.option.general.backpackPreviewWithoutShift": "查看背包预览无需按住shift键", + "text.autoconfig.skyblocker.option.general.itemTooltip": "物品提示信息", + "text.autoconfig.skyblocker.option.general.itemTooltip.enableNPCPrice": "显示NPC价格", + "text.autoconfig.skyblocker.option.general.itemTooltip.enableAvgBIN": "显示平均BIN(立即购买)价格", + "text.autoconfig.skyblocker.option.general.itemTooltip.avg": "平均类型", + "text.autoconfig.skyblocker.option.general.itemTooltip.avg.@Tooltip": "你可以选择查看多少天的平均价格", + "text.autoconfig.skyblocker.option.general.itemTooltip.enableLowestBIN": "显示最低BIN(立即购买)价格", + "text.autoconfig.skyblocker.option.general.itemTooltip.enableBazaarPrice": "显示集市购买/卖出价格", + "text.autoconfig.skyblocker.option.general.itemTooltip.enableMuseumDate": "显示博物馆与日期信息", + "text.autoconfig.skyblocker.option.general.hitbox": "碰撞箱", + "text.autoconfig.skyblocker.option.general.hitbox.oldFarmlandHitbox": "启用1.8的农田碰撞箱", + "text.autoconfig.skyblocker.option.general.hitbox.oldLeverHitbox": "启用1.8的拉杆碰撞箱", + "skyblocker.itemTooltip.nullMessage": "§b[§6Skyblocker§b] §c物品提示里的价格信息会在最多60秒内更新。如果没有,请检查latest.log", + "skyblocker.itemTooltip.noData": "§c没有数据", + + "text.autoconfig.skyblocker.category.richPresence": "Discord活动状态", + "text.autoconfig.skyblocker.option.richPresence.info": "Skyblock信息", + "text.autoconfig.skyblocker.option.richPresence.info.@Tooltip": "如果您正在循环模式,这个值将不会生效", + "text.autoconfig.skyblocker.option.richPresence.cycleMode": "循环Skyblock信息", + "text.autoconfig.skyblocker.option.richPresence.enableRichPresence": "已启用", + "text.autoconfig.skyblocker.option.richPresence.customMessage": "自定义消息", + + "text.autoconfig.skyblocker.option.general.itemList": "物品列表", + "text.autoconfig.skyblocker.option.general.itemList.enableItemList": "启用物品列表", + + "text.autoconfig.skyblocker.category.locations": "位置", + "text.autoconfig.skyblocker.option.locations.dungeons": "地牢", + "text.autoconfig.skyblocker.option.locations.dungeons.croesusHelper": "Croesus助手", + "text.autoconfig.skyblocker.option.locations.dungeons.croesusHelper.@Tooltip": "用灰色显示出已经打开过的箱子", + "text.autoconfig.skyblocker.option.locations.dungeons.enableMap": "启用地图", + "text.autoconfig.skyblocker.option.locations.dungeons.solveThreeWeirdos": "解决三怪人迷题", + "text.autoconfig.skyblocker.option.locations.dungeons.blazesolver": "解决烈焰人迷题", + "text.autoconfig.skyblocker.option.locations.dungeons.solveTrivia": "解决常识迷题", + "text.autoconfig.skyblocker.option.locations.dungeons.terminals": "终端助手", + "text.autoconfig.skyblocker.option.locations.dungeons.terminals.solveColor": "解决颜色迷题", + "text.autoconfig.skyblocker.option.locations.dungeons.terminals.solveOrder": "解决排序迷题", + "text.autoconfig.skyblocker.option.locations.dungeons.terminals.solveStartsWith": "解决开头字母迷题", + "text.autoconfig.skyblocker.option.locations.dwarvenMines": "矮人矿道", + "text.autoconfig.skyblocker.option.locations.dwarvenMines.enableDrillFuel": "显示钻头燃料", + "text.autoconfig.skyblocker.option.locations.dwarvenMines.solveFetchur": "解决Fetchur的迷题", + "text.autoconfig.skyblocker.option.locations.dwarvenMines.solvePuzzler": "解决Puzzler的迷题", + "text.autoconfig.skyblocker.option.locations.dwarvenMines.dwarvenHud": "矮人HUD", + "text.autoconfig.skyblocker.option.locations.dwarvenMines.dwarvenHud.enabled": "已启用", + "text.autoconfig.skyblocker.option.locations.dwarvenMines.dwarvenHud.enableBackground": "启用背景", + "text.autoconfig.skyblocker.option.locations.dwarvenMines.dwarvenHud.x": "X", + "text.autoconfig.skyblocker.option.locations.dwarvenMines.dwarvenHud.y": "Y", + + "text.autoconfig.skyblocker.category.messages": "消息", + "text.autoconfig.skyblocker.option.messages.hideAbility": "隐藏技能冷却", + "text.autoconfig.skyblocker.option.messages.hideHeal": "隐藏治疗消息", + "text.autoconfig.skyblocker.option.messages.hideAOTE": "隐藏AOTE消息", + "text.autoconfig.skyblocker.option.messages.hideImplosion": "隐藏内爆技能消息", + "text.autoconfig.skyblocker.option.messages.hideMoltenWave": "隐藏熔融波技能消息", + "text.autoconfig.skyblocker.option.messages.hideAds": "从公屏聊天中隐藏广告", + "text.autoconfig.skyblocker.option.messages.hideTeleportPad": "隐藏传送点消息", + "text.autoconfig.skyblocker.option.messages.hideCombo": "隐藏连杀消息", + "text.autoconfig.skyblocker.option.messages.hideAutopet": "隐藏自动宠物消息", + "text.autoconfig.skyblocker.option.messages.hideMana": "在动作栏中隐藏魔力消耗信息", + "text.autoconfig.skyblocker.option.messages.hideMana.@Tooltip": "被已经提供了更好方案的属性条代替", + + "skyblocker.update.update_message": "§b[§6Skyblocker§b] §2有新版本可用!", + "skyblocker.update.update_link": " §2§n点击这里§r", + "skyblocker.update.update_message_end" : " §a来了解最新功能", + "skyblocker.update.hover_text": "打开Modrinth", + "text.autoconfig.skyblocker.option.general.enableUpdateNotification": "更新通知", + + "skyblocker.api.got_key": "§b[§6Skyblocker§b] §2自动设置你的API秘钥!" +} \ No newline at end of file -- cgit From 17892d619f700a4f1e37e9ff1946796a5849b87b Mon Sep 17 00:00:00 2001 From: catandA <3047354896@qq.com> Date: Wed, 8 Feb 2023 01:00:19 +0800 Subject: Update zh_cn.json --- src/main/resources/assets/skyblocker/lang/zh_cn.json | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/resources/assets/skyblocker/lang/zh_cn.json b/src/main/resources/assets/skyblocker/lang/zh_cn.json index 86475c3e..59ec1bf2 100644 --- a/src/main/resources/assets/skyblocker/lang/zh_cn.json +++ b/src/main/resources/assets/skyblocker/lang/zh_cn.json @@ -37,6 +37,21 @@ "text.autoconfig.skyblocker.option.richPresence.enableRichPresence": "已启用", "text.autoconfig.skyblocker.option.richPresence.customMessage": "自定义消息", + "text.autoconfig.skyblocker.category.quickNav" : "快速导航", + "text.autoconfig.skyblocker.option.quickNav.enableQuickNav" : "启用快速导航", + "text.autoconfig.skyblocker.option.quickNav.button1" : "按钮1", + "text.autoconfig.skyblocker.option.quickNav.button2" : "按钮2", + "text.autoconfig.skyblocker.option.quickNav.button3" : "按钮3", + "text.autoconfig.skyblocker.option.quickNav.button4" : "按钮4", + "text.autoconfig.skyblocker.option.quickNav.button5" : "按钮5", + "text.autoconfig.skyblocker.option.quickNav.button6" : "按钮6", + "text.autoconfig.skyblocker.option.quickNav.button7" : "按钮7", + "text.autoconfig.skyblocker.option.quickNav.button8" : "按钮8", + "text.autoconfig.skyblocker.option.quickNav.button9" : "按钮9", + "text.autoconfig.skyblocker.option.quickNav.button10" : "按钮10", + "text.autoconfig.skyblocker.option.quickNav.button11" : "按钮11", + "text.autoconfig.skyblocker.option.quickNav.button12" : "按钮12", + "text.autoconfig.skyblocker.option.general.itemList": "物品列表", "text.autoconfig.skyblocker.option.general.itemList.enableItemList": "启用物品列表", @@ -82,4 +97,4 @@ "text.autoconfig.skyblocker.option.general.enableUpdateNotification": "更新通知", "skyblocker.api.got_key": "§b[§6Skyblocker§b] §2自动设置你的API秘钥!" -} \ No newline at end of file +} -- cgit From 6b0877224d9913cffe0de2227fa968f5b6c16f72 Mon Sep 17 00:00:00 2001 From: Kevinthegreat <92656833+kevinthegreat1@users.noreply.github.com> Date: Wed, 8 Feb 2023 21:18:03 -0500 Subject: Fixes crash with WikiLookup --- src/main/java/me/xmrvizzy/skyblocker/skyblock/item/WikiLookup.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/main') diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/item/WikiLookup.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/item/WikiLookup.java index ef2c3f8a..1e3e6af7 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/item/WikiLookup.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/item/WikiLookup.java @@ -47,8 +47,8 @@ public class WikiLookup { return id; } - public static void openWiki(Slot slot){ - if (Utils.isOnSkyblock){ + public static void openWiki(Slot slot) { + if (Utils.isOnSkyblock) { id = getSkyblockId(slot); try { //Setting up a connection with the repo @@ -65,6 +65,9 @@ public class WikiLookup { } catch (IOException | NullPointerException e) { e.printStackTrace(); client.player.sendMessage(Text.of("Can't locate a wiki article for this item..."), false); + } catch (ArrayIndexOutOfBoundsException | IllegalStateException e) { + e.printStackTrace(); + client.player.sendMessage(Text.of("Error while retrieving wiki article..."), false); } } } -- cgit From edf78d0f5c80556aea2a97d46f2da8cc38596358 Mon Sep 17 00:00:00 2001 From: Kevinthegreat <92656833+kevinthegreat1@users.noreply.github.com> Date: Sun, 12 Feb 2023 20:27:49 -0500 Subject: Fixed IndexOutOfBoundsException in WikiLookup --- src/main/java/me/xmrvizzy/skyblocker/skyblock/item/WikiLookup.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/item/WikiLookup.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/item/WikiLookup.java index 1e3e6af7..afaf487f 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/item/WikiLookup.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/item/WikiLookup.java @@ -65,7 +65,7 @@ public class WikiLookup { } catch (IOException | NullPointerException e) { e.printStackTrace(); client.player.sendMessage(Text.of("Can't locate a wiki article for this item..."), false); - } catch (ArrayIndexOutOfBoundsException | IllegalStateException e) { + } catch (IndexOutOfBoundsException | IllegalStateException e) { e.printStackTrace(); client.player.sendMessage(Text.of("Error while retrieving wiki article..."), false); } -- cgit From 72527ed6ae5f014a93691fdaebc13a7608824fc0 Mon Sep 17 00:00:00 2001 From: Julienraptor01 Date: Sun, 19 Feb 2023 19:22:24 +0100 Subject: fix LBIN --- .../xmrvizzy/skyblocker/skyblock/item/PriceInfoTooltip.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/main') diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/item/PriceInfoTooltip.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/item/PriceInfoTooltip.java index 9c681cb1..dfc498a1 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/item/PriceInfoTooltip.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/item/PriceInfoTooltip.java @@ -353,11 +353,18 @@ public class PriceInfoTooltip { private static void downloadLowestPrices() { JsonObject result = null; try { - URL apiAddr = new URL("https://skytils.gg/api/auctions/lowestbins"); + URL apiAddr = new URL("https://lb.tricked.pro/lowestbins"); InputStreamReader reader = new InputStreamReader(apiAddr.openStream()); result = new Gson().fromJson(reader, JsonObject.class); } catch (IOException e) { - LOGGER.warn("[Skyblocker] Failed to download lowest BIN prices!", e); + LOGGER.warn("[Skyblocker] Failed to download lowest BIN prices from the main source!", e); + try { + URL apiAddr = new URL("https://lb2.tricked.pro/lowestbins"); + InputStreamReader reader = new InputStreamReader(apiAddr.openStream()); + result = new Gson().fromJson(reader, JsonObject.class); + } catch (IOException e2) { + LOGGER.warn("[Skyblocker] Failed to download lowest BIN prices from the backup source!", e2); + } } lowestPricesJson = result; } -- cgit