Procedure causes world loading to hang at 100% on 1.14.4 (works on 1.12.2)

Published by Smakced on
Status
Fixed
Issue description

When trying to load into a world for the second time with the procedure below attached to a mob in the "On Initial Mob Spawn", the loading hangs at 100%. There are no errors in the log, it just shows that the world is stuck loading at 96% (the in game screen says 100%). I use this procedure to prevent mobs from spawning in caves, it works on 1.12.2 but not 1.14.4.

procedure

Issue comments

I have made the same procedure and made mob and nothing crashed.

It would be better if you gave the whole workspace and it is quite hard to assume this actual procedure is the problem.

Try replacing the "any stone" you have in the procedure with specific stone as wildcard material checking in not supported anymore in 

Now I was able to reproduce this. The console says:

[Server-Worker-7/WARN] [minecraft/WorldGenRegion]: Tried to access a block entity before it was created. BlockPos{x=380, y=80, z=-288}

It seems it is no longer possible to access the blocks at the time of spawning mob if the world is still generating. Try using global on spawned trigger instead, that one might work.

I am not sure, light levels are most likely not calculated at the time of this event being triggered. Try using global trigger on entity spawned to see if it does any changes.

When using the global trigger "Entity Spawns" it causes the world loading to hang at 100%. When I test the exported mod (without the global trigger) the light level now works, although I think it may be a bit off by 1 or 2 compared to 1.12.2 but it still works.

Do you use the same version of Forge? It could be forge bug fixed or introduced in other version.