Mojira Archive
MCPE-177866

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

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).