Skip to content

Commit

Permalink
Spoof setting
Browse files Browse the repository at this point in the history
  • Loading branch information
ManInMyVan committed Nov 23, 2024
1 parent 73be16b commit c1a8102
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import net.ccbluex.liquidbounce.features.module.modules.render.ModuleNoSwing;
import net.ccbluex.liquidbounce.features.module.modules.render.ModuleRotations;
import net.ccbluex.liquidbounce.features.module.modules.world.scaffold.ModuleScaffold;
import net.ccbluex.liquidbounce.features.module.modules.world.scaffold.features.ScaffoldSprintFeature;
import net.ccbluex.liquidbounce.integration.interop.protocol.rest.v1.game.PlayerData;
import net.ccbluex.liquidbounce.utils.aiming.Rotation;
import net.ccbluex.liquidbounce.utils.aiming.RotationManager;
Expand Down Expand Up @@ -296,7 +297,7 @@ private float hookSprintIgnoreHunger(float constant) {

@ModifyReturnValue(method = "canSprint", at = @At("RETURN"))
private boolean injectScaffoldSprintValue(boolean original) {
return original && (!ModuleScaffold.INSTANCE.handleEvents() || ModuleScaffold.INSTANCE.getAllowSprinting());
return original && (!ModuleScaffold.INSTANCE.handleEvents() || ScaffoldSprintFeature.INSTANCE.handleEvents());
}

@ModifyExpressionValue(method = "tickMovement", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/option/KeyBinding;isPressed()Z"))
Expand Down Expand Up @@ -332,7 +333,8 @@ private boolean isOmniWalking() {
target = "Lnet/minecraft/client/network/ClientPlayerEntity;isSprinting()Z")
)
private boolean hookNoHungerSprint(boolean original) {
return !(ModuleAntiHunger.INSTANCE.getEnabled() && ModuleAntiHunger.INSTANCE.getNoSprint()) && original;
return original
&& !(ModuleAntiHunger.INSTANCE.getEnabled() && ModuleAntiHunger.INSTANCE.getNoSprint())
&& !(ScaffoldSprintFeature.INSTANCE.handleEvents() && ScaffoldSprintFeature.INSTANCE.getSpoof());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ object ModuleScaffold : Module("Scaffold", Category.WORLD) {
private var delay by intRange("Delay", 0..0, 0..40, "ticks")
private val minDist by float("MinDist", 0.0f, 0.0f..0.25f)
private val timer by float("Timer", 1f, 0.01f..10f)
val allowSprinting by boolean("AllowSprinting", true)

init {
tree(ScaffoldSprintFeature)
tree(ScaffoldAutoBlockFeature)
tree(ScaffoldMovementPrediction)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package net.ccbluex.liquidbounce.features.module.modules.world.scaffold.features

import net.ccbluex.liquidbounce.config.ToggleableConfigurable
import net.ccbluex.liquidbounce.features.module.modules.world.scaffold.ModuleScaffold

object ScaffoldSprintFeature : ToggleableConfigurable(ModuleScaffold, "Sprint", true) {
val spoof by boolean("Spoof", false)
}

0 comments on commit c1a8102

Please sign in to comment.