aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/core/config/gui/GuiPositionEditor.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/garden/PlotMenuHighlightingConfig.java2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/RewardWarningConfig.java2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningNotificationsConfig.java14
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/ClickType.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/FriendAPI.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/PurseAPI.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/QuiverAPI.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/mob/Mob.kt11
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/mob/MobData.kt7
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/mob/MobDetection.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/mob/MobFilter.kt11
-rw-r--r--src/main/java/at/hannibal2/skyhanni/events/GuiContainerEvent.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/events/PacketEvent.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/events/mining/FossilExcavationEvent.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/easter/EasterEggWaypoints.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/easter/EggEntrances.kt40
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/TotemOfCorruption.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/OdgerWaypoint.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt25
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropMilestoneFix.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenPlotAPI.kt21
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/SensitivityReducer.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFGuideGUI.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFTypes.kt16
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FarmingItems.kt26
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestFinder.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestSpawn.kt7
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/pests/StereoHarmonyDisplay.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorSupercraft.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorListener.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorRewardWarning.kt9
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboard.kt13
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardPattern.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/MovementSpeedDisplay.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboTimeTracker.kt7
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/teleportpad/TeleportPadCompactName.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/visualwords/VisualWordGui.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/SulphurSkitterBox.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt25
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/mixins/transformers/AccessorRendererLivingEntity.java1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt9
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/ConfigUtils.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/HolographicEntities.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt6
52 files changed, 239 insertions, 100 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/core/config/gui/GuiPositionEditor.kt b/src/main/java/at/hannibal2/skyhanni/config/core/config/gui/GuiPositionEditor.kt
index 20491ce3e..4c1ca6ca1 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/core/config/gui/GuiPositionEditor.kt
+++ b/src/main/java/at/hannibal2/skyhanni/config/core/config/gui/GuiPositionEditor.kt
@@ -148,7 +148,6 @@ class GuiPositionEditor(private val positions: List<Position>, private val borde
override fun mouseClicked(originalX: Int, priginalY: Int, mouseButton: Int) {
super.mouseClicked(originalX, priginalY, mouseButton)
-
val mouseX = Mouse.getX() * width / Minecraft.getMinecraft().displayWidth
val mouseY = height - Mouse.getY() * height / Minecraft.getMinecraft().displayHeight - 1
for (i in positions.indices.reversed()) {
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/PlotMenuHighlightingConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/PlotMenuHighlightingConfig.java
index 441509afd..6019f9f37 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/garden/PlotMenuHighlightingConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/PlotMenuHighlightingConfig.java
@@ -33,7 +33,7 @@ public class PlotMenuHighlightingConfig {
SPRAYS("§6Sprays", LorenzColor.GOLD),
LOCKED("§7Locked", LorenzColor.DARK_GRAY),
CURRENT("§aCurrent plot", LorenzColor.GREEN),
- PASTING("§ePasting", LorenzColor.YELLOW)
+ PASTING("§ePasting", LorenzColor.YELLOW),
;
public final String name;
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/RewardWarningConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/RewardWarningConfig.java
index 2ea448148..f3cafae08 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/RewardWarningConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/RewardWarningConfig.java
@@ -60,7 +60,7 @@ public class RewardWarningConfig {
@ConfigOption(
name = "Coins Per Copper",
desc = "The price to use for the below options.\n" +
- "Requires one of the below options to be on."
+ "Requires one of the below options to be on."
)
@ConfigEditorSlider(minValue = 1, maxValue = 50_000, minStep = 250)
public int coinsPerCopperPrice = 6_000;
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningNotificationsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningNotificationsConfig.java
index 59a74b879..0c1461183 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningNotificationsConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningNotificationsConfig.java
@@ -22,16 +22,16 @@ public class MiningNotificationsConfig {
@Expose
@ConfigOption(
- name = "Notification List",
- desc = "Drag text to change which events send a title."
+ name = "Notification List",
+ desc = "Drag text to change which events send a title."
)
@ConfigEditorDraggableList
public List<MiningNotificationList> notifications = new ArrayList<>(Arrays.asList(
- MiningNotificationList.MINESHAFT_SPAWN,
- MiningNotificationList.SCRAP,
- MiningNotificationList.COLD,
- MiningNotificationList.GOLDEN_GOBLIN,
- MiningNotificationList.DIAMOND_GOBLIN
+ MiningNotificationList.MINESHAFT_SPAWN,
+ MiningNotificationList.SCRAP,
+ MiningNotificationList.COLD,
+ MiningNotificationList.GOLDEN_GOBLIN,
+ MiningNotificationList.DIAMOND_GOBLIN
));
@Expose
diff --git a/src/main/java/at/hannibal2/skyhanni/data/ClickType.kt b/src/main/java/at/hannibal2/skyhanni/data/ClickType.kt
index b008978f0..97b3fc87a 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/ClickType.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/ClickType.kt
@@ -1,5 +1,6 @@
package at.hannibal2.skyhanni.data
enum class ClickType {
- LEFT_CLICK, RIGHT_CLICK
+ LEFT_CLICK,
+ RIGHT_CLICK,
}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/FriendAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/FriendAPI.kt
index 224ce9979..2815db0ab 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/FriendAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/FriendAPI.kt
@@ -33,6 +33,7 @@ object FriendAPI {
"addbest",
".*\n(?<name>.*)§a is now a best friend!§r§9§m\n.*"
)
+
/**
* REGEX-TEST:
* §eClick here to view §bAaronL_Jackson§e's profile
diff --git a/src/main/java/at/hannibal2/skyhanni/data/PurseAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/PurseAPI.kt
index ff8f4b5e4..9bbccc161 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/PurseAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/PurseAPI.kt
@@ -24,7 +24,7 @@ object PurseAPI {
private var inventoryCloseTime = 0L
var currentPurse = 0.0
- private set
+ private set
@SubscribeEvent
fun onInventoryClose(event: InventoryCloseEvent) {
diff --git a/src/main/java/at/hannibal2/skyhanni/data/QuiverAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/QuiverAPI.kt
index 702e29cb5..662d2e921 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/QuiverAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/QuiverAPI.kt
@@ -263,8 +263,8 @@ object QuiverAPI {
private fun checkChestplate() {
val wasWearing = wearingSkeletonMasterChestplate
- wearingSkeletonMasterChestplate = InventoryUtils.getChestplate()?.getInternalName()?.equals(
- SKELETON_MASTER_CHESTPLATE) ?: false
+ wearingSkeletonMasterChestplate =
+ InventoryUtils.getChestplate()?.getInternalName() == SKELETON_MASTER_CHESTPLATE
if (wasWearing != wearingSkeletonMasterChestplate) {
QuiverUpdateEvent(currentArrow, currentAmount, shouldHideAmount()).postAndCatch()
}
diff --git a/src/main/java/at/hannibal2/skyhanni/data/mob/Mob.kt b/src/main/java/at/hannibal2/skyhanni/data/mob/Mob.kt
index d35d46759..4a9323ae2 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/mob/Mob.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/mob/Mob.kt
@@ -83,7 +83,16 @@ class Mob(
val extraEntities: List<EntityLivingBase> = extraEntitiesList
enum class Type {
- DISPLAY_NPC, SUMMON, BASIC, DUNGEON, BOSS, SLAYER, PLAYER, PROJECTILE, SPECIAL;
+ DISPLAY_NPC,
+ SUMMON,
+ BASIC,
+ DUNGEON,
+ BOSS,
+ SLAYER,
+ PLAYER,
+ PROJECTILE,
+ SPECIAL,
+ ;
fun isSkyblockMob() = when (this) {
BASIC, DUNGEON, BOSS, SLAYER -> true
diff --git a/src/main/java/at/hannibal2/skyhanni/data/mob/MobData.kt b/src/main/java/at/hannibal2/skyhanni/data/mob/MobData.kt
index 9ed5a4497..b8bf67f81 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/mob/MobData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/mob/MobData.kt
@@ -43,7 +43,10 @@ class MobData {
}
internal enum class Result {
- Found, NotYetFound, Illegal, SomethingWentWrong
+ Found,
+ NotYetFound,
+ Illegal,
+ SomethingWentWrong,
}
internal class MobResult(val result: Result, val mob: Mob?) {
@@ -71,7 +74,7 @@ class MobData {
internal class RetryEntityInstancing(
var entity: EntityLivingBase,
var times: Int,
- val roughType: MobType
+ val roughType: MobType,
) {
override fun hashCode() = entity.entityId
override fun equals(other: Any?) = (other as? RetryEntityInstancing).hashCode() == this.hashCode()
diff --git a/src/main/java/at/hannibal2/skyhanni/data/mob/MobDetection.kt b/src/main/java/at/hannibal2/skyhanni/data/mob/MobDetection.kt
index b31b2a47b..5629eefcf 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/mob/MobDetection.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/mob/MobDetection.kt
@@ -168,7 +168,9 @@ class MobDetection {
/** For mobs that have default health of the entity */
private enum class EntityPacketType {
- SPIRIT_BAT, VILLAGER, CREEPER_VAIL
+ SPIRIT_BAT,
+ VILLAGER,
+ CREEPER_VAIL,
}
/** Handles some mobs that have default health of the entity, specially using the [EntityHealthUpdateEvent] */
diff --git a/src/main/java/at/hannibal2/skyhanni/data/mob/MobFilter.kt b/src/main/java/at/hannibal2/skyhanni/data/mob/MobFilter.kt
index 134274620..33ab90e60 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/mob/MobFilter.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/mob/MobFilter.kt
@@ -91,7 +91,16 @@ object MobFilter {
const val MINION_MOB_PREFIX = "Minion Mob "
enum class DungeonAttribute {
- Flaming, Stormy, Speedy, Fortified, Healthy, Healing, Boomer, Golden, Stealth;
+ Flaming,
+ Stormy,
+ Speedy,
+ Fortified,
+ Healthy,
+ Healing,
+ Boomer,
+ Golden,
+ Stealth,
+ ;
companion object {
diff --git a/src/main/java/at/hannibal2/skyhanni/events/GuiContainerEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/GuiContainerEvent.kt
index 442603257..b11f75733 100644
--- a/src/main/java/at/hannibal2/skyhanni/events/GuiContainerEvent.kt
+++ b/src/main/java/at/hannibal2/skyhanni/events/GuiContainerEvent.kt
@@ -59,7 +59,6 @@ abstract class GuiContainerEvent(open val gui: GuiContainer, open val container:
val clickType: Int,
) : GuiContainerEvent(gui, container) {
-
fun makePickblock() {
if (this.clickedButton == 2 && this.clickType == 3) return
slot?.slotNumber?.let { slotNumber ->
diff --git a/src/main/java/at/hannibal2/skyhanni/events/PacketEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/PacketEvent.kt
index 1c9905ce6..961699a40 100644
--- a/src/main/java/at/hannibal2/skyhanni/events/PacketEvent.kt
+++ b/src/main/java/at/hannibal2/skyhanni/events/PacketEvent.kt
@@ -41,6 +41,7 @@ abstract class PacketEvent : LorenzEvent() {
}
enum class Direction {
- INBOUND, OUTBOUND
+ INBOUND,
+ OUTBOUND,
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/events/mining/FossilExcavationEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/mining/FossilExcavationEvent.kt
index b672def95..98b18a83f 100644
--- a/src/main/java/at/hannibal2/skyhanni/events/mining/FossilExcavationEvent.kt
+++ b/src/main/java/at/hannibal2/skyhanni/events/mining/FossilExcavationEvent.kt
@@ -2,4 +2,4 @@ package at.hannibal2.skyhanni.events.mining
import at.hannibal2.skyhanni.events.LorenzEvent
-class FossilExcavationEvent(val loot: List<Pair<String, Int>>): LorenzEvent()
+class FossilExcavationEvent(val loot: List<Pair<String, Int>>) : LorenzEvent()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/easter/EasterEggWaypoints.kt b/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/easter/EasterEggWaypoints.kt
index 0017e9098..1a8fde100 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/easter/EasterEggWaypoints.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/easter/EasterEggWaypoints.kt
@@ -87,7 +87,7 @@ class EasterEggWaypoints {
}
// TODO use regex with the help of knowing the original lore. Will most likely need to wait until next egg event
-
+
/*
Title:
§e§lHYPIXEL
@@ -113,5 +113,6 @@ class EasterEggWaypoints {
val c = ScoreboardData.sidebarLinesFormatted.any { it.contains("Easter Eggs") }
return a && b && c
}
+
private fun isEnabled() = HypixelData.hypixelLive && !LorenzUtils.inSkyBlock
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/easter/EggEntrances.kt b/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/easter/EggEntrances.kt
index a369e405a..31663b403 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/easter/EggEntrances.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/easter/EggEntrances.kt
@@ -8,10 +8,20 @@ enum class EggEntrances(
vararg val easterEgg: EasterEgg,
) {
- EASTER_EGG_ENTER_12_13_1_28_1("#12, #13, #28 (tunnel)", LorenzVec(126, 52, 175), EasterEgg.EASTER_EGG_12, EasterEgg.EASTER_EGG_13, EasterEgg.EASTER_EGG_28),
+ EASTER_EGG_ENTER_12_13_1_28_1(
+ "#12, #13, #28 (tunnel)",
+ LorenzVec(126, 52, 175),
+ EasterEgg.EASTER_EGG_12,
+ EasterEgg.EASTER_EGG_13,
+ EasterEgg.EASTER_EGG_28
+ ),
EASTER_EGG_ENTER_13_2("#13 (keep going, stay on your left [<--])", LorenzVec(144, 30, 19), EasterEgg.EASTER_EGG_13),
EASTER_EGG_ENTER_13_3("#13 (enter here)", LorenzVec(107, 42, -47), EasterEgg.EASTER_EGG_13),
- EASTER_EGG_ENTER_13_4("#13 (straight ahead, don't take the stairs)", LorenzVec(105, 49, -34), EasterEgg.EASTER_EGG_13),
+ EASTER_EGG_ENTER_13_4(
+ "#13 (straight ahead, don't take the stairs)",
+ LorenzVec(105, 49, -34),
+ EasterEgg.EASTER_EGG_13
+ ),
EASTER_EGG_ENTER_14_1("#14 (enter here)", LorenzVec(159, 68, -25), EasterEgg.EASTER_EGG_14),
EASTER_EGG_ENTER_14_2("#14 (right turn [-->] here)", LorenzVec(153, 68, -8), EasterEgg.EASTER_EGG_14),
EASTER_EGG_ENTER_14_3("#14 (left turn [<--] here)", LorenzVec(143, 68, -8), EasterEgg.EASTER_EGG_14),
@@ -19,16 +29,34 @@ enum class EggEntrances(
EASTER_EGG_ENTER_18_2("#18 (through this painting)", LorenzVec(142, 56, -82), EasterEgg.EASTER_EGG_18),
EASTER_EGG_ENTER_21("#21 (through the waterfall)", LorenzVec(-137, 64, -82), EasterEgg.EASTER_EGG_21),
EASTER_EGG_ENTER_28_2("#13, #28 (right turn [-->] here)", LorenzVec(94, 35, 145), EasterEgg.EASTER_EGG_28),
- EASTER_EGG_ENTER_28_3("#13, #28 (straight ahead, stay on your right [-->])", LorenzVec(92, 21, 107), EasterEgg.EASTER_EGG_28),
- EASTER_EGG_ENTER_29_2("#29 (straight ahead, stay on your right [-->])", LorenzVec(16, 32, 2), EasterEgg.EASTER_EGG_29),
+ EASTER_EGG_ENTER_28_3(
+ "#13, #28 (straight ahead, stay on your right [-->])",
+ LorenzVec(92, 21, 107),
+ EasterEgg.EASTER_EGG_28
+ ),
+ EASTER_EGG_ENTER_29_2(
+ "#29 (straight ahead, stay on your right [-->])",
+ LorenzVec(16, 32, 2),
+ EasterEgg.EASTER_EGG_29
+ ),
EASTER_EGG_ENTER_29_3("#29 (enter here)", LorenzVec(54, 22, 60), EasterEgg.EASTER_EGG_29),
EASTER_EGG_ENTER_29_4("#29 (up stairs, make left turn [<--])", LorenzVec(25, 25, 51), EasterEgg.EASTER_EGG_29),
- EASTER_EGG_ENTER_29_5("#29 (up stairs, make left turn [<--] again)", LorenzVec(17, 32, 66), EasterEgg.EASTER_EGG_29),
+ EASTER_EGG_ENTER_29_5(
+ "#29 (up stairs, make left turn [<--] again)",
+ LorenzVec(17, 32, 66),
+ EasterEgg.EASTER_EGG_29
+ ),
EASTER_EGG_ENTER_29_6("#29 (left turn [<--] here)", LorenzVec(35, 37, 66), EasterEgg.EASTER_EGG_29),
EASTER_EGG_ENTER_29_7("#29 (past this door)", LorenzVec(39, 37, 48), EasterEgg.EASTER_EGG_29),
EASTER_EGG_ENTER_30_1("#30 (1st digit, SNEAK + RCLICK)", LorenzVec(143, 65, -30), EasterEgg.EASTER_EGG_30),
EASTER_EGG_ENTER_30_2("#30 (3rd digit, open chest)", LorenzVec(205, 34, -157), EasterEgg.EASTER_EGG_30),
- EASTER_EGG_ENTER_27_29_1_30_3("#27, #29, #30 (inside this well)", LorenzVec(10, 63, 0), EasterEgg.EASTER_EGG_27, EasterEgg.EASTER_EGG_29, EasterEgg.EASTER_EGG_30),
+ EASTER_EGG_ENTER_27_29_1_30_3(
+ "#27, #29, #30 (inside this well)",
+ LorenzVec(10, 63, 0),
+ EasterEgg.EASTER_EGG_27,
+ EasterEgg.EASTER_EGG_29,
+ EasterEgg.EASTER_EGG_30
+ ),
EASTER_EGG_ENTER_30_4("#30 (left turn [<--] here)", LorenzVec(-28, 42, 14), EasterEgg.EASTER_EGG_30),
EASTER_EGG_ENTER_30_5("#30 Vault (brute force 2nd digit)", LorenzVec(-35, 25, 63), EasterEgg.EASTER_EGG_30),
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/TotemOfCorruption.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/TotemOfCorruption.kt
index b0ff26ef0..3551898cd 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fishing/TotemOfCorruption.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/TotemOfCorruption.kt
@@ -134,7 +134,6 @@ class TotemOfCorruption {
}
}
-
private fun createDisplay() = buildList {
val totem = getTotemToShow() ?: return@buildList
add("§5§lTotem of Corruption")
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/OdgerWaypoint.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/OdgerWaypoint.kt
index ee9c4b44b..8337e367d 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/OdgerWaypoint.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/OdgerWaypoint.kt
@@ -27,7 +27,7 @@ class OdgerWaypoint {
fun onTick(event: LorenzTickEvent) {
if (!isEnabled() || !event.isMod(10)) return
trophyFishInInventory = InventoryUtils.getItemsInOwnInventory()
- .any { it.getItemCategoryOrNull() == ItemCategory.TROPHY_FISH }
+ .any { it.getItemCategoryOrNull() == ItemCategory.TROPHY_FISH }
}
@SubscribeEvent
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt
index 3f81d5732..586829185 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt
@@ -135,11 +135,12 @@ object FarmingFortuneDisplay {
}
private fun update() {
- display = if (gardenJoinTime.passedSince() > 5.seconds && !foundTabUniversalFortune && !gardenJoinTime.isFarPast()) {
- drawMissingFortuneDisplay(false)
- } else if (firstBrokenCropTime.passedSince() > 10.seconds && !foundTabCropFortune && !firstBrokenCropTime.isFarPast()) {
- drawMissingFortuneDisplay(true)
- } else drawDisplay()
+ display =
+ if (gardenJoinTime.passedSince() > 5.seconds && !foundTabUniversalFortune && !gardenJoinTime.isFarPast()) {
+ drawMissingFortuneDisplay(false)
+ } else if (firstBrokenCropTime.passedSince() > 10.seconds && !foundTabCropFortune && !firstBrokenCropTime.isFarPast()) {
+ drawMissingFortuneDisplay(true)
+ } else drawDisplay()
}
private fun drawDisplay() = buildList {
@@ -157,11 +158,13 @@ object FarmingFortuneDisplay {
}
} else getCurrentFarmingFortune()
- list.add(Renderable.string(
- "§6Farming Fortune§7: §e" + if (!recentlySwitchedTool && farmingFortune != -1.0) {
- farmingFortune.round(0).addSeparators()
- } else "§7" + (displayCrop.getLatestTrueFarmingFortune()?.addSeparators() ?: "?")
- ))
+ list.add(
+ Renderable.string(
+ "§6Farming Fortune§7: §e" + if (!recentlySwitchedTool && farmingFortune != -1.0) {
+ farmingFortune.round(0).addSeparators()
+ } else "§7" + (displayCrop.getLatestTrueFarmingFortune()?.addSeparators() ?: "?")
+ )
+ )
add(Renderable.horizontalContainer(list))
val ffReduction = getPestFFReduction()
@@ -212,7 +215,7 @@ object FarmingFortuneDisplay {
if (lastUniversalFortuneMissingError.passedSince() < 1.minutes) return
ChatUtils.clickableChat(
"§cCan not read Farming Fortune from tab list! Open /widget and enable the Stats Widget " +
- "and showing the Farming Fortune stat.",
+ "and showing the Farming Fortune stat.",
command = "widget"
)
lastUniversalFortuneMissingError = SimpleTimeMark.now()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropMilestoneFix.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropMilestoneFix.kt
index f233ab97f..1387aed1d 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropMilestoneFix.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropMilestoneFix.kt
@@ -29,6 +29,7 @@ class GardenCropMilestoneFix {
"levelup",
" {2}§r§b§lGARDEN MILESTONE §3(?<crop>.*) §8.*➜§3(?<tier>.*)"
)
+
/**
* REGEX-TEST: §6§lRARE DROP! §9Mutant Nether Wart §6(§6+1,344☘)
*/
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenPlotAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenPlotAPI.kt
index ee856135f..f71b6dbb0 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenPlotAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenPlotAPI.kt
@@ -34,6 +34,7 @@ object GardenPlotAPI {
"name",
"§.Plot §7- §b(?<name>.*)"
)
+
/**
* REGEX-TEST: §aThe Barn
*/
@@ -41,6 +42,7 @@ object GardenPlotAPI {
"barnname",
"§.(?<name>The Barn)"
)
+
/**
* REGEX-TEST: §7Cleanup: §b0% Completed
*/
@@ -48,6 +50,7 @@ object GardenPlotAPI {
"uncleaned",
"§7Cleanup: .* (?:§.)*Completed"
)
+
/**
* REGEX-TEST: §aUnlocked Garden §r§aPlot §r§7- §r§b10§r§a!
*/
@@ -55,6 +58,7 @@ object GardenPlotAPI {
"chat.unlock",
"§aUnlocked Garden §r§aPlot §r§7- §r§b(?<plot>.*)§r§a!"
)
+
/**
* REGEX-TEST: §aPlot §r§7- §r§b10 §r§ais now clean!
*/
@@ -116,7 +120,20 @@ object GardenPlotAPI {
val type: SprayType,
)
- private fun Plot.getData() = GardenAPI.storage?.plotData?.getOrPut(id) { PlotData(id, "$id", 0, null, null, false, false, false, true, false) }
+ private fun Plot.getData() = GardenAPI.storage?.plotData?.getOrPut(id) {
+ PlotData(
+ id,
+ "$id",
+ 0,
+ null,
+ null,
+ false,
+ false,
+ false,
+ true,
+ false,
+ )
+ }
var Plot.name: String
get() = getData()?.name ?: "$id"
@@ -190,7 +207,7 @@ object GardenPlotAPI {
fun Plot.isPlayerInside() = box.isPlayerInside()
- fun closestCenterPlot(location: LorenzVec) = plots.find {it.box.isInside(location)}?.middle
+ fun closestCenterPlot(location: LorenzVec) = plots.find { it.box.isInside(location) }?.middle
fun Plot.sendTeleportTo() {
if (isBarn()) ChatUtils.sendCommandToServer("tptoplot barn")
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/SensitivityReducer.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/SensitivityReducer.kt
index 4bb5d7937..b7027beb0 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/SensitivityReducer.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/SensitivityReducer.kt
@@ -161,7 +161,6 @@ object SensitivityReducer {
isToggled = state
}
-
fun doTheMath(input: Float, reverse: Boolean = false): Float {
val divisor = config.reducingFactor.get()
return if (!reverse) ((input - LOCKED) / divisor) + LOCKED
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFGuideGUI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFGuideGUI.kt
index 344e24466..0cafabd1c 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFGuideGUI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFGuideGUI.kt
@@ -47,7 +47,10 @@ open class FFGuideGUI : GuiScreen() {
}
20 -> {
- ChatUtils.chat("What do you mean with \"farming fortune\"? This is a web browser!", prefix = false)
+ ChatUtils.chat(
+ "What do you mean with \"farming fortune\"? This is a web browser!",
+ prefix = false
+ )
}
30 -> {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFTypes.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFTypes.kt
index 02d8debc0..16d2e7594 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFTypes.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FFTypes.kt
@@ -1,6 +1,16 @@
package at.hannibal2.skyhanni.features.garden.fortuneguide
enum class FFTypes {
- TOTAL, BASE, REFORGE, ABILITY, GREEN_THUMB, BASE_FF, ANITA, FARMING_LVL, COMMUNITY_SHOP, PLOTS,
- CAKE, PET_ITEM
-} \ No newline at end of file
+ TOTAL,
+ BASE,
+ REFORGE,
+ ABILITY,
+ GREEN_THUMB,
+ BASE_FF,
+ ANITA,
+ FARMING_LVL,
+ COMMUNITY_SHOP,
+ PLOTS,
+ CAKE,
+ PET_ITEM,
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FarmingItems.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FarmingItems.kt
index 4da76872b..f2bd6b360 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FarmingItems.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/FarmingItems.kt
@@ -1,6 +1,26 @@
package at.hannibal2.skyhanni.features.garden.fortuneguide
enum class FarmingItems {
- WHEAT, CARROT, POTATO, NETHER_WART, PUMPKIN, MELON, COCOA_BEANS, SUGAR_CANE, CACTUS, MUSHROOM,
- HELMET, CHESTPLATE, LEGGINGS, BOOTS, NECKLACE, CLOAK, BELT, BRACELET, ELEPHANT, MOOSHROOM_COW, RABBIT, BEE
-} \ No newline at end of file
+ WHEAT,
+ CARROT,
+ POTATO,
+ NETHER_WART,
+ PUMPKIN,
+ MELON,
+ COCOA_BEANS,
+ SUGAR_CANE,
+ CACTUS,
+ MUSHROOM,
+ HELMET,
+ CHESTPLATE,
+ LEGGINGS,
+ BOOTS,
+ NECKLACE,
+ CLOAK,
+ BELT,
+ BRACELET,
+ ELEPHANT,
+ MOOSHROOM_COW,
+ RABBIT,
+ BEE,
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestFinder.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestFinder.kt
index c7c827b5b..9217f5eb6 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestFinder.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestFinder.kt
@@ -54,8 +54,11 @@ class PestFinder {
val plotName = plot.name
val isInaccurate = plot.isPestCountInaccurate
val pestsName = StringUtils.pluralize(pests, "pest")
+ val name = "§e" + if (isInaccurate) "1+?" else {
+ pests
+ } + " §c$pestsName §7in §b$plotName"
val renderable = Renderable.clickAndHover(
- "§e" + if (isInaccurate) "1+?" else {pests} + " §c$pestsName §7in §b$plotName",
+ name,
listOf(
"§7Pests Found: §e" + if (isInaccurate) "Unknown" else pests,
"§7In plot §b$plotName",
@@ -122,7 +125,8 @@ class PestFinder {
val isInaccurate = plot.isPestCountInaccurate
val location = playerLocation.copy(x = middle.x, z = middle.z)
event.drawWaypointFilled(location, LorenzColor.RED.toColor())
- event.drawDynamicText(location, "§e" + if (isInaccurate) "?" else {pests} + " §c$pestsName §7in §b$plotName", 1.5)
+ val text = "§e" + (if (isInaccurate) "?" else pests) + " §c$pestsName §7in §b$plotName"
+ event.drawDynamicText(location, text, 1.5)
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestSpawn.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestSpawn.kt
index 39dc22e5c..b8ef8a2d7 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestSpawn.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestSpawn.kt
@@ -21,6 +21,7 @@ class PestSpawn {
private val config get() = PestAPI.config.pestSpawn
private val patternGroup = RepoPattern.group("garden.pests.spawn")
+
/**
* REGEX-TEST: §6§lGROSS! §7A §6Pest §7has appeared in §aPlot §7- §b4§7!
*/
@@ -28,6 +29,7 @@ class PestSpawn {
"one",
"§6§l.*! §7A §6Pest §7has appeared in §aPlot §7- §b(?<plot>.*)§7!"
)
+
/**
* REGEX-TEST: §6§lGROSS! §7A §6Pest §7has appeared in §aThe Barn§7!
*/
@@ -35,6 +37,7 @@ class PestSpawn {
"onebarn",
"§6§l.*! §7A §6Pest §7has appeared in §a(?<plot>The Barn)§7!"
)
+
/**
* REGEX-TEST: §6§lEWW! §62 Pests §7have spawned in §aPlot §7- §b2§7!
*/
@@ -42,6 +45,7 @@ class PestSpawn {
"multiple",
"§6§l.*! §6(?<amount>\\d) Pests §7have spawned in §aPlot §7- §b(?<plot>.*)§7!"
)
+
/**
* REGEX-TEST: §6§lEWW! §62 Pests §7have spawned in §aThe Barn§7!
*/
@@ -49,6 +53,7 @@ class PestSpawn {
"multiplebarn",
"§6§l.*! §6(?<amount>\\d) Pests §7have spawned in §a(?<plot>The Barn)§7!"
)
+
/**
* REGEX-TEST: §6§lGROSS! §7While you were offline, §6Pests §7spawned in §aPlots §r§b12§r§7, §r§b9§r§7, §r§b5§r§7, §r§b11§r§7 and §r§b3§r§r§7!
*/
@@ -94,7 +99,7 @@ class PestSpawn {
}
offlinePestsSpawn.matchMatcher(message) {
val plots = group("plots")
- plotNames = plots.removeColor().split(", "," and ").toMutableList()
+ plotNames = plots.removeColor().split(", ", " and ").toMutableList()
pestSpawn(0, plotNames, true)
// blocked = true
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/StereoHarmonyDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/StereoHarmonyDisplay.kt
index 9bf615828..a3c8f22dd 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/StereoHarmonyDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/StereoHarmonyDisplay.kt
@@ -38,6 +38,7 @@ class StereoHarmonyDisplay {
"select",
"§aYou are now playing §r§e(?<type>.*)§r§a!"
)
+
/**
* REGEX-TEST: §aYou are no longer playing §r§eNot Just a Pest§r§a!
*/
@@ -51,7 +52,7 @@ class StereoHarmonyDisplay {
private val questionMarkSkull = ItemUtils.createSkull(
"§c?",
"28aa984a-2077-40cc-8de7-e641adf2c497",
- "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNDZiY"+
+ "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNDZiY" +
"TYzMzQ0ZjQ5ZGQxYzRmNTQ4OGU5MjZiZjNkOWUyYjI5OTE2YTZjNTBkNjEwYmI0MGE1MjczZGM4YzgyIn19fQ=="
)
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt
index 2031a2ff1..ab499f1ff 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt
@@ -307,5 +307,9 @@ object GardenVisitorDropStatistics {
}
enum class VisitorRarity {
- UNCOMMON, RARE, LEGENDARY, MYTHIC, SPECIAL,
+ UNCOMMON,
+ RARE,
+ LEGENDARY,
+ MYTHIC,
+ SPECIAL,
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt
index 50779ac60..b86e580aa 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt
@@ -355,7 +355,7 @@ object GardenVisitorFeatures {
}
readingShoppingList = true
- val finalList = toolTip.map { it.removePrefix("§5§o")}.toMutableList()
+ val finalList = toolTip.map { it.removePrefix("§5§o") }.toMutableList()
var offset = 0
for ((i, formattedLine) in finalList.toMutableList().withIndex()) {
val index = i + offset
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorSupercraft.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorSupercraft.kt
index a3afd06ab..e2343af02 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorSupercraft.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorSupercraft.kt
@@ -55,10 +55,14 @@ class GardenVisitorSupercraft {
}
fun getSupercraftForSacks(internalName: NEUInternalName, amount: Int) {
- val ingredients = NEUItems.getRecipes(internalName).first { !it.ingredients.first().internalItemId.contains("PEST") }.ingredients
+ val ingredients = NEUItems.getRecipes(internalName)
+ // TODO describe what this line does
+ .first { !it.ingredients.first().internalItemId.contains("PEST") }
+ .ingredients
val ingredientReqs = mutableMapOf<String, Int>()
for (ingredient in ingredients) {
- ingredientReqs[ingredient.internalItemId] = ingredientReqs.getOrDefault(ingredient.internalItemId, 0) + ingredient.count.toInt()
+ val key = ingredient.internalItemId
+ ingredientReqs[key] = ingredientReqs.getOrDefault(key, 0) + ingredient.count.toInt()
}
hasIngredients = true
for ((key, value) in ingredientReqs) {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorListener.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorListener.kt
index 22d7f4784..1234dd435 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorListener.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorListener.kt
@@ -50,7 +50,6 @@ class VisitorListener {
private val logger = LorenzLogger("garden/visitors/listener")
-
companion object {
private val VISITOR_INFO_ITEM_SLOT = 13
private val VISITOR_ACCEPT_ITEM_SLOT = 29
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorRewardWarning.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorRewardWarning.kt
index 9edc2336f..41e1b59b7 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorRewardWarning.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorRewardWarning.kt
@@ -40,7 +40,8 @@ class VisitorRewardWarning {
}
private fun renderColor(backgroundStack: ItemStack?, outlineStack: ItemStack?, outlineColor: LorenzColor) {
- if (!config.bypassKey.isKeyHeld()) backgroundStack?.background = LorenzColor.DARK_GRAY.addOpacity(config.opacity).rgb
+ if (!config.bypassKey.isKeyHeld()) backgroundStack?.background =
+ LorenzColor.DARK_GRAY.addOpacity(config.opacity).rgb
if (config.optionOutline) outlineStack?.borderLine = outlineColor.addOpacity(200).rgb
}
@@ -56,8 +57,8 @@ class VisitorRewardWarning {
val isRefuseSlot = stack.name == "§cRefuse Offer"
val isAcceptSlot = stack.name == "§aAccept Offer"
- if (blockReason != null && !config.bypassKey.isKeyHeld() &&
- ((blockReason.blockRefusing && isRefuseSlot) || !blockReason.blockRefusing && isAcceptSlot)) {
+ val shouldBlock = blockReason?.run { blockRefusing && isRefuseSlot || !blockRefusing && isAcceptSlot } ?: false
+ if (!config.bypassKey.isKeyHeld() && shouldBlock) {
event.isCanceled = true
return
}
@@ -83,7 +84,7 @@ class VisitorRewardWarning {
val isRefuseSlot = event.itemStack.name == "§cRefuse Offer"
val isAcceptSlot = event.itemStack.name == "§aAccept Offer"
- val blockReason = visitor.blockReason?: return
+ val blockReason = visitor.blockReason ?: return
if (blockReason.blockRefusing && !isRefuseSlot) return
if (!blockReason.blockRefusing && !isAcceptSlot) return
diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboard.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboard.kt
index 78f0ed6d4..329b09f0e 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboard.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboard.kt
@@ -178,7 +178,11 @@ class CustomScoreboard {
val displayConfigPrefix = "$prefix.displayConfig"
val displayPrefix = "$prefix.display"
- event.move(28, "$prefix.displayConfig.showAllActiveEvents", "$prefix.displayConfig.eventsConfig.showAllActiveEvents")
+ event.move(
+ 28,
+ "$prefix.displayConfig.showAllActiveEvents",
+ "$prefix.displayConfig.eventsConfig.showAllActiveEvents"
+ )
event.move(31, "$displayConfigPrefix.arrowAmountDisplay", "$displayPrefix.arrow.amountDisplay")
event.move(31, "$displayConfigPrefix.colorArrowAmount", "$displayPrefix.arrow.colorArrowAmount")
@@ -191,7 +195,11 @@ class CustomScoreboard {
event.move(31, "$displayConfigPrefix.showMaxIslandPlayers", "$displayPrefix.showMaxIslandPlayers")
event.move(31, "$displayConfigPrefix.numberFormat", "$displayPrefix.numberFormat")
event.move(31, "$displayConfigPrefix.lineSpacing", "$displayPrefix.lineSpacing")
- event.move(31, "$displayConfigPrefix.cacheScoreboardOnIslandSwitch", "$displayPrefix.cacheScoreboardOnIslandSwitch")
+ event.move(
+ 31,
+ "$displayConfigPrefix.cacheScoreboardOnIslandSwitch",
+ "$displayPrefix.cacheScoreboardOnIslandSwitch"
+ )
// Categories
event.move(31, "$displayConfigPrefix.alignment", "$displayPrefix.alignment")
event.move(31, "$displayConfigPrefix.titleAndFooter", "$displayPrefix.titleAndFooter")
@@ -224,6 +232,5 @@ class CustomScoreboard {
newArray
}
-
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt
index b2187a4bd..6cb8c1b39 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardElements.kt
@@ -774,7 +774,6 @@ private fun getFooterDisplayPair(): List<ScoreboardElementType> =
.map { it to displayConfig.titleAndFooter.alignTitleAndFooter }
).flatten()
-
private fun getExtraDisplayPair(): List<ScoreboardElementType> {
if (unknownLines.isEmpty()) return listOf("<hidden>" to HorizontalAlignment.LEFT)
diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardPattern.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardPattern.kt
index 234d0d95a..5d4847957 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardPattern.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardPattern.kt
@@ -412,7 +412,6 @@ object ScoreboardPattern {
"Time spent sitting|with Ävaeìkx: .*"
)
-
// Stats from the tablist
private val tablistGroup = group.group("tablist")
val gemsPattern by tablistGroup.pattern(
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/MovementSpeedDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/MovementSpeedDisplay.kt
index 50ce4be9d..d9df6321b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/MovementSpeedDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/MovementSpeedDisplay.kt
@@ -25,7 +25,7 @@ class MovementSpeedDisplay {
/**
* This speed value represents the movement speed in blocks per second.
* This has nothing to do with the speed stat.
- */
+ */
var speed = 0.0
var usingSoulsandSpeed = false
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt
index 4bdcd4a3b..f5bd15750 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/compacttablist/AdvancedPlayerList.kt
@@ -105,11 +105,12 @@ object AdvancedPlayerList {
playerData.nameSuffix = ""
}
} catch (e: NumberFormatException) {
- ErrorManager.logErrorWithData(e, "Advanced Player List failed to parse user name",
+ ErrorManager.logErrorWithData(
+ e, "Advanced Player List failed to parse user name",
"line" to line,
"i" to i,
"original" to original,
- )
+ )
}
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboTimeTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboTimeTracker.kt
index 9f4fb8c78..32cfd0133 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboTimeTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboTimeTracker.kt
@@ -149,9 +149,12 @@ object LimboTimeTracker {
val limboPB: Int = if (currentPB < timeInLimbo) timeInLimbo else currentPB
var luckString = tryTruncateFloat(userLuck.round(2))
if (userLuck > 0) luckString = "+$luckString"
- var firstMessage = "§fYour current PB is §e${limboPB.seconds}§f, granting you §a$luckString✴ SkyHanni User Luck§f!"
+ var firstMessage =
+ "§fYour current PB is §e${limboPB.seconds}§f, granting you §a$luckString✴ SkyHanni User Luck§f!"
val secondMessage = "§fYou have §e${playtime.seconds} §fof playtime!"
- if ((userLuck == Float.POSITIVE_INFINITY) || (userLuck == Float.NEGATIVE_INFINITY)) firstMessage = "$firstMessage §Zwhat"
+ if (userLuck == Float.POSITIVE_INFINITY || userLuck == Float.NEGATIVE_INFINITY) {
+ firstMessage = "$firstMessage §Zwhat"
+ }
ChatUtils.chat(firstMessage)
ChatUtils.chat(secondMessage)
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/teleportpad/TeleportPadCompactName.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/teleportpad/TeleportPadCompactName.kt
index fa2f5c551..cac99316f 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/teleportpad/TeleportPadCompactName.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/teleportpad/TeleportPadCompactName.kt
@@ -24,7 +24,7 @@ class TeleportPadCompactName {
@SubscribeEvent(priority = EventPriority.HIGH)
fun onRenderLivingB(event: SkyHanniRenderEntityEvent.Specials.Pre<EntityLivingBase>) {
- if (!IslandType.PRIVATE_ISLAND.isInIsland()) return
+ if (!IslandType.PRIVATE_ISLAND.isInIsland()) return
if (!SkyHanniMod.feature.misc.teleportPad.compactName) return
val entity = event.entity
if (entity !is EntityArmorStand) return
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/visualwords/VisualWordGui.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/visualwords/VisualWordGui.kt
index e41803ffb..6761fe74d 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/visualwords/VisualWordGui.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/visualwords/VisualWordGui.kt
@@ -491,8 +491,7 @@ open class VisualWordGui : GuiScreen() {
else if (KeyboardManager.isDeleteWordDown()) {
val lastSpaceIndex = currentText.trimEnd().removeSuffix(" ").lastIndexOf(' ')
if (lastSpaceIndex >= 0) currentText.substring(0, lastSpaceIndex + 1) else ""
- }
- else {
+ } else {
currentText.substring(0, currentText.length - 1)
}
saveTextChanges()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/SulphurSkitterBox.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/SulphurSkitterBox.kt
index 7b73d1fd4..9066df502 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/nether/SulphurSkitterBox.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/nether/SulphurSkitterBox.kt
@@ -100,7 +100,6 @@ class SulphurSkitterBox {
fun isEnabled() =
IslandType.CRIMSON_ISLE.isInIsland() && config.enabled && (!config.onlyWithRods || FishingAPI.holdingLavaRod)
-
@SubscribeEvent
fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) {
event.move(24, "crimsonIsle.sulphurSkitterBoxConfig", "fishing.trophyFishing.sulphurSkitterBox")
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt
index f06a997ec..c656cc726 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt
@@ -175,19 +175,20 @@ class DailyQuestHelper(val reputationHelper: CrimsonIsleReputationHelper) {
}
private fun renderTownBoard(event: LorenzRenderWorldEvent) {
- if (quests.any {
- it.state == QuestState.READY_TO_COLLECT ||
- it.state == QuestState.NOT_ACCEPTED ||
- (it is RescueMissionQuest && it.state == QuestState.ACCEPTED) }) {
- val location = when (reputationHelper.factionType) {
- FactionType.BARBARIAN -> townBoardBarbarian
- FactionType.MAGE -> townBoardMage
-
- FactionType.NONE -> return
- }
- event.drawWaypointFilled(location, LorenzColor.WHITE.toColor())
- event.drawDynamicText(location, "Town Board", 1.5)
+ if (!quests.any { it.needsTownBoardLocation() }) return
+ val location = when (reputationHelper.factionType) {
+ FactionType.BARBARIAN -> townBoardBarbarian
+ FactionType.MAGE -> townBoardMage
+
+ FactionType.NONE -> return
}
+ event.drawWaypointFilled(location, LorenzColor.WHITE.toColor())
+ event.drawDynamicText(location, "Town Board", 1.5)
+ }
+
+ private fun Quest.needsTownBoardLocation(): Boolean = state.let { state ->
+ state == QuestState.READY_TO_COLLECT || state == QuestState.NOT_ACCEPTED ||
+ (this is RescueMissionQuest && state == QuestState.ACCEPTED)
}
fun render(display: MutableList<List<Any>>) {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt
index 10515d7aa..711b49ffa 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt
@@ -84,7 +84,7 @@ object SlayerProfitTracker {
private val ItemTrackerData.TrackedItem.timesDropped get() = timesGained
private fun addSlayerCosts(price: Double) {
- require(price < 0) {"slayer costs can not be positve"}
+ require(price < 0) { "slayer costs can not be positve" }
getTracker()?.modify {
it.slayerSpawnCost += price.toInt()
}
diff --git a/src/main/java/at/hannibal2/skyhanni/mixins/transformers/AccessorRendererLivingEntity.java b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/AccessorRendererLivingEntity.java
index 7e7a8974f..d762dbb22 100644
--- a/src/main/java/at/hannibal2/skyhanni/mixins/transformers/AccessorRendererLivingEntity.java
+++ b/src/main/java/at/hannibal2/skyhanni/mixins/transformers/AccessorRendererLivingEntity.java
@@ -10,6 +10,7 @@ public interface AccessorRendererLivingEntity<T extends EntityLivingBase>
extends AccessorRender<T> {
@Invoker("setBrightness")
boolean setBrightness_skyhanni(T entitylivingbaseIn, float partialTicks, boolean combineTextures);
+
@Invoker("unsetBrightness")
void setBrightness_skyhanni();
}
diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt b/src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt
index 1b640ed7d..8c82ff0cd 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt
@@ -90,7 +90,14 @@ object ErrorManager {
noStackTrace: Boolean = false,
betaOnly: Boolean = false,
) {
- logError(IllegalStateException(internalMessage), userMessage, ignoreErrorCache, noStackTrace, *extraData, betaOnly = betaOnly)
+ logError(
+ IllegalStateException(internalMessage),
+ userMessage,
+ ignoreErrorCache,
+ noStackTrace,
+ *extraData,
+ betaOnly = betaOnly,
+ )
}
fun logErrorWithData(
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ConfigUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ConfigUtils.kt
index b6f096371..239f250a0 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/ConfigUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/ConfigUtils.kt
@@ -85,7 +85,7 @@ object ConfigUtils {
)
}
- private fun KMutableProperty0<*>.tryJumpToEditor(editor: MoulConfigEditor<*>): Boolean {
+ private fun KMutableProperty0<*>.tryJumpToEditor(editor: MoulConfigEditor<*>): Boolean {
val option = tryFindEditor(editor) ?: return false
editor.search("")
if (!editor.goToOption(option)) return false
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/HolographicEntities.kt b/src/main/java/at/hannibal2/skyhanni/utils/HolographicEntities.kt
index 74345053c..c4de45cbc 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/HolographicEntities.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/HolographicEntities.kt
@@ -41,7 +41,6 @@ import net.minecraft.entity.passive.EntityVillager
import net.minecraft.entity.passive.EntityWolf
import org.lwjgl.opengl.GL11
-
/**
* Utility for creating fake entities without an associated world in order to avoid contaminating the world state.
*/
@@ -137,7 +136,6 @@ object HolographicEntities {
val pig = HolographicBase(EntityPig(null))
val giant = HolographicBase(EntityGiantZombie(null))
-
private fun interpolateRotation(last: Float, next: Float, progress: Float): Float {
var direction: Float = next - last
while (direction < -180.0f) {
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt
index a03795f59..55be8cd3e 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt
@@ -18,7 +18,6 @@ import kotlin.math.round
import kotlin.math.sin
import kotlin.math.sqrt
-
data class LorenzVec(
val x: Double,
val y: Double,
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt b/src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt
index e2df5349f..d266e80ce 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt
@@ -248,12 +248,11 @@ object NumberUtil {
}
}
-
// Sometimes we just take an L, never find it and forget to write it down
val Int.million get() = this * 1_000_000.0
private val Int.billion get() = this * 1_000_000_000.0
val Double.million get() = (this * 1_000_000.0).toLong()
-
+
/** @return clamped to [0.0, 1.0]**/
fun Number.fractionOf(maxValue: Number) = maxValue.toDouble().takeIf { it != 0.0 }?.let { max ->
this.toDouble() / max
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
index 3e8472d63..0c8b2b694 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
@@ -51,7 +51,11 @@ object RenderUtils {
}
}
- enum class VerticalAlignment { TOP, CENTER, BOTTOM }
+ enum class VerticalAlignment {
+ TOP,
+ CENTER,
+ BOTTOM,
+ }
private val beaconBeam = ResourceLocation("textures/entity/beacon_beam.png")