Team-RTG / Realistic-Terrain-Generation

The Realistic Terrain Generation mod for Minecraft.
GNU General Public License v3.0
245 stars 117 forks source link

Ocean Monuments broken #1229

Closed ghost closed 6 years ago

ghost commented 6 years ago
Affected Mod Versions:

(Please list other mods and their versions if you feel they are relevant to this issue. i.e. Biomes O' Plenty)

Issue Description:

Not sure if its this mod or the pre generator - but Ocean Monuments are not generating correctly

6 ocean monuments

Steps to reproduce the issue: (If it's easily reproducible.)
  1. using Chunk Pregenerator V1.10.2-1.6.2 type /pregen startradius ~ ~ 50 ~ PostProcessing to start a pregeneration of the world
  2. Use Journeymap to map ALL Regions
  3. You will notice that many ocean monuments are corrupt
  4. This happens to multiple newly created worlds - all are realistic terrain worlds
Extra Information:
srs-bsns commented 6 years ago

This has never been observed under normal circumstances, otherwise it would have been known and fixed a long time ago.

I'm not sure why you are experiencing this, but it may have something to due with the pre-generator.

Have you tried using another mod to pre-generate and see if it causes the same issue? Have you seen the same issue when not using the RTG worldtype?

ghost commented 6 years ago

looks like this may be the pre-generator. The monuments spawn ok when you fly over non generated chunks, i'll report it to the other mod.

Speiger commented 6 years ago

I start my testing in a bit. I wonder what the issue is. It could be a combo of things or that my tool doesnt load chunks when generateing them (which is not needed). But i run my test with the same exat things.

Speiger commented 6 years ago

@srs-bsns ok i have done my test with vanilla doing the exact command he did but without jurneymap and teleported there and its looking fine. Now doing the test with RTG included.

srs-bsns commented 6 years ago

First, Just to be clear, you shouldn't do any testing with RTG-1.10.2-4.2.0.0-snapshot-5 as it is an alpha level snapshot. Use the current stable release instead: RTG-1.10.2-4.1.2.4

I can't rule out there being a compatibility issue between your mod and RTG, however, this hasn't been seen with other pre-generation mods. (MDECore, ChunkGen)

I won't be spending any time looking into this for 1.10 as I am the only dev maintianing RTG and I am in the process of porting to 1.12.

The only code on RTG's side that I feel may be a contributing factor is slated for removal anyways, so if there is code on RTG's side that is contributing to this, it's unlikely that this issue will persist after porting to 1.12. If it does, then I will revisit the issue then.

Speiger commented 6 years ago

@srs-bsns then i can give you a bugreport. When using RTG i get errors where entities generate twice and the first 50 chunks that have to be populated take minutes while the rest is done in seconds.
Also i used the latest stable release on curse.

Side Note: The generation code for my tool is 100% equal on every mc version.

@srs-bsns @MeinKraft did you stay close to those chunks? because 50 chunks is only 800 blocks. If you didnt stay close enough to that range my tool didnt generate these!

ghost commented 6 years ago

I generated anywhere between 100,000 and 150,000 chunks on 6 new worlds all have corrupt monuments

to be honest im only generating a world in 1.10 to play in 1.12. I like your mod and couldnt wait for a 1.12 release. so thought generate it in 1.10 and just copy to a 1.12 save folder which works. then set a border so no more chunks can generate..

its a weird bug - only happens when pre-generating the world - normal flying thru new chunks is fine everything is intact

Speiger commented 6 years ago

Well i meant the mod dev, but no problem.
https://github.com/Team-RTG/Realistic-Terrain-Generation/blob/1.10.2-dev/src/main/java/rtg/world/gen/ChunkProviderRTG.java#L554
That is the thing that causes issues. You are doing extra checks that everything is done when populating.
This is something a chunkprovider shouldnt do!

Basically what i found out when using the tool that half of the features wouldn't generate. The line i just gave you is the reason. When a chunk generates it checks already if the [0,0][0,+1][+1,0][+1,+1] is loaded. What you are doing is causing a 3x3 is loaded. That makes RTG 100% incompatible to any pregeneration tool.

Speiger commented 6 years ago

@MeinKraft what i suggest you is only doing a Terrain only (without postprocessing) generation because thats the only way this tool will work for you. (but i still need to test that apropiatly.

Edit yeah terrain only works fine. But this issue is on my side closed @srs-bsns its your bug actually.

Speiger commented 6 years ago

So yeah @MeinKraft its now up to @srs-bsns to fix this. Since its their bug. I already closed my side of the issue and updated my known incompatible mods and noted down that this mod is incompatible to 50% because of the larger worldgen requirement...

Also just so you know @srs-bsns this bug will be also in 1.12 if you keep that kind of logic. so i suggest you to fix it even here then rather keeping that.

srs-bsns commented 6 years ago

@Speiger Team-RTG Discord: https://discord.gg/anKT7YX Though I don't really have much time for chatting at this time.

@Speiger @MeinKraft Have you seen this issue with any other structures, or just Ocean Monuments? If there is a contributing factor on RTG's side, I would expect all other structures to exhibit this same issue. Furthermore, I would assume there will likely also be issues with chunks not decorating.

When a chunk generates it checks already if the [0,0][0,+1][+1,0][+1,+1] is loaded. What you are doing is causing a 3x3 is loaded.

I am aware of how that check works, it is a part of our chunk generator to reduce/eliminate cascading chunk generation caused by decorators/world generators that (sometimes erroneously) generate beyond a chunk's boundry , which was a serious issue in MC 1.7. The code is mostly vestigal and is what I was refering to that is slated for removal.

I don't see how this can be the issue though, as that code is checking our own data storage during that check, with the only exception of it also checking AnvilChunkLoader#chunkExists, which, to my knowledge, doesn't cause any kind of loading at all.

That makes RTG 100% incompatible to any pregeneration tool.

As I already stated, there is no issue with other pre-generation tools. Also, this is the first time that there has been any issue reported to RTG that involves incomplete structures in a RTG world, and that code has exists for about 3 years.

The only issue that we have even had that is similar to this involves chunks that fail to decorate (sometimes many consecutive chunks), but that issue has only ever been seen when used with SpongeForge (cause unknown), or with GregTech in 1.7.10 (cause known). Both of those cases, however, only involve decorations and no other part of chunk population.

Speiger commented 6 years ago

@Speiger @MeinKraft Have you seen this issue with any other structures, or just Ocean Monuments? If there is a contributing factor on RTG's side, I would expect all other structures to exhibit this same issue. Furthermore, I would assume there will likely also be issues with chunks not decorating.

It happens with normal decorating chunks when using my tool in population mode. Trees wont even generate because of this 3x3 requirement. It populates around 50 chunks with my tool and then it skips the other 980 Chunks. And i am calling the standart populatechunk methode.

I am aware of how that check works, it is a part of our chunk generator to reduce/eliminate cascading chunk generation caused by decorators/world generators that (sometimes erroneously) generate beyond a chunk's boundry , which was a serious issue in MC 1.7. The code is mostly vestigal and is what I was refering to that is slated for removal.

Unless a tool is constantly closing the RegionFiles and they need to be reloaded all the time. Also a 3x3 area should not be required to generate 1 chunk.
About the chunk cascading. You can prevent such issues if you do your generation properly.

The only issue that we have even had that is similar to this involves chunks that fail to decorate (sometimes many consecutive chunks), but that issue has only ever been seen when used with

Thats the reason my tool is incompatible to your worldgen thing because that line causes it constantly.

As I already stated, there is no issue with other pre-generation tools

Other pregen tools don't unload chunks properly and cause memoryleaks with that.

You fix the issue by reducing checks to a 2x2 area. @srs-bsns

Speiger commented 6 years ago

@srs-bsns yeah this issue is fixed on my side. It was my bug.