Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
XIII-MC committed Oct 19, 2024
2 parents 8fd0e25 + 745a343 commit 9f4b6cc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
7 changes: 2 additions & 5 deletions src/main/java/net/gteam/wave/checks/CheckHolder.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ public class CheckHolder {
private final Profile profile;
private Check[] checks;
private int checksSize;
private boolean testing; //Used for testing new checks

public CheckHolder(final Profile profile) {
this.profile = profile;
Expand Down Expand Up @@ -53,7 +52,7 @@ private void addChecks(final Check... checks) {

for (final Check check : checks) {

//if (this.profile != null && (!check.isEnabled() || isDisabled(check))) continue; // TODO: fix (it just doesn't register any checks if enabled)
if (this.profile != null && isDisabled(check)) continue;

this.checks = Arrays.copyOf(this.checks, this.checksSize + 1);

Expand All @@ -65,9 +64,7 @@ private void addChecks(final Check... checks) {

private boolean isDisabled(final Check check) {

if (this.testing) return true;

if (check.getClass().isAnnotationPresent(Disabled.class)) this.testing = true;
if (check.getClass().isAnnotationPresent(Disabled.class)) return true;

return false;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package net.gteam.wave.checks.impl.aimassist;

import net.gteam.wave.checks.annotations.Development;
import net.gteam.wave.checks.annotations.Experimental;
import net.gteam.wave.checks.enums.CheckType;
import net.gteam.wave.checks.types.Check;
import net.gteam.wave.managers.profile.Profile;
Expand All @@ -11,7 +12,7 @@
import java.util.ArrayList;
import java.util.Objects;

@Development
@Experimental
public class AimAssist10A extends Check {

private final ArrayList<Float> yaw = new ArrayList<>();
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/net/gteam/wave/checks/impl/jump/Jump5A.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ public void handle(ClientPlayPacket clientPlayPacket) {
final MovementData movementData = this.profile.getMovementData();
final double motionY = movementData.getDeltaY();
final boolean step = CollisionUtils.isServerGround(motionY) && CollisionUtils.isServerGround(movementData.getLastLocation().getY());
final boolean jumped = motionY > 0 && movementData.getLastLocation().getY() % (1D/64) == 0 && !movementData.isOnGround() && !step;
final boolean jumped = motionY > 0 && movementData.getLastLocation().getY() % (1D/64) == 0 && !movementData.isOnGround() && !step && movementData.isLastOnGround();
final CustomEffect jumpEffect = profile.getEffectData().getEffects().get(EffectType.JUMP_BOOST);
final boolean blockAbove = movementData.getBlocksAboveTicks() <= 2;
final double expectedJumpMotion = blockAbove ? motionY : 0.42F + (double)(jumpEffect != null ? (jumpEffect.getAmplifier() + 1) * 0.1F : 0);
final boolean isExemptByVelocity = System.currentTimeMillis() - this.profile.getVelocityData().getTimestamp() <= 150L; // && this.profile.getVelocityData().getVelocity().getY() + motionY > 0.005;
if (jumped && movementData.getSlimeTicks() > 3 && movementData.getHoneyTicks() > 3 && movementData.getClimbableTicks() > 0 && movementData.getLiquidTicks() > 0 && movementData.getBubbleTicks() > 0) {

if (jumped && movementData.getSlimeTicks() > 3 && movementData.getHoneyTicks() > 3 && movementData.getClimbableTicks() > 0 && movementData.getLiquidTicks() > 0 && movementData.getBubbleTicks() > 0 && movementData.getWebTicks() > 2) {
if (Math.abs(expectedJumpMotion - motionY) > 1E-7 && !isExemptByVelocity) {
//debug("math=" + Math.abs(expectedJumpMotion - motionY) + " dY=" + movementData.getDeltaY() + " v=" + );
fail("jumpDiff=" + Math.abs(motionY - expectedJumpMotion) + System.lineSeparator() + "dY=" + motionY + System.lineSeparator() + "eY=" + expectedJumpMotion);
Expand Down

0 comments on commit 9f4b6cc

Please sign in to comment.