From 09add3e8ac3be54b1e6c068e87d4fb5143c6d785 Mon Sep 17 00:00:00 2001 From: Dream-Master Date: Tue, 21 Jun 2016 18:50:29 +0200 Subject: even with Blood asp experimental branch --- .../java/gregtech/api/util/GT_PlayedSound.java | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/main/java/gregtech/api/util/GT_PlayedSound.java (limited to 'src/main/java/gregtech/api/util/GT_PlayedSound.java') diff --git a/src/main/java/gregtech/api/util/GT_PlayedSound.java b/src/main/java/gregtech/api/util/GT_PlayedSound.java new file mode 100644 index 0000000000..858f3b826e --- /dev/null +++ b/src/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 -- cgit