locate_blocks: Locate the coordinates of blocks in a chunk

View source: R/blocks.R

locate_blocksR Documentation

Locate the coordinates of blocks in a chunk

Description

Locate the coordinates of blocks in a chunk

Usage

locate_blocks(blocks, pattern, negate = FALSE)

Arguments

blocks

A character array containing block data.

pattern

The pattern to look for. Passed to stringr::str_detect.

negate

If TRUE, return non-matching elements.

Examples

dbpath <- rbedrock_example_world("example1.mcworld")
db <- bedrockdb(dbpath)
blocks <- get_chunk_blocks_value(db, x=37, z=10, dimension=0)
locate_blocks(blocks, "ore")
close(db)


rbedrock documentation built on Oct. 7, 2023, 1:07 a.m.