diff options
Diffstat (limited to 'src/main/java/gregtech/api/threads')
-rw-r--r-- | src/main/java/gregtech/api/threads/GT_Runnable_Sound.java | 29 |
1 files changed, 23 insertions, 6 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 9d6de7df83..dfee28cf47 100644 --- a/src/main/java/gregtech/api/threads/GT_Runnable_Sound.java +++ b/src/main/java/gregtech/api/threads/GT_Runnable_Sound.java @@ -8,12 +8,13 @@ import gregtech.api.util.GT_Utility; public class GT_Runnable_Sound implements Runnable { - private final int mX, mY, mZ, mTimeUntilNextSound; + private final double mX, mY, mZ; + private final int mTimeUntilNextSound; private final World mWorld; private final ResourceLocation mSoundResourceLocation; private final float mSoundStrength, mSoundModulation; - public GT_Runnable_Sound(World aWorld, int aX, int aY, int aZ, int aTimeUntilNextSound, + public GT_Runnable_Sound(World aWorld, double aX, double aY, double aZ, int aTimeUntilNextSound, ResourceLocation aSoundResourceLocation, float aSoundStrength, float aSoundModulation) { mWorld = aWorld; mX = aX; @@ -26,16 +27,32 @@ public class GT_Runnable_Sound implements Runnable { } /** - * @deprecated Use {@link #GT_Runnable_Sound(World, int, int, int, int, ResourceLocation, float, float)} + * @deprecated Use {@link #GT_Runnable_Sound(World, double, double, double, int, ResourceLocation, float, float)} + */ + public GT_Runnable_Sound(World aWorld, int aX, int aY, int aZ, int aTimeUntilNextSound, + ResourceLocation aSoundResourceLocation, float aSoundStrength, float aSoundModulation) { + this( + aWorld, + (double) aX + 0.5D, + (double) aY + 0.5D, + (double) aZ + 0.5D, + aTimeUntilNextSound, + aSoundResourceLocation, + aSoundStrength, + aSoundModulation); + } + + /** + * @deprecated Use {@link #GT_Runnable_Sound(World, double, double, double, int, ResourceLocation, float, float)} */ @Deprecated public GT_Runnable_Sound(World aWorld, int aX, int aY, int aZ, int aTimeUntilNextSound, String aSoundName, float aSoundStrength, float aSoundModulation) { this( aWorld, - aX, - aY, - aZ, + (double) aX + 0.5D, + (double) aY + 0.5D, + (double) aZ + 0.5D, aTimeUntilNextSound, new ResourceLocation(aSoundName), aSoundStrength, |