Removed old maze generation code.
Removed old maze generation code.

--- a/net/minecraft/mazemod/ItemMazePaper.java
+++ b/net/minecraft/mazemod/ItemMazePaper.java
@@ -50,168 +50,6 @@
 	Maze maze=new Maze(5,5);
 	maze.draw(world,iPosX,iPosY-2,iPosZ);
 
-	//generateMaze(world,iPosX,iPosY-2,iPosZ);
-
 	return itemstack;
     }
-
-    private void generateMaze(World world,int iPosX, int iPosY, int iPosZ)
-    {
-	//System.out.println("Generate maze at "+iPosX+" "+iPosY+" "+iPosZ);
-
-	// Generate a base for the maze
-	for(int  dx=-halfWidth;dx<=halfWidth;dx++)
-	    {
-		for(int dz=-halfWidth;dz<=halfWidth;dz++)
-		    {
-			// Top is dirt
-			world.setBlockWithNotify(iPosX+dx,iPosY,iPosZ+dz,Block.grass.blockID);
-			// Make sure that the maze does not end up floating on air by addting
-			// stones until a stone layer is reached..
-			for(int y=iPosY-1;y>=0;y--)
-			    if(world.getBlockId(iPosX+dx,y,iPosZ+dz)==Block.stone.blockID)
-				break;
-			    else
-				world.setBlock(iPosX+dx,y,iPosZ+dz,Block.stone.blockID);
-			// Everything three block above is leaves
-			world.setBlock(iPosX+dx,iPosY+1,iPosZ+dz,wallBlockID);
-			// The other two will be turned to leaves after maze is generated
-			world.setBlock(iPosX+dx,iPosY+2,iPosZ+dz,0);
-			world.setBlock(iPosX+dx,iPosY+3,iPosZ+dz,0);
-		    }
-	    }
-
-	// Generate the actual maze recursively using depth-first algorithm
-	Stack<iVec3D> stack=new Stack<iVec3D>();
-	iVec3D start=new iVec3D(iPosX,iPosY+1,iPosZ);
-	mazeGen(world,start,stack);
-	
-	// Clear a starting area
-	for(int dx=-3;dx<=3;dx++)
-	    {
-		for(int dz=-3;dz<=3;dz++)
-		    {
-			world.setBlockWithNotify(iPosX+dx,iPosY+1,iPosZ+dz,0);
-			world.setBlockWithNotify(iPosX+dx,iPosY+2,iPosZ+dz,0);
-		    }
-	    }
-
-	// Pick an exit
-	boolean foundExit=false;
-	Random r=new Random();
-	while(!foundExit)
-	    {
-		int exitSide=r.nextInt(4);
-		int exitDist=r.nextInt(halfWidth*2-1)-halfWidth;
-
-		iVec3D needSpaceAt;
-		iVec3D exitPos;
-		switch(exitSide)
-		    {
-		    case 0:
-			exitPos=start.plus(new iVec3D(halfWidth,0,exitDist));
-			needSpaceAt=exitPos.plus(new iVec3D(-1,0,0));
-			break;
-		    case 1:
-			exitPos=start.plus(new iVec3D(-halfWidth,0,exitDist));
-			needSpaceAt=exitPos.plus(new iVec3D(1,0,0));
-			break;
-		    case 2:
-			exitPos=start.plus(new iVec3D(exitDist,0,halfWidth));
-			needSpaceAt=exitPos.plus(new iVec3D(0,0,-1));
-			break;
-		    case 3:
-		    default:
-			exitPos=start.plus(new iVec3D(exitDist,0,-halfWidth));
-			needSpaceAt=exitPos.plus(new iVec3D(0,0,1));
-			break;
-		    }
-		
-		if(world.getBlockId(needSpaceAt.x,needSpaceAt.y,needSpaceAt.z)!=wallBlockID)
-		    {
-			foundExit=true;
-			world.setBlock(exitPos.x,exitPos.y,exitPos.z,0);
-		    }
-	    }
-
-	// Generate the higher walls for the maze
-	for(int  dx=-halfWidth;dx<=halfWidth;dx++)
-	    {
-		for(int dz=-halfWidth;dz<=halfWidth;dz++)
-		    {
-			if(world.getBlockId(iPosX+dx,iPosY+1,iPosZ+dz)==wallBlockID)
-			    {	
-				world.setBlockWithNotify(iPosX+dx,iPosY+2,iPosZ+dz,wallBlockID);
-				world.setBlockWithNotify(iPosX+dx,iPosY+3,iPosZ+dz,wallBlockID);
-				if(wallBlockID==Block.leaves.blockID) // Add wooden base for leaves to prevent decay
-				    world.setBlockWithNotify(iPosX+dx,iPosY,iPosZ+dz,Block.wood.blockID);
-			    }
-		    }
-	    }
-    }
-    
-    private void mazeGen(World world,iVec3D pos,Stack<iVec3D> stack)
-    {
-	stack.push(pos);
-
-	// Create a list of available neighbors
-	if(isUnvisited(world, pos))
-	    {
-		world.setBlock(pos.x,pos.y,pos.z,0);
-
-		List<iVec3D> neighbors=new LinkedList<iVec3D>();
-		neighbors.add(new iVec3D(1,0,0));
-		neighbors.add(new iVec3D(-1,0,0));
-		neighbors.add(new iVec3D(0,0,1));
-		neighbors.add(new iVec3D(0,0,-1));
-		Random r=new Random();
-		while(!neighbors.isEmpty())
-		    {
-			int nextIdx=r.nextInt(neighbors.size());
-			iVec3D nextDir=neighbors.remove(nextIdx);
-			iVec3D nextWall=pos.plus(nextDir);
-			iVec3D nextPos=nextWall.plus(nextDir);
-			if(world.getBlockId(nextPos.x,nextPos.y,nextPos.z)==wallBlockID)
-			    {
-				mazeGen(world,nextPos,stack);
-				world.setBlock(nextWall.x,nextWall.y,nextWall.z,0);
-			    }
-		    }
-	    }
-	
-	stack.pop();
-    }
-
-    private boolean isUnvisited(World world,iVec3D pos)
-    {
-	int problems=0;
-	// Definitely visited if is already set
-	if(world.getBlockId(pos.x,pos.y,pos.z)!=wallBlockID)
-	    problems++;
-
-	// There will always be at most entrance, so one visited neighbor
-	if(world.getBlockId(pos.x+1,pos.y,pos.z)!=wallBlockID)
-	    problems++;
-	if(world.getBlockId(pos.x-1,pos.y,pos.z)!=wallBlockID)
-	    problems++;
-	if(world.getBlockId(pos.x,pos.y,pos.z+1)!=wallBlockID)
-	    problems++;
-	if(world.getBlockId(pos.x,pos.y,pos.z-1)!=wallBlockID)
-	    problems++;
-
-	// Make sure that there is nothing on the diagonals
-	if(world.getBlockId(pos.x+1,pos.y,pos.z+1)!=wallBlockID)
-	    problems++;
-	if(world.getBlockId(pos.x+1,pos.y,pos.z-1)!=wallBlockID)
-	    problems++;
-	if(world.getBlockId(pos.x-1,pos.y,pos.z+1)!=wallBlockID)
-	    problems++;
-	if(world.getBlockId(pos.x-1,pos.y,pos.z-1)!=wallBlockID)
-	    problems++;
-
-	if(problems>0)
-	    return false;
-	else
-	    return true;
-    }
 }