Electroblob's Wizardry

Electroblob's Wizardry

18M Downloads

Worldgen Crash (OOM) with Sky Islands style terrain.

brisingraerowing opened this issue ยท 6 comments

commented

Minecraft version: 1.12.2
Wizardry version: 4.1.2
Environment: Singleplayer

Issue details: Trying to create a world with a Sky Islands mod and EB Wizardry causes a crash when generating wizard towers

Other mods involved: Sky Islands, though both SkyLandsForge and OTG: Skylands have the same crash as well.

Link to crash report (if applicable): Crash Log

I have 10G RAM allocated.

commented

Yeah thanks for that, I've left this issue open and closed #24 because this is more descriptive.

For now, as a workaround if you're generating a sky islands world you can set the tower rarity config option to 0 to disable tower spawning. Obviously that's not ideal because you have to remember to turn it back on before generating other worlds, but for now it will at least avoid the crash.

commented

@Electroblob77 as I pointed out in #24, it's easy to fix by just stopping after too many failed attempts here:

while(flag){
flag = false;
for(BlockPos offset : foundationLayer){
if(!world.isBlockNormalCube(layerCentre.add(offset), false)){
world.setBlockState(layerCentre.add(offset), wallMaterial);
blocksPlaced.add(layerCentre.add(offset));
// Keeps going as long as something was filled in.
flag = true;
}
}
layerCentre = layerCentre.down();
}

fix could look something like this (replacing the while-loop with a for-loop):

int MAX_ATTEMPTS = 20;
for(int attempts = 0; flag && attempts < MAX_ATTEMPTS; attempts++) {
    //code
}
commented

Yes I know, thanks.

commented

Already tried that. It works with a normal world type, even if a skylands mod is installed.

commented

Interesting, thanks for reporting it. The fact that it happens with various different sky islands mods suggests that it's the actual shape of the world that's causing problems. My guess would be that a wizard tower is trying to generate at a x/z coordinate where there are no blocks at any height, and that is causing a loop somewhere. I'll have to have a closer look at the code to confirm this.

I assume this only happens when you actually use the sky islands world type? It would be worth confirming that having the mod installed but using a normal world type does not cause this problem.

commented

#24 is also this same problem, I added some extra info over there before noticing this one