Help making naturally-generated decoration blocks only spawn on certain blocks

Started by Bigmancozmo on

Topic category: Help with modding (Java Edition)

Last seen on 00:31, 19. Apr 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help making naturally-generated decoration blocks only spawn on certain blocks

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)

Last seen on 04:08, 25. Apr 2024
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
1. Create a block and set it…
Wed, 06/22/2022 - 12:26

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.

Last seen on 00:31, 19. Apr 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks! I'm not really new…
Wed, 06/22/2022 - 14:17

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)