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
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
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.
The text was updated successfully, but these errors were encountered:
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 codeThese 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.
The text was updated successfully, but these errors were encountered: