Fabric-Shield-Lib
Fabric-Shield-Lib copied to clipboard
Add ItemStack context to `getCoolDownTicks` in shield item class
Would be useful for enchantments that affect cooldown ticks.
Example:
@Override
public int getCoolDownTicks(@Nullable ItemStack itemStack) {
if (itemStack != null) {
... = itemStack.getEnchantments().getLevel(...);
return super.getCoolDownTicks() * ...;
}
return super.getCoolDownTicks();
}
```
Yeah, looks good!
So I just need to change this line to public int getCoolDownTicks(@Nullable ItemStack itemStack) {?
Done in 1.21.3 and 1.21.4 versions, not sure how far we'll backport.
Marked stale due to inactivity.
Okay, so this has been added in newer versions & will be back-ported eventually, I've been working on getting 2.0 more stable before attempting a backport.