From 4a22287eb67ab9e441bc28fe2a8f048706f170b4 Mon Sep 17 00:00:00 2001 From: CyberMango Date: Thu, 29 Feb 2024 13:23:48 +0200 Subject: [PATCH] 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? --- mods/ITEMS/mcl_dye/init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mods/ITEMS/mcl_dye/init.lua b/mods/ITEMS/mcl_dye/init.lua index abd6ed1d9..c14f7eaeb 100644 --- a/mods/ITEMS/mcl_dye/init.lua +++ b/mods/ITEMS/mcl_dye/init.lua @@ -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