-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 新检查 AutoClickerA - 新检查 HitBoxA - 重写FlyA检查 - 移除FlyB检查,原FlyC被重命名为FlyB - 改进MotionA检查 - 新模块 Velocity 反反击退 - 增加你的击退! - 新模块 NoStopBreak 保留挖掘进度 - 你所熟知的一切都将改变,你所熟悉的世界都将加诸 ⌈永恒⌋ 的历练。 至此,一锤定音。 尘埃,已然落定。 - 改进Fly - 修复AutoCatch的一个无限递归bug
- Loading branch information
Showing
24 changed files
with
356 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
src/main/java/top/infsky/cheatdetector/impl/checks/AutoClickerA.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package top.infsky.cheatdetector.impl.checks; | ||
|
||
import io.netty.channel.ChannelHandlerContext; | ||
import net.minecraft.network.Connection; | ||
import net.minecraft.network.protocol.Packet; | ||
import net.minecraft.network.protocol.game.ClientGamePacketListener; | ||
import net.minecraft.network.protocol.game.ClientboundAnimatePacket; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
import top.infsky.cheatdetector.config.AdvancedConfig; | ||
import top.infsky.cheatdetector.config.AntiCheatConfig; | ||
import top.infsky.cheatdetector.impl.Check; | ||
import top.infsky.cheatdetector.utils.TRPlayer; | ||
|
||
public class AutoClickerA extends Check { | ||
private long click1 = -1; | ||
private long click2 = -1; | ||
private long click3 = -1; | ||
public AutoClickerA(@NotNull TRPlayer player) { | ||
super("AutoClickerA", player); | ||
} | ||
|
||
@Override | ||
public void _onTick() { | ||
if (click2 == -1 || click1 == -1) return; | ||
|
||
long delay1 = Math.abs(click2 - click1); | ||
long delay2 = Math.abs(click3 - click2); | ||
|
||
if (Math.abs(delay1 - delay2) < AdvancedConfig.autoClickerAMinDiffMs) { | ||
flag("constant click delay: %s->%s".formatted(delay2, delay1)); | ||
} | ||
} | ||
|
||
@Override | ||
public boolean _onPacketReceive(@NotNull Packet<ClientGamePacketListener> basePacket, Connection connection, ChannelHandlerContext channelHandlerContext, CallbackInfo ci) { | ||
if (basePacket instanceof ClientboundAnimatePacket packet) { | ||
if (packet.getId() != player.fabricPlayer.getId()) return false; | ||
if (packet.getAction() != ClientboundAnimatePacket.SWING_MAIN_HAND && packet.getAction() != ClientboundAnimatePacket.SWING_OFF_HAND) return false; | ||
|
||
click3 = click2; | ||
click2 = click1; | ||
click1 = System.currentTimeMillis(); | ||
} | ||
return false; | ||
} | ||
|
||
@Override | ||
public int getAlertBuffer() { | ||
return AdvancedConfig.autoClickerAAlertBuffer; | ||
} | ||
|
||
@Override | ||
public boolean isDisabled() { | ||
return !AdvancedConfig.autoClickerACheck || !AntiCheatConfig.experimentalCheck; | ||
} | ||
} |
76 changes: 4 additions & 72 deletions
76
src/main/java/top/infsky/cheatdetector/impl/checks/FlyA.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 3 additions & 13 deletions
16
src/main/java/top/infsky/cheatdetector/impl/checks/FlyB.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 0 additions & 29 deletions
29
src/main/java/top/infsky/cheatdetector/impl/checks/FlyC.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.