Merge pull request 'Added a check for the bone meal's applied position.' (#4201) from CyberMango/MineClone2:dev/mango/add_bone_meal_protection_check into master

Reviewed-on: MineClone2/MineClone2#4201
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
This commit is contained in:
the-real-herowl 2024-04-14 07:07:21 +00:00
commit 69d3fa5f85
1 changed files with 4 additions and 0 deletions

View File

@ -182,6 +182,10 @@ local function apply_bone_meal(pointed_thing, user)
local n = minetest.get_node(pos)
if n.name == "" then return false end
if mcl_util.check_area_protection(pos, pointed_thing.above, user) then
return false
end
for _, func in pairs(mcl_dye.bone_meal_callbacks) do
if func(pointed_thing, user) then
return true