Disable treespawning on mapgen
[minetest_hades.git] / mods / farming_plus / potatoes.lua
blob1fcf9e6cf6a9ac113e6ec9bc9dd3762e9cbc460f
1 minetest.register_craftitem("farming_plus:potato_seed", {
2 description = "Potato Seeds",
3 inventory_image = "farming_potato_seed.png",
4 on_place = function(itemstack, placer, pointed_thing)
5 local above = minetest.env:get_node(pointed_thing.above)
6 if above.name == "air" then
7 above.name = "farming_plus:potato_1"
8 minetest.env:set_node(pointed_thing.above, above)
9 itemstack:take_item(1)
10 return itemstack
11 end
12 end
15 minetest.register_node("farming_plus:potato_1", {
16 paramtype = "light",
17 walkable = false,
18 drawtype = "plantlike",
19 drop = "",
20 tiles = {"farming_potato_1.png"},
21 selection_box = {
22 type = "fixed",
23 fixed = {
24 {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
27 groups = {snappy=3, flammable=2, not_in_creative_inventory=1,plant=1},
28 sounds = default.node_sound_leaves_defaults(),
31 minetest.register_node("farming_plus:potato_2", {
32 paramtype = "light",
33 walkable = false,
34 drawtype = "plantlike",
35 drop = "",
36 tiles = {"farming_potato_2.png"},
37 selection_box = {
38 type = "fixed",
39 fixed = {
40 {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
43 groups = {snappy=3, flammable=2, not_in_creative_inventory=1,plant=1},
44 sounds = default.node_sound_leaves_defaults(),
47 minetest.register_node("farming_plus:potato", {
48 paramtype = "light",
49 walkable = false,
50 drawtype = "plantlike",
51 tiles = {"farming_potato_3.png"},
52 drop = {
53 max_items = 6,
54 items = {
55 { items = {'farming_plus:potato_seed'} },
56 { items = {'farming_plus:potato_seed'}, rarity = 4},
57 { items = {'farming_plus:potato_seed'}, rarity = 8},
58 { items = {'farming_plus:potato_item'} },
59 { items = {'farming_plus:potato_item'}, rarity = 2 },
60 { items = {'farming_plus:potato_item'}, rarity = 5 }
63 selection_box = {
64 type = "fixed",
65 fixed = {
66 {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
69 groups = {snappy=3, flammable=2, not_in_creative_inventory=1,plant=1},
70 sounds = default.node_sound_leaves_defaults(),
73 minetest.register_craftitem("farming_plus:potato_item", {
74 description = "Potato (+0)",
75 inventory_image = "farming_potato.png",
78 farming:add_plant("farming_plus:potato", {"farming_plus:potato_1", "farming_plus:potato_2"}, 70, 25)
80 minetest.register_alias("farming_plus:potatoe_item", "farming_plus:potato_item")
81 minetest.register_alias("farming_plus:potatoe_seed", "farming_plus:potato_seed")
82 minetest.register_alias("farming_plus:potatoe", "farming_plus:potato")
83 minetest.register_alias("farming_plus:potatoe_1", "farming_plus:potato_1")
84 minetest.register_alias("farming_plus:potatoe_2", "farming_plus:potato_2")