Jump to content

[1.18] Post-Process Jigsaw Structures to Add Blocks


Recommended Posts

I have a generated structure that generates a multi-storey tower consisting of a few levels picked from a pool of interchangeable sections. The levels are connected and generated using jigsaw blocks.

Each level is to be connected to the level above by a ladder, but I would like it if the ladders could be in different places each time the structure is generated. On each level there are 8 spots where the ladder could go (the same 8 in all possible levels), and I would like it to pick from these randomly. Ideally I could do this programmatically, rather than having to create and save 8 different versions of each level with jigsaw blocks. However, it is not clear to me when the blocks actually get placed in the world and whether I can hook into this to perform arbitrary post-processing to the structure after the jigsaws have done their work. Is it possible to do this?

If not, is there a simple way other than jigsaws that I can build tower sections in-game and then pull from a pool to generate them? I do not need all of the capabilities of jigsaws as all levels are of the same size and fit together in a simple linear fashion, so it would be simple to fit them together in code if I had a method that could place a section from saved NBT output from a structure block. This approach might be preferable as it would also allow me to prevent duplicates of certain levels, which it does not seem to be possible to do with jigsaws.

NB: If there will be a simpler solution in 1.19.X, give the solution for that instead and I'll just update my mod to that version.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.