mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-25 13:01:03 +00:00
Update teleport docs and allow overriding Y coord when teleporting
This commit is contained in:
parent
2074933e96
commit
5a2d25e4eb
12
README.md
12
README.md
@ -143,11 +143,13 @@ There is a dummy user named "Server" in every player's friends list that you can
|
||||
|
||||
### Bonus
|
||||
|
||||
When you want to teleport to somewhere, use the ingame marking function on Map, click Confirm. You will see your
|
||||
character falling from a very high destination, exact location that you marked.
|
||||
|
||||
You can also specify a set Y coordinate by renaming the map marker.
|
||||
|
||||
- Teleporting
|
||||
- When you want to teleport to somewhere, use the in-game marking function on Map.
|
||||
- Mark a point on the map using the fish hook marking (the last one.)
|
||||
- (Optional) rename the map marker to a number to override the default Y coordinate (height, default 300.)
|
||||
- Confirm and close the map.
|
||||
- You will see your character falling from a very high destination, exact location that you marked.
|
||||
|
||||
# Quick Troubleshooting
|
||||
|
||||
* If compiling wasn't successful, please check your JDK installation (JDK 17 and validated JDK's bin PATH variable)
|
||||
|
@ -145,6 +145,12 @@ chmod +x gradlew
|
||||
### 额外功能
|
||||
|
||||
当你想传送到某个地点, 只需要在地图中创建标记, 关闭地图后即可到达目标地点上空
|
||||
- 传送
|
||||
- 当你想传送到某个地点时,可以使用游戏里的地图标记功能。
|
||||
- 用鱼钩(最后一个图标)在地图上标记一个点位。
|
||||
- (可选) 将标记名称改为数字,即可修改传送位置的Y坐标(高度,缺省值是300)。
|
||||
- 确认添加标记,并关闭地图。
|
||||
- 你会看到你的角色从你选定点位的正上方高空落下。
|
||||
|
||||
# 快速排除问题
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user