diff options
| author | Foghrye4 <foghrye4@gmail.com> | 2017-08-10 18:50:56 +0300 |
|---|---|---|
| committer | Foghrye4 <foghrye4@gmail.com> | 2017-08-10 18:50:56 +0300 |
| commit | 877312184c472d9845e5ef1008bc538f4634059f (patch) | |
| tree | 4e098cc94296cc11f3b87e8ef64c3c568b6aeb51 /main/java/gregtech/api/util/GT_PlayedSound.java | |
| parent | 939d2ea16679ce64d98b98c716b85f851aa576e2 (diff) | |
fix missing source folder
Diffstat (limited to 'main/java/gregtech/api/util/GT_PlayedSound.java')
| -rw-r--r-- | main/java/gregtech/api/util/GT_PlayedSound.java | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/main/java/gregtech/api/util/GT_PlayedSound.java b/main/java/gregtech/api/util/GT_PlayedSound.java new file mode 100644 index 0000000..fa98693 --- /dev/null +++ b/main/java/gregtech/api/util/GT_PlayedSound.java @@ -0,0 +1,28 @@ +package gregtech.api.util; + +import static gregtech.api.enums.GT_Values.E; + +public class GT_PlayedSound { + public final String mSoundName; + public final int mX, mY, mZ; + + public GT_PlayedSound(String aSoundName, double aX, double aY, double aZ) { + mSoundName = aSoundName==null?E:aSoundName; + mX = (int)aX; + mY = (int)aY; + mZ = (int)aZ; + } + + @Override + public boolean equals(Object aObject) { + if (aObject != null && aObject instanceof GT_PlayedSound) { + return ((GT_PlayedSound)aObject).mX == mX && ((GT_PlayedSound)aObject).mY == mY && ((GT_PlayedSound)aObject).mZ == mZ && ((GT_PlayedSound)aObject).mSoundName.equals(mSoundName); + } + return false; + } + + @Override + public int hashCode() { + return mX+mY+mZ+mSoundName.hashCode(); + } +}
\ No newline at end of file |
