mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-24 20:03:45 +01:00
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:
parent
7bfbaac772
commit
4a22287eb6
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user