Начинающий
- Статус
- Оффлайн
- Регистрация
- 10 Янв 2025
- Сообщения
- 123
- Реакции
- 0
- Выберите загрузчик игры
- Прочие моды
дропаю тк обход максимально бичевый,буквально 10 строк обхода бичевского
бьет через 1-2 блока иногда может банить если долго бить когда не идут удары
кто доделает тот маладца
ss-(у мя комп слабый сарян за фпс такой)
сам код -
бьет через 1-2 блока иногда может банить если долго бить когда не идут удары
кто доделает тот маладца
ss-(у мя комп слабый сарян за фпс такой)
Пожалуйста, авторизуйтесь для просмотра ссылки.
(имгур)сам код -
Код:
@ModuleInfo(name = "AttackAura", category = Category.COMBAT, desc = "Автоматическая атака ближайших врагов")
public class AttackAura extends Module {
private final SliderSetting attackRange = new SliderSetting(this, "Радиус атаки", 3.0F, 3.0F, 6, 0.1F);
private final SliderSetting preRange = new SliderSetting(this, "Радиус обнаружения", 1.0F, 0.0F, 5, 0.1F);
// режим ротации нахуй один похуй
public final ModeSetting rotationMode = new ModeSetting(this, "Тип навидения", "SpookyTime").setHidden(true);
public final SliderSetting speedYAW1 = new SliderSetting(this, "Минимальная скорость по XZ", 8, 2, 50, 1);
public final SliderSetting speedYAW2 = new SliderSetting(this, "Максимальная скорость по XZ", 16, 10, 80, 1);
public final SliderSetting speedPITH1 = new SliderSetting(this, "Минимальная скорость по Y", 2, 0, 10, 1);
public final SliderSetting speedPITH2 = new SliderSetting(this, "Максимальная скорость по Y", 5, 2, 50, 1);
public final MultiBooleanSetting targets = new MultiBooleanSetting(this, "Кого атаковать",
BooleanSetting.of("Игроки", true),
BooleanSetting.of("Голые", true),
BooleanSetting.of("Мобы", false),
BooleanSetting.of("Друзей", false));
public final ModeSetting targetType = new ModeSetting(
this, "Отображения цели",
"Обычный", "Простой", "Стрелка", "Квадрат", "Не отображать");
public final ModeSetting critmode = new ModeSetting(this, "Тип критов", "Только криты", "Умные криты");
public final ModeSetting sprintMode = new ModeSetting(this, "Тип спринта", "Легитный", "Быстрый").set("Легитный");
public final ModeSetting modeSetting = new ModeSetting(this, "Коррекция движения", "Сильная", "Свободная", "Преследования", "Таргетированная").set("Сильная");
private final MultiBooleanSetting checkattack = new MultiBooleanSetting(
this, "Не бить если", BooleanSetting.of("Используеш еду", true), BooleanSetting.of("Открыт контейнер", false));
public BooleanSetting attackforStinka = new BooleanSetting(this, "Бить через блоки", false);
public BooleanSetting wallBypass = new BooleanSetting(this, "Обход через стены", false)
.setVisible(() -> attackforStinka.getValue());
public BooleanSetting onlySworld = new BooleanSetting(this, "Бить только с оружием", false);
public BooleanSetting breacShild = new BooleanSetting(this, "Автоматичиски ломать щит", false);
public BooleanSetting shildblock = new BooleanSetting(this, "Отжимать щит при ударе", false);
public BooleanSetting resolver = new BooleanSetting(this, "Резольвер", false);
private final PerfectDelay perfectDelay = new PerfectDelay();
private final StopWatch stopWatch = new StopWatch();
private final Script script = new Script();
@Getter
public LivingEntity target = null;
private boolean canCrit;
private int count;
private int count2;
private int p;
public static final float MAX_PITCH = 90.0F;
private float savedPitch = 0f;
private boolean isWallBypass = false;
public static final float MIN_PITCH = -90.0F;
private static final float COOLDOWN_THRESHOLD = 0.93F;
public static final float CRIT_COOLDOWN_THRESHOLD = 0.5F;
private boolean isWallBypassActive = false;
private float originalPitch = 0f;
private long bypassStartTime = 0;
private static final long BYPASS_DURATION = 150;
public static AttackAura getInstance() {
return Instance.get(AttackAura.class);
}
@Override
public void toggle() {
super.toggle();
reset();
}
private boolean anyEntityOnRay(LivingEntity livingIn, float yaw, float pitch, double range) {
return livingIn != null && dev.kodek.client.managers.module.impl.combat.aura.RayTraceUtil.isViewEntity(livingIn, MathHelper.wrapDegrees(yaw), pitch, (float) range, true);
}
@EventHandler
public void onWorldLoad(WorldLoadEvent event) {
reset();
}
@EventHandler
public void onWorldChange(WorldChangeEvent event) {
reset();
}
@EventHandler
public void onUpdate(UpdateEvent event) {
script.update();
if (!mc.player.isAlive()) {
toggle();
return;
}
if (target == null || !isValidTarget(target)) {
updateTarget();
}
if (target != null) {
TargetComponent.currentTarget = target;
}
if (target != null && mc.player != null && mc.world != null) {
if (!checkReturn()) {
attackEntity();
}
} else {
reset();
}
}
public float[] getRanges() {
return new float[]{attackRange.getValue(), preRange.getValue()};
}
public boolean isRayCastRuleToAttack() {
return true;
}
public void attackEntity() {
if (AuraUtil.getStrictDistance(target) >= attackDistance()) {
return;
}
float[] ranges = getRanges();
ranges = new float[]{ranges[0], ranges[1], ranges[0] + ranges[1]};
if (target == null) {
return;
}
for (Entity entity : mc.world.getAllEntities()) {
if (entity instanceof AbstractClientPlayerEntity abstractClientPlayerEntity && resolver.getValue()) {
abstractClientPlayerEntity.resolve();
}
}
boolean canAttack = shouldAttack();
if (!canAttack) {
for (Entity entity : mc.world.getAllEntities()) {
if (entity instanceof AbstractClientPlayerEntity abstractClientPlayerEntity && resolver.getValue()) {
abstractClientPlayerEntity.releaseResolver();
}
}
return;
}
// обход через стены если надо
float originalPitch = mc.player.rotationPitch;
boolean needBypass = false;
if (wallBypass.getValue() && attackforStinka.getValue()) {
Vector3d targetPoint = RayTraceUtil.getPoint(target);
if (!RayTraceUtil.canSeen(targetPoint)) {
needBypass = true;
float bypassPitch = (originalPitch + (-90f)) / 2f;
RotationComponent.update(new Rotation(mc.player.rotationYaw, bypassPitch),
300, 300, 300, 300, 1, 5, false);
}
}
final Runnable[] shieldBreak = {() -> {
if (breacShild.getValue() && target instanceof PlayerEntity && ((PlayerEntity) target).isActiveItemStackBlocking()) {
mc.playerController.attackEntity(mc.player, target);
}
}};
final Runnable[] shieldPressBypass = {() -> {}};
final Runnable[] skipSilentSprint = {() -> {}};
final boolean shouldResetPitch = needBypass;
final float savedPitch = originalPitch;
final Runnable preHitSendCodeSingleTick = () -> {
skipSilentSprint[0].run();
shieldPressBypass[0].run();
shieldBreak[0].run();
};
final Runnable postHitSendCodeSingleTick = () -> {
shieldBreak[1] = () -> {};
if (shouldResetPitch) {
RotationComponent.update(new Rotation(mc.player.rotationYaw, savedPitch),
360, 360, 360, 360, 0, 5, false);
}
};
if (mc.player.isBlocking() && shildblock.getValue()) {
mc.playerController.onStoppedUsingItem(mc.player);
}
mc.playerController.attackEntity(mc.player, target);
mc.player.swingArm(Hand.MAIN_HAND);
for (Entity entity : mc.world.getAllEntities()) {
if (entity instanceof AbstractClientPlayerEntity abstractClientPlayerEntity && resolver.getValue()) {
abstractClientPlayerEntity.releaseResolver();
}
}
}
@EventHandler
public void onGameUpdate(GameUpdateEvent event) {
if (target != null && mc.player != null && mc.world != null) {
updateRotation();
} else {
reset();
}
}
private void updateRotation() {
double maxHeight = (AuraUtil.getStrictDistance(target) / attackDistance());
Vector3d eyePos = mc.player.getEyePosition(mc.getRenderPartialTicks());
Vector3d targetPos;
float yaw = 0, pitch = 0;
float[] ranges = getRanges();
ranges = new float[]{ranges[0], ranges[1], ranges[0] + ranges[1]};
boolean canAttack = shouldAttack();
// обход через стены
if (wallBypass.getValue() && attackforStinka.getValue()) {
boolean isBehindWall = !RayTraceUtil.canSeen(RayTraceUtil.getPoint(target));
if (isBehindWall) {
Vector2f targetRotation = RotationUtil.calculate(target, 1.5F);
if (!canAttack) {
if (!isWallBypass) {
savedPitch = mc.player.rotationPitch;
isWallBypass = true;
}
RotationComponent.update(
new Rotation(targetRotation.x, -70f),
80, 80, 80, 80, 0, 5, false
);
} else {
RotationComponent.update(
new Rotation(targetRotation.x, targetRotation.y),
360, 360, 360, 360, 0, 5, false
);
isWallBypass = false;
}
return;
} else {
isWallBypass = false;
}
}
// спокухатим ротация (только одна нахуй)
SpookyTimeRotation.rotation(target, canAttack, (float) attackDistance(), checkReturn());
}
private final Vector2f lerpRotation = Vector2f.ZERO;
public float wrapLerp(float step, float input, float target) {
return input + step * MathHelper.wrapDegrees(target - input);
}
@EventHandler
public void onAction(ActionEvent event) {
if (cancelSprintTick())
event.setSprintState(false);
}
@EventHandler
public void onMoveKeys(MoveInputEvent event) {
if (cancelSprintTick()) {
event.setStrafe(0);
event.setForward(0);
}
}
float visualstick = 0;
@EventHandler
public void onEvent(MotionEvent event) {
// нихуя не делаем тут лишнего
}
private boolean checkReturn() {
return (mc.player.isHandActive() && (
checkattack.getValue("Используеш еду") && !(mc.player.getActiveItemStack().getItem() instanceof ShieldItem))) ||
mc.currentScreen != null && checkattack.getValue("Открыт контейнер") ||
(!(mc.player.getHeldItemMainhand().getItem() instanceof AxeItem) &&
!(mc.player.getHeldItemMainhand().getItem() instanceof SwordItem) &&
onlySworld.getValue());
}
private void attackEntity(Entity entity) {
mc.playerController.attackEntity(mc.player, entity);
mc.player.swingArm(Hand.MAIN_HAND);
}
private void updateTarget() {
ArrayList<LivingEntity> validTargets = new ArrayList<>();
for (Entity entity : mc.world.getAllEntities()) {
if (entity instanceof LivingEntity livingEntity && isValidTarget(livingEntity)) {
validTargets.add(livingEntity);
}
}
if (validTargets.isEmpty()) {
target = null;
} else if (validTargets.size() == 1) {
target = validTargets.get(0);
} else {
validTargets.sort((entity1, entity2) -> {
Vector3d eyePos = mc.player.getEyePosition(1.0F);
Vector3d lookVec = mc.player.getLookVec().normalize();
Vector3d pos1 = entity1.getPositionVec().add(0.0F, entity1.getHeight() / 2.0F, 0.0F).subtract(eyePos).normalize();
Vector3d pos2 = entity2.getPositionVec().add(0.0F, entity2.getHeight() / 2.0F, 0.0F).subtract(eyePos).normalize();
double dot1 = lookVec.dotProduct(pos1);
double dot2 = lookVec.dotProduct(pos2);
return Double.compare(dot2, dot1);
});
target = validTargets.get(0);
}
}
public boolean isValidTarget(LivingEntity entity) {
if (entity instanceof ClientPlayerEntity || entity.ticksExisted < 3) {
return false;
}
if (mc.player.getDistance(entity) > attackFactor()) {
return false;
}
if (!attackforStinka.getValue() && !RayTraceUtil.canSeen(RayTraceUtil.getPoint(entity))) {
return false;
}
if (entity instanceof PlayerEntity player) {
if (Neris.inst().friendManager().isFriend(player.getName().getString()) && !targets.getValue("Друзей")) {
return false;
}
if (entity instanceof ArmorStandEntity || (player.isBot || AntiBot.getInstance().isBot(player)) && AntiBot.getInstance().isEnabled()) {
return false;
}
if (!targets.getValue("Игроки")) {
return false;
}
if (entity.getTotalArmorValue() == 0 && !targets.getValue("Голые")) {
return false;
}
}
if ((entity instanceof MonsterEntity || entity instanceof SlimeEntity
|| entity instanceof VillagerEntity
|| entity instanceof DolphinEntity
|| entity instanceof SquidEntity
|| entity instanceof AbstractFishEntity || entity instanceof AnimalEntity || entity instanceof GhastEntity || entity instanceof ShulkerEntity
|| entity instanceof PhantomEntity || entity instanceof WanderingTraderEntity) && !targets.getValue("Мобы")) {
return false;
}
return !entity.isInvulnerable() && entity.isAlive() && !(entity instanceof ArmorStandEntity);
}
private float attackFactor() {
return attackRange.getValue().floatValue() + preRange.getValue().floatValue();
}
private long lastRandomCooldown = 0;
private long randomCooldownDelay = 0;
public long lastLookUpTime = 0;
public long nextLookUpDelay = ThreadLocalRandom.current().nextLong(90000, 180000);
public boolean isLookingUp = false;
public long lookUpStartTime = 0;
public int lookUpDuration = 0;
private boolean randomCooldownComplete() {
long currentTime = System.currentTimeMillis();
if (currentTime - lastRandomCooldown >= randomCooldownDelay) {
randomCooldownDelay = ThreadLocalRandom.current().nextLong(1, 40);
lastRandomCooldown = currentTime;
return true;
}
return false;
}
public boolean shouldAttack() {
return randomCooldownComplete() && cooldownComplete() && perfectDelay.cooldownComplete();
}
private boolean shouldAttackSoon() {
if (AuraUtil.getStrictDistance(target) >= attackDistance()) {
return false;
}
float cooldownProgress = mc.player.getCooledAttackStrength(1.5F);
boolean cooldownSoon = cooldownProgress >= 0.92F && cooldownProgress < COOLDOWN_THRESHOLD;
boolean canAttackSoon = reasonToAttack() && rayTrace() && AuraUtil.getStrictDistance(target) < attackDistance();
return cooldownSoon && canAttackSoon && perfectDelay.cooldownComplete();
}
private boolean reasonToAttack() {
boolean onlyCrits = critmode.is("Только криты");
boolean smartCrits = critmode.is("Умные криты");
if (Criticals.getInstance().isEnabled() && mc.player.fallDistance > 0) {
return true;
}
return AttackUtil.isAttack(onlyCrits || smartCrits, smartCrits, canCrit);
}
public boolean cooldownComplete() {
return mc.player.getCooledAttackStrength(1.5F) >= COOLDOWN_THRESHOLD;
}
public boolean rayTrace() {
return RayTraceUtil.rayTraceWithBlock(attackRange.getValue().floatValue(), mc.player.rotationYaw, mc.player.rotationPitch, mc.player, target, false);
}
public double attackDistance() {
return attackRange.getValue().floatValue();
}
private void reset() {
TargetComponent.clearTarget();
TargetComponent.updateTargetList();
target = null;
canCrit = false;
isLookingUp = false;
lookUpStartTime = 0;
isWallBypassActive = false;
originalPitch = 0f;
}
private boolean isTargetBehindWall(LivingEntity target) {
if (target == null) return false;
Vector3d targetPoint = RayTraceUtil.getPoint(target);
boolean canSee = RayTraceUtil.canSeen(targetPoint);
return !canSee;
}
private void activateWallBypass() {
if (!wallBypass.getValue() || target == null) return;
if (!isTargetBehindWall(target)) return;
originalPitch = mc.player.rotationPitch;
float targetPitch = originalPitch + ((-45f) - originalPitch) / 2f;
targetPitch = MathHelper.clamp(targetPitch, -90f, originalPitch);
RotationComponent.setRotations(
new Rotation(mc.player.rotationYaw, targetPitch),
180f, 180f, false
);
isWallBypassActive = true;
bypassStartTime = System.currentTimeMillis();
}
private void deactivateWallBypass() {
if (!isWallBypassActive) return;
if (System.currentTimeMillis() - bypassStartTime < BYPASS_DURATION) {
return;
}
RotationComponent.setRotations(
new Rotation(mc.player.rotationYaw, originalPitch),
80f, 80f, false
);
isWallBypassActive = false;
}
private boolean cancelSprintTick() {
return target != null && AuraUtil.getStrictDistance(target) <= attackFactor();
}
public float randomLerp(float min, float max) {
return min + (max - min) * new SecureRandom().nextFloat();
}
public float cooldownFromLastSwing() {
return MathHelper.clamp(mc.player.ticksSinceLastSwing / randomLerp(8.0F, 12.0F), 0.0F, 1.0F);
}
public float getRandomFloat(float min, float max) {
return min + (max - min) * new SecureRandom().nextFloat();
}
public float calculateYawShakeIntensity() {
return 1.8F;
}
public float calculatePitchShakeIntensity() {
return 1.2F;
}
public float tickRate() {
float tps = Neris.inst().serverTps().getTPS();
float tickRate = 20.0f;
if (tps > 0) {
tickRate = MathHelper.clamp(tps, 1.0f, 20.0f);
}
return tickRate;
}
}