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 {

	
	public boolean generate(World world, Random random, int x, int y, int z)
	{
		while (world.isAirBlock(x, y, z) && y > 2)
		{
			--y;
		}
		world.setSpawnLocation(x, y, z);
        
        	for (int i = 0; i < 10; i++) {
        		for (int g = 0; g < 10; g++) {
        			for (int a = 0; a <= 10; a++) {

				int blockx = x+i;
				int blocky = y+a;
				int blockz = z+g;

				if (a != 10 && a != 0) {
					if ((i >= 0 && g == 0) || (i >= 0 && g == 10) || (i == 0 && g >= 0) || (i == 10 && g >= 0))
						world.setBlock(blockx, blocky, blockz, Blocks.stonebrick);      
					} else {
						world.setBlock(blockx, blocky, blockz, Blocks.stonebrick);
                			}
				}
			}
		}
        
		return true;
	}
}

@@ -256,17 +256,20 @@
 or %7B%0A%0A%09%0A
-%09
+    
 public b
@@ -333,21 +333,30 @@
  int z)%0A
-%09%7B%0A%09%09
+    %7B%0A        
 while (w
@@ -394,26 +394,53 @@
  2)%0A
-%09%09%7B%0A%09%09%09--y;%0A%09%09%7D%0A%09%09
+        %7B%0A            --y;%0A        %7D%0A        
 worl
@@ -485,17 +485,16 @@
         
-%09
 for (int
@@ -524,18 +524,20 @@
         
-%09%09
+    
 for (int
@@ -567,19 +567,24 @@
         
-%09%09%09
+        
 for (int
@@ -611,35 +611,84 @@
 ) %7B%0A
-%0A%09%09%09%09int blockx = x+i;%0A%09%09%09%09
+                    %0A                %09int blockx = x+i;%0A                    
 int 
@@ -696,20 +696,33 @@
 lock
-y = y+a;%0A%09%09%09
+z = z+g;%0A                
 %09int
@@ -731,21 +731,54 @@
 lock
-z = z+g;%0A%0A%09%09%09
+y = y+a;%0A                    %0A                
 %09if 
@@ -794,22 +794,39 @@
 && a
- 
 !=
- 
 0) %7B%0A
-%09%09%09%09%09
+                        
 if (
@@ -865,25 +865,24 @@
  g == 10) %7C%7C
- 
 (i == 0 && g
@@ -912,21 +912,40 @@
  %3E= 0))%0A
-%09%09%09%09%09
+                        
 %09world.s
@@ -1006,27 +1006,57 @@
    %0A
-%09%09%09%09%09%7D else %7B%0A%09%09%09%09%09
+                    %7D else %7B%0A                    
 %09wor
@@ -1131,26 +1131,58 @@
     
-%09%09%09%7D%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09
+  %7D%0A                %7D%0A              %7D%0A            
 %7D%0A  
@@ -1192,10 +1192,16 @@
    %0A
-%09%09
+        
 retu
@@ -1209,13 +1209,16 @@
 n true;%0A
-%09
+    
 %7D%0A%7D%0A

Update WorldGenStarterStructure.java