本文整理匯總了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();
}
示例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));
}
示例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;
}
示例4: PositionedSound
import net.minecraft.util.SoundEvent; //導入方法依賴的package包/類
protected PositionedSound(SoundEvent soundIn, SoundCategory categoryIn)
{
this(soundIn.getSoundName(), categoryIn);
}
示例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);
}