- Joined
- Jul 11, 2020
- Messages
- 0
- Reaction score
- 26
- Points
- 0
Kann mir einer Helfen meine Killaura handelt wie ein Aimbot und lässt mich den Target die ganze Zeit ansehen kann mir eventuell jemand sagen wie ich das beheben kann
public class KillAura extends Module {
public KillAura() {
super("KillAura", Keyboard.KEY_H, Category.WORLD);
}
public void onUpdate() {
if (this.getState()) {
this.killaura();
}
}
int delay;
private void killaura() {
List list = Wrapper.mc.theWorld.playerEntities;
delay++;
for (int k = 0; k < list.size(); k++) {
if (((EntityPlayer) list.get(k)).getName() == Wrapper.mc.thePlayer.getName()) {
continue;
}
EntityPlayer entityplayer = (EntityPlayer) list.get(1);
if (Wrapper.mc.thePlayer.getDistanceToEntity(entityplayer) > Wrapper.mc.thePlayer.getDistanceToEntity((Entity) list.get(k))) {
entityplayer = (EntityPlayer) list.get(k);
}
float f = Wrapper.mc.thePlayer.getDistanceToEntity(entityplayer);
if (f < 4F && Wrapper.mc.thePlayer.canEntityBeSeen(entityplayer) && delay > 7) {
this.faceEntity(entityplayer);
Wrapper.mc.playerController.attackEntity(Wrapper.mc.thePlayer, entityplayer);
Wrapper.mc.thePlayer.swingItem();
delay = 0;
continue;
}
}
}
public static synchronized void faceEntity(EntityLivingBase entity) {
final float[] rotations = getRotationsNeeded(entity);
if (rotations != null) {
Minecraft.getMinecraft().thePlayer.rotationYaw = rotations[0];
Minecraft.getMinecraft().thePlayer.rotationPitch = rotations[1] + 1.0F;// 14
}
}
public static float[] getRotationsNeeded(Entity entity) {
if (entity == null) {
return null;
}
final double diffX = entity.posX - Minecraft.getMinecraft().thePlayer.posX;
final double diffZ = entity.posZ - Minecraft.getMinecraft().thePlayer.posZ;
double diffY;
if (entity instanceof EntityLivingBase) {
final EntityLivingBase entityLivingBase = (EntityLivingBase) entity;
diffY = entityLivingBase.posY + entityLivingBase.getEyeHeight() - (Minecraft.getMinecraft().thePlayer.posY + Minecraft.getMinecraft().thePlayer.getEyeHeight());
} else {
diffY = (entity.boundingBox.minY + entity.boundingBox.maxY) / 2.0D - (Minecraft.getMinecraft().thePlayer.posY + Minecraft.getMinecraft().thePlayer.getEyeHeight());
}
final double dist = MathHelper.sqrt_double(diffX * diffX + diffZ * diffZ);
final float yaw = (float) (Math.atan2(diffZ, diffX) * 180.0D / Math.PI) - 90.0F;
final float pitch = (float) -(Math.atan2(diffY, dist) * 180.0D / Math.PI);
return new float[] { Minecraft.getMinecraft().thePlayer.rotationYaw + MathHelper.wrapAngleTo180_float(yaw - Minecraft.getMinecraft().thePlayer.rotationYaw), Minecraft.getMinecraft().thePlayer.rotationPitch + MathHelper.wrapAngleTo180_float(pitch - Minecraft.getMinecraft().thePlayer.rotationPitch) };
}
}
public class KillAura extends Module {
public KillAura() {
super("KillAura", Keyboard.KEY_H, Category.WORLD);
}
public void onUpdate() {
if (this.getState()) {
this.killaura();
}
}
int delay;
private void killaura() {
List list = Wrapper.mc.theWorld.playerEntities;
delay++;
for (int k = 0; k < list.size(); k++) {
if (((EntityPlayer) list.get(k)).getName() == Wrapper.mc.thePlayer.getName()) {
continue;
}
EntityPlayer entityplayer = (EntityPlayer) list.get(1);
if (Wrapper.mc.thePlayer.getDistanceToEntity(entityplayer) > Wrapper.mc.thePlayer.getDistanceToEntity((Entity) list.get(k))) {
entityplayer = (EntityPlayer) list.get(k);
}
float f = Wrapper.mc.thePlayer.getDistanceToEntity(entityplayer);
if (f < 4F && Wrapper.mc.thePlayer.canEntityBeSeen(entityplayer) && delay > 7) {
this.faceEntity(entityplayer);
Wrapper.mc.playerController.attackEntity(Wrapper.mc.thePlayer, entityplayer);
Wrapper.mc.thePlayer.swingItem();
delay = 0;
continue;
}
}
}
public static synchronized void faceEntity(EntityLivingBase entity) {
final float[] rotations = getRotationsNeeded(entity);
if (rotations != null) {
Minecraft.getMinecraft().thePlayer.rotationYaw = rotations[0];
Minecraft.getMinecraft().thePlayer.rotationPitch = rotations[1] + 1.0F;// 14
}
}
public static float[] getRotationsNeeded(Entity entity) {
if (entity == null) {
return null;
}
final double diffX = entity.posX - Minecraft.getMinecraft().thePlayer.posX;
final double diffZ = entity.posZ - Minecraft.getMinecraft().thePlayer.posZ;
double diffY;
if (entity instanceof EntityLivingBase) {
final EntityLivingBase entityLivingBase = (EntityLivingBase) entity;
diffY = entityLivingBase.posY + entityLivingBase.getEyeHeight() - (Minecraft.getMinecraft().thePlayer.posY + Minecraft.getMinecraft().thePlayer.getEyeHeight());
} else {
diffY = (entity.boundingBox.minY + entity.boundingBox.maxY) / 2.0D - (Minecraft.getMinecraft().thePlayer.posY + Minecraft.getMinecraft().thePlayer.getEyeHeight());
}
final double dist = MathHelper.sqrt_double(diffX * diffX + diffZ * diffZ);
final float yaw = (float) (Math.atan2(diffZ, diffX) * 180.0D / Math.PI) - 90.0F;
final float pitch = (float) -(Math.atan2(diffY, dist) * 180.0D / Math.PI);
return new float[] { Minecraft.getMinecraft().thePlayer.rotationYaw + MathHelper.wrapAngleTo180_float(yaw - Minecraft.getMinecraft().thePlayer.rotationYaw), Minecraft.getMinecraft().thePlayer.rotationPitch + MathHelper.wrapAngleTo180_float(pitch - Minecraft.getMinecraft().thePlayer.rotationPitch) };
}
}