forked from MineClone5/MineClone5
Fishing rod reacts on rightclick
This commit is contained in:
parent
1b3ab4952a
commit
d8fe6a2661
|
@ -1,11 +1,4 @@
|
|||
-- Fishing Rod
|
||||
minetest.register_tool("mcl_fishing:fishing_rod", {
|
||||
description = "Fishing Rod",
|
||||
groups = { tool=1 },
|
||||
inventory_image = "mcl_fishing_fishing_rod.png",
|
||||
stack_max = 1,
|
||||
liquids_pointable = true,
|
||||
on_use = function (itemstack, user, pointed_thing)
|
||||
local go_fishing = function(itemstack, user, pointed_thing)
|
||||
if pointed_thing and pointed_thing.under then
|
||||
local node = minetest.get_node(pointed_thing.under)
|
||||
if string.find(node.name, "mcl_core:water") then
|
||||
|
@ -90,7 +83,16 @@ minetest.register_tool("mcl_fishing:fishing_rod", {
|
|||
end
|
||||
end
|
||||
return nil
|
||||
end,
|
||||
end
|
||||
|
||||
-- Fishing Rod
|
||||
minetest.register_tool("mcl_fishing:fishing_rod", {
|
||||
description = "Fishing Rod",
|
||||
groups = { tool=1 },
|
||||
inventory_image = "mcl_fishing_fishing_rod.png",
|
||||
stack_max = 1,
|
||||
liquids_pointable = true,
|
||||
on_place = go_fishing,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
|
|
Loading…
Reference in New Issue