How to make an Enchantment that decreases Durability over Time?

Started by UndernityGaming on Sun, 09/27/2020 - 21:05

Topic category: Help with modding (Java Edition)

Last seen on 15:42, 8. Oct 2020
Joined Sep 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to make an Enchantment that decreases Durability over Time?
Sun, 09/27/2020 - 21:05

So, i wanted to ask how i Decrease Durability on an tool/armor piece with an enchantment (Curse).

I tried to do it On World Tick Update and on Player Tick Update, but it shows that im missing Itemstack as a Dependencie,

So is there any other way to do that?

Last seen on 20:24, 19. Oct 2020
Joined Nov 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
i'm going to make an essay…
Thu, 10/01/2020 - 23:45

i'm going to make an essay so I hope you know how mcreator works or this is will be gibberish, make a procedure that checks player tick, make an if statement saying if item in main hand is a sword, add in it another if statement asking if the item has the curse if it does, which can be done by getting the enchantment level = lets say 1, make a NBT counter in the if statement, (set NBT cursed to get NBT cursed +1) after that create another if statement under it (get NBT cursed = 40 /2 seconds) deal 1 damage, and then create another set NBT cursed to 0, then it loops dealing damage when ever its in your hands for 2 seconds, Hope this essay helped