aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/BurrowWarpHelper.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaAPI.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaProfitTracker.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinPetWarning.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/diana/SoopyGuessBurrow.kt2
8 files changed, 13 insertions, 13 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/BurrowWarpHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/BurrowWarpHelper.kt
index 3c1486467..64219be36 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/BurrowWarpHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/BurrowWarpHelper.kt
@@ -20,7 +20,7 @@ class BurrowWarpHelper {
@SubscribeEvent
fun onKeyClick(event: LorenzKeyPressEvent) {
- if (!DianaAPI.featuresEnabled()) return
+ if (!DianaAPI.isDoingDiana()) return
if (!config.burrowNearestWarp) return
if (event.keyCode != config.keyBindWarp) return
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaAPI.kt
index 972ee4c3a..081136f00 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaAPI.kt
@@ -21,9 +21,9 @@ object DianaAPI {
fun hasGriffinPet() = PetAPI.currentPet?.contains("Griffin") ?: false
- fun featuresEnabled() = IslandType.HUB.isInIsland() && isRitualActive()
+ fun isDoingDiana() = IslandType.HUB.isInIsland() && isRitualActive() && hasSpadeInInventory()
val ItemStack.isDianaSpade get() = getInternalName() == spade
- fun hasSpadeInInventory() = InventoryUtils.getItemsInOwnInventory().any { it.isDianaSpade }
+ private fun hasSpadeInInventory() = InventoryUtils.getItemsInOwnInventory().any { it.isDianaSpade }
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaProfitTracker.kt
index 50da1e97f..e585d8530 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaProfitTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaProfitTracker.kt
@@ -139,5 +139,5 @@ class DianaProfitTracker {
allowedDrops = event.getConstant<DianaDrops>("DianaDrops").diana_drops
}
- fun isEnabled() = DianaAPI.featuresEnabled() && config.enabled && DianaAPI.hasSpadeInInventory()
+ fun isEnabled() = DianaAPI.isDoingDiana() && config.enabled
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt
index 545c34afd..b246b374a 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt
@@ -98,7 +98,7 @@ object GriffinBurrowHelper {
@SubscribeEvent
fun onPlayerMove(event: EntityMoveEvent) {
- if (!DianaAPI.featuresEnabled()) return
+ if (!DianaAPI.isDoingDiana()) return
if (event.distance > 10 && event.entity == Minecraft.getMinecraft().thePlayer) {
teleportedLocation = event.newLocation
}
@@ -106,7 +106,7 @@ object GriffinBurrowHelper {
@SubscribeEvent
fun onChatMessage(event: LorenzChatEvent) {
- if (!DianaAPI.featuresEnabled()) return
+ if (!DianaAPI.isDoingDiana()) return
if (event.message.startsWith("§c ☠ §r§7You were killed by §r")) {
particleBurrows = particleBurrows.editCopy { keys.removeIf { this[it] == BurrowType.MOB } }
}
@@ -146,7 +146,7 @@ object GriffinBurrowHelper {
@SubscribeEvent
fun onRenderWorld(event: LorenzRenderWorldEvent) {
- if (!DianaAPI.featuresEnabled()) return
+ if (!DianaAPI.isDoingDiana()) return
sendTip(event)
val playerLocation = LocationUtils.playerLocation()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt
index 5c28738de..e71a7718b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt
@@ -25,7 +25,7 @@ class GriffinBurrowParticleFinder {
@SubscribeEvent(priority = EventPriority.LOW, receiveCanceled = true)
fun onChatPacket(event: PacketEvent.ReceiveEvent) {
- if (!DianaAPI.featuresEnabled()) return
+ if (!DianaAPI.isDoingDiana()) return
if (!config.burrowsSoopyGuess) return
val packet = event.packet
@@ -96,7 +96,7 @@ class GriffinBurrowParticleFinder {
@SubscribeEvent
fun onChatMessage(event: LorenzChatEvent) {
- if (!DianaAPI.featuresEnabled()) return
+ if (!DianaAPI.isDoingDiana()) return
if (!config.burrowsSoopyGuess) return
val message = event.message
if (message.startsWith("§eYou dug out a Griffin Burrow!") ||
@@ -117,7 +117,7 @@ class GriffinBurrowParticleFinder {
@SubscribeEvent
fun onBlockClick(event: BlockClickEvent) {
- if (!DianaAPI.featuresEnabled()) return
+ if (!DianaAPI.isDoingDiana()) return
if (!config.burrowsSoopyGuess) return
val pos = event.position
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinPetWarning.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinPetWarning.kt
index a756f208b..d49e3199a 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinPetWarning.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinPetWarning.kt
@@ -14,7 +14,7 @@ class GriffinPetWarning {
fun onTick(event: LorenzTickEvent) {
if (!event.isMod(20)) return
if (!SkyHanniMod.feature.event.diana.petWarning) return
- if (!DianaAPI.featuresEnabled()) return
+ if (!DianaAPI.isDoingDiana()) return
if (!DianaAPI.hasSpadeInHand()) return
if (!DianaAPI.hasGriffinPet() && lastWarnTime.passedSince() > 30.seconds) {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt
index 488f7ca09..cebf68a11 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt
@@ -259,7 +259,7 @@ object InquisitorWaypointShare {
}
}
- fun isEnabled() = DianaAPI.featuresEnabled() && config.enabled
+ fun isEnabled() = DianaAPI.isDoingDiana() && config.enabled
fun maybeRemove(inquis: SharedInquisitor) {
if (inquisitorsNearby.isEmpty()) {
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/SoopyGuessBurrow.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/SoopyGuessBurrow.kt
index a0b34e328..f14aa59b9 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/SoopyGuessBurrow.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/SoopyGuessBurrow.kt
@@ -279,5 +279,5 @@ class SoopyGuessBurrow {
}
}
- private fun isEnabled() = DianaAPI.featuresEnabled() && SkyHanniMod.feature.event.diana.burrowsSoopyGuess
+ private fun isEnabled() = DianaAPI.isDoingDiana() && SkyHanniMod.feature.event.diana.burrowsSoopyGuess
}