You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I offer an API that allows plugins to apply offsets as they see fit. However, it does not currently expose a way to trigger an offset change immediately - the API only "reacts" to when the player's offset can change.
I've looked into manual offset changes and would like to make it work, but I ran into technical challenges. Whenever a player's offset changes, the client needs to receive chunks at those "new" client-side coordinates. However, if we trigger a direct offset change but keep the player where they are, the player's server-side (real) coordinates stay the same, so the server will not re-send chunks at that location and the client just shows void. Furthermore, the client needs to receive a fake teleport packet so that it can move the player to the new client-side coordinates.
As the plugin is now, the easiest solution is to teleport the player to a different world (or a far distance away, if resetOnDistantTeleport is an option) and then back to where they were, so that an API consumer can catch the change and update the player's offset. In theory, though, this can be done smoothly with just the fake teleport packet and chunk re-send - I'm open to merging a PR if someone manages to get it working.
Thank you very much for that detailed reply.
After reading up on "resetOnDistantTeleport", I think, that that option might be sufficient for what I'm trying to do.
Just need to make sure, that my teleports are at least 2 x Viewdistance.
Hi, love your plugin^^
Would it be possible to create some kind of API, so that I can manually reset the offset whenever I want?
The text was updated successfully, but these errors were encountered: