mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
itemstack
This commit is contained in:
parent
2a1a2b1f9d
commit
54b14c6c62
2 changed files with 7 additions and 18 deletions
|
@ -31,3 +31,9 @@ function core.register_async_metatable(...)
|
|||
end
|
||||
|
||||
core.register_portable_metatable("__builtin:vector", vector.metatable)
|
||||
|
||||
if ItemStack then
|
||||
local item = ItemStack()
|
||||
local itemstack_mt = getmetatable(item)
|
||||
core.register_portable_metatable("__itemstack", itemstack_mt, item.to_table, ItemStack)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue