-- omitted is a check for light, we assume seeds can germinate in the dark.
for _, v in pairs(def.fertility) do
if minetest.get_item_group(soil_node.name, v) ~= 0 then
- minetest.swap_node(pos, {name = def.next_plant})
+ local placenode = {name = def.next_plant}
+ if def.place_param2 then
+ placenode.param2 = def.place_param2
+ end
+ minetest.swap_node(pos, placenode)
if minetest.registered_nodes[def.next_plant].next_plant then
tick(pos)
return
end
-- grow
- minetest.swap_node(pos, {name = def.next_plant})
+ local placenode = {name = def.next_plant}
+ if def.place_param2 then
+ placenode.param2 = def.place_param2
+ end
+ minetest.swap_node(pos, placenode)
-- new timer needed?
if minetest.registered_nodes[def.next_plant].next_plant then
groups = g,
paramtype = "light",
paramtype2 = "wallmounted",
+ place_param2 = def.place_param2 or nil, -- this isn't actually used for placement
walkable = false,
sunlight_propagates = true,
selection_box = {
waving = 1,
tiles = {mname .. "_" .. pname .. "_" .. i .. ".png"},
paramtype = "light",
+ paramtype2 = def.paramtype2 or nil,
+ place_param2 = def.place_param2 or nil,
walkable = false,
buildable_to = true,
drop = drop,
-- WHEAT
farming.register_plant("farming:wheat", {
description = "Wheat seed",
+ paramtype2 = "meshoptions",
inventory_image = "farming_wheat_seed.png",
steps = 8,
minlight = 13,
maxlight = default.LIGHT_MAX,
fertility = {"grassland"},
groups = {flammable = 4},
+ place_param2 = 3,
})
minetest.register_craftitem("farming:flour", {
description = "Flour",