aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/threads
diff options
context:
space:
mode:
authorLéa Gris <lea.gris@noiraude.net>2023-03-30 21:48:25 +0200
committerGitHub <noreply@github.com>2023-03-30 21:48:25 +0200
commit7ac8db9ecf8bd8775b5249e48f8ac9a84d675b4d (patch)
tree85faa9ccd9c8d25f3b4cdf36beb03492b51d0462 /src/main/java/gregtech/api/threads
parent8187e9841b50a5bd1e713655d7b6598ffa8e8ac6 (diff)
downloadGT5-Unofficial-7ac8db9ecf8bd8775b5249e48f8ac9a84d675b4d.tar.gz
GT5-Unofficial-7ac8db9ecf8bd8775b5249e48f8ac9a84d675b4d.tar.bz2
GT5-Unofficial-7ac8db9ecf8bd8775b5249e48f8ac9a84d675b4d.zip
Implementation of A more useful Lava Boiler (#1814)
* Fix Missing null/empty checks on boilers base class Would cause a deadlock on empty boilers unable to start, as it tried to transfer null or empty FuildStack. * Fix Sound coordinates so it can be centered on block * WIP Lava Boiler Improuvements * :spotlessapply * Add GUI slot block background textures * Restrict ash slot to remove items only (disallow inserting items there) * Finalize GUI and Obsidian Production mechanic * Fix still output Obisidian from cooled Lava even when no more Lava available * Lava Boiler Textures: Improves GUI and TOP - Fluid slot now has Steam themed textures - Item slot block background gets a smaller icon that hides behind actual item blocks - Boiler TOP is now a drain texture instead of pump * Add null check
Diffstat (limited to 'src/main/java/gregtech/api/threads')
-rw-r--r--src/main/java/gregtech/api/threads/GT_Runnable_Sound.java29
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,