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


Java EntityFlameFX类代码示例

本文整理汇总了Java中net.minecraft.client.particle.EntityFlameFX的典型用法代码示例。如果您正苦于以下问题:Java EntityFlameFX类的具体用法?Java EntityFlameFX怎么用?Java EntityFlameFX使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


EntityFlameFX类属于net.minecraft.client.particle包,在下文中一共展示了EntityFlameFX类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doTheThing

import net.minecraft.client.particle.EntityFlameFX; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
private void doTheThing(double x, double y, double z, double radius, int xzquality, int rarity, int element){
	Random r = new Random();
	for(int t = 0; t < 360; t++){
		if((t % xzquality == 0) && (r.nextInt(rarity) == 0)){
			double spawnX = x + (radius * Math.cos(Math.toRadians(t)));
			double spawnY = y;
			double spawnZ = z + (radius * Math.sin(Math.toRadians(t)));
			if(element == 0){
				if(r.nextInt(2) == 0){
					Minecraft.getMinecraft().effectRenderer.addEffect(new EntityCloudFX(Minecraft.getMinecraft().theWorld, spawnX, spawnY, spawnZ, 0, 0, 0));
				}
				else{
					Minecraft.getMinecraft().effectRenderer.addEffect(new EntitySmokeFX(Minecraft.getMinecraft().theWorld, spawnX, spawnY, spawnZ, 0, 0, 0));
				}
			}
			if(element == 1){
				if(r.nextInt(7) == 0){
					Minecraft.getMinecraft().effectRenderer.addEffect(new EntityAvatarBubbleFX(Minecraft.getMinecraft().theWorld, spawnX, spawnY, spawnZ, 0, 0, 0));										
				}
				else{
					Minecraft.getMinecraft().effectRenderer.addEffect(new EntitySplashFX(Minecraft.getMinecraft().theWorld, spawnX, spawnY, spawnZ, 0, 0, 0));										
				}
			}
			if(element == 2) Minecraft.getMinecraft().effectRenderer.addEffect(new EntityFlameFX(Minecraft.getMinecraft().theWorld, spawnX, spawnY, spawnZ, 0, 0, 0));
		}
	}
}
 
开发者ID:kieranvs,项目名称:Blockbender,代码行数:29,代码来源:AirTornado.java


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