mojira.dev
MCPE-177866

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

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

    [media]
  • The custom "example:item" item does not appear in command autocompletions and results in an error when the command is executed

    [media]

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

Linked issues

Attachments

Comments 8

[media][media][media][media][media]

Thank you for your report!

However, this issue has been temporarily closed as Awaiting Response.

The attached MCPack does not appear to be functional - an error occurs when attempting to apply it to a world. Are you certain it has been packed correctly?

This ticket will automatically reopen when you reply.

Quick Links:
πŸ““ Issue Guidelines – πŸ’¬ Mojang Support – πŸ““ Project Summary – πŸ“§ Suggestions – πŸ“– Minecraft Wiki

The pack imports and applies to the world fine for me (1.20.51 stable/1.20.60.23 preview)

[media][media]

confirming in 1.20.60.26

@unknown This Preview is outdated, The Full release is will be coming soon.

I also get this bug

1 year later still not fixed

1 year later still not fixed

QuazChick

(Unassigned)

1161304

Confirmed

Multiple

1.21.100.24 Preview, 1.21.100.22 Preview, 1.21.92 Hotfix, 1.21.100.21 Preview, 1.21.100.20 Preview, ..., 1.21.81 Hotfix, 1.21.110.22 Preview, 1.21.94 Hotfix, 1.21.110.23 Preview, 1.21.100

Retrieved