Skip to content

Commit

Permalink
Add elytra effect to flying pathfinder
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Jun 29, 2018
1 parent aef2c48 commit 283fd3e
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ public boolean update() {
motX += (Math.signum(d0) * 0.5D - motX) * 0.1;
motY += (Math.signum(d1) - motY) * 0.1;
motZ += (Math.signum(d2) * 0.5D - motZ) * 0.1;
velocity.setX(motX).setY(motY).setZ(motZ).multiply(parameters.speed());

float targetYaw = (float) (Math.atan2(motZ, motX) * 180.0D / Math.PI) - 90.0F;
float normalisedTargetYaw = (targetYaw - current.getYaw()) % 360;
if (normalisedTargetYaw >= 180.0F) {
Expand Down

0 comments on commit 283fd3e

Please sign in to comment.