Started by
ArmymanKH
on
Topic category: Help with Minecraft modding (Java Edition)
Hello! I've recently started creating a mod that is based on Hypixel's UHC game mode and I've been trying to create armor (and will eventually work on tools) that come pre-enchanted (for example the Apprentice Helmet that upon enchanting gains Protection 1, Fire Protection 1, etc.) but I'm an absolute noob when it comes to coding and I have no idea how to accomplish this so if someone could please help me figure out what code to write and how to get it to work properly that would be greatly appreciated.
There's a procedure block that can test for certain enchantments on the given item (in your case, your custom armor). You might e able to use that to test if the armor is enchanted or not. If not, then you can use another procedure block to enchant the provided item with the desired enchantments. Both the procedures are in the items tab. I haven't tested this so it might not work but it's worth a shot, I suppose.
Thank you so much for pointing me to the procedures, it was as simple as just getting a single procedure block put in and it was as simple as that, thank you very much for your help.
No problem! Glad to help.