master #5

Merged
epCode merged 255 commits from VoxeLibre/VoxeLibre:master into master 2021-02-02 23:20:01 +01:00
1 changed files with 15 additions and 5 deletions
Showing only changes of commit b0b23b7532 - Show all commits

View File

@ -25,7 +25,17 @@ local bobber_ENTITY={
objtype="fishing",
}
local fish = function(itemstack, player)
local fish = function(itemstack, player, pointed_thing)
if pointed_thing and pointed_thing.type == "node" then
-- Call on_rightclick if the pointed node defines it
local node = minetest.get_node(pointed_thing.under)
if player and not player:get_player_control().sneak then
if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then
return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, player, itemstack) or itemstack
end
end
end
local pos = player:get_pos()
local objs = minetest.get_objects_inside_radius(pos, 125)