From 3de616fcaca8e39a4d1caef6fdd4f984adb7e000 Mon Sep 17 00:00:00 2001 From: Rime <81419447+Emirlol@users.noreply.github.com> Date: Fri, 21 Jun 2024 09:12:11 +0300 Subject: Change slot text to have multiple states The enum SlotTextState is very self-descriptive if you wonder what the states are --- .../skyblocker/config/categories/GeneralCategory.java | 16 ++++++++++++++-- .../hysky/skyblocker/config/configs/GeneralConfig.java | 6 +++++- 2 files changed, 19 insertions(+), 3 deletions(-) (limited to 'src/main/java/de/hysky/skyblocker/config') diff --git a/src/main/java/de/hysky/skyblocker/config/categories/GeneralCategory.java b/src/main/java/de/hysky/skyblocker/config/categories/GeneralCategory.java index ab674b18..abfb7c16 100644 --- a/src/main/java/de/hysky/skyblocker/config/categories/GeneralCategory.java +++ b/src/main/java/de/hysky/skyblocker/config/categories/GeneralCategory.java @@ -5,10 +5,12 @@ import de.hysky.skyblocker.config.ConfigUtils; import de.hysky.skyblocker.config.SkyblockerConfig; import de.hysky.skyblocker.config.configs.GeneralConfig; import de.hysky.skyblocker.skyblock.item.tooltip.adders.CraftPriceTooltip; +import de.hysky.skyblocker.skyblock.item.slottext.SlotTextState; import de.hysky.skyblocker.skyblock.shortcut.ShortcutsConfigScreen; import dev.isxander.yacl3.api.*; import dev.isxander.yacl3.api.controller.FloatSliderControllerBuilder; import net.minecraft.client.MinecraftClient; +import net.minecraft.client.gui.screen.option.KeybindsScreen; import net.minecraft.text.Text; import net.minecraft.util.Formatting; @@ -234,13 +236,18 @@ public class GeneralCategory { .group(OptionGroup.createBuilder() .name(Text.translatable("skyblocker.config.general.itemInfoDisplay")) .collapsed(true) - .option(Option.createBuilder() + .option(Option.createBuilder() .name(Text.translatable("skyblocker.config.general.itemInfoDisplay.slotText")) .description(OptionDescription.of(Text.translatable("skyblocker.config.general.itemInfoDisplay.slotText.@Tooltip"))) .binding(defaults.general.itemInfoDisplay.slotText, () -> config.general.itemInfoDisplay.slotText, newValue -> config.general.itemInfoDisplay.slotText = newValue) - .controller(ConfigUtils::createBooleanController) + .controller(ConfigUtils::createEnumCyclingListController) + .build()) + .option(ButtonOption.createBuilder() + .name(Text.translatable("skyblocker.config.general.itemInfoDisplay.slotText.shortcutToKeybindsSettings")) + .action((screen, opt) -> MinecraftClient.getInstance().setScreen(new KeybindsScreen(screen, MinecraftClient.getInstance().options))) + .text(Text.translatable("skyblocker.config.general.itemInfoDisplay.slotText.shortcutToKeybindsSettings.@Text")) .build()) .option(Option.createBuilder() .name(Text.translatable("skyblocker.config.general.itemInfoDisplay.attributeShardInfo")) @@ -301,6 +308,11 @@ public class GeneralCategory { newValue -> config.general.wikiLookup.enableWikiLookup = newValue) .controller(ConfigUtils::createBooleanController) .build()) + .option(ButtonOption.createBuilder() + .name(Text.translatable("skyblocker.config.shortcutToKeybindsSettings")) + .action((screen, opt) -> MinecraftClient.getInstance().setScreen(new KeybindsScreen(screen, MinecraftClient.getInstance().options))) + .text(Text.translatable("skyblocker.config.shortcutToKeybindsSettings.@Text")) + .build()) .option(Option.createBuilder() .name(Text.translatable("skyblocker.config.general.wikiLookup.officialWiki")) .description(OptionDescription.of(Text.translatable("skyblocker.config.general.wikiLookup.officialWiki.@Tooltip"))) diff --git a/src/main/java/de/hysky/skyblocker/config/configs/GeneralConfig.java b/src/main/java/de/hysky/skyblocker/config/configs/GeneralConfig.java index 691e6f79..7ea1616e 100644 --- a/src/main/java/de/hysky/skyblocker/config/configs/GeneralConfig.java +++ b/src/main/java/de/hysky/skyblocker/config/configs/GeneralConfig.java @@ -3,6 +3,7 @@ package de.hysky.skyblocker.config.configs; import de.hysky.skyblocker.SkyblockerMod; import de.hysky.skyblocker.skyblock.item.CustomArmorAnimatedDyes; import de.hysky.skyblocker.skyblock.item.CustomArmorTrims; +import de.hysky.skyblocker.skyblock.item.slottext.SlotTextState; import dev.isxander.yacl3.config.v2.api.SerialEntry; import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; @@ -164,7 +165,10 @@ public class GeneralConfig { public static class ItemInfoDisplay { @SerialEntry - public boolean slotText = true; + public SlotTextState slotText = SlotTextState.ENABLED; + + @SerialEntry + public boolean slotTextToggled = true; @SerialEntry public boolean attributeShardInfo = true; -- cgit From c6c3f30fcbacb018a6aaa8aab89395e987ca99ab Mon Sep 17 00:00:00 2001 From: Kevinthegreat <92656833+kevinthegreat1@users.noreply.github.com> Date: Mon, 22 Jul 2024 16:28:26 +0800 Subject: Add slot text config data fixer --- .../skyblocker/config/SkyblockerConfigManager.java | 2 +- .../config/datafixer/ConfigDataFixer.java | 2 + .../config/datafixer/ConfigFix3SlotText.java | 25 + .../config/datafixer/ConfigDataFixerTest.java | 12 +- .../assets/skyblocker/config/skyblocker-v3.1.json | 606 +++++++++++++++++++++ .../assets/skyblocker/config/skyblocker-v4.json | 606 +++++++++++++++++++++ 6 files changed, 1251 insertions(+), 2 deletions(-) create mode 100644 src/main/java/de/hysky/skyblocker/config/datafixer/ConfigFix3SlotText.java create mode 100644 src/test/resources/assets/skyblocker/config/skyblocker-v3.1.json create mode 100644 src/test/resources/assets/skyblocker/config/skyblocker-v4.json (limited to 'src/main/java/de/hysky/skyblocker/config') diff --git a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfigManager.java b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfigManager.java index f519473c..4af606ec 100644 --- a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfigManager.java +++ b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfigManager.java @@ -26,7 +26,7 @@ import java.lang.StackWalker.Option; import java.nio.file.Path; public class SkyblockerConfigManager { - public static final int CONFIG_VERSION = 3; + public static final int CONFIG_VERSION = 4; private static final Path CONFIG_FILE = FabricLoader.getInstance().getConfigDir().resolve("skyblocker.json"); private static final ConfigClassHandler HANDLER = ConfigClassHandler.createBuilder(SkyblockerConfig.class) .serializer(config -> GsonConfigSerializerBuilder.create(config) diff --git a/src/main/java/de/hysky/skyblocker/config/datafixer/ConfigDataFixer.java b/src/main/java/de/hysky/skyblocker/config/datafixer/ConfigDataFixer.java index b887d415..f1ab23df 100644 --- a/src/main/java/de/hysky/skyblocker/config/datafixer/ConfigDataFixer.java +++ b/src/main/java/de/hysky/skyblocker/config/datafixer/ConfigDataFixer.java @@ -68,6 +68,8 @@ public class ConfigDataFixer { builder.addFixer(new ConfigFix1(schema2, true)); Schema schema3 = builder.addSchema(3, Schema::new); builder.addFixer(new ConfigFix2QuickNav(schema3, true)); + Schema schema4 = builder.addSchema(4, Schema::new); + builder.addFixer(new ConfigFix3SlotText(schema4, true)); return builder.build().fixer(); } diff --git a/src/main/java/de/hysky/skyblocker/config/datafixer/ConfigFix3SlotText.java b/src/main/java/de/hysky/skyblocker/config/datafixer/ConfigFix3SlotText.java new file mode 100644 index 00000000..1518fe92 --- /dev/null +++ b/src/main/java/de/hysky/skyblocker/config/datafixer/ConfigFix3SlotText.java @@ -0,0 +1,25 @@ +package de.hysky.skyblocker.config.datafixer; + +import com.mojang.datafixers.DSL; +import com.mojang.datafixers.TypeRewriteRule; +import com.mojang.datafixers.schemas.Schema; +import com.mojang.serialization.Dynamic; + +public class ConfigFix3SlotText extends ConfigDataFix { + public ConfigFix3SlotText(Schema outputSchema, boolean changesType) { + super(outputSchema, changesType); + } + + @Override + protected TypeRewriteRule makeRule() { + return fixTypeEverywhereTyped( + "ConfigFix3SlotText", + getInputSchema().getType(ConfigDataFixer.CONFIG_TYPE), + typed -> typed.update(DSL.remainderFinder(), this::fix) + ); + } + + private Dynamic fix(Dynamic dynamic) { + return fixVersion(dynamic).update("general", general -> general.update("itemInfoDisplay", itemInfoDisplay -> itemInfoDisplay.update("slotText", slotText -> slotText.createString(slotText.asBoolean(true) ? "ENABLED" : "DISABLED")))); + } +} diff --git a/src/test/java/de/hysky/skyblocker/config/datafixer/ConfigDataFixerTest.java b/src/test/java/de/hysky/skyblocker/config/datafixer/ConfigDataFixerTest.java index fcdbc314..7e73b9e9 100644 --- a/src/test/java/de/hysky/skyblocker/config/datafixer/ConfigDataFixerTest.java +++ b/src/test/java/de/hysky/skyblocker/config/datafixer/ConfigDataFixerTest.java @@ -37,6 +37,16 @@ public class ConfigDataFixerTest { @SuppressWarnings("DataFlowIssue") JsonObject expectedNewConfig = GSON.fromJson(new InputStreamReader(ConfigDataFixerTest.class.getResourceAsStream("/assets/skyblocker/config/skyblocker-v3.json")), JsonObject.class); - Assertions.assertEquals(expectedNewConfig, ConfigDataFixer.apply(oldConfig)); + Assertions.assertEquals(expectedNewConfig, ConfigDataFixer.apply(oldConfig, 3)); + } + + @Test + void testDataFixer3SlotText() { + @SuppressWarnings("DataFlowIssue") + JsonObject oldConfig = GSON.fromJson(new InputStreamReader(ConfigDataFixerTest.class.getResourceAsStream("/assets/skyblocker/config/skyblocker-v3.1.json")), JsonObject.class); + @SuppressWarnings("DataFlowIssue") + JsonObject expectedNewConfig = GSON.fromJson(new InputStreamReader(ConfigDataFixerTest.class.getResourceAsStream("/assets/skyblocker/config/skyblocker-v4.json")), JsonObject.class); + + Assertions.assertEquals(expectedNewConfig, ConfigDataFixer.apply(oldConfig, 4)); } } diff --git a/src/test/resources/assets/skyblocker/config/skyblocker-v3.1.json b/src/test/resources/assets/skyblocker/config/skyblocker-v3.1.json new file mode 100644 index 00000000..5c4e1348 --- /dev/null +++ b/src/test/resources/assets/skyblocker/config/skyblocker-v3.1.json @@ -0,0 +1,606 @@ +{ + "version": 3, + "general": { + "enableTips": true, + "acceptReparty": true, + "shortcuts": { + "enableShortcuts": true, + "enableCommandShortcuts": true, + "enableCommandArgShortcuts": true + }, + "quiverWarning": { + "enableQuiverWarning": true, + "enableQuiverWarningInDungeons": true, + "enableQuiverWarningAfterDungeon": true + }, + "itemList": { + "enableItemList": true + }, + "itemTooltip": { + "enableNPCPrice": true, + "enableMotesPrice": true, + "enableAvgBIN": true, + "avg": "THREE_DAY", + "enableLowestBIN": true, + "enableBazaarPrice": true, + "enableObtainedDate": true, + "enableMuseumInfo": true, + "enableExoticTooltip": true, + "enableAccessoriesHelper": true, + "dungeonQuality": true + }, + "itemInfoDisplay": { + "slotText": true, + "attributeShardInfo": true, + "itemRarityBackgrounds": false, + "itemRarityBackgroundStyle": "CIRCULAR", + "itemRarityBackgroundsOpacity": 1.0 + }, + "itemProtection": { + "slotLockStyle": "FANCY" + }, + "wikiLookup": { + "enableWikiLookup": true, + "officialWiki": true + }, + "specialEffects": { + "rareDungeonDropEffects": true + }, + "hitbox": { + "oldFarmlandHitbox": false, + "oldLeverHitbox": false + }, + "lockedSlots": [], + "protectedItems": [], + "customItemNames": {}, + "customDyeColors": {}, + "customArmorTrims": {}, + "customAnimatedDyes": {} + }, + "uiAndVisuals": { + "compactorDeletorPreview": true, + "dontStripSkinAlphaValues": true, + "backpackPreviewWithoutShift": false, + "hideEmptyTooltips": true, + "fancyCraftingTable": true, + "hideStatusEffectOverlay": false, + "chestValue": { + "enableChestValue": true, + "color": "DARK_GREEN", + "incompleteColor": "BLUE" + }, + "itemCooldown": { + "enableItemCooldowns": true + }, + "titleContainer": { + "titleContainerScale": 100.0, + "x": 540, + "y": 10, + "direction": "HORIZONTAL", + "alignment": "MIDDLE" + }, + "tabHud": { + "tabHudEnabled": true, + "tabHudScale": 100, + "enableHudBackground": true, + "plainPlayerNames": false, + "nameSorting": "DEFAULT" + }, + "fancyAuctionHouse": { + "enabled": false, + "highlightCheapBIN": true + }, + "bars": { + "enableBars": true, + "barPositions": { + "healthBarPosition": "LAYER1", + "manaBarPosition": "LAYER1", + "defenceBarPosition": "LAYER1", + "experienceBarPosition": "LAYER1" + } + }, + "waypoints": { + "enableWaypoints": true, + "waypointType": "WAYPOINT" + }, + "teleportOverlay": { + "enableTeleportOverlays": true, + "enableWeirdTransmission": true, + "enableInstantTransmission": true, + "enableEtherTransmission": true, + "enableSinrecallTransmission": true, + "enableWitherImpact": true + }, + "searchOverlay": { + "enableBazaar": true, + "enableAuctionHouse": true, + "keepPreviousSearches": false, + "maxSuggestions": 3, + "historyLength": 3, + "enableCommands": false, + "bazaarHistory": [ + "ab", + "Mystical Mushroom Soup", + "Enchanted Cocoa Beans" + ], + "auctionHistory": [ + "Rich Chocolate Chunk", + "Smooth Chocolate Bar", + "Juju Shortbow" + ] + }, + "inputCalculator": { + "enabled": true, + "requiresEquals": false + }, + "flameOverlay": { + "flameHeight": 100, + "flameOpacity": 100 + }, + "compactDamage": { + "enabled": true, + "precision": 1, + "normalDamageColor": -1, + "critDamageGradientStart": -171, + "critDamageGradientEnd": -43691 + } + }, + "helpers": { + "enableNewYearCakesHelper": true, + "mythologicalRitual": { + "enableMythologicalRitualHelper": true + }, + "experiments": { + "enableChronomatronSolver": true, + "enableSuperpairsSolver": true, + "enableUltrasequencerSolver": true + }, + "fishing": { + "enableFishingHelper": true, + "enableFishingTimer": false, + "changeTimerColor": true, + "fishingTimerScale": 1.0, + "hideOtherPlayersRods": false + }, + "fairySouls": { + "enableFairySoulsHelper": false, + "highlightFoundSouls": true, + "highlightOnlyNearbySouls": false + }, + "chocolateFactory": { + "enableChocolateFactoryHelper": true, + "enableEggFinder": true, + "sendEggFoundMessages": true, + "waypointType": "WAYPOINT", + "enableTimeTowerReminder": true + } + }, + "dungeons": { + "fancyPartyFinder": true, + "croesusHelper": true, + "playerSecretsTracker": false, + "starredMobGlow": false, + "starredMobBoundingBoxes": true, + "allowDroppingProtectedItems": false, + "hideSoulweaverSkulls": false, + "dungeonMap": { + "enableMap": true, + "mapScaling": 1.0, + "mapX": 2, + "mapY": 2 + }, + "puzzleSolvers": { + "solveTicTacToe": true, + "solveThreeWeirdos": true, + "creeperSolver": true, + "solveWaterboard": true, + "blazeSolver": true, + "solveBoulder": true, + "solveIceFill": true, + "solveSilverfish": true, + "solveTrivia": true + }, + "theProfessor": { + "fireFreezeStaffTimer": true, + "floor3GuardianHealthDisplay": true + }, + "livid": { + "enableLividColorGlow": true, + "enableLividColorText": true, + "enableLividColorTitle": true, + "lividColorText": "The livid color is [color]" + }, + "terminals": { + "solveColor": true, + "solveOrder": true, + "solveStartsWith": true, + "blockIncorrectClicks": false + }, + "secretWaypoints": { + "enableRoomMatching": true, + "enableSecretWaypoints": true, + "waypointType": "WAYPOINT", + "showSecretText": true, + "enableEntranceWaypoints": true, + "enableSuperboomWaypoints": true, + "enableChestWaypoints": true, + "enableItemWaypoints": true, + "enableBatWaypoints": true, + "enableWitherWaypoints": true, + "enableLeverWaypoints": true, + "enableFairySoulWaypoints": true, + "enableStonkWaypoints": true, + "enableAotvWaypoints": true, + "enablePearlWaypoints": true, + "enableDefaultWaypoints": true + }, + "mimicMessage": { + "sendMimicMessage": true, + "mimicMessage": "Mimic dead!" + }, + "doorHighlight": { + "enableDoorHighlight": true, + "doorHighlightType": "OUTLINED_HIGHLIGHT" + }, + "dungeonScore": { + "enableDungeonScore270Message": false, + "enableDungeonScore270Title": false, + "enableDungeonScore270Sound": false, + "dungeonScore270Message": "270 Score Reached!", + "enableDungeonScore300Message": true, + "enableDungeonScore300Title": true, + "enableDungeonScore300Sound": true, + "dungeonScore300Message": "300 Score Reached!", + "enableDungeonCryptsMessage": true, + "dungeonCryptsMessageThreshold": 250, + "dungeonCryptsMessage": "We only have [crypts] crypts out of 5, we need more!", + "enableScoreHUD": true, + "scoreX": 29, + "scoreY": 134, + "scoreScaling": 1.0 + }, + "dungeonChestProfit": { + "enableProfitCalculator": true, + "includeKismet": false, + "includeEssence": true, + "croesusProfit": true, + "neutralThreshold": 1000, + "neutralColor": "DARK_GRAY", + "profitColor": "DARK_GREEN", + "lossColor": "RED", + "incompleteColor": "BLUE" + } + }, + "foraging": { + "hunting": {} + }, + "crimsonIsle": { + "kuudra": { + "supplyWaypoints": true, + "fuelWaypoints": true, + "suppliesAndFuelWaypointType": "WAYPOINT", + "ballistaBuildWaypoints": true, + "safeSpotWaypoints": true, + "pearlWaypoints": true, + "noArrowPoisonWarning": true, + "arrowPoisonThreshold": 32 + } + }, + "mining": { + "enableDrillFuel": true, + "dwarvenMines": { + "solveFetchur": true, + "solvePuzzler": true + }, + "dwarvenHud": { + "enabledCommissions": true, + "enabledPowder": true, + "style": "SIMPLE", + "commissionsX": 842, + "commissionsY": 0, + "powderX": 872, + "powderY": 59 + }, + "crystalHollows": { + "metalDetectorHelper": true + }, + "crystalsHud": { + "enabled": true, + "showLocations": true, + "locationSize": 8, + "x": 9, + "y": 181, + "mapScaling": 1.0 + }, + "crystalsWaypoints": { + "enabled": true, + "findInChat": true + }, + "commissionWaypoints": { + "mode": "BOTH", + "useColor": true, + "textScale": 1.0, + "showBaseCamp": false, + "showEmissary": true + }, + "glacite": { + "coldOverlay": true + } + }, + "farming": { + "garden": { + "farmingHud": { + "enableHud": true, + "x": 0, + "y": 0 + }, + "dicerTitlePrevent": true, + "visitorHelper": true, + "lockMouseTool": false, + "lockMouseGroundOnly": false + } + }, + "otherLocations": { + "barn": { + "solveHungryHiker": true, + "solveTreasureHunter": true + }, + "rift": { + "mirrorverseWaypoints": true, + "blobbercystGlow": true, + "enigmaSoulWaypoints": false, + "highlightFoundEnigmaSouls": true, + "mcGrubberStacks": 0 + }, + "end": { + "enableEnderNodeHelper": true, + "hudEnabled": true, + "zealotKillsEnabled": true, + "protectorLocationEnabled": true, + "waypoint": true, + "x": 10, + "y": 10 + }, + "spidersDen": { + "relics": { + "enableRelicsHelper": false, + "highlightFoundRelics": true + } + } + }, + "slayers": { + "endermanSlayer": { + "enableYangGlyphsNotification": true, + "highlightBeacons": true, + "highlightNukekubiHeads": true + }, + "vampireSlayer": { + "enableEffigyWaypoints": true, + "compactEffigyWaypoints": false, + "effigyUpdateFrequency": 5, + "enableHolyIceIndicator": true, + "holyIceIndicatorTickDelay": 10, + "holyIceUpdateFrequency": 5, + "enableHealingMelonIndicator": true, + "healingMelonHealthThreshold": 4.0, + "enableSteakStakeIndicator": true, + "steakStakeUpdateFrequency": 5, + "enableManiaIndicator": true, + "maniaUpdateFrequency": 5 + } + }, + "chat": { + "hideAbility": "PASS", + "hideHeal": "PASS", + "hideAOTE": "PASS", + "hideImplosion": "PASS", + "hideMoltenWave": "PASS", + "hideAds": "PASS", + "hideTeleportPad": "PASS", + "hideCombo": "PASS", + "hideAutopet": "PASS", + "hideShowOff": "PASS", + "hideToggleSkyMall": "PASS", + "hideMimicKill": "PASS", + "hideDeath": "PASS", + "hideMana": false, + "hideDicer": "PASS", + "chatRuleConfig": { + "announcementLength": 60, + "announcementScale": 3 + } + }, + "quickNav": { + "enableQuickNav": true, + "button1": { + "render": true, + "itemData": { + "item": "minecraft:diamond_sword", + "count": 1, + "components": "[]" + }, + "uiTitle": "Your Skills", + "clickEvent": "/skills" + }, + "button2": { + "render": true, + "itemData": { + "item": "minecraft:painting", + "count": 1, + "components": "[]" + }, + "uiTitle": "Collections", + "clickEvent": "/collection" + }, + "button3": { + "render": true, + "itemData": { + "item": "minecraft:bone", + "count": 1, + "components": "[]" + }, + "uiTitle": "Pets(:? \\(\\d+\\/\\d+\\))?", + "clickEvent": "/pets" + }, + "button4": { + "render": true, + "itemData": { + "item": "minecraft:leather_chestplate", + "count": 1, + "components": "[minecraft:dyed_color={rgb:8991416}]" + }, + "uiTitle": "Wardrobe \\([12]/2\\)", + "clickEvent": "/wardrobe" + }, + "button5": { + "render": true, + "itemData": { + "item": "minecraft:player_head", + "count": 1, + "components": "[minecraft:profile={id:[I;-2081424676,-57521078,-2073572414,158072763],name:\"\",properties:[{name:\"textures\",value:\"ewogICJ0aW1lc3RhbXAiIDogMTU5MTMxMDU4NTYwOSwKICAicHJvZmlsZUlkIiA6ICI0MWQzYWJjMmQ3NDk0MDBjOTA5MGQ1NDM0ZDAzODMxYiIsCiAgInByb2ZpbGVOYW1lIiA6ICJNZWdha2xvb24iLAogICJzaWduYXR1cmVSZXF1aXJlZCIgOiB0cnVlLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODBhMDc3ZTI0OGQxNDI3NzJlYTgwMDg2NGY4YzU3OGI5ZDM2ODg1YjI5ZGFmODM2YjY0YTcwNjg4MmI2ZWMxMCIKICAgIH0KICB9Cn0=\"}]}]" + }, + "uiTitle": "Sack of Sacks", + "clickEvent": "/sacks" + }, + "button6": { + "render": true, + "itemData": { + "item": "minecraft:player_head", + "count": 1, + "components": "[minecraft:profile={name:\"5da6bec64bd942bc\",id:[I;1571208902,1272529596,-1566400349,-679283814],properties:[{name:\"textures\",value:\"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTYxYTkxOGMwYzQ5YmE4ZDA1M2U1MjJjYjkxYWJjNzQ2ODkzNjdiNGQ4YWEwNmJmYzFiYTkxNTQ3MzA5ODVmZiJ9fX0=\"}]}]" + }, + "uiTitle": "Accessory Bag(?: \\(\\d/\\d\\))?", + "clickEvent": "/accessories" + }, + "button7": { + "render": true, + "itemData": { + "item": "minecraft:ender_chest", + "count": 1, + "components": "[]" + }, + "uiTitle": "(?:Rift )?Storage(?: \\(\\d/\\d\\))?", + "clickEvent": "/storage" + }, + "button8": { + "render": true, + "itemData": { + "item": "minecraft:player_head", + "count": 1, + "components": "[minecraft:profile={name:\"421a8ef40eff47f4\",id:[I;1109036788,251611124,-2126904485,-130621758],properties:[{name:\"textures\",value:\"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzljODg4MWU0MjkxNWE5ZDI5YmI2MWExNmZiMjZkMDU5OTEzMjA0ZDI2NWRmNWI0MzliM2Q3OTJhY2Q1NiJ9fX0=\"}]}]" + }, + "uiTitle": "", + "clickEvent": "/is" + }, + "button9": { + "render": true, + "itemData": { + "item": "minecraft:player_head", + "count": 1, + "components": "[minecraft:profile={name:\"e30e30d02878417c\",id:[I;-485609264,678969724,-1929747597,-718202427],properties:[{name:\"textures\",value:\"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZjQ4ODBkMmMxZTdiODZlODc1MjJlMjA4ODI2NTZmNDViYWZkNDJmOTQ5MzJiMmM1ZTBkNmVjYWE0OTBjYjRjIn19fQ==\"}]}]" + }, + "uiTitle": "", + "clickEvent": "/warp garden" + }, + "button10": { + "render": true, + "itemData": { + "item": "minecraft:player_head", + "count": 1, + "components": "[minecraft:profile={id:[I;-300151517,-631415889,-1193921967,-1821784279],name:\"\",properties:[{name:\"textures\",value:\"e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDdjYzY2ODc0MjNkMDU3MGQ1NTZhYzUzZTA2NzZjYjU2M2JiZGQ5NzE3Y2Q4MjY5YmRlYmVkNmY2ZDRlN2JmOCJ9fX0=\"}]}]" + }, + "uiTitle": "none", + "clickEvent": "/hub" + }, + "button11": { + "render": true, + "itemData": { + "item": "minecraft:enchanting_table", + "count": 1, + "components": "[]" + }, + "uiTitle": "Enchant Item", + "clickEvent": "/etable" + }, + "button12": { + "render": true, + "itemData": { + "item": "minecraft:gold_block", + "count": 1, + "components": "[]" + }, + "uiTitle": "", + "clickEvent": "/ah" + }, + "button13": { + "render": true, + "itemData": { + "item": "minecraft:player_head", + "count": 1, + "components": "[minecraft:profile={id:[I;-562285948,532499670,-1705302742,775653035],name:\"\",properties:[{name:\"textures\",value:\"e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZmZlMmRjZGE0MWVjM2FmZjhhZjUwZjI3MmVjMmUwNmE4ZjUwOWUwZjgwN2YyMzU1YTFmNWEzM2MxYjY2ZTliNCJ9fX0=\"}]}]" + }, + "uiTitle": "Bazaar .*", + "clickEvent": "/bz" + }, + "button14": { + "render": true, + "itemData": { + "item": "minecraft:crafting_table", + "count": 1, + "components": "[]" + }, + "uiTitle": "Craft Item", + "clickEvent": "/craft" + } + }, + "eventNotifications": { + "criterion": "SKYBLOCK", + "reminderSound": "PLING", + "eventsReminderTimes": { + "Season of Jerry": [ + 60, + 300 + ], + "New Year Celebration": [ + 60, + 300 + ], + "Jacob's Farming Contest": [ + 60, + 300 + ], + "Dark Auction": [ + 60, + 300 + ], + "Election Booth Opens": [ + 60, + 300 + ], + "Traveling Zoo": [ + 60, + 300 + ], + "Spooky Festival": [ + 60, + 300 + ], + "Jerry's Workshop Opens": [ + 60, + 300 + ], + "SkyBlock Anniversary": [ + 60, + 300 + ] + } + }, + "misc": { + "richPresence": { + "enableRichPresence": false, + "info": "LOCATION", + "cycleMode": false, + "customMessage": "Playing Skyblock" + } + } +} \ No newline at end of file diff --git a/src/test/resources/assets/skyblocker/config/skyblocker-v4.json b/src/test/resources/assets/skyblocker/config/skyblocker-v4.json new file mode 100644 index 00000000..907e6ad1 --- /dev/null +++ b/src/test/resources/assets/skyblocker/config/skyblocker-v4.json @@ -0,0 +1,606 @@ +{ + "version": 4, + "general": { + "enableTips": true, + "acceptReparty": true, + "shortcuts": { + "enableShortcuts": true, + "enableCommandShortcuts": true, + "enableCommandArgShortcuts": true + }, + "quiverWarning": { + "enableQuiverWarning": true, + "enableQuiverWarningInDungeons": true, + "enableQuiverWarningAfterDungeon": true + }, + "itemList": { + "enableItemList": true + }, + "itemTooltip": { + "enableNPCPrice": true, + "enableMotesPrice": true, + "enableAvgBIN": true, + "avg": "THREE_DAY", + "enableLowestBIN": true, + "enableBazaarPrice": true, + "enableObtainedDate": true, + "enableMuseumInfo": true, + "enableExoticTooltip": true, + "enableAccessoriesHelper": true, + "dungeonQuality": true + }, + "itemInfoDisplay": { + "slotText": "ENABLED", + "attributeShardInfo": true, + "itemRarityBackgrounds": false, + "itemRarityBackgroundStyle": "CIRCULAR", + "itemRarityBackgroundsOpacity": 1.0 + }, + "itemProtection": { + "slotLockStyle": "FANCY" + }, + "wikiLookup": { + "enableWikiLookup": true, + "officialWiki": true + }, + "specialEffects": { + "rareDungeonDropEffects": true + }, + "hitbox": { + "oldFarmlandHitbox": false, + "oldLeverHitbox": false + }, + "lockedSlots": [], + "protectedItems": [], + "customItemNames": {}, + "customDyeColors": {}, + "customArmorTrims": {}, + "customAnimatedDyes": {} + }, + "uiAndVisuals": { + "compactorDeletorPreview": true, + "dontStripSkinAlphaValues": true, + "backpackPreviewWithoutShift": false, + "hideEmptyTooltips": true, + "fancyCraftingTable": true, + "hideStatusEffectOverlay": false, + "chestValue": { + "enableChestValue": true, + "color": "DARK_GREEN", + "incompleteColor": "BLUE" + }, + "itemCooldown": { + "enableItemCooldowns": true + }, + "titleContainer": { + "titleContainerScale": 100.0, + "x": 540, + "y": 10, + "direction": "HORIZONTAL", + "alignment": "MIDDLE" + }, + "tabHud": { + "tabHudEnabled": true, + "tabHudScale": 100, + "enableHudBackground": true, + "plainPlayerNames": false, + "nameSorting": "DEFAULT" + }, + "fancyAuctionHouse": { + "enabled": false, + "highlightCheapBIN": true + }, + "bars": { + "enableBars": true, + "barPositions": { + "healthBarPosition": "LAYER1", + "manaBarPosition": "LAYER1", + "defenceBarPosition": "LAYER1", + "experienceBarPosition": "LAYER1" + } + }, + "waypoints": { + "enableWaypoints": true, + "waypointType": "WAYPOINT" + }, + "teleportOverlay": { + "enableTeleportOverlays": true, + "enableWeirdTransmission": true, + "enableInstantTransmission": true, + "enableEtherTransmission": true, + "enableSinrecallTransmission": true, + "enableWitherImpact": true + }, + "searchOverlay": { + "enableBazaar": true, + "enableAuctionHouse": true, + "keepPreviousSearches": false, + "maxSuggestions": 3, + "historyLength": 3, + "enableCommands": false, + "bazaarHistory": [ + "ab", + "Mystical Mushroom Soup", + "Enchanted Cocoa Beans" + ], + "auctionHistory": [ + "Rich Chocolate Chunk", + "Smooth Chocolate Bar", + "Juju Shortbow" + ] + }, + "inputCalculator": { + "enabled": true, + "requiresEquals": false + }, + "flameOverlay": { + "flameHeight": 100, + "flameOpacity": 100 + }, + "compactDamage": { + "enabled": true, + "precision": 1, + "normalDamageColor": -1, + "critDamageGradientStart": -171, + "critDamageGradientEnd": -43691 + } + }, + "helpers": { + "enableNewYearCakesHelper": true, + "mythologicalRitual": { + "enableMythologicalRitualHelper": true + }, + "experiments": { + "enableChronomatronSolver": true, + "enableSuperpairsSolver": true, + "enableUltrasequencerSolver": true + }, + "fishing": { + "enableFishingHelper": true, + "enableFishingTimer": false, + "changeTimerColor": true, + "fishingTimerScale": 1.0, + "hideOtherPlayersRods": false + }, + "fairySouls": { + "enableFairySoulsHelper": false, + "highlightFoundSouls": true, + "highlightOnlyNearbySouls": false + }, + "chocolateFactory": { + "enableChocolateFactoryHelper": true, + "enableEggFinder": true, + "sendEggFoundMessages": true, + "waypointType": "WAYPOINT", + "enableTimeTowerReminder": true + } + }, + "dungeons": { + "fancyPartyFinder": true, + "croesusHelper": true, + "playerSecretsTracker": false, + "starredMobGlow": false, + "starredMobBoundingBoxes": true, + "allowDroppingProtectedItems": false, + "hideSoulweaverSkulls": false, + "dungeonMap": { + "enableMap": true, + "mapScaling": 1.0, + "mapX": 2, + "mapY": 2 + }, + "puzzleSolvers": { + "solveTicTacToe": true, + "solveThreeWeirdos": true, + "creeperSolver": true, + "solveWaterboard": true, + "blazeSolver": true, + "solveBoulder": true, + "solveIceFill": true, + "solveSilverfish": true, + "solveTrivia": true + }, + "theProfessor": { + "fireFreezeStaffTimer": true, + "floor3GuardianHealthDisplay": true + }, + "livid": { + "enableLividColorGlow": true, + "enableLividColorText": true, + "enableLividColorTitle": true, + "lividColorText": "The livid color is [color]" + }, + "terminals": { + "solveColor": true, + "solveOrder": true, + "solveStartsWith": true, + "blockIncorrectClicks": false + }, + "secretWaypoints": { + "enableRoomMatching": true, + "enableSecretWaypoints": true, + "waypointType": "WAYPOINT", + "showSecretText": true, + "enableEntranceWaypoints": true, + "enableSuperboomWaypoints": true, + "enableChestWaypoints": true, + "enableItemWaypoints": true, + "enableBatWaypoints": true, + "enableWitherWaypoints": true, + "enableLeverWaypoints": true, + "enableFairySoulWaypoints": true, + "enableStonkWaypoints": true, + "enableAotvWaypoints": true, + "enablePearlWaypoints": true, + "enableDefaultWaypoints": true + }, + "mimicMessage": { + "sendMimicMessage": true, + "mimicMessage": "Mimic dead!" + }, + "doorHighlight": { + "enableDoorHighlight": true, + "doorHighlightType": "OUTLINED_HIGHLIGHT" + }, + "dungeonScore": { + "enableDungeonScore270Message": false, + "enableDungeonScore270Title": false, + "enableDungeonScore270Sound": false, + "dungeonScore270Message": "270 Score Reached!", + "enableDungeonScore300Message": true, + "enableDungeonScore300Title": true, + "enableDungeonScore300Sound": true, + "dungeonScore300Message": "300 Score Reached!", + "enableDungeonCryptsMessage": true, + "dungeonCryptsMessageThreshold": 250, + "dungeonCryptsMessage": "We only have [crypts] crypts out of 5, we need more!", + "enableScoreHUD": true, + "scoreX": 29, + "scoreY": 134, + "scoreScaling": 1.0 + }, + "dungeonChestProfit": { + "enableProfitCalculator": true, + "includeKismet": false, + "includeEssence": true, + "croesusProfit": true, + "neutralThreshold": 1000, + "neutralColor": "DARK_GRAY", + "profitColor": "DARK_GREEN", + "lossColor": "RED", + "incompleteColor": "BLUE" + } + }, + "foraging": { + "hunting": {} + }, + "crimsonIsle": { + "kuudra": { + "supplyWaypoints": true, + "fuelWaypoints": true, + "suppliesAndFuelWaypointType": "WAYPOINT", + "ballistaBuildWaypoints": true, + "safeSpotWaypoints": true, + "pearlWaypoints": true, + "noArrowPoisonWarning": true, + "arrowPoisonThreshold": 32 + } + }, + "mining": { + "enableDrillFuel": true, + "dwarvenMines": { + "solveFetchur": true, + "solvePuzzler": true + }, + "dwarvenHud": { + "enabledCommissions": true, + "enabledPowder": true, + "style": "SIMPLE", + "commissionsX": 842, + "commissionsY": 0, + "powderX": 872, + "powderY": 59 + }, + "crystalHollows": { + "metalDetectorHelper": true + }, + "crystalsHud": { + "enabled": true, + "showLocations": true, + "locationSize": 8, + "x": 9, + "y": 181, + "mapScaling": 1.0 + }, + "crystalsWaypoints": { + "enabled": true, + "findInChat": true + }, + "commissionWaypoints": { + "mode": "BOTH", + "useColor": true, + "textScale": 1.0, + "showBaseCamp": false, + "showEmissary": true + }, + "glacite": { + "coldOverlay": true + } + }, + "farming": { + "garden": { + "farmingHud": { + "enableHud": true, + "x": 0, + "y": 0 + }, + "dicerTitlePrevent": true, + "visitorHelper": true, + "lockMouseTool": false, + "lockMouseGroundOnly": false + } + }, + "otherLocations": { + "barn": { + "solveHungryHiker": true, + "solveTreasureHunter": true + }, + "rift": { + "mirrorverseWaypoints": true, + "blobbercystGlow": true, + "enigmaSoulWaypoints": false, + "highlightFoundEnigmaSouls": true, + "mcGrubberStacks": 0 + }, + "end": { + "enableEnderNodeHelper": true, + "hudEnabled": true, + "zealotKillsEnabled": true, + "protectorLocationEnabled": true, + "waypoint": true, + "x": 10, + "y": 10 + }, + "spidersDen": { + "relics": { + "enableRelicsHelper": false, + "highlightFoundRelics": true + } + } + }, + "slayers": { + "endermanSlayer": { + "enableYangGlyphsNotification": true, + "highlightBeacons": true, + "highlightNukekubiHeads": true + }, + "vampireSlayer": { + "enableEffigyWaypoints": true, + "compactEffigyWaypoints": false, + "effigyUpdateFrequency": 5, + "enableHolyIceIndicator": true, + "holyIceIndicatorTickDelay": 10, + "holyIceUpdateFrequency": 5, + "enableHealingMelonIndicator": true, + "healingMelonHealthThreshold": 4.0, + "enableSteakStakeIndicator": true, + "steakStakeUpdateFrequency": 5, + "enableManiaIndicator": true, + "maniaUpdateFrequency": 5 + } + }, + "chat": { + "hideAbility": "PASS", + "hideHeal": "PASS", + "hideAOTE": "PASS", + "hideImplosion": "PASS", + "hideMoltenWave": "PASS", + "hideAds": "PASS", + "hideTeleportPad": "PASS", + "hideCombo": "PASS", + "hideAutopet": "PASS", + "hideShowOff": "PASS", + "hideToggleSkyMall": "PASS", + "hideMimicKill": "PASS", + "hideDeath": "PASS", + "hideMana": false, + "hideDicer": "PASS", + "chatRuleConfig": { + "announcementLength": 60, + "announcementScale": 3 + } + }, + "quickNav": { + "enableQuickNav": true, + "button1": { + "render": true, + "itemData": { + "item": "minecraft:diamond_sword", + "count": 1, + "components": "[]" + }, + "uiTitle": "Your Skills", + "clickEvent": "/skills" + }, + "button2": { + "render": true, + "itemData": { + "item": "minecraft:painting", + "count": 1, + "components": "[]" + }, + "uiTitle": "Collections", + "clickEvent": "/collection" + }, + "button3": { + "render": true, + "itemData": { + "item": "minecraft:bone", + "count": 1, + "components": "[]" + }, + "uiTitle": "Pets(:? \\(\\d+\\/\\d+\\))?", + "clickEvent": "/pets" + }, + "button4": { + "render": true, + "itemData": { + "item": "minecraft:leather_chestplate", + "count": 1, + "components": "[minecraft:dyed_color={rgb:8991416}]" + }, + "uiTitle": "Wardrobe \\([12]/2\\)", + "clickEvent": "/wardrobe" + }, + "button5": { + "render": true, + "itemData": { + "item": "minecraft:player_head", + "count": 1, + "components": "[minecraft:profile={id:[I;-2081424676,-57521078,-2073572414,158072763],name:\"\",properties:[{name:\"textures\",value:\"ewogICJ0aW1lc3RhbXAiIDogMTU5MTMxMDU4NTYwOSwKICAicHJvZmlsZUlkIiA6ICI0MWQzYWJjMmQ3NDk0MDBjOTA5MGQ1NDM0ZDAzODMxYiIsCiAgInByb2ZpbGVOYW1lIiA6ICJNZWdha2xvb24iLAogICJzaWduYXR1cmVSZXF1aXJlZCIgOiB0cnVlLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODBhMDc3ZTI0OGQxNDI3NzJlYTgwMDg2NGY4YzU3OGI5ZDM2ODg1YjI5ZGFmODM2YjY0YTcwNjg4MmI2ZWMxMCIKICAgIH0KICB9Cn0=\"}]}]" + }, + "uiTitle": "Sack of Sacks", + "clickEvent": "/sacks" + }, + "button6": { + "render": true, + "itemData": { + "item": "minecraft:player_head", + "count": 1, + "components": "[minecraft:profile={name:\"5da6bec64bd942bc\",id:[I;1571208902,1272529596,-1566400349,-679283814],properties:[{name:\"textures\",value:\"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTYxYTkxOGMwYzQ5YmE4ZDA1M2U1MjJjYjkxYWJjNzQ2ODkzNjdiNGQ4YWEwNmJmYzFiYTkxNTQ3MzA5ODVmZiJ9fX0=\"}]}]" + }, + "uiTitle": "Accessory Bag(?: \\(\\d/\\d\\))?", + "clickEvent": "/accessories" + }, + "button7": { + "render": true, + "itemData": { + "item": "minecraft:ender_chest", + "count": 1, + "components": "[]" + }, + "uiTitle": "(?:Rift )?Storage(?: \\(\\d/\\d\\))?", + "clickEvent": "/storage" + }, + "button8": { + "render": true, + "itemData": { + "item": "minecraft:player_head", + "count": 1, + "components": "[minecraft:profile={name:\"421a8ef40eff47f4\",id:[I;1109036788,251611124,-2126904485,-130621758],properties:[{name:\"textures\",value:\"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzljODg4MWU0MjkxNWE5ZDI5YmI2MWExNmZiMjZkMDU5OTEzMjA0ZDI2NWRmNWI0MzliM2Q3OTJhY2Q1NiJ9fX0=\"}]}]" + }, + "uiTitle": "", + "clickEvent": "/is" + }, + "button9": { + "render": true, + "itemData": { + "item": "minecraft:player_head", + "count": 1, + "components": "[minecraft:profile={name:\"e30e30d02878417c\",id:[I;-485609264,678969724,-1929747597,-718202427],properties:[{name:\"textures\",value:\"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZjQ4ODBkMmMxZTdiODZlODc1MjJlMjA4ODI2NTZmNDViYWZkNDJmOTQ5MzJiMmM1ZTBkNmVjYWE0OTBjYjRjIn19fQ==\"}]}]" + }, + "uiTitle": "", + "clickEvent": "/warp garden" + }, + "button10": { + "render": true, + "itemData": { + "item": "minecraft:player_head", + "count": 1, + "components": "[minecraft:profile={id:[I;-300151517,-631415889,-1193921967,-1821784279],name:\"\",properties:[{name:\"textures\",value:\"e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDdjYzY2ODc0MjNkMDU3MGQ1NTZhYzUzZTA2NzZjYjU2M2JiZGQ5NzE3Y2Q4MjY5YmRlYmVkNmY2ZDRlN2JmOCJ9fX0=\"}]}]" + }, + "uiTitle": "none", + "clickEvent": "/hub" + }, + "button11": { + "render": true, + "itemData": { + "item": "minecraft:enchanting_table", + "count": 1, + "components": "[]" + }, + "uiTitle": "Enchant Item", + "clickEvent": "/etable" + }, + "button12": { + "render": true, + "itemData": { + "item": "minecraft:gold_block", + "count": 1, + "components": "[]" + }, + "uiTitle": "", + "clickEvent": "/ah" + }, + "button13": { + "render": true, + "itemData": { + "item": "minecraft:player_head", + "count": 1, + "components": "[minecraft:profile={id:[I;-562285948,532499670,-1705302742,775653035],name:\"\",properties:[{name:\"textures\",value:\"e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZmZlMmRjZGE0MWVjM2FmZjhhZjUwZjI3MmVjMmUwNmE4ZjUwOWUwZjgwN2YyMzU1YTFmNWEzM2MxYjY2ZTliNCJ9fX0=\"}]}]" + }, + "uiTitle": "Bazaar .*", + "clickEvent": "/bz" + }, + "button14": { + "render": true, + "itemData": { + "item": "minecraft:crafting_table", + "count": 1, + "components": "[]" + }, + "uiTitle": "Craft Item", + "clickEvent": "/craft" + } + }, + "eventNotifications": { + "criterion": "SKYBLOCK", + "reminderSound": "PLING", + "eventsReminderTimes": { + "Season of Jerry": [ + 60, + 300 + ], + "New Year Celebration": [ + 60, + 300 + ], + "Jacob's Farming Contest": [ + 60, + 300 + ], + "Dark Auction": [ + 60, + 300 + ], + "Election Booth Opens": [ + 60, + 300 + ], + "Traveling Zoo": [ + 60, + 300 + ], + "Spooky Festival": [ + 60, + 300 + ], + "Jerry's Workshop Opens": [ + 60, + 300 + ], + "SkyBlock Anniversary": [ + 60, + 300 + ] + } + }, + "misc": { + "richPresence": { + "enableRichPresence": false, + "info": "LOCATION", + "cycleMode": false, + "customMessage": "Playing Skyblock" + } + } +} \ No newline at end of file -- cgit From 156e70818b2f062ebf7fcd34fa0d23017c84a720 Mon Sep 17 00:00:00 2001 From: Kevinthegreat <92656833+kevinthegreat1@users.noreply.github.com> Date: Wed, 24 Jul 2024 00:19:59 +0800 Subject: Revert "Add slot text config data fixer" This reverts commit c6c3f30fcbacb018a6aaa8aab89395e987ca99ab. --- .../skyblocker/config/SkyblockerConfigManager.java | 2 +- .../config/datafixer/ConfigDataFixer.java | 2 - .../config/datafixer/ConfigFix3SlotText.java | 25 - .../config/datafixer/ConfigDataFixerTest.java | 12 +- .../assets/skyblocker/config/skyblocker-v3.1.json | 606 --------------------- .../assets/skyblocker/config/skyblocker-v4.json | 606 --------------------- 6 files changed, 2 insertions(+), 1251 deletions(-) delete mode 100644 src/main/java/de/hysky/skyblocker/config/datafixer/ConfigFix3SlotText.java delete mode 100644 src/test/resources/assets/skyblocker/config/skyblocker-v3.1.json delete mode 100644 src/test/resources/assets/skyblocker/config/skyblocker-v4.json (limited to 'src/main/java/de/hysky/skyblocker/config') diff --git a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfigManager.java b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfigManager.java index 4af606ec..f519473c 100644 --- a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfigManager.java +++ b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfigManager.java @@ -26,7 +26,7 @@ import java.lang.StackWalker.Option; import java.nio.file.Path; public class SkyblockerConfigManager { - public static final int CONFIG_VERSION = 4; + public static final int CONFIG_VERSION = 3; private static final Path CONFIG_FILE = FabricLoader.getInstance().getConfigDir().resolve("skyblocker.json"); private static final ConfigClassHandler HANDLER = ConfigClassHandler.createBuilder(SkyblockerConfig.class) .serializer(config -> GsonConfigSerializerBuilder.create(config) diff --git a/src/main/java/de/hysky/skyblocker/config/datafixer/ConfigDataFixer.java b/src/main/java/de/hysky/skyblocker/config/datafixer/ConfigDataFixer.java index f1ab23df..b887d415 100644 --- a/src/main/java/de/hysky/skyblocker/config/datafixer/ConfigDataFixer.java +++ b/src/main/java/de/hysky/skyblocker/config/datafixer/ConfigDataFixer.java @@ -68,8 +68,6 @@ public class ConfigDataFixer { builder.addFixer(new ConfigFix1(schema2, true)); Schema schema3 = builder.addSchema(3, Schema::new); builder.addFixer(new ConfigFix2QuickNav(schema3, true)); - Schema schema4 = builder.addSchema(4, Schema::new); - builder.addFixer(new ConfigFix3SlotText(schema4, true)); return builder.build().fixer(); } diff --git a/src/main/java/de/hysky/skyblocker/config/datafixer/ConfigFix3SlotText.java b/src/main/java/de/hysky/skyblocker/config/datafixer/ConfigFix3SlotText.java deleted file mode 100644 index 1518fe92..00000000 --- a/src/main/java/de/hysky/skyblocker/config/datafixer/ConfigFix3SlotText.java +++ /dev/null @@ -1,25 +0,0 @@ -package de.hysky.skyblocker.config.datafixer; - -import com.mojang.datafixers.DSL; -import com.mojang.datafixers.TypeRewriteRule; -import com.mojang.datafixers.schemas.Schema; -import com.mojang.serialization.Dynamic; - -public class ConfigFix3SlotText extends ConfigDataFix { - public ConfigFix3SlotText(Schema outputSchema, boolean changesType) { - super(outputSchema, changesType); - } - - @Override - protected TypeRewriteRule makeRule() { - return fixTypeEverywhereTyped( - "ConfigFix3SlotText", - getInputSchema().getType(ConfigDataFixer.CONFIG_TYPE), - typed -> typed.update(DSL.remainderFinder(), this::fix) - ); - } - - private Dynamic fix(Dynamic dynamic) { - return fixVersion(dynamic).update("general", general -> general.update("itemInfoDisplay", itemInfoDisplay -> itemInfoDisplay.update("slotText", slotText -> slotText.createString(slotText.asBoolean(true) ? "ENABLED" : "DISABLED")))); - } -} diff --git a/src/test/java/de/hysky/skyblocker/config/datafixer/ConfigDataFixerTest.java b/src/test/java/de/hysky/skyblocker/config/datafixer/ConfigDataFixerTest.java index 7e73b9e9..fcdbc314 100644 --- a/src/test/java/de/hysky/skyblocker/config/datafixer/ConfigDataFixerTest.java +++ b/src/test/java/de/hysky/skyblocker/config/datafixer/ConfigDataFixerTest.java @@ -37,16 +37,6 @@ public class ConfigDataFixerTest { @SuppressWarnings("DataFlowIssue") JsonObject expectedNewConfig = GSON.fromJson(new InputStreamReader(ConfigDataFixerTest.class.getResourceAsStream("/assets/skyblocker/config/skyblocker-v3.json")), JsonObject.class); - Assertions.assertEquals(expectedNewConfig, ConfigDataFixer.apply(oldConfig, 3)); - } - - @Test - void testDataFixer3SlotText() { - @SuppressWarnings("DataFlowIssue") - JsonObject oldConfig = GSON.fromJson(new InputStreamReader(ConfigDataFixerTest.class.getResourceAsStream("/assets/skyblocker/config/skyblocker-v3.1.json")), JsonObject.class); - @SuppressWarnings("DataFlowIssue") - JsonObject expectedNewConfig = GSON.fromJson(new InputStreamReader(ConfigDataFixerTest.class.getResourceAsStream("/assets/skyblocker/config/skyblocker-v4.json")), JsonObject.class); - - Assertions.assertEquals(expectedNewConfig, ConfigDataFixer.apply(oldConfig, 4)); + Assertions.assertEquals(expectedNewConfig, ConfigDataFixer.apply(oldConfig)); } } diff --git a/src/test/resources/assets/skyblocker/config/skyblocker-v3.1.json b/src/test/resources/assets/skyblocker/config/skyblocker-v3.1.json deleted file mode 100644 index 5c4e1348..00000000 --- a/src/test/resources/assets/skyblocker/config/skyblocker-v3.1.json +++ /dev/null @@ -1,606 +0,0 @@ -{ - "version": 3, - "general": { - "enableTips": true, - "acceptReparty": true, - "shortcuts": { - "enableShortcuts": true, - "enableCommandShortcuts": true, - "enableCommandArgShortcuts": true - }, - "quiverWarning": { - "enableQuiverWarning": true, - "enableQuiverWarningInDungeons": true, - "enableQuiverWarningAfterDungeon": true - }, - "itemList": { - "enableItemList": true - }, - "itemTooltip": { - "enableNPCPrice": true, - "enableMotesPrice": true, - "enableAvgBIN": true, - "avg": "THREE_DAY", - "enableLowestBIN": true, - "enableBazaarPrice": true, - "enableObtainedDate": true, - "enableMuseumInfo": true, - "enableExoticTooltip": true, - "enableAccessoriesHelper": true, - "dungeonQuality": true - }, - "itemInfoDisplay": { - "slotText": true, - "attributeShardInfo": true, - "itemRarityBackgrounds": false, - "itemRarityBackgroundStyle": "CIRCULAR", - "itemRarityBackgroundsOpacity": 1.0 - }, - "itemProtection": { - "slotLockStyle": "FANCY" - }, - "wikiLookup": { - "enableWikiLookup": true, - "officialWiki": true - }, - "specialEffects": { - "rareDungeonDropEffects": true - }, - "hitbox": { - "oldFarmlandHitbox": false, - "oldLeverHitbox": false - }, - "lockedSlots": [], - "protectedItems": [], - "customItemNames": {}, - "customDyeColors": {}, - "customArmorTrims": {}, - "customAnimatedDyes": {} - }, - "uiAndVisuals": { - "compactorDeletorPreview": true, - "dontStripSkinAlphaValues": true, - "backpackPreviewWithoutShift": false, - "hideEmptyTooltips": true, - "fancyCraftingTable": true, - "hideStatusEffectOverlay": false, - "chestValue": { - "enableChestValue": true, - "color": "DARK_GREEN", - "incompleteColor": "BLUE" - }, - "itemCooldown": { - "enableItemCooldowns": true - }, - "titleContainer": { - "titleContainerScale": 100.0, - "x": 540, - "y": 10, - "direction": "HORIZONTAL", - "alignment": "MIDDLE" - }, - "tabHud": { - "tabHudEnabled": true, - "tabHudScale": 100, - "enableHudBackground": true, - "plainPlayerNames": false, - "nameSorting": "DEFAULT" - }, - "fancyAuctionHouse": { - "enabled": false, - "highlightCheapBIN": true - }, - "bars": { - "enableBars": true, - "barPositions": { - "healthBarPosition": "LAYER1", - "manaBarPosition": "LAYER1", - "defenceBarPosition": "LAYER1", - "experienceBarPosition": "LAYER1" - } - }, - "waypoints": { - "enableWaypoints": true, - "waypointType": "WAYPOINT" - }, - "teleportOverlay": { - "enableTeleportOverlays": true, - "enableWeirdTransmission": true, - "enableInstantTransmission": true, - "enableEtherTransmission": true, - "enableSinrecallTransmission": true, - "enableWitherImpact": true - }, - "searchOverlay": { - "enableBazaar": true, - "enableAuctionHouse": true, - "keepPreviousSearches": false, - "maxSuggestions": 3, - "historyLength": 3, - "enableCommands": false, - "bazaarHistory": [ - "ab", - "Mystical Mushroom Soup", - "Enchanted Cocoa Beans" - ], - "auctionHistory": [ - "Rich Chocolate Chunk", - "Smooth Chocolate Bar", - "Juju Shortbow" - ] - }, - "inputCalculator": { - "enabled": true, - "requiresEquals": false - }, - "flameOverlay": { - "flameHeight": 100, - "flameOpacity": 100 - }, - "compactDamage": { - "enabled": true, - "precision": 1, - "normalDamageColor": -1, - "critDamageGradientStart": -171, - "critDamageGradientEnd": -43691 - } - }, - "helpers": { - "enableNewYearCakesHelper": true, - "mythologicalRitual": { - "enableMythologicalRitualHelper": true - }, - "experiments": { - "enableChronomatronSolver": true, - "enableSuperpairsSolver": true, - "enableUltrasequencerSolver": true - }, - "fishing": { - "enableFishingHelper": true, - "enableFishingTimer": false, - "changeTimerColor": true, - "fishingTimerScale": 1.0, - "hideOtherPlayersRods": false - }, - "fairySouls": { - "enableFairySoulsHelper": false, - "highlightFoundSouls": true, - "highlightOnlyNearbySouls": false - }, - "chocolateFactory": { - "enableChocolateFactoryHelper": true, - "enableEggFinder": true, - "sendEggFoundMessages": true, - "waypointType": "WAYPOINT", - "enableTimeTowerReminder": true - } - }, - "dungeons": { - "fancyPartyFinder": true, - "croesusHelper": true, - "playerSecretsTracker": false, - "starredMobGlow": false, - "starredMobBoundingBoxes": true, - "allowDroppingProtectedItems": false, - "hideSoulweaverSkulls": false, - "dungeonMap": { - "enableMap": true, - "mapScaling": 1.0, - "mapX": 2, - "mapY": 2 - }, - "puzzleSolvers": { - "solveTicTacToe": true, - "solveThreeWeirdos": true, - "creeperSolver": true, - "solveWaterboard": true, - "blazeSolver": true, - "solveBoulder": true, - "solveIceFill": true, - "solveSilverfish": true, - "solveTrivia": true - }, - "theProfessor": { - "fireFreezeStaffTimer": true, - "floor3GuardianHealthDisplay": true - }, - "livid": { - "enableLividColorGlow": true, - "enableLividColorText": true, - "enableLividColorTitle": true, - "lividColorText": "The livid color is [color]" - }, - "terminals": { - "solveColor": true, - "solveOrder": true, - "solveStartsWith": true, - "blockIncorrectClicks": false - }, - "secretWaypoints": { - "enableRoomMatching": true, - "enableSecretWaypoints": true, - "waypointType": "WAYPOINT", - "showSecretText": true, - "enableEntranceWaypoints": true, - "enableSuperboomWaypoints": true, - "enableChestWaypoints": true, - "enableItemWaypoints": true, - "enableBatWaypoints": true, - "enableWitherWaypoints": true, - "enableLeverWaypoints": true, - "enableFairySoulWaypoints": true, - "enableStonkWaypoints": true, - "enableAotvWaypoints": true, - "enablePearlWaypoints": true, - "enableDefaultWaypoints": true - }, - "mimicMessage": { - "sendMimicMessage": true, - "mimicMessage": "Mimic dead!" - }, - "doorHighlight": { - "enableDoorHighlight": true, - "doorHighlightType": "OUTLINED_HIGHLIGHT" - }, - "dungeonScore": { - "enableDungeonScore270Message": false, - "enableDungeonScore270Title": false, - "enableDungeonScore270Sound": false, - "dungeonScore270Message": "270 Score Reached!", - "enableDungeonScore300Message": true, - "enableDungeonScore300Title": true, - "enableDungeonScore300Sound": true, - "dungeonScore300Message": "300 Score Reached!", - "enableDungeonCryptsMessage": true, - "dungeonCryptsMessageThreshold": 250, - "dungeonCryptsMessage": "We only have [crypts] crypts out of 5, we need more!", - "enableScoreHUD": true, - "scoreX": 29, - "scoreY": 134, - "scoreScaling": 1.0 - }, - "dungeonChestProfit": { - "enableProfitCalculator": true, - "includeKismet": false, - "includeEssence": true, - "croesusProfit": true, - "neutralThreshold": 1000, - "neutralColor": "DARK_GRAY", - "profitColor": "DARK_GREEN", - "lossColor": "RED", - "incompleteColor": "BLUE" - } - }, - "foraging": { - "hunting": {} - }, - "crimsonIsle": { - "kuudra": { - "supplyWaypoints": true, - "fuelWaypoints": true, - "suppliesAndFuelWaypointType": "WAYPOINT", - "ballistaBuildWaypoints": true, - "safeSpotWaypoints": true, - "pearlWaypoints": true, - "noArrowPoisonWarning": true, - "arrowPoisonThreshold": 32 - } - }, - "mining": { - "enableDrillFuel": true, - "dwarvenMines": { - "solveFetchur": true, - "solvePuzzler": true - }, - "dwarvenHud": { - "enabledCommissions": true, - "enabledPowder": true, - "style": "SIMPLE", - "commissionsX": 842, - "commissionsY": 0, - "powderX": 872, - "powderY": 59 - }, - "crystalHollows": { - "metalDetectorHelper": true - }, - "crystalsHud": { - "enabled": true, - "showLocations": true, - "locationSize": 8, - "x": 9, - "y": 181, - "mapScaling": 1.0 - }, - "crystalsWaypoints": { - "enabled": true, - "findInChat": true - }, - "commissionWaypoints": { - "mode": "BOTH", - "useColor": true, - "textScale": 1.0, - "showBaseCamp": false, - "showEmissary": true - }, - "glacite": { - "coldOverlay": true - } - }, - "farming": { - "garden": { - "farmingHud": { - "enableHud": true, - "x": 0, - "y": 0 - }, - "dicerTitlePrevent": true, - "visitorHelper": true, - "lockMouseTool": false, - "lockMouseGroundOnly": false - } - }, - "otherLocations": { - "barn": { - "solveHungryHiker": true, - "solveTreasureHunter": true - }, - "rift": { - "mirrorverseWaypoints": true, - "blobbercystGlow": true, - "enigmaSoulWaypoints": false, - "highlightFoundEnigmaSouls": true, - "mcGrubberStacks": 0 - }, - "end": { - "enableEnderNodeHelper": true, - "hudEnabled": true, - "zealotKillsEnabled": true, - "protectorLocationEnabled": true, - "waypoint": true, - "x": 10, - "y": 10 - }, - "spidersDen": { - "relics": { - "enableRelicsHelper": false, - "highlightFoundRelics": true - } - } - }, - "slayers": { - "endermanSlayer": { - "enableYangGlyphsNotification": true, - "highlightBeacons": true, - "highlightNukekubiHeads": true - }, - "vampireSlayer": { - "enableEffigyWaypoints": true, - "compactEffigyWaypoints": false, - "effigyUpdateFrequency": 5, - "enableHolyIceIndicator": true, - "holyIceIndicatorTickDelay": 10, - "holyIceUpdateFrequency": 5, - "enableHealingMelonIndicator": true, - "healingMelonHealthThreshold": 4.0, - "enableSteakStakeIndicator": true, - "steakStakeUpdateFrequency": 5, - "enableManiaIndicator": true, - "maniaUpdateFrequency": 5 - } - }, - "chat": { - "hideAbility": "PASS", - "hideHeal": "PASS", - "hideAOTE": "PASS", - "hideImplosion": "PASS", - "hideMoltenWave": "PASS", - "hideAds": "PASS", - "hideTeleportPad": "PASS", - "hideCombo": "PASS", - "hideAutopet": "PASS", - "hideShowOff": "PASS", - "hideToggleSkyMall": "PASS", - "hideMimicKill": "PASS", - "hideDeath": "PASS", - "hideMana": false, - "hideDicer": "PASS", - "chatRuleConfig": { - "announcementLength": 60, - "announcementScale": 3 - } - }, - "quickNav": { - "enableQuickNav": true, - "button1": { - "render": true, - "itemData": { - "item": "minecraft:diamond_sword", - "count": 1, - "components": "[]" - }, - "uiTitle": "Your Skills", - "clickEvent": "/skills" - }, - "button2": { - "render": true, - "itemData": { - "item": "minecraft:painting", - "count": 1, - "components": "[]" - }, - "uiTitle": "Collections", - "clickEvent": "/collection" - }, - "button3": { - "render": true, - "itemData": { - "item": "minecraft:bone", - "count": 1, - "components": "[]" - }, - "uiTitle": "Pets(:? \\(\\d+\\/\\d+\\))?", - "clickEvent": "/pets" - }, - "button4": { - "render": true, - "itemData": { - "item": "minecraft:leather_chestplate", - "count": 1, - "components": "[minecraft:dyed_color={rgb:8991416}]" - }, - "uiTitle": "Wardrobe \\([12]/2\\)", - "clickEvent": "/wardrobe" - }, - "button5": { - "render": true, - "itemData": { - "item": "minecraft:player_head", - "count": 1, - "components": "[minecraft:profile={id:[I;-2081424676,-57521078,-2073572414,158072763],name:\"\",properties:[{name:\"textures\",value:\"ewogICJ0aW1lc3RhbXAiIDogMTU5MTMxMDU4NTYwOSwKICAicHJvZmlsZUlkIiA6ICI0MWQzYWJjMmQ3NDk0MDBjOTA5MGQ1NDM0ZDAzODMxYiIsCiAgInByb2ZpbGVOYW1lIiA6ICJNZWdha2xvb24iLAogICJzaWduYXR1cmVSZXF1aXJlZCIgOiB0cnVlLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODBhMDc3ZTI0OGQxNDI3NzJlYTgwMDg2NGY4YzU3OGI5ZDM2ODg1YjI5ZGFmODM2YjY0YTcwNjg4MmI2ZWMxMCIKICAgIH0KICB9Cn0=\"}]}]" - }, - "uiTitle": "Sack of Sacks", - "clickEvent": "/sacks" - }, - "button6": { - "render": true, - "itemData": { - "item": "minecraft:player_head", - "count": 1, - "components": "[minecraft:profile={name:\"5da6bec64bd942bc\",id:[I;1571208902,1272529596,-1566400349,-679283814],properties:[{name:\"textures\",value:\"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTYxYTkxOGMwYzQ5YmE4ZDA1M2U1MjJjYjkxYWJjNzQ2ODkzNjdiNGQ4YWEwNmJmYzFiYTkxNTQ3MzA5ODVmZiJ9fX0=\"}]}]" - }, - "uiTitle": "Accessory Bag(?: \\(\\d/\\d\\))?", - "clickEvent": "/accessories" - }, - "button7": { - "render": true, - "itemData": { - "item": "minecraft:ender_chest", - "count": 1, - "components": "[]" - }, - "uiTitle": "(?:Rift )?Storage(?: \\(\\d/\\d\\))?", - "clickEvent": "/storage" - }, - "button8": { - "render": true, - "itemData": { - "item": "minecraft:player_head", - "count": 1, - "components": "[minecraft:profile={name:\"421a8ef40eff47f4\",id:[I;1109036788,251611124,-2126904485,-130621758],properties:[{name:\"textures\",value:\"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzljODg4MWU0MjkxNWE5ZDI5YmI2MWExNmZiMjZkMDU5OTEzMjA0ZDI2NWRmNWI0MzliM2Q3OTJhY2Q1NiJ9fX0=\"}]}]" - }, - "uiTitle": "", - "clickEvent": "/is" - }, - "button9": { - "render": true, - "itemData": { - "item": "minecraft:player_head", - "count": 1, - "components": "[minecraft:profile={name:\"e30e30d02878417c\",id:[I;-485609264,678969724,-1929747597,-718202427],properties:[{name:\"textures\",value:\"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZjQ4ODBkMmMxZTdiODZlODc1MjJlMjA4ODI2NTZmNDViYWZkNDJmOTQ5MzJiMmM1ZTBkNmVjYWE0OTBjYjRjIn19fQ==\"}]}]" - }, - "uiTitle": "", - "clickEvent": "/warp garden" - }, - "button10": { - "render": true, - "itemData": { - "item": "minecraft:player_head", - "count": 1, - "components": "[minecraft:profile={id:[I;-300151517,-631415889,-1193921967,-1821784279],name:\"\",properties:[{name:\"textures\",value:\"e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDdjYzY2ODc0MjNkMDU3MGQ1NTZhYzUzZTA2NzZjYjU2M2JiZGQ5NzE3Y2Q4MjY5YmRlYmVkNmY2ZDRlN2JmOCJ9fX0=\"}]}]" - }, - "uiTitle": "none", - "clickEvent": "/hub" - }, - "button11": { - "render": true, - "itemData": { - "item": "minecraft:enchanting_table", - "count": 1, - "components": "[]" - }, - "uiTitle": "Enchant Item", - "clickEvent": "/etable" - }, - "button12": { - "render": true, - "itemData": { - "item": "minecraft:gold_block", - "count": 1, - "components": "[]" - }, - "uiTitle": "", - "clickEvent": "/ah" - }, - "button13": { - "render": true, - "itemData": { - "item": "minecraft:player_head", - "count": 1, - "components": "[minecraft:profile={id:[I;-562285948,532499670,-1705302742,775653035],name:\"\",properties:[{name:\"textures\",value:\"e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZmZlMmRjZGE0MWVjM2FmZjhhZjUwZjI3MmVjMmUwNmE4ZjUwOWUwZjgwN2YyMzU1YTFmNWEzM2MxYjY2ZTliNCJ9fX0=\"}]}]" - }, - "uiTitle": "Bazaar .*", - "clickEvent": "/bz" - }, - "button14": { - "render": true, - "itemData": { - "item": "minecraft:crafting_table", - "count": 1, - "components": "[]" - }, - "uiTitle": "Craft Item", - "clickEvent": "/craft" - } - }, - "eventNotifications": { - "criterion": "SKYBLOCK", - "reminderSound": "PLING", - "eventsReminderTimes": { - "Season of Jerry": [ - 60, - 300 - ], - "New Year Celebration": [ - 60, - 300 - ], - "Jacob's Farming Contest": [ - 60, - 300 - ], - "Dark Auction": [ - 60, - 300 - ], - "Election Booth Opens": [ - 60, - 300 - ], - "Traveling Zoo": [ - 60, - 300 - ], - "Spooky Festival": [ - 60, - 300 - ], - "Jerry's Workshop Opens": [ - 60, - 300 - ], - "SkyBlock Anniversary": [ - 60, - 300 - ] - } - }, - "misc": { - "richPresence": { - "enableRichPresence": false, - "info": "LOCATION", - "cycleMode": false, - "customMessage": "Playing Skyblock" - } - } -} \ No newline at end of file diff --git a/src/test/resources/assets/skyblocker/config/skyblocker-v4.json b/src/test/resources/assets/skyblocker/config/skyblocker-v4.json deleted file mode 100644 index 907e6ad1..00000000 --- a/src/test/resources/assets/skyblocker/config/skyblocker-v4.json +++ /dev/null @@ -1,606 +0,0 @@ -{ - "version": 4, - "general": { - "enableTips": true, - "acceptReparty": true, - "shortcuts": { - "enableShortcuts": true, - "enableCommandShortcuts": true, - "enableCommandArgShortcuts": true - }, - "quiverWarning": { - "enableQuiverWarning": true, - "enableQuiverWarningInDungeons": true, - "enableQuiverWarningAfterDungeon": true - }, - "itemList": { - "enableItemList": true - }, - "itemTooltip": { - "enableNPCPrice": true, - "enableMotesPrice": true, - "enableAvgBIN": true, - "avg": "THREE_DAY", - "enableLowestBIN": true, - "enableBazaarPrice": true, - "enableObtainedDate": true, - "enableMuseumInfo": true, - "enableExoticTooltip": true, - "enableAccessoriesHelper": true, - "dungeonQuality": true - }, - "itemInfoDisplay": { - "slotText": "ENABLED", - "attributeShardInfo": true, - "itemRarityBackgrounds": false, - "itemRarityBackgroundStyle": "CIRCULAR", - "itemRarityBackgroundsOpacity": 1.0 - }, - "itemProtection": { - "slotLockStyle": "FANCY" - }, - "wikiLookup": { - "enableWikiLookup": true, - "officialWiki": true - }, - "specialEffects": { - "rareDungeonDropEffects": true - }, - "hitbox": { - "oldFarmlandHitbox": false, - "oldLeverHitbox": false - }, - "lockedSlots": [], - "protectedItems": [], - "customItemNames": {}, - "customDyeColors": {}, - "customArmorTrims": {}, - "customAnimatedDyes": {} - }, - "uiAndVisuals": { - "compactorDeletorPreview": true, - "dontStripSkinAlphaValues": true, - "backpackPreviewWithoutShift": false, - "hideEmptyTooltips": true, - "fancyCraftingTable": true, - "hideStatusEffectOverlay": false, - "chestValue": { - "enableChestValue": true, - "color": "DARK_GREEN", - "incompleteColor": "BLUE" - }, - "itemCooldown": { - "enableItemCooldowns": true - }, - "titleContainer": { - "titleContainerScale": 100.0, - "x": 540, - "y": 10, - "direction": "HORIZONTAL", - "alignment": "MIDDLE" - }, - "tabHud": { - "tabHudEnabled": true, - "tabHudScale": 100, - "enableHudBackground": true, - "plainPlayerNames": false, - "nameSorting": "DEFAULT" - }, - "fancyAuctionHouse": { - "enabled": false, - "highlightCheapBIN": true - }, - "bars": { - "enableBars": true, - "barPositions": { - "healthBarPosition": "LAYER1", - "manaBarPosition": "LAYER1", - "defenceBarPosition": "LAYER1", - "experienceBarPosition": "LAYER1" - } - }, - "waypoints": { - "enableWaypoints": true, - "waypointType": "WAYPOINT" - }, - "teleportOverlay": { - "enableTeleportOverlays": true, - "enableWeirdTransmission": true, - "enableInstantTransmission": true, - "enableEtherTransmission": true, - "enableSinrecallTransmission": true, - "enableWitherImpact": true - }, - "searchOverlay": { - "enableBazaar": true, - "enableAuctionHouse": true, - "keepPreviousSearches": false, - "maxSuggestions": 3, - "historyLength": 3, - "enableCommands": false, - "bazaarHistory": [ - "ab", - "Mystical Mushroom Soup", - "Enchanted Cocoa Beans" - ], - "auctionHistory": [ - "Rich Chocolate Chunk", - "Smooth Chocolate Bar", - "Juju Shortbow" - ] - }, - "inputCalculator": { - "enabled": true, - "requiresEquals": false - }, - "flameOverlay": { - "flameHeight": 100, - "flameOpacity": 100 - }, - "compactDamage": { - "enabled": true, - "precision": 1, - "normalDamageColor": -1, - "critDamageGradientStart": -171, - "critDamageGradientEnd": -43691 - } - }, - "helpers": { - "enableNewYearCakesHelper": true, - "mythologicalRitual": { - "enableMythologicalRitualHelper": true - }, - "experiments": { - "enableChronomatronSolver": true, - "enableSuperpairsSolver": true, - "enableUltrasequencerSolver": true - }, - "fishing": { - "enableFishingHelper": true, - "enableFishingTimer": false, - "changeTimerColor": true, - "fishingTimerScale": 1.0, - "hideOtherPlayersRods": false - }, - "fairySouls": { - "enableFairySoulsHelper": false, - "highlightFoundSouls": true, - "highlightOnlyNearbySouls": false - }, - "chocolateFactory": { - "enableChocolateFactoryHelper": true, - "enableEggFinder": true, - "sendEggFoundMessages": true, - "waypointType": "WAYPOINT", - "enableTimeTowerReminder": true - } - }, - "dungeons": { - "fancyPartyFinder": true, - "croesusHelper": true, - "playerSecretsTracker": false, - "starredMobGlow": false, - "starredMobBoundingBoxes": true, - "allowDroppingProtectedItems": false, - "hideSoulweaverSkulls": false, - "dungeonMap": { - "enableMap": true, - "mapScaling": 1.0, - "mapX": 2, - "mapY": 2 - }, - "puzzleSolvers": { - "solveTicTacToe": true, - "solveThreeWeirdos": true, - "creeperSolver": true, - "solveWaterboard": true, - "blazeSolver": true, - "solveBoulder": true, - "solveIceFill": true, - "solveSilverfish": true, - "solveTrivia": true - }, - "theProfessor": { - "fireFreezeStaffTimer": true, - "floor3GuardianHealthDisplay": true - }, - "livid": { - "enableLividColorGlow": true, - "enableLividColorText": true, - "enableLividColorTitle": true, - "lividColorText": "The livid color is [color]" - }, - "terminals": { - "solveColor": true, - "solveOrder": true, - "solveStartsWith": true, - "blockIncorrectClicks": false - }, - "secretWaypoints": { - "enableRoomMatching": true, - "enableSecretWaypoints": true, - "waypointType": "WAYPOINT", - "showSecretText": true, - "enableEntranceWaypoints": true, - "enableSuperboomWaypoints": true, - "enableChestWaypoints": true, - "enableItemWaypoints": true, - "enableBatWaypoints": true, - "enableWitherWaypoints": true, - "enableLeverWaypoints": true, - "enableFairySoulWaypoints": true, - "enableStonkWaypoints": true, - "enableAotvWaypoints": true, - "enablePearlWaypoints": true, - "enableDefaultWaypoints": true - }, - "mimicMessage": { - "sendMimicMessage": true, - "mimicMessage": "Mimic dead!" - }, - "doorHighlight": { - "enableDoorHighlight": true, - "doorHighlightType": "OUTLINED_HIGHLIGHT" - }, - "dungeonScore": { - "enableDungeonScore270Message": false, - "enableDungeonScore270Title": false, - "enableDungeonScore270Sound": false, - "dungeonScore270Message": "270 Score Reached!", - "enableDungeonScore300Message": true, - "enableDungeonScore300Title": true, - "enableDungeonScore300Sound": true, - "dungeonScore300Message": "300 Score Reached!", - "enableDungeonCryptsMessage": true, - "dungeonCryptsMessageThreshold": 250, - "dungeonCryptsMessage": "We only have [crypts] crypts out of 5, we need more!", - "enableScoreHUD": true, - "scoreX": 29, - "scoreY": 134, - "scoreScaling": 1.0 - }, - "dungeonChestProfit": { - "enableProfitCalculator": true, - "includeKismet": false, - "includeEssence": true, - "croesusProfit": true, - "neutralThreshold": 1000, - "neutralColor": "DARK_GRAY", - "profitColor": "DARK_GREEN", - "lossColor": "RED", - "incompleteColor": "BLUE" - } - }, - "foraging": { - "hunting": {} - }, - "crimsonIsle": { - "kuudra": { - "supplyWaypoints": true, - "fuelWaypoints": true, - "suppliesAndFuelWaypointType": "WAYPOINT", - "ballistaBuildWaypoints": true, - "safeSpotWaypoints": true, - "pearlWaypoints": true, - "noArrowPoisonWarning": true, - "arrowPoisonThreshold": 32 - } - }, - "mining": { - "enableDrillFuel": true, - "dwarvenMines": { - "solveFetchur": true, - "solvePuzzler": true - }, - "dwarvenHud": { - "enabledCommissions": true, - "enabledPowder": true, - "style": "SIMPLE", - "commissionsX": 842, - "commissionsY": 0, - "powderX": 872, - "powderY": 59 - }, - "crystalHollows": { - "metalDetectorHelper": true - }, - "crystalsHud": { - "enabled": true, - "showLocations": true, - "locationSize": 8, - "x": 9, - "y": 181, - "mapScaling": 1.0 - }, - "crystalsWaypoints": { - "enabled": true, - "findInChat": true - }, - "commissionWaypoints": { - "mode": "BOTH", - "useColor": true, - "textScale": 1.0, - "showBaseCamp": false, - "showEmissary": true - }, - "glacite": { - "coldOverlay": true - } - }, - "farming": { - "garden": { - "farmingHud": { - "enableHud": true, - "x": 0, - "y": 0 - }, - "dicerTitlePrevent": true, - "visitorHelper": true, - "lockMouseTool": false, - "lockMouseGroundOnly": false - } - }, - "otherLocations": { - "barn": { - "solveHungryHiker": true, - "solveTreasureHunter": true - }, - "rift": { - "mirrorverseWaypoints": true, - "blobbercystGlow": true, - "enigmaSoulWaypoints": false, - "highlightFoundEnigmaSouls": true, - "mcGrubberStacks": 0 - }, - "end": { - "enableEnderNodeHelper": true, - "hudEnabled": true, - "zealotKillsEnabled": true, - "protectorLocationEnabled": true, - "waypoint": true, - "x": 10, - "y": 10 - }, - "spidersDen": { - "relics": { - "enableRelicsHelper": false, - "highlightFoundRelics": true - } - } - }, - "slayers": { - "endermanSlayer": { - "enableYangGlyphsNotification": true, - "highlightBeacons": true, - "highlightNukekubiHeads": true - }, - "vampireSlayer": { - "enableEffigyWaypoints": true, - "compactEffigyWaypoints": false, - "effigyUpdateFrequency": 5, - "enableHolyIceIndicator": true, - "holyIceIndicatorTickDelay": 10, - "holyIceUpdateFrequency": 5, - "enableHealingMelonIndicator": true, - "healingMelonHealthThreshold": 4.0, - "enableSteakStakeIndicator": true, - "steakStakeUpdateFrequency": 5, - "enableManiaIndicator": true, - "maniaUpdateFrequency": 5 - } - }, - "chat": { - "hideAbility": "PASS", - "hideHeal": "PASS", - "hideAOTE": "PASS", - "hideImplosion": "PASS", - "hideMoltenWave": "PASS", - "hideAds": "PASS", - "hideTeleportPad": "PASS", - "hideCombo": "PASS", - "hideAutopet": "PASS", - "hideShowOff": "PASS", - "hideToggleSkyMall": "PASS", - "hideMimicKill": "PASS", - "hideDeath": "PASS", - "hideMana": false, - "hideDicer": "PASS", - "chatRuleConfig": { - "announcementLength": 60, - "announcementScale": 3 - } - }, - "quickNav": { - "enableQuickNav": true, - "button1": { - "render": true, - "itemData": { - "item": "minecraft:diamond_sword", - "count": 1, - "components": "[]" - }, - "uiTitle": "Your Skills", - "clickEvent": "/skills" - }, - "button2": { - "render": true, - "itemData": { - "item": "minecraft:painting", - "count": 1, - "components": "[]" - }, - "uiTitle": "Collections", - "clickEvent": "/collection" - }, - "button3": { - "render": true, - "itemData": { - "item": "minecraft:bone", - "count": 1, - "components": "[]" - }, - "uiTitle": "Pets(:? \\(\\d+\\/\\d+\\))?", - "clickEvent": "/pets" - }, - "button4": { - "render": true, - "itemData": { - "item": "minecraft:leather_chestplate", - "count": 1, - "components": "[minecraft:dyed_color={rgb:8991416}]" - }, - "uiTitle": "Wardrobe \\([12]/2\\)", - "clickEvent": "/wardrobe" - }, - "button5": { - "render": true, - "itemData": { - "item": "minecraft:player_head", - "count": 1, - "components": "[minecraft:profile={id:[I;-2081424676,-57521078,-2073572414,158072763],name:\"\",properties:[{name:\"textures\",value:\"ewogICJ0aW1lc3RhbXAiIDogMTU5MTMxMDU4NTYwOSwKICAicHJvZmlsZUlkIiA6ICI0MWQzYWJjMmQ3NDk0MDBjOTA5MGQ1NDM0ZDAzODMxYiIsCiAgInByb2ZpbGVOYW1lIiA6ICJNZWdha2xvb24iLAogICJzaWduYXR1cmVSZXF1aXJlZCIgOiB0cnVlLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODBhMDc3ZTI0OGQxNDI3NzJlYTgwMDg2NGY4YzU3OGI5ZDM2ODg1YjI5ZGFmODM2YjY0YTcwNjg4MmI2ZWMxMCIKICAgIH0KICB9Cn0=\"}]}]" - }, - "uiTitle": "Sack of Sacks", - "clickEvent": "/sacks" - }, - "button6": { - "render": true, - "itemData": { - "item": "minecraft:player_head", - "count": 1, - "components": "[minecraft:profile={name:\"5da6bec64bd942bc\",id:[I;1571208902,1272529596,-1566400349,-679283814],properties:[{name:\"textures\",value:\"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTYxYTkxOGMwYzQ5YmE4ZDA1M2U1MjJjYjkxYWJjNzQ2ODkzNjdiNGQ4YWEwNmJmYzFiYTkxNTQ3MzA5ODVmZiJ9fX0=\"}]}]" - }, - "uiTitle": "Accessory Bag(?: \\(\\d/\\d\\))?", - "clickEvent": "/accessories" - }, - "button7": { - "render": true, - "itemData": { - "item": "minecraft:ender_chest", - "count": 1, - "components": "[]" - }, - "uiTitle": "(?:Rift )?Storage(?: \\(\\d/\\d\\))?", - "clickEvent": "/storage" - }, - "button8": { - "render": true, - "itemData": { - "item": "minecraft:player_head", - "count": 1, - "components": "[minecraft:profile={name:\"421a8ef40eff47f4\",id:[I;1109036788,251611124,-2126904485,-130621758],properties:[{name:\"textures\",value:\"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzljODg4MWU0MjkxNWE5ZDI5YmI2MWExNmZiMjZkMDU5OTEzMjA0ZDI2NWRmNWI0MzliM2Q3OTJhY2Q1NiJ9fX0=\"}]}]" - }, - "uiTitle": "", - "clickEvent": "/is" - }, - "button9": { - "render": true, - "itemData": { - "item": "minecraft:player_head", - "count": 1, - "components": "[minecraft:profile={name:\"e30e30d02878417c\",id:[I;-485609264,678969724,-1929747597,-718202427],properties:[{name:\"textures\",value:\"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZjQ4ODBkMmMxZTdiODZlODc1MjJlMjA4ODI2NTZmNDViYWZkNDJmOTQ5MzJiMmM1ZTBkNmVjYWE0OTBjYjRjIn19fQ==\"}]}]" - }, - "uiTitle": "", - "clickEvent": "/warp garden" - }, - "button10": { - "render": true, - "itemData": { - "item": "minecraft:player_head", - "count": 1, - "components": "[minecraft:profile={id:[I;-300151517,-631415889,-1193921967,-1821784279],name:\"\",properties:[{name:\"textures\",value:\"e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDdjYzY2ODc0MjNkMDU3MGQ1NTZhYzUzZTA2NzZjYjU2M2JiZGQ5NzE3Y2Q4MjY5YmRlYmVkNmY2ZDRlN2JmOCJ9fX0=\"}]}]" - }, - "uiTitle": "none", - "clickEvent": "/hub" - }, - "button11": { - "render": true, - "itemData": { - "item": "minecraft:enchanting_table", - "count": 1, - "components": "[]" - }, - "uiTitle": "Enchant Item", - "clickEvent": "/etable" - }, - "button12": { - "render": true, - "itemData": { - "item": "minecraft:gold_block", - "count": 1, - "components": "[]" - }, - "uiTitle": "", - "clickEvent": "/ah" - }, - "button13": { - "render": true, - "itemData": { - "item": "minecraft:player_head", - "count": 1, - "components": "[minecraft:profile={id:[I;-562285948,532499670,-1705302742,775653035],name:\"\",properties:[{name:\"textures\",value:\"e3RleHR1cmVzOntTS0lOOnt1cmw6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZmZlMmRjZGE0MWVjM2FmZjhhZjUwZjI3MmVjMmUwNmE4ZjUwOWUwZjgwN2YyMzU1YTFmNWEzM2MxYjY2ZTliNCJ9fX0=\"}]}]" - }, - "uiTitle": "Bazaar .*", - "clickEvent": "/bz" - }, - "button14": { - "render": true, - "itemData": { - "item": "minecraft:crafting_table", - "count": 1, - "components": "[]" - }, - "uiTitle": "Craft Item", - "clickEvent": "/craft" - } - }, - "eventNotifications": { - "criterion": "SKYBLOCK", - "reminderSound": "PLING", - "eventsReminderTimes": { - "Season of Jerry": [ - 60, - 300 - ], - "New Year Celebration": [ - 60, - 300 - ], - "Jacob's Farming Contest": [ - 60, - 300 - ], - "Dark Auction": [ - 60, - 300 - ], - "Election Booth Opens": [ - 60, - 300 - ], - "Traveling Zoo": [ - 60, - 300 - ], - "Spooky Festival": [ - 60, - 300 - ], - "Jerry's Workshop Opens": [ - 60, - 300 - ], - "SkyBlock Anniversary": [ - 60, - 300 - ] - } - }, - "misc": { - "richPresence": { - "enableRichPresence": false, - "info": "LOCATION", - "cycleMode": false, - "customMessage": "Playing Skyblock" - } - } -} \ No newline at end of file -- cgit From eb2ac7c20ca00da5c8998aad291584b76186ec5f Mon Sep 17 00:00:00 2001 From: Kevinthegreat <92656833+kevinthegreat1@users.noreply.github.com> Date: Wed, 24 Jul 2024 00:41:38 +0800 Subject: Rename slot text option to slotTextMode --- .../config/categories/GeneralCategory.java | 14 ++++++------- .../skyblocker/config/configs/GeneralConfig.java | 8 ++++++-- .../skyblock/item/slottext/SlotTextManager.java | 2 +- .../skyblock/item/slottext/SlotTextMode.java | 23 ++++++++++++++++++++++ .../skyblock/item/slottext/SlotTextState.java | 23 ---------------------- .../skyblocker/utils/container/SlotTextAdder.java | 4 ++-- .../resources/assets/skyblocker/lang/en_us.json | 5 +++-- 7 files changed, 42 insertions(+), 37 deletions(-) create mode 100644 src/main/java/de/hysky/skyblocker/skyblock/item/slottext/SlotTextMode.java delete mode 100644 src/main/java/de/hysky/skyblocker/skyblock/item/slottext/SlotTextState.java (limited to 'src/main/java/de/hysky/skyblocker/config') diff --git a/src/main/java/de/hysky/skyblocker/config/categories/GeneralCategory.java b/src/main/java/de/hysky/skyblocker/config/categories/GeneralCategory.java index abfb7c16..7669359e 100644 --- a/src/main/java/de/hysky/skyblocker/config/categories/GeneralCategory.java +++ b/src/main/java/de/hysky/skyblocker/config/categories/GeneralCategory.java @@ -5,7 +5,7 @@ import de.hysky.skyblocker.config.ConfigUtils; import de.hysky.skyblocker.config.SkyblockerConfig; import de.hysky.skyblocker.config.configs.GeneralConfig; import de.hysky.skyblocker.skyblock.item.tooltip.adders.CraftPriceTooltip; -import de.hysky.skyblocker.skyblock.item.slottext.SlotTextState; +import de.hysky.skyblocker.skyblock.item.slottext.SlotTextMode; import de.hysky.skyblocker.skyblock.shortcut.ShortcutsConfigScreen; import dev.isxander.yacl3.api.*; import dev.isxander.yacl3.api.controller.FloatSliderControllerBuilder; @@ -236,18 +236,18 @@ public class GeneralCategory { .group(OptionGroup.createBuilder() .name(Text.translatable("skyblocker.config.general.itemInfoDisplay")) .collapsed(true) - .option(Option.createBuilder() + .option(Option.createBuilder() .name(Text.translatable("skyblocker.config.general.itemInfoDisplay.slotText")) .description(OptionDescription.of(Text.translatable("skyblocker.config.general.itemInfoDisplay.slotText.@Tooltip"))) - .binding(defaults.general.itemInfoDisplay.slotText, - () -> config.general.itemInfoDisplay.slotText, - newValue -> config.general.itemInfoDisplay.slotText = newValue) + .binding(defaults.general.itemInfoDisplay.slotTextMode, + () -> config.general.itemInfoDisplay.slotTextMode, + newValue -> config.general.itemInfoDisplay.slotTextMode = newValue) .controller(ConfigUtils::createEnumCyclingListController) .build()) .option(ButtonOption.createBuilder() - .name(Text.translatable("skyblocker.config.general.itemInfoDisplay.slotText.shortcutToKeybindsSettings")) + .name(Text.translatable("skyblocker.config.shortcutToKeybindsSettings")) .action((screen, opt) -> MinecraftClient.getInstance().setScreen(new KeybindsScreen(screen, MinecraftClient.getInstance().options))) - .text(Text.translatable("skyblocker.config.general.itemInfoDisplay.slotText.shortcutToKeybindsSettings.@Text")) + .text(Text.translatable("skyblocker.config.shortcutToKeybindsSettings.@Text")) .build()) .option(Option.createBuilder() .name(Text.translatable("skyblocker.config.general.itemInfoDisplay.attributeShardInfo")) diff --git a/src/main/java/de/hysky/skyblocker/config/configs/GeneralConfig.java b/src/main/java/de/hysky/skyblocker/config/configs/GeneralConfig.java index 7ea1616e..61386452 100644 --- a/src/main/java/de/hysky/skyblocker/config/configs/GeneralConfig.java +++ b/src/main/java/de/hysky/skyblocker/config/configs/GeneralConfig.java @@ -3,7 +3,7 @@ package de.hysky.skyblocker.config.configs; import de.hysky.skyblocker.SkyblockerMod; import de.hysky.skyblocker.skyblock.item.CustomArmorAnimatedDyes; import de.hysky.skyblocker.skyblock.item.CustomArmorTrims; -import de.hysky.skyblocker.skyblock.item.slottext.SlotTextState; +import de.hysky.skyblocker.skyblock.item.slottext.SlotTextMode; import dev.isxander.yacl3.config.v2.api.SerialEntry; import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; @@ -164,8 +164,12 @@ public class GeneralConfig { } public static class ItemInfoDisplay { + @Deprecated @SerialEntry - public SlotTextState slotText = SlotTextState.ENABLED; + public boolean slotText = true; + + @SerialEntry + public SlotTextMode slotTextMode = SlotTextMode.ENABLED; @SerialEntry public boolean slotTextToggled = true; diff --git a/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/SlotTextManager.java b/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/SlotTextManager.java index 91971985..a28e204c 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/SlotTextManager.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/SlotTextManager.java @@ -129,7 +129,7 @@ public class SlotTextManager { } public static boolean isEnabled() { - return switch (SkyblockerConfigManager.get().general.itemInfoDisplay.slotText) { + return switch (SkyblockerConfigManager.get().general.itemInfoDisplay.slotTextMode) { case ENABLED -> true; case DISABLED -> false; case PRESS_TO_TOGGLE -> SkyblockerConfigManager.get().general.itemInfoDisplay.slotTextToggled; diff --git a/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/SlotTextMode.java b/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/SlotTextMode.java new file mode 100644 index 00000000..1f043888 --- /dev/null +++ b/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/SlotTextMode.java @@ -0,0 +1,23 @@ +package de.hysky.skyblocker.skyblock.item.slottext; + +/** + * Used in {@link SlotTextManager#isEnabled()} to determine whether the slot text should be shown or not. + */ +public enum SlotTextMode { + ENABLED, + HOLD_TO_SHOW, + PRESS_TO_TOGGLE, + HOLD_TO_HIDE, + DISABLED; + + @Override + public String toString() { + return switch (this) { + case ENABLED -> "Enabled"; + case HOLD_TO_SHOW -> "Hold to Show"; + case PRESS_TO_TOGGLE -> "Press to Toggle"; + case HOLD_TO_HIDE -> "Hold to Hide"; + case DISABLED -> "Disabled"; + }; + } +} diff --git a/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/SlotTextState.java b/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/SlotTextState.java deleted file mode 100644 index 38280166..00000000 --- a/src/main/java/de/hysky/skyblocker/skyblock/item/slottext/SlotTextState.java +++ /dev/null @@ -1,23 +0,0 @@ -package de.hysky.skyblocker.skyblock.item.slottext; - -/** - * Used in {@link SlotTextManager#isEnabled()} to determine whether the slot text should be shown or not. - */ -public enum SlotTextState { - ENABLED, - HOLD_TO_SHOW, - PRESS_TO_TOGGLE, - HOLD_TO_HIDE, - DISABLED; - - @Override - public String toString() { - return switch (this) { - case ENABLED -> "Enabled"; - case HOLD_TO_SHOW -> "Hold to Show"; - case PRESS_TO_TOGGLE -> "Press to Toggle"; - case HOLD_TO_HIDE -> "Hold to Hide"; - case DISABLED -> "Disabled"; - }; - } -} diff --git a/src/main/java/de/hysky/skyblocker/utils/container/SlotTextAdder.java b/src/main/java/de/hysky/skyblocker/utils/container/SlotTextAdder.java index 4caf8cea..72f92547 100644 --- a/src/main/java/de/hysky/skyblocker/utils/container/SlotTextAdder.java +++ b/src/main/java/de/hysky/skyblocker/utils/container/SlotTextAdder.java @@ -2,7 +2,7 @@ package de.hysky.skyblocker.utils.container; import de.hysky.skyblocker.config.SkyblockerConfigManager; import de.hysky.skyblocker.skyblock.item.slottext.SlotText; -import de.hysky.skyblocker.skyblock.item.slottext.SlotTextState; +import de.hysky.skyblocker.skyblock.item.slottext.SlotTextMode; import net.minecraft.item.ItemStack; import net.minecraft.screen.slot.Slot; import org.jetbrains.annotations.NotNull; @@ -25,6 +25,6 @@ public interface SlotTextAdder extends ContainerMatcher { @Override default boolean isEnabled() { - return SkyblockerConfigManager.get().general.itemInfoDisplay.slotText != SlotTextState.DISABLED; + return SkyblockerConfigManager.get().general.itemInfoDisplay.slotTextMode != SlotTextMode.DISABLED; } } diff --git a/src/main/resources/assets/skyblocker/lang/en_us.json b/src/main/resources/assets/skyblocker/lang/en_us.json index 4ee3ece0..2c19e036 100644 --- a/src/main/resources/assets/skyblocker/lang/en_us.json +++ b/src/main/resources/assets/skyblocker/lang/en_us.json @@ -28,6 +28,9 @@ "skyblocker.config.title": "Skyblocker Settings", + "skyblocker.config.shortcutToKeybindsSettings": "Edit Keybind", + "skyblocker.config.shortcutToKeybindsSettings.@Text": "Click... (Opens up Keybinds Options)", + "skyblocker.config.crimsonIsle": "Crimson Isle", "skyblocker.config.crimsonIsle.kuudra": "Kuudra", @@ -225,8 +228,6 @@ "skyblocker.config.general.itemInfoDisplay.itemRarityBackgroundsOpacity": "Item Rarity Backgrounds Opacity", "skyblocker.config.general.itemInfoDisplay.slotText": "Slot Text", "skyblocker.config.general.itemInfoDisplay.slotText.@Tooltip": "Displays information such as enchantment book level, minion level, pet level, potion level, prehistoric egg blocks walked, rancher's boots speed cap, and skill level", - "skyblocker.config.general.itemInfoDisplay.slotText.shortcutToKeybindsSettings": "Slot Text Keybind", - "skyblocker.config.general.itemInfoDisplay.slotText.shortcutToKeybindsSettings.@Text": "Click... (opens up keybinds settings)", "skyblocker.config.general.itemList": "Item List", "skyblocker.config.general.itemList.enableItemList": "Enable Item List", -- cgit