-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Describe the bug
When running the command on a fabric server, the server hangs for around 5-10 seconds. During that time, the player is teleported, so if the player teleports into a block, they would be dead from suffocation before they realize. Also, other players will experience server lag too when someone runs /rtp
To Reproduce
Steps to reproduce the behavior:
- run a fabric server with the plugin
- run /rtp
Expected behavior
The server doesn't lag when the command is ran.
Desktop (please complete the following information):
- RandomTP version: 7.1.0
- Minecraft Version: 1.19.2
Additional context
Server is hosted by Shockbyte using the 8GB plan.
I think this happens because of the mutliple checks for safe locations.
I think to fix it, take the first set of coords that /rtp generated and change the y position to max height and prevent the player from taking fall damage for a few seconds, or check to see if a y position has a block above it, if not put the player there. (Like using the /top command in essential commands)
These methods will ensure the player is on the surface, but only works in open sky dimentions (unlike the nether, which has a ceiling)