diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-10-20 19:50:45 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-10-20 19:50:45 +0200 |
commit | c233f06f5d4c7b054eb7e34e3af51ee02a01387c (patch) | |
tree | fca1d7c0dd5af773c9f1a29bfb0f4436db4eb258 /src | |
parent | dd8f864bae8e0bee81b8be9b791598f764d5df6f (diff) | |
download | skyhanni-c233f06f5d4c7b054eb7e34e3af51ee02a01387c.tar.gz skyhanni-c233f06f5d4c7b054eb7e34e3af51ee02a01387c.tar.bz2 skyhanni-c233f06f5d4c7b054eb7e34e3af51ee02a01387c.zip |
moved the spade into its own member
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaAPI.kt | 6 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt | 4 |
2 files changed, 6 insertions, 4 deletions
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 99795274c..28cc33e1b 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 @@ -6,9 +6,13 @@ import at.hannibal2.skyhanni.data.MayorElection import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland +import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName object DianaAPI { - fun hasSpadeInHand() = InventoryUtils.itemInHandId.equals("ANCESTRAL_SPADE") + + val spade by lazy { "ANCESTRAL_SPADE".asInternalName() } + + fun hasSpadeInHand() = InventoryUtils.itemInHandId == spade private fun isRitualActive() = MayorElection.isPerkActive("Diana", "Mythological Ritual") || MayorElection.isPerkActive("Jerry", "Perkpocalypse") || SkyHanniMod.feature.event.diana.alwaysDiana 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 403581862..486a19d80 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 @@ -9,7 +9,6 @@ import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.PacketEvent import at.hannibal2.skyhanni.utils.BlockUtils.getBlockAt import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName -import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzVec import at.hannibal2.skyhanni.utils.toLorenzVec import net.minecraft.init.Blocks @@ -130,8 +129,7 @@ class GriffinBurrowParticleFinder { } } - private val ItemStack.isSpade - get() = getInternalName().equals("ANCESTRAL_SPADE") + private val ItemStack.isSpade get() = getInternalName() == DianaAPI.spade class Burrow( var location: LorenzVec, |