Replace setPosition with trySetPosition (#1403)

Allows cancellation information to be fed back into the ascend/descend
algorithms.

(cherry picked from commit 71e104bcb187a5313e88dda5df79059c8ffbc1fe)
This commit is contained in:
Octavia Togami
2020-07-01 11:24:58 -04:00
committed by MattBDev
parent c82fec931a
commit 4c299bc0b8
8 changed files with 103 additions and 21 deletions

View File

@ -168,8 +168,9 @@ public class ForgePlayer extends AbstractPlayerActor {
}
@Override
public void setPosition(Vector3 pos, float pitch, float yaw) {
public boolean trySetPosition(Vector3 pos, float pitch, float yaw) {
this.player.connection.setPlayerLocation(pos.getX(), pos.getY(), pos.getZ(), yaw, pitch);
return true;
}
@Override