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

Using /give command with high data values gives you air

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Works As Intended
    • Minecraft 16w44a, Minecraft 1.11
    • None
    • Confirmed

    Description

      Relates to:

      The bug

      When you give yourself an item (not air) with a data value higher than 2^16-1 = 65535 you get air instead. I would expect the command to fail instead.

      Note: 2^16 is the number of values a short can have. But as the Damage tag is a signed short, this value does not make any sense in this context.

      How to reproduce

      Example command
      /give @p dirt 1 65536
      

      Code analysis

      Based on 1.11 decompiled using MCP 9.35 rc1

      Method net.minecraft.item.ItemStack.func_190926_b()

      Attachments

        Activity

          People

            grum [Mojang] Grum (Erik Broes)
            marcono1234 [Mod] Marcono1234
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              CHK: