From 0285ad425aa036ea2a91cb570f92e357b8bddc32 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Fri, 4 Aug 2023 20:54:54 +0200 Subject: moving rift classes around for no reason --- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 4 +- .../skyhanni/features/bazaar/BazaarDataHolder.kt | 2 +- .../skyhanni/features/damageindicator/MobFinder.kt | 2 +- .../features/inventory/HideNotClickableItems.kt | 4 +- .../skyhanni/features/misc/CurrentPetDisplay.kt | 2 +- .../features/misc/NonGodPotEffectDisplay.kt | 2 +- .../features/misc/discordrpc/DiscordStatus.kt | 8 +- .../at/hannibal2/skyhanni/features/rift/RiftAPI.kt | 30 ++ .../hannibal2/skyhanni/features/rift/RiftTimer.kt | 93 ------ .../features/rift/ShowMotesNpcSellPrice.kt | 187 ----------- .../features/rift/VampireSlayerFeatures.kt | 359 --------------------- .../skyhanni/features/rift/area/RiftLarva.kt | 2 +- .../rift/area/colosseum/BlobbercystsHighlight.kt | 2 +- .../rift/area/dreadfarm/RiftAgaricusCap.kt | 2 +- .../area/dreadfarm/RiftWiltedBerberisHelper.kt | 2 +- .../rift/area/dreadfarm/VoltHighlighter.kt | 2 +- .../area/livingcave/LivingCaveDefenseBlocks.kt | 2 +- .../area/livingcave/LivingCaveLivingMetalHelper.kt | 2 +- .../area/livingcave/LivingMetalSuitProgress.kt | 2 +- .../rift/area/mirrorverse/DanceRoomHelper.kt | 2 +- .../rift/area/mirrorverse/RiftLavaMazeParkour.kt | 2 +- .../rift/area/mirrorverse/RiftUpsideDownParkour.kt | 2 +- .../rift/area/mirrorverse/TubulatorParkour.kt | 2 +- .../area/stillgorechateau/RiftBloodEffigies.kt | 2 +- .../features/rift/area/westvillage/KloonHacking.kt | 2 +- .../features/rift/area/wyldwoods/RiftOdonata.kt | 2 +- .../rift/area/wyldwoods/ShyCruxWarnings.kt | 2 +- .../rift/everywhere/CruxTalismanDisplay.kt | 1 + .../rift/everywhere/EnigmaSoulWaypoints.kt | 1 + .../features/rift/everywhere/HighlightRiftGuide.kt | 1 + .../skyhanni/features/rift/everywhere/RiftAPI.kt | 30 -- .../rift/everywhere/RiftHorsezookaHider.kt | 1 + .../features/rift/everywhere/RiftMotesOrb.kt | 1 + .../skyhanni/features/rift/everywhere/RiftTimer.kt | 93 ++++++ .../rift/everywhere/ShowMotesNpcSellPrice.kt | 187 +++++++++++ .../features/slayer/VampireSlayerFeatures.kt | 359 +++++++++++++++++++++ 36 files changed, 699 insertions(+), 700 deletions(-) create mode 100644 src/main/java/at/hannibal2/skyhanni/features/rift/RiftAPI.kt delete mode 100644 src/main/java/at/hannibal2/skyhanni/features/rift/RiftTimer.kt delete mode 100644 src/main/java/at/hannibal2/skyhanni/features/rift/ShowMotesNpcSellPrice.kt delete mode 100644 src/main/java/at/hannibal2/skyhanni/features/rift/VampireSlayerFeatures.kt delete mode 100644 src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/RiftAPI.kt create mode 100644 src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/RiftTimer.kt create mode 100644 src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/ShowMotesNpcSellPrice.kt create mode 100644 src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt (limited to 'src/main/java/at/hannibal2/skyhanni') diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 7e314e16d..5d0c30632 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -70,9 +70,7 @@ import at.hannibal2.skyhanni.features.mobs.AshfangMinisNametagHider import at.hannibal2.skyhanni.features.mobs.MobHighlight import at.hannibal2.skyhanni.features.nether.ashfang.* import at.hannibal2.skyhanni.features.nether.reputationhelper.CrimsonIsleReputationHelper -import at.hannibal2.skyhanni.features.rift.RiftTimer -import at.hannibal2.skyhanni.features.rift.ShowMotesNpcSellPrice -import at.hannibal2.skyhanni.features.rift.VampireSlayerFeatures +import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.features.rift.area.RiftLarva import at.hannibal2.skyhanni.features.rift.area.colosseum.BlobbercystsHighlight import at.hannibal2.skyhanni.features.rift.area.dreadfarm.RiftAgaricusCap diff --git a/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarDataHolder.kt b/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarDataHolder.kt index c6d31cede..043e8c3ac 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarDataHolder.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarDataHolder.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.features.bazaar import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.features.rift.everywhere.RiftAPI +import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.utils.APIUtil import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.LorenzUtils diff --git a/src/main/java/at/hannibal2/skyhanni/features/damageindicator/MobFinder.kt b/src/main/java/at/hannibal2/skyhanni/features/damageindicator/MobFinder.kt index bde581543..f151c6bd5 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/damageindicator/MobFinder.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/damageindicator/MobFinder.kt @@ -4,7 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.withAlpha import at.hannibal2.skyhanni.features.dungeon.DungeonData import at.hannibal2.skyhanni.features.dungeon.DungeonLividFinder -import at.hannibal2.skyhanni.features.rift.everywhere.RiftAPI +import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper import at.hannibal2.skyhanni.utils.* import at.hannibal2.skyhanni.utils.EntityUtils.hasBossHealth diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt index 462414dea..64779d644 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt @@ -8,8 +8,8 @@ import at.hannibal2.skyhanni.events.RepositoryReloadEvent import at.hannibal2.skyhanni.features.bazaar.BazaarApi import at.hannibal2.skyhanni.features.garden.composter.ComposterOverlay import at.hannibal2.skyhanni.features.garden.visitor.GardenVisitorFeatures -import at.hannibal2.skyhanni.features.rift.everywhere.RiftAPI -import at.hannibal2.skyhanni.features.rift.everywhere.RiftAPI.motesNpcPrice +import at.hannibal2.skyhanni.features.rift.RiftAPI +import at.hannibal2.skyhanni.features.rift.RiftAPI.motesNpcPrice import at.hannibal2.skyhanni.utils.* import at.hannibal2.skyhanni.utils.InventoryUtils.getInventoryName import at.hannibal2.skyhanni.utils.ItemUtils.cleanName diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/CurrentPetDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/CurrentPetDisplay.kt index 03648c5d1..c747e5e28 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/CurrentPetDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/CurrentPetDisplay.kt @@ -5,7 +5,7 @@ import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.features.rift.everywhere.RiftAPI +import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.between diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt index 355c0b3f4..6477d7c36 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.misc import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.* -import at.hannibal2.skyhanni.features.rift.everywhere.RiftAPI +import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.test.command.CopyErrorCommand import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.ItemUtils.name diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt index f9caf4146..e2a25b219 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordStatus.kt @@ -3,16 +3,12 @@ package at.hannibal2.skyhanni.features.misc.discordrpc // SkyblockAddons code, adapted for SkyHanni with some additions and fixes import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.data.ActionBarStatsData +import at.hannibal2.skyhanni.data.* import at.hannibal2.skyhanni.data.GardenCropMilestones.Companion.getCounter import at.hannibal2.skyhanni.data.GardenCropMilestones.Companion.getTierForCrops import at.hannibal2.skyhanni.data.GardenCropMilestones.Companion.progressToNextLevel -import at.hannibal2.skyhanni.data.HypixelData -import at.hannibal2.skyhanni.data.IslandType -import at.hannibal2.skyhanni.data.ProfileStorageData -import at.hannibal2.skyhanni.data.ScoreboardData import at.hannibal2.skyhanni.features.garden.GardenAPI.getCropType -import at.hannibal2.skyhanni.features.rift.everywhere.RiftAPI +import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.colorCodeToRarity diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/RiftAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/RiftAPI.kt new file mode 100644 index 000000000..15ff1c658 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/RiftAPI.kt @@ -0,0 +1,30 @@ +package at.hannibal2.skyhanni.features.rift + +import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.config.features.RiftConfig +import at.hannibal2.skyhanni.data.IslandType +import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName_new +import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.NEUInternalName +import net.minecraft.item.ItemStack + +object RiftAPI { + fun inRift() = LorenzUtils.inIsland(IslandType.THE_RIFT) + + val config: RiftConfig get() = SkyHanniMod.feature.rift + + // internal name -> motes + var motesPrice = emptyMap() + + fun ItemStack.motesNpcPrice(): Double? { + val baseMotes = motesPrice[getInternalName_new()] ?: return null + val burgerStacks = config.motes.burgerStacks + val pricePer = baseMotes + (burgerStacks * 5) * baseMotes / 100 + return pricePer * stackSize + } + + fun inLivingCave() = LorenzUtils.skyBlockArea == "Living Cave" + fun inLivingStillness() = LorenzUtils.skyBlockArea == "Living Stillness" + fun inStillgoreChateau() = LorenzUtils.skyBlockArea == "Stillgore Château" || LorenzUtils.skyBlockArea == "Oubliette" + fun inDreadfarm() = LorenzUtils.skyBlockArea == "Dreadfarm" +} \ No newline at end of file diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/RiftTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/RiftTimer.kt deleted file mode 100644 index e9aa4726e..000000000 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/RiftTimer.kt +++ /dev/null @@ -1,93 +0,0 @@ -package at.hannibal2.skyhanni.features.rift - -import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzActionBarEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent -import at.hannibal2.skyhanni.features.rift.everywhere.RiftAPI -import at.hannibal2.skyhanni.utils.LorenzUtils -import at.hannibal2.skyhanni.utils.RenderUtils.renderStrings -import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher -import at.hannibal2.skyhanni.utils.TimeUtils -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent - -class RiftTimer { - private val config get() = RiftAPI.config.timer - private var display = emptyList() - private var maxTime = 0L - private var latestTime = 0L - private val changes = mutableMapOf() - - @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { - display = emptyList() - maxTime = 0 - latestTime = 0 - } - - @SubscribeEvent - fun onActionBar(event: LorenzActionBarEvent) { - if (!isEnabled()) return - - val message = event.message - for (entry in message.split(" ")) { - "§(?[a7])(?