From 4eda77acd1d37b0b15ebf8439cb0e745acf0f487 Mon Sep 17 00:00:00 2001 From: teknomunk Date: Wed, 21 Aug 2024 22:22:19 -0500 Subject: [PATCH] Prevent bonemealing grass from making flowers and also bonemealing the block above the grass --- mods/ITEMS/mcl_flowers/bonemealing.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_flowers/bonemealing.lua b/mods/ITEMS/mcl_flowers/bonemealing.lua index d64bfe092..44bce6eef 100644 --- a/mods/ITEMS/mcl_flowers/bonemealing.lua +++ b/mods/ITEMS/mcl_flowers/bonemealing.lua @@ -126,10 +126,11 @@ if not olddef then else local oldhandler = olddef._on_bone_meal local newhandler = function(itemstack, placer, pointed_thing) - bonemeal_grass(pointed_thing, placer) + local res = bonemeal_grass(pointed_thing, placer) if oldhandler then - oldhandler(itemstack, placer, pointed_thing) + res = oldhandler(itemstack, placer, pointed_thing) or res end + return res end minetest.override_item(nodename, {_on_bone_meal = newhandler}) end