feat: codebase overhaul#783
Open
Swofty-Developments wants to merge 134 commits into
Open
Conversation
…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.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
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.
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.
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bug fixes (tracker issues)
TablistSkinRegistrynow wraps MinestomPlayerSkinfindUser/awaitUservariants onDataHandler/logoutleaking session IDs to stdout (LogoutEndpoint)Merged PRs (dependabot + features)
Build / infrastructure
apply falseat root so their non-serialisable state doesn't crash the cache)com.gradleup.shadow 9.4.1across darkauction + orchestratorArchitectural changes (Java 25)
Result<T, E>sealed type incommonswithOk/Errrecords, full combinator surface, Optional bridges, andattempt(Supplier)SeaCreatureGuidePagesealed base — 1785 lines ofGUI13/23/33SeaCreatureGuidecollapsed to ~1150 with sealedEntryrecords (Head,Block)*ServerModuleclasses (SpidersDen, Hub, DwarvenMines, JerrysWorkshop, ThePark, DungeonHub, Galatea, CrimsonIsle, TheEnd, TheFarmingIslands, BackwaterBayou, GoldMine, DeepCaverns) → one parameterisedAreaServerModuleJSONObject-walking serializers toJacksonSerializer<T>(~870 lines deleted across friend events, dark-auction protocols, presence info, etc.)ProtocolObjectsubclasses had their per-callnew JacksonSerializer<>(T.class)allocations hoisted to staticSERIALIZER/RETURN_SERIALIZERfieldsDataLockManager.LockInfo,TestFlow.TestFlowInstance,TestFlowManager.ServerConfig,ServiceProxyRequestFriendEventsubclasses markedfinal;createDummyInstance's 100-line switch-on-class-name collapsed to one reflection passO(n)enum scan inChatColor.getLastColor→O(1)map lookuptoRomandeduped across 3 callsitesnull-returning resolver chain replaced withList<Function<Ctx, Optional<Result>>>+flatMap(Optional::stream).findFirst()DataHandler.findUser/awaitUserOptional-returning variants (exponential-backoff polling)BalanceConfigurationsstrategy instances hoisted to constants, map made immutable, helpers extractedLowestPlayerCount.Comparatorhoisted to static fieldThreadLocalRandomsweeps across game loops and random pickersCode quality
System.out/printStackTrace→ tinylog conversionscatchblocks given intent-bearing logsMethodLister,MinecraftVersion,GUIFishingSkillExampleRemoveThisdeleted as unreferencedfinalwith a private constructor (MathUtility,StringUtility,BedwarsLevelUtil,SkywarsLevelUtil,EntityUtil,YamlFileUtils,BlockUtility,ChestUtility,BufferUtility, etc.)TrackedItemencapsulation tightened (was@Setteronpublic final— misleading)