本文整理汇总了Java中net.minecraft.client.particle.EntitySplashFX类的典型用法代码示例。如果您正苦于以下问题:Java EntitySplashFX类的具体用法?Java EntitySplashFX怎么用?Java EntitySplashFX使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EntitySplashFX类属于net.minecraft.client.particle包,在下文中一共展示了EntitySplashFX类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: spawnParticle
import net.minecraft.client.particle.EntitySplashFX; //导入依赖的package包/类
@Override
public void spawnParticle(String fxName,
double posX,
double posY,
double posZ,
double velX,
double velY,
double velZ)
{
World clientWorld = ForgeMod.proxy.getClientWorld();
if (clientWorld == null)
{
ModLoader.log().info( "Mad Particle: Could not spawn particle because client world was null!" );
return;
}
if (fxName.equals( "splash" ))
{
EntityFX someParticle = new EntitySplashFX( clientWorld,
posX,
posY,
posZ,
velX,
velY,
velZ );
Minecraft.getMinecraft().effectRenderer.addEffect( someParticle );
}
else
{
// Normal minecraft particle system ignores velocity completely.
clientWorld.spawnParticle( fxName,
posX,
posY,
posZ,
0.0D,
0.0D,
0.0D );
}
}
开发者ID:Maxwolf,项目名称:MC-MineAPI.Java,代码行数:40,代码来源:ClientProxy.java
示例2: doTheThing
import net.minecraft.client.particle.EntitySplashFX; //导入依赖的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.EntitySplashFX类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论