find_item: Find item by name or ID/style

Description Usage Arguments Details Value Examples

View source: R/find_item.R

Description

Find a Minecraft item by name or ID. If querying an item by ID, the search can also specify item style.

Usage

1
find_item(name = NULL, id = NULL, style = 0)

Arguments

name

Character string with the name of a Minecraft item (specify either name or id, not both)

id

A numeric or character string with the ID of a Minecraft item (specify either name or id, not both)

style

A numeric or character string with the style of a Minecraft item (use this argument only if querying by id is provided)

Details

If name is provided, we first look to see whether there is an exact match to the 'name' column in mc_items. If there is, we return that row. If not, we use grep with ignore.case=TRUE and return matching rows.

If instead id is provided, we return the row with that id. The default is to return the row with that ID and style==0, or whatever style was provided. If style is NULL, we return all rows with that ID.

Value

Data frame with a row or set of rows from mc_items that match the queried name, ID, and / or style.

Examples

1
2
3
find_item(name = "Oak")
find_item(id = 5)
find_item(id = 5, style = 5)

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