Restricting enchantments to specific items in an anvil

Started by ItzYaBoiMyth on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Restricting enchantments to specific items in an anvil

Is there any way i can restrict what items an enchantment can apply to in an anvil? Ive made an enchant that i want strictly for the Elytra, but via an anvil it can be applied to anything in the game, including blocks.

Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The anvil always allows that…
Fri, 01/21/2022 - 21:48

The anvil always allows that, i think (specially in creative mode). To evade that i simply add the function of the enchant to the item that i want to use with, and then the rest are enchantable with that, but cannot be used. I think you can use also the "applicable to" section below in the enchantment element section.Hope it helps... maybe?