summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.lua2
-rw-r--r--pumpkin.lua4
2 files changed, 3 insertions, 3 deletions
diff --git a/init.lua b/init.lua
index b235c4b..d13279e 100644
--- a/init.lua
+++ b/init.lua
@@ -481,7 +481,7 @@ function farming.refill_plant(player, plantname, index)
if old_stack:get_name() ~= "" then return end
- for i, stack in ipairs(inv:get_list("main")) do
+ for i, stack in pairs(inv:get_list("main")) do
if stack:get_name() == plantname and i ~= index then
diff --git a/pumpkin.lua b/pumpkin.lua
index 60f0175..708d7ea 100644
--- a/pumpkin.lua
+++ b/pumpkin.lua
@@ -61,7 +61,7 @@ minetest.register_node("farming:jackolantern", {
sounds = default.node_sound_wood_defaults(),
on_punch = function(pos, node, puncher)
node.name = "farming:jackolantern_on"
- minetest.set_node(pos, node)
+ minetest.swap_node(pos, node)
end,
})
@@ -82,7 +82,7 @@ minetest.register_node("farming:jackolantern_on", {
drop = "farming:jackolantern",
on_punch = function(pos, node, puncher)
node.name = "farming:jackolantern"
- minetest.set_node(pos, node)
+ minetest.swap_node(pos, node)
end,
})