Well, I guess the first question is do you know exactly what that code does, every line? If you don’t then you should figure it out.
Now… These two classes look like they’re run completely separately from each other. What you want to do is have a world class with your tile array. You can run the terrain generator on the world first and then the cave generator. I’m not completely sure how you have a 2d cave, but placing the cave generator “under” the terrain generator is not a trivial problem. Just have it affect the tiles under the terrain generators tiles or have it modify the same tiles depending on what you want to accomplish.
Remember, if you copy, paste, and change a couple values then you will probably never fully understand what that code does. Remember to learn each line of code so that you can debug it easier later.