3 个版本
0.1.2 | 2020 年 2 月 15 日 |
---|---|
0.1.1 | 2020 年 2 月 15 日 |
0.1.0 | 2020 年 2 月 15 日 |
#550 在 游戏
54KB
659 代码行
RNA

RNA 是一个由 Minecraft 数据包社区设计的“Loot Table 脚本”解释器的库。
使用方法
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
}
安装
默认情况下,这个库不会识别原版奖励表。(完全不是因为我不懂怎么做)你需要指定 base_path
来告诉它去哪里查找奖励表文件。
依赖项
~3–12MB
~128K SLoC