Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-94225

Pick block (middle mouse button) on spawner_minecart gives you minecart

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 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
    • Fix Version/s: None
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      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

      1. Middle click a spawner_minecart

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                marcono1234 [Mod] Marcono1234
              • Votes:
                6 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  CHK: