Item-specific Enchantment?

Started by MamaLuigi on

Topic category: Help with modding (Java Edition)

Last seen on 00:31, 28. Aug 2024
Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Item-specific Enchantment?

I'm making a mod that adds a new tool/weapon, and a new enchantment. I want to make it so the enchantment can only go on the tool, and the tool can only be enchanted with the enchantment.

For example, if I have an enchantment called Boost, and an item called Blaster, I want to make it so Boost can only go on the Blaster, and the blaster can only be enchanted with Boost.

I tried to get this working, but it just won't work.

Would it be possible to get this working for the book and in the table?

Any help would be greatly appreciated!

Last seen on 11:33, 7. Sep 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
To make an enchantment work…
Tue, 07/23/2024 - 21:09

To make an enchantment work on only a specific item you can simply put the item in the "can be applied to" list in the enchantment settings, but unfortunately I don't think there is a way to make the tool only enchantable by that enchantment, the only thing you could do is a procedure that removes every other enchantment from the tool

Last seen on 00:31, 28. Aug 2024
Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Are you sure there isn't a…
Tue, 07/23/2024 - 22:15

Are you sure there isn't a way to make the tool only enchantable by the enchantment?

Last seen on 11:33, 7. Sep 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yes, there is no feature to…
Tue, 07/23/2024 - 22:23

Yes, there is no feature to choose the specific enchantments a tool can have, I think that the only way could be custom code

Last seen on 00:31, 28. Aug 2024
Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Do you know what code I'd be…
Wed, 07/24/2024 - 02:01

Do you know what code I'd be able to use?

Last seen on 11:33, 7. Sep 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
no, I'm sorry
Wed, 07/24/2024 - 02:17

no, I'm sorry