Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-161969

Casting issue: Adding ender eyes to end portal frames at high distances causes particles to lose precision

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 1.16 Pre-release 1
    • 1.14.4, 19w39a, 19w40a, 19w41a, 19w42a, 19w44a, 19w45a, 1.15 Pre-release 1, 1.15 Pre-Release 2, 1.15 Pre-release 3, 1.15 Pre-release 4, 1.15 Pre-release 5, 1.15 Pre-release 6, 1.15 Pre-release 7, 1.15.1 Pre-release 1, 1.15.2 Pre-Release 1, 1.15.2 Pre-release 2, 1.15.2, 20w06a, 20w07a, 20w08a, 20w09a, 20w10a, 20w11a, 20w12a, 20w13a, 20w15a, 20w18a, 20w19a, 20w20a, 20w20b, 20w21a, 20w22a
    • Confirmed
    • Particles
    • Low

      When adding an eye of ender to an end portal frame, particles are produced. However, when sufficiently far out from the world's origin, especially beyond 2^24 blocks, these particles can become very distant from the frame block. This would be basically impossible to encounter in survival mode, but is easy to reproduce in creative. Comparison provided in images.

      This is best tested when greater than 16,777,216 blocks out on both axes, so being 20 million blocks out should suffice. This issue is without a doubt due to incorrectly casting to a 32-bit float from an integer or double, resulting in numerical precision being lost. This can be fixed by simply not casting to a float, which eliminates any chance of losing any precision.

      Related tickets: MC-182789

            grum [Mojang] Grum (Erik Broes)
            Awesoman3000 Connor Steppie
            Votes:
            3 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: