Dangerous Structures 1.3.0 (Forge 1.20.1)
Curse Maven Snippet
What's new
[1.3.0] - 2026-12-05
Dangerous Structures adds datapack profiles, structure-native mob pools, and optional elite affixes. Structure discovery now runs when players begin watching chunks, spawn checks avoid loading distant chunks, and villages stay protected even where they overlap a dungeon.
Migration and configuration
- Fire protection is now controlled by
periodicSpawning.fireMode. The default,SUNLIGHT_ONLY, protects undead from daylight while leaving lava, fire, and Fire Aspect effective. SetfireMode = "FULL_FIRE_RESISTANCE"to restore full protection. If you customized the oldsunlightImmunityorfireImmunitysetting, setfireModeexplicitly. - Armor now fills empty slots by default (
armor.armorOverwriteExisting = false), preserving vanilla enchanted gear and equipment supplied by other mods. Default armor tiers and piece counts stay the same. - Dimension selection now defaults to
other.dimensionMode = "DENYLIST", enabling modded dimensions automatically. UseALLOWLISTwith the Overworld, Nether, and End to retain vanilla-only coverage. Existing configs retain explicitly saved values for settings that still exist. - Elite bonus loot moved to
dangerousstructures:gameplay/elite_bonus. ExistingeliteSpawns.lootTableconfigs pointing to the old built-in ID redirect automatically. If a datapack replaces the bundled table, move its override to the new path. Custom table IDs continue to work as configured.
Structure profiles and mob selection
- Added per-structure and per-tag JSON profiles at
data/<namespace>/dangerousstructures/profiles/*.json. Profiles can disable a structure or override its spawn cap, interval, pack size, initial population, elite chance, open-air rules, and mob pool. They merge by priority, reload with/reload, and log invalid entries. Examples are inexamples/profiles/. - Structure-native mob pools respect declared spawn lists and Forge structure modifiers. For example, Nether fortresses can draw from their own blaze and wither skeleton pool. With
mobs.honorEmptySpawnOverrides = true(default), an explicitly emptyMONSTERlist keeps the structure peaceful. Withmobs.dimensionSpecificMobs = true, biomes with no eligible monsters no longer fall back to the global pool. openAirSpawnsacceptsNEVER,NIGHT_ONLY, orALWAYS. UnderNEVER, fully sky-exposed structures have no eligible periodic spawn positions. Natural spawn checks also honor the resolved profile’sopen_airsetting, and classification enforcesenabled: false.periodicSpawning.periodicSpawnTypeacceptsNATURALorREINFORCEMENT. Packs can useREINFORCEMENTto bypass boss-conversion hooks that target natural spawns while keeping Forge spawn events active.
Village and town protection
- Village protection applies in automatic and manual structure-selection modes and takes precedence where a protected town overlaps a dangerous structure.
structures.villagePoiBufferSections(default4, range0–8) also suppresses Dangerous Structures spawns and forced natural spawns in dungeon wings near active village points of interest. - Classification checks
#minecraft:village,#dangerousstructures:never_dangerous, and configurablevillageKeywordsagainst the structure path. This protects towns from mods such as Towns & Towers, The Missing Villages, and Underground Villages while keeping pillager outposts, ancient cities, and end cities eligible. Optional tag references keep a broken third-party village tag from disabling the rest of the protection list. - Added all 17 Underwater Village structures to
#dangerousstructures:never_dangerous, includingunderwater_village:dungeon, a room within the village. Packs can mark individual exceptions with#dangerousstructures:always_dangerous. Bundled exceptions cover hostile villages from When Dungeons Arise, Cataclysm, and Ancient Villages, plus Nova Structures’ ruined town. preventNaturalSpawnsInVillages(defaulttrue) blocks natural hostile spawns inside protected towns. Raids, zombie sieges, pillager patrols, spawners, spawn eggs, and commands continue to work.
Spawn correctness and population
- Fixed silent spawn failures for vanilla mobs including zombies, creepers, spiders, blazes, and slimes.
MobFactorynow distinguishes a validnullresult fromfinalizeSpawnfrom an actual Forge event cancellation. It tracks inline entity replacements and preserves deferred Special Mobs replacements./ds spawnscounts genuine external vetoes. - Initial population now waits for a non-spectator player within 112 blocks, respects
doMobSpawning, the profile’sspawn_interval, and spawn caps, and records a structure as populated only after a successful placement. Initial population still ignoresminPlayerDistance. The spawner skips positions more than 128 blocks from active players and requires entity-ticking chunks. - Population tracking is thread-safe and keyed by dimension, structure ID, and origin chunk. Structures at matching coordinates in different dimensions populate independently, and world-persistent tracking can prevent repopulation after a server restart.
- All three position searches apply the same sky-exposure rule, closing a gap that allowed pack members onto rooftops where their leader could not spawn. Nearby-floor searches now make up to eight attempts. Placement and collision checks prevent aquatic mobs from spawning on dry land and tall mobs from suffocating in ceilings.
- Spawn interval jitter now varies by ±25% as configured. The night boost uses the current dimension’s clock and no longer applies in the Nether or the End.
- Periodic and initial spawns receive armor and fire protection once. The natural spawn handler also skips the mod’s
ds_periodicmobs duringPositionCheck.
Elites and mod compatibility
- Added 11 optional elite affixes, disabled by default. Vigorous, Brutal, Swift, Armored, Unyielding, Regenerating, Resilient, Blazing, Venomous, Withering, and Volatile have distinct effects. Selection uses weights, prevents duplicates, and supports configurable counts and individual exclusions.
- Elites can now roll on vanilla spawns even when periodic spawning is disabled. They respect
persistentMobs, and their damage bonus applies to ranged and explosive attacks. Stable attribute-modifier UUIDs preserve stat changes from Apotheosis, ApothicAttributes, Scaling Health, and similar mods. - Player-killed elites can roll a datapack-configurable bonus table when
doMobLootis enabled. Its newgameplay/path prevents mob-drop injection from adding incompatible conditions, resolving Botania’s world-load validation warnings. Elite XP drops as orbs and works with normal XP handling and mods such as Clumps. - Boss filtering checks
#dangerousstructures:never_spawn,#forge:bosses,#c:bosses, maximum health, andcanSummon. Bundled exclusions cover Cataclysm, Bosses of Mass Destruction, Mowzie’s Mobs, Ice and Fire, and others. Use#dangerousstructures:never_enhancefor mobs that may spawn but should receive neither armor nor elite status. - Startup logs and
/ds compatreport detected interactions with Apotheosis, Adaptive Performance Tweaks (Spawn), Anti Mob Farm, Respawning Structures, Mob Sunscreen, and Structure Essentials. With Apotheosis installed, Dangerous Structures disables its own elites by default. Override this witheliteSpawns.compatMode. - Fixed Forge’s
displayTestdeclaration so clients can join a server running Dangerous Structures without installing the mod locally.
Performance
- Replaced per-tick scans of loaded chunks and the full structure registry with chunk-watch events and a per-tick discovery budget. Indexing skips chunks without structure references, reads
ChunkStatus.STRUCTURE_STARTSdirectly, and finds structures entirely above or belowY = 0. Out-of-range unloaded chunks no longer keep the discovery queue spinning. - Natural spawn checks inspect loaded chunk references and consult the structure index for large structures, avoiding synchronous loads of distant origin chunks. Spawn-position scans read from the loaded chunk once per column, stay within world height, and stop at configurable depth and hit limits.
- Per-structure schedules spread spawning across ticks. Structure-piece weights are computed once per structure, population counts query only mobs, and
/ds listuses aLinkedHashSetto deduplicate results.
Commands and diagnostics
- Added
/ds why,/ds profile,/ds compat,/ds affixes,/ds spawn,/ds purge,/ds forget, and/ds validate./ds whyexplains local spawning and village protection,/ds listdistinguishes protected villages from config exclusions, and/ds spawnreports more detail about spawn attempts. /ds validatereruns config checks and reports unknown IDs, contradictory options, and unmet dependencies in chat. Validation and config comments clarify thatuseVanillaSpawnWeightsrequiresdimensionSpecificMobsand that initial population ignoresminPlayerDistance./ds debugwithout arguments reports its current state. The toggle survives config reloads and resets when the server stops. Debug logging now records periodic spawn-position failures, and/ds inforeports the correct 64-block search radius.
Internal changes
- Reduced
TickSpawnHandlerto a roughly 160-line dispatcher. Shared helpers now handle mob selection, placement, enhancement, and piece weighting. Spawn timing and cap calculations can be tested independently of config state. - Unified dangerous-structure caching so API registrations take effect consistently. The API exposes an unmodifiable registration set. Also documented spawn-stat thread safety, replaced six hardcoded values with named constants, and simplified ambient sound timing.
- Expanded the test suite from 5 to 49 tests, covering distributed spawn positions, jitter bounds, cap scaling, piece weighting, affix selection, elite naming, population persistence, and profile parsing. Removed the unused datagen run configuration and generated-resources source directory.
This mod has no additional files