mirror of
https://github.com/mt-mods/homedecor_modpack.git
synced 2025-07-17 05:10:25 +02:00
Always return the ItemStack for on_rightclick to comply with the API.
This commit is contained in:
@ -112,7 +112,7 @@ for c in ipairs(bookcolors) do
|
||||
drop = "homedecor:book_"..color,
|
||||
walkable = false,
|
||||
on_dig = book_dig,
|
||||
on_rightclick = function(pos, node, clicker)
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local player_name = clicker:get_player_name()
|
||||
local title = meta:get_string("title") or ""
|
||||
@ -136,6 +136,7 @@ for c in ipairs(bookcolors) do
|
||||
end
|
||||
player_current_book[player_name] = pos
|
||||
minetest.show_formspec(player_name, BOOK_FORMNAME, formspec)
|
||||
return itemstack
|
||||
end,
|
||||
on_punch = function(pos, node, puncher, pointed_thing)
|
||||
local fdir = node.param2
|
||||
|
Reference in New Issue
Block a user