BlockStorage.opBinaryRight

Gets a block using its sel-id. This method only takes an argument as SEL blocks are identified by a single number instead of an id and optional metadata as in Minecraft and Minecraft: Pocket Edition.

  1. Block* opBinaryRight(block_t id)
    class BlockStorage
    @safe
    opBinaryRight
    (
    string op : "in"
    )
  2. Block* opIndex(block_t id)

Examples

auto block = 1 in blocks;
assert(block.name == "stone");
assert(blocks[Blocks.grass].name == "grass");

Meta