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

Crossing the border below Y0 (custom terrain) teleports you to spawn. #19

Open
totemo opened this issue Nov 16, 2022 · 1 comment
Open

Comments

@totemo
Copy link

totemo commented Nov 16, 2022

In a custom-generated world where the terrain is uniformly below Y0 at the border, crossing the border teleports the player to world spawn.

It looks to me like the reason for this is that WorldBorder contains a hard-wired assumption that no safe (to stand upon) blocks can be generated below Y0, as initialised here.

That variable is used to seek a safe place to stand here. Note that local variable Y is set to limBot (both 0) and therefore the first if test in the for loop is if (0 > 0) i.e. always false. It denies the possibility of searching for a safe negative Y.

I believe the way to fix it is to initialise limBot to WorldInfo.getMinHeight(), as implemented by World.

@helmasaur
Copy link

helmasaur commented Jan 17, 2023

It looks to me like the reason for this is that WorldBorder contains a hard-wired assumption that no safe (to stand upon) blocks can be generated below Y0, as initialised here.

This modification seems to be working: https://github.com/PryPurity/WorldBorder/pull/51/files .

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

No branches or pull requests

2 participants