mirror of
https://github.com/Wurst-Imperium/Wurst7.git
synced 2024-09-20 01:12:13 +02:00
Slightly refactor TriggerBot
This commit is contained in:
parent
f8427614c4
commit
b4811fabd3
@ -100,16 +100,16 @@ public final class TriggerBotHack extends Hack implements PostMotionListener
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if(MC.crosshairTarget == null
|
if(MC.crosshairTarget == null
|
||||||
|| !(MC.crosshairTarget instanceof EntityHitResult))
|
|| !(MC.crosshairTarget instanceof EntityHitResult eResult))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Entity target = ((EntityHitResult)MC.crosshairTarget).getEntity();
|
Entity target = eResult.getEntity();
|
||||||
if(!isCorrectEntity(target))
|
if(!isCorrectEntity(target))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
WURST.getHax().autoSwordHack.setSlot(target);
|
WURST.getHax().autoSwordHack.setSlot(target);
|
||||||
|
|
||||||
WURST.getHax().criticalsHack.doCritical();
|
WURST.getHax().criticalsHack.doCritical();
|
||||||
|
|
||||||
MC.interactionManager.attackEntity(player, target);
|
MC.interactionManager.attackEntity(player, target);
|
||||||
swingHand.swing(Hand.MAIN_HAND);
|
swingHand.swing(Hand.MAIN_HAND);
|
||||||
speed.resetTimer();
|
speed.resetTimer();
|
||||||
|
Loading…
Reference in New Issue
Block a user