
Portals don't sync properly when chunk on the other side is generated for the first time
CD4017BE opened this issue ยท 0 comments
When digging through a portal into a chunk that hasn't been generated yet, the blocks on the other side get properly removed and the effects appear correctly on the portal. However after traveling through the open portal, the portal on the other side appears in an incorrect closed state.
Likely cause:
The chunk was generated with raw terrain but not populated with the additional features (plants, ores, etc) because the neighboring chunks must be generated as well for that to happen. The portal layer is generated via Forge's chunk ore generation event so it could have overridden the existing portal state, when chunk population kicked in.
So to fix this I should
- either ensure the chunk gets immediately populated (could cause lag and/or other problems)
- or generate the portal layer immediately as part of terrain instead of late ore generation (risks other mods potentially overriding the portals with other blocks)
- or let portals automatically place their counterpart when missing and the portal generator later checks if portals already exist to keep the existing state.