how to have Armor procedure damage item in players inventory

Started by DarkNegulus on

Topic category: Help with modding (Java Edition)

Last seen on 23:44, 24. Jun 2024
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to have Armor procedure damage item in players inventory
Mon, 07/31/2023 - 05:08 (edited)

I'm trying to make Armor (chestplate) that damages your tools when the armor takes damage to regenerate itself. what should i do?

Edited by DarkNegulus on Mon, 07/31/2023 - 05:08
Last seen on 14:53, 23. Aug 2023
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You need to create a…
Thu, 08/03/2023 - 23:40

You need to create a procedure, to create a procedure that gets triggered when you wear your custom chestplate, do this:

Make a procedure like this:

I haven't tested it, but supposedly it should should damage all swords/pickaxes/axes/shovels and hoes when the chestplate is damaged and repair the chestplate, it checks for every inventory slot, including second hand slot, but excluding 2x2 crafting slots and the armor slots themselves. (Creating this procedure was pretty fun though)
If you don't want to recreate it like in the image(which I can understand), you can just import it by pressing "import procedure":

Here's the procedure file that you need to import this way:

https://drive.google.com/file/d/1BilzDFcxngnScphKxM4fPWF3DH7Q9z0J/view?usp=sharing

(I posted the procedure file on google drive so you can download it and that's the link)

Hope this helps! :)

Last seen on 23:44, 24. Jun 2024
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you! I was scratching…
Thu, 08/10/2023 - 06:43

Thank you! I was scratching my head about how to do this. I am having a few issues with said code however...  the portion of the procedure for the third if statement (the portion where it checks the tools) I cant seem to get it to be Event/Target entity, only Provided Itemstack. (btw I'm using 2023.2 of Mcreator which may be the reason for the incompatibilities)

https://drive.google.com/file/d/1bTm5iSKtR9z_E9S7BbLv6fCRgNeIiZxR/view?usp=sharing

Last seen on 14:53, 23. Aug 2023
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Does it work though?
Wed, 08/16/2023 - 12:33

Does it work though?

Last seen on 23:44, 24. Jun 2024
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
no
Tue, 08/29/2023 - 20:33

no