private void attackTarget(LivingEntity targetEntity) {
if ((Boolean)this.settings.getValueByName("Отжимать щит").get() && mc.player.isBlocking()) {
mc.playerController.onStoppedUsingItem(mc.player);
}
boolean sprint = false;
if (CEntityActionPacket.lastUpdatedSprint && !mc.player.isInWater()) {
mc.player.connection.sendPacket(new CEntityActionPacket(mc.player, Action.STOP_SPRINTING));
sprint = true;
}
mc.playerController.attackEntity(mc.player, targetEntity);
mc.player.swingArm(Hand.MAIN_HAND);
if ((Boolean)this.settings.getValueByName("Ломать щит").get()) {
this.breakShieldAndSwapSlot();
}
if (sprint) {
mc.player.connection.sendPacket(new CEntityActionPacket(mc.player, Action.START_SPRINTING));
}
}