The blocks module contains descriptions of blocks.
Bases: object
A model for a block.
There are lots of rule and properties specific to different types of blocks. This class encapsulates those properties in a singleton-style interface, allowing many blocks to be referenced in one location.
The basic idea of this class is to provide some centralized data and information about blocks, in order to abstract away as many special cases as possible. In general, if several blocks all have some special behavior, then it may be worthwhile to store data describing that behavior on this class rather than special-casing it in multiple places.
Parameters: |
|
---|
Whether this block can be oriented.
Orientable blocks are positioned according to the face on which they are built. They may not be buildable on all faces. Blocks are only orientable if their metadata can be used to directly and uniquely determine the face against which they were built.
Ladders are orientable, signposts are not.
Return type: | bool |
---|---|
Returns: | True if this block can be oriented, False if not. |
Retrieve the metadata for a certain orientation, or None if this block cannot be built against the given face.
This method only returns valid data for orientable blocks; check orientable() first.
List of slots of boots.
List of slots of chestplates.
Note that slot 303 (chainmail chestplate) is a chestplate, even though it is not normally obtainable.
List of slots of helmets.
Note that slot 86 (pumpkin) is a helmet.
List of slots of leggings.
A dictionary of Block objects.
This dictionary can be indexed by slot number or block name.
A dictionary of Item objects.
This dictionary can be indexed by slot number or block name.