mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-26 04:21:07 +01:00
Exact MC behavior
This commit is contained in:
parent
8db28c1337
commit
c40c05f594
1 changed files with 10 additions and 6 deletions
|
@ -294,17 +294,21 @@ controls.register_on_press(function(player, key)
|
|||
|
||||
local wielded_item = player:get_wielded_item()
|
||||
local itemname = wielded_item:get_name()
|
||||
local pointed_thing = mcl_util.get_pointed_thing(player)
|
||||
local def = mcl_buckets.buckets[itemname]
|
||||
|
||||
if itemname == "mcl_buckets:bucket_empty" then
|
||||
local pointed_thing = mcl_util.get_pointed_thing(player, true)
|
||||
|
||||
if not pointed_thing then
|
||||
return
|
||||
end
|
||||
|
||||
local def = mcl_buckets.buckets[itemname]
|
||||
|
||||
if itemname == "mcl_buckets:bucket_empty" then
|
||||
wielded_item = on_place_bucket_empty(wielded_item, player, pointed_thing)
|
||||
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)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue