Начинающий
- Статус
- Оффлайн
- Регистрация
- 6 Дек 2023
- Сообщения
- 243
- Реакции
- 2
хз в ева варе последния версия килка не робит вот фикс
ss - нет надобности тк просто хит аура
ss - нет надобности тк просто хит аура
Java:
/*
package eva.ware.modules.impl.combat;
import com.google.common.eventbus.Subscribe;
import eva.ware.Evaware;
import eva.ware.events.EventInput;
import eva.ware.events.EventMotion;
import eva.ware.events.EventUpdate;
import eva.ware.manager.friend.FriendManager;
import eva.ware.modules.api.Category;
import eva.ware.modules.api.Module;
import eva.ware.modules.api.ModuleRegister;
import eva.ware.modules.impl.combat.AntiBot;
import eva.ware.modules.impl.combat.Criticals;
import eva.ware.modules.impl.combat.PotionThrower;
import eva.ware.modules.settings.impl.CheckBoxSetting;
import eva.ware.modules.settings.impl.ModeListSetting;
import eva.ware.modules.settings.impl.ModeSetting;
import eva.ware.modules.settings.impl.SliderSetting;
import eva.ware.ui.clickgui.ClickGuiScreen;
import eva.ware.utils.math.MathUtility;
import eva.ware.utils.math.SensUtility;
import eva.ware.utils.math.TimerUtility;
import eva.ware.utils.player.AttackUtility;
import eva.ware.utils.player.InventoryUtility;
import eva.ware.utils.player.MouseUtility;
import eva.ware.utils.player.MoveUtility;
import eva.ware.utils.player.PlayerUtility;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Random;
import net.minecraft.client.entity.player.ClientPlayerEntity;
import net.minecraft.client.entity.player.RemoteClientPlayerEntity;
import net.minecraft.client.gui.screen.ChatScreen;
import net.minecraft.client.gui.screen.IngameMenuScreen;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.item.ArmorStandEntity;
import net.minecraft.entity.merchant.villager.VillagerEntity;
import net.minecraft.entity.monster.MonsterEntity;
import net.minecraft.entity.monster.SlimeEntity;
import net.minecraft.entity.passive.AnimalEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.container.ClickType;
import net.minecraft.item.UseAction;
import net.minecraft.network.play.client.CHeldItemChangePacket;
import net.minecraft.util.Hand;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector2f;
import net.minecraft.util.math.vector.Vector3d;
@ModuleRegister(name="HitAura", category=Category.Combat)
public class HitAura
extends Module {
final ModeSetting type = new ModeSetting("\u0422\u0438\u043f", "\u041f\u043b\u0430\u0432\u043d\u0430\u044f", "\u041f\u043b\u0430\u0432\u043d\u0430\u044f", "\u0420\u0435\u0437\u043a\u0430\u044f", "HolyWorld");
final ModeSetting visualType = new ModeSetting("\u0412\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043d\u0430\u0432\u043e\u0434\u043a\u0430", "\u041e\u0431\u044b\u0447\u043d\u0430\u044f", "\u041e\u0431\u044b\u0447\u043d\u0430\u044f", "\u0421\u043f\u0438\u043d-\u0431\u043e\u0442", "\u041d\u0438\u043a\u0430\u043a\u0430\u044f");
final SliderSetting attackRange = new SliderSetting("\u0414\u0438\u0441\u0442\u0430\u043d\u0446\u0438\u044f \u0430\u0442\u0442\u0430\u043a\u0438", 3.0f, 2.5f, 6.0f, 0.05f);
final SliderSetting elytraRange = new SliderSetting("\u0414\u0438\u0441\u0442\u0430\u043d\u0446\u0438\u044f \u043d\u0430 \u044d\u043b\u0438\u0442\u0440\u0435", 6.0f, 0.0f, 16.0f, 0.05f);
final SliderSetting preRange = new SliderSetting("\u0414\u0438\u0441\u0442\u0430\u043d\u0446\u0438\u044f \u043d\u0430\u0432\u043e\u0434\u043a\u0438", 0.3f, 0.0f, 3.0f, 0.05f).visibleIf(() -> !this.type.is("\u0420\u0435\u0437\u043a\u0430\u044f"));
final SliderSetting tick = new SliderSetting("\u0422\u0438\u043a\u0438", 2.0f, 1.0f, 10.0f, 1.0f).visibleIf(() -> this.type.is("\u0420\u0435\u0437\u043a\u0430\u044f"));
final ModeSetting clickType = new ModeSetting("\u0420\u0435\u0436\u0438\u043c \u043a\u043b\u0438\u043a\u043e\u0432", "1.9", "1.8", "1.9");
final SliderSetting minCPS = new SliderSetting("\u041c\u0438\u043d. CPS", 7.0f, 1.0f, 10.0f, 1.0f).visibleIf(() -> !this.clickType.is("1.9"));
final SliderSetting maxCPS = new SliderSetting("\u041c\u0430\u043a\u0441. CPS", 10.0f, 1.0f, 20.0f, 1.0f).visibleIf(() -> !this.clickType.is("1.9"));
final ModeListSetting targets = new ModeListSetting("\u0422\u0430\u0440\u0433\u0435\u0442\u044b", new CheckBoxSetting("\u0418\u0433\u0440\u043e\u043a\u0438", true), new CheckBoxSetting("\u0413\u043e\u043b\u044b\u0435", true), new CheckBoxSetting("\u041c\u043e\u0431\u044b", false), new CheckBoxSetting("\u0416\u0438\u0432\u043e\u0442\u043d\u044b\u0435", false), new CheckBoxSetting("\u0414\u0440\u0443\u0437\u044c\u044f", false), new CheckBoxSetting("\u0413\u043e\u043b\u044b\u0435 \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u043a\u0438", true), new CheckBoxSetting("\u041d\u0435\u0432\u0438\u0434\u0438\u043c\u043a\u0438", true));
final ModeListSetting consider = new ModeListSetting("\u0423\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c", new CheckBoxSetting("\u0425\u043f", true), new CheckBoxSetting("\u0411\u0440\u043e\u043d\u044e", true), new CheckBoxSetting("\u0414\u0438\u0441\u0442\u0430\u043d\u0446\u0438\u044e", true), new CheckBoxSetting("\u0411\u0430\u0444\u0444\u044b", true));
final ModeListSetting options = new ModeListSetting("\u041e\u043f\u0446\u0438\u0438", new CheckBoxSetting("\u0422\u043e\u043b\u044c\u043a\u043e \u043a\u0440\u0438\u0442\u044b", true), new CheckBoxSetting("\u041b\u043e\u043c\u0430\u0442\u044c \u0449\u0438\u0442", true), new CheckBoxSetting("\u041e\u0442\u0436\u0438\u043c\u0430\u0442\u044c \u0449\u0438\u0442", false), new CheckBoxSetting("\u0421\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 TPS", false), new CheckBoxSetting("\u0424\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u0443 \u0446\u0435\u043b\u044c", true), new CheckBoxSetting("\u041a\u043e\u0440\u0440\u0435\u043a\u0446\u0438\u044f \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f", true), new CheckBoxSetting("\u041e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u0438\u0441\u0442\u0430\u043d\u0446\u0438\u044f", false), new CheckBoxSetting("\u0420\u0435\u0437\u043e\u043b\u044c\u0432\u0435\u0440", true));
final ModeListSetting moreOptions = new ModeListSetting("\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435", new CheckBoxSetting("\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043b\u0443\u0447\u0430", true), new CheckBoxSetting("\u041f\u0435\u0440\u0435\u043b\u0435\u0442\u0430\u0442\u044c \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u0438\u043a\u0430", true), new CheckBoxSetting("\u0411\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u0435\u043d\u044b", true), new CheckBoxSetting("\u041d\u0435 \u0431\u0438\u0442\u044c \u0435\u0441\u043b\u0438 \u043a\u0443\u0448\u0430\u0435\u0448\u044c", false), new CheckBoxSetting("\u041d\u0435 \u0431\u0438\u0442\u044c \u0435\u0441\u043b\u0438 \u0432 \u0433\u0443\u0438", false), new CheckBoxSetting("\u0420\u0430\u043d\u0434\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u044f", true));
final SliderSetting elytraForward = new SliderSetting("\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043b\u0435\u0442\u0430", 75.0f, 1.0f, 100.0f, 1.0f).visibleIf(() -> (Boolean)this.moreOptions.is("\u041f\u0435\u0440\u0435\u043b\u0435\u0442\u0430\u0442\u044c \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u0438\u043a\u0430").getValue());
public CheckBoxSetting smartCrits = new CheckBoxSetting("\u0423\u043c\u043d\u044b\u0435 \u043a\u0440\u0438\u0442\u044b", false).visibleIf(() -> (Boolean)this.options.is("\u0422\u043e\u043b\u044c\u043a\u043e \u043a\u0440\u0438\u0442\u044b").getValue());
final ModeSetting correctionType = new ModeSetting("\u0422\u0438\u043f \u043a\u043e\u0440\u0440\u0435\u043a\u0446\u0438\u0438", "\u041d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u044b\u0439", "\u041d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u044b\u0439", "\u0421\u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439").visibleIf(() -> (Boolean)this.options.is("\u041a\u043e\u0440\u0440\u0435\u043a\u0446\u0438\u044f \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f").getValue());
final ModeSetting critType = new ModeSetting("\u041a\u0440\u0438\u0442 \u0445\u0435\u043b\u043f\u0435\u0440", "None", "None", "Matrix", "NCP", "NCP+", "Grim");
private final TimerUtility timerUtility = new TimerUtility();
public Vector2f rotate = new Vector2f(0.0f, 0.0f);
public Vector2f visualRotateVector = new Vector2f(0.0f, 0.0f);
private LivingEntity target;
private Entity selected;
int ticks = 0;
boolean isRotated = false;
boolean isAttacking = false;
boolean crystalAuraRule = true;
boolean elytraTargetRule;
float lastYaw;
float lastPitch;
boolean isReversing = false;
private float rotationSpeed;
private float rotationAngle;
final PotionThrower autoPotion;
double moreAttackDistanceOnElytra = 0.0;
float aimDistance() {
return !this.type.is("\u0420\u0435\u0437\u043a\u0430\u044f") ? ((Float)this.preRange.getValue()).floatValue() : 0.0f;
}
float maxRange() {
return this.attackDistance() + (HitAura.mc.player.isElytraFlying() ? ((Float)this.elytraRange.getValue()).floatValue() : 0.0f) + this.aimDistance();
}
public HitAura(PotionThrower autoPotion) {
this.autoPotion = autoPotion;
this.addSettings(this.type, this.visualType, this.attackRange, this.preRange, this.elytraRange, this.tick, this.clickType, this.minCPS, this.maxCPS, this.targets, this.consider, this.options, this.moreOptions, this.elytraForward, this.smartCrits, this.correctionType, this.critType);
}
@Subscribe
public void onInput(EventInput eventInput) {
if (((Boolean)this.options.is("\u041a\u043e\u0440\u0440\u0435\u043a\u0446\u0438\u044f \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f").getValue()).booleanValue() && this.correctionType.is("\u041d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u044b\u0439") && this.crystalAuraRule) {
MoveUtility.fixMovement(eventInput, this.rotate.x);
}
}
@Subscribe
public void onUpdate(EventUpdate e) {
if (!this.crystalAuraRule) {
return;
}
if (((Boolean)this.options.is("\u0424\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u0443 \u0446\u0435\u043b\u044c").getValue()).booleanValue() && (this.target == null || !this.isValid(this.target)) || !((Boolean)this.options.is("\u0424\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u0443 \u0446\u0435\u043b\u044c").getValue()).booleanValue()) {
this.updateTarget();
}
if (((Boolean)this.options.is("\u0420\u0435\u0437\u043e\u043b\u044c\u0432\u0435\u0440").getValue()).booleanValue()) {
this.resolvePlayers();
this.releaseResolver();
}
if (!(this.target == null || this.autoPotion.isEnabled() && this.autoPotion.isActive())) {
this.isRotated = false;
this.visualRotationUpdate();
this.updateRotation();
if (this.shouldPlayerFalling() && this.timerUtility.hasTimeElapsed()) {
this.ticks = ((Float)this.tick.getValue()).intValue();
this.forceAttack();
}
if (!HitAura.mc.player.isElytraFlying()) {
if (this.type.is("\u0420\u0435\u0437\u043a\u0430\u044f")) {
if (this.ticks > 0) {
this.setRotate();
--this.ticks;
} else {
this.reset();
}
} else if (!this.isRotated) {
this.setRotate();
}
} else if (!this.isRotated) {
this.setRotate();
}
} else {
this.timerUtility.setLastMS(0L);
this.reset();
}
if (this.target != null && this.isRotated && !HitAura.mc.player.isElytraFlying() && HitAura.mc.player.getDistanceEyePos(this.target) <= (double)this.attackDistance()) {
this.critHelper();
}
}
@Subscribe
private void onWalking(EventMotion e) {
if (this.target == null || this.autoPotion.isEnabled() && this.autoPotion.isActive() || !this.crystalAuraRule) {
return;
}
float yaw = this.visualRotateVector.x;
float pitch = this.visualRotateVector.y;
e.setYaw(this.rotate.x);
e.setPitch(this.rotate.y);
HitAura.mc.player.rotationYawHead = yaw;
HitAura.mc.player.renderYawOffset = PlayerUtility.calculateCorrectYawOffset(yaw);
HitAura.mc.player.rotationPitchHead = pitch;
}
public void setRotate() {
boolean bl = this.elytraTargetRule = HitAura.mc.player.isElytraFlying() && this.target.isElytraFlying();
if (this.type.is("\u0420\u0435\u0437\u043a\u0430\u044f")) {
this.updateRotation(2.14748365E9f);
} else {
this.updateRotation(9999.0f);
}
}
public float attackDistance() {
if (((Boolean)this.options.is("\u041e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u0438\u0441\u0442\u0430\u043d\u0446\u0438\u044f").getValue()).booleanValue() && !Evaware.getInst().getModuleManager().getTPInfluence().isEnabled()) {
if (!HitAura.mc.player.isSwimming()) {
return (float)(3.6 + this.moreAttackDistanceOnElytra);
}
return (float)(3.0 + this.moreAttackDistanceOnElytra);
}
if (Evaware.getInst().getModuleManager().getTPInfluence().isEnabled() && !Evaware.getInst().getModuleManager().getFreeCam().isEnabled()) {
return ((Float)Evaware.getInst().getModuleManager().getTPInfluence().range.getValue()).floatValue();
}
return (float)((double)((Float)this.attackRange.getValue()).floatValue() + this.moreAttackDistanceOnElytra);
}
public void resolvePlayers() {
for (PlayerEntity playerEntity : HitAura.mc.world.getPlayers()) {
if (!(playerEntity instanceof RemoteClientPlayerEntity)) continue;
((RemoteClientPlayerEntity)playerEntity).resolve();
}
}
public void releaseResolver() {
for (PlayerEntity playerEntity : HitAura.mc.world.getPlayers()) {
if (!(playerEntity instanceof RemoteClientPlayerEntity)) continue;
((RemoteClientPlayerEntity)playerEntity).releaseResolver();
}
}
private void updateTarget() {
ArrayList<LivingEntity> targets = new ArrayList<LivingEntity>();
for (Entity entity2 : HitAura.mc.world.getAllEntities()) {
LivingEntity living;
if (!(entity2 instanceof LivingEntity) || !this.isValid(living = (LivingEntity)entity2)) continue;
targets.add(living);
}
if (targets.isEmpty()) {
this.target = null;
return;
}
if (targets.size() == 1) {
this.target = (LivingEntity)targets.get(0);
return;
}
targets.sort(Comparator.comparingDouble(entity -> MathUtility.entity(entity, (Boolean)this.consider.is("\u0425\u043f").getValue(), (Boolean)this.consider.is("\u0411\u0440\u043e\u043d\u044e").getValue(), (Boolean)this.consider.is("\u0414\u0438\u0441\u0442\u0430\u043d\u0446\u0438\u044e").getValue(), this.maxRange(), (Boolean)this.consider.is("\u0411\u0430\u0444\u0444\u044b").getValue())));
this.target = (LivingEntity)targets.get(0);
}
private void updateRotation(float rotationYawSpeed) {
float scaleFactor = 1.50F;
float f = ((Boolean)this.moreOptions.is("\u041f\u0435\u0440\u0435\u043b\u0435\u0442\u0430\u0442\u044c \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u0438\u043a\u0430").getValue()).booleanValue() ? (PlayerUtility.getEntityBPS(this.target, false) > 8.0 ? ((Float)this.elytraForward.getValue()).floatValue() / 20.0f : 1.0f) : (scaleFactor = 1.0f);
if (this.elytraTargetRule) {
Vector3d vec = this.target.getPositionVec().add(0.0, MathHelper.clamp(this.target.getPosY() - (double)this.target.getHeight(), 0.0, (double)(this.target.getHeight() / 2.0f)), 0.0).subtract(HitAura.mc.player.getEyePosition(1.0f)).add(this.target.getMotion().mul(this.elytraTargetRule ? (double)scaleFactor : 1.0, HitAura.mc.player.isElytraFlying() && this.target.isElytraFlying() ? (double)scaleFactor : 1.0, HitAura.mc.player.isElytraFlying() && this.target.isElytraFlying() ? (double)scaleFactor : 1.0));
float yawToTarget = (float)MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - 90.0);
float pitchToTarget = (float)(-Math.toDegrees(Math.atan2(vec.y, Math.hypot(vec.x, vec.z))));
float yawDelta = MathHelper.wrapDegrees(yawToTarget - this.rotate.x);
float pitchDelta = MathHelper.wrapDegrees(pitchToTarget - this.rotate.y);
switch ((String)this.type.getValue()) {
case "\u041f\u043b\u0430\u0432\u043d\u0430\u044f": {
float yaw = Math.min(Math.max(Math.abs(yawDelta), 1.0f), rotationYawSpeed);
float pitch = Math.max(Math.abs(pitchDelta), 1.0f);
float gcd = this.rotate.x + (yawDelta > 0.0f ? yaw : -yaw) + SensUtility.getSensitivity((float)(Math.cos((double)System.currentTimeMillis() / 50.0) * 7.0));
pitch = MathHelper.clamp(this.rotate.y + (pitchDelta > 0.0f ? pitch : -pitch), -89.0f, 89.0f) + SensUtility.getSensitivity((float)(Math.cos((double)System.currentTimeMillis() / 50.0) * 7.0));
gcd -= (gcd - this.rotate.x) % SensUtility.getGCDValue();
pitch -= (pitch - this.rotate.y) % SensUtility.getGCDValue();
this.rotate = new Vector2f(gcd, pitch);
this.lastYaw = yaw;
this.lastPitch = pitch;
break;
}
case "\u0420\u0435\u0437\u043a\u0430\u044f": {
float yaw = this.rotate.x + yawDelta;
float pitch = MathHelper.clamp(this.rotate.y + pitchDelta, -90.0f, 90.0f);
float gcd = SensUtility.getGCDValue();
yaw -= (yaw - this.rotate.x) % gcd;
pitch -= (pitch - this.rotate.y) % gcd;
this.rotate = new Vector2f(yaw, pitch);
break;
}
case "HolyWorld": {
float clampedYaw = Math.min(Math.max(Math.abs(yawDelta), 1.0E-4f), 52.0f);
float clampedPitch = Math.min(Math.max(Math.abs(pitchDelta), 1.0E-4f), 22.0f);
float randomYawFactor = (float)(Math.random() * 1.5 - 1.5);
float randomPitchFactor = (float)(Math.random() * 1.5 - 1.0);
float randomThreshold = (float)(Math.random() * 1.5);
float randomAddition = (float)(Math.random() * 2.5 + 1.5);
clampedPitch = this.selected != this.target ? Math.max(Math.abs(pitchDelta), 1.0f) : (clampedPitch /= 3.0f);
if (Math.abs(clampedYaw - this.lastYaw) <= randomThreshold) {
clampedYaw = this.lastYaw + randomAddition;
}
float yaw = this.rotate.x + (yawDelta > 0.0f ? clampedYaw : -(clampedYaw += randomYawFactor));
float pitch = MathHelper.clamp(this.rotate.y + (pitchDelta > 0.0f ? clampedPitch : -(clampedPitch += randomPitchFactor)), -90.0f, 90.0f);
float gcd = SensUtility.getGCDValue();
yaw -= (yaw - this.rotate.x) % gcd;
pitch -= (pitch - this.rotate.y) % gcd;
this.rotate = new Vector2f(yaw, pitch);
this.lastYaw = clampedYaw;
this.lastPitch = clampedPitch;
}
}
} else {
Vector3d vec = this.target.getPositionVec().add(0.0, MathHelper.clamp(this.target.getPosY() - (double)this.target.getHeight(), 0.0, (double)(this.target.getHeight() / 2.0f)), 0.0).subtract(HitAura.mc.player.getEyePosition(1.0f));
float yawToTarget = (float)MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - 90.0);
float pitchToTarget = (float)(-Math.toDegrees(Math.atan2(vec.y, Math.hypot(vec.x, vec.z))));
float yawDelta = MathHelper.wrapDegrees(yawToTarget - this.rotate.x);
float pitchDelta = MathHelper.wrapDegrees(pitchToTarget - this.rotate.y);
int roundedYaw = (int)yawDelta;
switch ((String)this.type.getValue()) {
case "\u041f\u043b\u0430\u0432\u043d\u0430\u044f": {
float yaw = Math.min(Math.max(Math.abs(yawDelta), 1.0f), rotationYawSpeed);
float pitch = Math.max(Math.abs(pitchDelta), 1.0f);
float gcd = this.rotate.x + (yawDelta > 0.0f ? yaw : -yaw);
pitch = MathHelper.clamp(this.rotate.y + (pitchDelta > 0.0f ? pitch : -pitch), -89.0f, 89.0f);
gcd -= (gcd - this.rotate.x) % SensUtility.getGCDValue();
pitch -= (pitch - this.rotate.y) % SensUtility.getGCDValue();
this.rotate = new Vector2f(gcd, pitch);
this.lastYaw = yaw;
this.lastPitch = pitch;
break;
}
case "\u0420\u0435\u0437\u043a\u0430\u044f": {
float yaw = this.rotate.x + (float)roundedYaw;
float pitch = MathHelper.clamp(this.rotate.y + pitchDelta, -90.0f, 90.0f);
float gcd = SensUtility.getGCDValue();
yaw -= (yaw - this.rotate.x) % gcd;
pitch -= (pitch - this.rotate.y) % gcd;
this.rotate = new Vector2f(yaw, pitch);
break;
}
case "HolyWorld": {
float clampedYaw = Math.min(Math.max(Math.abs(yawDelta), 1.0E-4f), 52.0f);
float clampedPitch = Math.min(Math.max(Math.abs(pitchDelta), 1.0E-4f), 22.0f);
float randomYawFactor = (float)(Math.random() * 1.5 - 1.5);
float randomPitchFactor = (float)(Math.random() * 1.5 - 1.0);
float randomThreshold = (float)(Math.random() * 1.5);
float randomAddition = (float)(Math.random() * 2.5 + 1.5);
clampedPitch = this.selected != this.target ? Math.max(Math.abs(pitchDelta), 1.0f) : (clampedPitch /= 3.0f);
if (Math.abs(clampedYaw - this.lastYaw) <= randomThreshold) {
clampedYaw = this.lastYaw + randomAddition;
}
float yaw = this.rotate.x + (yawDelta > 0.0f ? clampedYaw : -(clampedYaw += randomYawFactor));
float pitch = MathHelper.clamp(this.rotate.y + (pitchDelta > 0.0f ? clampedPitch : -(clampedPitch += randomPitchFactor)), -90.0f, 90.0f);
float gcd = SensUtility.getGCDValue();
yaw -= (yaw - this.rotate.x) % gcd;
pitch -= (pitch - this.rotate.y) % gcd;
this.rotate = new Vector2f(yaw, pitch);
this.lastYaw = clampedYaw;
this.lastPitch = clampedPitch;
}
}
}
if (((Boolean)this.options.is("\u041a\u043e\u0440\u0440\u0435\u043a\u0446\u0438\u044f \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f").getValue()).booleanValue()) {
HitAura.mc.player.rotationYawOffset = this.rotate.x;
}
}
private void visualRotationUpdate() {
Vector3d vec = this.target.getPositionVec().add(0.0, MathHelper.clamp(HitAura.mc.player.getPosYEye() - this.target.getPosY(), 0.0, (double)this.target.getHeight() * (HitAura.mc.player.getDistanceEyePos(this.target) / (double)this.attackDistance())), 0.0).subtract(HitAura.mc.player.getEyePosition(1.0f));
float yawDelta = (float)MathHelper.wrapDegrees(MathHelper.wrapDegrees(Math.toDegrees(Math.atan2(vec.z, vec.x)) - 90.0) - (double)this.visualRotateVector.x);
float pitchDelta = (float)MathHelper.wrapDegrees(-Math.toDegrees(Math.atan2(vec.y, Math.hypot(vec.x, vec.z))) - (double)this.visualRotateVector.y);
int roundYawDelta = (int)Math.abs(yawDelta);
int roundPitchDelta = (int)Math.abs(pitchDelta);
float gcd = SensUtility.getGCDValue();
float yaw = 0.0f;
float pitch = 0.0f;
float clampedPitch = 0.0f;
float clampedYaw = 0.0f;
switch ((String)this.visualType.getValue()) {
case "\u041e\u0431\u044b\u0447\u043d\u0430\u044f": {
clampedYaw = Math.min(roundYawDelta, 40);
clampedPitch = Math.min((float)roundPitchDelta * 0.33f, 30.0f);
yaw = this.visualRotateVector.x + (yawDelta > 0.0f ? clampedYaw : -clampedYaw);
pitch = MathHelper.clamp(this.visualRotateVector.y + (pitchDelta > 0.0f ? clampedPitch : -clampedPitch), -89.0f, 89.0f);
yaw -= (yaw - this.visualRotateVector.x) % gcd;
pitch -= (pitch - this.visualRotateVector.y) % gcd;
break;
}
case "\u0421\u043f\u0438\u043d-\u0431\u043e\u0442": {
clampedPitch = Math.min((float)roundPitchDelta * 0.33f, 30.0f);
pitch = MathHelper.clamp(this.visualRotateVector.y + (pitchDelta > 0.0f ? clampedPitch : -clampedPitch), -89.0f, 89.0f);
pitch -= (pitch - this.visualRotateVector.y) % gcd;
yaw = this.rotationAngle;
break;
}
case "\u041d\u0438\u043a\u0430\u043a\u0430\u044f": {
yaw = HitAura.mc.player.rotationYaw;
pitch = HitAura.mc.player.rotationPitch;
}
}
this.visualRotateVector = new Vector2f(yaw, pitch);
this.lastYaw = clampedYaw;
this.lastPitch = clampedPitch;
}
public void updateRotation() {
float limitSpeed = 60.0f;
float reverseSpeed = 5.0f;
if (!this.isReversing) {
this.rotationSpeed += reverseSpeed;
if (this.rotationSpeed > limitSpeed) {
this.rotationSpeed = limitSpeed;
this.isReversing = true;
}
} else {
this.rotationSpeed -= reverseSpeed;
if (this.rotationSpeed < -limitSpeed) {
this.rotationSpeed = -limitSpeed;
this.isReversing = false;
}
}
this.rotationAngle += this.rotationSpeed;
this.rotationAngle = (this.rotationAngle + 360.0f) % 360.0f;
}
public void critHelper() {
switch ((String)this.critType.getValue()) {
case "None": {
return;
}
case "Matrix": {
if (!HitAura.mc.player.isJumping || !(HitAura.mc.player.motion.getY() < -0.1) || !((double)HitAura.mc.player.fallDistance > 0.5) || !(MoveUtility.getMotion() < 0.12)) break;
HitAura.mc.player.motion.y = -1.0;
break;
}
case "NCP": {
if (!HitAura.mc.player.isJumping || HitAura.mc.player.fallDistance == 0.0f) break;
HitAura.mc.player.motion.y -= 0.078;
break;
}
case "NCP+": {
if ((double)HitAura.mc.player.fallDistance > 0.7 && (double)HitAura.mc.player.fallDistance < 0.8 && this.target != null) {
HitAura.mc.timer.timerSpeed = 2.0f;
break;
}
HitAura.mc.timer.timerSpeed = 1.0f;
break;
}
case "Grim": {
if (!HitAura.mc.player.isJumping || !(HitAura.mc.player.fallDistance > 0.0f) || !((double)HitAura.mc.player.fallDistance <= 1.2) || MoveUtility.moveKeysPressed()) break;
HitAura.mc.player.jumpTicks = 0;
if ((double)HitAura.mc.timer.timerSpeed != 1.0) break;
HitAura.mc.timer.timerSpeed = 1.005f;
}
}
}
private void forceAttack() {
if (!this.isAttacking && !this.canAttack()) {
return;
}
this.isAttacking = true;
try {
this.preAttack();
this.attack();
this.postAttack();
} finally {
this.isAttacking = false;
}
}
private boolean canAttack() {
this.selected = MouseUtility.getMouseOver(this.target, this.rotate.x, this.rotate.y, this.attackDistance());
if (HitAura.mc.player.getDistanceEyePos(this.target) > (double)this.attackDistance()) {
return false;
}
if (((Boolean)this.moreOptions.is("\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043b\u0443\u0447\u0430").getValue()).booleanValue() && !this.elytraTargetRule && this.selected == null) {
return false;
}
if (!((Boolean)this.moreOptions.is("\u0411\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u0435\u043d\u044b").getValue()).booleanValue() && !HitAura.mc.player.canEntityBeSeen(this.target)) {
return false;
}
if (((Boolean)this.moreOptions.is("\u041d\u0435 \u0431\u0438\u0442\u044c \u0435\u0441\u043b\u0438 \u043a\u0443\u0448\u0430\u0435\u0448\u044c").getValue()).booleanValue() && HitAura.mc.player.isHandActive() && HitAura.mc.player.getHeldItemOffhand().getUseAction() == UseAction.EAT) {
return false;
}
return (Boolean)this.moreOptions.is("\u041d\u0435 \u0431\u0438\u0442\u044c \u0435\u0441\u043b\u0438 \u0432 \u0433\u0443\u0438").getValue() == false || HitAura.mc.currentScreen == null || HitAura.mc.currentScreen instanceof ClickGuiScreen || HitAura.mc.currentScreen instanceof ChatScreen || HitAura.mc.currentScreen instanceof IngameMenuScreen;
}
private void preAttack() {
Evaware.getInst().getModuleManager().getTPInfluence().hitAuraTPPRe(this.target);
if (HitAura.mc.player.isBlocking() && ((Boolean)this.options.is("\u041e\u0442\u0436\u0438\u043c\u0430\u0442\u044c \u0449\u0438\u0442").getValue()).booleanValue()) {
HitAura.mc.playerController.onStoppedUsingItem(HitAura.mc.player);
}
}
private void attack() {
int maxCPSValue;
int minCPSValue = ((Float)this.minCPS.getValue()).intValue();
if (minCPSValue > (maxCPSValue = ((Float)this.maxCPS.getValue()).intValue())) {
maxCPSValue = minCPSValue;
}
int minMS = 1000 / maxCPSValue;
int maxMS = 1000 / minCPSValue;
Random random = new Random();
int randomMS = random.nextInt(maxMS - minMS + 1) + minMS;
this.timerUtility.setLastMS(this.clickType.is("1.9") ? 500L : (long)randomMS);
Criticals.cancelCrit = true;
if (Evaware.getInst().getModuleManager().getCriticals().isEnabled() && Criticals.canUseCriticals()) {
Evaware.getInst().getModuleManager().getCriticals().sendCrit();
}
HitAura.mc.playerController.attackEntity(HitAura.mc.player, this.target);
HitAura.mc.player.swingArm(Hand.MAIN_HAND);
Criticals.cancelCrit = false;
}
private void postAttack() {
LivingEntity livingEntity = this.target;
if (livingEntity instanceof PlayerEntity) {
PlayerEntity player = (PlayerEntity)livingEntity;
if (((Boolean)this.options.is("\u041b\u043e\u043c\u0430\u0442\u044c \u0449\u0438\u0442").getValue()).booleanValue()) {
this.breakShieldPlayer(player);
}
}
Evaware.getInst().getModuleManager().getTPInfluence().hitAuraTPPost(this.target);
}
public boolean shouldPlayerFalling() {
return AttackUtility.isPlayerFalling((Boolean)this.options.is("\u0422\u043e\u043b\u044c\u043a\u043e \u043a\u0440\u0438\u0442\u044b").getValue() != false && !Criticals.canUseCriticals(), (Boolean)this.smartCrits.getValue(), (Boolean)this.options.is("\u0421\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 TPS").getValue(), this.clickType.is("1.9"));
}
private boolean isValid(LivingEntity entity) {
if (entity instanceof ClientPlayerEntity) {
return false;
}
if (entity.ticksExisted < 3) {
return false;
}
if (HitAura.mc.player.getDistanceEyePos(entity) > (double)this.maxRange()) {
return false;
}
if (entity == Evaware.getInst().getModuleManager().getFreeCam().fakePlayer) {
return false;
}
if (entity instanceof PlayerEntity) {
PlayerEntity p = (PlayerEntity)entity;
if (AntiBot.isBot(entity)) {
return false;
}
if (!((Boolean)this.targets.is("\u0414\u0440\u0443\u0437\u044c\u044f").getValue()).booleanValue() && FriendManager.isFriend(p.getName().getString())) {
return false;
}
if (p.getName().getString().equalsIgnoreCase(HitAura.mc.player.getName().getString())) {
return false;
}
}
if (entity instanceof PlayerEntity && !((Boolean)this.targets.is("\u0418\u0433\u0440\u043e\u043a\u0438").getValue()).booleanValue()) {
return false;
}
if (entity instanceof PlayerEntity && entity.getTotalArmorValue() == 0 && !((Boolean)this.targets.is("\u0413\u043e\u043b\u044b\u0435").getValue()).booleanValue()) {
return false;
}
if (entity instanceof PlayerEntity && entity.isInvisible() && entity.getTotalArmorValue() == 0 && !((Boolean)this.targets.is("\u0413\u043e\u043b\u044b\u0435 \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u043a\u0438").getValue()).booleanValue()) {
return false;
}
if (entity instanceof PlayerEntity && entity.isInvisible() && !((Boolean)this.targets.is("\u041d\u0435\u0432\u0438\u0434\u0438\u043c\u043a\u0438").getValue()).booleanValue()) {
return false;
}
if (entity instanceof PlayerEntity && ((PlayerEntity)entity).isCreative()) {
return false;
}
if ((entity instanceof MonsterEntity || entity instanceof SlimeEntity || entity instanceof VillagerEntity) && !((Boolean)this.targets.is("\u041c\u043e\u0431\u044b").getValue()).booleanValue()) {
return false;
}
if (entity instanceof AnimalEntity && !((Boolean)this.targets.is("\u0416\u0438\u0432\u043e\u0442\u043d\u044b\u0435").getValue()).booleanValue()) {
return false;
}
return !entity.isInvulnerable() && entity.isAlive() && !(entity instanceof ArmorStandEntity);
}
private void breakShieldPlayer(PlayerEntity entity) {
if (entity.isBlocking()) {
int invSlot = InventoryUtility.getInstance().getAxeInInventory(false);
int hotBarSlot = InventoryUtility.getInstance().getAxeInInventory(true);
if (hotBarSlot == -1 && invSlot != -1) {
int bestSlot = InventoryUtility.getInstance().findBestSlotInHotBar();
HitAura.mc.playerController.windowClick(0, invSlot, 0, ClickType.PICKUP, HitAura.mc.player);
HitAura.mc.playerController.windowClick(0, bestSlot + 36, 0, ClickType.PICKUP, HitAura.mc.player);
HitAura.mc.player.connection.sendPacket(new CHeldItemChangePacket(bestSlot));
HitAura.mc.playerController.attackEntity(HitAura.mc.player, entity);
HitAura.mc.player.swingArm(Hand.MAIN_HAND);
HitAura.mc.player.connection.sendPacket(new CHeldItemChangePacket(HitAura.mc.player.inventory.currentItem));
HitAura.mc.playerController.windowClick(0, bestSlot + 36, 0, ClickType.PICKUP, HitAura.mc.player);
HitAura.mc.playerController.windowClick(0, invSlot, 0, ClickType.PICKUP, HitAura.mc.player);
}
if (hotBarSlot != -1) {
HitAura.mc.player.connection.sendPacket(new CHeldItemChangePacket(hotBarSlot));
HitAura.mc.playerController.attackEntity(HitAura.mc.player, entity);
HitAura.mc.player.swingArm(Hand.MAIN_HAND);
HitAura.mc.player.connection.sendPacket(new CHeldItemChangePacket(HitAura.mc.player.inventory.currentItem));
}
}
}
private void reset() {
if (((Boolean)this.options.is("\u041a\u043e\u0440\u0440\u0435\u043a\u0446\u0438\u044f \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f").getValue()).booleanValue()) {
HitAura.mc.player.rotationYawOffset = -2.14748365E9f;
}
this.rotate = new Vector2f(HitAura.mc.player.rotationYaw, HitAura.mc.player.rotationPitch);
}
@Override
public void onEnable() {
super.onEnable();
this.reset();
this.target = null;
}
@Override
public void onDisable() {
super.onDisable();
this.reset();
this.timerUtility.setLastMS(0L);
this.target = null;
HitAura.mc.timer.timerSpeed = 1.0f;
}
public ModeSetting getType() {
return this.type;
}
public ModeListSetting getOptions() {
return this.options;
}
public ModeListSetting getMoreOptions() {
return this.moreOptions;
}
public TimerUtility getTimerUtility() {
return this.timerUtility;
}
public LivingEntity getTarget() {
return this.target;
}
public void setTarget(LivingEntity target) {
this.target = target;
}
}