[MC-7896] Exploding tnt minecarts drop minecart and tnt Created: 19/Jan/13  Updated: 26/Jun/17  Resolved: 26/Jun/17

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Snapshot 13w03a, Snapshot 13w04a, Snapshot 13w05b, Minecraft 1.5, Snapshot 13w11a, Minecraft 1.5.1, Minecraft 1.6.2, Minecraft 1.6.4, Minecraft 13w37b, Minecraft 13w42b, Minecraft 13w43a, Minecraft 1.7.1, Minecraft 1.7.2, Minecraft 1.7.4, Minecraft 14w05b, Minecraft 1.10.2, Minecraft 1.11.2, Minecraft 17w17b
Fix Version/s: Minecraft 14w06b, Minecraft 1.12

Type: Bug
Reporter: Quentin Rol Assignee: Unassigned
Resolution: Fixed Votes: 5
Labels: TNT, drop, explode, fire, minecart, redstone, tnt-minecart

Attachments: PNG File 2013-01-19_13.54.57.png     PNG File 2013-01-19_13.55.11.png     PNG File 2013-07-30_10.38.06.png     PNG File 2013-07-30_10.38.17.png    
Issue Links:
Duplicate
is duplicated by MC-8460 TNT Minecart in Lava False Explosion Resolved
is duplicated by MC-9244 Minecart with TNT drops minecart and ... Resolved
is duplicated by MC-9792 If a TNT cart blows up another one, t... Resolved
is duplicated by MC-10771 minecarts still dropping in 13w09c in... Resolved
is duplicated by MC-13267 Minecart with TNT Resolved
is duplicated by MC-15264 TNT doesn't go away after blowing up Resolved
is duplicated by MC-17131 TNT carts sometimes drop their loot w... Resolved
is duplicated by MC-27498 TNT Minecart explodes and drops addit... Resolved
is duplicated by MC-28190 TNT remained after blow up with tnt m... Resolved
is duplicated by MC-37934 Minecart with TNT and fire Resolved
Relates
relates to MC-59517 TNT explode=true blockstate drops TNT... Resolved
CHK:
Confirmation Status: Confirmed

 Description   

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.



 Comments   
Comment by user-f2760 (Inactive) [ 13/Oct/16 ]

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

Comment by [Mod] Michael Wobst [ 13/Oct/16 ]

Cannot reproduce in 16w41a. Can someone else confirm?

Comment by user-f2760 (Inactive) [ 22/Aug/16 ]

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

Comment by [Mod] Pokechu22 [ 19/Aug/16 ]

Relates to MC-59517.

Comment by user-f2760 (Inactive) [ 01/Aug/16 ]

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

Comment by Marcono1234 [ 01/Aug/16 ]

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.

Comment by Fabian Röling [ 01/Aug/16 ]

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.

Comment by user-f2760 (Inactive) [ 01/Aug/16 ]

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

Comment by Marcono1234 [ 01/Aug/16 ]

FaRoGaming please see the discussion jirauser71590 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.

Comment by Fabian Röling [ 31/Jul/16 ]

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?

Comment by Marcono1234 [ 31/Jul/16 ]

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

Comment by Fabian Röling [ 31/Jul/16 ]

Can't confirm for 1.10.2.

Comment by Marcono1234 [ 18/Jul/16 ]

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.

Comment by user-f2760 (Inactive) [ 18/Jul/16 ]

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

Comment by Marcono1234 [ 18/Jul/16 ]

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

Comment by Marcono1234 [ 17/Jul/16 ]

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);
    }
}
Comment by Talven81 [ 25/Feb/14 ]

Duplication no longer exists in 1.8.

Comment by Fluffyman24 [ 16/Sep/13 ]

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

Comment by Kumasasa [ 30/Jul/13 ]

Confirmed for creative and survival.

Comment by Dennis [ 30/Jul/13 ]

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.

Comment by Quentin Rol [ 13/Mar/13 ]

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

Comment by Jae Yoon Kim [ 02/Feb/13 ]

Confirmed

Comment by Dean Baset [ 19/Jan/13 ]

Confirmed

Generated at Sun Jan 12 12:16:00 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.