Started by
MammaJammmas
on
Topic category: Troubleshooting, bugs, and solutions
I'm creating a Plant that needs to generate and beable to be placed on a specific block(s) I can not seem to find anything about generating a custom Plant on a different block other than Grass/Dirt nor being able to play it on anything but Grass/Dirt, is there a way to do this?
Edited by MammaJammmas on Mon, 09/30/2019 - 21:38
It's possible, but it requires some custom code. I made a tutorial about it here, but I might remake it.
On Added and On Neighbour change: Check if the block at x, y-1, z is grass/dirt. Otherwise place air at your xyz and drop the item as gem.
Thank you very much this was helpful, but is there any way I can do it with custom elements?
Custom blocks you mean?
If you check on block added + on neighbour change, you can check for any kind of block that you want. If you want it to only grow on slime, you can do so. Using "AND" gates (the blue ... = ... and selecting it in the options) allows you to let it only grow on a group of blocks.
I don't think plants can grow on blocks that can't support them (unless you code).
You could add a custom block that can have plants by using the "can plants sustain on this block?" option
Where can I find this option "can plants sustain on this block?" ???
That option doesn't exist as you can create that option yourself easily in the procedures.
How can I create this, where do I create it?
The option does exist.
There is a checkbox in block creation for 'can plants sustain on block'.
If you want your plant to generate on vanilla blocks, you have a problem. But it's easy if it's custom blocks you want.
Create it inside of the procedures. Make the plant place air at its location and drop itself as gem if the correct block isn't below it. (on block added + neighbour change)
Is there any way you could explain this step by step such as "(Your Item/block) > Next Page > Next Page > Plant Events "When neighbour block changes" " etc, I'm not really understanding the instructions sorry
hey thank you! this really helped! is there a way I can make only specific plants spawn on the specific block that I chose?
Where can I find the option to make the plant place air at its location and drop itself as a gem if the correct block isn't below it?
https://pasteboard.co/IAGvYUB.png
All that you need can be found in the procedure tabs:
World management: (Spawn Gem)
Block Procedures: (Place block at xyz), (Get block at xyz)
Minecraft Components: (Yellow item slot, 2nd from top.)
Logic and loops: (If, do), (not)
Logic operations: (Yellow ... = ... 4th from top.), (Blue ... = ... Right click: External unputs. Select "OR" option)
Math: (0, at the top), (... + ...)