Skip to content

JulianWww/StoppableSound-fabric

Repository files navigation

Fabric Example Mod

Build GitHub downloads GitHub contributors

Setup

repositories {
    maven {
        name = 'Denanu Mods'
        url = 'https://wandhoven.ddns.net/maven/'
    }
}

dependencies {
    modImplementation "net.denanu.StoppableSound:StoppableSound-<Minecraft_Version>:<StoppableSound_version>"
}

Usage

Stoppable sounds should only be used on the server. Clients side usage is unintended! Use the following code to ...
Play at a fixed location:

var stoppable = StoppableSound.of(world, pos, sound, category, volume, pitch).play();

Play at an entity:

var stoppable = StoppableSound.of(entity,sound, category, volume, pitch).play()

Stop a playing sound

stoppable.stop()