Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Blasted Swimming Tarred Bug Fix
Fixes for stale swimming/tar states, ZNetScene cleanup errors, LiquidVolume array lifetime, Character and StatusEffect teardown, EnemyHud cleanup, and optional MagicPlugin projectile, summon teleport, and registry interoperability.
| Last updated | 19 hours ago |
| Total downloads | 832 |
| Total rating | 3 |
| Categories | Mods Tweaks Server-side Client-side AI Generated |
| Dependency string | sighsorry-Blasted_Swimming_Tarred_Bug_Fix-1.2.0 |
| Dependants | 2 other packages depend on this package |
This mod requires the following mods to function
denikson-BepInExPack_Valheim
BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.
Preferred version: 5.4.2333README
BlastedSwimmingTarredBugFix
Defensive runtime fixes for stale liquid state, scene and Character lifecycle cleanup, and optional MagicPlugin interoperability.
What It Fixes
- Random swimming while nowhere near water.
- Random tarred state after leaving a Plains tar pit.
- Portal, dungeon, or scene transitions leaving old liquid state behind.
- Carts or floating objects keeping water/tar state after a missed trigger exit.
- Long-lived
LiquidVolumeraycast arrays using a short-lived allocator. - Scene cleanup failing on missing, destroyed, or mismatched
ZNetViewdata. - Malformed StatusEffect start effects interrupting Character destruction.
- Character registry and EnemyHud entries surviving incomplete destruction.
- MagicPlugin projectile patches repeatedly registering configuration handlers.
- MagicPlugin summon teleport and Character registry patches reading destroyed or incomplete objects.
How It Works
Liquid and scene protection
- Rejects stale positive liquid updates when the source no longer overlaps the target.
- Removes stale entries from
WaterVolumeandLiquidSurfacebefore floater updates. - Clamps water/tar counters so missed exits cannot drive them below zero.
- Clears purged state only when no current liquid trigger overlaps the target.
- Clears player liquid state after a teleport successfully starts.
- Keeps
LiquidVolumeraycast arrays valid for their full lifetime. - Cleans invalid or mismatched
ZNetSceneentries without dereferencing destroyed views.
Character lifecycle protection
- Safely tears down StatusEffect start effects with missing or invalid
ZNetViewcomponents. - Repairs Character registry and EnemyHud bookkeeping when
Character.OnDestroyis incomplete or throws. - Prunes tracked creature-removal state after scene teardown.
Optional MagicPlugin interoperability
When MagicPlugin is installed, each compatible fix is enabled independently only after its expected types, methods, fields, and Harmony patch are validated:
- Replaces the affected
Attack.FireProjectileBurstprefix with a guarded implementation. - Moves valid followed summons only after a player teleport succeeds.
- Removes destroyed Characters before MagicPlugin reads the global registry.
MagicPlugin is optional and is not a Thunderstore package dependency.
Automatic Compatibility
- MyPitsDontLeak disables the integrated
LiquidVolumelifetime module. - Scenic disables the integrated scene cleanup module.
- MagicPlugin support stays inactive when the expected plugin or patch structure is absent.
Configuration
[Synchronization]
LockConfiguration = true
[Liquid]
Enabled = true
BoundsPadding = 0.75
[Diagnostics]
DebugLogging = false
Only the liquid settings are synchronized. Character lifecycle and compatibility modules are automatic and have no configuration switches.
The 1.2.0 configuration layout is not migrated from older layouts. Delete
BepInEx/config/sighsorry.blastedswimmingtarredbugfix.cfg once if you want to
remove obsolete entries and regenerate a clean file.
Credits
- MyPitsDontLeak by AzumattDev (MIT-0)
- Scenic by ComfyMods (GPL-3.0)
GitHub
https://github.com/sighsorry1029/BlastedSwimmingTarredBugFix