diff --git a/gradle.properties b/gradle.properties index babe232..3630753 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,7 +7,7 @@ minecraft_version=1.20.1 loader_version=0.14.23 # Mod Properties -mod_version = 2.7.0 +mod_version = 2.7.2 maven_group = top.infsky archives_base_name = CheatDetector diff --git a/src/main/java/top/infsky/cheatdetector/config/Advanced2Config.java b/src/main/java/top/infsky/cheatdetector/config/Advanced2Config.java index c9092bf..66f0f29 100644 --- a/src/main/java/top/infsky/cheatdetector/config/Advanced2Config.java +++ b/src/main/java/top/infsky/cheatdetector/config/Advanced2Config.java @@ -1,10 +1,8 @@ package top.infsky.cheatdetector.config; -import top.hendrixshen.magiclib.dependency.api.annotation.Dependencies; -import top.hendrixshen.magiclib.dependency.api.annotation.Dependency; + import top.hendrixshen.magiclib.malilib.api.annotation.Config; import top.infsky.cheatdetector.config.utils.ConfigCategory; -import top.infsky.cheatdetector.config.utils.ConfigPredicate; public class Advanced2Config { @Config(category = ConfigCategory.ADVANCED2) diff --git a/src/main/java/top/infsky/cheatdetector/config/Advanced3Config.java b/src/main/java/top/infsky/cheatdetector/config/Advanced3Config.java index 004055f..520c4df 100644 --- a/src/main/java/top/infsky/cheatdetector/config/Advanced3Config.java +++ b/src/main/java/top/infsky/cheatdetector/config/Advanced3Config.java @@ -7,8 +7,7 @@ import top.infsky.cheatdetector.config.utils.ConfigCategory; public class Advanced3Config { - @Config(category = ConfigCategory.ADVANCED3) - public static int flagDetectorAlertBuffer = 1; + @Numeric(minValue = 0, maxValue = Integer.MAX_VALUE) @Config(category = ConfigCategory.ADVANCED3) public static int flagDetectorWorldChangedDisableTick = 60; @Config(category = ConfigCategory.ADVANCED3) @@ -26,14 +25,17 @@ public class Advanced3Config { @Numeric(minValue = -180, maxValue = 180) @Config(category = ConfigCategory.ADVANCED3) public static double spinDefaultPitch = -90; + @Numeric(minValue = 0, maxValue = 360) @Config(category = ConfigCategory.ADVANCED3) public static double spinYawStep = 45; + @Numeric(minValue = 0, maxValue = 180) @Config(category = ConfigCategory.ADVANCED3) public static double spinPitchStep = 35; @Config(category = ConfigCategory.ADVANCED3) public static boolean spinOnlyPacket = false; @Config(category = ConfigCategory.ADVANCED3) public static boolean spinAutoPause = false; + @Numeric(minValue = 0, maxValue = Integer.MAX_VALUE) @Config(category = ConfigCategory.ADVANCED3) public static int spinAutoPauseTime = 10; @@ -68,18 +70,23 @@ public class Advanced3Config { public static int fakelagDelayMs = 100; @Config(category = ConfigCategory.ADVANCED3, predicate = ConfigPredicate.FakelagLatencyMode.class) public static boolean fakelagShowCount = false; + @Numeric(minValue = 0, maxValue = Integer.MAX_VALUE) @Config(category = ConfigCategory.ADVANCED3, predicate = ConfigPredicate.FakelagDynamicMode.class) public static double fakelagMaxTargetRange = 15.0; + @Numeric(minValue = 0, maxValue = Integer.MAX_VALUE) @Config(category = ConfigCategory.ADVANCED3, predicate = ConfigPredicate.FakelagDynamicMode.class) public static double fakelagStartRange = 6.0; + @Numeric(minValue = 0, maxValue = Integer.MAX_VALUE) @Config(category = ConfigCategory.ADVANCED3, predicate = ConfigPredicate.FakelagDynamicMode.class) public static double fakelagStopRange = 1.0; + @Numeric(minValue = 0, maxValue = Integer.MAX_VALUE) @Config(category = ConfigCategory.ADVANCED3, predicate = ConfigPredicate.FakelagDynamicMode.class) public static int fakelagMaxLagTicks = 100; @Config(category = ConfigCategory.ADVANCED3, predicate = ConfigPredicate.FakelagDynamicMode.class) public static boolean fakelagOnlyOutgoing = true; @Config(category = ConfigCategory.ADVANCED3, predicate = ConfigPredicate.FakelagDynamicMode.class) public static boolean fakelagStopOnHurt = true; + @Numeric(minValue = 0, maxValue = Integer.MAX_VALUE) @Config(category = ConfigCategory.ADVANCED3, predicate = ConfigPredicate.FakelagDynamicMode.class) public static int fakelagPauseTicksOnHurt = 10; @Config(category = ConfigCategory.ADVANCED3, predicate = ConfigPredicate.FakelagDynamicMode.class) @@ -89,6 +96,7 @@ public class Advanced3Config { public static boolean fakelagAutoDisable = false; + @Numeric(minValue = 0, maxValue = 8) @Config(category = ConfigCategory.ADVANCED3) public static double airPlaceReach = 4.5; @Config(category = ConfigCategory.ADVANCED3) @@ -103,6 +111,7 @@ public class Advanced3Config { @Config(category = ConfigCategory.ADVANCED3, predicate = ConfigPredicate.PASMode.class) public static boolean backtrackShowCount = false; + @Numeric(minValue = 0, maxValue = Integer.MAX_VALUE) @Config(category = ConfigCategory.ADVANCED3, predicate = ConfigPredicate.PASMode.class) public static int backtrackDelayMs = 100; @Config(category = ConfigCategory.ADVANCED3, predicate = ConfigPredicate.PASMode.class) @@ -153,6 +162,7 @@ public class Advanced3Config { public static boolean scaffoldAutoSwitch = false; @Config(category = ConfigCategory.ADVANCED3, predicate = ConfigPredicate.PASMode.class) public static boolean scaffoldSameY = false; + @Numeric(minValue = 0, maxValue = Integer.MAX_VALUE) @Config(category = ConfigCategory.ADVANCED3, predicate = ConfigPredicate.PASMode.class) public static int scaffoldPlaceMinDelay = 1; @@ -205,6 +215,7 @@ public class Advanced3Config { @Config(category = ConfigCategory.ADVANCED3) public static boolean handSpinPerfectSwing = false; + @Numeric(minValue = 0, maxValue = Integer.MAX_VALUE) @Config(category = ConfigCategory.ADVANCED3) public static int handSpinSwingDelay = 0; @Config(category = ConfigCategory.ADVANCED3) @@ -214,6 +225,7 @@ public class Advanced3Config { @Config(category = ConfigCategory.ADVANCED3) public static boolean handSpinDiffSwing = false; + @Numeric(minValue = 0, maxValue = 6) @Config(category = ConfigCategory.ADVANCED3, predicate = ConfigPredicate.PASMode.class) public static double nukerRange = 4.5; @Config(category = ConfigCategory.ADVANCED3, predicate = ConfigPredicate.PASMode.class) @@ -224,16 +236,36 @@ public class Advanced3Config { public static boolean nukerSilentRotation = true; @Config(category = ConfigCategory.ADVANCED3, predicate = ConfigPredicate.PASMode.class) public static boolean nukerKeepRotation = true; + @Config(category = ConfigCategory.ADVANCED3, predicate = ConfigPredicate.PASMode.class) + public static boolean nukerKeepGround = true; + @Numeric(minValue = Integer.MIN_VALUE, maxValue = Integer.MAX_VALUE) @Config(category = ConfigCategory.ADVANCED3, predicate = ConfigPredicate.PASMode.class) public static int blockDetectorX = 0; + @Numeric(minValue = Integer.MIN_VALUE, maxValue = Integer.MAX_VALUE) @Config(category = ConfigCategory.ADVANCED3, predicate = ConfigPredicate.PASMode.class) public static int blockDetectorY = 0; + @Numeric(minValue = Integer.MIN_VALUE, maxValue = Integer.MAX_VALUE) @Config(category = ConfigCategory.ADVANCED3, predicate = ConfigPredicate.PASMode.class) public static int blockDetectorZ = 0; + @Numeric(minValue = 0, maxValue = Integer.MAX_VALUE) @Config(category = ConfigCategory.ADVANCED3, predicate = ConfigPredicate.PASMode.class) public static int blockDetectorPostDelay = 20; + @Config(category = ConfigCategory.ADVANCED3, predicate = ConfigPredicate.PASMode.class) + public static boolean airStuckCancelPacket = true; + @Config(category = ConfigCategory.ADVANCED3, predicate = ConfigPredicate.PASMode.class) + public static boolean airStuckLegit = false; + @Numeric(minValue = -1, maxValue = 20) + @Config(category = ConfigCategory.ADVANCED3, predicate = ConfigPredicate.PASMode.class) + public static double airStuckMinDistanceBeforeGround = -1; + @Numeric(minValue = -1, maxValue = 20) + @Config(category = ConfigCategory.ADVANCED3, predicate = ConfigPredicate.PASMode.class) + public static double airStuckMinFallDistance = -1; + + @Config(category = ConfigCategory.ADVANCED3, predicate = ConfigPredicate.PASMode.class) + public static String clientSpoofBrand = "vanilla"; + public static NotebotUtils.NotebotMode getNoteBotMode() { if (noteBotMode.equals("AnyInstrument")) { return NotebotUtils.NotebotMode.AnyInstrument; diff --git a/src/main/java/top/infsky/cheatdetector/config/ModuleConfig.java b/src/main/java/top/infsky/cheatdetector/config/ModuleConfig.java index 5ef3c1e..d268156 100644 --- a/src/main/java/top/infsky/cheatdetector/config/ModuleConfig.java +++ b/src/main/java/top/infsky/cheatdetector/config/ModuleConfig.java @@ -87,4 +87,16 @@ public class ModuleConfig { @Hotkey @Config(category = ConfigCategory.MODULES, predicate = ConfigPredicate.PASMode.class) public static boolean blockDetectorEnabled = false; + + @Hotkey + @Config(category = ConfigCategory.MODULES) + public static boolean airStuckEnabled = false; + + @Hotkey + @Config(category = ConfigCategory.MODULES, predicate = ConfigPredicate.PASMode.class) + public static boolean noFallEnabled = false; + + @Hotkey + @Config(category = ConfigCategory.MODULES) + public static boolean clientSpoofEnabled = false; } diff --git a/src/main/java/top/infsky/cheatdetector/impl/Check.java b/src/main/java/top/infsky/cheatdetector/impl/Check.java index 1fe5294..dc625df 100644 --- a/src/main/java/top/infsky/cheatdetector/impl/Check.java +++ b/src/main/java/top/infsky/cheatdetector/impl/Check.java @@ -35,6 +35,7 @@ public boolean isDisabled() { } public void flag() { + if (player.manager.disableTick > 0) return; if (!AntiCheatConfig.antiCheatEnabled) return; if (isDisabled()) return; if (AntiCheatConfig.disableSelfCheck && player.equals(TRSelf.getInstance())) return; @@ -45,6 +46,7 @@ public void flag() { } public void flag(String extraMsg) { + if (player.manager.disableTick > 0) return; if (!AntiCheatConfig.antiCheatEnabled) return; if (isDisabled()) return; if (AntiCheatConfig.disableSelfCheck && player.equals(TRSelf.getInstance())) return; diff --git a/src/main/java/top/infsky/cheatdetector/impl/Module.java b/src/main/java/top/infsky/cheatdetector/impl/Module.java index c705c13..544bc93 100644 --- a/src/main/java/top/infsky/cheatdetector/impl/Module.java +++ b/src/main/java/top/infsky/cheatdetector/impl/Module.java @@ -12,6 +12,12 @@ public Module(String moduleName, @NotNull TRSelf player) { public void flag() { } + @Override public void flag(String extraMsg) { } + + @Override + public final int getAlertBuffer() { + return super.getAlertBuffer(); + } } diff --git a/src/main/java/top/infsky/cheatdetector/impl/checks/MotionA.java b/src/main/java/top/infsky/cheatdetector/impl/checks/MotionA.java index ec15119..a84aab2 100644 --- a/src/main/java/top/infsky/cheatdetector/impl/checks/MotionA.java +++ b/src/main/java/top/infsky/cheatdetector/impl/checks/MotionA.java @@ -1,9 +1,11 @@ package top.infsky.cheatdetector.impl.checks; import net.minecraft.world.effect.MobEffect; +import net.minecraft.world.effect.MobEffectInstance; import net.minecraft.world.effect.MobEffects; import net.minecraft.world.level.block.*; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import top.infsky.cheatdetector.config.AdvancedConfig; import top.infsky.cheatdetector.config.AntiCheatConfig; import top.infsky.cheatdetector.impl.Check; @@ -12,18 +14,22 @@ import java.util.ArrayList; import java.util.List; +import java.util.Map; +import java.util.Objects; public class MotionA extends Check { - public static final List IGNORED_EFFECTS = List.of(MobEffects.JUMP, MobEffects.SLOW_FALLING); + public static final List IGNORED_EFFECTS = List.of(MobEffects.SLOW_FALLING); public static final List> IGNORED_BLOCKS = List.of(BedBlock.class, SlimeBlock.class, HoneyBlock.class, PowderSnowBlock.class); public static final List JUMP_MOTIONS = List.of(0.41159999516010254, -0.08506399504327788, -0.08336271676487925, -0.0816954640195993, -0.08006155629742463, -0.07846032669852913, -0.07689112166107052, -0.07535330069443089, -0.07384623611779237, -0.07236931280394177, -0.07092192792819801); + public static final List JUMP_MOTIONS_1 = List.of(0.5095999912261959, -0.08702399309539816, -0.08528351489334113, -0.08357784622212827, -0.0819062908918066, -0.08026816663620898, -0.07866280483447859, -0.07708955023816295, -0.07554776070376615, -0.07403680693065001, -0.07255607220417704, -0.07110495214399076, -0.0696828544573303); + public static final List JUMP_MOTIONS_2 = List.of(0.6076000164985658, -0.0889839917316434, -0.08720431359424546, -0.08546022898565087, -0.08375102603596235, -0.08207600711266715, -0.0804344885358894, -0.07882580029933772, -0.07724928579683382, -0.07570430155431032, -0.0741902169671691, -0.0727064140428918, -0.07125228714879878, -0.06982724276485225, -0.06843069924140427); private final List motionY = new ArrayList<>(); private boolean readyToJump = false; private Double jumpFromY = null; public MotionA(@NotNull TRPlayer player) { - super("*MotionA*", player); + super("MotionA", player); } @Override @@ -45,19 +51,24 @@ public void _onTick() { motionY.add(player.fabricPlayer.getDeltaMovement().y()); } else if (jumpFromY != null) { if (jumpFromY == player.currentPos.y()) { // 满足判断条件 - check: try { - for (int i = 0; i < JUMP_MOTIONS.size(); i++) { - if (Math.abs(motionY.get(i) - JUMP_MOTIONS.get(i)) > AntiCheatConfig.threshold) { - flag("Invalid jump motion at tick %s.".formatted(i)); - break check; + List possibleMotion = Objects.requireNonNull(getPossibleMotions()); + + check: + try { + for (int i = 0; i < possibleMotion.size(); i++) { + if (Math.abs(motionY.get(i) - possibleMotion.get(i)) > AntiCheatConfig.threshold) { + flag("Invalid jump motion at tick %s.".formatted(i)); + break check; + } } + if (possibleMotion.size() != motionY.size()) { + flag("Invalid jump time: %s ticks. (should be %s)".formatted(motionY.size(), possibleMotion.size())); + } + } catch (IndexOutOfBoundsException e) { + flag("Invalid jump time: %s ticks. (should be %s)".formatted(motionY.size(), possibleMotion.size())); } - if (JUMP_MOTIONS.size() != motionY.size()) { - flag("Invalid jump time: %s ticks. (should be %s)".formatted(motionY.size(), JUMP_MOTIONS.size())); - } - } catch (IndexOutOfBoundsException e) { - flag("Invalid jump time: %s ticks. (should be %s)".formatted(motionY.size(), JUMP_MOTIONS.size())); + } catch (NullPointerException ignored) { } } jumpFromY = null; @@ -78,6 +89,21 @@ private boolean check() { return !player.fabricPlayer.getAbilities().flying; } + private @Nullable List getPossibleMotions() { + List result; + Map activeEffectsMap = player.fabricPlayer.getActiveEffectsMap(); + if (!activeEffectsMap.containsKey(MobEffects.JUMP)) { + result = JUMP_MOTIONS; + } else { + switch (activeEffectsMap.get(MobEffects.JUMP).getAmplifier()) { + case 0 -> result = JUMP_MOTIONS_1; + case 1 -> result = JUMP_MOTIONS_2; + default -> result = null; + } + } + return result; + } + @Override public int getAlertBuffer() { return AdvancedConfig.motionAAlertBuffer; diff --git a/src/main/java/top/infsky/cheatdetector/impl/modules/ClickGUI.java b/src/main/java/top/infsky/cheatdetector/impl/modules/ClickGUI.java index d0f53e7..ed5c05f 100644 --- a/src/main/java/top/infsky/cheatdetector/impl/modules/ClickGUI.java +++ b/src/main/java/top/infsky/cheatdetector/impl/modules/ClickGUI.java @@ -1,6 +1,7 @@ package top.infsky.cheatdetector.impl.modules; import lombok.Getter; +import net.fabricmc.loader.api.FabricLoader; import net.minecraft.network.chat.Component; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; @@ -51,7 +52,14 @@ public void _onTick() { @Contract("_, _, _ -> new") public static @NotNull ConfigGui create(String identifier, String defaultTab, ConfigManager configManager) { - return new ConfigGui(identifier, defaultTab, configManager, Component.translatable("cheatdetector.gui.title").getString()); + return new ConfigGui(identifier, defaultTab, configManager, + Component.translatable("cheatdetector.pretty_name") + .append(" ") + .append( + FabricLoader.getInstance().getModContainer(CheatDetector.MOD_ID).orElseThrow().getMetadata().getVersion().getFriendlyString() + ) + .getString() + ); } public static void register(@NotNull ConfigManager manager) { diff --git a/src/main/java/top/infsky/cheatdetector/impl/modules/common/AirStuck.java b/src/main/java/top/infsky/cheatdetector/impl/modules/common/AirStuck.java new file mode 100644 index 0000000..6b7365b --- /dev/null +++ b/src/main/java/top/infsky/cheatdetector/impl/modules/common/AirStuck.java @@ -0,0 +1,106 @@ +package top.infsky.cheatdetector.impl.modules.common; + +import lombok.Getter; +import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.core.BlockPos; +import net.minecraft.network.Connection; +import net.minecraft.network.PacketSendListener; +import net.minecraft.network.protocol.Packet; +import net.minecraft.network.protocol.game.*; +import net.minecraft.network.protocol.login.ServerboundCustomQueryPacket; +import net.minecraft.network.protocol.status.ServerboundPingRequestPacket; +import net.minecraft.world.phys.Vec3; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import top.infsky.cheatdetector.config.Advanced3Config; +import top.infsky.cheatdetector.config.ModuleConfig; +import top.infsky.cheatdetector.impl.Module; +import top.infsky.cheatdetector.impl.utils.world.LevelUtils; +import top.infsky.cheatdetector.utils.TRSelf; + +import java.util.List; + +@Getter +public class AirStuck extends Module { + @Getter + @Nullable + private static Module instance = null; + + public static final List>> CANCEL_PACKETS = List.of( + ServerboundPongPacket.class, + ServerboundPlayerAbilitiesPacket.class, + ServerboundPingRequestPacket.class, + ServerboundPlayerActionPacket.class, + ServerboundPlayerCommandPacket.class, + ServerboundMovePlayerPacket.class, + ServerboundPlayerInputPacket.class, + ServerboundMoveVehiclePacket.class, + ServerboundCustomPayloadPacket.class, + ServerboundCustomQueryPacket.class + ); + + private boolean shouldStuck = false; + private final Vec3 modMoveTo = new Vec3(0, 0, 0); + + public AirStuck(@NotNull TRSelf player) { + super("AirStuck", player); + instance = this; + } + + @Override + public void _onTick() { + if (isDisabled()) { + shouldStuck = false; + return; + } + + shouldStuck = check(); + + if (shouldStuck) { + player.fabricPlayer.setDeltaMovement(modMoveTo); + } + } + + @SuppressWarnings("RedundantIfStatement") // java的if优化给我优化出bug来了 + private boolean check() { + if (Advanced3Config.airStuckMinDistanceBeforeGround >= 0) + if (Advanced3Config.airStuckMinDistanceBeforeGround < getDistanceToGround()) + return false; + if (Advanced3Config.airStuckMinFallDistance >= 0) + if (Advanced3Config.airStuckMinFallDistance > player.fabricPlayer.fallDistance) + return false; + return true; + } + + private double getDistanceToGround() { + BlockPos playerPos = player.fabricPlayer.blockPosition(); + ClientLevel clientLevel = LevelUtils.getClientLevel(); + for (int i = playerPos.getY(); i >= -64; i--) { + if (clientLevel.getBlockState(new BlockPos(playerPos.getX(), i, playerPos.getZ())).isAir()) + continue; + + return player.currentPos.y() - i - 1.5; + } + return Double.MAX_VALUE; + } + + @Override + public boolean _onPacketSend(@NotNull Packet basePacket, Connection connection, PacketSendListener listener, CallbackInfo ci) { + if (isDisabled() || !shouldStuck || !Advanced3Config.airStuckCancelPacket) return false; + + if (Advanced3Config.airStuckLegit) { + ci.cancel(); + return true; + } else if (CANCEL_PACKETS.stream().anyMatch(aClass -> aClass.isInstance(basePacket.getClass()))) { + ci.cancel(); + return true; + } + return false; + } + + @Override + public boolean isDisabled() { + return !ModuleConfig.airStuckEnabled; + } +} diff --git a/src/main/java/top/infsky/cheatdetector/impl/modules/common/ClientSpoof.java b/src/main/java/top/infsky/cheatdetector/impl/modules/common/ClientSpoof.java new file mode 100644 index 0000000..20b2b23 --- /dev/null +++ b/src/main/java/top/infsky/cheatdetector/impl/modules/common/ClientSpoof.java @@ -0,0 +1,55 @@ +package top.infsky.cheatdetector.impl.modules.common; + +import io.netty.buffer.Unpooled; +import lombok.Getter; +import net.minecraft.network.Connection; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.PacketSendListener; +import net.minecraft.network.protocol.Packet; +import net.minecraft.client.multiplayer.ClientPacketListener; +import net.minecraft.network.protocol.game.ClientboundLoginPacket; +import net.minecraft.network.protocol.game.ServerboundCustomPayloadPacket; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import top.infsky.cheatdetector.config.Advanced3Config; +import top.infsky.cheatdetector.config.ModuleConfig; +import top.infsky.cheatdetector.impl.Module; +import top.infsky.cheatdetector.mixins.ConnectionAccessor; +import top.infsky.cheatdetector.utils.TRSelf; + +public class ClientSpoof extends Module { + @Getter + @Nullable + private static Module instance = null; + public ClientSpoof(@NotNull TRSelf player) { + super("ClientSpoof", player); + instance = this; + } + + /** + * {@link ClientPacketListener#handleLogin(ClientboundLoginPacket)} + * 修改第444行的发包行为 + */ + @Override + public boolean _onPacketSend(@NotNull Packet basePacket, Connection connection, PacketSendListener listener, CallbackInfo ci) { + if (isDisabled()) return false; + if (basePacket instanceof ServerboundCustomPayloadPacket packet + && packet.getIdentifier() == ServerboundCustomPayloadPacket.BRAND) { + ci.cancel(); + ((ConnectionAccessor) connection).sendPacket( + new ServerboundCustomPayloadPacket( + ServerboundCustomPayloadPacket.BRAND, + new FriendlyByteBuf(Unpooled.buffer()).writeUtf(Advanced3Config.clientSpoofBrand) + ), listener + ); + return true; + } + return false; + } + + @Override + public boolean isDisabled() { + return !ModuleConfig.clientSpoofEnabled; + } +} diff --git a/src/main/java/top/infsky/cheatdetector/impl/modules/common/FlagDetector.java b/src/main/java/top/infsky/cheatdetector/impl/modules/common/FlagDetector.java index e3eb58b..07c7725 100644 --- a/src/main/java/top/infsky/cheatdetector/impl/modules/common/FlagDetector.java +++ b/src/main/java/top/infsky/cheatdetector/impl/modules/common/FlagDetector.java @@ -10,7 +10,6 @@ import top.infsky.cheatdetector.impl.Module; import top.infsky.cheatdetector.utils.TRSelf; import top.infsky.cheatdetector.config.Advanced3Config; -import top.infsky.cheatdetector.config.AlertConfig; import top.infsky.cheatdetector.config.ModuleConfig; import java.util.Queue; @@ -76,8 +75,6 @@ public void flag() { tasks.add(() -> { violations++; CheatDetector.CLIENT.player.refreshDimensions(); - if (!AlertConfig.disableBuffer) - if (violations % getAlertBuffer() != 0) return; customMsg(Component.translatable("cheatdetector.chat.alert.flagDetected").getString() + ChatFormatting.DARK_GRAY + violations); }); } @@ -86,8 +83,4 @@ public void flag() { public boolean isDisabled() { return !ModuleConfig.flagDetectorEnabled; } - @Override - public int getAlertBuffer() { - return Advanced3Config.flagDetectorAlertBuffer; - } } diff --git a/src/main/java/top/infsky/cheatdetector/impl/modules/pas/AntiFall.java b/src/main/java/top/infsky/cheatdetector/impl/modules/pas/AntiFall.java index d9d582f..fd7de76 100644 --- a/src/main/java/top/infsky/cheatdetector/impl/modules/pas/AntiFall.java +++ b/src/main/java/top/infsky/cheatdetector/impl/modules/pas/AntiFall.java @@ -1,6 +1,7 @@ package top.infsky.cheatdetector.impl.modules.pas; import lombok.Getter; +import net.minecraft.ChatFormatting; import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.core.BlockPos; import net.minecraft.network.chat.Component; @@ -89,6 +90,15 @@ public void _onTick() { @Override public boolean isDisabled() { - return !ModuleConfig.antiFallEnabled || !ModuleConfig.aaaPASModeEnabled; + if (!ModuleConfig.antiFallEnabled || player.fabricPlayer.isFallFlying()) return true; + if (ModuleConfig.noFallEnabled) { + customMsg(Component.translatable("cheatdetector.chat.alert.couldNotWorkWith").withStyle(ChatFormatting.DARK_RED).getString().formatted( + Component.translatable("cheatdetector.config.modules.antiFallEnabled.pretty_name").getString(), + Component.translatable("cheatdetector.config.modules.noFallEnabled.pretty_name").getString() + )); + CheatDetector.CONFIG_HANDLER.configManager.setValue("antiFallEnabled", false); + return true; + } + return !ModuleConfig.aaaPASModeEnabled; } } diff --git a/src/main/java/top/infsky/cheatdetector/impl/modules/pas/Backtrack.java b/src/main/java/top/infsky/cheatdetector/impl/modules/pas/Backtrack.java index ac8e457..63edcf9 100644 --- a/src/main/java/top/infsky/cheatdetector/impl/modules/pas/Backtrack.java +++ b/src/main/java/top/infsky/cheatdetector/impl/modules/pas/Backtrack.java @@ -147,7 +147,10 @@ private void onDied() { public boolean isDisabled() { if (!ModuleConfig.backtrackEnabled) return true; if (ModuleConfig.fakelagEnabled) { - customMsg(Component.translatable("cheatdetector.chat.alert.fakelagAndBacktrack").withStyle(ChatFormatting.DARK_RED).getString()); + customMsg(Component.translatable("cheatdetector.chat.alert.couldNotWorkWith").withStyle(ChatFormatting.DARK_RED).getString().formatted( + Component.translatable("cheatdetector.config.modules.backtrackEnabled.pretty_name").getString(), + Component.translatable("cheatdetector.config.modules.fakelagEnabled.pretty_name").getString() + )); CheatDetector.CONFIG_HANDLER.configManager.setValue("backtrackEnabled", false); return true; } diff --git a/src/main/java/top/infsky/cheatdetector/impl/modules/pas/NoFall.java b/src/main/java/top/infsky/cheatdetector/impl/modules/pas/NoFall.java new file mode 100644 index 0000000..655c738 --- /dev/null +++ b/src/main/java/top/infsky/cheatdetector/impl/modules/pas/NoFall.java @@ -0,0 +1,91 @@ +package top.infsky.cheatdetector.impl.modules.pas; + +import lombok.Getter; +import net.minecraft.ChatFormatting; +import net.minecraft.network.Connection; +import net.minecraft.network.PacketSendListener; +import net.minecraft.network.chat.Component; +import net.minecraft.network.protocol.Packet; +import net.minecraft.network.protocol.game.ServerboundMovePlayerPacket; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import top.infsky.cheatdetector.CheatDetector; +import top.infsky.cheatdetector.config.ModuleConfig; +import top.infsky.cheatdetector.impl.Module; +import top.infsky.cheatdetector.mixins.ConnectionAccessor; +import top.infsky.cheatdetector.utils.TRSelf; + +import java.util.List; + +public class NoFall extends Module { + @Getter + @Nullable + private static Module instance = null; + public static final List maxModCount = List.of(4, 4, 3); + private int currentModCount = 0; + private int hasModCount = 0; // 执行NoFall的次数 + + public NoFall(@NotNull TRSelf player) { + super("NoFall", player); + instance = this; + } + + @Override + public void _onTick() { + if (player.currentOnGround && currentModCount > 0) { + hasModCount++; + currentModCount = 0; + } + } + + @Override + public boolean _onPacketSend(@NotNull Packet basePacket, Connection connection, PacketSendListener listener, CallbackInfo ci) { + if (isDisabled()) return false; + + if (basePacket instanceof ServerboundMovePlayerPacket packet && player.fabricPlayer.fallDistance > 7.0) { + customMsg("currentMod: %s hasMod: %s".formatted(currentModCount, hasModCount)); + if (currentModCount > maxModCount.get(hasModCount % maxModCount.size())) { + return false; + } + + ci.cancel(); + player.fabricPlayer.resetFallDistance(); + player.fabricPlayer.setDeltaMovement(0, 0, 0); + if (packet instanceof ServerboundMovePlayerPacket.PosRot) { + ((ConnectionAccessor) connection).sendPacket( + new ServerboundMovePlayerPacket.PosRot(packet.getX(0), packet.getY(0), packet.getZ(0), packet.getYRot(0), packet.getXRot(0), true), + listener); + } else if (packet instanceof ServerboundMovePlayerPacket.Pos) { + ((ConnectionAccessor) connection).sendPacket( + new ServerboundMovePlayerPacket.Pos(packet.getX(0), packet.getY(0), packet.getZ(0), true), + listener); + } else if (packet instanceof ServerboundMovePlayerPacket.Rot) { + ((ConnectionAccessor) connection).sendPacket( + new ServerboundMovePlayerPacket.Rot(packet.getYRot(0), packet.getXRot(0), true), + listener); + } else if (packet instanceof ServerboundMovePlayerPacket.StatusOnly) { + ((ConnectionAccessor) connection).sendPacket( + new ServerboundMovePlayerPacket.StatusOnly(true), + listener); + } + currentModCount++; + return true; + } + return false; + } + + @Override + public boolean isDisabled() { + if (!ModuleConfig.noFallEnabled) return true; + if (ModuleConfig.antiFallEnabled) { + customMsg(Component.translatable("cheatdetector.chat.alert.couldNotWorkWith").withStyle(ChatFormatting.DARK_RED).getString().formatted( + Component.translatable("cheatdetector.config.modules.noFallEnabled.pretty_name").getString(), + Component.translatable("cheatdetector.config.modules.antiFallEnabled.pretty_name").getString() + )); + CheatDetector.CONFIG_HANDLER.configManager.setValue("noFallEnabled", false); + return true; + } + return !ModuleConfig.aaaPASModeEnabled; + } +} diff --git a/src/main/java/top/infsky/cheatdetector/impl/modules/pas/Nuker.java b/src/main/java/top/infsky/cheatdetector/impl/modules/pas/Nuker.java index d5164b4..f72c032 100644 --- a/src/main/java/top/infsky/cheatdetector/impl/modules/pas/Nuker.java +++ b/src/main/java/top/infsky/cheatdetector/impl/modules/pas/Nuker.java @@ -63,7 +63,8 @@ public void _onTick() { BlockPos blockPos = null; BlockState blockState = null; try { - while (blockState == null || blockState.isAir() || !blockState.is(targetBlockType)) { + while (blockState == null || blockState.isAir() || !blockState.is(targetBlockType) + || (Advanced3Config.nukerKeepGround && blockPos.equals(player.fabricPlayer.getOnPos()))) { blockPos = Objects.requireNonNull(cacheBlocks.poll()); blockState = LevelUtils.getClientLevel().getBlockState(blockPos); } diff --git a/src/main/java/top/infsky/cheatdetector/impl/modules/pas/fakelag/FakelagDynamic.java b/src/main/java/top/infsky/cheatdetector/impl/modules/pas/fakelag/FakelagDynamic.java index 6dbbc27..bd7faeb 100644 --- a/src/main/java/top/infsky/cheatdetector/impl/modules/pas/fakelag/FakelagDynamic.java +++ b/src/main/java/top/infsky/cheatdetector/impl/modules/pas/fakelag/FakelagDynamic.java @@ -160,7 +160,10 @@ public boolean isDisabled() { if (Advanced3Config.getFakelagMode() != Advanced3Config.FakelagMode.DYNAMIC) return true; if (!ModuleConfig.fakelagEnabled || player.fabricPlayer.isPassenger() || disableTicks > 0) return true; if (ModuleConfig.backtrackEnabled) { - customMsg(Component.translatable("cheatdetector.chat.alert.fakelagAndBacktrack").withStyle(ChatFormatting.DARK_RED).getString()); + customMsg(Component.translatable("cheatdetector.chat.alert.couldNotWorkWith").withStyle(ChatFormatting.DARK_RED).getString().formatted( + Component.translatable("cheatdetector.config.modules.fakelagEnabled.pretty_name").getString(), + Component.translatable("cheatdetector.config.modules.backtrackEnabled.pretty_name").getString() + )); CheatDetector.CONFIG_HANDLER.configManager.setValue("fakelagEnabled", false); return true; } diff --git a/src/main/java/top/infsky/cheatdetector/impl/modules/pas/fakelag/FakelagLatency.java b/src/main/java/top/infsky/cheatdetector/impl/modules/pas/fakelag/FakelagLatency.java index fd3a6db..9be0c74 100644 --- a/src/main/java/top/infsky/cheatdetector/impl/modules/pas/fakelag/FakelagLatency.java +++ b/src/main/java/top/infsky/cheatdetector/impl/modules/pas/fakelag/FakelagLatency.java @@ -116,7 +116,10 @@ public boolean isDisabled() { if (Advanced3Config.getFakelagMode() != Advanced3Config.FakelagMode.LATENCY) return true; if (!ModuleConfig.fakelagEnabled) return true; if (ModuleConfig.backtrackEnabled) { - customMsg(Component.translatable("cheatdetector.chat.alert.fakelagAndBacktrack").withStyle(ChatFormatting.DARK_RED).getString()); + customMsg(Component.translatable("cheatdetector.chat.alert.couldNotWorkWith").withStyle(ChatFormatting.DARK_RED).getString().formatted( + Component.translatable("cheatdetector.config.modules.fakelagEnabled.pretty_name").getString(), + Component.translatable("cheatdetector.config.modules.backtrackEnabled.pretty_name").getString() + )); CheatDetector.CONFIG_HANDLER.configManager.setValue("fakelagEnabled", false); return true; } diff --git a/src/main/java/top/infsky/cheatdetector/impl/utils/world/ContainerUtils.java b/src/main/java/top/infsky/cheatdetector/impl/utils/world/ContainerUtils.java index 8e5b08b..6c01fed 100644 --- a/src/main/java/top/infsky/cheatdetector/impl/utils/world/ContainerUtils.java +++ b/src/main/java/top/infsky/cheatdetector/impl/utils/world/ContainerUtils.java @@ -1,6 +1,5 @@ package top.infsky.cheatdetector.impl.utils.world; -import net.minecraft.network.Connection; import net.minecraft.network.protocol.game.ServerboundSetCarriedItemPacket; import net.minecraft.world.Container; import net.minecraft.world.item.Item; diff --git a/src/main/java/top/infsky/cheatdetector/impl/utils/world/VelocityUtils.java b/src/main/java/top/infsky/cheatdetector/impl/utils/world/VelocityUtils.java index 094cddb..c95786d 100644 --- a/src/main/java/top/infsky/cheatdetector/impl/utils/world/VelocityUtils.java +++ b/src/main/java/top/infsky/cheatdetector/impl/utils/world/VelocityUtils.java @@ -5,8 +5,6 @@ import net.minecraft.world.Difficulty; import net.minecraft.world.effect.MobEffect; import net.minecraft.world.effect.MobEffects; -import net.minecraft.world.item.Item; -import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.MagmaBlock; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/top/infsky/cheatdetector/mixins/MixinLocalPlayer.java b/src/main/java/top/infsky/cheatdetector/mixins/MixinLocalPlayer.java new file mode 100644 index 0000000..941b361 --- /dev/null +++ b/src/main/java/top/infsky/cheatdetector/mixins/MixinLocalPlayer.java @@ -0,0 +1,25 @@ +package top.infsky.cheatdetector.mixins; + +import net.minecraft.client.player.LocalPlayer; +import net.minecraft.world.entity.MoverType; +import net.minecraft.world.phys.Vec3; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import top.infsky.cheatdetector.impl.modules.common.AirStuck; + +@Mixin(LocalPlayer.class) +public class MixinLocalPlayer { + @Inject(method = "move", at = @At(value = "HEAD"), cancellable = true) + public void move(MoverType moverType, Vec3 vec3, CallbackInfo ci) { + AirStuck airStuck = (AirStuck) (AirStuck.getInstance()); + if (airStuck != null) { + if (vec3.equals(airStuck.getModMoveTo())) return; + if ((airStuck).isShouldStuck()) { + ci.cancel(); + ((LocalPlayer) (Object) this).move(moverType, airStuck.getModMoveTo()); + } + } + } +} diff --git a/src/main/java/top/infsky/cheatdetector/utils/CheckManager.java b/src/main/java/top/infsky/cheatdetector/utils/CheckManager.java index 2a56740..5c0c1b0 100644 --- a/src/main/java/top/infsky/cheatdetector/utils/CheckManager.java +++ b/src/main/java/top/infsky/cheatdetector/utils/CheckManager.java @@ -108,6 +108,9 @@ public CheckManager(@NotNull Map, Check> preChecks, post.put(Debug.class, new Debug(player)); post.put(Nuker.class, new Nuker(player)); post.put(BlockDetector.class, new BlockDetector(player)); + post.put(AirStuck.class, new AirStuck(player)); + pre.put(NoFall.class, new NoFall(player)); + pre.put(ClientSpoof.class, new ClientSpoof(player)); return new CheckManager(pre, normal, post, player); } @@ -115,7 +118,6 @@ public CheckManager(@NotNull Map, Check> preChecks, public void update() { if (disableTick > 0) { disableTick--; - return; } if (player.currentGameType != player.lastGameType) { for (Check check : preChecks.values()) check._onGameTypeChange(); diff --git a/src/main/java/top/infsky/cheatdetector/utils/PlayerManager.java b/src/main/java/top/infsky/cheatdetector/utils/PlayerManager.java index 33b23fe..9425541 100644 --- a/src/main/java/top/infsky/cheatdetector/utils/PlayerManager.java +++ b/src/main/java/top/infsky/cheatdetector/utils/PlayerManager.java @@ -40,11 +40,10 @@ public void update(@NotNull Minecraft client) { // 更新 activeMap.replace(uuid, true); try { - if (player.getUUID() == client.player.getUUID()) { - dataMap.get(uuid).update(player); - } else dataMap.get(uuid).update(player); - } catch (NullPointerException e) { - LogUtils.LOGGER.error(String.format("玩家 %s 的数据不存在!丢弃玩家。", player.getName()), e); + dataMap.get(uuid).update(player); + } catch (Exception e) { + LogUtils.custom("Exception in console."); + LogUtils.LOGGER.error(String.format("遇到了异常,丢弃玩家 %s 数据。", player.getName().getString()), e); activeMap.remove(uuid); } } diff --git a/src/main/java/top/infsky/cheatdetector/utils/TRPlayer.java b/src/main/java/top/infsky/cheatdetector/utils/TRPlayer.java index 7700246..ef636df 100644 --- a/src/main/java/top/infsky/cheatdetector/utils/TRPlayer.java +++ b/src/main/java/top/infsky/cheatdetector/utils/TRPlayer.java @@ -31,24 +31,24 @@ public class TRPlayer { public AbstractClientPlayer fabricPlayer; public CheckManager manager; public static Minecraft CLIENT = CheatDetector.CLIENT; - public Vec3 currentPos; - public Vec3 lastPos; - public Vec2 currentRot; - public Vec2 lastRot; + public Vec3 currentPos = Vec3.ZERO; + public Vec3 lastPos = Vec3.ZERO; + public Vec2 currentRot = Vec2.ZERO; + public Vec2 lastRot = Vec2.ZERO; @Range(from = 0, to = 19) public List posHistory; - public Vec3 lastOnGroundPos; - public Vec3 lastOnGroundPos2; - public Vec3 lastInLiquidPos; - public Vec3 lastOnLiquidGroundPos; - public boolean currentOnGround; - public boolean lastOnGround; - public boolean lastOnGround2; + public Vec3 lastOnGroundPos = Vec3.ZERO; + public Vec3 lastOnGroundPos2 = Vec3.ZERO; + public Vec3 lastInLiquidPos = Vec3.ZERO; + public Vec3 lastOnLiquidGroundPos = Vec3.ZERO; + public boolean currentOnGround = true; + public boolean lastOnGround = true; + public boolean lastOnGround2 = true; public boolean hasSetback = false; public boolean jumping = false; public boolean lastUsingItem = false; public double speedMul = 1; - public GameType currentGameType; - public GameType lastGameType; + public GameType currentGameType = GameType.SURVIVAL; + public GameType lastGameType = GameType.SURVIVAL; public long upTime = 0; public int latency = 0; public float lastFallDistance = 0; diff --git a/src/main/resources/assets/cheatdetector/lang/en_us.json b/src/main/resources/assets/cheatdetector/lang/en_us.json index c3db05a..b210701 100644 --- a/src/main/resources/assets/cheatdetector/lang/en_us.json +++ b/src/main/resources/assets/cheatdetector/lang/en_us.json @@ -2,7 +2,7 @@ "cheatdetector.chat.alert.nukerSetBlock": "Set Block Type is %s.", "cheatdetector.chat.alert.blockDetected": "Detected Block (%s,%s,%s) is %s.", "cheatdetector.chat.say.sayHacker": "%s is a cheater! which failed %s | %s", - "cheatdetector.chat.alert.fakelagAndBacktrack": "Fakelag couldn't work with Backtrack!", + "cheatdetector.chat.alert.couldNotWorkWith": "%s couldn't work with %s!", "cheatdetector.chat.alert.creativeFlyWithoutDisabler": "CreativeFly must use with Movement Disabler!", "cheatdetector.chat.alert.fail": "failed", "cheatdetector.chat.alert.flagDetected": "Flag detected: ", @@ -38,9 +38,6 @@ "cheatdetector.config.fixes.packetFixEnabled.pretty_name": "PacketFix", "cheatdetector.config.fixes.packetFixMode.comment": "NORMAL: Fix some packets that may flag, most anti-cheats will not flag. \nSTRICT: Fix all known packets that may flag, some features of the Mod are affected.", "cheatdetector.config.fixes.packetFixMode.name": "PacketFix Mode", - "cheatdetector.config.fixes.vulcanDisablerEnabled.comment": "You need to have a trident containing the Riptide enchantment in your secondary handheld to disable movement detection. \nThis module was designed for Vulcan 2.7.5 and doesn't seem to work with newer Vulcan. \n Thanks to @§nCCBlueX§r .", - "cheatdetector.config.fixes.vulcanDisablerEnabled.name": "Enable Vulcan Disabler", - "cheatdetector.config.fixes.vulcanDisablerEnabled.pretty_name": "Vulcan Disabler", "cheatdetector.config.fixes.watchdogNoSlowDisablerEnabled.comment": "Disable Watchdog NoSlow check.", "cheatdetector.config.fixes.watchdogNoSlowDisablerEnabled.name": "Enable Watchdog NoSlow Disabler", "cheatdetector.config.fixes.watchdogNoSlowDisablerEnabled.pretty_name": "Watchdog NoSlow Disabler", @@ -98,9 +95,6 @@ "cheatdetector.config.modules.aaaPASModeEnabled.comment": "If enabled, we will shown some un-legit module which for PAS Server.", "cheatdetector.config.modules.aaaPASModeEnabled.name": "Enable PAS Mode", "cheatdetector.config.modules.aaaPASModeEnabled.pretty_name": "PAS Mode", - "cheatdetector.config.modules.aaaHypixelModeEnabled.comment": "If enabled, we will shown some un-legit module which for Hypixel Server.", - "cheatdetector.config.modules.aaaHypixelModeEnabled.name": "Enable Hypixel Mode", - "cheatdetector.config.modules.aaaHypixelModeEnabled.pretty_name": "Hypixel Mode", "cheatdetector.config.modules.aimAssistEnabled.comment": "If enabled, we will try to aim something around you.", "cheatdetector.config.modules.aimAssistEnabled.name": "Enable AimAssist", "cheatdetector.config.modules.aimAssistEnabled.pretty_name": "AimAssist", @@ -119,6 +113,15 @@ "cheatdetector.config.modules.blockDetectorEnabled.comment": "If enabled, we will keep watching this block.", "cheatdetector.config.modules.blockDetectorEnabled.name": "Enable BlockDetector", "cheatdetector.config.modules.blockDetectorEnabled.pretty_name": "BlockDetector", + "cheatdetector.config.modules.noFallEnabled.comment": "If enabled, we will try to remove your fall damage.", + "cheatdetector.config.modules.noFallEnabled.name": "Enable NoFall", + "cheatdetector.config.modules.noFallEnabled.pretty_name": "NoFall", + "cheatdetector.config.modules.airStuckEnabled.comment": "If enabled, we will lock you in the air.", + "cheatdetector.config.modules.airStuckEnabled.name": "Enable AirStuck", + "cheatdetector.config.modules.airStuckEnabled.pretty_name": "AirStuck", + "cheatdetector.config.modules.clientSpoofEnabled.comment": "If enabled, we will spoof your client brand.", + "cheatdetector.config.modules.clientSpoofEnabled.name": "Enable ClientSpoof", + "cheatdetector.config.modules.clientSpoofEnabled.pretty_name": "ClientSpoof", "cheatdetector.gui.button.tab.advanced": "Advanced AntiCheat", "cheatdetector.gui.button.tab.advanced2": "Advanced Fixes", "cheatdetector.gui.button.tab.advanced3": "Advanced Modules", @@ -126,5 +129,5 @@ "cheatdetector.gui.button.tab.anticheat": "AntiCheat", "cheatdetector.gui.button.tab.fixes": "Fixes", "cheatdetector.gui.button.tab.modules": "Modules", - "cheatdetector.gui.title": "CheatDetector 2.7.0" + "cheatdetector.pretty_name": "CheatDetector" } \ No newline at end of file diff --git a/src/main/resources/assets/cheatdetector/lang/zh_cn.json b/src/main/resources/assets/cheatdetector/lang/zh_cn.json index 834e93a..d9ab241 100644 --- a/src/main/resources/assets/cheatdetector/lang/zh_cn.json +++ b/src/main/resources/assets/cheatdetector/lang/zh_cn.json @@ -2,9 +2,9 @@ "cheatdetector.chat.alert.blockDetected": "检测到方块(%s %s %s)为 %s 。", "cheatdetector.chat.alert.clutch": "自救!", "cheatdetector.chat.alert.clutchDone": "自救结束。", + "cheatdetector.chat.alert.couldNotWorkWith": "%s 不能和 %s 一起工作!", "cheatdetector.chat.alert.creativeFlyWithoutDisabler": "创造模式飞行必须与移动禁用器一起使用!", "cheatdetector.chat.alert.fail": "触发了", - "cheatdetector.chat.alert.fakelagAndBacktrack": "假延迟不能和回溯一起工作!", "cheatdetector.chat.alert.flagDetected": "检测到标记: ", "cheatdetector.chat.alert.foundVanish": "找到隐身玩家: ", "cheatdetector.chat.alert.nukerSetBlock": "设置方块种类为 %s 。", @@ -38,19 +38,13 @@ "cheatdetector.config.fixes.packetFixEnabled.pretty_name": "发包修复", "cheatdetector.config.fixes.packetFixMode.comment": "NORMAL: 修复一些可能会标记的数据包,大部分反作弊不会标记。\nSTRICT: 修复所有已知可能会标记的数据包,Mod的部分功能受到影响。", "cheatdetector.config.fixes.packetFixMode.name": "发包修复模式", - "cheatdetector.config.fixes.vulcanDisablerEnabled.comment": "你需要在副手持有一个包含激流附魔的三叉戟以禁用移动检测。\n这个模块为Vulcan 2.7.5设计,更新的Vulcan似乎无法使用。\n感谢 @§nCCBlueX§r 。", - "cheatdetector.config.fixes.vulcanDisablerEnabled.name": "启用 Vulcan 移动禁用器", - "cheatdetector.config.fixes.vulcanDisablerEnabled.pretty_name": "Vulcan 移动禁用器", "cheatdetector.config.fixes.vulcanOmniSprintEnabled.comment": "[旧版 Vulcan] 禁用全方向疾跑检查\n感谢 @§nAlan34§r 。", "cheatdetector.config.fixes.vulcanOmniSprintEnabled.name": "启用 Vulcan 全方向疾跑禁用器", "cheatdetector.config.fixes.vulcanOmniSprintEnabled.pretty_name": "Vulcan 全方向疾跑禁用器", "cheatdetector.config.fixes.watchdogNoSlowDisablerEnabled.comment": "禁用Watchdog无减速检查。", "cheatdetector.config.fixes.watchdogNoSlowDisablerEnabled.name": "启用 Watchdog 无减速禁用器", "cheatdetector.config.fixes.watchdogNoSlowDisablerEnabled.pretty_name": "Watchdog 无减速禁用器", - "cheatdetector.config.modules.aaaHypixelModeEnabled.comment": "如果启用,我们会允许一些危险的模块,它们专为Hypixel服务器设计。\n请注意,这些模块或多或少的利用了一些漏洞,因此在除Hypixel以外的服务器使用时,请务必清楚你在做什么。", - "cheatdetector.config.modules.aaaHypixelModeEnabled.name": "Hypixel 模式", - "cheatdetector.config.modules.aaaHypixelModeEnabled.pretty_name": "Hypixel 模式", - "cheatdetector.config.modules.aaaPASModeEnabled.comment": "如果启用,我们会允许一些危险的模块,它们专为PAS服务器设计。\n请注意,这些模块或多或少的利用了一些漏洞,因此在除PAS以外的服务器使用时,请务必清楚你在做什么。", + "cheatdetector.config.modules.aaaPASModeEnabled.comment": "如果启用,我们会允许一些危险的模块,它们专为PAS服务器设计。\n请注意,这些模块或多或少的利用了一些漏洞,因此在除PAS以外的服务器使用时,请务必清楚你在做什么。\n§lLeaves Server + Vulcan 2.7.7§r", "cheatdetector.config.modules.aaaPASModeEnabled.name": "PAS 模式", "cheatdetector.config.modules.aaaPASModeEnabled.pretty_name": "PAS 模式", "cheatdetector.config.modules.aimAssistEnabled.comment": "如果启用,我们会尝试瞄准你身边的一些东西。", @@ -59,6 +53,9 @@ "cheatdetector.config.modules.airPlaceEnabled.comment": "如果启用,你将能在空气中放方块。\n感谢 @§nWurst-Imperium§r 。", "cheatdetector.config.modules.airPlaceEnabled.name": "启用 空中放置", "cheatdetector.config.modules.airPlaceEnabled.pretty_name": "空中放置", + "cheatdetector.config.modules.airStuckEnabled.comment": "如果启用,我们会使你卡在空中。\n§o“日在校园,卡在空中(什”\n感谢 @§nCCBlueX§r 。", + "cheatdetector.config.modules.airStuckEnabled.name": "启用 卡在空中", + "cheatdetector.config.modules.airStuckEnabled.pretty_name": "卡在空中", "cheatdetector.config.modules.antiFallEnabled.comment": "如果启用,我们会在你摔落时救下你。\n感谢 @§nE-Sound§r 。", "cheatdetector.config.modules.antiFallEnabled.name": "启用 防摔落", "cheatdetector.config.modules.antiFallEnabled.pretty_name": "防摔落", @@ -77,12 +74,15 @@ "cheatdetector.config.modules.clickGUIEnabled.comment": "显示一个可以点击的界面用于管理Mod。", "cheatdetector.config.modules.clickGUIEnabled.name": "启用 ClickGUI", "cheatdetector.config.modules.clickGUIEnabled.pretty_name": "ClickGUI", + "cheatdetector.config.modules.clientSpoofEnabled.comment": "如果启用,我们将会伪装你的客户端。(重新加入服务器生效)", + "cheatdetector.config.modules.clientSpoofEnabled.name": "启用 客户端伪装", + "cheatdetector.config.modules.clientSpoofEnabled.pretty_name": "客户端伪装", "cheatdetector.config.modules.creativeFlyEnabled.comment": "如果启用,你将能像创造模式一样飞行。", "cheatdetector.config.modules.creativeFlyEnabled.name": "启用 创造模式飞行", "cheatdetector.config.modules.creativeFlyEnabled.pretty_name": "创造模式飞行", "cheatdetector.config.modules.debugEnabled.comment": "如果启用,我们会显示一些调试信息。", - "cheatdetector.config.modules.debugEnabled.name": "启用 Debug", - "cheatdetector.config.modules.debugEnabled.pretty_name": "Debug", + "cheatdetector.config.modules.debugEnabled.name": "启用 调试", + "cheatdetector.config.modules.debugEnabled.pretty_name": "调试", "cheatdetector.config.modules.fakelagEnabled.comment": "如果启用,我们会制造一些滞后。", "cheatdetector.config.modules.fakelagEnabled.name": "启用 假延迟", "cheatdetector.config.modules.fakelagEnabled.pretty_name": "假延迟", @@ -98,6 +98,9 @@ "cheatdetector.config.modules.jumpResetEnabled.comment": "如果启用,我们会通过跳跃重置减少你的击退。", "cheatdetector.config.modules.jumpResetEnabled.name": "启用 跳跃重置", "cheatdetector.config.modules.jumpResetEnabled.pretty_name": "跳跃重置", + "cheatdetector.config.modules.noFallEnabled.comment": "如果启用,我们会尝试减小你的摔落伤害。\n感谢 @§nCCBlueX§r 。", + "cheatdetector.config.modules.noFallEnabled.name": "启用 减小摔落伤害", + "cheatdetector.config.modules.noFallEnabled.pretty_name": "减小摔落伤害", "cheatdetector.config.modules.noRotateSetEnabled.comment": "如果启用,您的头将不会被服务器旋转。这或许可以解决自旋模块的一些问题。\n“不要转我的头!”", "cheatdetector.config.modules.noRotateSetEnabled.name": "启用 无旋转设定", "cheatdetector.config.modules.noRotateSetEnabled.pretty_name": "无旋转设定", @@ -126,5 +129,5 @@ "cheatdetector.gui.button.tab.anticheat": "反作弊", "cheatdetector.gui.button.tab.fixes": "修复", "cheatdetector.gui.button.tab.modules": "模块", - "cheatdetector.gui.title": "作弊检测器 2.7.0" + "cheatdetector.pretty_name": "作弊检测器" } \ No newline at end of file diff --git a/src/main/resources/cheatdetector.mixins.json b/src/main/resources/cheatdetector.mixins.json index 9058bcb..364de10 100644 --- a/src/main/resources/cheatdetector.mixins.json +++ b/src/main/resources/cheatdetector.mixins.json @@ -13,6 +13,7 @@ "LookAtPacketAccessor", "MinecraftAccessor", "MixinConnection", + "MixinLocalPlayer", "MixinMultiPlayerGameMode", "MouseHandlerAccessor" ]