本文整理汇总了Java中net.minecraft.client.audio.MusicTicker.MusicType方法的典型用法代码示例。如果您正苦于以下问题:Java MusicTicker.MusicType方法的具体用法?Java MusicTicker.MusicType怎么用?Java MusicTicker.MusicType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.audio.MusicTicker
的用法示例。
在下文中一共展示了MusicTicker.MusicType方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import net.minecraft.client.audio.MusicTicker; //导入方法依赖的package包/类
@Override
public void init(FMLInitializationEvent event)
{
Class[][] commonTypes =
{
{ MusicTicker.MusicType.class, ResourceLocation.class, int.class, int.class },
};
MUSIC_TYPE_MARS = EnumHelper.addEnum(commonTypes, MusicTicker.MusicType.class, "MARS_JC", new ResourceLocation(GalacticraftCore.ASSET_PREFIX, "galacticraft.musicSpace"), 12000, 24000);
ClientProxyCore.registerHandlers();
ClientProxyCore.registerTileEntityRenderers();
ClientProxyCore.registerBlockHandlers();
ClientProxyCore.setupCapes();
}
示例2: update
import net.minecraft.client.audio.MusicTicker; //导入方法依赖的package包/类
@Override
public void update() {
MusicTicker.MusicType musictype = this.field_147677_b.func_147109_W();
if (FMLClientHandler.instance().getWorldClient() != null && FMLClientHandler.instance().getWorldClient().provider instanceof IGalacticraftWorldProvider) {
musictype = ClientProxy.MUSIC_TYPE_SPACE;
}
if (this.field_147678_c != null) {
if (!musictype.getMusicTickerLocation().equals(this.field_147678_c.getPositionedSoundLocation())) {
this.field_147677_b.getSoundHandler().stopSound(this.field_147678_c);
this.field_147676_d = MathHelper.getRandomIntegerInRange(this.field_147679_a, 0, musictype.func_148634_b() / 2);
}
if (!this.field_147677_b.getSoundHandler().isSoundPlaying(this.field_147678_c)) {
this.field_147678_c = null;
this.field_147676_d = Math.min(MathHelper.getRandomIntegerInRange(this.field_147679_a, musictype.func_148634_b(), musictype.func_148633_c()), this.field_147676_d);
}
}
if (this.field_147678_c == null && this.field_147676_d-- <= 0) {
this.field_147678_c = PositionedSoundRecord.func_147673_a(musictype.getMusicTickerLocation());
this.field_147677_b.getSoundHandler().playSound(this.field_147678_c);
this.field_147676_d = Integer.MAX_VALUE;
}
}
示例3: getAmbientMusicType
import net.minecraft.client.audio.MusicTicker; //导入方法依赖的package包/类
public MusicTicker.MusicType getAmbientMusicType() {
return this.thePlayer != null ? (this.thePlayer.worldObj.provider instanceof WorldProviderHell
? MusicTicker.MusicType.NETHER
: (this.thePlayer.worldObj.provider instanceof WorldProviderEnd
? (BossStatus.bossName != null && BossStatus.statusBarTime > 0 ? MusicTicker.MusicType.END_BOSS
: MusicTicker.MusicType.END)
: (this.thePlayer.capabilities.isCreativeMode && this.thePlayer.capabilities.allowFlying
? MusicTicker.MusicType.CREATIVE
: MusicTicker.MusicType.GAME)))
: MusicTicker.MusicType.MENU;
}
示例4: update
import net.minecraft.client.audio.MusicTicker; //导入方法依赖的package包/类
@Override
public void update()
{
MusicTicker.MusicType musictype = this.field_147677_b.func_147109_W();
if (FMLClientHandler.instance().getWorldClient() != null && FMLClientHandler.instance().getWorldClient().provider instanceof IGalacticraftWorldProvider)
{
musictype = ClientProxyCore.MUSIC_TYPE_MARS;
}
if (this.field_147678_c != null)
{
if (!musictype.getMusicTickerLocation().equals(this.field_147678_c.getPositionedSoundLocation()))
{
this.field_147677_b.getSoundHandler().stopSound(this.field_147678_c);
this.field_147676_d = MathHelper.getRandomIntegerInRange(this.field_147679_a, 0, musictype.func_148634_b() / 2);
}
if (!this.field_147677_b.getSoundHandler().isSoundPlaying(this.field_147678_c))
{
this.field_147678_c = null;
this.field_147676_d = Math.min(MathHelper.getRandomIntegerInRange(this.field_147679_a, musictype.func_148634_b(), musictype.func_148633_c()), this.field_147676_d);
}
}
if (this.field_147678_c == null && this.field_147676_d-- <= 0)
{
this.field_147678_c = PositionedSoundRecord.func_147673_a(musictype.getMusicTickerLocation());
this.field_147677_b.getSoundHandler().playSound(this.field_147678_c);
this.field_147676_d = Integer.MAX_VALUE;
}
}
示例5: update
import net.minecraft.client.audio.MusicTicker; //导入方法依赖的package包/类
@Override
public void update() {
MusicTicker.MusicType musictype = this.field_147677_b.func_147109_W();
WorldClient world = FMLClientHandler.instance().getWorldClient();
for (SpacePair<ICoreCelestial, MusicTicker.MusicType> pair : musicTypes) {
if (world != null && pair.getFirst().instanceOfProvider(world.provider)) {
musictype = pair.getSecond();
break;
}
}
if (this.field_147678_c != null) {
if (!musictype.getMusicTickerLocation().equals(this.field_147678_c.getPositionedSoundLocation())) {
this.field_147677_b.getSoundHandler().stopSound(this.field_147678_c);
this.field_147676_d = MathHelper.getRandomIntegerInRange(this.field_147679_a, 0, musictype.func_148634_b() / 2);
}
if (!this.field_147677_b.getSoundHandler().isSoundPlaying(this.field_147678_c)) {
this.field_147678_c = null;
this.field_147676_d = Math.min(MathHelper.getRandomIntegerInRange(this.field_147679_a, musictype.func_148634_b(), musictype.func_148633_c()), this.field_147676_d);
}
}
if (this.field_147678_c == null && this.field_147676_d-- <= 0) {
this.field_147678_c = PositionedSoundRecord.func_147673_a(musictype.getMusicTickerLocation());
this.field_147677_b.getSoundHandler().playSound(this.field_147678_c);
this.field_147676_d = Integer.MAX_VALUE;
}
}
示例6: init
import net.minecraft.client.audio.MusicTicker; //导入方法依赖的package包/类
@Override
public void init(FMLInitializationEvent event) {
Class[][] commonTypes = { { MusicTicker.MusicType.class, ResourceLocation.class, int.class, int.class }, };
MUSIC_TYPE_SPACE = EnumHelper.addEnum(commonTypes, MusicTicker.MusicType.class, "SNOWSTORM", new ResourceLocation(MercuryCore.ASSET_PREFIX, "4space.musicSpace"), 12000, 24000);
ClientProxyCore.setupCapes();
super.init(event);
}
示例7: getAmbientMusicType
import net.minecraft.client.audio.MusicTicker; //导入方法依赖的package包/类
public MusicTicker.MusicType getAmbientMusicType()
{
return this.thePlayer != null ? (this.thePlayer.worldObj.provider instanceof WorldProviderHell ? MusicTicker.MusicType.NETHER : (this.thePlayer.worldObj.provider instanceof WorldProviderEnd ? (BossStatus.bossName != null && BossStatus.statusBarTime > 0 ? MusicTicker.MusicType.END_BOSS : MusicTicker.MusicType.END) : (this.thePlayer.capabilities.isCreativeMode && this.thePlayer.capabilities.allowFlying ? MusicTicker.MusicType.CREATIVE : MusicTicker.MusicType.GAME))) : MusicTicker.MusicType.MENU;
}
示例8: getAmbientMusicType
import net.minecraft.client.audio.MusicTicker; //导入方法依赖的package包/类
public MusicTicker.MusicType getAmbientMusicType()
{
return this.player != null ? (this.player.world.provider instanceof WorldProviderHell ? MusicTicker.MusicType.NETHER : (this.player.world.provider instanceof WorldProviderEnd ? (this.ingameGUI.getBossOverlay().shouldPlayEndBossMusic() ? MusicTicker.MusicType.END_BOSS : MusicTicker.MusicType.END) : (this.player.capabilities.isCreativeMode && this.player.capabilities.allowFlying ? MusicTicker.MusicType.CREATIVE : MusicTicker.MusicType.GAME))) : MusicTicker.MusicType.MENU;
}
示例9: getAmbientMusicType
import net.minecraft.client.audio.MusicTicker; //导入方法依赖的package包/类
public MusicTicker.MusicType getAmbientMusicType()
{
return this.thePlayer != null ? (this.thePlayer.worldObj.provider instanceof WorldProviderHell ? MusicTicker.MusicType.NETHER : (this.thePlayer.worldObj.provider instanceof WorldProviderEnd ? (this.ingameGUI.getBossOverlay().shouldPlayEndBossMusic() ? MusicTicker.MusicType.END_BOSS : MusicTicker.MusicType.END) : (this.thePlayer.capabilities.isCreativeMode && this.thePlayer.capabilities.allowFlying ? MusicTicker.MusicType.CREATIVE : MusicTicker.MusicType.GAME))) : MusicTicker.MusicType.MENU;
}
示例10: playMusic
import net.minecraft.client.audio.MusicTicker; //导入方法依赖的package包/类
@Override
public void playMusic(@Nonnull final MusicTicker.MusicType requestedMusicType) {
this.currentMusic = new MusicSound(requestedMusicType.getMusicLocation()).setVolumeScale(this.MUSIC_SCALER);
SoundEngine.instance().playSound((BasicSound<?>) this.currentMusic);
this.timeUntilNextMusic = Integer.MAX_VALUE;
}
示例11: func_147109_W
import net.minecraft.client.audio.MusicTicker; //导入方法依赖的package包/类
public MusicTicker.MusicType func_147109_W()
{
return this.currentScreen instanceof GuiWinGame ? MusicTicker.MusicType.CREDITS : (this.thePlayer != null ? (this.thePlayer.worldObj.provider instanceof WorldProviderHell ? MusicTicker.MusicType.NETHER : (this.thePlayer.worldObj.provider instanceof WorldProviderEnd ? (BossStatus.bossName != null && BossStatus.statusBarTime > 0 ? MusicTicker.MusicType.END_BOSS : MusicTicker.MusicType.END) : (this.thePlayer.capabilities.isCreativeMode && this.thePlayer.capabilities.allowFlying ? MusicTicker.MusicType.CREATIVE : MusicTicker.MusicType.GAME))) : MusicTicker.MusicType.MENU);
}