Entity {rbedrock}R Documentation

Load and store Entity NBT data

Description

Entity data (tag 50) holds a list of NBT values for mobs and other entities in the game. After 1.18.30, entity data was migrated to a new actor digest format and no longer saved with chunk data.

get_entity_data() and get_entity_value() load Entity data from db. get_entity_data() will silently drop and keys not representing Entity data. get_entity_value() supports loading only a single value. get_entity_values() is a synonym for get_entity_data().

put_entity_values(), put_entity_value(), and put_entity_data() store BlockEntity data into db.

Usage

get_entity_data(db, x, z, dimension)

get_entity_values(db, x, z, dimension)

get_entity_value(db, x, z, dimension)

put_entity_values(db, x, z, dimension, values)

put_entity_value(db, x, z, dimension, value)

put_entity_data(db, data)

Arguments

db

A bedrockdb object.

x, z, dimension

Chunk coordinates to extract data from. x can also be a character vector of db keys.

values

A list of nbt objects

value

An nbt object.

data

A named-list specifying key-value pairs.

Value

get_entity_data() returns a named-list of nbt data. get_entity_values() returns a single nbt value.


[Package rbedrock version 0.3.2 Index]