how do i make a block that generates on the side of certain selected blocks

Started by Vanillo on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how do i make a block that generates on the side of certain selected blocks

I'm currently trying to make my Shelf Fungus block generate on the sides of Birch Trees and Birch logs. How do I make it so my Shelf Fungus can generate facing outwards on any side of a Birch Log?

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Structures with custom…
Tue, 12/27/2022 - 17:30

Structures with custom generation like that are tricky, but I have found some workarounds. Here's what I'd recommend:

  • Make a custom, invisible block that executes a procedure when ticked:
    • When ticked, the block replaces itself with air, checks within a specified radius for birch logs, and places your custom fungus block adjacent to them. You can add randomization and other conditions as you like, there's a 'Check for block in 6*6 box' procedure preset that you can modify to do this.
    • Save the invisible block as a custom structure, and generate it in birch forests.
    • Because naturally generated blocks don't tick, you'll need to add an additional procedure that triggers when the structure is generated, and sends an update tick to the block. 

It's not an ideal solution, but I haven't found a better one for complex generation like this.