# mceditlib.blocktypes package — mceditlib 0.1 documentation

### Navigation

- index
- modules |
- next |
- previous |
- mceditlib 0.1 documentation »
- mceditlib package »

# mceditlib.blocktypes package

## Module contents

Block definitions for all known level formats Reader for block definitions stored in .yaml files (based on Minecraft X-Ray)

class `mceditlib.blocktypes.``BlockType`

  Bases: `mceditlib.blocktypes._BlockType`

  Value object representing an (id, data, blocktypeSet) tuple. Accessing its attributes will return the corresponding elements of its parent material’s json arrays.

`mceditlib.blocktypes.``openResource`(filename)

class `mceditlib.blocktypes.``BlockTypeSet`(defaultName='Unused Block', idMapping=None)

  Bases: `object`

  `defaultColor` = (201, 119, 240, 255)
  `getBlockTypeAttr`(block, attr)

    Called when accessing an attribute of a BlockType. :param block: :type block: :param attr: :type attr: :return: :rtype:

  `get`(key, default=None)
  `blocksMatching`(name)
  `addIDMappingFromFile`(filename)
  `addJsonBlocksFromFile`(filename)
  `addJsonBlocks`(blockJson)
  `addJsonBlock`(blockJson)

    Adds a block to this blockset using the keys and values in `block`.

    Required keys:
      internalName - String used by Minecraft to identify this block

    Returns: |
    Return type: |

class `mceditlib.blocktypes.``PCBlockTypeSet`

  Bases: `mceditlib.blocktypes.BlockTypeSet`

`mceditlib.blocktypes.``convertBlocks`(destTypes, sourceTypes, ID, meta)

### Navigation

- index
- modules |
- next |
- previous |
- mceditlib 0.1 documentation »
- mceditlib package »