Advertisement
Corosus

Untitled

Mar 5th, 2011
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. //Its currently implemented really weirdly because it was done before I got them to use modloader
  2.  
  3. GuiInGame.java renderGameOverlay(...)
  4.  
  5. //wave auto init
  6. if (mc.theWorld.zombieWave == 0) {
  7. //newWave = true;
  8. mc.theWorld.zombieWave++;
  9. mc.theWorld.zombieKills=0;
  10. mc.theWorld.waveSpawnCount = 0;
  11. mc.theWorld.waveSpawnMax=(mc.theWorld.zombieWave*3)+7;
  12. }
  13.  
  14.  
  15. //kill counter trigger of new wave init
  16. if (!(newWave) && (mc.theWorld.zombieKills>=mc.theWorld.waveSpawnMax) && mc.theWorld.zombieWave != 0)
  17. {
  18. waveDelay = System.currentTimeMillis();
  19. newWave = true;
  20. //fontrenderer.drawStringWithShadow("You can move on to the next wave now!", 2, 80, 0xE52626);
  21. }
  22.  
  23.  
  24. //more....
  25. if (newWave) {
  26.  
  27. if(System.currentTimeMillis() - waveDelay >= 10000) {
  28. if (mc.theWorld.zombieKills >= mc.theWorld.waveSpawnMax)
  29. {
  30. mc.theWorld.zombieWave++;
  31. mc.theWorld.zombieKills=0;
  32. mc.theWorld.waveSpawnCount=0;
  33. mc.theWorld.waveSpawnMax=(mc.theWorld.zombieWave*3)+7;
  34. //mc.displayGuiScreen(null);
  35. //mc.func_6259_e();
  36. newWave = false;
  37. }
  38. }
  39. }
  40.  
  41.  
  42. TileEntityMobSpawnerWave.java
  43.  
  44. added in updateEntity()
  45.  
  46.  
  47. if (worldObj.waveSpawnCount < worldObj.waveSpawnMax && worldObj.zombieWave > 0)
  48. {
  49. //the usual entity creation code plus...
  50.  
  51. //if ent made
  52. worldObj.waveSpawnCount++;
  53. }
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60. somewhere the kill counter goes up, cant find it heh, suicided zombies causes it to go up so its probably a hook into setEntityDead or something
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement