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

Casting issue: TNT blocks ignited by other explosions lose precision at high coordinates

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 1.14.4, 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, 20w06a, 20w07a, 20w08a, 20w09a, 20w10a, 20w11a, 20w12a, 20w13a, 20w15a, 20w18a, 20w19a, 20w20a, 20w21a, 20w22a
    • Fix Version/s: 1.16 Pre-release 1
    • Labels:
    • Confirmation Status:
      Confirmed
    • Category:
      Entities, Networking
    • Mojang Priority:
      Low

      Description

      discovered while testing the fix to MC-125638.

      Since the code that primes TNT from other explosions is different from the code that primes it from held items, TNT primed from other explosions is still subject to high coordinate precision loss in this case.

      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-167421, MC-164352, MC-183174, MC-186362, MC-167103, MC-182789

        Attachments

        1. 2019-12-03_18.22.47.png
          2019-12-03_18.22.47.png
          1.64 MB
        2. 2019-12-03_18.22.56.png
          2019-12-03_18.22.56.png
          858 kB
        3. 2019-12-03_18.22.59.png
          2019-12-03_18.22.59.png
          851 kB
        4. 2019-12-03_18.26.00.png
          2019-12-03_18.26.00.png
          1.30 MB
        5. 2019-12-03_18.26.04.png
          2019-12-03_18.26.04.png
          1.31 MB
        6. 2019-12-03_18.26.07.png
          2019-12-03_18.26.07.png
          1.07 MB

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:
                CHK: