minecraft_worlds: Utilities for working with Minecraft world folders.

minecraft_worldsR Documentation

Utilities for working with Minecraft world folders.

Description

world_dir_path() returns the path to the minecraftWorlds directory. Use options(rbedrock.worlds_dir_path = "custom/path") to customize the path as needed.

list_worlds() returns a data.frame() containing information about Minecraft saved games.

create_world() creates a new Minecraft world.

export_world() exports a world to an archive file.

Usage

worlds_dir_path(force_default = FALSE)

list_worlds(worlds_dir = worlds_dir_path())

create_world(id = NULL, ..., worlds_dir = worlds_dir_path())

export_world(id, file, worlds_dir = worlds_dir_path(), replace = FALSE)

import_world(file, id = NULL, ..., worlds_dir = worlds_dir_path())

get_world_path(id, worlds_dir = worlds_dir_path())

Arguments

force_default

If TRUE, return most likely world path on the system.

worlds_dir

The path of a minecraftWorlds directory.

id

The path to a world folder. If the path is not absolute or does not exist, it is assumed to be the base name of a world folder in worlds_dir. For import_world(), if id is NULL a unique world id will be generated. How it is generated is controlled by the rbedrock.rand_world_id global options. Possible values are "pretty" and "mcpe".

...

Arguments to customize level.dat settings. Supports dynamic dots via rlang::list2().

file

The path to an mcworld file. If exporting, it will be created. If importing, it will be extracted.

replace

If TRUE, overwrite an existing file if necessary.

Examples

## Not run: 

create_world(LevelName = "My World", RandomSeed = 10)

## End(Not run)

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