mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
feat: support items data in base pack
This commit is contained in:
parent
5384843892
commit
3aa7d6ac28
6 changed files with 21 additions and 8 deletions
|
|
@ -57,6 +57,9 @@ void ItemStack::setField(std::string_view name, dv::value value) {
|
|||
}
|
||||
if (value == nullptr) {
|
||||
fields.erase(std::string(name));
|
||||
if (fields.empty()) {
|
||||
fields = nullptr;
|
||||
}
|
||||
return;
|
||||
}
|
||||
fields[std::string(name)] = std::move(value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue