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

No translation for "Air" used in /replaceitem command feedback

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 1.13.1
    • Minecraft 1.9.2, Minecraft 16w14a, Minecraft 16w15a, Minecraft 16w15b, Minecraft 1.9.3 Pre-Release 1, Minecraft 1.9.3 Pre-Release 2, Minecraft 1.10.2, Minecraft 16w35a, Minecraft 16w36a, Minecraft 1.11.2, Minecraft 17w06a, Minecraft 17w47b
    • Confirmed

      The bug

      There is no translation for "Air" when used in the /replaceitem command. Using it in other commands like /give @p air will translate it correctly.

      How to reproduce

      1. Set the language to a non-English one
      2. Use the following command
        /replaceitem entity @p slot.armor.head minecraft:air
        

      Code analysis

      Based on 1.11.2 decompiled using MCP 9.35 rc1

      The method net.minecraft.command.CommandReplaceItem.execute(MinecraftServer, ICommandSender, String[]) uses the String "Air" if an item is empty. This method also tests after it could not get an item for the id if the id matches the air block id.
      Both special cases can probably be removed because some versions ago air became a valid item that's instantly removed.

            Unassigned Unassigned
            SavannaCrafter Albert Sturm
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: