1 minetest.register_plant("cactus", {
2 description = "Cactus",
4 tiles = {"cactus_top.png", "cactus_bottom.png", "cactus_side.png"},
6 groups = {dig_immediate=1,flammable=1,touch_hurt=1},
8 sounds = main.dirtSound(),
12 sunlight_propagates = true,
19 --inventory_image = def.inventory_image,
20 --walkable = def.walkable,
21 --climbable = def.climbable,
22 --paramtype2 = def.paramtype2,
23 --buildable_to = def.buildable_to,
24 --selection_box = def.selection_box,
30 {-7/16, -8/16, -7/16, 7/16, 8/16, 7/16}, -- Main body
31 {-8/16, -8/16, -7/16, 8/16, 8/16, -7/16}, -- Spikes
32 {-8/16, -8/16, 7/16, 8/16, 8/16, 7/16}, -- Spikes
33 {-7/16, -8/16, -8/16, -7/16, 8/16, 8/16}, -- Spikes
34 {7/16, -8/16, 8/16, 7/16, 8/16, -8/16}, -- Spikes
39 minetest.register_plant("sugarcane", {
40 description = "Sugarcane",
42 inventory_image = "sugarcane.png",
44 tiles = {"sugarcane.png"},
46 groups = {dig_immediate=1,flammable=1},
48 sounds = main.grassSound(),
52 sunlight_propagates = true,
54 drawtype = "plantlike",
61 --inventory_image = def.inventory_image,
62 --walkable = def.walkable,
63 --climbable = def.climbable,
64 --paramtype2 = def.paramtype2,
65 --buildable_to = def.buildable_to,
66 --selection_box = def.selection_box,
71 fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, 0.5, 7 / 16}
75 minetest.register_plant("grass", {
76 description = "Tall Grass",
77 drawtype = "plantlike",
79 inventory_image = "tallgrass.png",
83 is_ground_content = false,
84 tiles = {"tallgrass.png"},
85 paramtype2 = "degrotate",
87 sunlight_propagates = true,
88 groups = {dig_immediate=1,attached_node=1,flammable=1},
89 sounds = main.grassSound(),
92 fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 4 / 16, 4 / 16}
99 items = {"farming:melon_seeds"},
103 -- items = {"farming:pumpkin_seeds"},
109 minetest.register_plant("wheat", {
110 description = "Wheat",
111 drawtype = "plantlike",
116 is_ground_content = false,
117 tiles = {"wheat_stage"}, --automatically adds _X.png
118 paramtype2 = "degrotate",
119 buildable_to = false,
121 groups = {leaves = 1, plant = 1, axe = 1, hand = 0,dig_immediate=1,attached_node=1,crops=1},
122 sounds = main.grassSound(),
123 sunlight_propagates = true,
126 fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -6 / 16, 6 / 16}
135 -- Only drop if using a tool whose name is identical to one
138 items = {"farming:wheat"},
139 -- Whether all items in the dropped item list inherit the
140 -- hardware coloring palette color from the dug node.
141 -- Default is 'false'.
142 --inherit_color = true,
145 -- Only drop if using a tool whose name is identical to one
148 items = {"farming:seeds"},
149 -- Whether all items in the dropped item list inherit the
150 -- hardware coloring palette color from the dug node.
151 -- Default is 'false'.
152 --inherit_color = true,
159 minetest.register_plant("melon_stem", {
160 description = "Melon Stem",
161 drawtype = "plantlike",
166 sunlight_propagates = true,
167 is_ground_content = false,
168 tiles = {"melon_stage"}, --automatically adds _X.png
169 buildable_to = false,
170 groups = {leaves = 1,plant=1, stem = 1, axe = 1, hand = 0,dig_immediate=1,attached_node=1,crops=1},
171 sounds = main.grassSound(),
174 fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -6 / 16, 6 / 16}
176 grows = "in_place_yields",
177 grown_node="farming:melon",
179 --stem stage complete definition (fully grown and budding)
180 stem_description = "",
181 stem_tiles = {"nothing.png","nothing.png","melon_stage_complete.png^[transformFX","melon_stage_complete.png","nothing.png","nothing.png",},
182 stem_drawtype = "nodebox",
183 stem_walkable = false,
184 stem_sunlight_propagates = true,
185 stem_paramtype = "light",
189 {-0/16, -8/16, -7/16, 0/16, 8/16, 7/16}
192 stem_selection_box = {
194 fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -6 / 16, 6 / 16}
200 items = {"farming:melon_seeds"},
204 items = {"farming:melon_seeds"},
208 stem_groups = {plant=1,dig_immediate=1,attached_node=1,crops=1},
209 stem_sounds = main.woodSound(),
211 --fruit definition (what the stem creates)
212 fruit_name = "melon",
213 fruit_description = "Melon",
214 fruit_tiles = {"melon_top.png","melon_top.png","melon_side.png","melon_side.png","melon_side.png","melon_side.png"},
215 fruit_groups = {pathable = 1,wood=1,flammable=1},
216 fruit_sounds = main.woodSound(),
221 items = {"farming:melon_slice"},
224 items = {"farming:melon_slice"},
227 items = {"farming:melon_slice"},
230 items = {"farming:melon_slice"},
234 items = {"farming:melon_slice"},
238 items = {"farming:melon_seeds"},
246 seed_description = "Melon Seeds",
247 seed_inventory_image = "melon_seeds.png",
248 seed_plants = "farming:melon_stem_1",
250 minetest.register_craftitem("farming:melon_slice", {
251 description = "Melon Slice",
252 inventory_image = "melon_slice.png",
253 groups = {satiation=1,hunger=2},
258 minetest.register_plant("pumpkin_stem", {
259 description = "Pumpkin Stem",
260 drawtype = "plantlike",
265 sunlight_propagates = true,
266 is_ground_content = false,
267 tiles = {"melon_stage"}, --automatically adds _X.png
268 buildable_to = false,
269 groups = {leaves = 1,plant=1, stem = 1, axe = 1, hand = 0,dig_immediate=1,attached_node=1,crops=1},
270 sounds = main.grassSound(),
273 fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -6 / 16, 6 / 16}
275 grows = "in_place_yields",
276 grown_node="farming:pumpkin",
279 --stem stage complete definition (fully grown and budding)
280 stem_description = "",
281 stem_tiles = {"nothing.png","nothing.png","melon_stage_complete.png^[transformFX","melon_stage_complete.png","nothing.png","nothing.png",},
282 stem_drawtype = "nodebox",
283 stem_walkable = false,
284 stem_sunlight_propagates = true,
285 stem_paramtype = "light",
289 {-0/16, -8/16, -7/16, 0/16, 8/16, 7/16}
292 stem_selection_box = {
294 fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -6 / 16, 6 / 16}
300 items = {"farming:pumpkin_seeds"},
304 items = {"farming:pumpkin_seeds"},
308 stem_groups = {plant=1,dig_immediate=1,attached_node=1,crops=1},
309 stem_sounds = main.woodSound(),
311 --fruit definition (what the stem creates)
312 fruit_name = "pumpkin",
313 fruit_description = "Pumpkin",
314 fruit_tiles = {"pumpkin_top.png","pumpkin_top.png","pumpkin_side.png","pumpkin_side.png","pumpkin_side.png","pumpkin_side.png"},
315 fruit_groups = {pathable = 1,wood=1,flammable=1},
316 fruit_sounds = main.woodSound(),
319 seed_name = "pumpkin",
320 seed_description = "Pumpkin Seeds",
321 seed_inventory_image = "pumpkin_seeds.png",
322 seed_plants = "farming:pumpkin_stem_1",
325 minetest.register_craft({
327 output = "farming:pumpkin_seeds",
328 recipe = {"farming:pumpkin"},
330 minetest.register_craft({
332 recipe = "farming:pumpkin",
335 minetest.register_craft({
337 output = "farming:pumpkin_pie",
338 recipe = "farming:pumpkin",
341 minetest.register_craftitem("farming:pumpkin_pie", {
342 description = "Pumpkin Pie",
343 inventory_image = "pumpkin_pie.png",
344 groups = {satiation=4,hunger=3},
348 minetest.register_decoration({
349 name = "farming:sugarcane",
350 deco_type = "simple",
351 place_on = {"main:dirt","main:grass","main:sand"},
356 spread = {x = 100, y = 100, z = 100},
363 decoration = "farming:sugarcane",
366 spawn_by = "main:water",
371 minetest.register_decoration({
372 name = "farming:cactus",
373 deco_type = "simple",
374 place_on = {"main:sand"},
379 spread = {x = 100, y = 100, z = 100},
386 decoration = "farming:cactus",
392 minetest.register_decoration({
393 deco_type = "simple",
394 place_on = "main:grass",
397 --biomes = {"grassland"},
398 decoration = "farming:grass",