Skip to content

Commit

Permalink
add lobby check to bedaura
Browse files Browse the repository at this point in the history
  • Loading branch information
xia-mc committed Jul 8, 2024
1 parent 9ae6e72 commit fba1111
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/keystrokesmod/module/impl/world/BedAura.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public class BedAura extends Module {
private final SliderSetting fov;
private final SliderSetting range;
private final SliderSetting rate;
private final ButtonSetting lobbyCheck;
public ButtonSetting allowAura;
private final ButtonSetting breakNearBlock;
private final ButtonSetting cancelKnockback;
Expand Down Expand Up @@ -77,6 +78,7 @@ public BedAura() {
this.registerSetting(fov = new SliderSetting("FOV", 360.0, 30.0, 360.0, 4.0));
this.registerSetting(range = new SliderSetting("Range", 4.5, 1.0, 8.0, 0.5));
this.registerSetting(rate = new SliderSetting("Rate", 0.2, 0.05, 3.0, 0.05, " second"));
this.registerSetting(lobbyCheck = new ButtonSetting("Lobby check", false));
this.registerSetting(allowAura = new ButtonSetting("Allow aura", true));
this.registerSetting(breakNearBlock = new ButtonSetting("Break near block", false));
this.registerSetting(cancelKnockback = new ButtonSetting("Cancel knockBack", false));
Expand Down Expand Up @@ -104,6 +106,12 @@ public void onPreUpdate(PreUpdateEvent e) {
if (!Utils.nullCheck()) {
return;
}

if (lobbyCheck.isToggled() && Utils.isLobby()) {
currentBlock = null;
reset(true);
}

if (currentBlock != null) {
if (new Vec3(mc.thePlayer).distanceTo(Vec3.convert(currentBlock)) > Math.max(6, range.getInput())) {
currentBlock = null;
Expand Down

0 comments on commit fba1111

Please sign in to comment.