Crates.io | rna |
lib.rs | rna |
version | 0.1.2 |
source | src |
created_at | 2020-02-15 09:41:12.448973 |
updated_at | 2020-02-15 13:18:46.299338 |
description | 'Loot-Table Script' interpreter |
homepage | https://github.com/oOBoomberOo/rna |
repository | https://github.com/oOBoomberOo/rna |
max_upload_size | |
id | 209413 |
size | 74,424 |
RNA is a library for interpreting "Loot Table Script" designed by Minecraft Datapacks community.
let ruby = rna::interpret_file("ruby.ult", "resource").unwrap();
let draconic_ore = rna::interpret_file("draconic_ore.ult", "resource").unwrap();
let merged_loot = rna::merge(&[ruby, draconic_ore], "resource").unwrap();
if rna::is_loot_table_script("path/to/loot_table/file.json.merge") {
// Do something
}
By default, this library will not recognized vanilla loot table. (Totally not because I can't figure out how to do it)
You need to specify the base_path
to tell it where to look for the loot table files.