message 2
message 2
combat;
import java.awt.Color;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import me.aristhena.client.friend.FriendManager;
import me.aristhena.client.gui.click.ClickGui;
import me.aristhena.client.module.Module;
import me.aristhena.client.module.Module.Mod;
import me.aristhena.client.module.modules.combat.aura.Dick22;
import me.aristhena.client.option.Option;
import me.aristhena.event.Event;
import me.aristhena.event.EventTarget;
import me.aristhena.event.events.Render2DEvent;
import me.aristhena.event.events.UpdateEvent;
import me.aristhena.utils.ClientUtils;
import me.aristhena.utils.MathUtils;
import me.aristhena.utils.RenderUtils;
import me.aristhena.utils.RotationUtils;
import me.aristhena.utils.Timer;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiInventory;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemSword;
import net.minecraft.network.play.client.C02PacketUseEntity;
import net.minecraft.network.play.client.C03PacketPlayer;
import net.minecraft.network.play.client.C07PacketPlayerDigging;
import net.minecraft.network.play.client.C09PacketHeldItemChange;
import net.minecraft.network.play.client.C17PacketCustomPayload;
import net.minecraft.potion.Potion;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
@Mod
public class TickAura extends Module
{
@Option.Op(name="§bRotations")
public static boolean Rotations;
@Option.Op(name="§bTargetInfo")
public static boolean TargetInfo;
private Timer timer;
@Option.Op(name = "§aPlayers")
private boolean players;
@Option.Op(name = "§aMonters")
private boolean mobs;
@Option.Op(name = "§aRange", min = 3.8, max = 10.0, increment = 0.1)
private double range;
private boolean block;
private boolean dura;
private boolean criticals;
@Option.Op(name = "§aChestpladeDura")
public static boolean angle;
private EntityLivingBase target;
public TickAura() {
super();
this.timer = new Timer();
this.players = true;
this.mobs = false;
this.range = 4.0;
this.block = true;
this.dura = true;
this.criticals = true;
}
@EventTarget
private void onRender(final Render2DEvent event) {
RenderUtils.rectangleBordered(event.getWidth()/3-5, y-5,
event.getWidth()/3+ClientUtils.clientFont().getStringWidth(text), y+33, 1, new
Color(0,0,0,150).getRGB(), Color.BLACK.getRGB());
ClientUtils.clientFont().drawStringWithShadow(target.getName(),
event.getWidth()/3, y, Color.LIGHT_GRAY.getRGB());
ClientUtils.clientFont().drawStringWithShadow("HP "+farkk,
event.getWidth()/3, y+10, (fark==0 ? Color.YELLOW.getRGB():(fark<0 ?
Color.RED.getRGB() : Color.GREEN.getRGB())));
ClientUtils.clientFont().drawStringWithShadow("CP "+dura,
event.getWidth()/3, y+20, (chestfarki==0 ? Color.YELLOW.getRGB() : (chestfarki <0 ?
Color.RED.getRGB() : Color.GREEN.getRGB())));
}
}
@EventTarget
private void onUpdate(final UpdateEvent e) {
if (e.getState() == Event.State.PRE) {
this.target = this.getClosest();
if (this.target != null) { if (this.target.auraTicks <= 10) {
this.target.auraTicks =20;
}
this.lowerTicks();
// if (this.block && ClientUtils.player().getHeldItem() != null &&
ClientUtils.player().getHeldItem().getItem() != null &&
ClientUtils.player().getHeldItem().getItem() instanceof ItemSword) {
ClientUtils.mc().playerController.sendUseItem(ClientUtils.player(),
ClientUtils.mc().theWorld, ClientUtils.player().getHeldItem());
// }
final float[] rots = RotationUtils.getRotations(this.target);
e.setYaw(rots[0]);
e.setPitch(rots[1]);
if (Rotations) {
Minecraft.getMinecraft().thePlayer.rotationYawHead = rots[0];
Minecraft.getMinecraft().thePlayer.renderYawOffset = rots[0];
}
if (target.auraTicks == 13) {
}
}
else if (e.getState() == Event.State.POST && this.target != null ) {
if (ClientUtils.player().isBlocking()) {
ClientUtils.player().sendQueue.addToSendQueue(new
C07PacketPlayerDigging(C07PacketPlayerDigging.Action.RELEASE_USE_ITEM,
BlockPos.ORIGIN, EnumFacing.DOWN));
}
if (target.auraTicks == 14) {
ClientUtils.packet(new C09PacketHeldItemChange(8));
// this.swap(9, ClientUtils.player().inventory.currentItem);
ClientUtils.packet(new C03PacketPlayer(true));
this.attack(this.target, false);
this.attack(this.target, true);
ClientUtils.packet(new C09PacketHeldItemChange(0));
// this.swap(9, ClientUtils.player().inventory.currentItem);
ClientUtils.mc().thePlayer.sendQueue.addToSendQueue(new
C02PacketUseEntity(target, C02PacketUseEntity.Action.ATTACK));
}
if (target.auraTicks == 13) {
ClientUtils.packet(new C09PacketHeldItemChange(8));
// this.swap(9, ClientUtils.player().inventory.currentItem);
ClientUtils.mc().thePlayer.sendQueue.addToSendQueue(new
C02PacketUseEntity(target, C02PacketUseEntity.Action.ATTACK));
ClientUtils.packet(new C09PacketHeldItemChange(0));
// this.swap(9, ClientUtils.player().inventory.currentItem);
ClientUtils.mc().thePlayer.sendQueue.addToSendQueue(new C02PacketUseEntity(target,
C02PacketUseEntity.Action.ATTACK));
this.attack(this.target, true);
}
}
if (crit || vanillaCrit) {
ClientUtils.mc().thePlayer.onCriticalHit(ent);
}
if (sharpLevel > 0.0f) {
ClientUtils.mc().thePlayer.onEnchantmentCritical(ent);
}
if (TickAura.angle) {
final ItemStack[] items = this.target.getInventory();
ItemStack helm = null;
if (items[2] != null) {
helm = items[2];
}
if (items[2] != null) {
ClientUtils.sendMessage("§2§l[§f§lTick Aura§2§l]: §fS\u0130K\u0130\
u015e! G\u00f6\u011f\u00fcsl\u00fck Dayan\u0131kl\u0131l\u0131\u011f\u0131: " +
String.valueOf(helm.getMaxDamage() - helm.getItemDamage()), false);
}
}
}
ClientUtils.mc().playerController.windowClick(ClientUtils.mc().thePlayer.inventoryC
ontainer.windowId, slot, hotbarNum, 2, ClientUtils.mc().thePlayer);
}
if (startup) {
for (int i = 0; i < 10; ++i) {
this.lowerTicks();
}
}