Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AuraUtils.getEntityList(this).forEach(entityLivingBase -> {
- if (this.currentTarget == null) {
- if (AuraUtils.isValid(this, entityLivingBase))
- this.currentTarget = entityLivingBase;
- else {
- currentTarget = null;
- return;
- }
- }
- });
- if (!AuraUtils.isValid(this, this.currentTarget)) {
- currentTarget = null;
- }
- if (this.getBool("Autoblock") && mc.getCurrentServerData().serverIP.toLowerCase().contains("hypixel") && AuraUtils.canBlock() && currentTarget != null) {
- mc.thePlayer.setItemInUse(mc.thePlayer.getHeldItem(), 155);
- }
- else {
- if (this.getBool("Autoblock") && !mc.getCurrentServerData().serverIP.toLowerCase().contains("hypixel") && AuraUtils.canBlock() && currentTarget != null) {
- mc.thePlayer.setItemInUse(mc.thePlayer.getHeldItem(), 155);
- mc.thePlayer.sendQueue.addToSendQueue(new C07PacketPlayerDigging(
- C07PacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, EnumFacing.DOWN));
- }
- }
- if (currentTarget != null) {
- Float[] rotations = EntityHelper.getEntityRotations2(this.mc.thePlayer, this.currentTarget);
- event.yaw = rotations[0].floatValue();
- event.pitch = rotations[1].floatValue();
- if (this.attackTimer.hasReached(CPS.longValue())) {
- mc.thePlayer.swingItem();
- mc.thePlayer.sendQueue.addToSendQueue(
- new C02PacketUseEntity(this.currentTarget, C02PacketUseEntity.Action.ATTACK));
- this.attackTimer.reset();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement