Glitches when coordinates are large (~1M)

Lately I’ve been playing with my friends in a private server, we seperated players by random teleporting them faraway from (0,0) and we experienced some glitches. I tested a lot with the mods in our modpack before I realized where the problems came from. This problem doesn’t seem to be reported before so I’m posting it here.

The glitches we have noticed:

  1. You can see a grid when holding a wrench (or other tools like cutter) and point it at a machine if waila is installed. The grid would randomly shift its place in this case, the larger coordinate you have, the more pronuonced this effect would be. At ~256k the shifting is already noticeable. When coordinates >4M the grid is usually outside the block, making it inconvenient to use these tools.
  2. You can no longer take items from item barrels and mass storages (~4M).
  3. Right clicking on a button panel often trigger the button around the one you aimed at.

In vanilla MCJE there are distance-dependent glitches already existing, and in Minecraft Wiki there’s a page about it (Java Edition distance effects). It’s likely that these problems comes from the same reason, precision loss in float numbers. The difference is that for GT the distance required to produce this effect is much lower than that in vanilla. For now I have no idea how to get rid of this. I wonder if there are any solutions to this, or if it could be fixed later.

1 Like

The Mass Storage thing is a vanilla Issue, its just that vanilla does not make actual use of the exact coordinates that have been clicked (except when placing Slabs, but that’s Y-Axis only) so it’s invisible to players.

This issue indeed is a floating point problem, the thing with that is, that I cannot use double instead of float because it is vanilla itself that provides the coordinates as float to my mod, so I cannot change or fix the Issue…

As for the Grid shifting, that MIGHT be fixable, however that might be problematic since the Grid probably shifts into the direction that the expected Coordinates shift to, and since I cannot fix the expected Coordinates, I cant just fix the Grid…

Sorry but this is sadly a wont fix for me, since I cant really do anything about it…

Also there is no real reason to ever go into the Millions with Coordinates, at that point you could just host multiple Servers or use Singleplayer and even get better performance. Or use a Dimension Mod that adds more Overworlds so that each player gets one. Or split up the world in four along the X and Z Axis and tell people to not build across the borders, this goes well if you enable the Center Streets of GT6 in the Worldgen Config. ^^