voxelImprovements #5
@ -1,6 +1,5 @@
|
||||
package electrosphere.server.terrain.generation;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@ -72,25 +71,6 @@ public class TestGenerationChunkGenerator implements ChunkGenerator {
|
||||
int[][][] values = new int[ServerTerrainChunk.CHUNK_DIMENSION][ServerTerrainChunk.CHUNK_DIMENSION][ServerTerrainChunk.CHUNK_DIMENSION];
|
||||
|
||||
try {
|
||||
if(worldX == 0 || worldZ == 0){
|
||||
//generate flat ground for the player to spawn on
|
||||
for(int x = 0; x < ServerTerrainChunk.CHUNK_DIMENSION; x++){
|
||||
for(int y = 0; y < ServerTerrainChunk.CHUNK_DIMENSION; y++){
|
||||
Arrays.fill(weights[x][y],-1f);
|
||||
}
|
||||
}
|
||||
if(worldY == 0){
|
||||
for(int x = 0; x < ServerTerrainChunk.CHUNK_DIMENSION; x++){
|
||||
for(int z = 0; z < ServerTerrainChunk.CHUNK_DIMENSION; z++){
|
||||
values[x][0][z] = 1;
|
||||
weights[x][0][z] = 0.1f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
//actual generation algo
|
||||
|
||||
//biome of the current chunk
|
||||
@ -138,7 +118,6 @@ public class TestGenerationChunkGenerator implements ChunkGenerator {
|
||||
}
|
||||
Globals.profiler.endCpuSample();
|
||||
}
|
||||
}
|
||||
} catch(Exception ex){
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user