mirror of
https://codeberg.org/tenplus1/farming.git
synced 2024-12-26 18:50:20 +01:00
Changed deprecated add_node to set_node
This commit is contained in:
parent
a14fc6f3ad
commit
2f5ac4c7ca
@ -22,7 +22,7 @@ function place_cocoa(itemstack, placer, pointed_thing, plantname)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- add the node and remove 1 item from the itemstack
|
-- add the node and remove 1 item from the itemstack
|
||||||
minetest.add_node(pt.above, {name = plantname})
|
minetest.set_node(pt.above, {name = plantname})
|
||||||
if not minetest.setting_getbool("creative_mode") then
|
if not minetest.setting_getbool("creative_mode") then
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
-- check for refill
|
-- check for refill
|
||||||
|
2
init.lua
2
init.lua
@ -458,7 +458,7 @@ function farming.place_seed(itemstack, placer, pointed_thing, plantname)
|
|||||||
|
|
||||||
-- if not protected then add node and remove 1 item from the itemstack
|
-- if not protected then add node and remove 1 item from the itemstack
|
||||||
if not minetest.is_protected(pt.above, placer:get_player_name()) then
|
if not minetest.is_protected(pt.above, placer:get_player_name()) then
|
||||||
minetest.add_node(pt.above, {name = plantname, param2 = 1})
|
minetest.set_node(pt.above, {name = plantname, param2 = 1})
|
||||||
if not minetest.setting_getbool("creative_mode") then
|
if not minetest.setting_getbool("creative_mode") then
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
-- check for refill
|
-- check for refill
|
||||||
|
Loading…
Reference in New Issue
Block a user