From 92d16710799a6508977f14df1f241a7d84fdf265 Mon Sep 17 00:00:00 2001 From: Nils Dagsson Moskopp Date: Sun, 10 Sep 2023 14:25:30 +0200 Subject: [PATCH] + Fix seed dupe Before this patch, the result of the old on_place function (most likely an itemstack) would not be returned by the new on_place function due to a missing return statement. This meant that with this mod players could plant seeds without the seed item's count in their hand becoming lower. --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index f3422cc..4d29cbf 100644 --- a/init.lua +++ b/init.lua @@ -65,9 +65,9 @@ local get_harvest_and_replant_function = function( above = pointed_thing.under, under = pos_under_crop_node, } - old_on_place(itemstack, placer, pointed_ground) + return old_on_place(itemstack, placer, pointed_ground) else - old_on_place(itemstack, placer, pointed_thing) + return old_on_place(itemstack, placer, pointed_thing) end end end