master #15

Merged
NO11 merged 241 commits from VoxeLibre/VoxeLibre:master into master 2022-03-12 23:42:27 +01:00
1 changed files with 10 additions and 6 deletions
Showing only changes of commit c40c05f594 - Show all commits

View File

@ -294,17 +294,21 @@ controls.register_on_press(function(player, key)
local wielded_item = player:get_wielded_item() local wielded_item = player:get_wielded_item()
local itemname = wielded_item:get_name() local itemname = wielded_item:get_name()
local pointed_thing = mcl_util.get_pointed_thing(player)
if not pointed_thing then
return
end
local def = mcl_buckets.buckets[itemname] local def = mcl_buckets.buckets[itemname]
if itemname == "mcl_buckets:bucket_empty" then if itemname == "mcl_buckets:bucket_empty" then
local pointed_thing = mcl_util.get_pointed_thing(player, true)
if not pointed_thing then
return
end
wielded_item = on_place_bucket_empty(wielded_item, player, pointed_thing) wielded_item = on_place_bucket_empty(wielded_item, player, pointed_thing)
elseif def then elseif def then
local pointed_thing = mcl_util.get_pointed_thing(player, false)
if not pointed_thing then
return
end
wielded_item = on_place_bucket(wielded_item, player, pointed_thing, def) wielded_item = on_place_bucket(wielded_item, player, pointed_thing, def)
end end