First, you can make the plant block that it spawns on stone.(Overworld) (So in caves it would replace stone for the new block).
Second, you could make a whole new biome for the overworld which is similar to caves, and then adding your plant (not as block) to appear in that biome.
Make a block for your plant. Customize the block however, but since it's a plant, make the model a Cross-Model.
Next, on the final tab of the block, make the min spawn height to 0 and the max to 20 - 50 so that it hopefully won't spawn above ground.
Then, make a procedure that checks if the block is on stone or some other ore found underground, and make it so if the plant is not on stone, it removes the block WITHOUT a drop.
This is the best way I could think of, but do try and play around with it. There may be a much better way of doing this.
I forgot to mention, make sure the procedure for checking if it's on stone is under the tick update procedure. This may cause lag, but it is the only way I can think of doing it automatically.
Hello there!
I have 2 solutions for you, that should work.
First, you can make the plant block that it spawns on stone.(Overworld) (So in caves it would replace stone for the new block).
Second, you could make a whole new biome for the overworld which is similar to caves, and then adding your plant (not as block) to appear in that biome.
Let me know if i helped you.
Make a block for your plant. Customize the block however, but since it's a plant, make the model a Cross-Model.
Next, on the final tab of the block, make the min spawn height to 0 and the max to 20 - 50 so that it hopefully won't spawn above ground.
Then, make a procedure that checks if the block is on stone or some other ore found underground, and make it so if the plant is not on stone, it removes the block WITHOUT a drop.
This is the best way I could think of, but do try and play around with it. There may be a much better way of doing this.
I forgot to mention, make sure the procedure for checking if it's on stone is under the tick update procedure. This may cause lag, but it is the only way I can think of doing it automatically.
you could you a "first time" local variable to only remove it once.