Repository navigation
Ocean wildlife spawns instead of MythicMobs LEGACY random spawns - #26
Merged
Merged
Conversation
…pawns Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
…he world, skip unknown Mythic mobs until reload Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ife.yml; log the wildlife settings on load Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
XxFran10xX
marked this pull request as ready for review
November 22, 2026 13:30
Contributor
Author
|
@coderabbitai review |
Action not completed
|
… the default depth Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Status record
sweep-secondsoverflow, non-numericlevel: malformed config only)PLAYERrule is skipped with a warning on/infestation reload). PASS at a5357ac for the change since 21fb6c4 (load lineWildlife on: 11 rules, worlds [TFMC_Map]; default kinds still spawn every 10 s at Y 61; squid withbelow-surface: 6at Y 57;sweep-seconds: 5removed them within 9 s of leaving;/infestation reloadapplies a changed wildlife.yml live; no errors). Earlier: PASS at 21fb6c4 (TFMCDev01 with MythicMobsGenerator: NONEandOceanAnimals.ymlemptied; bot~/mmgen-test/wildlife-test.jsover deep ocean at 264,3352): one spawn every 10 s per player, 8 kinds (cod, squid, manta, oarfish, jellyfish, shark, orca, salmon) at Y 61, each kind's 30 s cooldown held, at most 5 aquatic mobs near the bot; none left 30 s after the bot moved away (ocean chunks kept loaded); no spawns inland; Dev allocation 0.13 GB/s with two players at sea (LEGACY: 0.95 GB/s with one); no Infestations errorsmvn verify, 253 tests, 100% line coverage gate)Why
Main's ambient sea creatures come from MythicMobs' LEGACY random-spawn generator (
randomspawns/OceanAnimals.yml). A spark allocation profile on 2026-11-22 showed it makes about 90% of all heap allocation on Main (about 1 GB/s), with 2 players as with 34, and it keeps G1 running back-to-back marking cycles all day. Decompiled (MythicMobs 5.13.1): every tick, for every player, it copies the player's whole chunk (100 sections) on every try until its point quotas are met, and its Air quota can never be met, so it always runs toMaxGenerationTime. On Dev with one bot: 0.95 GB/s with the generator, 0.03 GB/s without. Tuning it does not help (MaxGenerationTime5 → 1 saved about 13%). Vanilla mob spawning is off (doMobSpawning false), so the creatures, including the vanilla fish, exist only through this generator.Changes
wildlifemodule (WildlifeService,WildlifeConfig,WildlifeRule) with its ownwildlife.yml, independent of infestations, provinces and rewards.OceanAnimals.yml: the six MythicMobs mobs and the five vanilla fish, with the same biomes, the Y 50–64 band, a 30 s server-wide cooldown per kind and the same "at most N within R blocks" limits. A player cap (6 within 64 blocks) keeps the total down.chanceper rule allows thinning them out.infestations:wildlife= rule id), marked non-persistent (never saved with their chunk), and removed when no player is within 96 blocks (checked every 10 s, only over the creatures this service spawned). Plugin disable removes them too.wildlife.yml: interval, ring, attempts, caps, despawn distance,sweep-seconds, and per rule the creature, biomes, height band, depth,below-surface,chance, cooldown, nearby limit and MythicMobslevel. Loading logsWildlife on: N rules, worlds [...].wildlife.ymlthat fails to load turns wildlife off; broken rules are skipped with a warning (reload reports config errors).Deployment (not part of this PR; needs its own go)
On Main, with this jar: set MythicMobs
config-spawning.ymlGenerator: NONEand remove the ADD entries fromrandomspawns/OceanAnimals.yml, so the old generator never runs alongside this. Tutorial does not run Infestations and does not need ocean wildlife.Left alone from review
wildlife.ymlshipsenabled: true: on purpose, the Main deployment sets MythicMobsGenerator: NONEin the same restart, and Tutorial does not run Infestations.MythicMobs child entities or persistent despawn: checked, the six mobs are
Persistent: false,Despawn: trueand summon nothing.Vanilla fish can still be despawned by vanilla when far from the player (its own despawn ranges), using up that kind's cooldown: same 64-block spawn radius as the old MythicMobs spawns, so no change.
Spawns in loaded but not entity-ticking chunks: Main's simulation distance is 6 chunks (96 blocks), beyond the 64-block ring.
sweep-secondsoverflow and non-numericlevel: only with absurd or malformed values.Tests
WildlifeConfigTest: rule parsing, defaults, clamps, rejected rules, bundled defaults, malformed file.WildlifeServiceTest: start/stop, eligibility, per-player interval, skipped columns (unloaded, dry, too shallow, wrong biome), player cap, cooldown, per-kind limit, chance, MythicMobs and vanilla spawns (including unknown and failed spawns), sweep removal.🤖 Generated with Claude Code