Hello! I made a custom dimension and i got strange problem. Whenever I add any structure to generate in my dimension minecraft gets strange server lags. I tried everything. Changing way of registering biome,dimension, moving custom structure from custom biome decorator to Generator Handler that implements IWorldGenerator and then registering it in main class. Nothing helped. These server lags lasts for about 1-2 minutes, and then everything is just fine. During the lag, I cannot break blocks, entites are lagged, etc. When I do not generate the structure, my dimension isn't laggy. My dimension is multi biome and the bug occurs no matter which forge version I use. I am working on minecraft 1.12. I can post the whole code on github if someone knows what can cause these lags. What can be wrong?
Generators are copied from vanilla (changed only blocks).