1
0
Fork 0

fix mcl_buckets extra_check #1320

This commit is contained in:
AFCMS 2021-03-17 16:56:46 +01:00
parent ae18ca7602
commit 5df668f6af
2 changed files with 15 additions and 1 deletions

View File

@ -92,7 +92,7 @@ function mcl_buckets.register_liquid(def)
-- Check if pointing to a buildable node -- Check if pointing to a buildable node
local item = itemstack:get_name() local item = itemstack:get_name()
if extra_check and extra_check(place_pos, user) == false then if def.extra_check and def.extra_check(place_pos, user) == false then
-- Fail placement of liquid -- Fail placement of liquid
elseif minetest.registered_nodes[nn] and minetest.registered_nodes[nn].buildable_to then elseif minetest.registered_nodes[nn] and minetest.registered_nodes[nn].buildable_to then
-- buildable; replace the node -- buildable; replace the node

View File

@ -2,6 +2,20 @@ local S = minetest.get_translator(minetest.get_current_modname())
local mod_mcl_core = minetest.get_modpath("mcl_core") local mod_mcl_core = minetest.get_modpath("mcl_core")
local mod_mclx_core = minetest.get_modpath("mclx_core") local mod_mclx_core = minetest.get_modpath("mclx_core")
local sound_place = function(itemname, pos)
local def = minetest.registered_nodes[itemname]
if def and def.sounds and def.sounds.place then
minetest.sound_play(def.sounds.place, {gain=1.0, pos = pos, pitch = 1 + math.random(-10, 10)*0.005}, true)
end
end
local sound_take = function(itemname, pos)
local def = minetest.registered_nodes[itemname]
if def and def.sounds and def.sounds.dug then
minetest.sound_play(def.sounds.dug, {gain=1.0, pos = pos, pitch = 1 + math.random(-10, 10)*0.005}, true)
end
end
if mod_mcl_core then if mod_mcl_core then
-- Lava bucket -- Lava bucket
mcl_buckets.register_liquid({ mcl_buckets.register_liquid({