The bug
When breaking a minecart (any type) in survival a renamed minecart item is created. In previous versions a renamed minecart was only dropped if the minecart was renamed before.
Additionally some minecart types have no translation and are displayed as: entity.
+ Entity type + .name
Full list:entity.MinecartRideable.name
entity.MinecartFurnace.name
entity.MinecartTNT.name
Minecart with Chest
Minecart with Hopper
How to reproduce
Place any type of minecart and break it in Survival mode.
The reason
The following is based on decompiled version of Minecraft 1.9 using MCP 9.24 beta. All method and class names are the names used in the decompiled version.
The reason why this happens is because in previous versions the class net.minecraft.entity.item.EntityMinecart
had an extra field for the custom name that would be used for dropping the item (this required a lot of methods to be overridden). In 1.9 minecarts do not have this extra field anymore. The problem is that the method net.minecraft.entity.item.EntityMinecart.killMinecart(DamageSource)
uses the method net.minecraft.entity.Entity.getName()
to test whether or not the minecart has a custom name. This method will always return a string because this method is used for displaying for example the entity name in the chat. Instead the method of the minecart should test if it has a custom name.
public void killMinecart(DamageSource source)
{
this.setDead();
if (this.worldObj.getGameRules().getBoolean("doEntityDrops"))
{
ItemStack itemstack = new ItemStack(Items.minecart, 1);
// Replaced this
//if (this.getName() != null)
//{
// itemstack.setStackDisplayName(this.getName());
//}
if (this.hasCustomName())
{
itemstack.setStackDisplayName(this.getCustomNameTag());
}
this.entityDropItem(itemstack, 0.0F);
}
}
Related issues
is duplicated by
Attachments
Comments


The dropped minecarts also have this titles and it also affects minecarts with TNT or furnace.

The bug that the items have this name as well is probably because the name is wrong.

Confirmed for 16w04a, also the display name is not checked by the game code. What matters is that the string pointed to by container.minecart is not displaying, Marcono1234.

That should be covered by the first point:
The GUI of a MinecartChest and MinecartHopper both shows
container.minecart
. This has a translation but is despite that not translated.
Confirmed for 16w07b
Furnace Minecarts experience a similar issue. Breaking them will drop a Minecart that's named entity.MinecartFurnace.name.
Confirmed for 1.9 Pre-Release 1

Still an issue in 1.9 Pre-Release 2

Can confirm in 1.9 pre-2 that my minecart chests aren't translated from container.minecart.
Confirmed for 1.9 Pre-Release 3
Confirmed for 1.9 Pre-Release 4
Please add furnace minecarts to the list.

As far as I know all Minecarts (except command block ones, see MC-41893) are affected and probably because of the same bug
Confirmed for 1.9.1 Pre-Release 1

The issue with the inventory of Minecart with Chest/Hopper is fixed in 1.9.1-pre2, the minecarts dropped still are "renamed", see description.

@unknown, you forgot to update the version

@unknown whoops, fixed
Confirmed for 1.9.1 Pre-Release 3
Confirmed for 1.9.1 and 1.9.2

Confirmed for 1.9.2
1) Minecarts in dungeons with a chest after broken, is called "Minecart with Chest".
2) While a minecart is crafted, it is called "Minecart".
3) When placed on a rails, and then broken, its called "entity.etc.etc.".
This is new behaviour i havnt seen ever, just after 1.9+.

1. Already listed as affected
2. Steps are already in the description
3. It started in 1.9 development, see affected versions list
Confirmed for 16w15a
Confirmed for 16w15b

This bug does have the consequence that, the next time the minecart is placed, you can no longer get a villager to ride in it. I haven't tested out other aspects of this bug yet, I only discovered it when trying to move villagers around, today.

@unknown it is very unlikely that this is caused by this bug. What you experience is probably MC-92165

Marcono1234, after reviewing that bug, I think you are right. Honestly, I hope they fix that issue before this one (unless they get fixed at the same time)
Confirmed for 1.9.3 Pre-Release 2
Confirmed for 1.9.3 Pre-Release 3

Confirm 1.9.4.
https://gyazo.com/43ed6564caf7202943b41b1bb87f3bf3
Confirmed for 16w20a
Still in 16w21a and 16w21b
Still in 1.10-pre1
Confirmed for 1.10-pre2
Confirmed for 1.10
Fixed as according to the description. Thanks!

I made a new bug report because this is still happening and it was marked as resolved...I can no longer vote for this because of the "resolution" though

Look at the fix version, it's fixed in a 1.11 snapshot, not 1.10.

Confirmed fixed as of 1.11 release.

This has happened to me just now. It said entity.MinecartRideable.name for me too.
@unknown Which Minecraft version did you use? This bug should be fixed as of 1.11 / 16w32a.

Is it on a server?