Increase the value of specific enchantment

Started by Pantastic on

Topic category: Help with modding (Java Edition)

Last seen on 20:44, 11. Feb 2023
Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Increase the value of specific enchantment
Thu, 01/05/2023 - 22:27 (edited)

I'm working on a mod that adds the ability to increase the level of enchantments, and I've got it to work but I have to have a block of procedures for every increase in level for each enchantment i.e checking enchantment level of 5, removing enchantment, then setting enchantment to 6

https://imgur.com/a/KxwGhf6

 

I also tried using NBT values but it didn't work

https://imgur.com/iQWF4Np

 

Does anyone know an easier way with procedures or the proper code to increase the value of a specific enchantment on an item

Edited by Pantastic on Thu, 01/05/2023 - 22:27