SpongeForge icon indicating copy to clipboard operation
SpongeForge copied to clipboard

Broken village generation with Recurrent Complex

Open Ghostlyr opened this issue 7 years ago • 33 comments

I am currently running

  • SpongeForge version: 1.12.2-2555-7.1.0-BETA-2831
  • Forge version: 14.23.1.2555
  • Java version: 1.8.0_151
  • Operating System: Debian 8.10
  • Plugins/Mods: Nucleus, WorldEdit Baubles, Biomes O' Plenty, CXLibrary, Chisel, CodeChicken Lib, CraftStudio API, IvToolkit, Mantle, Plants, Recurrent Complex, Tinkers' Construct, Tough As Nails, Treecapitator, bspkrsCore

Issue Description Continuation of https://github.com/Ivorforce/RecurrentComplex/issues/251 Most of the village structures generates half-cutted on sponge server. This problem observed only when village is located in the neighborhood of Recurrent Complex complex structure - even vanilla structures generetes a corrupted. Actual for all level-types and w/o biomes mod. Not reproduced on the local forge server.

FML log: https://gist.github.com/Ghostlyr/4488c4a053f4305403db437acdb38733

2018-01-11_19 40 05 2018-01-11_19 35 49 2018-01-11_19 35 27 2018-01-11_19 34 56 2018-01-11_19 47 37

Seeds: 7284704537360369973, 3685878581852412182

Ghostlyr avatar Jan 11 '18 13:01 Ghostlyr

can you reproduce it without sponge ? because minecraft can be derpy with world gen especialy with BOP and Recurrent Complex

unstablecraft avatar Jan 11 '18 13:01 unstablecraft

Everything is fine without a sponge. Just now i noticed some RC structures are not generated at all on sponge.

2018-01-11_20 04 15

Ghostlyr avatar Jan 11 '18 14:01 Ghostlyr

oke ill give it a shot with all the latest versions of the mods

unstablecraft avatar Jan 11 '18 14:01 unstablecraft

both Treecapitator, mods aren't updated to 1.12 btw this mod might be disabled same as bspkrsCore

unstablecraft avatar Jan 11 '18 14:01 unstablecraft

https://minecraft.curseforge.com/projects/treecapitator-port

Ghostlyr avatar Jan 11 '18 14:01 Ghostlyr

also update forge!

unstablecraft avatar Jan 11 '18 14:01 unstablecraft

image

looks like a hit or miss used same mods but the latest versions from curse and updated forge

unstablecraft avatar Jan 11 '18 14:01 unstablecraft

On your screenshot it is also visible broken structure. Tents should look like this:

default

Ghostlyr avatar Jan 11 '18 14:01 Ghostlyr

@Deamon5550 Thoughts?

Zidane avatar Jan 11 '18 14:01 Zidane

<Removed dead links, please don't use discord attachments, they age out --ryantheleach>

worldgen with sponge without Recurrent complex turns out normal so its not just sponge ;) but a mod-incompatibility

unstablecraft avatar Jan 11 '18 15:01 unstablecraft

This needs testing after Forge:

Forge Changelog:

Build 1.12.2-14.23.4.2708:
	bs2609:
		Fix structure template processors causing cascading world generation
		(#4979)

ryantheleach avatar Jul 30 '18 20:07 ryantheleach

This is also being tracked at RecurrentComplex git: https://github.com/Ivorforce/RecurrentComplex/issues/323 https://github.com/Ivorforce/RecurrentComplex/issues/251

Rutes avatar Oct 19 '18 03:10 Rutes

Just tried testing again today with the latest Sponge for Forge 2768 - same problem. Is there any other useful data I could gather to track down whether the issue lies with Sponge, RecurrentComplex, or Forge itself? image

Rutes avatar Oct 19 '18 22:10 Rutes

did this ever get fixed ? also does this mod work with the structures that don't spawn in villages i just need a mod like this that works with sponge :)

Bucky420 avatar May 07 '19 15:05 Bucky420

No, not fixed. Still an issue with the versions I'm using: spongeforge-1.12.2-2768-7.1.6-RC3666.jar and RecurrentComplex-1.4.8.2.jar image

Rutes avatar May 08 '19 17:05 Rutes

Looking into the issue, I'm having the feeling that there's some offset issues and I'm trying to analyze the differences between vanilla world gen and Recurrent Complex's implementation with world generation. Specifically, I'm finding the MapGeneratorStructureHook is getting correctly placed, but in some chunk offsets, it's not being called. Because of the commit from Sponge where we started properly doing the 8 position offset, I'm noticing the structures are being placed with that offset, and the "missing chunk" is 8 blocks in with that offset.

It'll take some more time as this issue isn't terribly high on the priority list of bug fixes, but it is on our radar. Hopefully with ~~1.13~~ 1.14's world generation pipeline being rewritten from the ground up, we'll be able to avoid these sort of compatibility issues in the future.

Edit: Further investigation findings:

  • Offset is correct, when running RecurrentComplex with the same structure data files and world seed, the structures are being generated at the same positions (of course, as they should be?), so it's not an issue with offset.
  • RecurrentComplex does seem to be doing a lot of cascading chunk loading due to it's generation, this isn't sponge's fault since it is doing this in it's own forge environment
  • The chunk that ends up being missed as generated isn't showing up as a chunk load request from cascading generation lag.

gabizou avatar May 09 '19 20:05 gabizou

every thing works for me im only using it to spawn 1 thing in :) i love the mod i think its just a village issue

Bucky420 avatar May 09 '19 20:05 Bucky420

I'm on SpongeForge 1.12.2-2838-7.1.7-RC3928 and still having this issue, any news?

ken1882 avatar Oct 26 '19 21:10 ken1882

I think we still needed a way to reproduce it every time

clienthax avatar Oct 26 '19 23:10 clienthax

Ok so I'm using a lightweight server/client with only sponge forge and recurrent complex and other assist mods which won't affect worldgen at all.

I created a new world on both server and client with same seed (616985878107971) then got the following result:

(client-side generated village, which is normal) image

(sponge server generated village) image

Here's my necessary server file, I didn't the include the spongeforge.jar otherwise it'll take forever to upload :v lightweight_server.zip

Log during init world generation: output.log

P.S. the village is located at the north-east of the spawn

EDIT: Hacky solution: disable sponge.jar and start the server also make sure no one online, using chunk pre-generate mod to pre-generate chunk (this will also generate structure unless you have defined a save zone), so the structure won't be broken. After the generation has done, enable sponge.jar and restart the server, everything should be fine unless someone runs over the pre-generated area so the chunk will buggily generated again, so perhaps it's best to pre-generate everything inside the world border but it'll take a long time also lots of disks space

ken1882 avatar Oct 27 '19 04:10 ken1882

hehe your "hacky solution" is exactly what I did in my world back then...

a way to reproduce it every time

Easy, just run Recurrent Complex and Sponge - it happens every time.

Just reminder/bump that this issue is also being tracked on the RecurrentComplex side: https://github.com/Ivorforce/RecurrentComplex/issues/323

Rutes avatar Oct 28 '19 03:10 Rutes

pie-flavor avatar Oct 29 '19 01:10 pie-flavor

Easy, just run Recurrent Complex and Sponge - it happens every time.

There's a difference between non-deterministic reproduction and deterministic reproduction. I can't get it to reproduce in development always at the same positions/chunks and I'm not going to sit there waiting and clicking through for villages to generate hundreds of chunks at a time to find when the one chunk isn't being targeted by Recurrent Complex.

gabizou avatar Oct 29 '19 16:10 gabizou

It seems that if you only delete the region files instead of the entire world folder, the chunks will regen in the same way.

It also seems this bug exists as far back as spongeforge-1.10.2-2123-5.1.0-BETA-1888 (Couldn't find any older builds to test against)

clienthax avatar Oct 30 '19 00:10 clienthax

Think im on the right track This seems to be a problem with the overwrite mixin here https://github.com/SpongePowered/SpongeCommon/blob/stable-7/src/main/java/org/spongepowered/common/mixin/core/world/gen/structure/MapGenStructureMixin.java

Disabling this leads to correct generation.

image

clienthax avatar Oct 30 '19 03:10 clienthax

So, seems the issue is that RecurrentComplex seems to cause generateStructure to be called while a structure is already being generated, this conflicts with sponges patch to prevent CME's which silently fails. https://github.com/SpongePowered/SpongeCommon/blob/stable-7/src/main/java/org/spongepowered/common/mixin/core/world/gen/structure/MapGenStructureMixin.java#L64

[03:57:34] [Server thread/INFO] [STDOUT]: [net.minecraft.world.gen.structure.MapGenStructure:func_175794_a:1064]: Would of returned false due to already generating structures, 21 5

Possibly this https://github.com/Ivorforce/RecurrentComplex/blob/9937aef9794463cd87e1b0c22992c19b354a1c2f/src/main/java/ivorius/reccomplex/world/gen/feature/structure/MapGenStructureHook.java#L172

clienthax avatar Oct 30 '19 03:10 clienthax

Thanks for the quick update! I have also linked this issue on RecurrentComplex's repo, hopefully this can be resolved soon

ken1882 avatar Oct 31 '19 13:10 ken1882

So, something I can see being done is a catch and re-schedule as a task to generate with those parameters for the structure if caught, Emit a warning once (configurable), and then move on. I'd have to write it up and test, but it might very well work.

gabizou avatar Oct 31 '19 17:10 gabizou

I was having the same issue for a long time, but I read that spongeforge changes generation and is likely to be the issue. So, even though I had a bunch of mods that required spongeforge I decided to remove spongeforge form my mods folder (both server and client) just to see what happened (I was expecting for it to crash and say that some mods needed spongeforge), but everything loaded and worked correctly with no errors. I made a creative world and flew around to generate some villages in order to see if it worked and I found a bunch of villages all of which generated correctly. So try removing spongeforge from your mods folder and see what happens, that should fix the issue.

DanSchlac avatar Jul 03 '20 16:07 DanSchlac

Well that's not really a fix is it? You could pregenerate your world without sponge indeed, then plop a world border & sponge back in and you're good to go; It only becomes a real issue when the world is generated while exploring, without a world border

KiralyCraft avatar Jul 03 '20 17:07 KiralyCraft