Skip to content

Commit

Permalink
thx apfelsaft
Browse files Browse the repository at this point in the history
  • Loading branch information
Cephetir committed Apr 5, 2022
1 parent 6ba347b commit 03123b7
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import qolskyblockmod.pizzaclient.features.macros.builder.MacroBuilder
import qolskyblockmod.pizzaclient.features.macros.builder.macros.FarmingMacro
import qolskyblockmod.pizzaclient.features.macros.farming.SugarCaneMacro
import xyz.apfelmus.cf4m.CF4M
import xyz.apfelmus.cheeto.client.modules.world.AutoFarm

class FailSafe : Feature() {
companion object {
Expand Down Expand Up @@ -147,7 +146,7 @@ class FailSafe : Feature() {
Thread {
try {
UChat.chat("§cSkySkipped §f:: §eYou got stuck! Trying to prevent that...")
(CF4M.INSTANCE.moduleManager.getModule("AutoFarm") as AutoFarm).onDisable()
CF4M.INSTANCE.moduleManager.toggle("AutoFarm")
if (Config.failsafeJump) KeyBinding.setKeyBindState(
mc.gameSettings.keyBindJump.keyCode,
true
Expand Down Expand Up @@ -193,7 +192,7 @@ class FailSafe : Feature() {
mc.gameSettings.keyBindJump.keyCode,
false
)
(CF4M.INSTANCE.moduleManager.getModule("AutoFarm") as AutoFarm).onEnable()
CF4M.INSTANCE.moduleManager.toggle("AutoFarm")
called = false
ticks = 0
} catch (e: InterruptedException) {
Expand Down Expand Up @@ -224,7 +223,7 @@ class FailSafe : Feature() {
MacroBuilder.onKey()
} else if (Loader.isModLoaded("ChromaHUD") && CF4M.INSTANCE.moduleManager.isEnabled("AutoFarm")) {
UChat.chat("§cSkySkipped §f:: §eJacob event started! Stopping macro...")
(CF4M.INSTANCE.moduleManager.getModule("AutoFarm") as AutoFarm).onDisable()
CF4M.INSTANCE.moduleManager.toggle("AutoFarm")
}
}
}
Expand Down Expand Up @@ -304,15 +303,15 @@ class FailSafe : Feature() {
Thread {
try {
UChat.chat("§cSkySkipped §f:: §eDesync detected! Swapping lobbies...")
(CF4M.INSTANCE.moduleManager.getModule("AutoFarm") as AutoFarm).onDisable()
CF4M.INSTANCE.moduleManager.toggle("AutoFarm")

Thread.sleep(100L)
mc.thePlayer.sendChatMessage("/hub")
Thread.sleep(5000L)
mc.thePlayer.sendChatMessage("/is")
Thread.sleep(1000L)

(CF4M.INSTANCE.moduleManager.getModule("AutoFarm") as AutoFarm).onEnable()
CF4M.INSTANCE.moduleManager.toggle("AutoFarm")
called2 = false
ticks2 = 0
} catch (e: InterruptedException) {
Expand Down

0 comments on commit 03123b7

Please sign in to comment.