Advertisement
Guest User

špitál/code

a guest
Dec 20th, 2015
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.05 KB | None | 0 0
  1. public void generateSurface(World world, Random random, int i2, int k2){
  2.  
  3. int i = i2 + random.nextInt(15);
  4. int k = k2 + random.nextInt(15);
  5.  
  6. int j = world.getHeightValue(i,k)-1;
  7.  
  8. if((random.nextInt(1000000)+1)<=710){
  9. boolean place = true;
  10.  
  11. if(place){
  12. spawn(world, i, j, k);
  13. }}
  14. }
  15.  
  16. public void generateNether(World world, Random random, int chunkX, int chunkZ){}
  17.  
  18. public int addFuel(ItemStack fuel){
  19. return 0;
  20. }
  21. public void serverLoad(FMLServerStartingEvent event){}
  22. public void preInit(FMLPreInitializationEvent event){}
  23. public void registerRenderers(){}
  24.  
  25. public static void spawn(World world, int x, int y, int z) {
  26.  
  27. world.setBlock(x+0, y+0, z+0, Block.getBlockById(2));
  28. world.setBlock(x+1, y+0, z+0, Block.getBlockById(2));
  29. world.setBlock(x+2, y+0, z+0, Block.getBlockById(2));
  30. ...
  31. ....
  32. //some thousands lines later...
  33. world.setBlock(x+37, y+0, z+39, Block.getBlockById(173));
  34. world.setBlock(x+38, y+0, z+39, Block.getBlockById(173));
  35. world.setBlock(x+39, y+0, z+39, Block.getBlockById(2));
  36. spawn1(world, x, y, z);
  37. }
  38.  
  39. private static void spawn1(World world, int x, int y, int z) {
  40.  
  41. world.setBlock(x+0, y+0, z+40, Block.getBlockById(2));
  42. world.setBlock(x+1, y+0, z+40, Block.getBlockById(173));
  43. world.setBlock(x+2, y+0, z+40, Block.getBlockById(173));
  44. world.setBlock(x+3, y+0, z+40, Block.getBlockById(173));
  45. world.setBlock(x+4, y+0, z+40, Block.getBlockById(173));
  46. world.setBlock(x+5, y+0, z+40, Block.getBlockById(173));
  47. ...
  48. ....
  49. //some thousands lines later...
  50. world.setBlock(x+37, y+0, z+39, Block.getBlockById(173));
  51. world.setBlock(x+38, y+0, z+39, Block.getBlockById(173));
  52. world.setBlock(x+39, y+0, z+39, Block.getBlockById(2));
  53. spawn2(world, x, y, z);
  54. }
  55. private static void spawn2(World world, int x, int y, int z) {
  56.  
  57. world.setBlock(x+0, y+0, z+40, Block.getBlockById(2));
  58. world.setBlock(x+1, y+0, z+40, Block.getBlockById(173));
  59. world.setBlock(x+2, y+0, z+40, Block.getBlockById(173));
  60. world.setBlock(x+3, y+0, z+40, Block.getBlockById(173));
  61. world.setBlock(x+4, y+0, z+40, Block.getBlockById(173));
  62. world.setBlock(x+5, y+0, z+40, Block.getBlockById(173));
  63. ...
  64. ....
  65. //some thousands lines later...
  66. world.setBlock(x+37, y+0, z+39, Block.getBlockById(173));
  67. world.setBlock(x+38, y+0, z+39, Block.getBlockById(173));
  68. world.setBlock(x+39, y+0, z+39, Block.getBlockById(2));
  69. spawn3(world, x, y, z);
  70. }
  71. private static void spawn3(World world, int x, int y, int z) {
  72.  
  73. world.setBlock(x+0, y+0, z+40, Block.getBlockById(2));
  74. world.setBlock(x+1, y+0, z+40, Block.getBlockById(173));
  75. world.setBlock(x+2, y+0, z+40, Block.getBlockById(173));
  76. world.setBlock(x+3, y+0, z+40, Block.getBlockById(173));
  77. world.setBlock(x+4, y+0, z+40, Block.getBlockById(173));
  78. world.setBlock(x+5, y+0, z+40, Block.getBlockById(173));
  79. ...
  80. ....
  81. //some thousands lines later...
  82. world.setBlock(x+37, y+0, z+39, Block.getBlockById(173));
  83. world.setBlock(x+38, y+0, z+39, Block.getBlockById(173));
  84. world.setBlock(x+39, y+0, z+39, Block.getBlockById(2));
  85.  
  86. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement