Skyblocker icon indicating copy to clipboard operation
Skyblocker copied to clipboard

Item cooldown for most items Also changed the logic

Open LifeIsAParadox opened this issue 8 months ago • 6 comments

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).

LifeIsAParadox avatar May 05 '25 00:05 LifeIsAParadox

This makes me want to change some of our large constant maps to json. I'll also probably add validation tests to this one.

kevinthegreat1 avatar Jun 01 '25 02:06 kevinthegreat1

Most constants are probably in the NEU Repo. Pet levels sure are in there

viciscat avatar Jun 08 '25 11:06 viciscat

also need support for Efficient Spells (mage class ability)

AC19970 avatar Jun 17 '25 04:06 AC19970

Unfortunately this pr has a pretty bad merge conflict now.

kevinthegreat1 avatar Jul 06 '25 15:07 kevinthegreat1

Unfortunately this pr has a pretty bad merge conflict now.

future me will fix that

LifeIsAParadox avatar Jul 06 '25 15:07 LifeIsAParadox

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).

AzureAaron avatar Jul 21 '25 19:07 AzureAaron