Skip to content

Cukkoo12/SoundCulling

Repository files navigation

🎧 Dynamic Sound Culling

Minecraft Modloaders License

A highly optimized, feature-rich Minecraft mod designed to prevent audio clutter and major FPS drops in sound-heavy environments (e.g. massive entity farms, industrial machinery, crowded multiplayer servers). By dynamically culling and dampening overlapping audio sources based on the player's view direction, distance, and custom category limits, it delivers a smooth and crisp audio experience without losing critical ambient queues.


✨ Key Features

  • 🚀 Dynamic Volume Dampening: Unlike simple mods that instantly mute overlapping sounds, Dynamic Sound Culling softly dampens excessive volumes, preserving atmospheric audio without blasting your speakers.
  • 👀 Directional Culling (Bakış Yönü Önceliği): Prioritizes sounds in front of the player (inside the field of view) and intelligently culled/dampens sounds coming from behind.
  • 📊 Per-Category Culling Limits: Configure independent culling limits for different sound types:
    • Hostile Mobs (Zombies, Creepers, Skeleton farms)
    • Neutral Mobs (Massive cow, sheep, or chicken farms)
    • Blocks/Spawners (Pistons, farms, block noises)
    • Ambient Sounds (Environmental loops)
    • Default Limit (Generic catch-all limit)
  • 🎨 Sleek Side-by-Side Config GUI: Access a beautiful, dual-column modern grid configuration panel directly from the game's mod menu across Fabric, Forge, and NeoForge.
  • Zero Performance Overhead: Built using highly optimized Mixins injecting directly into the Minecraft sound engine, leading to improved audio processing threads and frame rates.

🎨 Beautiful In-Game GUI

Configuring your sound limits has never been easier. The integrated config panel features side-by-side grids, real-time value adjustments, responsive tooltip guides, and live session stats showing exactly how many sounds have been culled.

+-------------------------------------------------------------+
|                   DYNAMIC SOUND CULLING                     |
|                    Configuration Panel                      |
+------------------------------+------------------------------+
|     SYSTEM CONFIGURATION     |    SOUND CATEGORY LIMITS     |
|                              |                              |
|  Region Total      [ 6 ] +   |  Hostile Mobs     [ 3 ] +    |
|  Time Window       [ 20t] +  |  Neutral Mobs     [ 2 ] +    |
|  Region Size       [ 16b] +  |  Blocks/Spawners  [ 5 ] +    |
|  Debug Logs      [DISABLED]  |  Ambient Sounds   [ 4 ] +    |
|                              |  Default Limit    [ 3 ] +    |
+------------------------------+------------------------------+
|                     Session Culled: 342 sounds              |
|        [ Save & Close ]      [ Cancel ]      [ Reset ]      |
+-------------------------------------------------------------+

📐 Culling Logic Overview

graph TD
    A[Sound Triggered] --> B{Is Sound Whitelisted?}
    B -- Yes --> C[Play Sound Normally]
    B -- No --> D{Does Region Exceed Limits?}
    D -- No --> C
    D -- Yes --> E{Is Sound in Player's FOV?}
    E -- Yes --> F[Play Sound with Subtle Dampening]
    E -- No --> G[Cull / Dampen Volume Heavily]
    F --> H[Update Session Stats]
    G --> H
Loading

📥 Installation

Choose your preferred modloader and install the mod jar into your .minecraft/mods folder.

🧵 Fabric

  1. Make sure you have the Fabric Loader installed.
  2. Place the jar file and the Fabric API in your mods folder.
  3. (Optional) Install Mod Menu to access the in-game configuration panel.

🔨 Forge

  1. Download the correct Minecraft Forge installer.
  2. Put the jar file into your mods folder.
  3. The custom configuration panel is fully integrated with Forge's Mod List (click "Config" next to our mod).

⚡ NeoForge

  1. Download the modern NeoForge installer.
  2. Place the jar file in your mods folder.
  3. Access the custom config screen directly from the NeoForge Mods menu.

🛠️ Configuration Details

Configuration values are stored inside config/soundculling.json. You can edit them via the in-game GUI or directly edit the file.

Parameter Default Description
maxSoundsPerRegion 3 Maximum identical sound instances allowed inside a single region during the window.
maxTotalPerRegion 6 Maximum total combined sounds of any type allowed inside a single region.
windowTicks 20 Evaluation time window in game ticks (20 ticks = 1 second).
regionSize 16.0 Region boundary size in blocks (16.0 = 1 chunk).
limitHostile 3 Independent sound limit for Hostile mob sounds.
limitNeutral 2 Independent sound limit for Neutral mob sounds (perfect for animal farms!).
limitBlock 5 Sound limit for blocks, machinery, and spawners.
limitAmbient 4 Sound limit for ambient environment sound cues.
limitDefault 3 Default fallback limit for other sound categories.
debugLogging false Enables real-time culling information logging to the console.

🚀 Game Commands

You can also control settings and inspect culling statistics dynamically using in-game chat commands:

  • /soundculling — Displays current mod limits, region settings, and total culled sound statistics for the session.
  • /soundculling limit <n> — Dynamically adjusts the default sound instance limit.
  • /soundculling total <n> — Dynamically adjusts the combined regional limit.

🏗️ Building from Source

To compile the projects yourself, clone the repository and run gradle:

# Clone the repository
git clone https://github.com/yourusername/SoundCulling.git
cd SoundCulling

# Build Fabric (root project)
gradlew build

# Build Forge port
cd forge
gradlew build

# Build NeoForge port
cd ../neoforge
gradlew build

The compiled mod files will be located in each subproject's build/libs/ directory.


📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages