mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 18:41:09 +01:00
Rightclick takes precedence over water grabbing
This commit is contained in:
parent
a096f2d33d
commit
6db5d97d17
1 changed files with 8 additions and 0 deletions
|
@ -22,6 +22,14 @@ minetest.register_craftitem("mcl_potions:glass_bottle", {
|
|||
if pointed_thing.type == "node" then
|
||||
local node = minetest.get_node(pointed_thing.under)
|
||||
local def = minetest.registered_nodes[node.name]
|
||||
|
||||
-- Call on_rightclick if the pointed node defines it
|
||||
if placer and not placer :get_player_control().sneak then
|
||||
if def and def.on_rightclick then
|
||||
return def.on_rightclick(pointed_thing.under, node, placer, itemstack) or itemstack
|
||||
end
|
||||
end
|
||||
|
||||
-- Try to fill glass bottle with water
|
||||
-- TODO: Also support cauldrons
|
||||
if def.groups and def.groups.water and def.liquidtype == "source" then
|
||||
|
|
Loading…
Reference in a new issue