mirror of
https://github.com/mt-mods/homedecor_modpack.git
synced 2025-06-28 12:56:01 +02:00
Always return the ItemStack for on_rightclick to comply with the API.
This commit is contained in:
@ -39,9 +39,10 @@ for i in ipairs(lavalamps_list) do
|
||||
},
|
||||
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
on_rightclick = function(pos, node, clicker)
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
node.name = "lavalamp:"..colour.."_off"
|
||||
minetest.set_node(pos, node)
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
@ -64,9 +65,10 @@ for i in ipairs(lavalamps_list) do
|
||||
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, not_in_creative_inventory=1},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
drop = "lavalamp:"..colour,
|
||||
on_rightclick = function(pos, node, clicker)
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
node.name = "lavalamp:"..colour
|
||||
minetest.set_node(pos, node)
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user