Skip to content

feat: pet ability handler system remake - #836

Merged
Swofty-Developments merged 28 commits into
Swofty-Developments:masterfrom
LongPPPP:master
Aug 8, 2026
Merged

feat: pet ability handler system remake#836
Swofty-Developments merged 28 commits into
Swofty-Developments:masterfrom
LongPPPP:master

Conversation

@LongPPPP

@LongPPPP LongPPPP commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

What

Reworks the pet ability system and ships the first three pets built on it: Bee, Grandma Wolf and Chicken.

Pet ability model

  • AbilityRuntime — per-player typed state for stateful abilitie.
  • Abilities whose trigger has no game hook yet surface a NOT IMPLEMENTED line in their lore.
image

Notes

Adds /setpetrarity dev command for testing.

@vercel

vercel Bot commented Aug 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
hypixel-skyblock Ignored Ignored Aug 8, 2026 1:49pm

@LongPPPP

LongPPPP commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

I think I should remove the DSL and switch to inheritance instead

@LongPPPP LongPPPP changed the title feat: DSL-based pet ability system with Bee, Grandma Wolf and Chicken pets feat: pet ability handler system remake Aug 7, 2026
@ArikSquad

Copy link
Copy Markdown
Collaborator

seems like a good addition

LongPPPP and others added 7 commits August 7, 2026 22:30
perLevelStatistics was a raw Map keyed by Rarity, so getPerLevelStatistics
returned null for any rarity the pet did not define. Rarity has ten values and
these pets define five or six, so building the lore threw a NullPointerException
and took the creative menu down with it whenever a pet matched the search. The
same call sits in PlayerStatistics, so an equipped pet would have thrown too.

It now uses RarityValue like georgePrice and katUpgrades already do on this
component, which falls back to rest instead of returning null. SafeConfig.getMap
yields an empty map for an absent key, so undefined rarities parse to zero
statistics and pets.yml needs no new keys.
Rarity.getColor and ItemStatistic.getDisplayColor both return a TextColor, so
concatenating them into a string printed the colour's name. Pet display names
came out as "light_purpleBee" and the Hive lore rendered "aqua" and "red" in
front of the numbers.

Rarity already had getLegacyColor for this, and ItemStatistic now has a matching
getLegacyDisplayColor. Hive also gained the space that was missing between the
value and the statistic name.
items.properties only had items.BEE_PET, so Chicken and Grandma Wolf fell back to
displaying their raw translation key as the item name.
setEnabled only cleared pets matching the type being enabled, so selecting a
second pet left both flagged as active. getEnabledPet takes the first enabled
entry, so it kept returning the old pet and selecting a new one appeared to do
nothing. This was unreachable until now because there was only ever one pet.
These concatenate ItemStatistic.getDisplayColor() into strings, which prints the
colour's name rather than a formatting code, so the bestiary and gathering stats
menus rendered "aqua" and "red" in front of their numbers. Same defect the pet
lore had, in the code the pet lore copied the pattern from.

The three places that use the TextColor properly are left alone: HypixelTranslator
passes it to Component.color, StatisticArrow keys a texture map with it, and the
potion effect colour in SkyBlockGenericLoader is already a String.
The command kept its own Set of rarity name strings and repeated the same list in
the error message, so both had to be updated by hand whenever Rarity changed. It
now derives the valid rarities from the enum, capped at MYTHIC because that is
where getAsLevel and RarityValue stop, parses with the existing Rarity.getRarity
helper and builds the error message from the same list. Tab completion comes for
free from it as well.

The confirmation message also concatenated getColor, which printed the colour
name rather than a formatting code.
The field comments already say what each one holds.
@Swofty-Developments
Swofty-Developments merged commit a0e2506 into Swofty-Developments:master Aug 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants