voxelImprovements #5

Merged
railgun merged 21 commits from voxelImprovements into master 2024-11-07 15:08:54 -05:00
2 changed files with 38 additions and 59 deletions
Showing only changes of commit 22e468a6d0 - Show all commits

View File

@ -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();
}