Started by
Seshua
on
Topic category: Help with Minecraft modding (Java Edition)
Okay so I made a pickaxe enchantment and in the options for it I've selected all the pickaxe enchantments that I want it to be able to have together except for silk touch, I don't want it to be able to be used with silk touch, But I do want it to be able to be used with enchantments from other mods. With these settings that isn't the case, it will only accept the enchantments that I have selected in my enchantment. Does anyone know a solution for this?
Mcreator unfortunately only allows for a Whitelist regarding enchantments, meaning only enchantments on the "list" are compatible with each other. What would be considerably more useful would be a Blacklist function. Thankfully it only requires a minor code edit to make this work.
Start off by listing all of the enchantments you DON'T want compatible with your new enchantment. Include your new enchantment in this list. Save.
Open your enchantment with the code editor and you will find something like this:
For each enchantment listed change "return true" to "return false".
At the bottom, change "return false" to "return true"
Save and Lock.
This reverses the Whitelist functionality into a Blacklist. In the above example, my new weapon enchantment is compatible with all other enchantments except the ones listed.
Thankyou so much Valirane! Absolute Hero!
It was kinda devasting when I loaded my mod up with Cyclic just to find out I couldn't combine enchantments xD
Does this still work for the new versions of Mcreator? The code is kinda different from the one you showed