Skip to content

feat: codebase overhaul#783

Open
Swofty-Developments wants to merge 134 commits into
masterfrom
recode
Open

feat: codebase overhaul#783
Swofty-Developments wants to merge 134 commits into
masterfrom
recode

Conversation

@Swofty-Developments

@Swofty-Developments Swofty-Developments commented May 14, 2026

Copy link
Copy Markdown
Owner

Summary

Bug fixes (tracker issues)

Merged PRs (dependabot + features)

Build / infrastructure

  • Restored Gradle configuration cache (lombok/sentry declared apply false at root so their non-serialisable state doesn't crash the cache)
  • Declared root repositories so the lombok plugin resolves
  • Aligned com.gradleup.shadow 9.4.1 across darkauction + orchestrator

Architectural changes (Java 25)

  • New Result<T, E> sealed type in commons with Ok / Err records, full combinator surface, Optional bridges, and attempt(Supplier)
  • SeaCreatureGuidePage sealed base — 1785 lines of GUI13/23/33SeaCreatureGuide collapsed to ~1150 with sealed Entry records (Head, Block)
  • 13 boilerplate *ServerModule classes (SpidersDen, Hub, DwarvenMines, JerrysWorkshop, ThePark, DungeonHub, Galatea, CrimsonIsle, TheEnd, TheFarmingIslands, BackwaterBayou, GoldMine, DeepCaverns) → one parameterised AreaServerModule
  • 30+ classes migrated from hand-rolled JSONObject-walking serializers to JacksonSerializer<T> (~870 lines deleted across friend events, dark-auction protocols, presence info, etc.)
  • 60 ProtocolObject subclasses had their per-call new JacksonSerializer<>(T.class) allocations hoisted to static SERIALIZER / RETURN_SERIALIZER fields
  • Records replaced classes: DataLockManager.LockInfo, TestFlow.TestFlowInstance, TestFlowManager.ServerConfig, ServiceProxyRequest
  • FriendEvent subclasses marked final; createDummyInstance's 100-line switch-on-class-name collapsed to one reflection pass
  • O(n) enum scan in ChatColor.getLastColorO(1) map lookup
  • Achievement toRoman deduped across 3 callsites
  • Fishing null-returning resolver chain replaced with List<Function<Ctx, Optional<Result>>> + flatMap(Optional::stream).findFirst()
  • DataHandler.findUser / awaitUser Optional-returning variants (exponential-backoff polling)
  • BalanceConfigurations strategy instances hoisted to constants, map made immutable, helpers extracted
  • LowestPlayerCount.Comparator hoisted to static field
  • Stream / pattern-matching / ThreadLocalRandom sweeps across game loops and random pickers

Code quality

  • 60+ System.out / printStackTrace → tinylog conversions
  • Silent catch blocks given intent-bearing logs
  • MethodLister, MinecraftVersion, GUIFishingSkillExampleRemoveThis deleted as unreferenced
  • Every genuine utility class marked final with a private constructor (MathUtility, StringUtility, BedwarsLevelUtil, SkywarsLevelUtil, EntityUtil, YamlFileUtils, BlockUtility, ChestUtility, BufferUtility, etc.)
  • Commented-out dead code removed across velocity, player, minion, fishing
  • TrackedItem encapsulation tightened (was @Setter on public final — misleading)

ArikSquad and others added 30 commits December 20, 2025 16:56
…lands

# Conflicts:
#	type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/ItemConfigParser.java
…lands

# Conflicts:
#	type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/item/ItemConfigParser.java
…lands

# Conflicts:
#	type.generic/src/main/java/net/swofty/type/generic/data/datapoints/DatapointToggles.java
#	type.hub/src/main/java/net/swofty/type/hub/npcs/NPCFishermanGerald.java
#	type.hub/src/main/java/net/swofty/type/hub/npcs/NPCGavin.java
Bumps [redis.clients:jedis](https://github.com/redis/jedis) from 7.2.0 to 7.4.1.
- [Release notes](https://github.com/redis/jedis/releases)
- [Commits](redis/jedis@v7.2.0...v7.4.1)

---
updated-dependencies:
- dependency-name: redis.clients:jedis
  dependency-version: 7.4.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [com.google.code.gson:gson](https://github.com/google/gson) from 2.11.0 to 2.13.2.
- [Release notes](https://github.com/google/gson/releases)
- [Changelog](https://github.com/google/gson/blob/main/CHANGELOG.md)
- [Commits](google/gson@gson-parent-2.11.0...gson-parent-2.13.2)

---
updated-dependencies:
- dependency-name: com.google.code.gson:gson
  dependency-version: 2.13.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [com.gradleup.shadow](https://github.com/GradleUp/shadow) from 9.3.1 to 9.4.1.
- [Release notes](https://github.com/GradleUp/shadow/releases)
- [Commits](GradleUp/shadow@9.3.1...9.4.1)

---
updated-dependencies:
- dependency-name: com.gradleup.shadow
  dependency-version: 9.4.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [io.sentry.jvm.gradle](https://github.com/getsentry/sentry-android-gradle-plugin) from 5.12.2 to 6.4.0.
- [Release notes](https://github.com/getsentry/sentry-android-gradle-plugin/releases)
- [Changelog](https://github.com/getsentry/sentry-android-gradle-plugin/blob/main/CHANGELOG.md)
- [Commits](getsentry/sentry-android-gradle-plugin@5.12.2...6.4.0)

---
updated-dependencies:
- dependency-name: io.sentry.jvm.gradle
  dependency-version: 6.4.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps com.viaversion:viaversion from 5.7.1 to 5.8.1.

---
updated-dependencies:
- dependency-name: com.viaversion:viaversion
  dependency-version: 5.8.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
…lands

# Conflicts:
#	type.skyblockgeneric/src/main/java/net/swofty/type/skyblockgeneric/user/SkyBlockPlayer.java
Bumps [vue](https://github.com/vuejs/core) from 3.5.31 to 3.5.34.
- [Release notes](https://github.com/vuejs/core/releases)
- [Changelog](https://github.com/vuejs/core/blob/main/CHANGELOG.md)
- [Commits](vuejs/core@v3.5.31...v3.5.34)

---
updated-dependencies:
- dependency-name: vue
  dependency-version: 3.5.34
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
The root project applies io.freefair.lombok which needs to resolve
org.projectlombok:lombok at the root, but only subprojects had
repositories declared. Adding the same repository block at root.
…ty classes

Both expose only static helpers but allowed implicit public no-arg
construction. final + private constructor makes the intent explicit
and prevents the spurious-instantiation footgun.
Final + private constructor for the static-only helper. The class
has been around long enough that this was a small oversight from
day one.
…er utility classes

Three more static-only helpers got final + private constructor.
… ctors

Sweep across pvp/utils (EffectUtil, FluidUtil, EntityUtil, ViewUtil,
ProjectileUtil, ChorusFruitUtil), anticheat ChunkUtils, bedwars
ColorUtil, dungeons DungeonUtilities, ChatUtility, and a few others.

Excluded two false positives the script's name-based filter caught:
UtilityEffectHandler and BlockUtils both have public constructors
that take constructor arguments — they're instantiable handlers, not
static-only utilities. Manually reverted those.
Both ItemConfigParser parse-fail catches dropped e.getMessage() as
a template arg, losing the stack trace. Passing the exception
directly to Logger.error(e, '...') gets both the message and the
full trace into the configured log sinks.
@vercel

vercel Bot commented May 14, 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 May 15, 2026 5:10am

Replaces the `// TODO: sea creatures` stub in FishingService.awardCatch
with a working end-to-end flow:

- SeaCreatureMob abstract base extending SkyBlockMob; awards FISHING
  skill XP on kill (matches Hypixel — sea-creature kills feed fishing).
- Six canon Hypixel sea creatures wired up: Squid, Sea Walker,
  Night Squid, Sea Guardian (water) plus Magma Slug, Lava Blaze
  (Crimson Isle lava fishing).
- SeaCreatureSpawner: factory registry keyed by sea creature id,
  spawns the mob at the bobber position and broadcasts the canonical
  "SEA CREATURE!" message to the angler and players within 32 blocks.
- sea_creatures.yml seeded with the six entries (level + skill XP +
  WATER/LAVA/NIGHT tags) so FishingRegistry tag-bonus rolls resolve.

GUIParty member heads now read the real achievement-point total
from DatapointAchievementData instead of hard-coding zero.
Night Squid (and any future NIGHT-tagged creature) should only roll
between 8pm and 6am SkyBlock time, matching Hypixel.
SkyBlockCalendar.getHour() drives the check directly off the live
game clock, so day/night transitions take effect immediately.
Was: \`definition.tags().contains("NIGHT") && !isNight\` — gating logic
hard-coded in the resolver, tag identity = arbitrary string, every new
condition would re-open the resolver to add another \`if\`.

Now: \`sealed interface FishingTag permits Medium, TimeOfDay, Weather,
Region, Rarity, Event\`. Each tag owns its own \`isAvailable(context)\`
predicate, so the resolver just asks \`definition.isAvailable(context)\`
and the right branch runs by polymorphism. Adding a new gated condition
(e.g. \"only during Spooky Festival\") is one new tag class, no resolver
change.

- TimeOfDayTag carries an IntPredicate over the SkyBlock hour; NIGHT,
  DAY, DAWN, DUSK come pre-built.
- WeatherTag reads instance.getWeather() directly: RAINING, CLEAR,
  THUNDERSTORM.
- RegionTag has a typed \"requireMatch\" mode (gates) vs \"info\" mode
  (purely cataloguing), plus the canonical SkyBlock regions.
- RarityTag holds a weight for sorting/display.
- EventTag wraps a BooleanSupplier so events stay decoupled from tags.
- FishingTagRegistry parses YAML strings to typed tags; unknown ids are
  synthesised as info-only RegionTags (visible in catalogs, never gate).

SeaCreatureDefinition.tags is now List<FishingTag>; the resolver's
tag-bonus map still looks up bonuses by FishingTag.id() so user-data
configs (bait/hook/line/sinker tag bonus maps) keep their string keys.
…n model

Was: six near-identical Mob<X> subclasses of SkyBlockMob, each ~80 lines
of boilerplate overriding the same ten abstract methods. The only thing
that actually varied was data — entity type, level, stats, AI flavour.

Now: a single \`SeaCreatureMob\` driven by a \`SeaCreatureProfile\` record.
Adding a new creature is one builder chain in \`SeaCreatureProfiles\`,
not a new class.

The SkyBlockMob super-constructor calls abstract accessors before
subclass fields are initialised, so a thread-local handoff
(\`IN_CONSTRUCTION\`) bridges the gap during the super() call — once
the constructor returns the field is set and \`live()\` hits the fast path.

Behaviour is its own sealed strategy: \`Passive\`, \`Aggressive\`, \`Custom\`.
The sealed interface lets us pattern-match on it later (e.g. for catalog
GUIs that want to render aggressive vs passive differently) without an
escape hatch.

Net: deleted 480+ lines of boilerplate, replaced with ~250 lines of
genuine data + one polymorphic driver.
Was: an 8-field record with @nullable on most of them, plus a parallel
FishingCatchKind enum that callers branched on. The trophy tier was
deduced by string-scanning the item id ("contains _DIAMOND ? GOLD ? ...")
and broadcast logic was a switch buried in FishingService.awardCatch.

Now:

\`sealed interface CatchPayload permits Item, SeaCreature, TrophyFish,
                                       Quest, Special\`

Each variant carries only its own fields and an apply(ctx) method that
does its own collection update, XP, spawn, and chat broadcast. The
service just calls payload.apply() — dispatch by polymorphism, no
switch on kind.

- TrophyTier enum replaces the stringly-typed BRONZE/SILVER/GOLD/DIAMOND
  scan; it carries its own colour and display name and offers
  fromItemId(String) for the rare introspection case.
- CatchAwardContext bundles the side-effect surface (player, rod, hook
  position) so payload variants don't reach into FishingHook directly.
- Each variant prints Hypixel-flavoured chat lines ("GOOD CATCH!",
  "TREASURE!", "TROPHY FISH!", "QUEST CATCH!"), addressing the silent-
  catch UX gap.
- FishingService.awardCatch is now five lines + bait/sinker rolls
  extracted to their own helpers, instead of an inline switchboard.

Removed: FishingCatchResult, FishingCatchKind.
Hypixel's canonical Double Hook mechanic: DOUBLE_HOOK_CHANCE % of the
time, a sea-creature catch spawns two mobs instead of one.

The chance reads from the player's DOUBLE_HOOK_CHANCE statistic (rod
stats + hotspot buffs + rod parts) plus any bait
doubleHookChanceBonus. On a successful roll, the SeaCreature payload
is rebound via .withDoubleHook() (one extra field, no scattered state)
and apply() loops the spawn twice, prefixing the canonical
"§a§lDOUBLE HOOK!" line.
…atures

Was: 6 creatures (4 water, 2 lava) — minimum-viable.
Now: 13 water + 8 lava, covering the canonical Hypixel SkyBlock roster
from Squid (Lv 1) through The Sea Emperor (Lv 80) on water, and Magma
Slug (Lv 21) through Lord Jawbus (Lv 45) on lava.

Each profile picks a sensible Minestom entity to render the creature
(GUARDIAN for Sea Guardian, ELDER_GUARDIAN for The Sea Emperor, HOGLIN
for Taurus, GHAST for Lord Jawbus, etc.), uses Aggressive or Passive
behaviour appropriately, and sets reward XP scaled to the wiki's
catch-rarity tiers.

Catfish is tagged RAINING — Hypixel's mechanic that the WeatherTag
gate now enforces automatically (only rolls while the instance has
rain). Other creatures pick up RarityTag (COMMON/UNCOMMON/RARE/EPIC/
LEGENDARY/MYTHIC) which is informational today but ready for catalog
GUIs and tag-bonus stacking.

sea_creatures.yml updated with all 21 entries.
@Swofty-Developments Swofty-Developments changed the title feat: codebase overhaul — sealed types, records, JacksonSerializer migration, bug fixes feat: codebase overhaul May 14, 2026
Was: 19 top-level files in a flat \`fishing/\` package mixing services,
config records, resolvers, and helpers. Sea creature mobs at
\`entity.mob.seacreature\` — skipping the \`.mobs\` layer that every other
mob group (deepcaverns, dwarvenmines, hub, island, minionMobs) uses.

Now:

  fishing/                   — public API: Service, Session, Context, Medium
  fishing/bait/              — bait management
  fishing/catches/           — sealed CatchPayload + variants + TrophyTier
  fishing/hotspot/           — hotspot service + HotspotDefinition
  fishing/item/              — item lookup helpers
  fishing/registry/          — FishingRegistry + the 4 *Definition records
  fishing/resolver/          — FishingLootResolver + FishingCatchResolver
  fishing/rod/               — rod-part service, lore builder, categories
  fishing/ship/              — ship service
  fishing/tag/               — sealed FishingTag hierarchy (was \`tags/\`)

  entity/mob/mobs/seacreature/   — sea creature mob driver, profile,
                                    behaviour, registry, spawner
                                   (was at entity/mob/seacreature/,
                                    missing the .mobs/ layer)

Each moved file got explicit cross-package imports added; all 34
external consumers updated; imports re-sorted alphabetically.

Full project still compiles; tests still pass.
@Swofty-Developments

Copy link
Copy Markdown
Owner Author

@ArikSquad

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.

2 participants