package com.juanwan11_magicnation.structures;

import java.util.Random;

import net.minecraft.init.Blocks;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;

public class WorldGenStarterStructure extends WorldGenerator {

	int j,k;
	int x = 9,y = 9,z = 9;
	
	public boolean generate(World world, Random random, int blockx, int blocky, int blockz) {

		while (world.isAirBlock(blockx, blocky, blockz) && blocky > 2) {
			--blocky;
		}

		world.setSpawnLocation(blockx, blocky, blockz);
		
		for (int i = 0; i < coords.length; i=+3) {
			world.setBlock(blockx + coords[i], blocky + coords[i+1], blockz + coords[i+2], Blocks.stonebrick);
		} */
		
		for(j=0;j<x;j++)
			for(k=0;k<y;k++){
				world.setBlock(j, k, 0, Blocks.stonebrick);
				if(j==1)continue;
				world.setBlock(j, k, z, Blocks.stonebrick);
			}
		

		for(j=1;j<y;j++)
			for(k=0;k<y;k++){
				world.setBlock(0, j, k, Blocks.stonebrick);
				if(j==(y-1))continue;
				world.setBlock(x, j, k, Blocks.stonebrick);
			}
		
		

		for(j=1;j<z-1;j++)
			for(k=1;k<x-1;k++){
				world.setBlock(k, 0, z, Blocks.stonebrick);
				world.setBlock(k, y, z, Blocks.stonebrick);
			}
		
		
		
		
		return true;
	}
}

@@ -258,42 +258,8 @@
  %7B%0A%0A
-%09int j,k;%0A%09int x = 9,y = 9,z = 9;%0A
 %09%0A%09p
@@ -492,162 +492,139 @@
 %09%0A%09%09
-for (int i = 0; i %3C coords.length; i=+3) %7B%0A%09%09%09world.setBlock(blockx + coords%5Bi%5D, blocky + coords%5Bi+1%5D, blockz + coords%5Bi+2%5D, Blocks.stonebrick);%0A%09%09%7D */%0A%09%09
+return true;%0A%09%7D%0A%09%0A%09public void box(World world,int posx, int posy, int posz,int x, int y, int z) %7B%0A%09%09%0A%09%09int j,k;%0A%09%0A%09%09//build walls 
 %0A%09%09f
@@ -683,15 +683,28 @@
 ock(
-j, k, 0
+posx +j,posy +k,posz
 , Bl
@@ -762,22 +762,38 @@
 etBlock(
-j, k, 
+posx +j,posy +k,posz +
 z, Block
@@ -811,19 +811,16 @@
 k);%0A%09%09%09%7D
-%0A%09%09
 %0A%0A%09%09for(
@@ -876,14 +876,27 @@
 ock(
-0, j, 
+posx,posy +j,posz +
 k, B
@@ -963,14 +963,30 @@
 ock(
-x, j, 
+posx +x,posy +j,posy +
 k, B
@@ -1016,12 +1016,8 @@
 %0A%09%09%0A
-%09%09%0A%0A
 %09%09fo
@@ -1079,14 +1079,25 @@
 ock(
-k, 0, 
+posx, posy,posz +
 z, B
@@ -1138,14 +1138,30 @@
 ock(
-k, y, 
+posy +k,posy +y,posy +
 z, B
@@ -1197,27 +1197,16 @@
 %0A%09%09%0A%09%09%0A%09
-%09return true;
+%7D%0A%09
 %0A%09
-%7D
 %0A%7D%0A

Update WorldGenStarterStructure.java