#WIP persistent item cooldown lib
16 messages · Page 1 of 1 (latest)
it is also very easy to use! i want to figure out how to extract this behavior into an interface that can simply be implemented onto item classes though so all the user has to do is override a method like getCooldownTicks()
currently though its just (in Item#use):
CooldownHelper.setItem(user, this, 400);
In 1.20.5, why not use components for it?
because 1.20.5 isn't out yet 
I know, but when released
also idfk how you'd make item components tick. is that a thing in the snapshots
ALSO also, these cooldowns aren't even attached to the items, they're attached to the player (like ender pearls are)
if they were components they'd probably have to be attached to the items, which would mean you could just have like several different stacks of the thing you rotate through and bypass the cooldown entirely
I know nothing about the new components system (I don't touch the snapshots ever) but i think this would probably still end up using cca or the data attachment api or something like it even when they do get released
i should mention this also has generic cooldowns! they do not necessarily have to be attached to items. you can use it for any kind of cooldown that you want to basically pause while the player is offline
do servers have the cooldown problem or no
lmao
