How to make an Enchantment that decreases Durability over Time?

Started by UndernityGaming on

Topic category: Help with modding (Java Edition)

Last seen on 12:43, 22. Aug 2021
Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make an Enchantment that decreases Durability over Time?

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 22:29, 27. Mar 2024
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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 

Last seen on 22:29, 27. Mar 2024
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
A bit too late my friend,…
Thu, 08/19/2021 - 23:40

A bit too late my friend, though I might keep it in hand for the future