Java 类net.minecraft.client.audio.SoundEventAccessor 实例源码

项目:FirstAid    文件:DebuffTimedSound.java   
@Nullable
@Override
public SoundEventAccessor createAccessor(@Nonnull SoundHandler handler) {
    SoundEventAccessor soundEventAccessor = handler.getAccessor(this.soundLocation);

    if (soundEventAccessor == null)
    {
        FirstAid.logger.warn("Missing sound for location " + this.soundLocation);
        this.sound = SoundHandler.MISSING_SOUND;
    }
    else
    {
        this.sound = soundEventAccessor.cloneEntry();
    }

    return soundEventAccessor;
}
项目:Backmemed    文件:GuiSubtitleOverlay.java   
public void soundPlay(ISound soundIn, SoundEventAccessor accessor)
{
    if (accessor.getSubtitle() != null)
    {
        String s = accessor.getSubtitle().getFormattedText();

        if (!this.subtitles.isEmpty())
        {
            for (GuiSubtitleOverlay.Subtitle guisubtitleoverlay$subtitle : this.subtitles)
            {
                if (guisubtitleoverlay$subtitle.getString().equals(s))
                {
                    guisubtitleoverlay$subtitle.refresh(new Vec3d((double)soundIn.getXPosF(), (double)soundIn.getYPosF(), (double)soundIn.getZPosF()));
                    return;
                }
            }
        }

        this.subtitles.add(new GuiSubtitleOverlay.Subtitle(s, new Vec3d((double)soundIn.getXPosF(), (double)soundIn.getYPosF(), (double)soundIn.getZPosF())));
    }
}
项目:CustomWorldGen    文件:GuiSubtitleOverlay.java   
public void soundPlay(ISound soundIn, SoundEventAccessor accessor)
{
    if (accessor.getSubtitle() != null)
    {
        String s = accessor.getSubtitle().getFormattedText();

        if (!this.subtitles.isEmpty())
        {
            for (GuiSubtitleOverlay.Subtitle guisubtitleoverlay$subtitle : this.subtitles)
            {
                if (guisubtitleoverlay$subtitle.getString().equals(s))
                {
                    guisubtitleoverlay$subtitle.refresh(new Vec3d((double)soundIn.getXPosF(), (double)soundIn.getYPosF(), (double)soundIn.getZPosF()));
                    return;
                }
            }
        }

        this.subtitles.add(new GuiSubtitleOverlay.Subtitle(s, new Vec3d((double)soundIn.getXPosF(), (double)soundIn.getYPosF(), (double)soundIn.getZPosF())));
    }
}
项目:accesstweaks    文件:Sounds.java   
/** Adds a subtitle to the list in the given colour. */
public void addSubtitle(ISound sound, SoundEventAccessor accessor,
        int colour) {

    if (sound != null && accessor.getSubtitle() != null) {

        String s = accessor.getSubtitle().getFormattedText();

        if (!this.subtitles.isEmpty()) {

            for (Subtitle subtitle : this.subtitles) {

                if (subtitle.getString().equals(s)) {

                    subtitle.refresh(new Vec3d(sound.getXPosF(),
                            sound.getYPosF(), sound.getZPosF()));
                    return;
                }
            }
        }

        this.subtitles.add(new Subtitle(s, new Vec3d(sound.getXPosF(),
                sound.getYPosF(), sound.getZPosF()), colour));
    }
}
项目:ExpandedRailsMod    文件:GuiSubtitleOverlay.java   
public void soundPlay(ISound soundIn, SoundEventAccessor accessor)
{
    if (accessor.getSubtitle() != null)
    {
        String s = accessor.getSubtitle().getFormattedText();

        if (!this.subtitles.isEmpty())
        {
            for (GuiSubtitleOverlay.Subtitle guisubtitleoverlay$subtitle : this.subtitles)
            {
                if (guisubtitleoverlay$subtitle.getString().equals(s))
                {
                    guisubtitleoverlay$subtitle.refresh(new Vec3d((double)soundIn.getXPosF(), (double)soundIn.getYPosF(), (double)soundIn.getZPosF()));
                    return;
                }
            }
        }

        this.subtitles.add(new GuiSubtitleOverlay.Subtitle(s, new Vec3d((double)soundIn.getXPosF(), (double)soundIn.getYPosF(), (double)soundIn.getZPosF())));
    }
}
项目:CrystalMod    文件:ClientEventHandler.java   
@Override
public SoundEventAccessor createAccessor(SoundHandler handler) {
    return sound.createAccessor(handler);
}
项目:TaleCraft    文件:ConstantSound.java   
@Override
public SoundEventAccessor createAccessor(SoundHandler arg0) {
   this.soundEvent = arg0.getAccessor(this.getSoundLocation());
   this.sound = this.soundEvent == null ? SoundHandler.MISSING_SOUND : this.soundEvent.cloneEntry();
   return this.soundEvent;
}
项目:Cyclic    文件:BlockSoundSuppress.java   
@Override
public SoundEventAccessor createAccessor(SoundHandler handler) {
  return sound.createAccessor(handler);
}