more betterer rotations (bigger?)
All checks were successful
/ Build BaseBand DSM & Broadway (push) Successful in 2m15s
All checks were successful
/ Build BaseBand DSM & Broadway (push) Successful in 2m15s
This commit is contained in:
parent
3b6390c4a4
commit
3cfcf255fc
1 changed files with 12 additions and 15 deletions
|
@ -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());
|
||||
if(entity != null && mc.player.getRidingEntity() == null) {
|
||||
Vec2f rot = RotationUtil.getRotationTo(entity.getPositionVector());
|
||||
event.pitch = rot.y;
|
||||
event.yaw = rot.x;
|
||||
entity = e;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue