Thanks, both of you. I realize i should follow a few tutorials first before starting with this, because right now i don't even know how to start  I'm not going to give up though i'll see this trough until i have something i'm happy with.  
  
I'll explain a little better what my goal is. 
I'd like to make a mod in which for example a custom mob starts spawning from x=500 to x=1000 and then have another custom mob spawn from x=1000 to x=1500 and so on. 
  
The idea is that the further you are away from spawn the more difficult the mobs will be to kill.