This is what the run code is
Random rnd = new Random();
int num = rnd.nextInt(4);
if(num ==0){
world.setBlock(x,y+1,z,this,0,3);
}
if(num == 1){
world.setBlock(x, y, z +1, this, 0, 3);
}
if(num ==2){
world.setBlock(x, y, z -1, this, 0, 3);
}
if(num ==3){
world.setBlock(x+1, y, z , this, 0, 3);
}
if(num ==4){
world.setBlock(x-1, y, z , this, 0, 3);
}
//Second block
Random rnd2 = new Random();
int num2 = rnd.nextInt(4);
while (num2==num){
num2 = rnd.nextInt(4);
}
if(num2 ==0){
world.setBlock(x,y+1,z,this,0,3);
}
if(num2 == 1){
world.setBlock(x, y, z +1, this, 0, 3);
}
if(num2 ==2){
world.setBlock(x, y, z -1, this, 0, 3);
}
if(num2 ==3){
world.setBlock(x+1, y, z , this, 0, 3);
}
if(num2 ==4){
world.setBlock(x-1, y, z , this, 0, 3);
}