aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/hysky/skyblocker
diff options
context:
space:
mode:
authormsg-programs <msgdoesstuff@gmail.com>2023-10-30 10:33:59 +0100
committermsg-programs <msgdoesstuff@gmail.com>2023-10-30 10:33:59 +0100
commit8dcc0500627362569341c01c91dc397fb5d37ac1 (patch)
tree32049a014e8d6e6e395d56dec5b1a48941440c05 /src/main/java/de/hysky/skyblocker
parent1d1a901d87f136cac030f5f74f4f1d842f62f704 (diff)
downloadSkyblocker-8dcc0500627362569341c01c91dc397fb5d37ac1.tar.gz
Skyblocker-8dcc0500627362569341c01c91dc397fb5d37ac1.tar.bz2
Skyblocker-8dcc0500627362569341c01c91dc397fb5d37ac1.zip
Remove whitespace in otherwise empty lines
Diffstat (limited to 'src/main/java/de/hysky/skyblocker')
-rw-r--r--src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java220
-rw-r--r--src/main/java/de/hysky/skyblocker/config/SkyblockerConfigManager.java12
-rw-r--r--src/main/java/de/hysky/skyblocker/config/categories/DiscordRPCCategory.java2
-rw-r--r--src/main/java/de/hysky/skyblocker/config/categories/DungeonsCategory.java8
-rw-r--r--src/main/java/de/hysky/skyblocker/config/categories/DwarvenMinesCategory.java4
-rw-r--r--src/main/java/de/hysky/skyblocker/config/categories/LocationsCategory.java6
-rw-r--r--src/main/java/de/hysky/skyblocker/config/categories/MessageFilterCategory.java2
-rw-r--r--src/main/java/de/hysky/skyblocker/config/categories/QuickNavigationCategory.java28
-rw-r--r--src/main/java/de/hysky/skyblocker/config/categories/SlayersCategory.java4
-rw-r--r--src/main/java/de/hysky/skyblocker/mixin/HandledScreenMixin.java20
-rw-r--r--src/main/java/de/hysky/skyblocker/mixin/SocialInteractionsPlayerListWidgetMixin.java2
-rw-r--r--src/main/java/de/hysky/skyblocker/mixin/YggdrasilServicesKeyInfoMixin.java2
-rw-r--r--src/main/java/de/hysky/skyblocker/skyblock/dungeon/DungeonMapConfigScreen.java2
-rw-r--r--src/main/java/de/hysky/skyblocker/skyblock/dwarven/DwarvenHudConfigScreen.java2
-rw-r--r--src/main/java/de/hysky/skyblocker/skyblock/item/ItemRarityBackgrounds.java24
-rw-r--r--src/main/java/de/hysky/skyblocker/skyblock/item/SkyblockItemRarity.java2
-rw-r--r--src/main/java/de/hysky/skyblocker/skyblock/itemlist/ItemStackBuilder.java4
-rw-r--r--src/main/java/de/hysky/skyblocker/skyblock/rift/EffigyWaypoints.java6
-rw-r--r--src/main/java/de/hysky/skyblocker/skyblock/shortcut/ShortcutsConfigScreen.java2
-rw-r--r--src/main/java/de/hysky/skyblocker/utils/Http.java20
-rw-r--r--src/main/java/de/hysky/skyblocker/utils/SlayerUtils.java4
-rw-r--r--src/main/java/de/hysky/skyblocker/utils/render/title/TitleContainerConfigScreen.java2
-rw-r--r--src/main/java/de/hysky/skyblocker/utils/scheduler/Scheduler.java4
23 files changed, 191 insertions, 191 deletions
diff --git a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java
index 189c6af7..de53ca0a 100644
--- a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java
+++ b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfig.java
@@ -16,7 +16,7 @@ import java.util.List;
public class SkyblockerConfig {
@SerialEntry
public int version = 1;
-
+
@SerialEntry
public General general = new General();
@@ -117,7 +117,7 @@ public class SkyblockerConfig {
@SerialEntry
public String uiTitle;
-
+
@SerialEntry
public String clickEvent;
}
@@ -137,10 +137,10 @@ public class SkyblockerConfig {
@SerialEntry
public String itemName;
-
+
@SerialEntry
public int count;
-
+
@SerialEntry
public String nbt;
}
@@ -148,16 +148,16 @@ public class SkyblockerConfig {
public static class General {
@SerialEntry
public boolean acceptReparty = true;
-
+
@SerialEntry
public boolean backpackPreviewWithoutShift = false;
-
+
@SerialEntry
public boolean compactorDeletorPreview = true;
-
+
@SerialEntry
public boolean hideEmptyTooltips = true;
-
+
@SerialEntry
public boolean hideStatusEffectOverlay = false;
@@ -181,7 +181,7 @@ public class SkyblockerConfig {
@SerialEntry
public Shortcuts shortcuts = new Shortcuts();
-
+
@SerialEntry
public QuiverWarning quiverWarning = new QuiverWarning();
@@ -193,7 +193,7 @@ public class SkyblockerConfig {
@SerialEntry
public ItemInfoDisplay itemInfoDisplay = new ItemInfoDisplay();
-
+
@SerialEntry
public SpecialEffects specialEffects = new SpecialEffects();
@@ -208,7 +208,7 @@ public class SkyblockerConfig {
@SerialEntry
public List<Integer> lockedSlots = new ArrayList<>();
-
+
@SerialEntry
public ObjectOpenHashSet<String> protectedItems = new ObjectOpenHashSet<>();
@@ -228,10 +228,10 @@ public class SkyblockerConfig {
@SerialEntry
public int tabHudScale = 100;
-
+
@SerialEntry
public boolean plainPlayerNames = false;
-
+
@SerialEntry
public NameSorting nameSorting = NameSorting.DEFAULT;
}
@@ -259,13 +259,13 @@ public class SkyblockerConfig {
public static class BarPositions {
@SerialEntry
public BarPosition healthBarPosition = BarPosition.LAYER1;
-
+
@SerialEntry
public BarPosition manaBarPosition = BarPosition.LAYER1;
-
+
@SerialEntry
public BarPosition defenceBarPosition = BarPosition.LAYER1;
-
+
@SerialEntry
public BarPosition experienceBarPosition = BarPosition.LAYER1;
@@ -292,10 +292,10 @@ public class SkyblockerConfig {
public static class Experiments {
@SerialEntry
public boolean enableChronomatronSolver = true;
-
+
@SerialEntry
public boolean enableSuperpairsSolver = true;
-
+
@SerialEntry
public boolean enableUltrasequencerSolver = true;
}
@@ -308,10 +308,10 @@ public class SkyblockerConfig {
public static class FairySouls {
@SerialEntry
public boolean enableFairySoulsHelper = false;
-
+
@SerialEntry
public boolean highlightFoundSouls = true;
-
+
@SerialEntry
public boolean highlightOnlyNearbySouls = false;
}
@@ -324,14 +324,14 @@ public class SkyblockerConfig {
public static class Shortcuts {
@SerialEntry
public boolean enableShortcuts = true;
-
+
@SerialEntry
public boolean enableCommandShortcuts = true;
-
+
@SerialEntry
public boolean enableCommandArgShortcuts = true;
}
-
+
public static class QuiverWarning {
@SerialEntry
public boolean enableQuiverWarning = true;
@@ -346,7 +346,7 @@ public class SkyblockerConfig {
public static class Hitbox {
@SerialEntry
public boolean oldFarmlandHitbox = true;
-
+
@SerialEntry
public boolean oldLeverHitbox = false;
}
@@ -354,16 +354,16 @@ public class SkyblockerConfig {
public static class TitleContainer {
@SerialEntry
public float titleContainerScale = 100;
-
+
@SerialEntry
public int x = 540;
-
+
@SerialEntry
public int y = 10;
-
+
@SerialEntry
public Direction direction = Direction.HORIZONTAL;
-
+
@SerialEntry
public Alignment alignment = Alignment.MIDDLE;
}
@@ -371,19 +371,19 @@ public class SkyblockerConfig {
public static class TeleportOverlay {
@SerialEntry
public boolean enableTeleportOverlays = true;
-
+
@SerialEntry
public boolean enableWeirdTransmission = true;
-
+
@SerialEntry
public boolean enableInstantTransmission = true;
-
+
@SerialEntry
public boolean enableEtherTransmission = true;
-
+
@SerialEntry
public boolean enableSinrecallTransmission = true;
-
+
@SerialEntry
public boolean enableWitherImpact = true;
}
@@ -419,10 +419,10 @@ public class SkyblockerConfig {
@SerialEntry
public Info info = Info.LOCATION;
-
+
@SerialEntry
public boolean cycleMode = false;
-
+
@SerialEntry
public String customMessage = "Playing Skyblock";
}
@@ -444,22 +444,22 @@ public class SkyblockerConfig {
public static class ItemTooltip {
@SerialEntry
public boolean enableNPCPrice = true;
-
+
@SerialEntry
public boolean enableMotesPrice = true;
-
+
@SerialEntry
public boolean enableAvgBIN = true;
-
+
@SerialEntry
public Average avg = Average.THREE_DAY;
-
+
@SerialEntry
public boolean enableLowestBIN = true;
-
+
@SerialEntry
public boolean enableBazaarPrice = true;
-
+
@SerialEntry
public boolean enableMuseumDate = true;
}
@@ -467,14 +467,14 @@ public class SkyblockerConfig {
public static class ItemInfoDisplay {
@SerialEntry
public boolean attributeShardInfo = true;
-
+
@SerialEntry
public boolean itemRarityBackgrounds = false;
@SerialEntry
public float itemRarityBackgroundsOpacity = 1f;
}
-
+
public static class SpecialEffects {
@SerialEntry
public boolean rareDungeonDropEffects = true;
@@ -492,7 +492,7 @@ public class SkyblockerConfig {
@SerialEntry
public Rift rift = new Rift();
-
+
@SerialEntry
public SpidersDen spidersDen = new SpidersDen();
}
@@ -500,46 +500,46 @@ public class SkyblockerConfig {
public static class Dungeons {
@SerialEntry
public SecretWaypoints secretWaypoints = new SecretWaypoints();
-
+
@SerialEntry
public DungeonChestProfit dungeonChestProfit = new DungeonChestProfit();
-
+
@SerialEntry
public boolean croesusHelper = true;
-
+
@SerialEntry
public boolean enableMap = true;
-
+
@SerialEntry
public float mapScaling = 1f;
-
+
@SerialEntry
public int mapX = 2;
-
+
@SerialEntry
public int mapY = 2;
-
+
@SerialEntry
public boolean starredMobGlow = true;
-
+
@SerialEntry
public boolean solveThreeWeirdos = true;
-
+
@SerialEntry
public boolean blazeSolver = true;
@SerialEntry
public boolean creeperSolver = true;
-
+
@SerialEntry
public boolean solveTrivia = true;
-
+
@SerialEntry
public boolean solveTicTacToe = true;
-
+
@SerialEntry
public LividColor lividColor = new LividColor();
-
+
@SerialEntry
public Terminals terminals = new Terminals();
}
@@ -547,72 +547,72 @@ public class SkyblockerConfig {
public static class SecretWaypoints {
@SerialEntry
public boolean enableSecretWaypoints = true;
-
+
@SerialEntry
public boolean noInitSecretWaypoints = false;
-
+
@SerialEntry
public boolean enableEntranceWaypoints = true;
-
+
@SerialEntry
public boolean enableSuperboomWaypoints = true;
-
+
@SerialEntry
public boolean enableChestWaypoints = true;
-
+
@SerialEntry
public boolean enableItemWaypoints = true;
-
+
@SerialEntry
public boolean enableBatWaypoints = true;
-
+
@SerialEntry
public boolean enableWitherWaypoints = true;
-
+
@SerialEntry
public boolean enableLeverWaypoints = true;
-
+
@SerialEntry
public boolean enableFairySoulWaypoints = true;
-
+
@SerialEntry
public boolean enableStonkWaypoints = true;
-
+
@SerialEntry
public boolean enableDefaultWaypoints = true;
}
-
+
public static class DungeonChestProfit {
@SerialEntry
public boolean enableProfitCalculator = true;
-
+
@SerialEntry
public boolean includeKismet = false;
-
+
@SerialEntry
public boolean includeEssence = true;
-
+
@SerialEntry
public int neutralThreshold = 1000;
-
+
@SerialEntry
public Formatting neutralColor = Formatting.DARK_GRAY;
-
+
@SerialEntry
public Formatting profitColor = Formatting.DARK_GREEN;
-
+
@SerialEntry
public Formatting lossColor = Formatting.RED;
-
+
@SerialEntry
public Formatting incompleteColor = Formatting.BLUE;
-
+
}
public static class LividColor {
@SerialEntry
public boolean enableLividColor = true;
-
+
@SerialEntry
public String lividColorText = "The livid color is [color]";
}
@@ -620,10 +620,10 @@ public class SkyblockerConfig {
public static class Terminals {
@SerialEntry
public boolean solveColor = true;
-
+
@SerialEntry
public boolean solveOrder = true;
-
+
@SerialEntry
public boolean solveStartsWith = true;
}
@@ -631,13 +631,13 @@ public class SkyblockerConfig {
public static class DwarvenMines {
@SerialEntry
public boolean enableDrillFuel = true;
-
+
@SerialEntry
public boolean solveFetchur = true;
-
+
@SerialEntry
public boolean solvePuzzler = true;
-
+
@SerialEntry
public DwarvenHud dwarvenHud = new DwarvenHud();
}
@@ -645,16 +645,16 @@ public class SkyblockerConfig {
public static class DwarvenHud {
@SerialEntry
public boolean enabled = true;
-
+
@SerialEntry
public DwarvenHudStyle style = DwarvenHudStyle.SIMPLE;
-
+
@SerialEntry
public boolean enableBackground = true;
-
+
@SerialEntry
public int x = 10;
-
+
@SerialEntry
public int y = 10;
}
@@ -675,7 +675,7 @@ public class SkyblockerConfig {
public static class Barn {
@SerialEntry
public boolean solveHungryHiker = true;
-
+
@SerialEntry
public boolean solveTreasureHunter = true;
}
@@ -683,20 +683,20 @@ public class SkyblockerConfig {
public static class Rift {
@SerialEntry
public boolean mirrorverseWaypoints = true;
-
+
@SerialEntry
public int mcGrubberStacks = 0;
}
-
+
public static class SpidersDen {
@SerialEntry
public Relics relics = new Relics();
}
-
+
public static class Relics {
@SerialEntry
public boolean enableRelicsHelper = false;
-
+
@SerialEntry
public boolean highlightFoundRelics = true;
}
@@ -709,34 +709,34 @@ public class SkyblockerConfig {
public static class VampireSlayer {
@SerialEntry
public boolean enableEffigyWaypoints = true;
-
+
@SerialEntry
public boolean compactEffigyWaypoints;
-
+
@SerialEntry
public int effigyUpdateFrequency = 5;
-
+
@SerialEntry
public boolean enableHolyIceIndicator = true;
-
+
@SerialEntry
public int holyIceIndicatorTickDelay = 10;
@SerialEntry
public int holyIceUpdateFrequency = 5;
-
+
@SerialEntry
public boolean enableHealingMelonIndicator = true;
-
+
@SerialEntry
public float healingMelonHealthThreshold = 4f;
-
+
@SerialEntry
public boolean enableSteakStakeIndicator = true;
@SerialEntry
public int steakStakeUpdateFrequency = 5;
-
+
@SerialEntry
public boolean enableManiaIndicator = true;
@@ -747,34 +747,34 @@ public class SkyblockerConfig {
public static class Messages {
@SerialEntry
public ChatFilterResult hideAbility = ChatFilterResult.PASS;
-
+
@SerialEntry
public ChatFilterResult hideHeal = ChatFilterResult.PASS;
-
+
@SerialEntry
public ChatFilterResult hideAOTE = ChatFilterResult.PASS;
-
+
@SerialEntry
public ChatFilterResult hideImplosion = ChatFilterResult.PASS;
-
+
@SerialEntry
public ChatFilterResult hideMoltenWave = ChatFilterResult.PASS;
-
+
@SerialEntry
public ChatFilterResult hideAds = ChatFilterResult.PASS;
-
+
@SerialEntry
public ChatFilterResult hideTeleportPad = ChatFilterResult.PASS;
-
+
@SerialEntry
public ChatFilterResult hideCombo = ChatFilterResult.PASS;
-
+
@SerialEntry
public ChatFilterResult hideAutopet = ChatFilterResult.PASS;
-
+
@SerialEntry
public ChatFilterResult hideShowOff = ChatFilterResult.PASS;
-
+
@SerialEntry
public boolean hideMana = false;
}
diff --git a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfigManager.java b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfigManager.java
index 98c83975..875090ed 100644
--- a/src/main/java/de/hysky/skyblocker/config/SkyblockerConfigManager.java
+++ b/src/main/java/de/hysky/skyblocker/config/SkyblockerConfigManager.java
@@ -38,11 +38,11 @@ public class SkyblockerConfigManager {
.registerTypeHierarchyAdapter(Identifier.class, new Identifier.Serializer()))
.build())
.build();
-
+
public static SkyblockerConfig get() {
return HANDLER.instance();
}
-
+
/**
* This method is caller sensitive and can only be called by the mod initializer,
* this is enforced.
@@ -51,15 +51,15 @@ public class SkyblockerConfigManager {
if (StackWalker.getInstance(Option.RETAIN_CLASS_REFERENCE).getCallerClass() != SkyblockerMod.class) {
throw new RuntimeException("Skyblocker: Called config init from an illegal place!");
}
-
+
HANDLER.load();
ClientCommandRegistrationCallback.EVENT.register(((dispatcher, registryAccess) -> dispatcher.register(ClientCommandManager.literal(SkyblockerMod.NAMESPACE).then(optionsLiteral("config")).then(optionsLiteral("options")))));
}
-
+
public static void save() {
HANDLER.save();
}
-
+
public static Screen createGUI(Screen parent) {
return YetAnotherConfigLib.create(HANDLER, (defaults, config, builder) -> builder
.title(Text.translatable("text.autoconfig.skyblocker.title"))
@@ -72,7 +72,7 @@ public class SkyblockerConfigManager {
.category(MessageFilterCategory.create(defaults, config))
.category(DiscordRPCCategory.create(defaults, config))).generateScreen(parent);
}
-
+
/**
* Registers an options command with the given name. Used for registering both options and config as valid commands.
*
diff --git a/src/main/java/de/hysky/skyblocker/config/categories/DiscordRPCCategory.java b/src/main/java/de/hysky/skyblocker/config/categories/DiscordRPCCategory.java
index fcdc3d8d..907291ca 100644
--- a/src/main/java/de/hysky/skyblocker/config/categories/DiscordRPCCategory.java
+++ b/src/main/java/de/hysky/skyblocker/config/categories/DiscordRPCCategory.java
@@ -13,7 +13,7 @@ public class DiscordRPCCategory {
public static ConfigCategory create(SkyblockerConfig defaults, SkyblockerConfig config) {
return ConfigCategory.createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.category.richPresence"))
-
+
//Uncategorized Options
.option(Option.<Boolean>createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.option.richPresence.enableRichPresence"))
diff --git a/src/main/java/de/hysky/skyblocker/config/categories/DungeonsCategory.java b/src/main/java/de/hysky/skyblocker/config/categories/DungeonsCategory.java
index a9c0c26b..284fcb5d 100644
--- a/src/main/java/de/hysky/skyblocker/config/categories/DungeonsCategory.java
+++ b/src/main/java/de/hysky/skyblocker/config/categories/DungeonsCategory.java
@@ -22,7 +22,7 @@ public class DungeonsCategory {
public static ConfigCategory create(SkyblockerConfig defaults, SkyblockerConfig config) {
return ConfigCategory.createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons"))
-
+
//Dungeon Secret Waypoints
.group(OptionGroup.createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.secretWaypoints"))
@@ -115,7 +115,7 @@ public class DungeonsCategory {
.controller(ConfigUtils::createBooleanController)
.build())
.build())
-
+
.group(OptionGroup.createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.dungeonChestProfit"))
.collapsed(true)
@@ -181,7 +181,7 @@ public class DungeonsCategory {
.controller(EnumDropdownControllerBuilder.getFactory(ConfigUtils.FORMATTING_TO_STRING))
.build())
.build())
-
+
//Others
.option(Option.<Boolean>createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.croesusHelper"))
@@ -292,7 +292,7 @@ public class DungeonsCategory {
.controller(StringControllerBuilder::create)
.build())
.build())
-
+
//Terminal Solvers
.group(OptionGroup.createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.option.locations.dungeons.terminals"))
diff --git a/src/main/java/de/hysky/skyblocker/config/categories/DwarvenMinesCategory.java b/src/main/java/de/hysky/skyblocker/config/categories/DwarvenMinesCategory.java
index 35c91d64..4a2de529 100644
--- a/src/main/java/de/hysky/skyblocker/config/categories/DwarvenMinesCategory.java
+++ b/src/main/java/de/hysky/skyblocker/config/categories/DwarvenMinesCategory.java
@@ -17,7 +17,7 @@ public class DwarvenMinesCategory {
public static ConfigCategory create(SkyblockerConfig defaults, SkyblockerConfig config) {
return ConfigCategory.createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.option.locations.dwarvenMines"))
-
+
//Uncategorized Options
.option(Option.<Boolean>createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.option.locations.dwarvenMines.enableDrillFuel"))
@@ -40,7 +40,7 @@ public class DwarvenMinesCategory {
newValue -> config.locations.dwarvenMines.solvePuzzler = newValue)
.controller(ConfigUtils::createBooleanController)
.build())
-
+
//Dwarven HUD
.group(OptionGroup.createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.option.locations.dwarvenMines.dwarvenHud"))
diff --git a/src/main/java/de/hysky/skyblocker/config/categories/LocationsCategory.java b/src/main/java/de/hysky/skyblocker/config/categories/LocationsCategory.java
index 399bb9f6..d87adaa2 100644
--- a/src/main/java/de/hysky/skyblocker/config/categories/LocationsCategory.java
+++ b/src/main/java/de/hysky/skyblocker/config/categories/LocationsCategory.java
@@ -14,7 +14,7 @@ public class LocationsCategory {
public static ConfigCategory create(SkyblockerConfig defaults, SkyblockerConfig config) {
return ConfigCategory.createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.category.locations"))
-
+
//Barn
.group(OptionGroup.createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.option.locations.barn"))
@@ -34,7 +34,7 @@ public class LocationsCategory {
.controller(ConfigUtils::createBooleanController)
.build())
.build())
-
+
//The Rift
.group(OptionGroup.createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.option.locations.rift"))
@@ -55,7 +55,7 @@ public class LocationsCategory {
.controller(opt -> IntegerSliderControllerBuilder.create(opt).range(0, 5).step(1))
.build())
.build())
-
+
//Spider's Den
.group(OptionGroup.createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.option.locations.spidersDen"))
diff --git a/src/main/java/de/hysky/skyblocker/config/categories/MessageFilterCategory.java b/src/main/java/de/hysky/skyblocker/config/categories/MessageFilterCategory.java
index ba76a903..f9032c27 100644
--- a/src/main/java/de/hysky/skyblocker/config/categories/MessageFilterCategory.java
+++ b/src/main/java/de/hysky/skyblocker/config/categories/MessageFilterCategory.java
@@ -13,7 +13,7 @@ public class MessageFilterCategory {
public static ConfigCategory create(SkyblockerConfig defaults, SkyblockerConfig config) {
return ConfigCategory.createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.category.messages"))
-
+
//Uncategorized Options
.option(Option.<ChatFilterResult>createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.option.messages.hideAbility"))
diff --git a/src/main/java/de/hysky/skyblocker/config/categories/QuickNavigationCategory.java b/src/main/java/de/hysky/skyblocker/config/categories/QuickNavigationCategory.java
index b17fed23..c1cbc46c 100644
--- a/src/main/java/de/hysky/skyblocker/config/categories/QuickNavigationCategory.java
+++ b/src/main/java/de/hysky/skyblocker/config/categories/QuickNavigationCategory.java
@@ -14,7 +14,7 @@ public class QuickNavigationCategory {
public static ConfigCategory create(SkyblockerConfig defaults, SkyblockerConfig config) {
return ConfigCategory.createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.category.quickNav"))
-
+
//Toggle
.option(Option.<Boolean>createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.option.quickNav.enableQuickNav"))
@@ -23,7 +23,7 @@ public class QuickNavigationCategory {
newValue -> config.quickNav.enableQuickNav = newValue)
.controller(ConfigUtils::createBooleanController)
.build())
-
+
//Button 1
.group(OptionGroup.createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.option.quickNav.button1"))
@@ -71,7 +71,7 @@ public class QuickNavigationCategory {
.controller(StringControllerBuilder::create)
.build())
.build())
-
+
//Button 2
.group(OptionGroup.createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.option.quickNav.button2"))
@@ -119,7 +119,7 @@ public class QuickNavigationCategory {
.controller(StringControllerBuilder::create)
.build())
.build())
-
+
//Button 3
.group(OptionGroup.createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.option.quickNav.button3"))
@@ -167,7 +167,7 @@ public class QuickNavigationCategory {
.controller(StringControllerBuilder::create)
.build())
.build())
-
+
//Button 4
.group(OptionGroup.createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.option.quickNav.button4"))
@@ -215,7 +215,7 @@ public class QuickNavigationCategory {
.controller(StringControllerBuilder::create)
.build())
.build())
-
+
//Button 5
.group(OptionGroup.createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.option.quickNav.button5"))
@@ -263,7 +263,7 @@ public class QuickNavigationCategory {
.controller(StringControllerBuilder::create)
.build())
.build())
-
+
//Button 6
.group(OptionGroup.createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.option.quickNav.button6"))
@@ -311,7 +311,7 @@ public class QuickNavigationCategory {
.controller(StringControllerBuilder::create)
.build())
.build())
-
+
//Button 7
.group(OptionGroup.createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.option.quickNav.button7"))
@@ -359,7 +359,7 @@ public class QuickNavigationCategory {
.controller(StringControllerBuilder::create)
.build())
.build())
-
+
//Button 8
.group(OptionGroup.createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.option.quickNav.button8"))
@@ -407,7 +407,7 @@ public class QuickNavigationCategory {
.controller(StringControllerBuilder::create)
.build())
.build())
-
+
//Button 9
.group(OptionGroup.createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.option.quickNav.button9"))
@@ -455,7 +455,7 @@ public class QuickNavigationCategory {
.controller(StringControllerBuilder::create)
.build())
.build())
-
+
//Button 10
.group(OptionGroup.createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.option.quickNav.button10"))
@@ -503,7 +503,7 @@ public class QuickNavigationCategory {
.controller(StringControllerBuilder::create)
.build())
.build())
-
+
//Button 11
.group(OptionGroup.createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.option.quickNav.button11"))
@@ -551,7 +551,7 @@ public class QuickNavigationCategory {
.controller(StringControllerBuilder::create)
.build())
.build())
-
+
//Button 12
.group(OptionGroup.createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.option.quickNav.button12"))
@@ -599,7 +599,7 @@ public class QuickNavigationCategory {
.controller(StringControllerBuilder::create)
.build())
.build())
-
+
.build();
}
}
diff --git a/src/main/java/de/hysky/skyblocker/config/categories/SlayersCategory.java b/src/main/java/de/hysky/skyblocker/config/categories/SlayersCategory.java
index 2d8b1332..7df95172 100644
--- a/src/main/java/de/hysky/skyblocker/config/categories/SlayersCategory.java
+++ b/src/main/java/de/hysky/skyblocker/config/categories/SlayersCategory.java
@@ -16,7 +16,7 @@ public class SlayersCategory {
public static ConfigCategory create(SkyblockerConfig defaults, SkyblockerConfig config) {
return ConfigCategory.createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.category.slayer"))
-
+
//Vampire Slayer
.group(OptionGroup.createBuilder()
.name(Text.translatable("text.autoconfig.skyblocker.option.slayer.vampireSlayer"))
@@ -110,7 +110,7 @@ public class SlayersCategory {
.controller(opt -> IntegerSliderControllerBuilder.create(opt).range(1, 10).step(1))
.build())
.build())
-
+
.build();
}
}
diff --git a/src/main/java/de/hysky/skyblocker/mixin/HandledScreenMixin.java b/src/main/java/de/hysky/skyblocker/mixin/HandledScreenMixin.java
index b037d45a..a6691fe8 100644
--- a/src/main/java/de/hysky/skyblocker/mixin/HandledScreenMixin.java
+++ b/src/main/java/de/hysky/skyblocker/mixin/HandledScreenMixin.java
@@ -45,11 +45,11 @@ public abstract class HandledScreenMixin<T extends ScreenHandler> extends Screen
*/
@Unique
private static final int OUT_OF_BOUNDS_SLOT = -999;
-
+
@Shadow
@Nullable
protected Slot focusedSlot;
-
+
@Shadow
@Final
protected T handler;
@@ -133,7 +133,7 @@ public abstract class HandledScreenMixin<T extends ScreenHandler> extends Screen
}
}
}
-
+
/**
* The naming of this method in yarn is half true, its mostly to handle slot/item interactions (which are mouse or keyboard clicks)
* For example, using the drop key bind while hovering over an item will invoke this method to drop the players item
@@ -147,7 +147,7 @@ public abstract class HandledScreenMixin<T extends ScreenHandler> extends Screen
if (ItemProtection.isItemProtected(cursorStack)) ci.cancel();
}
-
+
if (slot != null) {
// When you click your drop key while hovering over an item
if (actionType == SlotActionType.THROW) {
@@ -155,33 +155,33 @@ public abstract class HandledScreenMixin<T extends ScreenHandler> extends Screen
if (ItemProtection.isItemProtected(stack)) ci.cancel();
}
-
+
//Prevent salvaging
if (this.getTitle().getString().equals("Salvage Items")) {
ItemStack stack = slot.getStack();
if (ItemProtection.isItemProtected(stack)) ci.cancel();
}
-
+
//Prevent selling to NPC shops
if (this.client != null && this.handler instanceof GenericContainerScreenHandler genericContainerScreenHandler && genericContainerScreenHandler.getRows() == 6) {
ItemStack sellItem = this.handler.slots.get(49).getStack();
-
+
if (sellItem.getName().getString().equals("Sell Item") || skyblocker$doesLoreContain(sellItem, this.client, "buyback")) {
ItemStack stack = slot.getStack();
-
+
if (ItemProtection.isItemProtected(stack)) ci.cancel();
}
}
}
}
}
-
+
//TODO make this a util method somewhere else, eventually
private static boolean skyblocker$doesLoreContain(ItemStack stack, MinecraftClient client, String searchString) {
return stack.getTooltip(client.player, TooltipContext.BASIC).stream().map(Text::getString).anyMatch(line -> line.contains(searchString));
}
-
+
@Inject(method = "drawSlot", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/DrawContext;drawItem(Lnet/minecraft/item/ItemStack;III)V"))
private void skyblocker$drawItemRarityBackground(DrawContext context, Slot slot, CallbackInfo ci) {
if (Utils.isOnSkyblock() && SkyblockerConfigManager.get().general.itemInfoDisplay.itemRarityBackgrounds) ItemRarityBackgrounds.tryDraw(slot.getStack(), context, slot.x, slot.y);
diff --git a/src/main/java/de/hysky/skyblocker/mixin/SocialInteractionsPlayerListWidgetMixin.java b/src/main/java/de/hysky/skyblocker/mixin/SocialInteractionsPlayerListWidgetMixin.java
index 3a60bfbb..cad7cf38 100644
--- a/src/main/java/de/hysky/skyblocker/mixin/SocialInteractionsPlayerListWidgetMixin.java
+++ b/src/main/java/de/hysky/skyblocker/mixin/SocialInteractionsPlayerListWidgetMixin.java
@@ -18,7 +18,7 @@ public class SocialInteractionsPlayerListWidgetMixin {
@WrapOperation(method = "setPlayers", at = @At(value = "INVOKE", target = "Ljava/util/Map;put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", remap = false))
private Object skyblocker$hideInvalidPlayers(Map<Object, Object> map, Object uuid, Object entry, Operation<Object> operation) {
if (Utils.isOnSkyblock() && !((SocialInteractionsPlayerListEntry) entry).getName().matches("[A-Za-z0-9_]+")) return null;
-
+
return operation.call(map, uuid, entry);
}
}
diff --git a/src/main/java/de/hysky/skyblocker/mixin/YggdrasilServicesKeyInfoMixin.java b/src/main/java/de/hysky/skyblocker/mixin/YggdrasilServicesKeyInfoMixin.java
index d38e40cc..3c2bbc9a 100644
--- a/src/main/java/de/hysky/skyblocker/mixin/YggdrasilServicesKeyInfoMixin.java
+++ b/src/main/java/de/hysky/skyblocker/mixin/YggdrasilServicesKeyInfoMixin.java
@@ -51,7 +51,7 @@ public class YggdrasilServicesKeyInfoMixin {
throw e;
}
}
-
+
@WrapOperation(method = "validateProperty", remap = false, at = @At(value = "INVOKE", target = "org/slf4j/Logger.error(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V", remap = false))
private void skyblocker$dontLogFailedSignatureValidation(Logger logger, String message, Object property, Object exception, Operation<Void> operation) {
if (!Utils.isOnHypixel()) operation.call(logger, message, property, exception);
diff --git a/src/main/java/de/hysky/skyblocker/skyblock/dungeon/DungeonMapConfigScreen.java b/src/main/java/de/hysky/skyblocker/skyblock/dungeon/DungeonMapConfigScreen.java
index 145ee2bc..69018cd4 100644
--- a/src/main/java/de/hysky/skyblocker/skyblock/dungeon/DungeonMapConfigScreen.java
+++ b/src/main/java/de/hysky/skyblocker/skyblock/dungeon/DungeonMapConfigScreen.java
@@ -13,7 +13,7 @@ public class DungeonMapConfigScreen extends Screen {
private int hudX = SkyblockerConfigManager.get().locations.dungeons.mapX;
private int hudY = SkyblockerConfigManager.get().locations.dungeons.mapY;
private final Screen parent;
-
+
protected DungeonMapConfigScreen() {
this(null);
}
diff --git a/src/main/java/de/hysky/skyblocker/skyblock/dwarven/DwarvenHudConfigScreen.java b/src/main/java/de/hysky/skyblocker/skyblock/dwarven/DwarvenHudConfigScreen.java
index 2bb21568..f4e6ef84 100644
--- a/src/main/java/de/hysky/skyblocker/skyblock/dwarven/DwarvenHudConfigScreen.java
+++ b/src/main/java/de/hysky/skyblocker/skyblock/dwarven/DwarvenHudConfigScreen.java
@@ -23,7 +23,7 @@ public class DwarvenHudConfigScreen extends Screen {
protected DwarvenHudConfigScreen() {
this(null);
}
-
+
public DwarvenHudConfigScreen(Screen parent) {
super(Text.of("Dwarven HUD Config"));
this.parent = parent;
diff --git a/src/main/java/de/hysky/skyblocker/skyblock/item/ItemRarityBackgrounds.java b/src/main/java/de/hysky/skyblocker/skyblock/item/ItemRarityBackgrounds.java
index 9e1df2bb..da357738 100644
--- a/src/main/java/de/hysky/skyblocker/skyblock/item/ItemRarityBackgrounds.java
+++ b/src/main/java/de/hysky/skyblocker/skyblock/item/ItemRarityBackgrounds.java
@@ -39,27 +39,27 @@ public class ItemRarityBackgrounds {
Map.entry("COMMON", SkyblockItemRarity.COMMON)
);
private static final Int2ReferenceOpenHashMap<SkyblockItemRarity> CACHE = new Int2ReferenceOpenHashMap<>();
-
+
public static void init() {
//Clear the cache every 5 minutes, ints are very compact!
Scheduler.INSTANCE.scheduleCyclic(CACHE::clear, 4800);
-
+
//Clear cache after a screen where items can be upgraded in rarity closes
ScreenEvents.BEFORE_INIT.register((client, screen, scaledWidth, scaledHeight) -> {
String title = screen.getTitle().getString();
-
+
if (Utils.isOnSkyblock() && (title.equals("The Hex") || title.equals("Craft Item") || title.equals("Anvil") || title.equals("Reforge Anvil"))) {
ScreenEvents.remove(screen).register(screen1 -> CACHE.clear());
}
});
}
-
+
public static void tryDraw(ItemStack stack, DrawContext context, int x, int y) {
MinecraftClient client = MinecraftClient.getInstance();
-
+
if (client.player != null) {
SkyblockItemRarity itemRarity = getItemRarity(stack, client.player);
-
+
if (itemRarity != null) draw(context, x, y, itemRarity);
}
}
@@ -73,30 +73,30 @@ public class ItemRarityBackgrounds {
int hashCode = itemUuid.isEmpty() ? System.identityHashCode(stack) : itemUuid.hashCode();
if (CACHE.containsKey(hashCode)) return CACHE.get(hashCode);
-
+
List<Text> tooltip = stack.getTooltip(player, TooltipContext.BASIC);
String[] stringifiedTooltip = tooltip.stream().map(Text::getString).toArray(String[]::new);
-
+
for (String rarityString : LORE_RARITIES.keySet()) {
if (Arrays.stream(stringifiedTooltip).anyMatch(line -> line.contains(rarityString))) {
SkyblockItemRarity rarity = LORE_RARITIES.get(rarityString);
-
+
CACHE.put(hashCode, rarity);
return rarity;
}
}
-
+
CACHE.put(hashCode, null);
return null;
}
-
+
private static void draw(DrawContext context, int x, int y, SkyblockItemRarity rarity) {
//Enable blending to handle HUD translucency
RenderSystem.enableBlend();
RenderSystem.defaultBlendFunc();
context.drawSprite(x, y, 0, 16, 16, SPRITE.get(), rarity.r, rarity.g, rarity.b, SkyblockerConfigManager.get().general.itemInfoDisplay.itemRarityBackgroundsOpacity);
-
+
RenderSystem.disableBlend();
}
}
diff --git a/src/main/java/de/hysky/skyblocker/skyblock/item/SkyblockItemRarity.java b/src/main/java/de/hysky/skyblocker/skyblock/item/SkyblockItemRarity.java
index 08cc5377..07a566af 100644
--- a/src/main/java/de/hysky/skyblocker/skyblock/item/SkyblockItemRarity.java
+++ b/src/main/java/de/hysky/skyblocker/skyblock/item/SkyblockItemRarity.java
@@ -13,7 +13,7 @@ public enum SkyblockItemRarity {
RARE(Formatting.BLUE),
UNCOMMON(Formatting.GREEN),
COMMON(Formatting.WHITE);
-
+
public final float r;
public final float g;
public final float b;
diff --git a/src/main/java/de/hysky/skyblocker/skyblock/itemlist/ItemStackBuilder.java b/src/main/java/de/hysky/skyblocker/skyblock/itemlist/ItemStackBuilder.java
index 4a6d3474..34e4a0e7 100644
--- a/src/main/java/de/hysky/skyblocker/skyblock/itemlist/ItemStackBuilder.java
+++ b/src/main/java/de/hysky/skyblocker/skyblock/itemlist/ItemStackBuilder.java
@@ -92,12 +92,12 @@ public class ItemStackBuilder {
enchantments.add(new NbtCompound());
tag.put("Enchantments", enchantments);
}
-
+
// Add firework star color
Matcher explosionColorMatcher = Pattern.compile("\\{Explosion:\\{(?:Type:[0-9a-z]+,)?Colors:\\[(?<color>[0-9]+)\\]\\}").matcher(nbttag);
if (explosionColorMatcher.find()) {
NbtCompound explosion = new NbtCompound();
-
+
explosion.putInt("Type", FireworkRocketItem.Type.SMALL_BALL.getId()); //Forget about the actual ball type because it probably doesn't matter
explosion.putIntArray("Colors", new int[] { Integer.parseInt(explosionColorMatcher.group("color")) });
tag.put("Explosion", explosion);
diff --git a/src/main/java/de/hysky/skyblocker/skyblock/rift/EffigyWaypoints.java b/src/main/java/de/hysky/skyblocker/skyblock/rift/EffigyWaypoints.java
index a0e1a0f2..7ebf44b0 100644
--- a/src/main/java/de/hysky/skyblocker/skyblock/rift/EffigyWaypoints.java
+++ b/src/main/java/de/hysky/skyblocker/skyblock/rift/EffigyWaypoints.java
@@ -30,15 +30,15 @@ public class EffigyWaypoints {
if (!SkyblockerConfigManager.get().slayer.vampireSlayer.enableEffigyWaypoints || !Utils.isOnSkyblock() || !Utils.isInTheRift() || !Utils.getIslandArea().contains("Stillgore Château")) return;
UNBROKEN_EFFIGIES.clear();
-
+
try {
for (int i = 0; i < Utils.STRING_SCOREBOARD.size(); i++) {
String line = Utils.STRING_SCOREBOARD.get(i);
-
+
if (line.contains("Effigies")) {
List<Text> effigiesText = new ArrayList<>();
List<Text> prefixAndSuffix = Utils.TEXT_SCOREBOARD.get(i).getSiblings();
-
+
//Add contents of prefix and suffix to list
effigiesText.addAll(prefixAndSuffix.get(0).getSiblings());
effigiesText.addAll(prefixAndSuffix.get(1).getSiblings());
diff --git a/src/main/java/de/hysky/skyblocker/skyblock/shortcut/ShortcutsConfigScreen.java b/src/main/java/de/hysky/skyblocker/skyblock/shortcut/ShortcutsConfigScreen.java
index 196ad0d6..a5f8ae2d 100644
--- a/src/main/java/de/hysky/skyblocker/skyblock/shortcut/ShortcutsConfigScreen.java
+++ b/src/main/java/de/hysky/skyblocker/skyblock/shortcut/ShortcutsConfigScreen.java
@@ -19,7 +19,7 @@ public class ShortcutsConfigScreen extends Screen {
private boolean initialized;
private double scrollAmount;
private final Screen parent;
-
+
public ShortcutsConfigScreen() {
this(null);
}
diff --git a/src/main/java/de/hysky/skyblocker/utils/Http.java b/src/main/java/de/hysky/skyblocker/utils/Http.java
index ee500b5a..e0b9ecf8 100644
--- a/src/main/java/de/hysky/skyblocker/utils/Http.java
+++ b/src/main/java/de/hysky/skyblocker/utils/Http.java
@@ -26,7 +26,7 @@ public class Http {
private static final HttpClient HTTP_CLIENT = HttpClient.newBuilder()
.connectTimeout(Duration.ofSeconds(10))
.build();
-
+
public static String sendGetRequest(String url) throws IOException, InterruptedException {
HttpRequest request = HttpRequest.newBuilder()
.GET()
@@ -36,14 +36,14 @@ public class Http {
.version(Version.HTTP_2)
.uri(URI.create(url))
.build();
-
+
HttpResponse<InputStream> response = HTTP_CLIENT.send(request, BodyHandlers.ofInputStream());
InputStream decodedInputStream = getDecodedInputStream(response);
String body = new String(decodedInputStream.readAllBytes());
-
+
return body;
}
-
+
public static HttpHeaders sendHeadRequest(String url) throws IOException, InterruptedException {
HttpRequest request = HttpRequest.newBuilder()
.method("HEAD", BodyPublishers.noBody())
@@ -51,14 +51,14 @@ public class Http {
.version(Version.HTTP_2)
.uri(URI.create(url))
.build();
-
+
HttpResponse<Void> response = HTTP_CLIENT.send(request, BodyHandlers.discarding());
return response.headers();
}
-
+
private static InputStream getDecodedInputStream(HttpResponse<InputStream> response) {
String encoding = getContentEncoding(response);
-
+
try {
switch (encoding) {
case "":
@@ -74,15 +74,15 @@ public class Http {
throw new UncheckedIOException(e);
}
}
-
+
private static String getContentEncoding(HttpResponse<InputStream> response) {
return response.headers().firstValue("Content-Encoding").orElse("");
}
-
+
public static String getEtag(HttpHeaders headers) {
return headers.firstValue("Etag").orElse("");
}
-
+
public static String getLastModified(HttpHeaders headers) {
return headers.firstValue("Last-Modified").orElse("");
}
diff --git a/src/main/java/de/hysky/skyblocker/utils/SlayerUtils.java b/src/main/java/de/hysky/skyblocker/utils/SlayerUtils.java
index 0a42c6ae..2edd61f1 100644
--- a/src/main/java/de/hysky/skyblocker/utils/SlayerUtils.java
+++ b/src/main/java/de/hysky/skyblocker/utils/SlayerUtils.java
@@ -42,13 +42,13 @@ public class SlayerUtils {
try {
for (int i = 0; i < Utils.STRING_SCOREBOARD.size(); i++) {
String line = Utils.STRING_SCOREBOARD.get(i);
-
+
if (line.contains("Slay the boss!")) return true;
}
} catch (NullPointerException e) {
LOGGER.error("[Skyblocker] Error while checking if player is in slayer", e);
}
-
+
return false;
}
} \ No newline at end of file
diff --git a/src/main/java/de/hysky/skyblocker/utils/render/title/TitleContainerConfigScreen.java b/src/main/java/de/hysky/skyblocker/utils/render/title/TitleContainerConfigScreen.java
index 5a42eeb4..d824c546 100644
--- a/src/main/java/de/hysky/skyblocker/utils/render/title/TitleContainerConfigScreen.java
+++ b/src/main/java/de/hysky/skyblocker/utils/render/title/TitleContainerConfigScreen.java
@@ -21,7 +21,7 @@ public class TitleContainerConfigScreen extends Screen {
private float hudX = SkyblockerConfigManager.get().general.titleContainer.x;
private float hudY = SkyblockerConfigManager.get().general.titleContainer.y;
private final Screen parent;
-
+
protected TitleContainerConfigScreen() {
this(null);
}
diff --git a/src/main/java/de/hysky/skyblocker/utils/scheduler/Scheduler.java b/src/main/java/de/hysky/skyblocker/utils/scheduler/Scheduler.java
index b254f524..139ac05e 100644
--- a/src/main/java/de/hysky/skyblocker/utils/scheduler/Scheduler.java
+++ b/src/main/java/de/hysky/skyblocker/utils/scheduler/Scheduler.java
@@ -28,14 +28,14 @@ public class Scheduler {
protected Scheduler() {
}
-
+
/**
* @see #schedule(Runnable, int, boolean)
*/
public void schedule(Runnable task, int delay) {
schedule(task, delay, false);
}
-
+
/**
* @see #scheduleCyclic(Runnable, int, boolean)
*/