Keep empty bucket in Creative Mode
parent
77d5286bef
commit
9417067a30
|
@ -168,7 +168,10 @@ minetest.register_craftitem("bucket:bucket_empty", {
|
||||||
if liquiddef ~= nil and liquiddef.itemname ~= nil and (nn == liquiddef.source or
|
if liquiddef ~= nil and liquiddef.itemname ~= nil and (nn == liquiddef.source or
|
||||||
(nn == liquiddef.flowing and minetest.setting_getbool("liquid_finite"))) then
|
(nn == liquiddef.flowing and minetest.setting_getbool("liquid_finite"))) then
|
||||||
|
|
||||||
|
-- Fill bucket, but not in Creative Mode
|
||||||
|
if not minetest.setting_getbool("creative_mode") then
|
||||||
new_bucket = ItemStack({name = liquiddef.itemname, metadata = tostring(node.param2)})
|
new_bucket = ItemStack({name = liquiddef.itemname, metadata = tostring(node.param2)})
|
||||||
|
end
|
||||||
|
|
||||||
minetest.add_node(pointed_thing.under, {name="air"})
|
minetest.add_node(pointed_thing.under, {name="air"})
|
||||||
|
|
||||||
|
@ -179,8 +182,10 @@ minetest.register_craftitem("bucket:bucket_empty", {
|
||||||
elseif nn == "mcl_cauldrons:cauldron_3" then
|
elseif nn == "mcl_cauldrons:cauldron_3" then
|
||||||
-- Take water out of full cauldron
|
-- Take water out of full cauldron
|
||||||
minetest.set_node(pointed_thing.under, {name="mcl_cauldrons:cauldron"})
|
minetest.set_node(pointed_thing.under, {name="mcl_cauldrons:cauldron"})
|
||||||
|
if not minetest.setting_getbool("creative_mode") then
|
||||||
new_bucket = ItemStack("bucket:bucket_water")
|
new_bucket = ItemStack("bucket:bucket_water")
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Add liquid bucket and put it into inventory, if possible.
|
-- Add liquid bucket and put it into inventory, if possible.
|
||||||
-- Drop new bucket otherwise.
|
-- Drop new bucket otherwise.
|
||||||
|
|
Loading…
Reference in New Issue