mojira.dev
MC-298702

Items with only the "enchantable" component have options in the enchanting table that do nothing

Enchantable item component seems to make it so as long as enchant table has enough power, it will always show enchantment options as available, despite the options not having any enchantment associated.

Quick reproduction steps:

  1. Start single player or join a server

  2. Place an enchant table on the ground. Optionally surround it with bookshelves as normal

  3. /give yourself an item with no enchantments associated. `/give @p egg[enchantable={value:1}] 1`

  4. Place the egg in the enchantment table along with lapis (or in creative)

  5. Observe that you have options appearing as available despite no enchants being available for the item and clicking the options doesn’t do anything.

This *really* tripped me up when working with custom enchants, as if you do not have an enchant with low enough enchantment cost, all options will still display as available and cause quite a confusion.

I believe options that failed to pick an enchant within their power limit should be grayed out to not cause confusion, since nothing happens when you click the options without picked enchant.

Attachments

Comments 1

I checked this bug! And I can say with confidence that it really works.

image-20250616-173337.png

Paweł Michalewski

(Unassigned)

Confirmed

Platform

Low

Commands, Enchantments

1.21.5, 1.21.6 Pre-Release 4, 1.21.6 Release Candidate 1

Retrieved