2020-09-09 16:48:43 +02:00
|
|
|
package de.ellpeck.actuallyadditions.common.misc;
|
2016-05-01 22:26:26 +02:00
|
|
|
|
2020-09-09 16:48:43 +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);
|
2017-06-29 13:00:11 +02:00
|
|
|
event.setRegistryName(resLoc);
|
|
|
|
RegistryHandler.SOUNDS_TO_REGISTER.add(event);
|
2016-05-01 22:26:26 +02:00
|
|
|
return event;
|
|
|
|
}
|
|
|
|
}
|