Disable treespawning on mapgen
[minetest_hades.git] / mods / farming_plus / spice.lua
blobed437ab4ba2c9f454a9e1d5f569d272691931640
1 minetest.register_craftitem("farming_plus:spice_seed", {
2 description = "Spice Seeds",
3 inventory_image = "farming_spice_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:spice_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:spice_1", {
16 paramtype = "light",
17 walkable = false,
18 drawtype = "plantlike",
19 drop = "",
20 tiles = {"farming_spice_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:spice_2", {
32 paramtype = "light",
33 walkable = false,
34 drawtype = "plantlike",
35 drop = "",
36 tiles = {"farming_spice_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:spice", {
48 paramtype = "light",
49 walkable = false,
50 drawtype = "plantlike",
51 tiles = {"farming_spice_3.png"},
52 drop = {
53 max_items = 6,
54 items = {
55 { items = {'farming_plus:spice_seed'} },
56 { items = {'farming_plus:spice_seed'}, rarity = 2},
57 { items = {'farming_plus:spice_seed'}, rarity = 6},
58 { items = {'farming_plus:spice_item'} },
59 { items = {'farming_plus:spice_item'}, rarity = 3 },
60 { items = {'farming_plus:spice_item'}, rarity = 8 }
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:spice_item", {
74 description = "Spice(+0)",
75 inventory_image = "farming_spice.png",
78 farming:add_plant("farming_plus:spice", {"farming_plus:spice_1", "farming_plus:spice_2"}, 50, 20)
80 minetest.register_alias("farming_plus:spice_item", "farming_plus:spice_item")
81 minetest.register_alias("farming_plus:spice_seed", "farming_plus:spice_seed")
82 minetest.register_alias("farming_plus:spice", "farming_plus:spice")
83 minetest.register_alias("farming_plus:spice_1", "farming_plus:spice_1")
84 minetest.register_alias("farming_plus:spice_2", "farming_plus:spice_2")