Skip to content

Building from Source

Scr0ols edited this page Jul 14, 2026 · 5 revisions

Building from Source

Requirements

  • Java 25 or later (must match the toolchain version in build.gradle)
  • Git

No other tools needed — the Gradle wrapper is included in the repo.


Steps

git clone https://github.com/scr0ols/soundtweaks.git
cd soundtweaks
./gradlew build

On Windows:

gradlew.bat build

The output .jar is at:

build/libs/soundtweaks-1.0.0.jar

Use the file without -sources or -dev in the name.


Running in a dev environment

To launch a Minecraft client with the mod loaded for testing:

./gradlew runClient

This starts a Minecraft instance with Fabric Loader, Fabric API, and SoundTweaks loaded. A run/ directory is created at the project root for the game data — separate from your normal .minecraft.


Project structure

src/
  main/java/com/scr0ols/soundtweaks/
    SoundTweaks.java           Mod entry point (ModInitializer)
    SoundCategory.java         Sound category enum with prefix matching
    SoundRegistry.java         Registers all game sounds on startup
    MissingBlockRegistry.java  Block entries not in the sound event registry
    VolumeConfig.java          Persistent config for sounds and blocks
    PresetConfig.java          Preset data and persistence
    VolumeResolver.java        Resolves effective volume at playback time

  client/java/com/scr0ols/soundtweaks/client/
    SoundTweaksClient.java     Client init, keybind registration, tick handler
    SoundDisplayHelper.java    Display name formatting for sounds

    gui/
      SoundTweaksScreen.java   Main screen (opened with K)
      PresetsScreen.java       Preset management screen
      SoundListWidget.java     Scrollable list of sound/block entries
      FilterDropdown.java      Reusable category/object dropdown
      ...                      (slider buttons, preset editor widgets)

    mixin/
      SoundEngineMixin.java    Intercepts SoundEngine.play() to apply volume
      LevelMixin.java          Intercepts block-level sound playback

src/main/resources/
  fabric.mod.json
  soundtweaks.mixins.json
  assets/soundtweaks/icon.png

Dependencies

Defined in gradle.properties:

Dependency Version
Minecraft 26.1.2
Fabric Loader 0.19.2
Fabric Loom 1.16-SNAPSHOT
Fabric API 0.150.0+26.1.2

License

GPL-3.0

Clone this wiki locally