当前位置: 首页>>代码示例>>Java>>正文


Java MusicTicker.MusicType方法代码示例

本文整理汇总了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();
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:14,代码来源:ClientProxyCore.java

示例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;
	}
}
 
开发者ID:4Space,项目名称:4Space-1.7,代码行数:27,代码来源:SpaceMusicTicker.java

示例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;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:12,代码来源:Minecraft.java

示例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;
    }
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:33,代码来源:MusicTickerGC.java

示例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;
	}
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:31,代码来源:MusicHandlerClient.java

示例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);
}
 
开发者ID:4Space,项目名称:4Space-1.7,代码行数:9,代码来源:ClientProxy.java

示例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;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:5,代码来源:Minecraft.java

示例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;
}
 
开发者ID:NSExceptional,项目名称:Zombe-Modpack,代码行数:5,代码来源:Minecraft.java

示例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;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:5,代码来源:Minecraft.java

示例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;
}
 
开发者ID:OreCruncher,项目名称:DynamicSurroundings,代码行数:7,代码来源:MusicTickerReplacement.java

示例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);
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:5,代码来源:Minecraft.java


注:本文中的net.minecraft.client.audio.MusicTicker.MusicType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。