Started by
DarkNegulus
on
Topic category: Help with Minecraft modding (Java Edition)
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
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! :)
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
Does it work though?
no