How to make custom block hang on a jungle tree

Started by Flummidill on

Topic category: Help with modding (Java Edition)

Last seen on 15:56, 2. Dec 2023
Joined Feb 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make custom block hang on a jungle tree

how do i do it so that my custom block gets generated on jungle trees like cocoa?

Last seen on 20:43, 20. Aug 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Tricky, but not impossible…
Thu, 07/27/2023 - 06:25

Tricky, but not impossible. Try something like this:

  • Use a structure block to save a single block of air as a structure. Name it 'void' or something.
  • Have this void structure naturally generate in the jungle biome, make sure it only generates on existing air blocks. (And thus doesn't change anything.)
  • When the structure is generated, call a custom procedure. Use the 'check for block in 6*6*6 box' procedure template, but get rid of the 'found' variable. Instead, have it check if the block at x+sx, y+sy, z+sz is a jungle log, and, if it is, check for an air block on each of the four adjacent sides, and place your custom block there with the direction set based on the side.
  • You can expand the range of the box procedure, or just make your structure more common to increase the frequency of the block, or add some random chance to make the distribution more varied. The same principle works pretty well for all sorts of naturally generated stuff that you want to generate more specifically than normal generation allows for.