The bug
Minecarts with TNT, when activated, don't seem to push/launch a player when activated with an activator rail.
How to reproduce
Place two rails (one of them must be a powered activator rail)
Place a Minecart with TNT and push it towards the activator rail
Stand next to the flickering Minecart with TNT (in survival) and let it explode
→ ❌ You will take almost no knockback/won't be launched
Code analysis
Code analysis by @unknown can be found in this comment.
Attachments
Comments 16
Either I am doing something completely wrong, or MinecartTNTs don't launch the player at all in 15w36d
Confirmed for 1.10.2 for Survival mode
The explosion of a TNT minecart activated on an activator rail does not push back the player.
Please link to this comment in the description
The following is based on a decompiled version of Minecraft 1.10 using MCP 9.30.
The reason for this is very likely that the explosion is created inside the rail and therefor the method net.minecraft.world.World.getBlockDensity(Vec3d, AxisAlignedBB)
returns 0f
. Having the method net.minecraft.entity.item.EntityMinecartTNT.explodeCart(double)
create the explosion at the middle of the minecart (y + height / 2) solves this problem.
Note: PrimedTnt offsets its y coordinate by its height / 16. This won't work for the TNT minecart and is kind of strange because you would expect the explosion to start from the middle.
Confirmed.