From 7ed8b8172a71754994404f965a4d7e4167352bc4 Mon Sep 17 00:00:00 2001 From: tacigar Date: Tue, 3 Jan 2017 23:48:54 +0900 Subject: [PATCH] Use farming.place_seed api for v0.4.15 --- maidroid_core/cores/farming.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/maidroid_core/cores/farming.lua b/maidroid_core/cores/farming.lua index 2a5e3b7..88a7107 100644 --- a/maidroid_core/cores/farming.lua +++ b/maidroid_core/cores/farming.lua @@ -241,7 +241,14 @@ plant = function(self, dtime) if is_plantable_place(self.destination) then local stack = self:get_wield_item_stack() local itemname = stack:get_name() - minetest.add_node(self.destination, {name = itemname, param2 = 1}) + + local pointed_thing = { + type = "node", + under = vector.add(self.destination, {x = 0, y = -1, z = 0}), + above = self.destination, + } + farming.place_seed(stack, minetest.get_player_by_name(self.owner_name), pointed_thing, stack:get_name()) + stack:take_item(1) self:set_wield_item_stack(stack) end