This is a bug fix and minor feature release for Nucleus for Sponge API version 7.1
This was built from Nucleus commit: 9e813821
If you’re having trouble, visit our Discord channel: https://discord.gg/A9QHG5H
Many of you have been saying that RTP has been not working super well, even after my complete rewrite of the system. I spent an hour debugging the system and found that I was handing the centre of the border at the wrong point in my calculations.
As you possibly know, the default RTP kernels require three things (for x,z at least):
- The world centre
- The minimum radius from the world centre which is a valid RTP point
- The maximum radius from the world centre which is a valid RTP point
The way the calculation should work for
z co-ordinates is as follows:
- Get Java to return a random number between
max-min, then adds
- Determine whether the co-ordinate is positive or negative, multiplies the result above by
1to do this
- Add the corresponding x or z co-ordinate from the world spawn point
My mistake was that the second and third step were reversed. This incorrectly set the co-ordinates for three-quarters
of the co-ordinates (that is, if either or both of the signs determined in step 2 is negative).
The further away your spawn point from
(0,0), the worse this bug became. The fix amounted to moving a right parenthesis.
This did not affect any third party kernels, though I don’t think that there are any at this time.
I am sorry if you’ve been tearing your hair out over this!
- Fixed RTP incorrectly working out target co-ordinates when the centre of the border is not (0, 0)
- Fix cryptic error message when using a warp to a world that can no longer be found
- Some plugins and mods are known to be incompatible with Nucleus. See https://nucleuspowered.org/docs/compatibility.html for more information.