Add cooldowns (using the vanilla mechanic) to various consumable items

This commit is contained in:
Electroblob77
2020-05-17 00:32:02 +01:00
parent ef39757229
commit 4739d9f9fc
6 changed files with 27 additions and 7 deletions
@@ -77,6 +77,7 @@ public class ItemManaFlask extends Item {
WizardryUtilities.playSoundAtPlayer(player, WizardrySounds.ITEM_MANA_FLASK_RECHARGE, 0.7f, 1.1f);
if(!player.isCreative()) flask.shrink(1);
player.getCooldownTracker().setCooldown(this, 20);
return new ActionResult<>(EnumActionResult.SUCCESS, flask);