How to give a certain item when a tool breaks?

Started by CrossRaznic on Tue, 08/02/2022 - 16:26

Topic category: Help with modding (Java Edition)

Last seen on 17:52, 3. Aug 2022
Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to give a certain item when a tool breaks?
Tue, 08/02/2022 - 16:26

So I'm making a gun mod where a pistol uses a magazine and bullets to reload the magazine.

I finished making the reloading mechanism, but I have a problem when I use all of the magazine durability (when it uses a bullet it uses 1 durability) it breaks, and I have 1 full magazine item and a empty magazine item.

I tried to make a procedure when item broken it gives the empty magazine, but it gives a magazine when a random item is broken.

Please help.

Ā