Terra (Fabric/Forge/Paper)

Terra (Fabric/Forge/Paper)

74.2k Downloads

Remove randomInt TerraScript function & remove Random instance from structure API

dfsek opened this issue ยท 3 comments

commented

Currently, TerraScript contains a randomInt function which fetches the next random integer within a range from a mutable Random object. This Random is supplied by the Structure#generate method. The randomInt function should be removed, as well as the Random parameter from the generate method, in favor of using stateless random sources, specifically noise functions.

(additionally, check elsewhere for any other uses of Random that we may have forgotten about)

commented

If this is removed I think we need some sort of time since world gen data source, so that world gen can be completely stateless while features like #111 and #322 can appear "random"

commented

These features can just salt the world seed with some value, probably just a number from the server random.

commented

I believe ores also use the random parameter, they should be modified to accept a noise sampler which is used instead