Item cooldown for most items Also changed the logic
Summary
- Added support for all known Skyblock items with cooldowns
(some items might be missing) - Added support for left-click triggered abilities
- Added handling for sneak + left/right-click combinations
- Moved cooldown details to an external JSON configuration file
JSON Format
"ITEM_ID": {
"cooldown": 1000, // Cooldown duration in milliseconds
"cooldown_type": "foraging", // Optional: dynamic cooldown logic (e.g. depends on monkey pet level)
"trigger": "right_click", // How the ability is triggered ("right_click", "left_click", "block_break")
"condition": "someCondition", // Optional: name of a condition to be checked before activation
"block_tag": "minecraft:logs", // Optional: required block tag for block_break abilities
"toggle": true, // Optional: item can be toggled on/off ( different cooldown applies after early deactivation)
"requires_sneak": true, // Optional: only activates while sneaking
"cooldown_group": "GROUP_ID" // Optional: shared cooldown group (e.g. Jungle Axe & Treecapitator)
}
Still missing: (will be done in a seperate pr)
- Full toggle logic (e.g. Wither Cloak: stays active for 10s, cooldown begins after deactivation, if deactivated early cooldown is 5s)
- Logic for items that have two abilities with separate cooldowns (e.g., Gyrokinetic Wand: right-click and left-click cooldowns).
This makes me want to change some of our large constant maps to json. I'll also probably add validation tests to this one.
Most constants are probably in the NEU Repo. Pet levels sure are in there
also need support for Efficient Spells (mage class ability)
Unfortunately this pr has a pretty bad merge conflict now.
Unfortunately this pr has a pretty bad merge conflict now.
future me will fix that
I saw that the git api had https://gitapi.hysky.de/cooldowns.json added so I will mark this as a WIP until that file is used (to know when this is ready).