Merge pull request #3 from Athemis/master
[MineClone.git] / mods / farming / wheat.lua
blobe01bd696b6ce025871a7301d7320d7c1cce5996b
1 minetest.register_craftitem("farming:wheat_seed", {
2 description = "Wheat Seeds",
3 inventory_image = "farming_wheat_seed.png",
4 on_place = function(itemstack, placer, pointed_thing)
5 return farming:place_seed(itemstack, placer, pointed_thing, "farming:wheat_1")
6 end
7 })
9 minetest.register_node("farming:wheat_1", {
10 paramtype = "light",
11 sunlight_propagates = true,
12 walkable = false,
13 drawtype = "nodebox",
14 paramtype = "light",
15 drop = "farming:wheat_seed",
16 tiles = {"farming_wheat_1.png"},
17 selection_box = {
18 type = "fixed",
19 fixed = {
20 {-0.5, -0.5, -0.5, 0.5, -0.125, 0.5}
23 groups = {snappy=3, flammable=2, not_in_creative_inventory=1,dig_by_water=1},
24 node_box = {
25 type = "fixed",
26 fixed = {
27 {-0.3125, -0.5, -0.5, -0.3125, 0.375, 0.5}, -- NodeBox1
28 {0.3125, -0.5, -0.5, 0.3125, 0.375, 0.5}, -- NodeBox2
29 {-0.5, -0.5, 0.375, 0.5, 0.375, 0.375}, -- NodeBox3
30 {-0.5, -0.5, -0.25, 0.5, 0.375, -0.25}, -- NodeBox4
35 minetest.register_node("farming:wheat_2", {
36 sunlight_propagates = true,
37 paramtype = "light",
38 walkable = false,
39 drawtype = "nodebox",
40 paramtype = "light",
41 drop = "farming:wheat_seed",
42 tiles = {"farming_wheat_2.png"},
43 selection_box = {
44 type = "fixed",
45 fixed = {
46 {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5}
49 groups = {snappy=3, flammable=2, not_in_creative_inventory=1,dig_by_water=1},
50 node_box = {
51 type = "fixed",
52 fixed = {
53 {-0.3125, -0.5, -0.5, -0.3125, 0.375, 0.5}, -- NodeBox1
54 {0.3125, -0.5, -0.5, 0.3125, 0.375, 0.5}, -- NodeBox2
55 {-0.5, -0.5, 0.375, 0.5, 0.375, 0.375}, -- NodeBox3
56 {-0.5, -0.5, -0.25, 0.5, 0.375, -0.25}, -- NodeBox4
61 minetest.register_node("farming:wheat_3", {
62 sunlight_propagates = true,
63 paramtype = "light",
64 walkable = false,
65 drawtype = "nodebox",
66 paramtype = "light",
67 drop = "farming:wheat_seed",
68 tiles = {"farming_wheat_3.png"},
69 selection_box = {
70 type = "fixed",
71 fixed = {
72 {-0.5, -0.5, -0.5, 0.5, 0.25, 0.5}
75 groups = {snappy=3, flammable=2, not_in_creative_inventory=1,dig_by_water=1},
76 node_box = {
77 type = "fixed",
78 fixed = {
79 {-0.3125, -0.5, -0.5, -0.3125, 0.375, 0.5}, -- NodeBox1
80 {0.3125, -0.5, -0.5, 0.3125, 0.375, 0.5}, -- NodeBox2
81 {-0.5, -0.5, 0.375, 0.5, 0.375, 0.375}, -- NodeBox3
82 {-0.5, -0.5, -0.25, 0.5, 0.375, -0.25}, -- NodeBox4
87 minetest.register_node("farming:wheat", {
88 sunlight_propagates = true,
89 paramtype = "light",
90 walkable = false,
91 drawtype = "nodebox",
92 paramtype = "light",
93 tiles = {"farming_wheat.png"},
94 drop = {
95 max_items = 4,
96 items = {
97 { items = {'farming:wheat_seed'} },
98 { items = {'farming:wheat_seed'}, rarity = 2},
99 { items = {'farming:wheat_seed'}, rarity = 5},
100 { items = {'farming:wheat_harvested'} }
103 selection_box = {
104 type = "fixed",
105 fixed = {
106 {-0.5, -0.5, -0.5, 0.5, 0.35, 0.5}
109 groups = {snappy=3, flammable=2, not_in_creative_inventory=1,dig_by_water=1},
110 node_box = {
111 type = "fixed",
112 fixed = {
113 {-0.3125, -0.5, -0.5, -0.3125, 0.375, 0.5}, -- NodeBox1
114 {0.3125, -0.5, -0.5, 0.3125, 0.375, 0.5}, -- NodeBox2
115 {-0.5, -0.5, 0.375, 0.5, 0.375, 0.375}, -- NodeBox3
116 {-0.5, -0.5, -0.25, 0.5, 0.375, -0.25}, -- NodeBox4
121 farming:add_plant("farming:wheat", {"farming:wheat_1", "farming:wheat_2", "farming:wheat_3"}, 50, 20)
123 minetest.register_craftitem("farming:wheat_harvested", {
124 description = "Harvested Wheat",
125 inventory_image = "farming_wheat_harvested.png",
128 minetest.register_craft({
129 output = "farming:bread",
130 recipe = {
131 {'farming:wheat_harvested', 'farming:wheat_harvested', 'farming:wheat_harvested'},
135 minetest.register_craft({
136 output = "farming:cookie",
137 recipe = {
138 {'farming:wheat_harvested', 'dye:brown', 'farming:wheat_harvested'},
142 minetest.register_craftitem("farming:cookie", {
143 description = "Cookie",
144 inventory_image = "farming_cookie.png",
145 groups = {food=2},
146 on_use = minetest.item_eat(2)
150 minetest.register_craftitem("farming:bread", {
151 description = "Bread",
152 inventory_image = "farming_bread.png",
153 groups = {food=2},
154 on_use = minetest.item_eat(5)
157 -- ========= FUEL =========
158 minetest.register_craft({
159 type = "fuel",
160 recipe = "farming:wheat_seed",
161 burntime = 1
164 minetest.register_craft({
165 type = "fuel",
166 recipe = "farming:wheat_harvested",
167 burntime = 2