Idol is always activated when equipped, cooldown should occur prior to activation
Closed this issue ยท 0 comments
When an idol is equipped then it is activated.
Cooldown should run down prior to activation.
Initial cooldown on equip isn't support by the itemx.update() method:
// exit if entity isn't player
if (!isEntityPlayer(entityIn))
return;
// type cast as player
EntityPlayer player = (EntityPlayer) entityIn;
// exit if cooldown is effect
if (player.getCooldownTracker().hasCooldown(this))
return;
// add cooldown
CooldownTracker tracker = player.getCooldownTracker();
tracker.setCooldown(this, coolDown);
Investigate using an event handler to clear cooldown:
https://mcforge.readthedocs.io/en/latest/events/intro/
fx using the LivingEquipmentChangeEvent event