find_item: Find item by name or ID/style

Description Usage Arguments Details Value See Also 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.

1
2
3
4
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.

See Also

find_entity(), mc_items x

Examples

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

kbroman/miner documentation built on Jan. 26, 2021, 8:14 p.m.