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

TNT ignited on fence/wall falls through the fence/wall

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reopened
    • Resolution: Unresolved
    • Affects Version/s: 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
    • Fix Version/s: Minecraft 14w25b
    • Confirmation Status:
      Confirmed
    • Category:
      Collision, Entities, Hitboxes

      Description

      The bug

      When you place a TNT on top of a fence or wall and ignite the TNT, it will hop, but fall through the fence or wall because a fence/wall is 1.5 blocks high.

      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 fences 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 ontop of the fence/wall's hitbox. A suggested value would be; 0.22649273522D. Changing this inital value has very little impact to no-impact (from 6 pixel high jump to 8 pixels jump, roughly).

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

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

        Attachments

        1. screenshot-1.jpg
          181 kB
          John L
        2. screenshot-2.jpg
          172 kB
          John L
        3. screenshot-3.jpg
          171 kB
          John L

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              Oval Oval
              Votes:
              17 Vote for this issue
              Watchers:
              15 Start watching this issue

                Dates

                Created:
                Updated:
                CHK: