Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-177866

Custom items can't be used in commands if their menu category is "none"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.21.60.21 Preview, 1.21.40.22 Preview, 1.21.40.21 Preview, 1.21.40.20 Preview, 1.21.20.23 Preview, 1.21.20.22 Preview, 1.21.20.21 Preview, 1.21.0.21 Preview, 1.21.0.20 Preview, 1.20.80.24 Preview, 1.20.60.23 Preview, 1.20.51 Hotfix, 1.20.70, 1.20.71 Hotfix, 1.20.80.22 Preview, 1.20.72 Hotfix, 1.20.73 Hotfix, 1.21.10.22 Preview, 1.20.81 Hotfix, 1.21.30.22 Preview, 1.21.30.21 Preview, 1.21.3 Hotfix (PS4), 1.21.2 Hotfix, 1.21.22 Hotfix, 1.21.23 Hotfix, 1.21.30, 1.21.40.23 Preview, 1.21.50.28 Preview, 1.21.44 Hotfix
    • None
    • Confirmed
    • Multiple
    • 1161304

      When hiding a custom item from the creative inventory and recipe book with the following code, the item is unusable in commands. This does not happen to custom blocks with the same configuration.

      {
        "format_version": "1.21.10",
        "minecraft:item": {
          "description": {
            "identifier": "example:item",
            "menu_category": {
              "category": "none"
            }
          }
        }
      }
      

      NOTE: This bug also overrides setting "is_hidden_in_commands" to false, making it impossible to have a custom item that isn't in the creative inventory but still valid in commands.

      Steps to reproduce:

      • Apply the provided behaviour pack to a world (no experiments required)
      • Try to use the "example:item" and "example:block" in commands e.g. /give

      Observed results:

      • As expected, the custom "example:block" block works with commands and appears in autocompletions
      • The custom "example:item" item does not appear in command autocompletions and results in an error when the command is executed

      Expected results:

      • Both the custom item and the custom block are absent from the creative inventory and recipe book (already working correctly for both).
      • Both the custom item and the custom block can be used within commands, unless their "is_hidden_in_commands" property in "menu_category" is set to true (only working for custom blocks).

            QuazChick QuazChick
            Votes:
            16 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              CHK: