From 3cfcf255fc73a435838d3872331209b72cc059d7 Mon Sep 17 00:00:00 2001 From: Jess Date: Mon, 17 Jun 2024 10:25:13 +0100 Subject: [PATCH] more betterer rotations (bigger?) --- .../feature/modules/ingame/AutoMount.java | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/Client/src/main/java/de/com/baseband/client/feature/modules/ingame/AutoMount.java b/Client/src/main/java/de/com/baseband/client/feature/modules/ingame/AutoMount.java index 30ac0d5..632ad03 100644 --- a/Client/src/main/java/de/com/baseband/client/feature/modules/ingame/AutoMount.java +++ b/Client/src/main/java/de/com/baseband/client/feature/modules/ingame/AutoMount.java @@ -20,28 +20,25 @@ public class AutoMount extends Feature { Entity entity = null; public void preMotion(MotionUpdateEvent.Pre event) { - if (mc.player.getRidingEntity() != null) - return; - - for (Entity e : mc.world.loadedEntityList) { - if (valid(e)) { - Vec2f rot = RotationUtil.getRotationTo(e.getPositionVector()); - event.pitch = rot.y; - event.yaw = rot.x; - entity = e; - break; - } + if(entity != null && mc.player.getRidingEntity() == null) { + Vec2f rot = RotationUtil.getRotationTo(entity.getPositionVector()); + event.pitch = rot.y; + event.yaw = rot.x; } - } public void postMotion(MotionUpdateEvent.Post event) { - if (mc.player.getRidingEntity() != null) - return; - if(entity != null) { + if(entity != null && mc.player.getRidingEntity() == null) { mc.playerController.interactWithEntity(mc.player, entity, EnumHand.MAIN_HAND); entity = null; } + + for (Entity e : mc.world.loadedEntityList) { + if (valid(e)) { + entity = e; + break; + } + } } boolean valid(Entity entity) {