content: package zmaster587.advancedRocketry.world.decoration;
  
  import net.minecraft.world.World;
  import net.minecraft.world.chunk.ChunkPrimer;
  
  public class MapGenHighCaves extends MapGenCaveExt {
  
  	
      /**
       * Recursively called by generate()
       */
      protected void recursiveGenerate(World worldIn, int chunkX, int chunkZ, int originalX, int originalZ, ChunkPrimer chunkPrimerIn)
      {
          int i = this.rand.nextInt(this.rand.nextInt(this.rand.nextInt(15) + 1) + 1);
  
          if (this.rand.nextInt(7) != 0)
          {
              i = 0;
          }
  
          for (int j = 0; j < i; ++j)
          {
              double d0 = chunkX * 16 + this.rand.nextInt(16);
              double d1 = (double)this.rand.nextInt(this.rand.nextInt(64) + 8) + 90;
              double d2 = chunkZ * 16 + this.rand.nextInt(16);
              int k = 1;
  
              if (this.rand.nextInt(4) == 0)
              {
                  this.addRoom(this.rand.nextLong(), originalX, originalZ, chunkPrimerIn, d0, d1, d2);
                  k += this.rand.nextInt(4);
              }
  
              for (int l = 0; l < k; ++l)
              {
                  float f = this.rand.nextFloat() * ((float)Math.PI * 2F);
                  float f1 = (this.rand.nextFloat() - 0.5F) * 2.0F / 8.0F;
                  float f2 = this.rand.nextFloat() * 2.0F + this.rand.nextFloat();
  
                  if (this.rand.nextInt(10) == 0)
                  {
                      f2 *= this.rand.nextFloat() * this.rand.nextFloat() * 3.0F + 1.0F;
                  }
  
                  this.addTunnel(this.rand.nextLong(), originalX, originalZ, chunkPrimerIn, d0, d1, d2, f2, f, f1, 0, 0, 1.0D);
              }
          }
      }
      
  }
  