How devatiywork/mass-and-momentum works
Mass & Momentum is a Project Zomboid Build 42 Java mod suite: Vehicle Physics adjusts vehicle mass and interactions, while the optional Multiplayer Ragdolls mod enables ragdolls in multiplayer. The main workflow is to load the mods through ZombieBuddy, apply gated game-method patches, and use settings and vehicle rules to affect driving, impacts, vegetation, fuel, and multiplayer corpse placement. The graph retains the documented feature areas and substantial indexed modules. Source excerpts are partial, so some feature relationships are documented at the README level rather than traced through every hook.
Main entry points: Patch_vehicleFloor.java Vehicle physics patch · Main.java Vehicle Physics mod · VehicleCfg.java Vehicle rules · LabSettings.java Sandbox settings
Components 25
Runtime and safety
- Vehicle Physics mod
mods/LabVehiclePhysics/src/pz/labvehicle/Main.java - Safety gate
mods/LabVehiclePhysics/src/pz/labvehicle/LabGate.java - Suspension limit patch
mods/LabVehiclePhysics/src/pz/labvehicle/NativePatch.java
Settings and vehicle rules
- Sandbox settings
mods/LabVehiclePhysics/src/pz/labvehicle/LabSettings.java - Vehicle rules
mods/LabVehiclePhysics/src/pz/labvehicle/VehicleCfg.java - Vehicle settings table
mods/LabVehiclePhysics/src/pz/labvehicle/VehicleTable.java - Lua vehicle registry
mods/LabVehiclePhysics/src/pz/labvehicle/LuaRegistry.java - Server rule table
mods/LabVehiclePhysics/src/pz/labvehicle/ServerTable.java
Vehicle interactions
- Engine power patch
mods/LabVehiclePhysics/src/pz/labvehicle/Patch_enginePower.java - Vehicle physics patch
mods/LabVehiclePhysics/src/pz/labvehicle/Patch_vehicleFloor.java - Animal impacts
mods/LabVehiclePhysics/src/pz/labvehicle/AnimalImpact.java - Animal throws
mods/LabVehiclePhysics/src/pz/labvehicle/AnimalThrow.java - Vegetation drag
mods/LabVehiclePhysics/src/pz/labvehicle/VegetationDrag.java - Tree breaking
mods/LabVehiclePhysics/src/pz/labvehicle/TreeBreak.java - Track footprint
mods/LabVehiclePhysics/src/pz/labvehicle/TrackFootprint.java - Horde impact report
mods/LabVehiclePhysics/src/pz/labvehicle/HordeReport.java - Vehicle service
mods/LabVehiclePhysics/src/pz/labvehicle/VehicleService.java
Multiplayer
- Corpse landing sync
mods/LabVehiclePhysics/src/pz/labvehicle/CorpseSync.java - Remote ragdoll update
mods/LabVehiclePhysics/src/pz/labvehicle/RemoteRagdoll.java - Invalid-value guards
mods/LabVehiclePhysics/src/pz/labvehicle/NanGuard.java
Optional ragdolls
- Multiplayer Ragdolls mod
mods/LabRagdollMP/src/pz/labragdoll/Main.java - Ragdoll safety gate
mods/LabRagdollMP/src/pz/labragdoll/LabGate.java - Ragdoll game hooks
mods/LabRagdollMP/src/pz/labragdoll/Patch_IsoGameCharacter_canRagdoll.java
Other components
- ZombieBuddy
- Project Zomboid
Connections 32
- ZombieBuddy → Vehicle Physics mod: loads
- ZombieBuddy → Multiplayer Ragdolls mod: loads
- Vehicle Physics mod → Project Zomboid: hooks methods
- Multiplayer Ragdolls mod → Project Zomboid: lifts ragdoll ban
- Vehicle Physics mod → Safety gate: gates patches
- Vehicle Physics mod → Suspension limit patch: raises suspension limit
- Engine power patch → Vehicle rules: reads rules
mods/LabVehiclePhysics/src/pz/labvehicle/Patch_enginePower.java - Engine power patch → Sandbox settings: reads switches
mods/LabVehiclePhysics/src/pz/labvehicle/Patch_enginePower.java - Vehicle physics patch → Sandbox settings: reads switches
mods/LabVehiclePhysics/src/pz/labvehicle/Patch_vehicleFloor.java - Vehicle physics patch → Vehicle rules: reads rules
mods/LabVehiclePhysics/src/pz/labvehicle/Patch_vehicleFloor.java - Vehicle physics patch → Vegetation drag: uses drag
mods/LabVehiclePhysics/src/pz/labvehicle/Patch_vehicleFloor.java - Vehicle physics patch → Tree breaking: uses tree logic
mods/LabVehiclePhysics/src/pz/labvehicle/Patch_vehicleFloor.java - Vehicle physics patch → Track footprint: checks tracks
mods/LabVehiclePhysics/src/pz/labvehicle/Patch_vehicleFloor.java - Vehicle physics patch → Horde impact report: reports impacts
mods/LabVehiclePhysics/src/pz/labvehicle/Patch_vehicleFloor.java - Vehicle physics patch → Vehicle service: calls service
mods/LabVehiclePhysics/src/pz/labvehicle/Patch_vehicleFloor.java - Animal impacts → Animal throws: shares impact logic
mods/LabVehiclePhysics/src/pz/labvehicle/AnimalImpact.java - Corpse landing sync → Sandbox settings: reads settings
mods/LabVehiclePhysics/src/pz/labvehicle/CorpseSync.java - Corpse landing sync → Server rule table: uses server table
mods/LabVehiclePhysics/src/pz/labvehicle/CorpseSync.java - Corpse landing sync → Tree breaking: warns through
mods/LabVehiclePhysics/src/pz/labvehicle/CorpseSync.java - Remote ragdoll update → Sandbox settings: reads settings
mods/LabVehiclePhysics/src/pz/labvehicle/RemoteRagdoll.java - Remote ragdoll update → Tree breaking: warns through
mods/LabVehiclePhysics/src/pz/labvehicle/RemoteRagdoll.java - Multiplayer Ragdolls mod → Ragdoll safety gate: gates hooks
- Ragdoll safety gate → Ragdoll game hooks: controls
- Project Zomboid → Server rule table: sends rules to clients
mods/LabVehiclePhysics/src/pz/labvehicle/ServerTable.java - Lua vehicle registry → Vehicle rules: registers vehicle data
mods/LabVehiclePhysics/src/pz/labvehicle/LuaRegistry.java - Vehicle settings table → Vehicle rules: uses vehicle rules
mods/LabVehiclePhysics/src/pz/labvehicle/VehicleTable.java - Vehicle rules → Server rule table: provides rules
mods/LabVehiclePhysics/src/pz/labvehicle/VehicleCfg.java - Track footprint → Horde impact report: reports releases
mods/LabVehiclePhysics/src/pz/labvehicle/TrackFootprint.java - Animal impacts → Sandbox settings: uses feature switches
- Project Zomboid → Corpse landing sync: syncs landing state
- Project Zomboid → Vehicle Physics mod: provides sandbox settings
- Project Zomboid → Vehicle Physics mod: provides vehicle physics