2012-08-07 08:24:06 +00:00
|
|
|
package net.minecraftforge.client.event.sound;
|
|
|
|
|
2013-12-17 01:18:48 +00:00
|
|
|
import cpw.mods.fml.common.eventhandler.Event;
|
2014-04-03 10:12:22 +00:00
|
|
|
import net.minecraft.client.audio.ISound;
|
|
|
|
import net.minecraft.client.audio.SoundManager;
|
2012-12-13 05:58:35 +00:00
|
|
|
import net.minecraft.client.audio.SoundPoolEntry;
|
2012-08-07 08:24:06 +00:00
|
|
|
import net.minecraftforge.common.MinecraftForge;
|
|
|
|
|
|
|
|
public class SoundEvent extends Event
|
|
|
|
{
|
2014-04-03 10:12:22 +00:00
|
|
|
public final SoundManager manager;
|
|
|
|
public SoundEvent(SoundManager manager)
|
|
|
|
{
|
|
|
|
this.manager = manager;
|
|
|
|
}
|
2012-08-07 08:24:06 +00:00
|
|
|
|
2014-04-03 10:12:22 +00:00
|
|
|
@Deprecated
|
2012-08-07 08:24:06 +00:00
|
|
|
public static SoundPoolEntry getResult(SoundResultEvent event)
|
|
|
|
{
|
|
|
|
MinecraftForge.EVENT_BUS.post(event);
|
|
|
|
return event.result;
|
|
|
|
}
|
2014-04-03 10:12:22 +00:00
|
|
|
|
|
|
|
public static class SoundSourceEvent extends SoundEvent
|
|
|
|
{
|
|
|
|
public final ISound sound;
|
|
|
|
public final String uuid;
|
|
|
|
public final String name;
|
|
|
|
|
|
|
|
public SoundSourceEvent(SoundManager manager, ISound sound, String uuid)
|
|
|
|
{
|
|
|
|
super(manager);
|
|
|
|
this.name = sound.getPositionedSoundLocation().getResourcePath();
|
|
|
|
this.sound = sound;
|
|
|
|
this.uuid = uuid;
|
|
|
|
}
|
|
|
|
}
|
2012-08-07 08:24:06 +00:00
|
|
|
}
|