ActuallyAdditions/src/main/java/de/ellpeck/actuallyadditions/common/misc/SoundHandler.java

31 lines
1 KiB
Java
Raw Normal View History

package de.ellpeck.actuallyadditions.common.misc;
2016-05-01 22:26:26 +02:00
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
import de.ellpeck.actuallyadditions.common.RegistryHandler;
2016-05-01 22:26:26 +02:00
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundEvent;
2019-05-02 09:10:29 +02:00
public final class SoundHandler {
2016-05-01 22:26:26 +02:00
public static SoundEvent duhDuhDuhDuuuh;
public static SoundEvent coffeeMachine;
public static SoundEvent reconstructor;
public static SoundEvent crusher;
2019-05-02 09:10:29 +02:00
public static void init() {
2016-11-19 23:12:22 +01:00
duhDuhDuhDuuuh = registerSound("duh_duh_duh_duuuh");
coffeeMachine = registerSound("coffee_machine");
2016-05-01 22:26:26 +02:00
reconstructor = registerSound("reconstructor");
crusher = registerSound("crusher");
}
2019-05-02 09:10:29 +02:00
private static SoundEvent registerSound(String name) {
2018-05-10 11:38:58 +02:00
ResourceLocation resLoc = new ResourceLocation(ActuallyAdditions.MODID, name);
2016-05-01 22:26:26 +02:00
SoundEvent event = new SoundEvent(resLoc);
event.setRegistryName(resLoc);
RegistryHandler.SOUNDS_TO_REGISTER.add(event);
2016-05-01 22:26:26 +02:00
return event;
}
}