mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-23 02:55:45 +01:00
Add elytra effect to flying pathfinder
This commit is contained in:
parent
aef2c48256
commit
283fd3ee32
@ -143,6 +143,8 @@ public class FlyingAStarNavigationStrategy extends AbstractPathStrategy {
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user