Forcing tick update on structure generation

Started by Orandza on

Topic category: Help with modding (Java Edition)

Last seen on 20:19, 3. Feb 2024
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Forcing tick update on structure generation

So I have a few structures that are way bigger than a single chunk in width and height. However, as you know this causes said structures to get cut off a lot of the time when generating. However I was able to solve this before. I had a single block that would spawn instead of my structure. This block would however spawn the actual structure I need on tick update. And when the block would spawn as a structure, I'd use on structure instance generation procedure to schedule a tick for this block, which then triggers the update tick procedure that spawns the intended structure. This worked flawlessly, tho it did cause slight lag whenever one would spawn, my structures never got cut off. 

But now I can't do this anymore, all my structures have been converted into features which lack the on structure instance generation procedure. And even if I were to remake them as structure elements, these also lack the procedure I need now!

I tried a bunch of stuff, like using "when neighbour block changes" and then placing another block next to my structure spawner block using additional spawning condition procedure, but this seemed to only occasionally work, usually it did nothing without me triggering the procedure manually. Trying to schedule a tick using additional spawning conditions does nothing so it's not an option either. I tried "redstone on" as well but it seemed random regarding when it would work. I can use random ticking for the block but I want it to work consistently and instantly, which random ticking doesn't. Can someone help me out? And could there be a way of triggering a procedure on feature generation in the future(and perhaps bring back on structure instance generation procedure)?

Last seen on 03:20, 24. Feb 2024
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Something that I have found…
Tue, 11/28/2023 - 19:03

Something that I have found might work would be to create a block that ticks randomly, then modify the procedure template for checking for a block in a 6x6x6 cube, and change it to remove the custom block.  After removing all of your custom block, run the procedure to generate your structure.  To make it naturally generated, create a small structure that is just a bunch of the generator block in a flat plane(to get the right Y value), and spawn that in place of your one block.  The downside with this is that is sometimes has a delay, but if you turn up randomtickrate or increase the number of generator blocks, it should work okay.

Last seen on 20:19, 3. Feb 2024
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I can try but like I said, I…
Tue, 11/28/2023 - 19:09

I can try but like I said, I would want something that isn't random ticking as it can take a while. I can still try to maximize chances by having more blocks that would tick randomly instead of one, but would be nice not to have to do that(and if it still doesn't end up spawning my structure right away, people will notice the random group of blocks more easily then). Thanks anyways, would really just like to have on feature generate procedure of some sort as that would straight up solve my issue.