Enchantment requiring xp and items to upgrade

Started by Kyushu on

Topic category: Advanced modding

Last seen on 08:44, 23. Jun 2021
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Enchantment requiring xp and items to upgrade

Hi, i created a procedure triggered by passing an xp level, and then, it test if you have THAT sword (only a special one i created), and if you have 2 ghast tears in your inventory.

After that it should do this ;

if you have THAT sword in your principal hand, add an infinite strenght effect

else, just remove the xp level gained and the two ghast tears (it's the price) and then upgrade the enchantment to the next level on your sword.

 

Seems perfect right ? But no. It won't work, i think it's because the trigger don't set any itemstack , so i had to define this by using something who tells that it is only on THAT sword, and who works only if it's already enchanted with this enchantment.

I hope you guys could help me