Dwurdy Sharks 1.4.0 for Minecraft 1.21.1
Curse Maven Snippet
What's new
Dwurdy Sharks 1.4.0 — Minecraft 1.21.1
Dwurdy Sharks 1.4.0 is a stability and performance release. It fixes every server-degrading defect found in a production incident report (CPU escalation, heap growth 15→17 GB, sharks spawning in rivers and lakes, and a ~2000-entity stress event) and proves the fixes with an automated GameTest regression suite and five 5-minute stress profiles.
⚠️ Migration notes
- SavedData keys renamed. Internal world/map variable stores moved from
benssharks_mapvars/benssharks_worldvarstodwurdysharks_mapvars/dwurdysharks_worldvars. These hold transient mod counters only; stored values reset on first load under 1.4.0. Entity, item, and block IDs are unchanged from 1.3.0 (dwurdysharks:*). - Creative tab ID renamed
dwurdysharks:bens_sharks→dwurdysharks:dwurdy_sharks; the tab display name is now "Dwurdy Sharks" in all shipped locales. - All remaining internal
Benssharks*class names were renamed toDwurdySharks*. This is invisible to players; it matters only to forks or tooling that referenced the old class names.
Fixed
- Initial-spawn procedures ran every tick. Fourteen
*OnInitialEntitySpawnProcedureclasses wereEntityTickEvent.Presubscribers running a 25-blockgetEntitiesOfClassquery plus a full sort on every server tick. They now run once at spawn. (#23) - Dryout work-queue storm. Nineteen per-tick procedures called
queueServerWork(300–600)every tick for each shark out of water — roughly 600 queued lambdas per beached shark, each pinning the entity in memory. Replaced with a per-entity dryout counter; no queue growth. (#24) - Wild sharks spawned outside oceans. Bull shark spawn data listed
river,swamp,mangrove_swamp,beach, andstony_shore; the Java spawn predicate checked only for water. Natural spawns are now restricted to thedwurdysharks:shark_spawning_oceansbiome tag (seeded from#minecraft:is_ocean), across all 21 biome-modifier files and the Java predicate. Datapacks and modded biomes extend the tag without a rebuild. (#25) - Wrong mob category. Blacktip reef shark, bonnethead, and barracuda were
registered as
WATER_AMBIENT— uncapped and exempt from water-creature despawn rules. They are nowWATER_CREATURE. (#30) - Global entity-tick subscribers retired. The remaining global
EntityTickEvent.Prepattern is gone;RollParticleEntity's 44 target goals were stripped. (#32)
Added
- Local population caps and density shaping. New
mobs-category gamerules:largeSharkLocalCap(default 24),ambientFishLocalCap(default 64),sharkSpawnCapRadius(default 128), andenforceCapForManualSpawns(defaulttrue). Spawn costs shape density before the hard cap is reached; tamed, named, and persistence-required sharks are exempt. (#26) - Server config
dwurdysharks-server.toml(DwurdySharksConfig):spawningEnabledmaster switch,oceanOnlytoggle, per-species natural spawn toggles,sharkDamageMultiplier,megalodonDamage, andmegalodonArmorBypass(defaultfalse). (#31) - GameTest regression + stress suite in
net.mcreator.sharks.gametest.DwurdySharksGameTests, run viagradlew runGameTestServer. Seventeen required tests cover aggression toggles, tamed-follow behavior, ocean-biome spawn predicates, dryout countdown, wild despawn beyond 128 blocks, cap plateau/exemptions, and cap-disabled cleanup. Five optional stress profiles each run for five wall-clock minutes and report spawn counts, alive counts, tick-time average/p95, work-queue depth, and heap delta. (#33, #34, #35)
Performance
- Per-tick
refreshDimensions()removed from all 24 entitybaseTicks. (#28) - Per-class target-goal lists collapsed into entity-type tag goals — 30–77 target goals reduced to at most 8 per species. (#27)
- Hot-path entity queries (
EatKrillProcedure,BarracudaSprintProcedure,EatDroppedItemProcedure, and friends) made single-pass and throttled. (#29) - Release-gate measurements on the GameTest server (five ≥300 s wall-clock profiles): sustained ~470/500 live sharks at p95 tick 5–13 ms; empty-world baseline p95 0.15 ms; 2000-attempt cap-abuse run plateaued at 8 admitted with post-settle p95 0.51 ms; cap-disabled despawn+GC heap delta +4 MB with zero mod entities remaining.
Verification
gradlew.bat clean buildpasses on Java 21 with NeoForge 21.1.248 (pre-existing deprecation warnings only).gradlew.bat runGameTestServer: all 17 required tests passed, zero optional failures. Every timed stress profile ran ≥300 s wall-clock:stress_item_eat300.4 s,stress_dryout_beached300.1 s,stress_population_500300.6 s,stress_baseline300.5 s,stress_population_100300.4 s.- All ten static guard scripts in
tools/pass (verify-ai-goals,verify-config,verify-dimensions,verify-dryout,verify-global-events,verify-hot-path,verify-ocean-spawns,verify-persistence,verify-spawn-caps,verify-spawn-procedures). - Spark CPU/allocation profiling against a live production server remains a
manual step (see
docs/TESTING.md); the automated gate ran on the real GameTest server.
This release is for Minecraft 1.21.1 + NeoForge only. Other Minecraft versions and loaders require separate ports and verification.
This mod has no additional files

