int x1=20;
int x2=-10;
int y1=5;
int y2=10;
int z1=-10;
int z2=-10;
for(int x = Math.min(x1,x2) ;x<Math.max(x1,x2)+1 ; ++x){
for(int y = Math.min(y1,y2) ;y<Math.max(y1,y2)+1 ; ++y){
for(int z = Math.min(z1,z2) ;z<Math.max(z1,z2)+1 ; ++z){
world.setBlock(x,y,z, Blocks.grass);
}
}
}