From 7ac8db9ecf8bd8775b5249e48f8ac9a84d675b4d Mon Sep 17 00:00:00 2001 From: Léa Gris Date: Thu, 30 Mar 2023 21:48:25 +0200 Subject: 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 --- .../gregtech/api/threads/GT_Runnable_Sound.java | 29 +++++++++++++++++----- 1 file changed, 23 insertions(+), 6 deletions(-) (limited to 'src/main/java/gregtech/api/threads') 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, -- cgit