Added a check for the bone meal's applied position.

protection the position above as well to prevent growing high grass on
areas in which you are not allowed to place blocks. Because, if you cant
place a block there, why should you be able to grow grass/flowers there?
This commit is contained in:
CyberMango 2024-02-29 13:23:48 +02:00
parent 7bfbaac772
commit 4a22287eb6
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) local n = minetest.get_node(pos)
if n.name == "" then return false end 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 for _, func in pairs(mcl_dye.bone_meal_callbacks) do
if func(pointed_thing, user) then if func(pointed_thing, user) then
return true return true