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

Middle click / pick block on farmland gives dirt

XMLWordPrintable

    • Confirmed

      The bug

      When you middle click on farmland you get a dirt block despite the fact that farmland is an item as well.

      How to reproduce

      1. Furrow a dirt block and middle click it
        You will get a dirt block
      2. Use the following command
        /give @p farmland
        

        You will have a farmland block

      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 the net.minecraft.block.BlockFarmland.func_185473_a(World, BlockPos, IBlockState) method returns a dirt item stack.

      public ItemStack func_185473_a(World worldIn, BlockPos pos, IBlockState state)
      {
          // Replaced this
          //return new ItemStack(Blocks.dirt);
          return new ItemStack(Blocks.farmland);
      }
      

            FruBasilicum [Mojang] Agnes Larsson
            marcono1234 Marcono1234
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: