The Bug:
TNT falls through fences and walls when ignited while on top of them.
Steps to Reproduce:
Place down a fence or a wall, and the place some TNT on top of it.
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
is duplicated by 11
relates to 3
Attachments
Comments 51
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.
Confirmed.