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 (y != 10 && y!=0) {
                        if ((i >= 0 && g == 0) || (i >= 0 && g == 9) ||(i == 0 && g >= 0) || (i == 9 && g >= 0))
                        	world.setBlock(blockx, blocky, blockz, Blocks.stonebrick);      
                    } else {
                    	world.setBlock(blockx, blocky, blockz, Blocks.stonebrick);
                  }
                }
              }
            }
        
        return true;
    }
}
@@ -671,33 +671,40 @@
                 
-%09
+        
 int blocky = y+a
@@ -700,15 +700,15 @@
 lock
-y = y+a
+z = z+g
 ;%0A  
@@ -723,39 +723,39 @@
       %09int block
-z = z+g
+y = y+a
 ;%0A              
@@ -1218,8 +1218,9 @@
 %0A    %7D%0A%7D
+%0A

Update WorldGenStarterStructure.java