SoundRegistry .java

net.minecraft.client.audio.SoundRegistry (class): members: registerSound, soundRegistry, clearMap, createUnderlyingMap. imports: RegistrySimple, Maps.

net.minecraft.client.audioclass31 linesclientextends RegistrySimple<ResourceLocation918 B

API Surface (3)

Map<ResourceLocation, SoundEventAccessorComposite> createUnderlyingMap()
void registerSound(SoundEventAccessorComposite p_148762_1_)
void clearMap()

Fields & Constants (1)

soundRegistry

Code Graph: Dependencies (3)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

SoundRegistry.java31 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.client.audio;
2
3
import com.google.common.collect.Maps;
4
import java.util.Map;
5
import net.minecraft.util.RegistrySimple;
6
import net.minecraft.util.ResourceLocation;
7
8
public class SoundRegistry extends RegistrySimple<ResourceLocation, SoundEventAccessorComposite>
9
{
10
    private Map<ResourceLocation, SoundEventAccessorComposite> soundRegistry;
11
12
    protected Map<ResourceLocation, SoundEventAccessorComposite> createUnderlyingMap()
13
    {
14
        this.soundRegistry = Maps.<ResourceLocation, SoundEventAccessorComposite>newHashMap();
15
        return this.soundRegistry;
16
    }
17
18
    public void registerSound(SoundEventAccessorComposite p_148762_1_)
19
    {
20
        this.putObject(p_148762_1_.getSoundEventLocation(), p_148762_1_);
21
    }
22
23
    /**
24
     * Reset the underlying sound map (Called on resource manager reload)
25
     */
26
    public void clearMap()
27
    {
28
        this.soundRegistry.clear();
29
    }
30
}
31

Deobfuscated MCP 1.8.9 source of SoundRegistry from Marcelektro/MavenMCP-1.8.9 (net/minecraft/client/audio/SoundRegistry.java), stored verbatim.