blob: 0ea81ab5377df3e95cc7ba5744b9d925d35b68d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
package gregtech.client;
import net.minecraft.client.audio.ISound;
import net.minecraft.client.audio.ITickableSound;
import net.minecraft.util.ResourceLocation;
public class ElectricJukeboxSound implements ISound, ISeekingSound, ITickableSound {
public final ResourceLocation soundResource;
public float volume = 1.0F;
public float pitch = 1.0F;
public float xPosition;
public float yPosition;
public float zPosition;
public boolean repeating = false;
public int repeatDelay = 0;
public ISound.AttenuationType attenuationType = AttenuationType.LINEAR;
public boolean donePlaying = false;
public final long seekMs;
public ElectricJukeboxSound(ResourceLocation resource, long seekMs) {
this.soundResource = resource;
this.seekMs = seekMs;
}
public ElectricJukeboxSound(ResourceLocation soundResource, float volume, long seekMs, float xPosition,
float yPosition, float zPosition) {
this(soundResource, seekMs);
this.volume = volume;
this.xPosition = xPosition;
this.yPosition = yPosition;
this.zPosition = zPosition;
}
@Override
public long getSeekMillisecondOffset() {
return seekMs;
}
@Override
public ResourceLocation getPositionedSoundLocation() {
return soundResource;
}
@Override
public boolean canRepeat() {
return repeating;
}
@Override
public int getRepeatDelay() {
return repeatDelay;
}
@Override
public float getVolume() {
return volume;
}
@Override
public float getPitch() {
return pitch;
}
@Override
public float getXPosF() {
return xPosition;
}
@Override
public float getYPosF() {
return yPosition;
}
@Override
public float getZPosF() {
return zPosition;
}
@Override
public AttenuationType getAttenuationType() {
return attenuationType;
}
@Override
public boolean isDonePlaying() {
return donePlaying;
}
@Override
public void update() {
// no-op
}
}
|