Skip to content
Merged

sync #24

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/client/java/dev/thoq/config/setting/impl/ModeSetting.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ public String getType() {
return "mode";
}

@Override
public void setValue(final String value) {
if(this.changeCallback != null) this.changeCallback.accept(true);
super.setValue(value);
if(this.changeCallback != null) this.changeCallback.accept(false);
}

public void add(final String mode) {
this.modes.add(mode);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import dev.thoq.utilities.player.MoveUtility;

public class BlocksMCSpeed extends SubModule {

public BlocksMCSpeed(final Module parent) {
super("BlocksMC", parent);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
import dev.thoq.module.Module;
import dev.thoq.module.SubModule;
import dev.thoq.utilities.player.MoveUtility;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.option.GameOptions;

public class NormalSpeed extends SubModule {

Expand All @@ -51,19 +49,4 @@ public NormalSpeed(final Module parent) {
MoveUtility.setSpeed(this.speed.getValue());
};

public void normalSpeed(MinecraftClient mc, GameOptions options, float speed, boolean bHop, boolean strafe) {
if(mc.player == null) return;

if(options.jumpKey.isPressed())
speed = speed / 2;

if(bHop && mc.player.isOnGround() && MoveUtility.isMoving())
mc.player.jump();

if(strafe)
MoveUtility.setSpeed(speed, true);
else
MoveUtility.setSpeed(speed);
}

}