mojira.dev
MC-12730

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

The Bug:

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

Steps to Reproduce:

  1. Place down a fence or a wall, and the place some TNT on top of it.

  2. Ignite the TNT and watch it closely.

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);

Linked issues

Attachments

Comments 51

Confirmed.

Fixed in 1.8

Confirmed fixed.

Back in 15w47c

Confirmed for 1.13 & 18w30b.

41 more comments

Can confirm in 1.17 Release Candidate 2.

Can confirm in 1.17.1.

I'd like to request ownership of this ticket since the current reporter has been inactive for over a year. I'm willing to keep this ticket updated and will continue to provide all of the necessary details.

@@unknown, completed.

Thanks very much @unknown. 🙂

John L

Avoma

(Unassigned)

Confirmed

Gameplay

Normal

Collision, Entities, Hitboxes

fence, tnt, wall

Minecraft 1.5.1, Snapshot 13w21b, Snapshot 13w22a, Minecraft 15w47c, Minecraft 1.10.2, ..., 1.21.4, 25w08a, 1.21.5, 1.21.6, 1.21.7

Minecraft 14w25b

Retrieved