Open LukaPix opened 6 years ago
Does this happen reliably?
Yes, i also tried generating a Biomes O' Plenty and the other Minecraft world types, everything crashes besides a flat world
This looks like a mod interaction with "EC3", "AcademyCraft", "plantmegapack", GregTech, and a couple others. All the world generators are interfering and causing chunk gen to continue infinitely.
As for Gregtech5 it generates chunks in 3x3 sets at once, and thus can interact badly with other mods that do similar things. GT6 on the other hand is fully noise-deterministic and thus only generates 1 chunk at a time, never more. As GT5 is being used above, it may be contributing to the issue when mixed with another mod, but would not be the issue of itself.
The issue is "spilling" generation, which is near-ubiquitous among mods, especially those that add anything more complex than a flower or tree type. Basically a chunk generates, and a mod generates some blocks - usually part of an ore vein, structure, or similar - that 'spills' into adjacent chunks, triggering their generation as well. If those also have their own spilling generation, then this can continue until either A) the PC runs out of RAM or B) the JVM crashes with a StackOverflow.
Because of the asynchronicity and unpredictability of chunk generation and order thereof, there is not really a way to fix this; caches cannot be relied on as there is no guarantee that A) they will not grow unmanageably large or B) be meaningless.
The issue is "spilling" generation, which is near-ubiquitous among mods, especially those that add anything more complex than a flower or tree type. Basically a chunk generates, and a mod generates some blocks - usually part of an ore vein, structure, or similar - that 'spills' into adjacent chunks, triggering their generation as well. If those also have their own spilling generation, then this can continue until either A) the PC runs out of RAM or B) the JVM crashes with a StackOverflow.
Yep, this is a huge issue. For everyone to know better that basically means that, for example, GT5 can generate it's 3x3 chunks, which maybe another mod generates a single neighbor chunk on one of those edges, which then causes another 3x3 to generate, and so forth. Lots of different mods can interact like this.
This is why GT6 is entirely noise-based (I kept yelling at greg to fix it along with simple code examples, he finally did ^.^), it will never ever generate an adjacent chunk.
Any mod that can cause adjacent chunks to generate is, in my not-so-humble opinion, broken and it absolutely should be considered a bug.
Any mod that can cause adjacent chunks to generate is, in my not-so-humble opinion, broken and it absolutely should be considered a bug.
This is rarely avoidable. If the thing to be generated is bigger than a chunk, you cannot simply ignore the issue, and as I said above, chunk-based caches are not a feasible solution as they A) need some way to be meaningfully saved and reloaded (as the "rest" of the generated area may not be generated until some much later time), B) almost always grow to have thousands or even millions of entries and C) completely break down if generation changes in some way between chunks.
That is a general fault in the design though, either the 'large' things should be generated only when all the chunks have already been generated (I.E. generate it when the last one was generated instead of generating it on the first or on some 'key'/central chunk), or it should be redesigned so it can be generated piecemeal based on some position-dependent data. If a cache ever even appears in mind then that means the problem is approached in an entirely incorrect manner.
Both of those ideas are only meaningful if A) the structure was always 'destined' for a specific position (otherwise it would not be possible to know when 'all the chunks have been generated' because you would not know what chunks you need) - rather than simply being scattered randomly, like an ore vein - and B) you know generation will succeed in the specified location (or its failure is acceptable).
Not if it was destined for a certain position, but rather if it is a certain shape. Just compare that shape to an is-loaded check list around the given recently loaded point.
Chunk gen cascades like described above are problematic enough that (at least these days, not sure about the 1.7.10 era) Forge has an option to enable logging when chunk gen cascades happen, so they can be caught and fixed. I play with a large amount of mods in 1.12 and there's very few (that I use anyway) that cause chunk gen cascades, so it is most definitely avoidable.
(at least these days, not sure about the 1.7.10 era)
Oh it was in 1.7.10 too, it is easily outright a bug in a given mod if any mod generates a chunk from another chunk generator, always. ^.^;
Forge should have had that option added back then, but then again it should have had a lot of things it didn't have... >.<
Not if it was destined for a certain position, but rather if it is a certain shape. Just compare that shape to an is-loaded check list around the given recently loaded point.
Are you saying to just check the chunks it would spill into and only generate if they have been loaded?
In the vast majority of cases, that would prevent the structure from ever generating, as it either would require most or all of the surrounding chunks be loaded (which is near impossible to happen naturally before it itself is loaded).
Are you saying to just check the chunks it would spill into and only generate if they have been loaded?
Indeed, if it is 'too' large then split up the structure to generate piecemeal.
In the vast majority of cases, that would prevent the structure from ever generating, as it either would require most or all of the surrounding chunks be loaded (which is near impossible to happen naturally before it itself is loaded).
Not loaded, 'generated'. You can either test it by having MC attempt to load from disk if not loaded while telling it not to generate, or just keep a bitset stored away in global NBT somewhere to keep track of it yourself.
The best method is of course to always support chunk-wise generation without requiring surrounding chunks to be loaded, which can be done by either a generation system designed for chunk-by-chunk generation directly, or by holding some state (again a bitset or whatever) stored away somewhere that tells you what still needs to be generated and when a given chunk has a coordinate that matches inside that based around the central generation point of the structure(s) then generate what's needed for in that chunk as well, that'd be a simple hack for an existing broken system, but the best design is still of course to do chunk specific generation only.
I am running Forge 10.13.4.1614 And DragonAPI v19c This happens to me trying to create a new world ( default settings ) minecraft doesn't even crash it just outputs this to my log. https://pastebin.com/paTeTbRK Full Log https://justpaste.it/1i10x
I am running the mods