![[AN]Adaptive Nemesis](https://cdn.modrinth.com/data/anacxDIl/f63c99aa9be78e31253e68c2c8368f95ea97d58e.gif)
[AN]Adaptive Nemesis
The dynamic difficulty balancing module specifically designed for integration packs aims to address the issue of difficulty imbalance in current mainstream integration packs, where the early game is too easy and the late game is too challenging.
Tags
Creators
Details
1.0.16
Compatibility
Changes
📜 Adaptive Nemesis Changelog
v1.0.16 (2026-08-30) 🎯
⏳ Feature: Nemesis Auto-Despawn
NemesisConfig.java: Added 3 new config options:ENABLE_NEMESIS_AUTO_DISAPPEAR— toggle on/offNEMESIS_AUTO_DISAPPEAR_SECONDS— lifetime (default: 300s / 5 min)NEMESIS_DISAPPEAR_MESSAGE— despawn notification message
NemesisSystem.java: AddednemesisSpawnTimesMap to track each nemesis spawn timestamp. NewonEntityTick()periodically polls and auto-discard()s entities past their lifetime.NemesisSystem.java: Records spawn time in bothconvertToNemesis()andconvertToNemesisManual()— command-spawned nemeses are equally controlled.zh_cn.json/en_us.json: New translation keyadaptive_nemesis.nemesis.disappear- 🇨🇳 "%s 已经消失了..."
- 🇬🇧 "%s has disappeared..."
- Effect: Nemeses (natural spawn or command-summoned) automatically vanish after the configured duration, preventing performance bloat and gameplay imbalance from permanent stragglers.
🔧 Fix: Config Type Switched to SERVER — Multiplayer Sync
AdaptiveNemesisMod.java: Config registration changed fromCOMMON→SERVER. Server becomes config authority; NeoForge auto-syncs to all clients.Config.java: AddedisServerSide()environment check.saveToFile()now has server-side protection — multiplayer clients no longer attempt to write read-only configs.AdaptiveNemesisConfigScreen.java: AddedreadOnlyfield. Multiplayer client controls are greyed out with a read-only hint to prevent accidental edits.AdaptiveNemesisConfigScreen.java:markChanged()now has read-only guard — multiplayer clients are blocked from saving.en_us.json/zh_cn.json: New localization keyreadonly_hintfor the read-only tooltip.- ⚠️ Note: Config file renamed from
adaptive_nemesis-common.toml→adaptive_nemesis-server.toml. Existing configs need manual migration.
💥 Fix: Enchantment Scaling Causing Save Crashes (Reconnect Failure)
EnchantmentScalingHandler.java: Resets enchantment caches on server shutdown (resetCaches()method) — preventsHolder.Reference<Enchantment>stale references from singleton pattern.EnchantmentScalingHandler.java: Validates Holder validity inapplyCoreEnchantments()with double-check onResourceKeyexistence in server registry.EnchantmentScalingHandler.java: Addedholder.isBound()validation inapplyModCompatibleEnchantments()to prevent network encoding failures.InvasionSystem.java: Added Holder validation inapplyFrostWalkerBoots()to prevent Frost Walker enchantment from causing network encoding exceptions.ModEventHandler.java: CallsEnchantmentScalingHandler.resetCaches()onServerStoppingEvent, ensuring stale references are purged on shutdown.EnchantmentScalingHandler.java: FixedcollectCompatibleEnchantments()Holder.unwrapKey()API call.
🔄 Fix: Invasion Event Infinite Loop (Spawning More & More)
InvasionSystem.java: AddedplayerInvasionCooldownsMap tracking per-player cooldown (UUID → cooldown expiry timestamp).InvasionSystem.java: Added cooldown check inincrementUndeadKillCount()— shows remaining time hint during cooldown period.InvasionSystem.java: Auto-sets cooldown on invasion trigger (default: 15 min, configurable).InvasionSystem.java: Clears cooldown inhandleInvasionVictory(), allowing the next invasion to trigger normally.zh_cn.json/en_us.json: New cooldown warning translations:cooldown_warningcooldown_warning_minutescooldown_warning_seconds
InvasionConfig.java: ExistinginvasionCooldownMinutesconfig (default: 15 min) — no new config needed.
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:anacxDIl:6Gl5KWVj"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:anacxDIl:6Gl5KWVj"
}
