+ 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.
This commit is contained in:
Nils Dagsson Moskopp 2023-09-10 14:25:30 +02:00
parent 44bef70b9a
commit 92d1671079
Signed by: erlehmann
GPG Key ID: A3BC671C35191080
1 changed files with 2 additions and 2 deletions

View File

@ -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