Help with structure generation

Started by zerunox on

Topic category: Help with Minecraft modding (Java Edition)

Joined Feb 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help with structure generation

I am working on a custom biome for 1.20.1 and i am trying to add unique trees and decorations, i am using structures to generate these. However they all keep spawning one block below, rather than spawning on top of the grass, they spawn inside of the grass. I have made a mod for 1.12 and it had the offset feature, but that seems to be missing now. If the offset structure thing is still there, where? or how do i get my trees to stop spawning in the ground

Joined Feb 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
also the trees keep spawning…
Sun, 02/09/2025 - 19:25

also the trees keep spawning in water and lakes as well

Joined Jan 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ok, so for this you can do…
Thu, 02/20/2025 - 01:06

Ok, so for this you can do two things.

  1. For the one where it is spawning a block below.

    You can use the /give @s Minecraft:structure void command. and that is basically a block that gets replaced by the terrain around it. (it's basically an air block)

    Or, you can use the structure feature mod element and do conditions checking if the y -1 under the structure is 

    1. (optional) a specified block. (grass, sand, etc.) 

    2. If the block is solid. (I can send screenshots if you need. but it might take a bit.)

  2. To make the trees not spawn in water, you literally use the two feature tips I gave you (specifically the second one) and it will solve it. But features come at a cost. (you can't do /locate. and you can't use the terrain adaptation feature, which I find very helpful for trees. but it does have custom tree settings in there.) Also, if you don't know how to use the feature mod element, then A.C.E on YouTube has a good structure video.