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

Shipwreck bounding boxes are in the wrong spot and eyes of ender aren't filled into end portal frames correctly because ChunkRandom is not the same as vanilla #22

Open
polarbub opened this issue Jun 16, 2023 · 0 comments

Comments

@polarbub
Copy link
Collaborator

Randomness for structures is different between this mod and vanilla. Both this mod and vanilla are reproducible, but this mod's output is different.

There is only two structures that are affected by this: beached shipwrecks and end portals. Beached shipwrecks will be ±3 blocks vertically from vanilla. This is because they are randomly moved down while generating by a max of three blocks. See the third to last line of this function to see the vanilla code and here for the mod's code. This code looks different, but it will output the same thing if the randomness were to be corrected.

End portals will be not have the same eyes filled in as in vanilla, but they will still have the same probability of being filled and it will be repeatable. This function were it uses Random for the vanilla code and here for this mod's code

These issues aren't issues in my use of random. They are issues with the random getting passed to the mod's handlers being not the same as the ones passed to vanilla. I validate if the random is correct by breaking in the debugger and looking at the current seed of the rng. After a lot of debugging it seems to be match until here, but and not by here. The first one is looping through all structures and the second one is looping though all the found instances of that structure in the current chunk.

If this issue causes you a large enough problem that can't be solved by knowing what the issue is and how it behaves you may fix it. I was unable figure it with multiple days of trying so I have given up. Maybe a different pair of eyes will be able to figure it out.

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

1 participant