SoundList .java

net.minecraft.client.audio.SoundList (class): members: canReplaceExisting, setReplaceExisting, setSoundCategory, replaceExisting, getSoundList, SoundEntry.

net.minecraft.client.audioclass137 linesclient3.1 KB

API Surface (18)

List<SoundList.SoundEntry> getSoundList()
boolean canReplaceExisting()
void setReplaceExisting(boolean p_148572_1_)
SoundCategory getSoundCategory()
void setSoundCategory(SoundCategory soundCat)
String getSoundEntryName()
void setSoundEntryName(String nameIn)
float getSoundEntryVolume()
void setSoundEntryVolume(float volumeIn)
float getSoundEntryPitch()
void setSoundEntryPitch(float pitchIn)
int getSoundEntryWeight()
void setSoundEntryWeight(int weightIn)
SoundList.SoundEntry.Type getSoundEntryType()
void setSoundEntryType(SoundList.SoundEntry.Type typeIn)
boolean isStreaming()
void setStreaming(boolean isStreaming)
SoundList.SoundEntry.Type getType(String p_148580_0_)

Fields & Constants (3)

soundList
replaceExisting
category

String literals (2)

"file"
"event"

Code Graph: Dependencies (2)

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

Full Source

SoundList.java137 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.client.audio;
2
3
import com.google.common.collect.Lists;
4
import java.util.List;
5
6
public class SoundList
7
{
8
    private final List<SoundList.SoundEntry> soundList = Lists.<SoundList.SoundEntry>newArrayList();
9
10
    /**
11
     * if true it will override all the sounds from the resourcepacks loaded before
12
     */
13
    private boolean replaceExisting;
14
    private SoundCategory category;
15
16
    public List<SoundList.SoundEntry> getSoundList()
17
    {
18
        return this.soundList;
19
    }
20
21
    public boolean canReplaceExisting()
22
    {
23
        return this.replaceExisting;
24
    }
25
26
    public void setReplaceExisting(boolean p_148572_1_)
27
    {
28
        this.replaceExisting = p_148572_1_;
29
    }
30
31
    public SoundCategory getSoundCategory()
32
    {
33
        return this.category;
34
    }
35
36
    public void setSoundCategory(SoundCategory soundCat)
37
    {
38
        this.category = soundCat;
39
    }
40
41
    public static class SoundEntry
42
    {
43
        private String name;
44
        private float volume = 1.0F;
45
        private float pitch = 1.0F;
46
        private int weight = 1;
47
        private SoundList.SoundEntry.Type type = SoundList.SoundEntry.Type.FILE;
48
        private boolean streaming = false;
49
50
        public String getSoundEntryName()
51
        {
52
            return this.name;
53
        }
54
55
        public void setSoundEntryName(String nameIn)
56
        {
57
            this.name = nameIn;
58
        }
59
60
        public float getSoundEntryVolume()
61
        {
62
            return this.volume;
63
        }
64
65
        public void setSoundEntryVolume(float volumeIn)
66
        {
67
            this.volume = volumeIn;
68
        }
69
70
        public float getSoundEntryPitch()
71
        {
72
            return this.pitch;
73
        }
74
75
        public void setSoundEntryPitch(float pitchIn)
76
        {
77
            this.pitch = pitchIn;
78
        }
79
80
        public int getSoundEntryWeight()
81
        {
82
            return this.weight;
83
        }
84
85
        public void setSoundEntryWeight(int weightIn)
86
        {
87
            this.weight = weightIn;
88
        }
89
90
        public SoundList.SoundEntry.Type getSoundEntryType()
91
        {
92
            return this.type;
93
        }
94
95
        public void setSoundEntryType(SoundList.SoundEntry.Type typeIn)
96
        {
97
            this.type = typeIn;
98
        }
99
100
        public boolean isStreaming()
101
        {
102
            return this.streaming;
103
        }
104
105
        public void setStreaming(boolean isStreaming)
106
        {
107
            this.streaming = isStreaming;
108
        }
109
110
        public static enum Type
111
        {
112
            FILE("file"),
113
            SOUND_EVENT("event");
114
115
            private final String field_148583_c;
116
117
            private Type(String p_i45109_3_)
118
            {
119
                this.field_148583_c = p_i45109_3_;
120
            }
121
122
            public static SoundList.SoundEntry.Type getType(String p_148580_0_)
123
            {
124
                for (SoundList.SoundEntry.Type soundlist$soundentry$type : values())
125
                {
126
                    if (soundlist$soundentry$type.field_148583_c.equals(p_148580_0_))
127
                    {
128
                        return soundlist$soundentry$type;
129
                    }
130
                }
131
132
                return null;
133
            }
134
        }
135
    }
136
}
137

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