mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix inventory.set
This commit is contained in:
parent
180dd5051b
commit
c394df4e07
1 changed files with 1 additions and 0 deletions
|
|
@ -73,6 +73,7 @@ static int l_set(lua::State* L, ItemStack& item) {
|
|||
if (!data.isObject() && data != nullptr) {
|
||||
throw std::runtime_error("invalid data argument type (table expected)");
|
||||
}
|
||||
validate_itemid(itemid);
|
||||
item.set(ItemStack(itemid, count, std::move(data)));
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue