starandserpent / java-TerraServer

Terra - Voxel octree of chunks, made for Rituals of the old
MIT License
17 stars 2 forks source link

All chunks have same voxel materials #36

Closed Pawlost closed 5 years ago

Pawlost commented 5 years ago

When I try to generate chunks which have different voxel material, all chunks have the same material.

public void generate(GenerationTask task, GeneratorControl control, Void nothing) {
        BlockBuffer buf = control.getBuffer();
        for (int i = 0; i < DataConstants.CHUNK_MAX_BLOCKS; i++) {
            if(task.getY() < 0){
                buf.write(dirt);
            }else{
                buf.write(grass);
            }
        }
    }

35

Pawlost commented 5 years ago

I fixed texture loading