Closed CortexPE closed 2 years ago
⚠️ This issue ticket doesn't have all the required information ⚠️ To make it as quick and easy as possible for maintainers to fix your problem, an issue template is provided which lists certain required information. This includes (but is not limited to):
version
command)plugins
command)Without this information, your problem cannot begin to be investigated, so the issue will be closed. You may amend this one, or create a new one, providing all the required information using one of the provided issue templates.
Help us to help you by providing the information we ask for.
Issue description updated
this is a tough problem to fix because it will change the outputs of all the generators.
this is a tough problem to fix because it will change the outputs of all the generators.
I would suggest providing a LegacyRandom
class which explicitly declares in the documentation that it has broken outputs, then the new Random
class would simply overwrite the nextSignedInt()
method, which should fix the behavior of #4646 as well...
I could also suggest naming them Random32
and Random64
respectively, but it would imply that the former works perfectly as intended and doesn't have broken behavior.
This way, old legacy generators that depend on the old broken behavior wouldn't get broken terrain... Given the proper migration on the code-side. (or insist on renaming the fixed Random
class to force a BC-break... for safety)
A more comprehensive change is to do proper world generator versioning to possibly support even the future massive changes to terrain generation
All of these solutions require some kind of BC break.
After digging into generator sources it appears that the generator was not affected by this problem at all, due to exclusively using unsigned values.
The only thing this actually has any impact on are the following things:
grepPlugins
suggests that impact is similarly negligible to plugins, with only SimpleWarp particles being affected (bias). I am however unable to speak of private plugins.
Issue description
Random->nextSignedInt()
should return a signed 32-bit integer (according to docs)OS and versions
Plugins
A plugin or a world generator is needed to invoke the function, the following snippet may be used to produce a similar output below:
Crashdump, backtrace or other files