rivate void updateAttack() {
selected = MouseUtil.getMouseOver(target, rotateVector.x, rotateVector.y, attackRange.get());
if ((selected == null || selected != target) && !type.is("Резкий") && !mc.player.isElytraFlying()) {
return;
}
if (mc.player.isBlocking() && options.getValueByName("Отжимать щит").get()) {
mc.playerController.onStoppedUsingItem(mc.player);
}
boolean sprint = false;
if (CEntityActionPacket.lastUpdatedSprint && !mc.player.isInWater() && !ClientUtil.isConnectedToServer("ReallyWorld")) {
mc.player.connection.sendPacket(new CEntityActionPacket(mc.player, CEntityActionPacket.Action.STOP_SPRINTING));
sprint = true;
}
Sprint autoSprint = Expensive.getInstance().getFunctionRegistry().getSprint();
if (!ClientUtil.isConnectedToServer("ReallyWorld") && autoSprint.isState()) {
}
stopWatch.setLastMS(500);
mc.playerController.attackEntity(mc.player, target);
mc.player.swingArm(Hand.MAIN_HAND);
if (target instanceof PlayerEntity player && options.getValueByName("Ломать щит").get()) {
breakShieldPlayer(player);
}
if (sprint) {
mc.player.connection.sendPacket(new CEntityActionPacket(mc.player, CEntityActionPacket.Action.START_SPRINTING));
}
}