Started by
ChebyPattern
on
Topic category: Help with Minecraft modding (Java Edition)
The title explains it well.
I need to damage Item in the slot of Item that has GUI.
To put it simply, I have a medkit that can contain dressings, medicine(bottles) and syringes.
The dressings have durability. I already made the procedure work to check for specific slots and what
items they posses. The only thing I need to know is how to make the "deal damage" work.
I am aware that "get copy of itemstack" basically gets the copy of an item which is in the slot.
But that leaves me with question, how do I affect item's durability while it's in the slot.. directly?
If doing directly is not possible, how do I do it with the "copy" and then replace the original copy with damaged version?
Forgot to mention. The GUI is closed while the procedure is happening.
Meaning the "Deal [*] damage to item in slot [*] of the currently open GUI of Event/Target Entity" won't work.
It took me some time, but I managed to figure it out.
I also made an explanation for others who might have had the same issue:
it works! I almost gave up,tks