1.4.1
Compatibility
Changes
[1.4.1] — 2026-04-18 — Bug Fix Release
Fixed — Critical
-
Task leak on reload (
/nlag reload) —BackupManager.start()was called twice inonEnable()(once directly, once viastartRuntimeServices()), causing every scheduled task to be registered a second time on reload. The duplicate direct call has been removed; the initial backup is now triggered asynchronously insidestart()when no backups exist.stopRuntimeServices()now also callsengine.cancelAllPendingBatchTasks()before stopping the throttle task, ensuring all in-flightrunTaskLaterbatch tasks are cancelled before any new tasks are registered. (LagEngine,NeuroLag) -
collectTargets()running every tick on the main thread —LagEngine.collectTargets()calledworld.getLivingEntities()on every monitor tick, causing significant lag spikes on servers with large mob populations. The result is now cached per-world and rebuilt at most once every 4 ticks (~0.2 s). The cache is invalidated onrestoreAll()and on world state transitions. (LagEngine) -
FOLLOW_RANGE not fully restored for protected-zone mobs —
applyAiBatched()setAI = truefor protected mobs but did not always restoreFOLLOW_RANGEto its default value, so mobs could permanently retain a reduced follow range after leaving a zone. The fix unconditionally callsattr.setBaseValue(attr.getDefaultValue())for every protected mob encountered. Additionally, a newrestoreWorld(World)helper is called whenever a world transitions back toNORMAL, guaranteeing a full attribute restore even for mobs that were never re-processed by the batch scheduler. (LagEngine) -
Manual override (
/nlag toggle) not restoring mobs correctly — in-flightrunTaskLaterbatch tasks scheduled byapplyAiBatched()could execute afterrestoreAll()and re-apply AI restrictions or reduced follow ranges, leaving mobs frozen.handleToggle()now callsengine.cancelAllPendingBatchTasks()beforeengine.restoreAll()so no pending task survives the toggle. (LagEngine,NeuroLag)
Fixed — High
-
WebDashboard query-string token auth — passing
?token=...in the URL is insecure (tokens appear in server access logs, browser history, and HTTP referrer headers). The query-string fallback is now disabled by default. A new config keyweb-dashboard.auth.allow-query-token(defaultfalse) must be explicitly set totrueto re-enable it. The existing warning is preserved and now also states the config key needed to disable the fallback permanently. (WebDashboard,ConfigManager,monitors.yml) -
Redis subscriber thread not shutting down gracefully —
MultiServerSync.stop()calledredisSubThread.interrupt()but returned immediately, so the thread could still be holding a Jedis resource whenjedisPool.close()ran, causing pool-exhaustion exceptions in the server log on every reload. The fix addsredisSubThread.join(3000)afterinterrupt(), giving the thread up to 3 seconds to exit cleanly before the pool is closed. (MultiServerSync) -
MySQL reconnect logic throwing repeatedly when DB is down —
ensureConnected()calledDriverManager.getConnection()immediately on every sync cycle failure, flooding the log with stack traces. The fix introduces an atomic error-streak counter and an exponential back-off (sleep time =min(streak * 2, 30)seconds before reconnect). Log output now uses a power-of-two gating strategy (log on streak 1, 2, 4, 8, 16, …) to avoid noise during prolonged outages. (MultiServerSync) -
Batched AI task delay not capped — with 5 000+ mobs the delay between batches could reach 100 ticks (5 seconds), making mobs visibly unresponsive. The delay is now capped at 20 ticks (1 second) regardless of entity count. (
LagEngine) -
Smart culling could remove protected-zone mobs — the culling loop checked
zoneManager.isProtected()only in the main optimization path, not insidecull()itself. Mobs inside protected zones can now never be removed by smart culling. (LagEngine) -
BackupManager not backing up the
lang/directory — the ZIP bundle only included root-level.ymlfiles. Custom language files stored inplugins/NeuroLag/lang/would be lost on restore.collectConfigFiles()now recursively includeslang/*.ymlentries andrestoreZip()correctly recreates thelang/subdirectory on restore. (BackupManager)
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:NQv4Mv8q:D23eoWk6"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:NQv4Mv8q:D23eoWk6"
}

