aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/metatileentity/implementations
diff options
context:
space:
mode:
authormiozune <miozune@gmail.com>2024-09-28 20:16:09 +0900
committerGitHub <noreply@github.com>2024-09-28 11:16:09 +0000
commit6b1f145f5028f1bc92cf478e5963224e7d94b5cd (patch)
tree2227de40c6c806bd59c430e973a07dda8d9f1c1f /src/main/java/gregtech/api/metatileentity/implementations
parent254a3bc734648c97e136f67d714dcf5a4f8a3df9 (diff)
downloadGT5-Unofficial-6b1f145f5028f1bc92cf478e5963224e7d94b5cd.tar.gz
GT5-Unofficial-6b1f145f5028f1bc92cf478e5963224e7d94b5cd.tar.bz2
GT5-Unofficial-6b1f145f5028f1bc92cf478e5963224e7d94b5cd.zip
Unify machine sound loop to use SoundResource (#3289)
Diffstat (limited to 'src/main/java/gregtech/api/metatileentity/implementations')
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/MTEMultiBlockBase.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/MTEMultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/MTEMultiBlockBase.java
index b677f6ae24..5da5bff57d 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/MTEMultiBlockBase.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/MTEMultiBlockBase.java
@@ -32,7 +32,6 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ChatComponentTranslation;
import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import net.minecraftforge.common.util.Constants;
@@ -677,10 +676,14 @@ public abstract class MTEMultiBlockBase extends MetaTileEntity
}
@SideOnly(Side.CLIENT)
- protected void doActivitySound(ResourceLocation activitySound) {
+ protected void doActivitySound(SoundResource activitySound) {
if (getBaseMetaTileEntity().isActive() && activitySound != null) {
if (activitySoundLoop == null) {
- activitySoundLoop = new GTSoundLoop(activitySound, getBaseMetaTileEntity(), false, true);
+ activitySoundLoop = new GTSoundLoop(
+ activitySound.resourceLocation,
+ getBaseMetaTileEntity(),
+ false,
+ true);
Minecraft.getMinecraft()
.getSoundHandler()
.playSound(activitySoundLoop);
@@ -710,7 +713,7 @@ public abstract class MTEMultiBlockBase extends MetaTileEntity
* @return Sound that will be looped for as long as the machine is doing a recipe
*/
@SideOnly(Side.CLIENT)
- protected ResourceLocation getActivitySoundLoop() {
+ protected SoundResource getActivitySoundLoop() {
return null;
}