Skip to content

Acoustic Rooms

Samuel De Oliveira edited this page Sep 30, 2026 · 2 revisions

Acoustic Rooms & Soundproofing

The Acoustic Rooms module provides designated spatial soundproofing, environmental reverberation, and automated voice filter stacking based on spatial Cuboid boundaries across both Paper / Purpur and Fabric.

Storage location:

  • Paper: plugins/DreamVoice/modules/room/
  • Fabric: config/dreamvoice/modules/room/

Key Capabilities

  • Full or Partial Sound Isolation (isolationPct): Block voice transmission through borders (e.g. 100% soundproof confessionals, padded cells, interrogation rooms).
  • Environmental Reverb Simulation: Add spatial reverberation tailored to room sizes (from small recording booths to massive cathedral halls).
  • Dynamic Filter Stacking: Automatically apply voice filters (e.g., muffled, gasmask, cave) when entering an acoustic zone, and detach them upon leaving.
  • Integrated with VoiceWall: Seamlessly cooperates with VoiceWallService to calculate boundary occlusion without manual raycasts.

Configuration (modules/room/config.json)

{
  "enabled": true,
  "persistence": {
    "saveOnStop": true,
    "autoSave": true,
    "autoSaveIntervalSeconds": 300
  },
  "presets": {
    "soundproof": {
      "id": "soundproof",
      "name": "Soundproof Booth",
      "isolationPct": 100,
      "reverb": {
        "enabled": false,
        "decay": 0.1,
        "roomSizeMs": 50,
        "wetGain": 0.0
      },
      "filters": []
    },
    "cathedral": {
      "id": "cathedral",
      "name": "Cathedral Hall",
      "isolationPct": 40,
      "reverb": {
        "enabled": true,
        "decay": 0.8,
        "roomSizeMs": 350,
        "wetGain": 0.55
      },
      "filters": []
    },
    "bunker": {
      "id": "bunker",
      "name": "Armored Bunker",
      "isolationPct": 95,
      "reverb": {
        "enabled": true,
        "decay": 0.4,
        "roomSizeMs": 100,
        "wetGain": 0.25
      },
      "filters": [
        "muffled"
      ]
    }
  }
}

Preset Parameters:

  • isolationPct (int, 0–100): Percentage of sound blocked across room boundaries. 100 means completely inaudible from outside.
  • reverb.decay (float): Reverb decay duration factor.
  • reverb.roomSizeMs (int): Simulated room dimension delay in milliseconds.
  • reverb.wetGain (float): Proportion of wet reverberated signal mixed with dry direct voice.
  • filters (array of strings): List of voice filter IDs automatically applied to players while inside the room.

In-Game Commands

Command Permission Description
/voice room list dreamvoice.room.admin Lists all active rooms with their bounds and assigned preset.
/voice room info <id> dreamvoice.room.admin Displays detailed isolation percentage, reverb, and filter stack.
/voice room delete <id> dreamvoice.room.admin Deletes an acoustic room definition.
/voice room reload dreamvoice.room.admin Reloads presets from config.json and rooms from data.json.

Java API Example (Paper & Fabric)

import fr.dreamin.dreamvoice.api.DreamVoiceAPI;
import fr.dreamin.dreamvoice.api.room.service.VoiceRoomService;
import fr.dreamin.dreamapi.api.cuboid.model.Cuboid;

VoiceRoomService roomService = DreamVoiceAPI.get().roomService();

// Create a soundproof room programmatically:
Cuboid bounds = new Cuboid(pos1, pos2);
roomService.createRoom("courtroom_booth", bounds, "soundproof");

Inter-Mod & Network Integration (Fabric)

Acoustic rooms can be created and managed via custom packets from world-generation or structure mods:

  • ServerBoundRoomCreatePacket
  • ServerBoundRoomDeletePacket
  • ServerBoundRoomUpdatePacket
  • ClientBoundRoomSyncPacket

For details, see Network Packets & Protocols.

Clone this wiki locally