@Environment(value=CLIENT) public class SoundLoader extends Object
Modifier and Type | Field and Description |
---|---|
private Map<Identifier,CompletableFuture<StaticSound>> |
loadedSounds |
private ResourceManager |
resourceManager |
Constructor and Description |
---|
SoundLoader(ResourceManager resourceManager) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
CompletableFuture<?> |
loadStatic(Collection<Sound> sounds) |
CompletableFuture<StaticSound> |
loadStatic(Identifier id) |
CompletableFuture<AudioStream> |
loadStreamed(Identifier id,
boolean repeatInstantly) |
private final ResourceManager resourceManager
private final Map<Identifier,CompletableFuture<StaticSound>> loadedSounds
public SoundLoader(ResourceManager resourceManager)
public CompletableFuture<StaticSound> loadStatic(Identifier id)
public CompletableFuture<AudioStream> loadStreamed(Identifier id, boolean repeatInstantly)
public void close()
public CompletableFuture<?> loadStatic(Collection<Sound> sounds)