Technically speaking, Bricklayer’s random brick function and corresponding predefined brick lists are available in all coding levels. However, it is only at level 3 and above where sufficient understanding is developed to be able to use these abstractions effectively.

Random Bricks

Bricklayer provides a function, called generateRandomBrickFn, that can be used to generate bricks randomly selected from a given list of bricks. A detailed discussion of how this is done can be found here.

Predefined Brick Lists

To facilitate the creation of random brick functions, Bricklayer provides the predefined brick lists shown below.

val grayScale       = [ BLACK, TITANIUM, GRAY, LIGHTGRAY, SILVER, 
                        WHITE, WHITEGLOW, STONEGRAY ];
val greenScale      = [ DARKGREEN, GREEN, LIGHTGREEN, ARMYGREEN, 
                        SPRING, BRIGHTGREEN, OLIVE ];
val blueScale       = [ INDIGO, BLUE, LIGHTBLUE, GRAYBLUE, AQUA, 
                        LIGHTROYALBLUE, LIGHTAQUA ];
val purpleScale     = [ VIOLET, LAVENDER, DARKLAVENDER, 
                        REDDISHVIOLET ];
val redScale        = [ DARKRED, RED, PINK, LIGHTPINK ];
val warmScale       = [ ORANGE, YELLOW, COOLYELLOW, NOUGAT, 
                        MEDIUMNOUGAT, LIGHTNOUGAT, WARMGOLD, 
                        BRICKYELLOW ];
val brownScale      = [ DARKBROWN, BROWN, LIGHTBROWN ];
val clearScale      = [ TRANSPARENT, CLEAR, CLEARBLUE, 
                        CLEARLIGHTBLUE, CLEARPINK, CLEARVIOLET, 
                        CLEARGREEN, CLEARYELLOW, CLEARRED, 
                        CLEARORANGE, CLEARBROWN ];

val grayScaleRound  = [ BLACKROUND, GRAYROUND, LIGHTGRAYROUND, 
                        WHITEROUND ];
val greenScaleRound = [ GREENROUND, LIGHTGREENROUND, ARMYGREENROUND ];
val blueScaleRound  = [ INDIGOROUND, BLUEROUND, SKYBLUEROUND, 
                        LIGHTBLUEROUND, GRAYBLUEROUND, AQUAROUND ];
val redScaleRound   = [ DARKREDROUND, REDROUND, PINKROUND ];
val brownScaleRound = [ DARKBROWNROUND, BROWNROUND, LIGHTBROWNROUND ];
val warmScaleRound  = [ ORANGEROUND, YELLOWROUND ];
val clearScaleRound = [ CLEARROUND, CLEARBLUEROUND, CLEARGREENROUND ];

val grayScaleNosecone   = [ BLACKNOSECONE, GRAYNOSECONE, 
                            LIGHTGRAYNOSECONE, WHITENOSECONE ];
val greenScaleNosecone  = [ GREENNOSECONE, LIGHTGREENNOSECONE, 
                            ARMYGREENNOSECONE ];
val blueScaleNosecone   = [ INDIGONOSECONE, BLUENOSECONE, 
                            LIGHTBLUENOSECONE, GRAYBLUENOSECONE ];
val redScaleNosecone    = [ DARKREDNOSECONE, REDNOSECONE, 
                            LIGHTPINKNOSECONE ];
val purpleScaleNosecone = [ VIOLETNOSECONE ];
val brownScaleNosecone  = [ DARKBROWNNOSECONE, LIGHTBROWNNOSECONE ];
val warmScaleNosecone   = [ ORANGENOSECONE, GOLDNOSECONE, 
                            YELLOWNOSECONE ];
val clearScaleNosecone  = [ CLEARNOSECONE, CLEARBLUENOSECONE, 
                            CLEARGREENNOSECONE, CLEARVIOLETNOSECONE ]; 

val allOneBitBricks = grayScale 
                      @
                      greenScale
                      @
                      blueScale
                      @
                      purpleScale
                      @
                      redScale
                      @
                      warmScale
                      @
                      brownScale
                      @
                      clearScale;
                      
val allRounds  = grayScaleRound
                 @
                 greenScaleRound
                 @
                 blueScaleRound
                 @
                 redScaleRound  
                 @
                 brownScaleRound 
                 @
                 warmScaleRound 
                 @
                 clearScaleRound;                     

val allNosecones = grayScaleNosecone
                   @
                   greenScaleNosecone
                   @
                   blueScaleNosecone
                   @
                   redScaleNosecone
                   @
                   purpleScaleNosecone
                   @
                   brownScaleNosecone
                   @
                   warmScaleNosecone
                   @
                   clearScaleNosecone;
                   
val experimentalBricks = [
                            CLEARBLUE_LEFTWEDGE  ,
                            CLEARBLUE_RIGHTWEDGE ,
                            CLEARBLUE_FRONTWEDGE ,
                            CLEARBLUE_BACKWEDGE  ,                          
                            BLACK_LEFTWEDGE      ,
                            BLACK_RIGHTWEDGE     ,
                            BLACK_FRONTWEDGE     ,
                            BLACK_BACKWEDGE
                         ];
                         
val allBricks = allOneBitBricks
                @
                allRounds
                @
                allNosecones
                @
                experimentalBricks;

val allBlocks = a list containing all Minecraft blocks that are 
                supported in Bricklayer (see the Minecraft block 
                list for the entire list of blocks).