// Fire Mob

try {
	for (var i = 0; i < spawnedEntities.length; i++) 
	{
		var ent = spawnedEntities[i];
				ent.setMoveSpeed(1);
				ent.setAttackStrength(4);
		if(ent.isAlive()) 
		{
			//OPTIONAL:
			ent.texture = "/fire/" + ent.getClassType() + ".png"
			//ENDOPTIONAL
			if (ent.getImmuneToFire()) 
			{
				ent.setImmuneToFire(TRUE$);
			}
			ent.setFireLevel(0);
			var target = ent.getEntitiesWithinRange(2);
			for(var j = 0; j < target.length; j++) 
			{
				var entj = target[j];
				if (entj.getClassType() == "Player") 
				{
					player.setFireLevel(50)
				}   
			}
			Epos = ent.getPosition();
			for(var k = 0.0; k < 2; k++)
			{
				effect.spawnParticle("flame", Epos.x + Math.random() - 1.0, Epos.y + Math.random(), Epos.z + Math.random() - 0.4, -0, 0, 0);
			}
		}
	}
}
catch(e) {}