1
0
mirror of https://codeberg.org/tenplus1/farming.git synced 2025-06-28 14:26:20 +02:00

check for old wheat/cotton seeds and grow to stage_1 via abm

This commit is contained in:
tenplus1
2023-04-07 14:41:51 +01:00
parent 02cf5688fa
commit b5f71d8025
5 changed files with 58 additions and 39 deletions

View File

@ -8,15 +8,16 @@ minetest.register_node("farming:seed_barley", {
inventory_image = "farming_barley_seed.png",
wield_image = "farming_barley_seed.png",
drawtype = "signlike",
groups = {seed = 1, snappy = 3, attached_node = 1},
groups = {seed = 1, snappy = 3, attached_node = 1, growing = 1},
paramtype = "light",
paramtype2 = "wallmounted",
walkable = false,
sunlight_propagates = true,
next_plant = "farming:barley_1",
selection_box = farming.select,
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:barley_1")
end
-- on_place = function(itemstack, placer, pointed_thing)
-- return farming.place_seed(itemstack, placer, pointed_thing, "farming:barley_1")
-- end
})
-- harvested barley

View File

@ -34,15 +34,16 @@ minetest.register_node("farming:seed_cotton", {
inventory_image = "farming_cotton_seed.png",
wield_image = "farming_cotton_seed.png",
drawtype = "signlike",
groups = {seed = 1, snappy = 3, attached_node = 1, flammable = 4},
groups = {seed = 1, snappy = 3, attached_node = 1, flammable = 4, growing = 1},
paramtype = "light",
paramtype2 = "wallmounted",
walkable = false,
sunlight_propagates = true,
selection_box = farming.select,
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:cotton_1")
end
next_plant = "farming:cotton_1",
-- on_place = function(itemstack, placer, pointed_thing)
-- return farming.place_seed(itemstack, placer, pointed_thing, "farming:cotton_1")
-- end
})
-- cotton

View File

@ -8,15 +8,16 @@ minetest.register_node("farming:seed_hemp", {
inventory_image = "farming_hemp_seed.png",
wield_image = "farming_hemp_seed.png",
drawtype = "signlike",
groups = {seed = 1, snappy = 3, attached_node = 1},
groups = {seed = 1, snappy = 3, attached_node = 1, growing = 1},
paramtype = "light",
paramtype2 = "wallmounted",
walkable = false,
sunlight_propagates = true,
selection_box = farming.select,
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:hemp_1")
end
next_plant = "farming:hemp_1",
-- on_place = function(itemstack, placer, pointed_thing)
-- return farming.place_seed(itemstack, placer, pointed_thing, "farming:hemp_1")
-- end
})
-- harvested hemp

View File

@ -8,15 +8,16 @@ minetest.register_node("farming:seed_wheat", {
inventory_image = "farming_wheat_seed.png",
wield_image = "farming_wheat_seed.png",
drawtype = "signlike",
groups = {seed = 1, snappy = 3, attached_node = 1, flammable = 4},
groups = {seed = 1, snappy = 3, attached_node = 1, flammable = 4, growing = 1},
paramtype = "light",
paramtype2 = "wallmounted",
walkable = false,
sunlight_propagates = true,
selection_box = farming.select,
on_place = function(itemstack, placer, pointed_thing)
return farming.place_seed(itemstack, placer, pointed_thing, "farming:wheat_1")
end
next_plant = "farming:wheat_1",
-- on_place = function(itemstack, placer, pointed_thing)
-- return farming.place_seed(itemstack, placer, pointed_thing, "farming:wheat_1")
-- end
})
-- harvested wheat