You are viewing a potentially older version of this package. View all versions.
sighsorry-Blasted_Swimming_Tarred_Bug_Fix-1.2.0 icon

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.

Date uploaded 3 weeks ago
Version 1.2.0
Download link sighsorry-Blasted_Swimming_Tarred_Bug_Fix-1.2.0.zip
Downloads 144
Dependency string sighsorry-Blasted_Swimming_Tarred_Bug_Fix-1.2.0

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2333 icon
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.2333

README

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 LiquidVolume raycast arrays using a short-lived allocator.
  • Scene cleanup failing on missing, destroyed, or mismatched ZNetView data.
  • 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 WaterVolume and LiquidSurface before 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 LiquidVolume raycast arrays valid for their full lifetime.
  • Cleans invalid or mismatched ZNetScene entries without dereferencing destroyed views.

Character lifecycle protection

  • Safely tears down StatusEffect start effects with missing or invalid ZNetView components.
  • Repairs Character registry and EnemyHud bookkeeping when Character.OnDestroy is 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.FireProjectileBurst prefix 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 LiquidVolume lifetime 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

GitHub

https://github.com/sighsorry1029/BlastedSwimmingTarredBugFix

CHANGELOG

Version Update Notes
1.2.2 - Separate MagicPlugin cosmetic ZDO prevention from projectile, teleport, and registry compatibility to reduce change scope without changing supported behavior
- Remove redundant cosmetic prefab probes and derive stable hashes from their names
- Simplify stale-liquid clearing paths and saturate corrupted liquid counters at integer bounds
- Consolidate lifecycle patch rollback and remove forwarding-only Harmony patch classes
- Isolate module initialization failures so one unavailable compatibility path does not block the remaining fixes
- Pin the C# language version and require a matching changelog row before creating a release package
1.2.1 - Prevent structurally compatible MagicPlugin 2.1.9+ Flame/Thunder/Arctic launch, Thunder/Arctic impact, and shared iceblock-destruction cosmetics from creating short-lived peer-owned ZDOs
- Prevent Ice Scepter Nova rings from leaving cosmetic network objects without a destruction path
- Probe each known prefab graph once per scene and keep original behavior for independently incompatible features
- Tag existing Staff projectile ZDOs so shared Flame/Lightning Wand projectiles do not receive Staff-only launch replay
- Replay compatible cosmetics locally while preserving gameplay projectiles, AOE, and iceblocks
- Remove the Diagnostics.DebugLogging option and its diagnostic-only instrumentation
- Require matching 1.2.1 server and client builds to avoid mixed cosmetic behavior
1.2.0 - Fold RuntimeFixes and InteropFixes functionality into the existing BlastedSwimmingTarredBugFix package
- Add guarded Character and StatusEffect teardown, registry, and EnemyHud cleanup
- Add optional MagicPlugin projectile, successful summon teleport, and Character registry compatibility
- Keep the existing Blasted GUID, DLL, Thunderstore package, and server-required policy
- Replace the old configuration layout without migration; remove retired InteropFixes.dll or RuntimeFixes.dll copies
1.1.1 - Preserve ZDO recreation and prevent partial scene cleanup reprocessing
- Harden mixed-liquid validation and automate versioned Thunderstore packaging
1.1.0 - Add integrated LiquidVolume lifetime and ZNetScene cleanup protections
- Harden liquid source validation, mixed-liquid recovery, and release packaging
1.0.3 - Fix random swimming regression in Plains and Mistlands
- Add throttled local-player stale liquid recovery
1.0.2 - Refactoring and optimizations
- Restore guarded local-player stale liquid recovery
1.0.0 - Initial Release