package electrosphere.server.fluid.generation;

import electrosphere.server.fluid.manager.ServerFluidChunk;
import electrosphere.server.fluid.models.FluidModel;
import electrosphere.server.terrain.manager.ServerTerrainChunk;

public class DefaultFluidGenerator implements FluidGenerator {

    @Override
    public ServerFluidChunk generateChunk(int worldX, int worldY, int worldZ) {
        float[][][] weights = new float[ServerTerrainChunk.CHUNK_DIMENSION][ServerTerrainChunk.CHUNK_DIMENSION][ServerTerrainChunk.CHUNK_DIMENSION];
        float[][][] velocityX = new float[ServerTerrainChunk.CHUNK_DIMENSION][ServerTerrainChunk.CHUNK_DIMENSION][ServerTerrainChunk.CHUNK_DIMENSION];
        float[][][] velocityY = new float[ServerTerrainChunk.CHUNK_DIMENSION][ServerTerrainChunk.CHUNK_DIMENSION][ServerTerrainChunk.CHUNK_DIMENSION];
        float[][][] velocityZ = new float[ServerTerrainChunk.CHUNK_DIMENSION][ServerTerrainChunk.CHUNK_DIMENSION][ServerTerrainChunk.CHUNK_DIMENSION];
        ServerFluidChunk chunk = new ServerFluidChunk(worldX, worldY, worldZ, weights, velocityX, velocityY, velocityZ);

        for(int x = 0; x < ServerTerrainChunk.CHUNK_DIMENSION; x++){
            for(int y = 0; y < ServerTerrainChunk.CHUNK_DIMENSION; y++){
                for(int z = 0; z < ServerTerrainChunk.CHUNK_DIMENSION; z++){
                    weights[x][y][z] = 0f;
                }
            }
        }
        return chunk;
    }

    @Override
    public void setModel(FluidModel model) {
        // TODO Auto-generated method stub
        throw new UnsupportedOperationException("Unimplemented method 'setModel'");
    }
    
}
