Skip to content

Commit

Permalink
Fix overlapped IDs for sounds and add two new sounds (#3093)
Browse files Browse the repository at this point in the history
Co-authored-by: boubou19 <miisterunknown@gmail.com>
  • Loading branch information
Volence and boubou19 authored Sep 7, 2024
1 parent 8e89aa4 commit 8151e37
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/main/java/gregtech/api/enums/SoundResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,14 @@ public enum SoundResource {
GT_MACHINES_WATER_PUMP_LOOP(234, GregTech.ID, "machines.WaterPumpLoop"),
GT_MACHINES_STEAM_CENTRIFUGE_LOOP(235, GregTech.ID, "machines.SteamCentrifugeLoop"),

GT_MACHINES_PURIFICATIONPLANT_LOOP(233, GregTech.ID, "machines.PurificationPlantLoop"),
GT_MACHINES_PURIFICATION_PH_LOOP(234, GregTech.ID, "machines.PurificationPhLoop"),
GT_MACHINES_COAGULATION_LOOP(235, GregTech.ID, "machines.PurificationCoagulationLoop"),
GT_MACHINES_OZONATION_LOOP(236, GregTech.ID, "machines.PurificationOzonationLoop"),
GT_MACHINES_PURIFICATION_PLASMA_LOOP(237, "machines.PurificationPlasmaLoop"),
GT_MACHINES_PURIFICATIONPLANT_LOOP(236, GregTech.ID, "machines.PurificationPlantLoop"),
GT_MACHINES_PURIFICATION_PH_LOOP(237, GregTech.ID, "machines.PurificationPhLoop"),
GT_MACHINES_COAGULATION_LOOP(238, GregTech.ID, "machines.PurificationCoagulationLoop"),
GT_MACHINES_OZONATION_LOOP(239, GregTech.ID, "machines.PurificationOzonationLoop"),
GT_MACHINES_PURIFICATION_PLASMA_LOOP(240, "machines.PurificationPlasmaLoop"),

GT_MACHINES_MULTI_LATHE_LOOP(241, GregTech.ID, "machines.MultiLatheLoop"),
GT_MACHINES_MULTI_AUTOCLAVE_LOOP(242, GregTech.ID, "machines.MultiAutoclaveLoop"),

GUI_BUTTON_DOWN(-1, GregTech.ID, "gui.buttonDown"),
GUI_BUTTON_UP(-1, GregTech.ID, "gui.buttonUp"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
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.ForgeDirection;
Expand All @@ -44,9 +45,12 @@
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.GregTechAPI;
import gregtech.api.enums.HeatingCoilLevel;
import gregtech.api.enums.Materials;
import gregtech.api.enums.SoundResource;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
Expand Down Expand Up @@ -289,6 +293,12 @@ public int survivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBu
return build;
}

@SideOnly(Side.CLIENT)
@Override
protected ResourceLocation getActivitySoundLoop() {
return SoundResource.GT_MACHINES_MULTI_AUTOCLAVE_LOOP.resourceLocation;
}

@Override
public boolean isCorrectMachinePart(ItemStack aStack) {
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
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.ForgeDirection;
Expand All @@ -37,7 +38,10 @@
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.GregTechAPI;
import gregtech.api.enums.SoundResource;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
Expand Down Expand Up @@ -265,6 +269,12 @@ public int survivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBu
return build;
}

@SideOnly(Side.CLIENT)
@Override
protected ResourceLocation getActivitySoundLoop() {
return SoundResource.GT_MACHINES_MULTI_LATHE_LOOP.resourceLocation;
}

private int mCasingAmount;

private void onCasingAdded() {
Expand Down
18 changes: 18 additions & 0 deletions src/main/resources/assets/gregtech/sounds.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,5 +123,23 @@
"stream": false
}
]
},
"machines.MultiLatheLoop": {
"category": "block",
"sounds": [
{
"name": "MultiLatheLoop",
"stream": false
}
]
},
"machines.MultiAutoclaveLoop": {
"category": "block",
"sounds": [
{
"name": "MultiAutoclaveLoop",
"stream": false
}
]
}
}
Binary file not shown.
Binary file not shown.

0 comments on commit 8151e37

Please sign in to comment.