From 85f6fa03d235e2b3ca09b9ae2b3b34dd4bf4fcfb Mon Sep 17 00:00:00 2001 From: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> Date: Mon, 29 May 2023 22:20:27 +1000 Subject: Fortune guide - Mostly done (#160) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../java/at/hannibal2/skyhanni/config/commands/Commands.kt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/main/java/at/hannibal2/skyhanni/config/commands') diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt index 72abc47ca..657f675d7 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt @@ -14,6 +14,8 @@ import at.hannibal2.skyhanni.features.garden.GardenCropTimeCommand import at.hannibal2.skyhanni.features.garden.composter.ComposterOverlay import at.hannibal2.skyhanni.features.garden.farming.CropMoneyDisplay import at.hannibal2.skyhanni.features.garden.farming.CropSpeedMeter +import at.hannibal2.skyhanni.features.garden.fortuneguide.CaptureFarmingGear +import at.hannibal2.skyhanni.features.garden.fortuneguide.FFGuideGUI import at.hannibal2.skyhanni.features.garden.farming.GardenStartLocation import at.hannibal2.skyhanni.features.minion.MinionFeatures import at.hannibal2.skyhanni.features.misc.CollectionCounter @@ -24,6 +26,7 @@ import at.hannibal2.skyhanni.test.SkyHanniTestCommand import at.hannibal2.skyhanni.test.TestBingo import at.hannibal2.skyhanni.test.command.* import at.hannibal2.skyhanni.utils.APIUtil +import at.hannibal2.skyhanni.utils.LorenzUtils import net.minecraft.command.ICommandSender import net.minecraftforge.client.ClientCommandHandler @@ -46,6 +49,8 @@ object Commands { // main commands registerCommand("sh", openMainMenu) registerCommand("skyhanni", openMainMenu) + + registerCommand("ff") { openFortuneGuide() } // for users - regular commands registerCommand("shmarkplayer") { MarkedPlayerManager.command(it) } @@ -90,6 +95,15 @@ object Commands { registerCommand("shcopyerror") { CopyErrorCommand.command(it) } } + @JvmStatic + fun openFortuneGuide() { + if (!LorenzUtils.inSkyBlock) { + LorenzUtils.chat("§cJoin Skyblock to open the fortune guide!") + } else { + CaptureFarmingGear.captureFarmingGear() + SkyHanniMod.screenToOpen = FFGuideGUI() + } + } private fun registerCommand(name: String, function: (Array) -> Unit) { ClientCommandHandler.instance.registerCommand(SimpleCommand(name, createCommand(function))) -- cgit