Only change the blocks that are needed: space for the maze and any air
Only change the blocks that are needed: space for the maze and any air
below.

--- a/net/minecraft/mazemod/ItemMazePaper.java
+++ b/net/minecraft/mazemod/ItemMazePaper.java
@@ -62,16 +62,18 @@
 		    {
 			// Top is dirt
 			world.setBlockWithNotify(iPosX+dx,iPosY,iPosZ+dz,Block.grass.blockID);
-			// Everything below is stone
-			for(int y=0;y<iPosY;y++)
-			    world.setBlock(iPosX+dx,y,iPosZ+dz,Block.stone.blockID);
-			// Everything two stacks above is leaves
+			// 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);
-
-			// Everything above is air
-			for(int y=iPosY+2;y<254;y++)
-			    world.setBlock(iPosX+dx,y,iPosZ+dz,0);
-
+			// 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);
 		    }
 	    }