-
Bug
-
Resolution: Unresolved
-
None
-
Minecraft 15w50a, Minecraft 16w42a, Minecraft 1.11.2, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 18w06a, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 19w05a, Minecraft 19w06a, Minecraft 19w07a, 1.14.4, 19w34a, 1.15 Pre-release 3, 1.15.2, 20w20b, 1.16 Pre-release 2, 1.16 Release Candidate 1, 1.16, 20w27a, 1.16.2 Pre-release 1, 1.16.2 Pre-release 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, 20w45a, 20w46a, 20w48a, 20w49a, 20w51a, 21w03a, 1.16.5, 21w05a, 21w05b, 21w06a, 21w07a, 21w08b, 21w14a, 21w15a, 21w16a, 21w17a, 21w18a, 21w19a, 21w20a, 1.17 Pre-release 1, 1.17 Pre-release 4, 1.17, 1.17.1 Pre-release 1, 1.17.1, 21w37a, 21w38a, 21w39a, 21w40a, 21w41a, 21w42a, 21w43a, 1.18 Pre-release 7, 1.18, 1.18.1, 1.18.2, 22w15a, 1.19, 1.19.2, 22w44a, 1.19.3, 23w03a, 23w04a, 23w05a, 23w06a, 23w07a, 1.19.4 Pre-release 3, 1.19.4, 23w13a, 23w14a, 1.20 Pre-release 1, 1.20 Pre-release 2, 1.20 Pre-release 4, 1.20.1, 23w31a, 23w32a, 23w33a, 23w35a, 1.20.2 Pre-release 1, 1.20.2 Pre-release 2, 1.20.2, 23w40a, 23w41a, 23w42a, 23w44a, 1.20.4, 24w03b, 24w04a, 24w05a, 24w11a, 24w12a, 1.20.6, 1.21, 1.21.3
-
Confirmed
-
Creative
-
Minecart, Player
-
Low
-
Platform
The bug
When you middle click a spawner_minecart you will get a minecart item. I am not talking about the fact that you do not get a minecart spawner item (that is MC-17653), but rather that you get a plain minecart. I would expect like it is for other blocks or entities that have no item to get nothing at all.
The reason
The reason for this is that in the net.minecraft.client.Minecraft.middleClickMouse() method of the net.minecraft.client.Minecraft class (MCP 1.8 names) it defaults to a normal Minecart in case no item for the corresponding Minecart type exists:
//... else if (this.objectMouseOver.entityHit instanceof EntityMinecart) { EntityMinecart var12 = (EntityMinecart)this.objectMouseOver.entityHit; switch (Minecraft.SwitchEnumMinecartType.field_178901_b[var12.func_180456_s().ordinal()]) { case 1: var2 = Items.furnace_minecart; break; case 2: var2 = Items.chest_minecart; break; case 3: var2 = Items.tnt_minecart; break; case 4: var2 = Items.hopper_minecart; break; case 5: var2 = Items.command_block_minecart; break; default: var2 = Items.minecart; } } //...
However having a method for each entity that returns the item would be probably better.
How to reproduce
- Middle click a spawner_minecart