Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
- [※] fix always slowdown bug in Feather Client. (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
xia-mc committed Jun 8, 2024
1 parent 537fce6 commit a558893
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ public void onLivingUpdate() {
boolean flag2 = this.movementInput.moveForward >= f;
this.movementInput.updatePlayerMoveState();
boolean usingItemModified = this.isUsingItem() || (ModuleManager.killAura != null && ModuleManager.killAura.isEnabled() && ModuleManager.killAura.block.get() && ((Object) this) == Minecraft.getMinecraft().thePlayer && ModuleManager.killAura.rmbDown && ModuleManager.killAura.manualBlock.isToggled());
boolean stopSprint = ModuleManager.noSlow == null || !ModuleManager.noSlow.isEnabled() || NoSlow.slowed.getInput() == 80;
boolean stopSprint = this.isUsingItem() && ModuleManager.noSlow != null && ModuleManager.noSlow.isEnabled() && NoSlow.slowed.getInput() == 80;
if (usingItemModified && !this.isRiding()) {
MovementInput var10000 = this.movementInput;
float slowed = NoSlow.getSlowed();
Expand Down
21 changes: 10 additions & 11 deletions src/main/java/keystrokesmod/module/impl/movement/NoSlow.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,19 @@ public void onPostMotion(PostMotionEvent e) {
}

public static float getSlowed() {
if (!mc.thePlayer.isUsingItem()) return (100.0F - 0.0F) / 100.0F;
if (mc.thePlayer.getHeldItem() == null || ModuleManager.noSlow == null || !ModuleManager.noSlow.isEnabled()) {
return 0.2f;
} else {
if (swordOnly.isToggled() && !(mc.thePlayer.getHeldItem().getItem() instanceof ItemSword)) {
return 0.2f;
}
if (mc.thePlayer.getHeldItem().getItem() instanceof ItemBow && disableBow.isToggled()) {
return 0.2f;
} else if (mc.thePlayer.getHeldItem().getItem() instanceof ItemPotion && !ItemPotion.isSplash(mc.thePlayer.getHeldItem().getItemDamage()) && disablePotions.isToggled()) {
return 0.2f;
}
}
float val = (100.0F - (float) slowed.getInput()) / 100.0F;
return val;
if (swordOnly.isToggled() && !(mc.thePlayer.getHeldItem().getItem() instanceof ItemSword)) {
return 0.2f;
}
if (mc.thePlayer.getHeldItem().getItem() instanceof ItemBow && disableBow.isToggled()) {
return 0.2f;
} else if (mc.thePlayer.getHeldItem().getItem() instanceof ItemPotion && !ItemPotion.isSplash(mc.thePlayer.getHeldItem().getItemDamage()) && disablePotions.isToggled()) {
return 0.2f;
}
return (100.0F - (float) slowed.getInput()) / 100.0F;
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/keystrokesmod/module/impl/render/HUD.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import java.util.List;

public class HUD extends Module {
public static final String VERSION = "1.1.0";
public static final String VERSION = "1.1.1";
public static SliderSetting theme;
public static ButtonSetting dropShadow;
public static ButtonSetting alphabeticalSort;
Expand Down

0 comments on commit a558893

Please sign in to comment.