1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2025-07-14 20:00:17 +02:00

Always return the ItemStack for on_rightclick to comply with the API.

This commit is contained in:
Tim
2016-07-31 01:17:23 +02:00
parent b33428b907
commit 337dc05e70
19 changed files with 78 additions and 40 deletions

View File

@ -179,8 +179,9 @@ homedecor.register("fishtank", {
collision_box = ft_cbox,
groups = {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)
minetest.set_node(pos, {name = "homedecor:fishtank_lighted", param2 = node.param2})
return itemstack
end
})
@ -201,8 +202,9 @@ homedecor.register("fishtank_lighted", {
collision_box = ft_cbox,
groups = {cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1},
sounds = default.node_sound_glass_defaults(),
on_rightclick = function(pos, node, clicker)
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
minetest.set_node(pos, {name = "homedecor:fishtank", param2 = node.param2})
return itemstack
end,
drop = "homedecor:fishtank",
})