forked from Mineclonia/Mineclonia
Fishing rod reacts on rightclick
This commit is contained in:
parent
1b3ab4952a
commit
d8fe6a2661
|
@ -1,11 +1,4 @@
|
||||||
-- Fishing Rod
|
local go_fishing = function(itemstack, user, pointed_thing)
|
||||||
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)
|
|
||||||
if pointed_thing and pointed_thing.under then
|
if pointed_thing and pointed_thing.under then
|
||||||
local node = minetest.get_node(pointed_thing.under)
|
local node = minetest.get_node(pointed_thing.under)
|
||||||
if string.find(node.name, "mcl_core:water") then
|
if string.find(node.name, "mcl_core:water") then
|
||||||
|
@ -90,7 +83,16 @@ minetest.register_tool("mcl_fishing:fishing_rod", {
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return nil
|
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({
|
minetest.register_craft({
|
||||||
|
|
Loading…
Reference in New Issue