[MC-10366] Renamed minecarts still drop a minecart item in creative mode Created: 26/Feb/13  Updated: 07/Feb/24  Resolved: 03/Nov/20

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Snapshot 13w09a, Snapshot 13w10b, Minecraft 1.5, Minecraft 1.5.1, Minecraft 1.5.2, Snapshot 13w18c, Snapshot 13w19a, Minecraft 13w39a, Minecraft 13w39b, Minecraft 14w20b, Minecraft 14w21a, Minecraft 14w21b, Minecraft 1.8, Minecraft 1.8.1-pre3, Minecraft 1.8.8, Minecraft 15w32c, Minecraft 15w35b, Minecraft 15w35c, Minecraft 15w39c, Minecraft 15w40b, Minecraft 15w41b, Minecraft 15w42a, Minecraft 15w43b, Minecraft 15w43c, Minecraft 15w44a, Minecraft 15w44b, Minecraft 15w45a, Minecraft 15w47a, Minecraft 15w47c, Minecraft 15w51b, Minecraft 16w05b, Minecraft 16w06a, Minecraft 1.9 Pre-Release 1, Minecraft 1.9 Pre-Release 2, Minecraft 1.10.2, Minecraft 16w32b, Minecraft 16w42a, Minecraft 16w43a, Minecraft 16w44a, Minecraft 1.11 Pre-Release 1, Minecraft 1.11, Minecraft 16w50a, Minecraft 1.11.1, Minecraft 1.11.2, Minecraft 17w06a, Minecraft 17w13b, Minecraft 17w15a, Minecraft 17w16b, Minecraft 17w17a, Minecraft 17w17b, Minecraft 17w18b, Minecraft 1.12 Pre-Release 2, Minecraft 1.12 Pre-Release 6, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 18w02a, Minecraft 1.13-pre5, Minecraft 1.13, Minecraft 18w31a, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 18w47a, Minecraft 18w47b, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, Minecraft 18w50a, Minecraft 19w02a, Minecraft 19w03a, Minecraft 19w03b, Minecraft 19w04a, Minecraft 19w05a, Minecraft 19w06a, Minecraft 19w07a, Minecraft 19w08a, Minecraft 19w08b, Minecraft 19w11a, Minecraft 19w12a, Minecraft 19w12b, Minecraft 19w13a, Minecraft 19w13b, Minecraft 19w14a, Minecraft 19w14b, Minecraft 1.14 Pre-Release 2, Minecraft 1.14 Pre-Release 4, Minecraft 1.14 Pre-Release 5, Minecraft 1.14.2 Pre-Release 1, Minecraft 1.14.2 Pre-Release 2, Minecraft 1.14.2 Pre-Release 3, Minecraft 1.14.3 Pre-Release 1, Minecraft 1.14.3 Pre-Release 3, Minecraft 1.14.3 Pre-Release 4, Minecraft 1.14.4 Pre-Release 4, 19w34a, 19w35a, 19w36a, 19w37a, 19w38b, 19w39a, 19w40a, 19w41a, 19w42a, 19w44a, 19w45a, 19w46a, 1.15 Pre-release 1, 1.15 Pre-Release 2, 1.15 Pre-release 3, 1.15 Pre-release 4, 1.15 Pre-release 6, 1.15 Pre-release 7, 1.15.1 Pre-release 1, 1.15.2 Pre-Release 1, 1.15.2 Pre-release 2, 20w06a, 20w07a, 20w08a, 20w09a, 20w10a, 20w11a, 20w12a, 20w21a, 1.16 Pre-release 2, 1.16 Pre-release 3, 1.16 Pre-release 5, 1.16 Pre-release 6, 1.16 Pre-release 7, 20w28a, 20w29a, 20w30a, 1.16.2 Pre-release 1, 1.16.2 Pre-release 3, 1.16.2, 1.16.3 Release Candidate 1, 1.16.3
Fix Version/s: None

Type: Bug
Reporter: Connor Steppie Assignee: Unassigned
Resolution: Works As Intended Votes: 21
Labels: CustomName, item-renaming

Attachments: PNG File Normally.png     PNG File RenamedMinecartDropping.png    
Issue Links:
Duplicate
is duplicated by MC-11305 Named items bugs Resolved
is duplicated by MC-11891 Named Carts drop in creative mode Resolved
is duplicated by MC-33312 Breaking a renamed command block mine... Resolved
is duplicated by MC-56132 CommandBlockMinecarts when renamed ac... Resolved
is duplicated by MC-85533 Named minecarts drops as an item when... Resolved
is duplicated by MC-87270 Minecart with command block will some... Resolved
is duplicated by MC-96820 Renamed minecarts give items when I b... Resolved
is duplicated by MC-196084 Trolley bug Resolved
Relates
relates to MC-41893 Breaking a minecart with command bloc... Resolved
CHK:
Confirmation Status: Confirmed
Game Mode: Creative
Category:
Minecart

 Description   

The bug

Renamed minecarts still drop a minecart item in creative mode. Expected behavior would be not to drop a minecart.

How to reproduce

  1. Rename a minecart
  2. Punch it
    It still drops its item on creative

Code analysis

Code analysis by marcono1234 can be found in this comment.



 Comments   
Comment by pulpetti [ 07/Aug/20 ]

In 1.16.2 Pre-3

Comment by Желязко Юрий Алеексевич [ 25/Jul/20 ]

I have the same =)

Comment by [Mod] Asteraoth [ 12/Dec/18 ]

Changed the reporter to Awesoman3000.

Comment by Connor Steppie [ 12/Dec/18 ]

Affects 18w50a

Comment by Connor Steppie [ 05/Dec/18 ]

Affects 18w49a

Comment by Connor Steppie [ 30/Nov/18 ]

Affects 18w48b, can I request ownership of the ticket?

Comment by Connor Steppie [ 29/Nov/18 ]

Affects 18w48a

Comment by Connor Steppie [ 25/Nov/18 ]

Affects 18w47b

Comment by Kraif [ 31/Aug/18 ]

Confirmed for 1.13.1.

Comment by Steven W.d.V. [ 29/Jun/18 ]

Confirmed for 1.13-pre5

Comment by user33 [ 27/Apr/17 ]

Confirmed for 17w17a

Comment by Steven W.d.V. [ 18/Feb/16 ]

Confirmed for 1.9-pre2

Comment by Marcono1234 [ 17/Feb/16 ]

Please link to this comment in the description

The following is based on decompiled version of Minecraft 1.8 using MCP. All method and class names are the names used in the decompiled version.

This behaviour could be changed by modifying the public boolean attackEntityFrom(DamageSource source, float amount) method of the net.minecraft.entity.item.EntityMinecart class. However as this is done on purpose this bug might be "Works as Intended".

/**
* Called when the entity is attacked.
*/
public boolean attackEntityFrom(DamageSource source, float amount)
{
if (!this.worldObj.isRemote && !this.isDead)
{
    if (this.func_180431_b(source))
    {
        return false;
    }
    else
    {
        this.setRollingDirection(-this.getRollingDirection());
        this.setRollingAmplitude(10);
        this.setBeenAttacked();
        this.setDamage(this.getDamage() + amount * 10.0F);
        boolean var3 = source.getEntity() instanceof EntityPlayer && ((EntityPlayer)source.getEntity()).capabilities.isCreativeMode;

        if (var3 || this.getDamage() > 40.0F)
        {
            if (this.riddenByEntity != null)
            {
                this.riddenByEntity.mountEntity((Entity)null);
            }
            
            // Changed this
            //if (var3 && !this.hasCustomName())
            if (var3)
            {
                this.setDead();
            }
            else
            {
                this.killMinecart(source);
            }
        }

        return true;
    }
}
else
{
    return true;
}
Comment by Immaterialise [ 17/Feb/16 ]

Confirmed for 1.9-pre1

Comment by Steven W.d.V. [ 05/Feb/16 ]

Confirmed for 16w05b

Comment by Steven W.d.V. [ 20/Dec/15 ]

Confirmed for 15w51b

Comment by Steven W.d.V. [ 18/Nov/15 ]

Confirmed for 15w47a and 15w47c

Comment by Steven W.d.V. [ 05/Nov/15 ]

Confirmed for 15w45a

Comment by Steven W.d.V. [ 28/Oct/15 ]

Confirmed for 15w44a and 15w44b

Comment by Steven W.d.V. [ 22/Oct/15 ]

Confirmed for 15w43b and 15w43c

Comment by Steven W.d.V. [ 14/Oct/15 ]

Confirmed for 15w42a

Comment by Steven W.d.V. [ 07/Oct/15 ]

Still present in 15w41b

Comment by Steven W.d.V. [ 30/Sep/15 ]

Confirmed in 15w40b

Comment by Steven W.d.V. [ 23/Sep/15 ]

Confirmed for 15w39c

Comment by [Mod] redstonehelper [ 28/Aug/15 ]

I resolved MC-41893 as a duplicate of this ticket since they're the same (command block minecarts are named minecarts too!).

Comment by Anon Ymus [ 28/Aug/15 ]

That's MC-41893.

Comment by PancakeMan77 [ 28/Aug/15 ]

Confirmed for 15w35c. I also want to note, that when done with a minecart command block, it will drop a minecart named "@".

Comment by [Mod] redstonehelper [ 26/Aug/15 ]

Done, thanks.

Comment by PancakeMan77 [ 26/Aug/15 ]

Can someone update the title to include creative? It's confusing otherwise. If you were in survival, it would make sense. I know that you are in creative, but it was initially confusing.

Comment by Marcono1234 [ 31/May/14 ]

Confirmed for 14w21b

Unnamed minecarts with command blocks don't drop something

Comment by Roadsguy [ 11/Mar/14 ]

I would think this is a good feature if the minecart keeps its name data when placed, and drops itself as a named item when you break it, but if not, then it's got to be a bug.

Comment by julian mazer [ 26/Feb/13 ]

This Happens To all minecarts

Comment by Kumasasa [ 26/Feb/13 ]

Confirmed.

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