Started by
abobo_le_sus
on
Topic category: Help with MCreator software
How to make a cooldown for multiple items/weapons at the same time?
I have a special weapons in the mod that adds effects on right click, and of course it has a cooldown, but i don't want players to stack the effects duration, did anyone know how to make cooldown for all weapons at the same use?
(also, the game crashes after drinking milk, i don't know why, if anyone know how to solve it- please write in the comments)
Instead of just cooling down the one item, use a 'Get each item as itemstack iterator' in the entity's inventory. If the Itemstack iterator matches the item you want to cooldown, cooldown the itemstack iterator instead of just the provided itemstack. This will search each slot in the player's inventory individually and execute a procedure on them.
so the cooldown will be to all items on inventory?