Mojira Archive
MC-88330

Textures and Effects are off when far away from the center of the map

Introduction

Most of this behavior can be reproduced near the world border: /tp 29999950 29999950
Some of the strange rendering can also be seen closer to the center of the world but not in such an extreme way.

Reason for this bug

The 32-bit float simply run out of resolution/accuracy with the large coordinates. The solution is a bit of "ugly", but it got the work done, as I'm looking at perfectly fine wires at coordinates near X&Y of 17,000,000.
There are more unnecessary (and sort of harmful) (float)-casts in that same method, but they are for Y-coordinates, and since Y-coordinates are, for the time being, very limited, they do not show similar problems. (That whole class seems to be littered with those float-casts, many of which seem to be unnecessary and possibly causing similar issues for other blocks/visuals.)
comment by Markku on MC-3718

Other bugs caused by this

Fix for fire's smoke
This time no source code as the changes cover almost the whole method. But its the very same fix, in BlockFire.randomDisplayTick(), change floats to doubles and remove casts to float when the variables are handling coordinates. This also includes sound generation coordinates.
comment by Markku on MC-3718

Affected entities, blocks or particles

The following is based on a decompiled version of Minecraft 1.10 using MCP 9.30.

Falling blocks

The offset is probably caused by the method net.minecraft.client.renderer.entity.RenderFallingBlock.doRender(EntityFallingBlock, double, double, double, float, float). The texture being too large, shifted and rotated is caused by something else.

Particles

Apparently only affects particles created under certain circumstances

  • Landing particles, see MC-76810 created by Mog (Ryan Holtz)
  • Particles created by the /particle command
  • TNT explosion particles
  • Green bone meal particles
  • barrier particles
    • MCP 9.35 rc1 name
      Method: net.minecraft.client.multiplayer.WorldClient.showBarrierParticles(int, int, int, int, Random, boolean, MutableBlockPos)

Rain and snow

Rain and snow renders as large white lines when you are at a very high y-coordinate. This does however only happen for large y, but not for x or z coordinates.

/teleport ~ 3000000 ~