getBlock: Determine block type and style at some position

Description Usage Arguments Value Examples

View source: R/getBlock.R

Description

Determine the type of the block at position x (north / south), y (height), z (east / west). By default, the block's style is also given, although the style can be excluded from the output using the include_style parameter.

Usage

1
getBlock(x, y, z, include_style = TRUE)

Arguments

x

A numeric string with north/south position

y

A numeric string with height

z

A numeric string with east/west position

include_style

A logical value of whether the block's style should also be included in the output (defaults to TRUE).

Value

A numeric vector of length one or two with the type ID and style, if include_style is TRUE, of the block at position (x, y, z). You can use find_item to find the name of the block type based on this returned ID.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
mc_connect()
h <- getHeight(0,0)
b_type <- getBlock(0,h,0)
b_type

find_item(id = b_type[1])
find_item(id = b_type[1], style = b_type[2])

getBlock(0,h,0, include_style = FALSE)

## End(Not run)

ropenscilabs/miner documentation built on March 20, 2018, 8:52 p.m.