Custom blocks in generated structures not spawning in exported mods

Status
Fixed
Issue description

I made a structure with my mod. It had a mob spawner and a chest too. There was a mob in the spawner and some items in the chest.

I made the structure spawn in a biome and when I found it in runclient the chest was filled with items, there was the mob in the mob spawner and everything was working fine.

I exported my mod and tested it using a few other mods (that don't modify structure gen). I found the structure but both the mob spawner and the chest were empty.

I think that this is caused by mod conflict, I will later check the structure without using other mods.

(Sorry for bad English)

EDIT: It seems that no custom blocks, items in chests and mobs spawn, so this bug is not just for items in chests but for everything modded. It also happens when the mod that adds the structure is alone.

Issue comments

Would you mind giving the .jar file of the mod and instructions on how to spawn your structure so I can test this myself? Thanks!

I tried to find a structure of RaolCraft Omega and no modded blocks placed, items in chests and mobs in mob spawner spawned. Non-modded blocks/items/mobs spawned. So the bug is that modded stuff does not generate after exporting mods. I have tried it with both RaolCraft Omega with other mods and RaolCraft Omega alone.

Now I will add the jar file to the description.

To find that structure you need to make a portal of "Frostbricks" and ignite it using the igniter "Scepter of the Eternal Cold". It is the only structure that spawns in that dimension and it is not very hard to find. If you go in spectator mode it should be even easier.

(Sorry for bad English)

Thanks, I will try this out, but the interesting thing is that I have tested this myself with the exported mod with one structure and it worked, so I am not entirely sure how to replicate this bug. I will do my best to find out what is causing this.

I have managed to fix this, now custom blocks spawn. The fix will be released in MCreator 1.8.1. Existing structures will be fixed by importing the workspace in 1.8.1.

I am using 2021.3 making a mod for 1.17.1 and I still have the same issue

More information: instead of normally generating structures, I put an entity in a structure file and make this entity despawn and spawn a structure on a tick update. This avoids structures being cut in half due to generating in chucks that haven't been created.

My structures now spawn only blocks that are vanilla and generate air where modded blocks should be.