From ecdbbda344acbf5065abfd71638031f5ef71ec0b Mon Sep 17 00:00:00 2001 From: Jordan Snelling Date: Sat, 12 Sep 2015 22:19:18 +0100 Subject: [PATCH] Make buckets control scheme consistent. This commit, fixes this strange feature of the empty bucket: the right mouse button (or a configured key), is used for filling and emptying the bucket, instead of left click to fill, right click to empty, which is harder to use than before this commit. This allows mod makers to create nodes or entities that require on_punch while holding a bucket to interact with them, regardless of whether the bucket is full or not, because of this interaction, an empty bucket would be unable to be filled by a cow, or unable to fill a machine with a liquid due to the differences of on_use and on_place. on_use() blocks on_punch() from activating, and on_place() blocks on_rightclick() from activating. --- mods/bucket/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/bucket/init.lua b/mods/bucket/init.lua index 89730de..8ba3f0e 100644 --- a/mods/bucket/init.lua +++ b/mods/bucket/init.lua @@ -110,7 +110,7 @@ minetest.register_craftitem("bucket:bucket_empty", { inventory_image = "bucket.png", stack_max = 99, liquids_pointable = true, - on_use = function(itemstack, user, pointed_thing) + on_place = function(itemstack, user, pointed_thing) -- Must be pointing to node if pointed_thing.type ~= "node" then return