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

TNT falls through fences and walls when ignited whilst on top of them

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Minecraft 14w25b
    • Minecraft 1.5.1, Snapshot 13w21b, Snapshot 13w22a, Minecraft 15w47c, Minecraft 1.10.2, Minecraft 16w33a, Minecraft 16w42a, Minecraft 16w43a, Minecraft 1.11.2, Minecraft 17w06a, Minecraft 1.12.2, Minecraft 18w02a, Minecraft 18w05a, Minecraft 18w20c, Minecraft 1.13, Minecraft 18w30b, Minecraft 18w31a, Minecraft 18w32a, Minecraft 18w33a, Minecraft 1.13.1, Minecraft 1.13.2-pre2, Minecraft 1.13.2, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, Minecraft 19w08b, Minecraft 19w09a, Minecraft 19w12b, Minecraft 19w13b, Minecraft 19w14a, Minecraft 19w14b, Minecraft 1.14 Pre-Release 2, Minecraft 1.14.2, 1.14.4, 1.15.1, 1.15.2 Pre-release 2, 1.15.2, 20w06a, 20w07a, 20w08a, 1.16 Pre-release 2, 1.16 Pre-release 3, 1.16 Pre-release 4, 1.16 Pre-release 5, 1.16 Release Candidate 1, 1.16, 1.16.1, 20w29a, 1.16.2 Pre-release 1, 1.16.2, 1.16.3 Release Candidate 1, 1.16.3, 1.16.4, 20w46a, 20w51a, 21w03a, 1.16.5, 21w05b, 21w06a, 21w07a, 21w11a, 21w15a, 21w17a, 21w20a, 1.17 Pre-release 1, 1.17 Release Candidate 1, 1.17 Release Candidate 2, 1.17, 1.17.1, 21w39a, 21w40a, 21w41a, 21w42a, 21w43a, 21w44a, 1.18 Pre-release 1, 1.18 Pre-release 6, 1.18, 1.18.1, 22w03a, 22w05a, 22w06a, 22w07a, 1.18.2 Release Candidate 1, 1.18.2, 22w13a, 22w17a, 22w18a, 1.19, 1.19.1, 1.19.2, 22w43a, 22w45a, 1.19.3, 1.19.4, 1.20, 1.20.1, 23w33a, 23w44a, 24w11a, 1.20.6, 1.21, 1.21.1, 24w36a, 1.21.2 Pre-Release 3, 1.21.3, 1.21.4
    • Confirmed
    • Collision, Entities, Hitboxes
    • Normal
    • Gameplay

      The Bug:

      TNT falls through fences and walls when ignited whilst on top of them.

      Steps to Reproduce:

      1. Build the setup as shown in the attachment below. setup.png
      2. Ignite both of the TNT blocks and watch them closely.
      3. Take note as to whether or not TNT falls through fences and walls when ignited whilst on top of them.

      Observed Behavior:

      TNT falls through fences and walls when ignited whilst on top of them.

      Expected Behavior:

      TNT would not fall through fences and walls when ignited whilst on top of them.

      Code Analysis:

      The following is based on names using yarn (20w06a).

      As said above, the TNT hops, but because of the fence being 1.5 blocks high, the TNT hops into the fence's hitbox and as result falls through. The "hop" has a motionY (vertical motion) of 0.20000000298023224 in the net.minecraft.entity.TntEntity.TntEntity initial method. This vertical motion is not enough to get on top of the fence/wall's hitbox. A suggested value would be; 0.22649273522D. Changing this initial value has very little impact to no impact (from 6 pixel high jump to 8 pixels jump, roughly).

      As mentioned above already; change the initial motion (setVelocity) to: 0.22649273522.

      this.setVelocity(-Math.sin(double10) * 0.02, 0.22649273522, -Math.cos(double10) * 0.02);
      

        1. screenshot-1.jpg
          screenshot-1.jpg
          181 kB
        2. screenshot-2.jpg
          screenshot-2.jpg
          172 kB
        3. screenshot-3.jpg
          screenshot-3.jpg
          171 kB
        4. MC-12730.mp4
          3.27 MB
        5. setup.png
          setup.png
          569 kB

            Unassigned Unassigned
            Avoma [Mod] Avoma
            Votes:
            26 Vote for this issue
            Watchers:
            19 Start watching this issue

              Created:
              Updated:
              CHK: