Started by
MamaLuigi
on
Topic category: Help with modding (Java Edition)
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!
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
Are you sure there isn't a way to make the tool only enchantable by the enchantment?
Yes, there is no feature to choose the specific enchantments a tool can have, I think that the only way could be custom code
Do you know what code I'd be able to use?
no, I'm sorry