Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.52 KB | None | 0 0
  1.  
  2. //first off in your mod_* file you'll add
  3. public int birdSpawnrate = 5;
  4. public int spawnCount = 0;
  5.  
  6. //in one of your methods
  7. if(spawnCount > 40){
  8. birdSpawnrate++;
  9. //or
  10. birdSpawnrate == 20;
  11. //higher number = rarer spawns
  12. }
  13. //or whatever, if you want it mob specific or as a whole
  14. //then in your getCanSpawnHere method for the mob you will do
  15.     if(rand.nextInt(birdSpawnrate) == 0)
  16.     {
  17.     do the spawning stuff;
  18.     spawnCount++;
  19.     }else  
  20.     {
  21.     return false;
  22.     }
  23.  
  24. //in your onDeath, or when unloaded add
  25. spawnCount--;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement