# henkelmax/sound-physics-remastered architecture

> Architecture diagram of the GitHub repository henkelmax/sound-physics-remastered, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/henkelmax/sound-physics-remastered
- Repository: https://github.com/henkelmax/sound-physics-remastered

## Overview

Sound Physics Remastered is a Minecraft client mod that alters sound playback using block-aware attenuation, absorption, and reverberation. Its main workflow is to intercept sound processing, evaluate the sound’s environment against the client world, and apply the resulting filters and reverb sends through the audio engine. Configuration controls acoustic behavior and block material properties; optional branches provide debug ray rendering and Simple Voice Chat integration. The excerpts establish core processing and world-cache behavior, but do not expose every mixin or integration call site.

Main entry points: [`common/src/main/java/com/sonicether/soundphysics/SoundPhysics.java`](https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/SoundPhysics.java) (Sound Processor), [`common/src/main/java/com/sonicether/soundphysics/mixin/ClientLevelMixin.java`](https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/mixin/ClientLevelMixin.java) (Level Hooks), [`common/src/main/java/com/sonicether/soundphysics/utils/LevelAccessUtils.java`](https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/utils/LevelAccessUtils.java) (Level Cache Access), [`common/src/main/java/com/sonicether/soundphysics/mixin/SoundSystemMixin.java`](https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/mixin/SoundSystemMixin.java) (Sound Hooks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_hooks["Game Hooks"]
  node_soundhooks["Sound Hooks"]
  node_levelhooks["Level Hooks"]
  node_loginhook["Login Hook"]
end

subgraph group_acoustics["Acoustic Processing"]
  node_processor["Sound Processor<br/>[SoundPhysics.java]"]
  node_raycast["Ray Casting<br/>[RaycastUtils.java]"]
  node_renderer["Ray Debug Renderer"]
  node_rate["Sound Rate Limits"]
end

subgraph group_world["World Sampling"]
  node_worldaccess["Level Cache Access"]
  node_clone["Cloned Client Level"]
  node_proxy["Level Proxy"]
end

subgraph group_settings["Settings and Integrations"]
  node_config["Sound Configuration"]
  node_reflectivity["Block Reflectivity"]
  node_occlusion["Occlusion Settings"]
  node_reverb["Reverb Parameters<br/>[ReverbParams.java]"]
  node_voicechat["Voice Chat Adapter"]
end

node_minecraft(("Minecraft Client"))
node_audio(("Audio Engine"))

node_minecraft -->|"dispatches playback"| node_soundhooks
node_soundhooks -->|"processes sound"| node_processor
node_minecraft -->|"ticks level"| node_levelhooks
node_levelhooks -->|"updates cache"| node_worldaccess
node_levelhooks -->|"resets counts"| node_rate
node_loginhook -->|"loads level"| node_worldaccess
node_processor -->|"casts rays"| node_raycast
node_processor -->|"checks limit"| node_rate
node_processor -->|"records debug rays"| node_renderer
node_processor -->|"reads settings"| node_config
node_processor -->|"reads block values"| node_reflectivity
node_processor -->|"uses thresholds"| node_occlusion
node_processor -->|"builds reverb"| node_reverb
node_worldaccess -->|"creates snapshot"| node_clone
node_clone -->|"implements access"| node_proxy
node_processor -->|"sets filters"| node_audio
node_voicechat -.->|"integrates audio"| node_processor

click node_soundhooks "https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/mixin/SoundSystemMixin.java"
click node_levelhooks "https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/mixin/ClientLevelMixin.java"
click node_loginhook "https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/mixin/ClientPacketListenerMixin.java"
click node_processor "https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/SoundPhysics.java"
click node_raycast "https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/utils/RaycastUtils.java"
click node_renderer "https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/debug/RaycastRenderer.java"
click node_rate "https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/utils/SoundRateManager.java"
click node_worldaccess "https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/utils/LevelAccessUtils.java"
click node_clone "https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/world/ClonedClientLevel.java"
click node_proxy "https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/world/ClientLevelProxy.java"
click node_config "https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/config/SoundPhysicsConfig.java"
click node_reflectivity "https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/config/ReflectivityConfig.java"
click node_occlusion "https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/config/OcclusionConfig.java"
click node_reverb "https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/config/ReverbParams.java"
click node_voicechat "https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/integration/voicechat/SimpleVoiceChatPlugin.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_soundhooks,node_levelhooks,node_loginhook,node_minecraft toneBlue
class node_processor,node_raycast,node_renderer,node_rate toneAmber
class node_worldaccess,node_clone,node_proxy toneMint
class node_config,node_reflectivity,node_occlusion,node_reverb,node_voicechat toneRose
class node_audio toneIndigo
```

## Components

### Game Hooks

- [Sound Hooks](https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/mixin/SoundSystemMixin.java): `common/src/main/java/com/sonicether/soundphysics/mixin/SoundSystemMixin.java`
- [Level Hooks](https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/mixin/ClientLevelMixin.java): `common/src/main/java/com/sonicether/soundphysics/mixin/ClientLevelMixin.java`
- [Login Hook](https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/mixin/ClientPacketListenerMixin.java): `common/src/main/java/com/sonicether/soundphysics/mixin/ClientPacketListenerMixin.java`

### Acoustic Processing

- [Sound Processor](https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/SoundPhysics.java): `common/src/main/java/com/sonicether/soundphysics/SoundPhysics.java`
- [Ray Casting](https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/utils/RaycastUtils.java): `common/src/main/java/com/sonicether/soundphysics/utils/RaycastUtils.java`
- [Ray Debug Renderer](https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/debug/RaycastRenderer.java): `common/src/main/java/com/sonicether/soundphysics/debug/RaycastRenderer.java`
- [Sound Rate Limits](https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/utils/SoundRateManager.java): `common/src/main/java/com/sonicether/soundphysics/utils/SoundRateManager.java`

### World Sampling

- [Level Cache Access](https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/utils/LevelAccessUtils.java): `common/src/main/java/com/sonicether/soundphysics/utils/LevelAccessUtils.java`
- [Cloned Client Level](https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/world/ClonedClientLevel.java): `common/src/main/java/com/sonicether/soundphysics/world/ClonedClientLevel.java`
- [Level Proxy](https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/world/ClientLevelProxy.java): `common/src/main/java/com/sonicether/soundphysics/world/ClientLevelProxy.java`

### Settings and Integrations

- [Sound Configuration](https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/config/SoundPhysicsConfig.java): `common/src/main/java/com/sonicether/soundphysics/config/SoundPhysicsConfig.java`
- [Block Reflectivity](https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/config/ReflectivityConfig.java): `common/src/main/java/com/sonicether/soundphysics/config/ReflectivityConfig.java`
- [Occlusion Settings](https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/config/OcclusionConfig.java): `common/src/main/java/com/sonicether/soundphysics/config/OcclusionConfig.java`
- [Reverb Parameters](https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/config/ReverbParams.java): `common/src/main/java/com/sonicether/soundphysics/config/ReverbParams.java`
- [Voice Chat Adapter](https://github.com/henkelmax/sound-physics-remastered/blob/master/common/src/main/java/com/sonicether/soundphysics/integration/voicechat/SimpleVoiceChatPlugin.java): `common/src/main/java/com/sonicether/soundphysics/integration/voicechat/SimpleVoiceChatPlugin.java`

### Other components

- **Minecraft Client**
- **Audio Engine**

## Connections

- Minecraft Client → Sound Hooks: dispatches playback
- Sound Hooks → Sound Processor: processes sound
- Minecraft Client → Level Hooks: ticks level
- Level Hooks → Level Cache Access: updates cache
- Level Hooks → Sound Rate Limits: resets counts
- Login Hook → Level Cache Access: loads level
- Sound Processor → Ray Casting: casts rays
- Sound Processor → Sound Rate Limits: checks limit
- Sound Processor → Ray Debug Renderer: records debug rays
- Sound Processor → Sound Configuration: reads settings
- Sound Processor → Block Reflectivity: reads block values
- Sound Processor → Occlusion Settings: uses thresholds
- Sound Processor → Reverb Parameters: builds reverb
- Level Cache Access → Cloned Client Level: creates snapshot
- Cloned Client Level → Level Proxy: implements access
- Sound Processor → Audio Engine: sets filters
- Voice Chat Adapter → Sound Processor: integrates audio
