From 73bb93d01904c63d92a0c9deea7c34b8936f7ed9 Mon Sep 17 00:00:00 2001 From: odtheking Date: Sun, 28 Apr 2024 12:57:44 +0300 Subject: [PATCH] ChocolateFactory --- .../src/main/kotlin/me/odinclient/ModCore.kt | 2 +- .../{CookieClicker.kt => ChocolateFactory.kt} | 25 +++++++------------ 2 files changed, 10 insertions(+), 17 deletions(-) rename odinclient/src/main/kotlin/me/odinclient/features/impl/skyblock/{CookieClicker.kt => ChocolateFactory.kt} (50%) diff --git a/odinclient/src/main/kotlin/me/odinclient/ModCore.kt b/odinclient/src/main/kotlin/me/odinclient/ModCore.kt index 8dd002630..c3476d68e 100644 --- a/odinclient/src/main/kotlin/me/odinclient/ModCore.kt +++ b/odinclient/src/main/kotlin/me/odinclient/ModCore.kt @@ -71,7 +71,7 @@ class ModCore { AutoGFS, /*AutoIceFill,*/ AutoSell, CancelInteract, CancelChestOpen, GhostPick, SecretHitboxes, SwapStonk, Arrows, ArrowAlign, CancelWrongTerms, HoverTerms, LightsDevice, SimonSays, DioriteFucker, RelicAura, Trajectories, Ghosts, NoCarpet, NoDebuff, LockCursor, - CookieClicker, AutoExperiments, FarmingHitboxes, NoBlock, TermAC, Triggerbot, GhostBlocks, FreezeGame, + ChocolateFactory, AutoExperiments, FarmingHitboxes, NoBlock, TermAC, Triggerbot, GhostBlocks, FreezeGame, AbilityKeybind, EtherWarpHelper, ChestEsp, NoBreakReset, EscrowFix, TerminalMove, NoPush, SeeThroughBlocks, TerminalAura, AutoTerms ) diff --git a/odinclient/src/main/kotlin/me/odinclient/features/impl/skyblock/CookieClicker.kt b/odinclient/src/main/kotlin/me/odinclient/features/impl/skyblock/ChocolateFactory.kt similarity index 50% rename from odinclient/src/main/kotlin/me/odinclient/features/impl/skyblock/CookieClicker.kt rename to odinclient/src/main/kotlin/me/odinclient/features/impl/skyblock/ChocolateFactory.kt index 1bb5edd6f..20a03156a 100644 --- a/odinclient/src/main/kotlin/me/odinclient/features/impl/skyblock/CookieClicker.kt +++ b/odinclient/src/main/kotlin/me/odinclient/features/impl/skyblock/ChocolateFactory.kt @@ -10,9 +10,9 @@ import net.minecraft.inventory.ContainerChest import net.minecraftforge.client.event.sound.PlaySoundEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -object CookieClicker : Module( - "Cookie Clicker", - description = "Automatically clicks the cookie in the Cookie Clicker menu.", +object ChocolateFactory : Module( + "Chocolate Factory", + description = "Automatically clicks the cookie in the Chocolate Factory menu.", category = Category.SKYBLOCK ) { private val delay: Long by NumberSetting("Delay", 150, 50, 300, 5) @@ -20,13 +20,9 @@ object CookieClicker : Module( init { execute(delay = { delay }) { - val container = mc.thePlayer.openContainer ?: return@execute - if (container !is ContainerChest) return@execute + val container = mc.thePlayer.openContainer as? ContainerChest ?: return@execute - val chestName = container.name - if (chestName.startsWith("Cookie Clicker")) { - windowClick(13, 2, 3) - } + if (container.name == "Chocolate Factory") windowClick(13, 2, 3) } } @@ -34,13 +30,10 @@ object CookieClicker : Module( fun onSoundPlay(event: PlaySoundEvent) { if (!cancelSound) return - val container = mc.thePlayer?.openContainer ?: return - if (container !is ContainerChest) return + val container = mc.thePlayer.openContainer as? ContainerChest ?: return - val chestName = container.lowerChestInventory.displayName.unformattedText - if (!chestName.startsWith("Cookie Clicker")) return - if (event.name == "random.eat" && event.sound.volume.toInt() == 1) { - event.result = null // This should cancel the sound event - } + if (container.name == "Chocolate Factory") windowClick(13, 2, 3) + + if (event.name == "random.eat") event.result = null // This should cancel the sound event } } \ No newline at end of file