Learn R Programming

miner (version 0.2.2)

find_item: Find item by name or ID/style

Description

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

Usage

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)

Value

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

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.

See Also

find_entity(), mc_items x

Examples

Run this code
# NOT RUN {
find_item(name = "Oak")
find_item(id = 5)
find_item(id = 5, style = 5)

# }

Run the code above in your browser using DataLab