aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/threads/GT_Runnable_Sound.java
diff options
context:
space:
mode:
authorShawn Buckley <shawntbuckley@gmail.com>2015-10-21 22:15:09 -0400
committerShawn Buckley <shawntbuckley@gmail.com>2015-10-21 22:15:09 -0400
commit123aa6ed288b2f67b0d47177f4d27cd6893daf3a (patch)
tree358e3704182f5b6fda44fa8b20605ab63edca092 /src/main/java/gregtech/api/threads/GT_Runnable_Sound.java
parent43ddecc7b9715d2038747566f89930b5db8d0181 (diff)
downloadGT5-Unofficial-123aa6ed288b2f67b0d47177f4d27cd6893daf3a.tar.gz
GT5-Unofficial-123aa6ed288b2f67b0d47177f4d27cd6893daf3a.tar.bz2
GT5-Unofficial-123aa6ed288b2f67b0d47177f4d27cd6893daf3a.zip
Reformat code
Diffstat (limited to 'src/main/java/gregtech/api/threads/GT_Runnable_Sound.java')
-rw-r--r--src/main/java/gregtech/api/threads/GT_Runnable_Sound.java44
1 files changed, 26 insertions, 18 deletions
diff --git a/src/main/java/gregtech/api/threads/GT_Runnable_Sound.java b/src/main/java/gregtech/api/threads/GT_Runnable_Sound.java
index aaa8b84028..6588780624 100644
--- a/src/main/java/gregtech/api/threads/GT_Runnable_Sound.java
+++ b/src/main/java/gregtech/api/threads/GT_Runnable_Sound.java
@@ -5,22 +5,30 @@ import gregtech.api.util.GT_Utility;
import net.minecraft.world.World;
public class GT_Runnable_Sound implements Runnable {
- private final int mX, mY, mZ, mTimeUntilNextSound;
- private final World mWorld;
- private final String mSoundName;
- private final float mSoundStrength, mSoundModulation;
-
- public GT_Runnable_Sound(World aWorld, int aX, int aY, int aZ, int aTimeUntilNextSound, String aSoundName, float aSoundStrength, float aSoundModulation) {
- mWorld = aWorld; mX = aX; mY = aY; mZ = aZ; mTimeUntilNextSound = aTimeUntilNextSound; mSoundName = aSoundName; mSoundStrength = aSoundStrength; mSoundModulation = aSoundModulation;
- }
-
- @Override
- public void run() {
- try {
- GT_PlayedSound tSound;
- if (GT_Utility.sPlayedSoundMap.keySet().contains(tSound = new GT_PlayedSound(mSoundName, mX, mY, mZ))) return;
- mWorld.playSound(mX, mY, mZ, mSoundName, mSoundStrength, mSoundModulation, false);
- GT_Utility.sPlayedSoundMap.put(tSound, mTimeUntilNextSound);
- } catch(Throwable e) {/**/}
- }
+ private final int mX, mY, mZ, mTimeUntilNextSound;
+ private final World mWorld;
+ private final String mSoundName;
+ private final float mSoundStrength, mSoundModulation;
+
+ public GT_Runnable_Sound(World aWorld, int aX, int aY, int aZ, int aTimeUntilNextSound, String aSoundName, float aSoundStrength, float aSoundModulation) {
+ mWorld = aWorld;
+ mX = aX;
+ mY = aY;
+ mZ = aZ;
+ mTimeUntilNextSound = aTimeUntilNextSound;
+ mSoundName = aSoundName;
+ mSoundStrength = aSoundStrength;
+ mSoundModulation = aSoundModulation;
+ }
+
+ @Override
+ public void run() {
+ try {
+ GT_PlayedSound tSound;
+ if (GT_Utility.sPlayedSoundMap.keySet().contains(tSound = new GT_PlayedSound(mSoundName, mX, mY, mZ)))
+ return;
+ mWorld.playSound(mX, mY, mZ, mSoundName, mSoundStrength, mSoundModulation, false);
+ GT_Utility.sPlayedSoundMap.put(tSound, mTimeUntilNextSound);
+ } catch (Throwable e) {/**/}
+ }
} \ No newline at end of file