Update teleport docs and allow overriding Y coord when teleporting

This commit is contained in:
Angda Song
2022-05-04 14:13:23 -07:00
committed by Melledy
parent 2074933e96
commit 5a2d25e4eb
3 changed files with 14 additions and 8 deletions

View File

@@ -70,9 +70,7 @@ public class HandlerMarkMapReq extends PacketHandler {
}
private void teleport(Player player, MapMark mapMark) {
// Increased height means you can fly to the top of dragonspine now,
// at the cost of slightly longer falling to your destination.
float y = 700;
float y = isInt(mapMark.getName()) ? Integer.parseInt(mapMark.getName()) : 300;
float x = mapMark.getPosition().getX();
float z = mapMark.getPosition().getZ();
player.getPos().set(x, y, z);