-
Bug
-
Resolution: Cannot Reproduce
-
None
-
Minecraft 1.7.4, Minecraft 1.9 Pre-Release 2, Minecraft 16w43a, Minecraft 1.11.2, Minecraft 17w15a, Minecraft 17w17b, Minecraft 1.12 Pre-Release 2, Minecraft 1.12 Pre-Release 5, Minecraft 1.12 Pre-Release 6, Minecraft 1.12 Pre-Release 7, Minecraft 1.12, Minecraft 17w31a, Minecraft 1.12.1 Pre-Release 1, Minecraft 1.12.1, Minecraft 1.12.2 Pre-Release 1, Minecraft 1.12.2 Pre-Release 2, Minecraft 1.12.2, Minecraft 17w43a, Minecraft 17w43b, Minecraft 17w45a, Minecraft 17w48a, Minecraft 17w50a, Minecraft 18w01a, Minecraft 1.13-pre1, Minecraft 1.13-pre3, Minecraft 1.13-pre6, Minecraft 1.13-pre10, Minecraft 1.13, Minecraft 18w30b, Minecraft 18w31a, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 18w43b, Minecraft 18w43c, Minecraft 18w44a, Minecraft 18w45a, 1.14.4, 1.15 Pre-release 6, 1.16 Pre-release 7, 1.16.1, 20w27a, 20w28a, 20w29a, 20w30a, 1.16.2 Pre-release 1, 1.16.2 Pre-release 2, 1.16.2 Pre-release 3, 1.16.2 Release Candidate 1, 1.16.2 Release Candidate 2, 1.16.2, 1.16.3 Release Candidate 1, 1.16.3, 1.16.4 Pre-release 1, 1.16.4 Pre-release 2, 1.16.4 Release Candidate 1, 1.16.4, 20w45a, 20w46a, 20w48a, 20w49a, 20w51a, 21w03a, 21w05b, 21w06a, 21w07a, 21w08b, 21w10a, 21w11a, 21w13a, 21w14a, 1.17 Pre-release 1, 1.17, 1.17.1, 21w39a, 1.18 Pre-release 5, 22w06a, 22w14a, 1.19.2, 1.19.4, 1.20.2 Pre-release 2
-
Confirmed
-
Creative
-
Minecart
-
Low
-
Platform
How to reproduce
- Place a minecart with command block
- Leave and reopen the world
- Destroy it in creative mode using your hand, a sword / tool or an arrow
→ The minecart with command block drops a (regular) minecart (item) named "@", whereas an empty / normal minecart would’ve dropped nothing after these steps. Also if you don’t leave and reopen the world first, the minecart with command blocks drops nothing either.
Code analysis
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.
The reason why this happens is that the public void writeDataToNBT(NBTTagCompound p_145758_1_) method of the net.minecraft.command.server.CommandBlockLogic class always saves the CustomName in the NBT data. As this only happens when you unload the minecart or reopen the world a MinecartCommandBlock that is summoned and directly destroyed does not cause this. Instead the method should only save the CustomName if it is not "@".
/** * Stores data to NBT format. */ public void writeDataToNBT(NBTTagCompound p_145758_1_) { p_145758_1_.setString("Command", this.commandStored); p_145758_1_.setInteger("SuccessCount", this.successCount); // Replaced this //p_145758_1_.setString("CustomName", this.customName); if (!this.customName.equals("@")) { p_145758_1_.setString("CustomName", this.customName); } p_145758_1_.setBoolean("TrackOutput", this.trackOutput); if (this.lastOutput != null && this.trackOutput) { p_145758_1_.setString("LastOutput", IChatComponent.Serializer.componentToJson(this.lastOutput)); } this.field_175575_g.func_179670_b(p_145758_1_); }
- is duplicated by
-
MC-33178 Minecarts are named "@" after breaking Minecart with Command Blocks.
- Resolved
-
MC-48862 Break a commandblock minecart give you a minecart named "@"
- Resolved
-
MC-56132 CommandBlockMinecarts when renamed act weirdly
- Resolved
-
MC-190172 Item named @
- Resolved
-
MC-193667 Command Block Minecart drops a minecart named "@" if it is spawned using a spawn egg and broken in Creative Mode
- Resolved
- relates to
-
MC-32701 Command block minecarts lose their name after re-log
- Open
-
MC-10366 Renamed minecarts still drop a minecart item in creative mode
- Resolved
-
MC-159661 Honey bottle is not dropped in creative mode after emptying a hive if the player's inventory is full
- Open
- testing discovered
-
MC-124998 Command block minecarts disappear upon reloading the world
- Resolved