Java 类net.minecraft.client.particle.EntityFlameFX 实例源码

项目:Blockbender    文件:AirTornado.java   
@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));
        }
    }
}