mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add block.properties, item.properties (experimental)
This commit is contained in:
parent
b40c8c4b4c
commit
cd630463b3
4 changed files with 31 additions and 0 deletions
|
|
@ -191,6 +191,7 @@ void ContentLoader::loadBlock(
|
|||
Block& def, const std::string& name, const fs::path& file
|
||||
) {
|
||||
auto root = files::read_json(file);
|
||||
def.properties = root;
|
||||
|
||||
if (root.has("parent")) {
|
||||
const auto& parentName = root["parent"].asString();
|
||||
|
|
@ -360,6 +361,7 @@ void ContentLoader::loadItem(
|
|||
ItemDef& def, const std::string& name, const fs::path& file
|
||||
) {
|
||||
auto root = files::read_json(file);
|
||||
def.properties = root;
|
||||
|
||||
if (root.has("parent")) {
|
||||
const auto& parentName = root["parent"].asString();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue