-
-
Notifications
You must be signed in to change notification settings - Fork 513
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LEGACY: Added Disabler module and GhostBlock Velocity mode. (#1779)
- Loading branch information
Showing
7 changed files
with
160 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
src/main/java/net/ccbluex/liquidbounce/features/module/modules/exploit/Disabler.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/* | ||
* LiquidBounce Hacked Client | ||
* A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. | ||
* https://github.com/CCBlueX/LiquidBounce/ | ||
*/ | ||
package net.ccbluex.liquidbounce.features.module.modules.exploit | ||
|
||
import net.ccbluex.liquidbounce.event.* | ||
import net.ccbluex.liquidbounce.features.module.Module | ||
import net.ccbluex.liquidbounce.features.module.ModuleCategory | ||
import net.ccbluex.liquidbounce.features.module.modules.exploit.disablermodes.startsprint.StartSprint | ||
import net.ccbluex.liquidbounce.value.ListValue | ||
|
||
object Disabler : Module("Disabler", ModuleCategory.EXPLOIT) { | ||
|
||
private val disablerModes = arrayOf( | ||
// Start Sprint | ||
StartSprint | ||
) | ||
|
||
private val modes = disablerModes.map { it.modeName }.toTypedArray() | ||
|
||
val mode by object : ListValue("Mode", modes, "StartSprint") { | ||
override fun onChange(oldValue: String, newValue: String): String { | ||
if (state) | ||
onDisable() | ||
|
||
return super.onChange(oldValue, newValue) | ||
} | ||
|
||
override fun onChanged(oldValue: String, newValue: String) { | ||
if (state) | ||
onEnable() | ||
} | ||
} | ||
|
||
@EventTarget | ||
fun onUpdate(event: UpdateEvent) { | ||
modeModule.onUpdate() | ||
} | ||
|
||
@EventTarget | ||
fun onMotion(event: MotionEvent) { | ||
modeModule.onMotion() | ||
} | ||
|
||
@EventTarget | ||
fun onTick(event: TickEvent) { | ||
modeModule.onTick() | ||
} | ||
|
||
@EventTarget | ||
fun onStrafe(event: StrafeEvent) { | ||
modeModule.onStrafe() | ||
} | ||
|
||
override fun onEnable() { | ||
modeModule.onEnable() | ||
} | ||
|
||
override fun onDisable() { | ||
modeModule.onDisable() | ||
} | ||
|
||
override val tag | ||
get() = mode | ||
|
||
private val modeModule | ||
get() = disablerModes.first { it.modeName == mode } | ||
|
||
override fun handleEvents() = super.handleEvents() && mc.thePlayer != null && mc.theWorld != null | ||
} |
18 changes: 18 additions & 0 deletions
18
...va/net/ccbluex/liquidbounce/features/module/modules/exploit/disablermodes/DisablerMode.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* LiquidBounce Hacked Client | ||
* A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. | ||
* https://github.com/CCBlueX/LiquidBounce/ | ||
*/ | ||
package net.ccbluex.liquidbounce.features.module.modules.exploit.disablermodes | ||
|
||
import net.ccbluex.liquidbounce.utils.MinecraftInstance | ||
|
||
open class DisablerMode(val modeName: String) : MinecraftInstance() { | ||
open fun onMotion() {} | ||
open fun onUpdate() {} | ||
open fun onTick() {} | ||
open fun onStrafe() {} | ||
open fun onEnable() {} | ||
open fun onDisable() {} | ||
|
||
} |
10 changes: 10 additions & 0 deletions
10
...uex/liquidbounce/features/module/modules/exploit/disablermodes/startsprint/StartSprint.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* | ||
* LiquidBounce Hacked Client | ||
* A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge. | ||
* https://github.com/CCBlueX/LiquidBounce/ | ||
*/ | ||
package net.ccbluex.liquidbounce.features.module.modules.exploit.disablermodes.startsprint | ||
|
||
import net.ccbluex.liquidbounce.features.module.modules.exploit.disablermodes.DisablerMode | ||
|
||
object StartSprint : DisablerMode("StartSprint") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters