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"},
107 items = {"farming:wheat_seeds"},
113 minetest.register_plant("wheat", {
114 description = "Wheat",
115 drawtype = "plantlike",
120 is_ground_content = false,
121 tiles = {"wheat_stage"}, --automatically adds _X.png
122 paramtype2 = "degrotate",
123 buildable_to = false,
124 groups = {leaves = 1, plant = 1, axe = 1, hand = 0,dig_immediate=1,attached_node=1,crops=1},
125 sounds = main.grassSound(),
126 sunlight_propagates = true,
129 fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -6 / 16, 6 / 16}
137 -- Only drop if using a tool whose name is identical to one
140 items = {"farming:wheat"},
141 -- Whether all items in the dropped item list inherit the
142 -- hardware coloring palette color from the dug node.
143 -- Default is 'false'.
144 --inherit_color = true,
147 -- Only drop if using a tool whose name is identical to one
150 items = {"farming:wheat_seeds"},
151 -- Whether all items in the dropped item list inherit the
152 -- hardware coloring palette color from the dug node.
153 -- Default is 'false'.
154 --inherit_color = true,
163 seed_description = "Wheat Seeds",
164 seed_inventory_image = "wheat_seeds.png",
165 seed_plants = "farming:wheat_1",
168 minetest.register_plant("melon_stem", {
169 description = "Melon Stem",
170 drawtype = "plantlike",
175 sunlight_propagates = true,
176 is_ground_content = false,
177 tiles = {"melon_stage"}, --automatically adds _X.png
178 buildable_to = false,
179 groups = {leaves = 1,plant=1, stem = 1, axe = 1, hand = 0,dig_immediate=1,attached_node=1,crops=1},
180 sounds = main.grassSound(),
183 fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -6 / 16, 6 / 16}
185 grows = "in_place_yields",
186 grown_node="farming:melon",
188 --stem stage complete definition (fully grown and budding)
189 stem_description = "",
190 stem_tiles = {"nothing.png","nothing.png","melon_stage_complete.png^[transformFX","melon_stage_complete.png","nothing.png","nothing.png",},
191 stem_drawtype = "nodebox",
192 stem_walkable = false,
193 stem_sunlight_propagates = true,
194 stem_paramtype = "light",
198 {-0/16, -8/16, -7/16, 0/16, 8/16, 7/16}
201 stem_selection_box = {
203 fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -6 / 16, 6 / 16}
209 items = {"farming:melon_seeds"},
213 items = {"farming:melon_seeds"},
217 stem_groups = {plant=1,dig_immediate=1,attached_node=1,crops=1},
218 stem_sounds = main.woodSound(),
220 --fruit definition (what the stem creates)
221 fruit_name = "melon",
222 fruit_description = "Melon",
223 fruit_tiles = {"melon_top.png","melon_top.png","melon_side.png","melon_side.png","melon_side.png","melon_side.png"},
224 fruit_groups = {pathable = 1,wood=1,flammable=1},
225 fruit_sounds = main.woodSound(),
230 items = {"farming:melon_slice"},
233 items = {"farming:melon_slice"},
236 items = {"farming:melon_slice"},
239 items = {"farming:melon_slice"},
243 items = {"farming:melon_slice"},
247 items = {"farming:melon_seeds"},
255 seed_description = "Melon Seeds",
256 seed_inventory_image = "melon_seeds.png",
257 seed_plants = "farming:melon_stem_1",
260 minetest.register_food("farming:melon_slice",{
261 description = "Melon Slice",
262 texture = "melon_slice.png",
268 minetest.register_plant("pumpkin_stem", {
269 description = "Pumpkin Stem",
270 drawtype = "plantlike",
275 sunlight_propagates = true,
276 is_ground_content = false,
277 tiles = {"melon_stage"}, --automatically adds _X.png
278 buildable_to = false,
279 groups = {leaves = 1,plant=1, stem = 1, axe = 1, hand = 0,dig_immediate=1,attached_node=1,crops=1},
280 sounds = main.grassSound(),
283 fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -6 / 16, 6 / 16}
285 grows = "in_place_yields",
286 grown_node="farming:pumpkin",
289 --stem stage complete definition (fully grown and budding)
290 stem_description = "",
291 stem_tiles = {"nothing.png","nothing.png","melon_stage_complete.png^[transformFX","melon_stage_complete.png","nothing.png","nothing.png",},
292 stem_drawtype = "nodebox",
293 stem_walkable = false,
294 stem_sunlight_propagates = true,
295 stem_paramtype = "light",
299 {-0/16, -8/16, -7/16, 0/16, 8/16, 7/16}
302 stem_selection_box = {
304 fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -6 / 16, 6 / 16}
310 items = {"farming:pumpkin_seeds"},
314 items = {"farming:pumpkin_seeds"},
318 stem_groups = {plant=1,dig_immediate=1,attached_node=1,crops=1},
319 stem_sounds = main.woodSound(),
321 --fruit definition (what the stem creates)
322 fruit_name = "pumpkin",
323 fruit_description = "Pumpkin",
324 fruit_tiles = {"pumpkin_top.png","pumpkin_top.png","pumpkin_side.png","pumpkin_side.png","pumpkin_side.png","pumpkin_side.png"},
325 fruit_groups = {pathable = 1,wood=1,flammable=1},
326 fruit_sounds = main.woodSound(),
329 seed_name = "pumpkin",
330 seed_description = "Pumpkin Seeds",
331 seed_inventory_image = "pumpkin_seeds.png",
332 seed_plants = "farming:pumpkin_stem_1",
335 minetest.register_craft({
337 output = "farming:pumpkin_seeds",
338 recipe = {"farming:pumpkin"},
340 minetest.register_craft({
342 recipe = "farming:pumpkin",
346 minetest.register_craft({
348 output = "farming:pumpkin_pie",
349 recipe = "farming:pumpkin",
354 minetest.register_food("farming:pumpkin_pie",{
355 description = "Pumpkin Pie",
356 texture = "pumpkin_pie.png",
361 minetest.register_decoration({
362 name = "farming:sugarcane",
363 deco_type = "simple",
364 place_on = {"main:dirt","main:grass","main:sand"},
369 spread = {x = 100, y = 100, z = 100},
376 decoration = "farming:sugarcane",
379 spawn_by = "main:water",
384 minetest.register_decoration({
385 name = "farming:cactus",
386 deco_type = "simple",
387 place_on = {"main:sand"},
392 spread = {x = 100, y = 100, z = 100},
399 decoration = "farming:cactus",
405 minetest.register_decoration({
406 deco_type = "simple",
407 place_on = "main:grass",
410 --biomes = {"grassland"},
411 decoration = "farming:grass",