Learn R Programming

miner (version 0.2.2)

getBlock: Determine block type and style at some position

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

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

Run this code
# 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)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab