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
@@ -29,6 +29,8 @@ public class ItemSmokeBomb extends Item {
player.playSound(WizardrySounds.ENTITY_SMOKE_BOMB_THROW, 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
player.getCooldownTracker().setCooldown(this, 20);
if(!world.isRemote){
EntitySmokeBomb smokebomb = new EntitySmokeBomb(world);
smokebomb.aim(player, 1);