-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Release 2.10.4
- 新检查 AimB - 检查阶段性的瞄准 - 新检查 ScaffoldA - 检查搭路时的挥手 - 新指令 /ctr surround <name> - 新模块 Surround 方块包围 - 用方块把别人包起来! - 修复一些误判
Showing
28 changed files
with
274 additions
and
69 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
34 changes: 34 additions & 0 deletions
34
src/main/java/top/infsky/cheatdetector/commands/SurroundCommand.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,34 @@ | ||
package top.infsky.cheatdetector.commands; | ||
|
||
import com.mojang.brigadier.context.CommandContext; | ||
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource; | ||
import net.minecraft.ChatFormatting; | ||
import net.minecraft.world.entity.player.Player; | ||
import org.jetbrains.annotations.NotNull; | ||
import top.infsky.cheatdetector.CheatDetector; | ||
import top.infsky.cheatdetector.config.Advanced3Config; | ||
import top.infsky.cheatdetector.utils.LogUtils; | ||
import top.infsky.cheatdetector.utils.TRPlayer; | ||
|
||
public class SurroundCommand { | ||
public static int execute(@NotNull CommandContext<FabricClientCommandSource> context) { | ||
String name; | ||
|
||
try { | ||
name = context.getArgument("name", String.class); | ||
} catch (IllegalArgumentException e) { | ||
if (TRPlayer.CLIENT.crosshairPickEntity instanceof Player target) { | ||
name = target.getName().getString(); | ||
} else { | ||
name = Advanced3Config.surroundName; | ||
} | ||
} | ||
|
||
if (CheatDetector.CONFIG_HANDLER.configManager.setValue("surroundName", name)) { | ||
LogUtils.custom(ChatFormatting.GREEN + "已设置: " + ChatFormatting.WHITE + name); | ||
return 1; | ||
} else { | ||
return -1; | ||
} | ||
} | ||
} |
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
52 changes: 52 additions & 0 deletions
52
src/main/java/top/infsky/cheatdetector/impl/checks/aim/AimB.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,52 @@ | ||
package top.infsky.cheatdetector.impl.checks.aim; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
import top.infsky.cheatdetector.config.AdvancedConfig; | ||
import top.infsky.cheatdetector.config.AntiCheatConfig; | ||
import top.infsky.cheatdetector.impl.Check; | ||
import top.infsky.cheatdetector.utils.TRPlayer; | ||
|
||
import java.util.Set; | ||
|
||
public class AimB extends Check { | ||
public static final Set<Integer> STEP = Set.of(25, 40, 45, 60, 90, 120, 135, 180); | ||
public AimB(@NotNull TRPlayer player) { | ||
super("AimB", player); | ||
} | ||
|
||
@Override | ||
public void _onTick() { | ||
boolean flagPitch = false; | ||
boolean flagYaw = false; | ||
float stepPitch = 0, stepYaw = 0; | ||
for (int step : STEP) { | ||
if (Math.abs(player.lastRot.x - player.currentRot.x) - step < AdvancedConfig.aimBMinDiffPitch) { | ||
flagPitch = true; | ||
stepPitch = player.lastRot.x - player.currentRot.x; | ||
} | ||
if (Math.abs(player.lastRot.y - player.currentRot.y) - step < AdvancedConfig.aimBMinDiffYaw) { | ||
flagYaw = true; | ||
stepYaw = player.lastRot.y - player.currentRot.y; | ||
} | ||
if (flagPitch && flagYaw) break; | ||
} | ||
|
||
if (flagPitch && flagYaw) { | ||
flag("perfect step aim. deltaYaw: %.1f deltaPitch: %.1f".formatted(stepYaw, stepPitch)); | ||
} else if (flagPitch) { | ||
flag("perfect pitch step aim. deltaPitch: %.1f".formatted(stepPitch)); | ||
} else if (flagYaw) { | ||
flag("perfect pitch step aim. deltaYaw: %.1f".formatted(stepYaw)); | ||
} | ||
} | ||
|
||
@Override | ||
public int getAlertBuffer() { | ||
return AdvancedConfig.aimBAlertBuffer; | ||
} | ||
|
||
@Override | ||
public boolean isDisabled() { | ||
return !AdvancedConfig.aimBCheck || !AntiCheatConfig.experimentalCheck; | ||
} | ||
} |
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
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
Oops, something went wrong.