Team-RTG / Realistic-Terrain-Generation

The Realistic Terrain Generation mod for Minecraft.
GNU General Public License v3.0
245 stars 117 forks source link

Aspects of terrain generate more blocky at high distances due to float usage #1373

Closed muzikbike closed 11 months ago

muzikbike commented 1 year ago
Affected Mod Versions:
Issue Description:

32-bit floats appear to be used for controlling some aspects of world generation. This results in blocky artifacts that can be seen in these features if we travel sufficiently high distances from the origin of the world.

In the following two screenshots, the area to the left is before 16,777,216 blocks, and the area to the right is after it: 2023-04-13_19 43 43 2023-04-13_19 43 48

Here's a typical ocean floor after 16,777,216 blocks - note the weird horizontal stripes: 2023-04-13_19 44 23

Surface terrain and the blocks which are chosen to be used for the surface are affected to the same extent: 2023-04-13_19 40 15

Steps to reproduce the issue: (If it's easily reproducible.)
  1. Create a world, preferably in Creative
  2. Teleport 16,777,216 blocks or more from the origin
  3. Closely inspect the terrain
muzikbike commented 1 year ago

We can take this to the extreme by using FarLandsMod and teleporting out farther than the usual vanilla limit of 30 million to really see these effects in action. Here's the ocean floor after about 2 billion blocks: 2023-04-13_19 39 16

srs-bsns commented 11 months ago

This game engine wasn't really designed for reaching the extremities of Java primitive values. Just stay within acceptable bounds. :)