Topic category: User side tutorials
If in a programming phase of your mod you encountered the problem of creating a plant / mushroom / crystal etc that you would like to spawn only in caves but you have not found options in Mcreator that allow you to do so, you are in the right place (or forum, like do you want). Just follow my steps and in the end you will have your cave plan:
1) In the workspace of your plant, in the properties tab, you will first have to select as plant type cave, in this way your plant can be placed on all solid blocks (with solid blocks I mean the blocks that are transparent like glass or with different hitbox)
2) Now go to the generation tab of the plant and select the spawn values you want of your plant, i.e. in what size / biome it should generate and in what quantity. I advise you not to set values too low, otherwise it will be too rare, or too high, otherwise the caves will fill up and the world could crash (not to me that one of the two is not your project :))
3) Still in the generation tab go to addition generation condition create a new procedure that you can see in this image. The first block controls the height at which you want your plant to spawn, in this case I recommend that you put values below 50 otherwise your plant will spawn on the surface. The second procedure instead checks that the block above which the plant will generate is cave air, a special block that is generated in caves.
4) Now test your plant and enjoy :)
This tutorial is only valid for the most recent versions of Mcreator. In case of any problems, please write below.