當前位置: 首頁>>代碼示例>>Java>>正文


Java SoundEvent.getSoundName方法代碼示例

本文整理匯總了Java中net.minecraft.util.SoundEvent.getSoundName方法的典型用法代碼示例。如果您正苦於以下問題:Java SoundEvent.getSoundName方法的具體用法?Java SoundEvent.getSoundName怎麽用?Java SoundEvent.getSoundName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.util.SoundEvent的用法示例。


在下文中一共展示了SoundEvent.getSoundName方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: reloadSoundSystem

import net.minecraft.util.SoundEvent; //導入方法依賴的package包/類
public void reloadSoundSystem()
{
    UNABLE_TO_PLAY.clear();

    for (SoundEvent soundevent : SoundEvent.REGISTRY)
    {
        ResourceLocation resourcelocation = soundevent.getSoundName();

        if (this.sndHandler.getAccessor(resourcelocation) == null)
        {
            LOGGER.warn("Missing sound for event: {}", new Object[] {SoundEvent.REGISTRY.getNameForObject(soundevent)});
            UNABLE_TO_PLAY.add(resourcelocation);
        }
    }

    this.unloadSoundSystem();
    this.loadSoundSystem();
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:19,代碼來源:SoundManager.java

示例2: reloadSoundSystem

import net.minecraft.util.SoundEvent; //導入方法依賴的package包/類
public void reloadSoundSystem()
{
    UNABLE_TO_PLAY.clear();

    for (SoundEvent soundevent : SoundEvent.REGISTRY)
    {
        ResourceLocation resourcelocation = soundevent.getSoundName();

        if (this.sndHandler.getAccessor(resourcelocation) == null)
        {
            LOGGER.warn("Missing sound for event: {}", new Object[] {SoundEvent.REGISTRY.getNameForObject(soundevent)});
            UNABLE_TO_PLAY.add(resourcelocation);
        }
    }

    this.unloadSoundSystem();
    this.loadSoundSystem();
    net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.sound.SoundLoadEvent(this));
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:20,代碼來源:SoundManager.java

示例3: DebuffTimedSound

import net.minecraft.util.SoundEvent; //導入方法依賴的package包/類
public DebuffTimedSound(SoundEvent event, int debuffDuration) {
    this.event = event;
    this.soundLocation = event.getSoundName();
    this.player = Minecraft.getMinecraft().player;
    this.debuffDuration = Integer.min(15 * 20, debuffDuration);
    this.minusPerTick = (1F / this.debuffDuration) * volumeMultiplier;
}
 
開發者ID:ichttt,項目名稱:FirstAid,代碼行數:8,代碼來源:DebuffTimedSound.java

示例4: PositionedSound

import net.minecraft.util.SoundEvent; //導入方法依賴的package包/類
protected PositionedSound(SoundEvent soundIn, SoundCategory categoryIn)
{
    this(soundIn.getSoundName(), categoryIn);
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:5,代碼來源:PositionedSound.java

示例5: PositionedSoundRecord

import net.minecraft.util.SoundEvent; //導入方法依賴的package包/類
private PositionedSoundRecord(SoundEvent soundIn, SoundCategory categoryIn, float volumeIn, float pitchIn, boolean repeatIn, int repeatDelayIn, ISound.AttenuationType attenuationTypeIn, float xIn, float yIn, float zIn)
{
    this(soundIn.getSoundName(), categoryIn, volumeIn, pitchIn, repeatIn, repeatDelayIn, attenuationTypeIn, xIn, yIn, zIn);
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:5,代碼來源:PositionedSoundRecord.java


注:本文中的net.minecraft.util.SoundEvent.getSoundName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。