Galacticraft Legacy

Galacticraft Legacy

2M Downloads

Precision loss in terrain generation due to floats

muzikbike opened this issue ยท 6 comments

commented

Minecraft version: 1.12.2
Galacticraft version: 281

Single player (SP)

Any Galacticraft add-ons installed? Please list all of them: Yes and no; issue can be reproduced in both base galacticraft with no other mods and with addons which use the same terrain generator for other planets

Please provide screenshots / videos / full modlist as needed

Please state the site that you downloaded Galacticraft from: micdoodle site

It seems as though the terrain generator used for the moon/mars uses floats for some reason, rather than integers or a double. This isn't much of an issue at the exact center of the world, bu tteleporting out far enough results in prominent artifacts in terrain generation, resulting in terrain becoming far more blocky than it should be.

2021-01-31_07 56 38
2021-01-31_07 56 58
2021-01-31_07 58 26
2021-01-31_07 58 31
2021-01-31_07 58 54

Since blocks can only exist on integer coordinates, I don't see the point in using a float - vanilla's dimensions as well as Venus all use integers for their terrain generators and do not have this issue.

commented

Fixed in latest commit

commented

they use floats for the Gradient style generation.

commented

If it's an issue with floats and integers can't be used, would using doubles instead provide enough precision for all valid world chunks?

commented

If it's an issue with floats and integers can't be used, would using doubles instead provide enough precision for all valid world chunks?

Honestly, will need to look into it further. doubles do provide a higher precision (approx. 2x) but I wouldn't be able to say it would change anything.

commented

@muzikbike See if this can be reproduced with the builds in mods.zip

mods.zip

commented

Confirmed fixed with the provided builds.