1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

itemstack

This commit is contained in:
y5nw 2025-02-22 22:46:44 +01:00
parent 2a1a2b1f9d
commit 54b14c6c62
2 changed files with 7 additions and 18 deletions

View file

@ -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