mojira.dev
MC-112188

Empty enchantment list not adding enchantment glint

The feature I'm about to start talking about has been long used by both mapmakers and server-side modders. It allowed people to add an empty list of enchants ("ench" tag) to the item's NBT tag so items would receive the enchanted glint even when having no enchants.
For some reason, this feature was removed in 1.11, ruining a lot of existing projects in both domains.
I'm aware that this was certainly an intended change, rather than a bug, however, this really adds nothing to the game and can't really be called a "bug-fix". It wasn't a bug at all, it was something useful for both map-makers and server-side modders.
You might say that that way of adding an enchantment glint is deprecated or was an unintended bug "fixed" in the 1.11 version, and suggest to use instead the HideFlags tag. However, this doesn't work for all the cases. One such case is described bellow (actual story of why I made this issue):
Player receives an item with a custom display name and lore, but no enchants. However, I want it to get the enchantment glint as the lore contains data parsed by my server-side mod in order to apply some effects to the holder, thus acting like some sort of "custom enchantment". However, I don't want to add a normal enchantment to it (even if irrelevant to that kind of item, for instance, a bow with sharpness) because players are actually supposed to further enchant the item with vanilla enchants, and applying the HideFlags tag will make them invisible, which is not a desired behavior.
Therefore, I really think reverting back to the old ante-1.10 behavior would help not only me, but also others in the same situations. Thanks!

Comments 6

If you know it's an intended change; why report it?

Use

ench:[{id:-1s,lvl:1s}]

instead.

Did you even try that? It won't add the glint at all. Besides, I have already tried adding invalid enchants or invalid levels.

Just marking an issue as "Works as intended" won't solve anything. Also, "Works as intended" is actually a lie. I'm rather sure the Mojang developers didn't just wake up one day and choose to remove a feature for the sake of annoying the community, and then saying "It's not a bug, it's a feature!".

Let's quote @unknown:

Please do not report issues related to NBT tags as bugs. If changing NBT via commands does not have the expected effect, that's always considered "working as intended".

(Also, this is not a discussion forum)

Thanks both of you for explaining, I didn't have the chance to test it on a vanilla server at the time of reporting, but I did that now and it seems to work actually. I'm using Spigot, so I think it has some sort of invalid enchant filter in place server-side to stop us from sending invalid enchants to the client. I don't know why though. Anyways, I'll report this issue to them then. Thanks anyways for your support and sorry for being so sour with you.

Vlad Ardelean

(Unassigned)

Unconfirmed

Minecraft 1.11.2

Retrieved