Started by
Bigmancozmo
on
Topic category: Help with Minecraft modding (Java Edition)
Hi again! I am working on a mod and I'm making my own dimension. I want it to have custom decorations, but I only want them to generate on certain blocks. (ex. how grass and flowers only generates on grass blocks)
1. Create a block and set it to generate by replacing the "certain block" you want it to generate on.
2. Add a procedure to the trigger "When block is added"
3. This procedure should first replace the block with the "certain block" that it replaced during generation, then places the "decorations" in whatever place you wish.
For example, for a flower generating on grass - set the block to generate replacing grass, and for the procedure make sure to place the flower at y+1 relative to the block.
This method will only work for one type of "certain block" you are replacing, as the procedure won't know which block to replace the current one with, this can be alleviated by creating multiple blocks - one for each "certain block" to replace, and realistically you can put whatever you want in the procedure such as a randomizer to generate random decorations, etc.
This method has worked for me in the past for placing pots in caves, however that was in 1.16 so the "When block added" trigger may not function the same way as of the 2022.1 version of MCreator.
Thanks! I'm not really new to MCreator, I just took a really long break from working on my mod. (oh btw my account is so new because I kept forgetting to unlock it so I kept having to ask them to delete it)