The bug
Exploding tnt minecarts drop a minecart and can drop a tnt item if they were ignited by fire. Normally the explosion then destroys the items, but there should not be a reason for the minecart to drop anything in the first place. Additionally MC-116669 can be used to prevent the explosion from destroying the items.
How to reproduce
Use the steps provided in MC-116669 and then enter the world again after the crash.
→ All exploded minecarts dropped an item
Code analysis
Based on 1.11.2 decompiled using MCP 9.35 rc1
The method net.minecraft.entity.item.EntityMinecartTNT.killMinecart(DamageSource)
calls the parent method and drops the tnt item regardless of whether or not the minecart exploded.
Important: If this is changed so that the parent method is not called all the time this method should first mark the entity as dead, otherwise MC-116669 could cause two exploding tnt minecarts to explode each other infinitely and multiple times.
Related issues
is duplicated by
Attachments
Comments


Confirmed

Confirmed

I just tried it and it still happens in version 1.5.

Apparently this isn't limited to just creative mode and exists in 1.6.2... Just watched Etholabs Mindcrack episode 106 youtube video and he just discovered it for himself in survival. Roughly 5 mins into the video.

Confirmed for creative and survival.

Still happens in the latest snapshots, how has this been in the game for so long..

Duplication no longer exists in 1.8.

Confirmed for
1.10 using MCP
In vanilla Minecraft it is impossible to notice because the item is immediately killed by the explosion
net.minecraft.entity.item.EntityMinecartTNT.killMinecart(DamageSource) (MCP 9.30)
public void killMinecart(DamageSource source)
{
super.killMinecart(source);
double d0 = this.motionX * this.motionX + this.motionZ * this.motionZ;
if (!source.isExplosion() && this.worldObj.getGameRules().getBoolean("doEntityDrops"))
{
this.entityDropItem(new ItemStack(Blocks.TNT, 1), 0.0F);
}
if (source.isFireDamage() || source.isExplosion() || d0 >= 0.009999999776482582D)
{
this.explodeCart(d0);
}
}

Thank you for adding the affected version, can a mod please reopen this report?

But if it doesn't happen in vanilla minecraft, why is it an issue?

It happens very likely in vanilla, but the item is killed by the explosion. I just don't see any reason why it should explode and drop an item even if the item cannot be picked up.

Can't confirm for 1.10.2.

Like I said you cannot confirm it in vanilla Minecraft because the item is killed by the explosion. Please add that to the description.

Well, you could set a repeating command block to make every item invulnerable. (I'll try that tomorrow.) If that doesn't work either, this bug is irrelevant. Or can the item be seen in another way in vanilla?

@unknown please see the discussion @unknown and I had. The command block will be very likely unable to find the item because the explosion destroys it instantaneously, but there is no reason why the item should spawn at all.

Please test if this issue can actually be seen in vanilla, if not the bug is irrelevant, and thus invalid.

I repeated the test multiple hundred times with the repeating block and got no drops at all. Unable to reproduce in 1.10.2 Vanilla.

I thought we had this discussion already...
I just don't see any reason why it should explode and drop an item even if the item cannot be picked up.
The command block will be very likely unable to find the item because the explosion destroys it instantaneously, but there is no reason why the item should spawn at all.

It has no effect on the vanilla game, as such this bug is irrelevant.

Relates to MC-59517.

Reopened, on request, not that it's vanilla affecting, but could still be fixed.

Cannot reproduce in 16w41a. Can someone else confirm?

The item is instantly destroyed, this can only be checked by looking at the code.