CubicChunks

CubicChunks

840k Downloads

Tree generation glitches

BaccarWozat opened this issue ยท 10 comments

commented

Using build 625, Forge 2315 and MalisisCore 5.2.1. Both worlds were seed 1 customcubic with all octaves set to 1 and the lower four factors (depth noise and lower) set to 1024.

This seems to be different for different worlds and mod combinations. On the first world I noticed some spruce trees stopped generating at Y=256, but many which started as low as Y=254 grew above that limit with no problem.
2017-06-20_22 14 03

This was confirmed to also be the case with jungle trees, though as you can see in the background it is not universally prevalent, and about a chunk higher they resumed their appearance.
2017-06-20_22 28 05

Attempts to replicate this by mass growing spruce trees were unfruitful, so it is a generation issue:
2017-06-20_22 29 16

I started a new world, but it was entirely different. Some trees generated leaves but no logs.
2017-06-20_22 46 05

Other trees had their sides missing. This used to mean the chunk did not generate all its blocks correctly and you could bump up against the phantom tree leaves, but here they are completely missing.
2017-06-20_22 46 18

The problem height on this world was 224 instead of 256, and it behaved the same.
2017-06-20_22 49 18

I didn't get a picture in time, but in the first world there were a number of random floating stone blocks like static in one area, but when I approached them they vanished.

commented

After further testing and looking around the world, I've concluded it isn't about specific limits, but just some chunks not generating tree elements. Could probably be anywhere in the world.

commented

Maybe the trees could wait to generate until the rest of the chunks that would contain the tree have loaded.

Where in the code are the trees generated?

commented

I think it's completely random and therefore irreproducible consistently. The other day someone posted a chunk error where the chunk generated air instead of stone and mushrooms/snow spawned on it. But restarting the world gave the full chunk.

commented

It works fine on 2 of my computers. All I can do is speculate about the cause. I can create a modified cubic chunks version with an awfully huge amount of logging, which should help tracking it down.

commented

Except that I can't reproduce the issue. It works fine for me.

Trees are generated here:

int treeCount = random.nextFloat() < dec.extraTreeChance ? dec.treesPerChunk + 1 : dec.treesPerChunk;
for (int i = 0; i < treeCount; ++i) {
int xOffset1 = random.nextInt(Cube.SIZE) + Cube.SIZE / 2;
int zOffset1 = random.nextInt(Cube.SIZE) + Cube.SIZE / 2;
WorldGenAbstractTree treeGen = biome.getBiome().getRandomTreeFeature(random);
treeGen.setDecorationDefaults();
BlockPos top1 = getSurfaceForCube(world, pos, xOffset1, zOffset1, 0, SurfaceType.OPAQUE);
if (top1 != null && treeGen.generate((World) world, random, top1)) {
treeGen.generateSaplings((World) world, random, top1);
}
}
using modified vanilla generators, with these mixins:
https://github.com/OpenCubicChunks/CubicChunks/tree/f2a423a4e79788447eb883ea6522f411d8661ea4/src/main/java/cubicchunks/asm/mixin/fixes/common/worldgen/tree.

Could you record it from the moment you create the world to where you find such treee? Maybe find a seed and settings where it consistently happens?

commented

It happened to me, too.

commented

Apparently it happens to everyone except me.

commented

I was able to reproduce it for a single chunk in vanilla cubic once. It affected the whole vanilla seized chunk and, what i find unexplainable, the opacity index/server height map had values as if the blocks have been generated. I will try to find a screenshot of it. I was unable to reproduce it again.

commented

Ghost-Blocks, Premium Edition

commented

I didn't get this bug for a long time, so it's probably gone. Create new issue if it happens again.