Started by
Shminecrafter
on
Topic category: Help with Minecraft modding (Java Edition)
I have an item with an inventory and I have it so when I swing the item it does something. I also want it to take damage. I can't figure out a way to make the item inside take damage.
Well I think theres a block that says deal one damage to provided itemsack.
There is, but I can't find a way to select the item in the inventory (only a copy)
Well why do you have a copy you could just do has item in inventory of source entity
I think targeting an item in a specific slot of any inventory is only possible via the blocks containing "get copy of..."
At least I think this is what' the issue.
try like this and put the cooldown and 2nd "if do" in both after or before deal 1 damage:
hope it works
I did this procedure if u need:
I think this is what u want to do, if player right clicks with item in main hand it deals 1 damage to the item and then strike lightning (i used 100 while it's too low 50 for me you can put how many blocks you want). You can use the same procedure but change the item if you want.
And the item is going on cooldown only if the lightning strikes now.