Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does this fix geysermc's distance limitation #25

Open
spring-dependency-management opened this issue Jan 8, 2025 · 6 comments
Open
Labels
question Further information is requested

Comments

@spring-dependency-management

This could be big for bedrock users. Since when they play java servers with places out in the millions, bedrock can't handle coordinates above around 200,000 https://www.youtube.com/watch?v=q3BvjYdqM0g

@spring-dependency-management spring-dependency-management added the enhancement New feature or request label Jan 8, 2025
@joshuaprince
Copy link
Owner

This plugin would likely allow Bedrock users to visit places outside Bedrock's coordinate range. An offset provider like zeroAtLocation along with frequent resets would work well for this.

However, Geyser as a plugin is currently not supported alongside CoordinateOffset. I haven't yet worked out how to adjust Geyser's additional checks (such as fixing collisions) to assume offsetted coordinates.

If you add Geyser externally to the backend server (e.g. using the standalone process or maybe on a proxy like Velocity), while keeping CoordinateOffset on the backend server, I suspect this would work. Try it and see!

@joshuaprince joshuaprince added question Further information is requested and removed enhancement New feature or request labels Jan 11, 2025
@spring-dependency-management
Copy link
Author

spring-dependency-management commented Jan 13, 2025

This plugin would likely allow Bedrock users to visit places outside Bedrock's coordinate range. An offset provider like zeroAtLocation along with frequent resets would work well for this.

However, Geyser as a plugin is currently not supported alongside CoordinateOffset. I haven't yet worked out how to adjust Geyser's additional checks (such as fixing collisions) to assume offsetted coordinates.

If you add Geyser externally to the backend server (e.g. using the standalone process or maybe on a proxy like Velocity), while keeping CoordinateOffset on the backend server, I suspect this would work. Try it and see!

would be interesting to have a config option that enables offsets ONLY for bedrock players, as a means to fix this longstanding bug? do you think it would work? Also how does the zero at location work, you said frequent resets, is it not like a square mode? i.e when player logs in and they stray more than a configurable amount of blocks away they get re-centered? something like that? maybe recenter them upon teleports only so its seemless? how does recentering even work, i assume we have to send them respawn packet and reload all the chunks? Sorry for the barrage of questions, just very interested in this plugin.

@joshuaprince
Copy link
Owner

joshuaprince commented Jan 13, 2025

would be interesting to have a config option that enables offsets ONLY for bedrock players

I've had this suggested before, but in the opposite direction (only affect non-Bedrock players) to work around the bugs I mentioned that occur when it's installed with Geyser on the backend server. What you described would be a useful alternative in the future if Bedrock could be compatible. Should be possible, though I haven't looked into how to query whether a player is using Bedrock through Geyser.

Also how does the zero at location work, you said frequent resets, is it not like a square mode?

Right now, offsets can ONLY change when the player joins, respawns, changes world, or teleports*. There isn't a method right now to change them on demand or when the player moves around normally. It's theoretically possible, but would require generating a fake teleport packet AND resending chunks. #7 tracks this but I haven't had the interest in exploring the requirements to make it work well.

However, unless the player wants to travel 200k blocks with no world changes or teleports, those offset change triggers should be enough to keep client coordinates in a reasonable range. zeroAtLocation will just reset the offset every time one of those triggers happens, so their "progress toward the 200k limit" will be reset.

@spring-dependency-management
Copy link
Author

would be interesting to have a config option that enables offsets ONLY for bedrock players

I've had this suggested before, but in the opposite direction (only affect non-Bedrock players) to work around the bugs I mentioned that occur when it's installed with Geyser on the backend server. What you described would be a useful alternative in the future if Bedrock could be compatible. Should be possible, though I haven't looked into how to query whether a player is using Bedrock through Geyser.

Also how does the zero at location work, you said frequent resets, is it not like a square mode?

Right now, offsets can ONLY change when the player joins, respawns, changes world, or teleports*. There isn't a method right now to change them on demand or when the player moves around normally. It's theoretically possible, but would require generating a fake teleport packet AND resending chunks. #7 tracks this but I haven't had the interest in exploring the requirements to make it work well.

However, unless the player wants to travel 200k blocks with no world changes or teleports, those offset change triggers should be enough to keep client coordinates in a reasonable range. zeroAtLocation will just reset the offset every time one of those triggers happens, so their "progress toward the 200k limit" will be reset.

I'm trying out the plugin and just wondering whether these things are possible:

make a coordinate offset provider only activate if the players real coordinates are above a certain x and/or z value? would make it so the plugin is "off" for bedrock players until they end up at coordinates which cause rounding errors

Is it possible for the reset on distant teleport to apply a configurable offset? so the chunks arent replacing chunks the client already sees, for example, if i am a bedrock player at real position 1,000,000 1,000,000 and i am seeing 0 0, teleporting to 2,000,000 2,000,000 should spoof to me 1000, 1000 , offsetting each time up to a certain distance until it rolls around? Sorry if this sounds complex

@joshuaprince
Copy link
Owner

make a coordinate offset provider only activate if the players real coordinates are above a certain x and/or z value

Absolutely possible, using a custom offset provider. This wouldn't fit into the base plugin since it's a bit niche.

Is it possible for the reset on distant teleport to apply a configurable offset

Also sounds possible using a custom provider by maintaining state per-player.

@spring-dependency-management
Copy link
Author

make a coordinate offset provider only activate if the players real coordinates are above a certain x and/or z value

Absolutely possible, using a custom offset provider. This wouldn't fit into the base plugin since it's a bit niche.

Is it possible for the reset on distant teleport to apply a configurable offset

Also sounds possible using a custom provider by maintaining state per-player.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants