Pre-Enchanted Armor upon getting in Creative and Crafting in Survival

Started by ArmymanKH on Tue, 10/15/2019 - 23:40

Topic category: Help with MCreator modding

Last seen on 16:10, 26. Oct 2019
Joined Dec 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Pre-Enchanted Armor upon getting in Creative and Crafting in Survival
Tue, 10/15/2019 - 23:40

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.

Last seen on 23:26, 9. Nov 2019
Joined May 2014
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
There's a procedure block…
Wed, 11/06/2019 - 21:53

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.