Skip to content

BlockFactory

Brian Rivas edited this page Mar 6, 2017 · 2 revisions

A BlockFactory is an object similar to a brush in a paint program. It's used in structure generation to supply blocks to shapes. All BlockFactory types are defined recursively, in that they may contain one or more BlockFactories.

METABLOCK

MetaBlocks are just block names with metadata. All other BlockFactory objects are some kind of collection of MetaBlocks.

Structure

  • Object
    • "type" : String ("METABLOCK")
    • "data" : Object
      • "name" : String - block name (required)
      • "meta" : int - optional

MetaBlocks also have a shorthand format

  • Object
    • "name" : String - block name (required)
    • "meta" : int - optional

WEIGHTED

Random blocks, with weighted distribution. Higher weight values means more common.

Structure

  • Object
    • "type" : String ("WEIGHTED")
    • "data" : Array
      • Object - BlockFactory
        • "weight" - int (in sub-object)

JUMBLE

Random blocks, with even distribution.

Structure

  • Object
    • "type" : String ("JUMBLE")
    • "data" : Array
      • Object - BlockFactory

STRIPES

Diagonal stripes in a 3D plain.

Structure

  • Object
    • "type" : String ("STRIPES")
    • "data" : Array
      • Object - BlockFactory

LAYERS

Horizontal stripes.

Structure

  • Object
    • "type" : String ("LAYERS")
    • "data" : Array
      • Object - BlockFactory

COLUMNS

Veritcal columns of blocks based on x/z position. Will appear as checkers from the top down.

Structure

  • Object
    • "type" : String ("COLUMNS")
    • "data" : Array
      • Object - BlockFactory
Clone this wiki locally