summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortenplus1 <kinsellaja@yahoo.com>2014-11-09 19:06:28 +0000
committertenplus1 <kinsellaja@yahoo.com>2014-11-09 19:06:28 +0000
commitd95be676d7efa30fd02ae6b35efb6d84121d9f9a (patch)
tree712b214bb1b1443ce0c2f6bc779466faa46ea608
Signed-off-by: tenplus1
-rw-r--r--README.txt129
-rw-r--r--blueberry.lua93
-rw-r--r--carrot.lua157
-rw-r--r--cocoa.lua157
-rw-r--r--coffee.lua186
-rw-r--r--compatibility.lua97
-rw-r--r--corn.lua175
-rw-r--r--cotton.lua183
-rw-r--r--cucumber.lua74
-rw-r--r--depends.txt2
-rw-r--r--donut.lua45
-rw-r--r--grass.lua28
-rw-r--r--hoes.lua150
-rw-r--r--init.lua195
-rw-r--r--license.txt14
-rw-r--r--mapgen.lua85
-rw-r--r--melon.lua141
-rw-r--r--potato.lua97
-rw-r--r--pumpkin.lua216
-rw-r--r--raspberry.lua95
-rw-r--r--rhubarb.lua79
-rw-r--r--soil.lua58
-rw-r--r--sugar.lua15
-rw-r--r--textures/default_junglegrass.pngbin0 -> 262 bytes
-rw-r--r--textures/farming_baked_potato.pngbin0 -> 321 bytes
-rw-r--r--textures/farming_blueberries.pngbin0 -> 164 bytes
-rw-r--r--textures/farming_blueberry_1.pngbin0 -> 114 bytes
-rw-r--r--textures/farming_blueberry_2.pngbin0 -> 223 bytes
-rw-r--r--textures/farming_blueberry_3.pngbin0 -> 231 bytes
-rw-r--r--textures/farming_blueberry_4.pngbin0 -> 317 bytes
-rw-r--r--textures/farming_blueberry_muffin.pngbin0 -> 236 bytes
-rw-r--r--textures/farming_bottle_ethanol.pngbin0 -> 221 bytes
-rw-r--r--textures/farming_bread.pngbin0 -> 552 bytes
-rw-r--r--textures/farming_carrot.pngbin0 -> 220 bytes
-rw-r--r--textures/farming_carrot_1.pngbin0 -> 108 bytes
-rw-r--r--textures/farming_carrot_2.pngbin0 -> 111 bytes
-rw-r--r--textures/farming_carrot_3.pngbin0 -> 113 bytes
-rw-r--r--textures/farming_carrot_4.pngbin0 -> 119 bytes
-rw-r--r--textures/farming_carrot_5.pngbin0 -> 123 bytes
-rw-r--r--textures/farming_carrot_6.pngbin0 -> 129 bytes
-rw-r--r--textures/farming_carrot_7.pngbin0 -> 144 bytes
-rw-r--r--textures/farming_carrot_8.pngbin0 -> 160 bytes
-rw-r--r--textures/farming_carrot_gold.pngbin0 -> 207 bytes
-rw-r--r--textures/farming_chocolate_dark.pngbin0 -> 194 bytes
-rw-r--r--textures/farming_cocoa_1.pngbin0 -> 230 bytes
-rw-r--r--textures/farming_cocoa_2.pngbin0 -> 244 bytes
-rw-r--r--textures/farming_cocoa_3.pngbin0 -> 253 bytes
-rw-r--r--textures/farming_cocoa_beans.pngbin0 -> 187 bytes
-rw-r--r--textures/farming_coffee_1.pngbin0 -> 135 bytes
-rw-r--r--textures/farming_coffee_2.pngbin0 -> 145 bytes
-rw-r--r--textures/farming_coffee_3.pngbin0 -> 171 bytes
-rw-r--r--textures/farming_coffee_4.pngbin0 -> 192 bytes
-rw-r--r--textures/farming_coffee_5.pngbin0 -> 192 bytes
-rw-r--r--textures/farming_coffee_beans.pngbin0 -> 204 bytes
-rw-r--r--textures/farming_coffee_cup.pngbin0 -> 164 bytes
-rw-r--r--textures/farming_coffee_cup_hot.pngbin0 -> 183 bytes
-rw-r--r--textures/farming_cookie.pngbin0 -> 566 bytes
-rw-r--r--textures/farming_corn.pngbin0 -> 197 bytes
-rw-r--r--textures/farming_corn_1.pngbin0 -> 107 bytes
-rw-r--r--textures/farming_corn_2.pngbin0 -> 121 bytes
-rw-r--r--textures/farming_corn_3.pngbin0 -> 142 bytes
-rw-r--r--textures/farming_corn_4.pngbin0 -> 154 bytes
-rw-r--r--textures/farming_corn_5.pngbin0 -> 161 bytes
-rw-r--r--textures/farming_corn_6.pngbin0 -> 268 bytes
-rw-r--r--textures/farming_corn_7.pngbin0 -> 275 bytes
-rw-r--r--textures/farming_corn_8.pngbin0 -> 311 bytes
-rw-r--r--textures/farming_corn_cob.pngbin0 -> 182 bytes
-rw-r--r--textures/farming_cotton.pngbin0 -> 341 bytes
-rw-r--r--textures/farming_cotton_1.pngbin0 -> 136 bytes
-rw-r--r--textures/farming_cotton_2.pngbin0 -> 161 bytes
-rw-r--r--textures/farming_cotton_3.pngbin0 -> 189 bytes
-rw-r--r--textures/farming_cotton_4.pngbin0 -> 220 bytes
-rw-r--r--textures/farming_cotton_5.pngbin0 -> 263 bytes
-rw-r--r--textures/farming_cotton_6.pngbin0 -> 342 bytes
-rw-r--r--textures/farming_cotton_7.pngbin0 -> 359 bytes
-rw-r--r--textures/farming_cotton_8.pngbin0 -> 339 bytes
-rw-r--r--textures/farming_cotton_seed.pngbin0 -> 348 bytes
-rw-r--r--textures/farming_cucumber.pngbin0 -> 185 bytes
-rw-r--r--textures/farming_cucumber_1.pngbin0 -> 119 bytes
-rw-r--r--textures/farming_cucumber_2.pngbin0 -> 145 bytes
-rw-r--r--textures/farming_cucumber_3.pngbin0 -> 217 bytes
-rw-r--r--textures/farming_cucumber_4.pngbin0 -> 275 bytes
-rw-r--r--textures/farming_desert_sand_soil.pngbin0 -> 637 bytes
-rw-r--r--textures/farming_desert_sand_soil_wet.pngbin0 -> 590 bytes
-rw-r--r--textures/farming_desert_sand_soil_wet_side.pngbin0 -> 601 bytes
-rw-r--r--textures/farming_donut.pngbin0 -> 258 bytes
-rw-r--r--textures/farming_donut_apple.pngbin0 -> 252 bytes
-rw-r--r--textures/farming_donut_chocolate.pngbin0 -> 256 bytes
-rw-r--r--textures/farming_flour.pngbin0 -> 378 bytes
-rw-r--r--textures/farming_melon_1.pngbin0 -> 138 bytes
-rw-r--r--textures/farming_melon_2.pngbin0 -> 161 bytes
-rw-r--r--textures/farming_melon_3.pngbin0 -> 177 bytes
-rw-r--r--textures/farming_melon_4.pngbin0 -> 181 bytes
-rw-r--r--textures/farming_melon_5.pngbin0 -> 196 bytes
-rw-r--r--textures/farming_melon_6.pngbin0 -> 219 bytes
-rw-r--r--textures/farming_melon_7.pngbin0 -> 247 bytes
-rw-r--r--textures/farming_melon_side.pngbin0 -> 270 bytes
-rw-r--r--textures/farming_melon_slice.pngbin0 -> 227 bytes
-rw-r--r--textures/farming_melon_top.pngbin0 -> 272 bytes
-rw-r--r--textures/farming_potato.pngbin0 -> 252 bytes
-rw-r--r--textures/farming_potato_1.pngbin0 -> 132 bytes
-rw-r--r--textures/farming_potato_2.pngbin0 -> 187 bytes
-rw-r--r--textures/farming_potato_3.pngbin0 -> 237 bytes
-rw-r--r--textures/farming_potato_4.pngbin0 -> 283 bytes
-rw-r--r--textures/farming_pumpkin_1.pngbin0 -> 159 bytes
-rw-r--r--textures/farming_pumpkin_2.pngbin0 -> 182 bytes
-rw-r--r--textures/farming_pumpkin_3.pngbin0 -> 199 bytes
-rw-r--r--textures/farming_pumpkin_4.pngbin0 -> 230 bytes
-rw-r--r--textures/farming_pumpkin_5.pngbin0 -> 259 bytes
-rw-r--r--textures/farming_pumpkin_6.pngbin0 -> 263 bytes
-rw-r--r--textures/farming_pumpkin_7.pngbin0 -> 271 bytes
-rw-r--r--textures/farming_pumpkin_8.pngbin0 -> 275 bytes
-rw-r--r--textures/farming_pumpkin_bread.pngbin0 -> 200 bytes
-rw-r--r--textures/farming_pumpkin_dough.pngbin0 -> 193 bytes
-rw-r--r--textures/farming_pumpkin_face_off.pngbin0 -> 259 bytes
-rw-r--r--textures/farming_pumpkin_face_on.pngbin0 -> 269 bytes
-rw-r--r--textures/farming_pumpkin_side.pngbin0 -> 231 bytes
-rw-r--r--textures/farming_pumpkin_slice.pngbin0 -> 204 bytes
-rw-r--r--textures/farming_pumpkin_top.pngbin0 -> 272 bytes
-rw-r--r--textures/farming_raspberries.pngbin0 -> 230 bytes
-rw-r--r--textures/farming_raspberry_1.pngbin0 -> 100 bytes
-rw-r--r--textures/farming_raspberry_2.pngbin0 -> 223 bytes
-rw-r--r--textures/farming_raspberry_3.pngbin0 -> 231 bytes
-rw-r--r--textures/farming_raspberry_4.pngbin0 -> 239 bytes
-rw-r--r--textures/farming_raspberry_smoothie.pngbin0 -> 231 bytes
-rw-r--r--textures/farming_rhubarb.pngbin0 -> 165 bytes
-rw-r--r--textures/farming_rhubarb_1.pngbin0 -> 119 bytes
-rw-r--r--textures/farming_rhubarb_2.pngbin0 -> 152 bytes
-rw-r--r--textures/farming_rhubarb_3.pngbin0 -> 167 bytes
-rw-r--r--textures/farming_rhubarb_pie.pngbin0 -> 198 bytes
-rw-r--r--textures/farming_soil.pngbin0 -> 713 bytes
-rw-r--r--textures/farming_soil_wet.pngbin0 -> 659 bytes
-rw-r--r--textures/farming_soil_wet_side.pngbin0 -> 721 bytes
-rw-r--r--textures/farming_sugar.pngbin0 -> 142 bytes
-rw-r--r--textures/farming_tomato.pngbin0 -> 488 bytes
-rw-r--r--textures/farming_tomato_1.pngbin0 -> 207 bytes
-rw-r--r--textures/farming_tomato_2.pngbin0 -> 223 bytes
-rw-r--r--textures/farming_tomato_3.pngbin0 -> 250 bytes
-rw-r--r--textures/farming_tomato_4.pngbin0 -> 269 bytes
-rw-r--r--textures/farming_tomato_5.pngbin0 -> 320 bytes
-rw-r--r--textures/farming_tomato_6.pngbin0 -> 490 bytes
-rw-r--r--textures/farming_tomato_7.pngbin0 -> 570 bytes
-rw-r--r--textures/farming_tomato_8.pngbin0 -> 510 bytes
-rw-r--r--textures/farming_tool_bronzehoe.pngbin0 -> 258 bytes
-rw-r--r--textures/farming_tool_diamondhoe.pngbin0 -> 244 bytes
-rw-r--r--textures/farming_tool_mesehoe.pngbin0 -> 230 bytes
-rw-r--r--textures/farming_tool_steelhoe.pngbin0 -> 230 bytes
-rw-r--r--textures/farming_tool_stonehoe.pngbin0 -> 263 bytes
-rw-r--r--textures/farming_tool_woodhoe.pngbin0 -> 222 bytes
-rw-r--r--textures/farming_wheat.pngbin0 -> 566 bytes
-rw-r--r--textures/farming_wheat_1.pngbin0 -> 146 bytes
-rw-r--r--textures/farming_wheat_2.pngbin0 -> 185 bytes
-rw-r--r--textures/farming_wheat_3.pngbin0 -> 228 bytes
-rw-r--r--textures/farming_wheat_4.pngbin0 -> 270 bytes
-rw-r--r--textures/farming_wheat_5.pngbin0 -> 354 bytes
-rw-r--r--textures/farming_wheat_6.pngbin0 -> 456 bytes
-rw-r--r--textures/farming_wheat_7.pngbin0 -> 523 bytes
-rw-r--r--textures/farming_wheat_8.pngbin0 -> 635 bytes
-rw-r--r--textures/farming_wheat_seed.pngbin0 -> 372 bytes
-rw-r--r--textures/vessels_drinking_cup.pngbin0 -> 200 bytes
-rw-r--r--tomato.lua138
-rw-r--r--wheat.lua203
162 files changed, 2812 insertions, 0 deletions
diff --git a/README.txt b/README.txt
new file mode 100644
index 0000000..bfc001a
--- /dev/null
+++ b/README.txt
@@ -0,0 +1,129 @@
+Minetest Farming Redo Mod
+by TenPlus1
+
+based on
+
+Minetest 0.4 mod: farming
+=========================
+
+License of source code:
+-----------------------
+Copyright (C) 2012-2013 PilzAdam
+
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ Version 2, December 2004
+
+ Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
+
+ Everyone is permitted to copy and distribute verbatim or modified
+ copies of this license document, and changing it is allowed as long
+ as the name is changed.
+
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. You just DO WHAT THE FUCK YOU WANT TO.
+
+License of media (textures):
+----------------------------
+Created by PilzAdam (License: WTFPL):
+ farming_bread.png
+ farming_soil.png
+ farming_soil_wet.png
+ farming_soil_wet_side.png
+ farming_string.png
+
+Created by Calinou (License: CC BY-SA):
+ farming_tool_bronzehoe.png
+ farming_tool_steelhoe.png
+ farming_tool_stonehoe.png
+ farming_tool_woodhoe.png
+ farming_tool_mesehoe.png
+ farming_tool_diamondhoe.png
+
+Created by VanessaE (License: WTFPL):
+ farming_cotton_seed.png
+ farming_wheat_seed.png
+ farming_flour.png
+ farming_wheat.png
+ farming_wheat_1.png
+ farming_wheat_2.png
+ farming_wheat_3.png
+ farming_wheat_4.png
+ farming_wheat_5.png
+ farming_wheat_5.png
+ farming_wheat_7.png
+ farming_wheat_8.png
+ farming_cotton_1.png
+ farming_cotton_2.png
+ farming_cotton_3.png
+ farming_cotton_4.png
+ farming_cotton_5.png
+ farming_cotton_6.png
+ farming_cotton_7.png
+ farming_cotton_8.png
+
+Created by Doc (License: WTFPL):
+ farming_cucumber.png
+ farming_cucumber_1.png
+ farming_cucumber_2.png
+ farming_cucumber_3.png
+ farming_cucumber_4.png
+ farming_potato.png
+ farming_potato_1.png
+ farming_potato_2.png
+ farming_potato_3.png
+ farming_potato_4.png
+ farming_raspberries.png
+ farming_raspberry_1.png
+ farming_raspberry_2.png
+ farming_raspberry_3.png
+ farming_raspberry_4.png
+
+Created by Gambit:
+ default_junglegrass.png
+ farming_carrot.png
+ farming_carrot_1.png
+ farming_carrot_2.png
+ farming_carrot_3.png
+ farming_carrot_4.png
+ farming_carrot_5.png
+ farming_carrot_6.png
+ farming_carrot_7.png
+ farming_carrot_8.png
+
+Created by JoseTheCrafter and edited by TenPlus1:
+ farming_tomato.png
+ farming_tomato_1.png
+ farming_tomato_2.png
+ farming_tomato_3.png
+ farming_tomato_4.png
+ farming_tomato_5.png
+ farming_tomato_6.png
+ farming_tomato_7.png
+ farming_tomato_8.png
+
+Created by GeMinecraft and edited by TenPlus1:
+ farming_corn.png
+ farming_corn_cob.png
+ farming_corn_1.png
+ farming_corn_2.png
+ farming_corn_3.png
+ farming_corn_4.png
+ farming_corn_5.png
+ farming_corn_6.png
+ farming_corn_7.png
+ farming_corn_8.png
+
+Created by TenPlus1
+ farming_cocoa_1.png
+ farming_cocoa_2.png
+ farming_cocoa_3.png
+ farming_cocoa_beans.png
+ farming_cookie.png
+ farming_raspberry_smoothie.png
+ farming_rhubarb_1.png
+ farming_rhubarb_2.png
+ farming_rhubarb_3.png
+ farming_rhubarb.png
+ farming_rhubarb_pie.png \ No newline at end of file
diff --git a/blueberry.lua b/blueberry.lua
new file mode 100644
index 0000000..6b3422d
--- /dev/null
+++ b/blueberry.lua
@@ -0,0 +1,93 @@
+
+--= Blueberries
+
+minetest.register_craftitem("farming:blueberries", {
+ description = "Blueberries",
+ inventory_image = "farming_blueberries.png",
+ on_place = function(itemstack, placer, pointed_thing)
+ return farming.place_seed(itemstack, placer, pointed_thing, "farming:blueberry_1")
+ end,
+ on_use = minetest.item_eat(1),
+})
+
+-- Blueberry Muffin (Thanks to sosogirl123 for muffin image in deviantart.com)
+
+minetest.register_craftitem("farming:muffin_blueberry", {
+ description = "Blueberry Muffin",
+ inventory_image = "farming_blueberry_muffin.png",
+ on_use = minetest.item_eat(2),
+})
+
+minetest.register_craft({
+ output = "farming:muffin_blueberry 2",
+ recipe = {
+ {"farming:blueberries", "farming:bread", "farming:blueberries"},
+ }
+})
+
+-- Define Blueberry growth stages
+
+minetest.register_node("farming:blueberry_1", {
+ drawtype = "plantlike",
+ tiles = {"farming_blueberry_1.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:blueberry_2", {
+ drawtype = "plantlike",
+ tiles = {"farming_blueberry_2.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:blueberry_3", {
+ drawtype = "plantlike",
+ tiles = {"farming_blueberry_3.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+-- Last stage of Blueberry growth does not have growing=1 so abm never has to check these
+
+minetest.register_node("farming:blueberry_4", {
+ drawtype = "plantlike",
+ tiles = {"farming_blueberry_4.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ is_ground_content = true,
+ drop = {
+ items = {
+ {items = {'farming:blueberries 2'},rarity=1},
+ {items = {'farming:blueberries'},rarity=2},
+ {items = {'farming:blueberries'},rarity=3},
+ }
+ },
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
diff --git a/carrot.lua b/carrot.lua
new file mode 100644
index 0000000..43e7a72
--- /dev/null
+++ b/carrot.lua
@@ -0,0 +1,157 @@
+
+--= Carrot (Original textures from PixelBox texture pack)
+-- https://forum.minetest.net/viewtopic.php?id=4990
+
+minetest.register_craftitem("farming:carrot", {
+ description = "Carrot",
+ inventory_image = "farming_carrot.png",
+ on_place = function(itemstack, placer, pointed_thing)
+ return farming.place_seed(itemstack, placer, pointed_thing, "farming:carrot_1")
+ end,
+ on_use = minetest.item_eat(4),
+})
+
+-- Golden Carrot
+
+minetest.register_craftitem("farming:carrot_gold", {
+ description = "Golden Carrot",
+ inventory_image = "farming_carrot_gold.png",
+ on_use = minetest.item_eat(6),
+})
+
+minetest.register_craft({
+ output = "farming:carrot_gold",
+ recipe = {
+ {"", "default:gold_lump", ""},
+ {"default:gold_lump", "farming:carrot", "default:gold_lump"},
+ {"", "default:gold_lump", ""},
+ }
+})
+
+-- Define Carrot growth stages
+
+minetest.register_node("farming:carrot_1", {
+ drawtype = "plantlike",
+ tiles = {"farming_carrot_1.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:carrot_2", {
+ drawtype = "plantlike",
+ tiles = {"farming_carrot_2.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:carrot_3", {
+ drawtype = "plantlike",
+ tiles = {"farming_carrot_3.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:carrot_4", {
+ drawtype = "plantlike",
+ tiles = {"farming_carrot_4.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:carrot_5", {
+ drawtype = "plantlike",
+ tiles = {"farming_carrot_5.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:carrot_6", {
+ drawtype = "plantlike",
+ tiles = {"farming_carrot_6.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:carrot_7", {
+ drawtype = "plantlike",
+ tiles = {"farming_carrot_7.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ is_ground_content = true,
+ drop = {
+ items = {
+ {items = {'farming:carrot'},rarity=1},
+ {items = {'farming:carrot 2'},rarity=3},
+ }
+ },
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+-- Last stage of Carrot growth doesnnot have growing=1 so abm never has to check these
+
+minetest.register_node("farming:carrot_8", {
+ drawtype = "plantlike",
+ tiles = {"farming_carrot_8.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ is_ground_content = true,
+ drop = {
+ items = {
+ {items = {'farming:carrot 2'},rarity=1},
+ {items = {'farming:carrot 3'},rarity=2},
+ }
+ },
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
diff --git a/cocoa.lua b/cocoa.lua
new file mode 100644
index 0000000..7ca61b3
--- /dev/null
+++ b/cocoa.lua
@@ -0,0 +1,157 @@
+
+-- Override default jungletree, add tree=2 for cocoa placement
+
+minetest.override_item("default:jungletree", {groups = {tree=2,choppy=2,oddly_breakable_by_hand=1,flammable=2}})
+
+-- Place Cocoa
+
+function place_cocoa(itemstack, placer, pointed_thing, plantname)
+ local pt = pointed_thing
+
+ -- check if pointing at a node
+ if not pt and pt.type ~= "node" then
+ return
+ end
+
+ local under = minetest.get_node(pt.under)
+
+ -- return if any of the nodes is not registered
+ if not minetest.registered_nodes[under.name] then
+ return
+ end
+
+ -- check if pointing at jungletree
+ if minetest.get_item_group(under.name, "tree") ~= 2 then
+ return
+ end
+
+ -- add the node and remove 1 item from the itemstack
+ minetest.add_node(pt.above, {name=plantname})
+ if not minetest.setting_getbool("creative_mode") then
+ itemstack:take_item()
+ end
+ return itemstack
+end
+
+--= Cocoa
+
+minetest.register_craftitem("farming:cocoa_beans", {
+ description = "Cocoa Beans",
+ inventory_image = "farming_cocoa_beans.png",
+ on_place = function(itemstack, placer, pointed_thing)
+ return place_cocoa(itemstack, placer, pointed_thing, "farming:cocoa_1")
+ end,
+})
+
+minetest.register_craft( {
+ output = "dye:brown 2",
+ recipe = {
+ { "farming:cocoa_beans" },
+ }
+})
+
+-- Cookie
+
+minetest.register_craftitem("farming:cookie", {
+ description = "Cookie",
+ inventory_image = "farming_cookie.png",
+ on_use = minetest.item_eat(2),
+})
+
+minetest.register_craft( {
+ output = "farming:cookie 8",
+ recipe = {
+ { "farming:wheat", "farming:cocoa_beans", "farming:wheat" },
+ }
+})
+
+-- Bar of Dark Chocolate (Thanks to Ice Pandora for her deviantart.com chocolate tutorial)
+
+minetest.register_craftitem("farming:chocolate_dark", {
+ description = "Bar of Dark Chocolate",
+ inventory_image = "farming_chocolate_dark.png",
+ on_use = minetest.item_eat(3),
+})
+
+minetest.register_craft( {
+ output = "farming:chocolate_dark",
+ recipe = {
+ { "farming:cocoa_beans", "farming:cocoa_beans", "farming:cocoa_beans" },
+ }
+})
+
+-- Define Coffee growth stages
+
+minetest.register_node("farming:cocoa_1", {
+ drawtype = "plantlike",
+ tiles = {"farming_cocoa_1.png"},
+ paramtype = "light",
+ walkable = true,
+ drop = {
+ items = {
+ {items = {'farming:cocoa_beans 1'},rarity=2},
+ }
+ },
+ selection_box = {type = "fixed",fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:cocoa_2", {
+ drawtype = "plantlike",
+ tiles = {"farming_cocoa_2.png"},
+ paramtype = "light",
+ walkable = true,
+ drop = {
+ items = {
+ {items = {'farming:cocoa_beans 1'},rarity=1},
+ }
+ },
+ selection_box = {type = "fixed",fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+-- Last stage of Cocoa growth does not have growing=1 so abm never has to check these
+
+minetest.register_node("farming:cocoa_3", {
+ drawtype = "plantlike",
+ tiles = {"farming_cocoa_3.png"},
+ paramtype = "light",
+ walkable = true,
+ drop = {
+ items = {
+ {items = {'farming:cocoa_beans 2'},rarity=1},
+ {items = {'farming:cocoa_beans 1'},rarity=2},
+ }
+ },
+ selection_box = {type = "fixed",fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+-- Abm to add random Cocoa Pod to Jungle Tree trunks
+
+minetest.register_abm({
+ nodenames = {"default:jungletree"},
+ neighbors = {"default:jungleleaves", "moretrees:jungletree_leaves_green"},
+ interval = 80,
+ chance = 20,
+ action = function(pos, node)
+
+ local dir = math.random(1,50)
+
+ if dir == 1 then pos.x = pos.x + 1
+ elseif dir == 2 then pos.x = pos.x - 1
+ elseif dir == 3 then pos.z = pos.z + 1
+ elseif dir == 4 then pos.z = pos.z -1
+ else return
+ end
+
+ if minetest.get_node(pos).name == "air" and minetest.get_node_light(pos) > 11 then
+-- print ("COCOA", pos.x, pos.y, pos.z)
+ minetest.set_node(pos,{name="farming:cocoa_"..tostring(math.random(1,3))})
+ end
+
+ end,
+})
diff --git a/coffee.lua b/coffee.lua
new file mode 100644
index 0000000..a0d15cf
--- /dev/null
+++ b/coffee.lua
@@ -0,0 +1,186 @@
+
+--= Coffee
+
+minetest.register_craftitem("farming:coffee_beans", {
+ description = "Coffee Beans",
+ inventory_image = "farming_coffee_beans.png",
+ on_place = function(itemstack, placer, pointed_thing)
+ return farming.place_seed(itemstack, placer, pointed_thing, "farming:coffee_1")
+ end,
+})
+
+--= Glass Cup
+--minetest.register_craftitem("farming:drinking_cup", {
+-- description = "Drinking Cup",
+-- inventory_image = "vessels_drinking_cup.png",
+--})
+
+minetest.register_node("farming:drinking_cup", {
+ description = "Drinking Cup (empty)",
+ drawtype = "plantlike",
+ tiles = {"vessels_drinking_cup.png"},
+ inventory_image = "vessels_drinking_cup.png",
+ wield_image = "vessels_drinking_cup.png",
+ paramtype = "light",
+ walkable = false,
+ selection_box = {
+ type = "fixed",
+ fixed = {-0.25, -0.5, -0.25, 0.25, 0.25, 0.25}
+ },
+ groups = {vessel=1,dig_immediate=3,attached_node=1},
+ sounds = default.node_sound_glass_defaults(),
+})
+
+minetest.register_craft( {
+ output = "farming:drinking_cup 5",
+ recipe = {
+ { "default:glass", "", "default:glass" },
+ {"", "default:glass",""},
+ }
+})
+
+--= Cold Cup of Coffee
+--minetest.register_craftitem("farming:coffee_cup", {
+-- description = "Cold Cup of Coffee",
+-- inventory_image = "farming_coffee_cup.png",
+-- on_use = minetest.item_eat(2, "farming:drinking_cup"),
+--})
+
+minetest.register_node("farming:coffee_cup", {
+ description = "Cup of Coffee (cold)",
+ drawtype = "plantlike",
+ tiles = {"farming_coffee_cup.png"},
+ inventory_image = "farming_coffee_cup.png",
+ wield_image = "farming_coffee_cup.png",
+ paramtype = "light",
+ walkable = false,
+ selection_box = {
+ type = "fixed",
+ fixed = {-0.25, -0.5, -0.25, 0.25, 0.25, 0.25}
+ },
+ groups = {vessel=1,dig_immediate=3,attached_node=1},
+ on_use = minetest.item_eat(2, "farming:drinking_cup"),
+ sounds = default.node_sound_glass_defaults(),
+})
+
+minetest.register_craft( {
+ output = "farming:coffee_cup",
+ recipe = {
+ {"farming:drinking_cup", "farming:coffee_beans","bucket:bucket_water"},
+ {"","",""},
+ {"","",""}
+ },
+ replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}}
+})
+
+minetest.register_craft({
+ type = "cooking",
+ cooktime = 5,
+ output = "farming:coffee_cup_hot",
+ recipe = "farming:coffee_cup"
+})
+
+--= Hot Cup of Coffee
+--minetest.register_craftitem("farming:coffee_cup_hot", {
+-- description = "Hot Cup of Coffee",
+-- inventory_image = "farming_coffee_cup_hot.png",
+-- on_use = minetest.item_eat(3, "farming:drinking_cup"),
+--})
+
+minetest.register_node("farming:coffee_cup_hot", {
+ description = "Cup of Coffee (hot)",
+ drawtype = "plantlike",
+ tiles = {"farming_coffee_cup_hot.png"},
+ inventory_image = "farming_coffee_cup_hot.png",
+ wield_image = "farming_coffee_cup_hot.png",
+ paramtype = "light",
+ walkable = false,
+ selection_box = {
+ type = "fixed",
+ fixed = {-0.25, -0.5, -0.25, 0.25, 0.25, 0.25}
+ },
+ groups = {vessel=1,dig_immediate=3,attached_node=1},
+ on_use = minetest.item_eat(3, "farming:drinking_cup"),
+ sounds = default.node_sound_glass_defaults(),
+})
+
+-- Define Coffee growth stages
+
+minetest.register_node("farming:coffee_1", {
+ drawtype = "plantlike",
+ tiles = {"farming_coffee_1.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:coffee_2", {
+ drawtype = "plantlike",
+ tiles = {"farming_coffee_2.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:coffee_3", {
+ drawtype = "plantlike",
+ tiles = {"farming_coffee_3.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:coffee_4", {
+ drawtype = "plantlike",
+ tiles = {"farming_coffee_4.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+-- Last stage of Coffee growth doesnnot have growing=1 so abm never has to check these
+
+minetest.register_node("farming:coffee_5", {
+ drawtype = "plantlike",
+ tiles = {"farming_coffee_5.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ is_ground_content = true,
+ drop = {
+ items = {
+ {items = {'farming:coffee_beans 2'},rarity=1},
+ {items = {'farming:coffee_beans 2'},rarity=2},
+ {items = {'farming:coffee_beans 2'},rarity=3},
+ }
+ },
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
diff --git a/compatibility.lua b/compatibility.lua
new file mode 100644
index 0000000..a875d9b
--- /dev/null
+++ b/compatibility.lua
@@ -0,0 +1,97 @@
+-- is Ethereal mod installed?
+local eth = minetest.get_modpath("ethereal") or nil
+
+-- Banana
+if eth then
+ minetest.register_alias("farming_plus:banana_sapling", "ethereal:banana_tree_sapling")
+ minetest.register_alias("farming_plus:banana_leaves", "ethereal:bananaleaves")
+ minetest.register_alias("farming_plus:banana", "ethereal:banana")
+else
+ minetest.register_alias("farming_plus:banana_sapling", "default:sapling")
+ minetest.register_alias("farming_plus:banana_leaves", "default:leaves")
+ minetest.register_alias("farming_plus:banana", "default:apple")
+end
+
+-- Carrot
+minetest.register_alias("farming_plus:carrot_seed", "farming:carrot")
+minetest.register_alias("farming_plus:carrot_1", "farming:carrot_1")
+minetest.register_alias("farming_plus:carrot_2", "farming:carrot_4")
+minetest.register_alias("farming_plus:carrot_3", "farming:carrot_6")
+minetest.register_alias("farming_plus:carrot", "farming:carrot_8")
+
+-- Cocoa
+
+minetest.register_alias("farming_plus:cocoa_sapling", "farming:cocoa_beans")
+minetest.register_alias("farming_plus:cocoa_leaves", "default:leaves")
+minetest.register_alias("farming_plus:cocoa", "default:apple")
+minetest.register_alias("farming_plus:cocoa_bean", "farming:cocoa_beans")
+
+-- Orange
+minetest.register_alias("farming_plus:orange_1", "farming:tomato_1")
+minetest.register_alias("farming_plus:orange_2", "farming:tomato_4")
+minetest.register_alias("farming_plus:orange_3", "farming:tomato_6")
+minetest.register_alias("farming_plus:orange", "farming:tomato_8")
+
+if eth then
+ minetest.register_alias("farming_plus:orange_item", "ethereal:orange")
+ minetest.register_alias("farming_plus:orange_seed", "ethereal:orange_tree_sapling")
+else
+ minetest.register_alias("farming_plus:orange_item", "default:apple")
+ minetest.register_alias("farming_plus:orange_seed", "default:sapling")
+end
+
+-- Potato
+minetest.register_alias("farming_plus:potato_item", "farming:potato")
+minetest.register_alias("farming_plus:potato_1", "farming:potato_1")
+minetest.register_alias("farming_plus:potato_2", "farming:potato_2")
+minetest.register_alias("farming_plus:potato", "farming:potato_3")
+minetest.register_alias("farming_plus:potato_seed", "farming:potato")
+
+-- Pumpkin
+minetest.register_alias("farming:pumpkin_seed", "farming:pumpkin_slice")
+minetest.register_alias("farming:pumpkin_face", "farming:pumpkin")
+minetest.register_alias("farming:pumpkin_face_light", "farming:jackolantern")
+minetest.register_alias("farming:big_pumpkin", "farming:pumpkin")
+minetest.register_alias("farming:big_pumpkin_side", "air")
+minetest.register_alias("farming:big_pumpkin_corner", "air")
+minetest.register_alias("farming:big_pumpkin_top", "air")
+minetest.register_alias("farming:scarecrow", "farming:pumpkin")
+minetest.register_alias("farming:scarecrow_bottom", "default:fence_wood")
+minetest.register_alias("farming:scarecrow_light", "farming:jackolantern")
+minetest.register_alias("farming:pumpkin_flour", "farming:pumpkin_dough")
+
+-- Rhubarb
+minetest.register_alias("farming_plus:rhubarb_seed", "farming:rhubarb")
+minetest.register_alias("farming_plus:rhubarb_1", "farming:rhubarb_1")
+minetest.register_alias("farming_plus:rhubarb_2", "farming:rhubarb_2")
+minetest.register_alias("farming_plus:rhubarb", "farming:rhubarb_3")
+minetest.register_alias("farming_plus:rhubarb_item", "farming:rhubarb")
+
+-- Strawberry
+if eth then
+ minetest.register_alias("farming_plus:strawberry_item", "ethereal:strawberry")
+ minetest.register_alias("farming_plus:strawberry_seed", "ethereal:strawberry")
+ minetest.register_alias("farming_plus:strawberry_1", "ethereal:strawberry_1")
+ minetest.register_alias("farming_plus:strawberry_2", "ethereal:strawberry_3")
+ minetest.register_alias("farming_plus:strawberry_3", "ethereal:strawberry_5")
+ minetest.register_alias("farming_plus:strawberry", "ethereal:strawberry_7")
+else
+ minetest.register_alias("farming_plus:strawberry_item", "farming:raspberries")
+ minetest.register_alias("farming_plus:strawberry_seed", "farming:raspberries")
+ minetest.register_alias("farming_plus:strawberry_1", "farming:raspberry_1")
+ minetest.register_alias("farming_plus:strawberry_2", "farming:raspberry_2")
+ minetest.register_alias("farming_plus:strawberry_3", "farming:raspberry_3")
+ minetest.register_alias("farming_plus:strawberry", "farming:raspberry_4")
+
+end
+
+-- Tomato
+minetest.register_alias("farming_plus:tomato_seed", "farming:tomato")
+minetest.register_alias("farming_plus:tomato_item", "farming:tomato")
+minetest.register_alias("farming_plus:tomato_1", "farming:tomato_2")
+minetest.register_alias("farming_plus:tomato_2", "farming:tomato_4")
+minetest.register_alias("farming_plus:tomato_3", "farming:tomato_6")
+minetest.register_alias("farming_plus:tomato", "farming:tomato_8")
+
+-- Weed
+minetest.register_alias("farming:weed", "default:grass_2")
diff --git a/corn.lua b/corn.lua
new file mode 100644
index 0000000..9232518
--- /dev/null
+++ b/corn.lua
@@ -0,0 +1,175 @@
+
+--= Corn (Original textures from GeMinecraft)
+-- http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/wip-mods/1440575-1-2-5-generation-minecraft-beta-1-2-farming-and
+
+minetest.register_craftitem("farming:corn", {
+ description = "Corn",
+ inventory_image = "farming_corn.png",
+ on_place = function(itemstack, placer, pointed_thing)
+ return farming.place_seed(itemstack, placer, pointed_thing, "farming:corn_1")
+ end,
+ on_use = minetest.item_eat(3),
+})
+
+--= Corn on the Cob (Texture by TenPlus1)
+
+minetest.register_craftitem("farming:corn_cob", {
+ description = "Corn on the Cob",
+ inventory_image = "farming_corn_cob.png",
+ on_use = minetest.item_eat(5),
+})
+
+minetest.register_craft({
+ type = "cooking",
+ cooktime = 10,
+ output = "farming:corn_cob",
+ recipe = "farming:corn"
+})
+
+--= Ethanol (Thanks to JKMurray for this idea)
+
+minetest.register_craftitem("farming:bottle_ethanol", {
+ description = "Bottle of Ethanol",
+ inventory_image = "farming_bottle_ethanol.png",
+})
+
+minetest.register_craft( {
+ output = "farming:bottle_ethanol",
+ recipe = {
+ { "vessels:glass_bottle", "farming:corn", "farming:corn"},
+ { "farming:corn", "farming:corn", "farming:corn"},
+ }
+})
+
+minetest.register_craft({
+ type = "fuel",
+ recipe = "farming:bottle_ethanol",
+ burntime = 60,
+ replacements = {{ "farming:bottle_ethanol", "vessels:glass_bottle"}}
+})
+
+-- Define Corn growth stages
+
+minetest.register_node("farming:corn_1", {
+ drawtype = "plantlike",
+ tiles = {"farming_corn_1.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:corn_2", {
+ drawtype = "plantlike",
+ tiles = {"farming_corn_2.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:corn_3", {
+ drawtype = "plantlike",
+ tiles = {"farming_corn_3.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:corn_4", {
+ drawtype = "plantlike",
+ tiles = {"farming_corn_4.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:corn_5", {
+ drawtype = "plantlike",
+ tiles = {"farming_corn_5.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:corn_6", {
+ drawtype = "plantlike",
+ tiles = {"farming_corn_6.png"},
+ visual_scale = 1.45,
+ paramtype = "light",
+ sunlight_propagates = true,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:corn_7", {
+ drawtype = "plantlike",
+ tiles = {"farming_corn_7.png"},
+ visual_scale = 1.45,
+ paramtype = "light",
+ walkable = false,
+ buildable_to = true,
+ is_ground_content = true,
+ drop = {
+ items = {
+ {items = {'farming:corn'},rarity=1},
+ {items = {'farming:corn'},rarity=2},
+ {items = {'farming:corn'},rarity=3},
+ }
+ },
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+-- Last stage of Corn growth doesnnot have growing=1 so abm never has to check these
+
+minetest.register_node("farming:corn_8", {
+ drawtype = "plantlike",
+ tiles = {"farming_corn_8.png"},
+ visual_scale = 1.45,
+ paramtype = "light",
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ is_ground_content = true,
+ drop = {
+ items = {
+ {items = {'farming:corn 2'},rarity=1},
+ {items = {'farming:corn 2'},rarity=2},
+ {items = {'farming:corn 2'},rarity=2},
+ }
+ },
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
diff --git a/cotton.lua b/cotton.lua
new file mode 100644
index 0000000..f7d307f
--- /dev/null
+++ b/cotton.lua
@@ -0,0 +1,183 @@
+-- Cotton Seed
+
+--minetest.register_craftitem("farming:seed_cotton", {
+-- description = "Cotton Seed",
+-- inventory_image = "farming_cotton_seed.png",
+-- on_place = function(itemstack, placer, pointed_thing)
+-- return farming.place_seed(itemstack, placer, pointed_thing, "farming:cotton_1")
+-- end,
+--})
+
+minetest.register_node("farming:seed_cotton", {
+ description = "Cotton Seed",
+ tiles = {"farming_cotton_seed.png"},
+ inventory_image = "farming_cotton_seed.png",
+ wield_image = "farming_cotton_seed.png",
+ drawtype = "signlike",
+ groups = {seed = 1, snappy = 3, attached_node = 1},
+ paramtype = "light",
+ paramtype2 = "wallmounted",
+ walkable = false,
+ sunlight_propagates = true,
+ selection_box = {type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ on_place = function(itemstack, placer, pointed_thing)
+ return farming.place_seed(itemstack, placer, pointed_thing, "farming:cotton_1")
+ end,
+})
+
+-- Cotton
+
+minetest.register_craftitem("farming:cotton", {
+ description = "Cotton",
+ inventory_image = "farming_cotton.png",
+})
+
+minetest.register_alias("farming:string", "farming:cotton")
+
+-- String to Wool
+
+minetest.register_craft({
+ output = "wool:white",
+ recipe = {
+ {"farming:string", "farming:string"},
+ {"farming:string", "farming:string"},
+ }
+})
+
+-- Define Cotton growth stages
+
+minetest.register_node("farming:cotton_1", {
+ drawtype = "plantlike",
+ tiles = {"farming_cotton_1.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:cotton_2", {
+ drawtype = "plantlike",
+ tiles = {"farming_cotton_2.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:cotton_3", {
+ drawtype = "plantlike",
+ tiles = {"farming_cotton_3.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:cotton_4", {
+ drawtype = "plantlike",
+ tiles = {"farming_cotton_4.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:cotton_5", {
+ drawtype = "plantlike",
+ tiles = {"farming_cotton_5.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = {
+ items = {
+ {items = {"farming:seed_cotton"},rarity=1},
+ }
+ },
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:cotton_6", {
+ drawtype = "plantlike",
+ tiles = {"farming_cotton_6.png"},
+ paramtype = "light",
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = {
+ items = {
+ {items = {"farming:cotton"},rarity=1},
+ {items = {"farming:cotton"},rarity=2},
+ }
+ },
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:cotton_7", {
+ drawtype = "plantlike",
+ tiles = {"farming_cotton_7.png"},
+ paramtype = "light",
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = {
+ items = {
+ {items = {"farming:cotton"},rarity=1},
+ {items = {"farming:cotton"},rarity=2},
+ {items = {"farming:seed_cotton"},rarity=1},
+ {items = {"farming:seed_cotton"},rarity=2},
+ }
+ },
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+-- Define last stage of Cotton growth separate and without growing=1 so abm never has to check these
+
+minetest.register_node("farming:cotton_8", {
+ drawtype = "plantlike",
+ tiles = {"farming_cotton_8.png"},
+ paramtype = "light",
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = {
+ items = {
+ {items = {"farming:string"},rarity=1},
+ {items = {"farming:string"},rarity=2},
+ {items = {"farming:string"},rarity=3},
+ {items = {"farming:seed_cotton"},rarity=1},
+ {items = {"farming:seed_cotton"},rarity=2},
+ {items = {"farming:seed_cotton"},rarity=3},
+ }
+ },
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
diff --git a/cucumber.lua b/cucumber.lua
new file mode 100644
index 0000000..4301890
--- /dev/null
+++ b/cucumber.lua
@@ -0,0 +1,74 @@
+
+--= Cucumber (Original textures from DocFarming mod)
+-- https://forum.minetest.net/viewtopic.php?id=3948
+
+minetest.register_craftitem("farming:cucumber", {
+ description = "Cucumber",
+ inventory_image = "farming_cucumber.png",
+ on_place = function(itemstack, placer, pointed_thing)
+ return farming.place_seed(itemstack, placer, pointed_thing, "farming:cucumber_1")
+ end,
+ on_use = minetest.item_eat(4),
+})
+
+-- Define Cucumber growth stages
+
+minetest.register_node("farming:cucumber_1", {
+ drawtype = "plantlike",
+ tiles = {"farming_cucumber_1.png"},
+ paramtype = "light",
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:cucumber_2", {
+ drawtype = "plantlike",
+ tiles = {"farming_cucumber_2.png"},
+ paramtype = "light",
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:cucumber_3", {
+ drawtype = "plantlike",
+ tiles = {"farming_cucumber_3.png"},
+ paramtype = "light",
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+-- Last stage of Cucumber growth doesnnot have growing=1 so abm never has to check these
+
+minetest.register_node("farming:cucumber_4", {
+ drawtype = "plantlike",
+ tiles = {"farming_cucumber_4.png"},
+ paramtype = "light",
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ is_ground_content = true,
+ drop = {
+ items = {
+ {items = {'farming:cucumber'},rarity=1},
+ {items = {'farming:cucumber 2'},rarity=2},
+ }
+ },
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
diff --git a/depends.txt b/depends.txt
new file mode 100644
index 0000000..be420a3
--- /dev/null
+++ b/depends.txt
@@ -0,0 +1,2 @@
+default
+wool \ No newline at end of file
diff --git a/donut.lua b/donut.lua
new file mode 100644
index 0000000..6dc385a
--- /dev/null
+++ b/donut.lua
@@ -0,0 +1,45 @@
+-- Donut (thanks to Bockwurst for making the donut images)
+minetest.register_craftitem("farming:donut", {
+ description = "Donut",
+ inventory_image = "farming_donut.png",
+ on_use = minetest.item_eat(4),
+})
+
+minetest.register_craft({
+ output = "farming:donut 3",
+ recipe = {
+ {'', 'farming:wheat', ''},
+ {'farming:wheat', '', 'farming:wheat'},
+ {'', 'farming:wheat', ''},
+ }
+})
+
+-- Chocolate Donut
+minetest.register_craftitem("farming:donut_chocolate", {
+ description = "Chocolate Donut",
+ inventory_image = "farming_donut_chocolate.png",
+ on_use = minetest.item_eat(6),
+})
+
+minetest.register_craft({
+ output = "farming:donut_chocolate",
+ recipe = {
+ {'farming:cocoa_beans'},
+ {'farming:donut'},
+ }
+})
+
+-- Apple Donut
+minetest.register_craftitem("farming:donut_apple", {
+ description = "Apple Donut",
+ inventory_image = "farming_donut_apple.png",
+ on_use = minetest.item_eat(6),
+})
+
+minetest.register_craft({
+ output = "farming:donut_apple",
+ recipe = {
+ {'default:apple'},
+ {'farming:donut'},
+ }
+})
diff --git a/grass.lua b/grass.lua
new file mode 100644
index 0000000..e3d1b6c
--- /dev/null
+++ b/grass.lua
@@ -0,0 +1,28 @@
+
+-- Override default grass and have it drop Wheat Seeds
+
+for i=1,5 do
+
+ minetest.override_item("default:grass_"..i, {
+ drop = {
+ max_items = 1,
+ items = {
+ {items = {'farming:seed_wheat'},rarity = 5},
+ {items = {'default:grass_1'}},
+ }
+ },
+ })
+
+end
+
+-- Override default Jungle Grass and have it drop Cotton Seeds
+
+minetest.override_item("default:junglegrass", {
+ drop = {
+ max_items = 1,
+ items = {
+ {items = {'farming:seed_cotton'},rarity = 8},
+ {items = {'default:junglegrass'}},
+ }
+ },
+})
diff --git a/hoes.lua b/hoes.lua
new file mode 100644
index 0000000..cd00f5e
--- /dev/null
+++ b/hoes.lua
@@ -0,0 +1,150 @@
+
+-- Hoe registration function
+
+farming.register_hoe = function(name, def)
+ -- Check for : prefix (register new hoes in your mod's namespace)
+ if name:sub(1,1) ~= ":" then
+ name = ":" .. name
+ end
+ -- Check def table
+ if def.description == nil then
+ def.description = "Hoe"
+ end
+ if def.inventory_image == nil then
+ def.inventory_image = "unknown_item.png"
+ end
+ if def.recipe == nil then
+ def.recipe = {
+ {"air","air",""},
+ {"","group:stick",""},
+ {"","group:stick",""}
+ }
+ end
+ if def.max_uses == nil then
+ def.max_uses = 30
+ end
+ -- Register the tool
+ minetest.register_tool(name, {
+ description = def.description,
+ inventory_image = def.inventory_image,
+ on_use = function(itemstack, user, pointed_thing)
+ return farming.hoe_on_use(itemstack, user, pointed_thing, def.max_uses)
+ end
+ })
+ -- Register its recipe
+ minetest.register_craft({
+ output = name:gsub(":", "", 1),
+ recipe = def.recipe
+ })
+end
+
+-- Turns dirt with group soil=1 into soil
+
+function farming.hoe_on_use(itemstack, user, pointed_thing, uses)
+ local pt = pointed_thing
+ -- check if pointing at a node
+ if not pt or pt.type ~= "node" then
+ return
+ end
+
+ local under = minetest.get_node(pt.under)
+ local upos = pointed_thing.under
+
+ if minetest.is_protected(upos, user:get_player_name()) then
+ minetest.record_protection_violation(upos, user:get_player_name())
+ return
+ end
+
+ local p = {x=pt.under.x, y=pt.under.y+1, z=pt.under.z}
+ local above = minetest.get_node(p)
+
+ -- return if any of the nodes is not registered
+ if not minetest.registered_nodes[under.name]
+ or not minetest.registered_nodes[above.name] then
+ return
+ end
+
+ -- check if the node above the pointed thing is air
+ if above.name ~= "air" then
+ return
+ end
+
+ -- check if pointing at dirt
+ if minetest.get_item_group(under.name, "soil") ~= 1 then
+ return
+ end
+
+ -- turn the node into soil, wear out item and play sound
+ minetest.set_node(pt.under, {name="farming:soil"})
+ minetest.sound_play("default_dig_crumbly", {pos = pt.under, gain = 0.5,})
+ itemstack:add_wear(65535/(uses-1))
+ return itemstack
+end
+
+-- Define Hoes
+
+farming.register_hoe(":farming:hoe_wood", {
+ description = "Wooden Hoe",
+ inventory_image = "farming_tool_woodhoe.png",
+ max_uses = 30,
+ recipe = {
+ {"group:wood", "group:wood"},
+ {"", "group:stick"},
+ {"", "group:stick"},
+ }
+})
+
+farming.register_hoe(":farming:hoe_stone", {
+ description = "Stone Hoe",
+ inventory_image = "farming_tool_stonehoe.png",
+ max_uses = 90,
+ recipe = {
+ {"group:stone", "group:stone"},
+ {"", "group:stick"},
+ {"", "group:stick"},
+ }
+})
+
+farming.register_hoe(":farming:hoe_steel", {
+ description = "Steel Hoe",
+ inventory_image = "farming_tool_steelhoe.png",
+ max_uses = 200,
+ recipe = {
+ {"default:steel_ingot", "default:steel_ingot"},
+ {"", "group:stick"},
+ {"", "group:stick"},
+ }
+})
+
+farming.register_hoe(":farming:hoe_bronze", {
+ description = "Bronze Hoe",
+ inventory_image = "farming_tool_bronzehoe.png",
+ max_uses = 220,
+ recipe = {
+ {"default:bronze_ingot", "default:bronze_ingot"},
+ {"", "group:stick"},
+ {"", "group:stick"},
+ }
+})
+
+farming.register_hoe(":farming:hoe_mese", {
+ description = "Mese Hoe",
+ inventory_image = "farming_tool_mesehoe.png",
+ max_uses = 350,
+ recipe = {
+ {"default:mese_crystal", "default:mese_crystal"},
+ {"", "group:stick"},
+ {"", "group:stick"},
+ }
+})
+
+farming.register_hoe(":farming:hoe_diamond", {
+ description = "Diamond Hoe",
+ inventory_image = "farming_tool_diamondhoe.png",
+ max_uses = 500,
+ recipe = {
+ {"default:diamond", "default:diamond"},
+ {"", "group:stick"},
+ {"", "group:stick"},
+ }
+})
diff --git a/init.lua b/init.lua
new file mode 100644
index 0000000..6fb997a
--- /dev/null
+++ b/init.lua
@@ -0,0 +1,195 @@
+--[[
+ Minetest Farming Redo Mod 1.10 (4th November 2014)
+ by TenPlus1
+]]
+
+farming = {}
+farming.mod = "redo"
+farming.hoe_on_use = default.hoe_on_use
+
+dofile(minetest.get_modpath("farming").."/soil.lua")
+dofile(minetest.get_modpath("farming").."/hoes.lua")
+dofile(minetest.get_modpath("farming").."/grass.lua")
+dofile(minetest.get_modpath("farming").."/wheat.lua")
+dofile(minetest.get_modpath("farming").."/cotton.lua")
+dofile(minetest.get_modpath("farming").."/carrot.lua")
+dofile(minetest.get_modpath("farming").."/potato.lua")
+dofile(minetest.get_modpath("farming").."/tomato.lua")
+dofile(minetest.get_modpath("farming").."/cucumber.lua")
+dofile(minetest.get_modpath("farming").."/corn.lua")
+dofile(minetest.get_modpath("farming").."/coffee.lua")
+dofile(minetest.get_modpath("farming").."/melon.lua")
+dofile(minetest.get_modpath("farming").."/sugar.lua")
+dofile(minetest.get_modpath("farming").."/pumpkin.lua")
+dofile(minetest.get_modpath("farming").."/cocoa.lua")
+dofile(minetest.get_modpath("farming").."/raspberry.lua")
+dofile(minetest.get_modpath("farming").."/blueberry.lua")
+dofile(minetest.get_modpath("farming").."/rhubarb.lua")
+dofile(minetest.get_modpath("farming").."/donut.lua") -- sweet treat
+dofile(minetest.get_modpath("farming").."/mapgen.lua")
+dofile(minetest.get_modpath("farming").."/compatibility.lua") -- Farming Plus compatibility
+
+-- Place Seeds on Soil
+
+function farming.place_seed(itemstack, placer, pointed_thing, plantname)
+ local pt = pointed_thing
+
+ -- check if pointing at a node
+ if not pt and pt.type ~= "node" then
+ return
+ end
+
+ local under = minetest.get_node(pt.under)
+ local above = minetest.get_node(pt.above)
+
+ -- check if pointing at the top of the node
+ if pt.above.y ~= pt.under.y+1 then
+ return
+ end
+
+ -- return if any of the nodes is not registered
+ if not minetest.registered_nodes[under.name]
+ or not minetest.registered_nodes[above.name] then
+ return
+ end
+
+ -- can I replace above node, and am I pointing at soil
+ if not minetest.registered_nodes[above.name].buildable_to
+ or minetest.get_item_group(under.name, "soil") < 2 then
+ return
+ end
+
+ -- add the node and remove 1 item from the itemstack
+ minetest.add_node(pt.above, {name=plantname})
+ if not minetest.setting_getbool("creative_mode") then
+ itemstack:take_item()
+ end
+ return itemstack
+end
+
+-- Single ABM Handles Growing of All Plants
+
+minetest.register_abm({
+ nodenames = {"group:growing"},
+ neighbors = {"farming:soil_wet", "default:jungletree"},
+ interval = 60,
+ chance = 2,
+
+ action = function(pos, node)
+
+ -- get node type (e.g. farming:wheat_1)
+
+ local data = nil
+ data = string.split(node.name, '_', 2)
+ local plant = data[1].."_"
+ local numb = data[2]
+
+ -- check if fully grown
+ if not minetest.registered_nodes[plant..(numb + 1)] then return end
+
+ -- Check for Cocoa Pod
+ if plant == "farming:cocoa_" and minetest.find_node_near(pos, 1, {"default:jungletree"}) then
+
+ else
+
+ -- check if on wet soil
+ pos.y = pos.y-1
+ if minetest.get_node(pos).name ~= "farming:soil_wet" then return end
+ pos.y = pos.y+1
+
+ -- check light
+ if minetest.get_node_light(pos) < 13 then return end
+
+ end
+
+ -- grow
+ minetest.set_node(pos, {name=plant..(numb + 1)})
+
+ end
+})
+
+-- Function to register plants (for compatibility)
+
+farming.register_plant = function(name, def)
+ local mname = name:split(":")[1]
+ local pname = name:split(":")[2]
+
+ -- Check def table
+ if not def.description then
+ def.description = "Seed"
+ end
+ if not def.inventory_image then
+ def.inventory_image = "unknown_item.png"
+ end
+ if not def.steps then
+ return nil
+ end
+
+ -- Register seed
+ minetest.register_node(":" .. mname .. ":seed_" .. pname, {
+ description = def.description,
+ tiles = {def.inventory_image},
+ inventory_image = def.inventory_image,
+ wield_image = def.inventory_image,
+ drawtype = "signlike",
+ groups = {seed = 1, snappy = 3, attached_node = 1},
+ paramtype = "light",
+ paramtype2 = "wallmounted",
+ walkable = false,
+ sunlight_propagates = true,
+ selection_box = {type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ on_place = function(itemstack, placer, pointed_thing)
+ return farming.place_seed(itemstack, placer, pointed_thing, mname .. ":"..pname.."_1")
+ end
+ })
+
+ -- Register harvest
+ minetest.register_craftitem(":" .. mname .. ":" .. pname, {
+ description = pname:gsub("^%l", string.upper),
+ inventory_image = mname .. "_" .. pname .. ".png",
+ })
+
+ -- Register growing steps
+ for i=1,def.steps do
+ local drop = {
+ items = {
+ {items = {mname .. ":" .. pname}, rarity = 9 - i},
+ {items = {mname .. ":" .. pname}, rarity= 18 - i * 2},
+ {items = {mname .. ":seed_" .. pname}, rarity = 9 - i},
+ {items = {mname .. ":seed_" .. pname}, rarity = 18 - i * 2},
+ }
+ }
+
+ local g = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, growing = 1}
+ -- Last step doesn't need growing=1 so Abm never has to check these
+ if i == def.steps then
+ g = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1}
+ end
+
+ minetest.register_node(mname .. ":" .. pname .. "_" .. i, {
+ drawtype = "plantlike",
+ waving = 1,
+ tiles = {mname .. "_" .. pname .. "_" .. i .. ".png"},
+ paramtype = "light",
+ walkable = false,
+ buildable_to = true,
+ is_ground_content = true,
+ drop = drop,
+ selection_box = {type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = g,
+ sounds = default.node_sound_leaves_defaults(),
+ })
+ end
+
+ -- Return info
+ local r = {seed = mname .. ":seed_" .. pname, harvest = mname .. ":" .. pname}
+ return r
+end
+
+--[[ Cotton (example, is already registered in cotton.lua)
+farming.register_plant("farming:cotton", {
+ description = "Cotton seed",
+ inventory_image = "farming_cotton_seed.png",
+ steps = 8,
+})
+--]]
diff --git a/license.txt b/license.txt
new file mode 100644
index 0000000..5d30c14
--- /dev/null
+++ b/license.txt
@@ -0,0 +1,14 @@
+
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ Version 2, December 2004
+
+ Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
+
+ Everyone is permitted to copy and distribute verbatim or modified
+ copies of this license document, and changing it is allowed as long
+ as the name is changed.
+
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. You just DO WHAT THE FUCK YOU WANT TO. \ No newline at end of file
diff --git a/mapgen.lua b/mapgen.lua
new file mode 100644
index 0000000..c7f990b
--- /dev/null
+++ b/mapgen.lua
@@ -0,0 +1,85 @@
+
+-- Generate new foods on map
+
+minetest.register_on_generated(function(minp, maxp, seed)
+
+ local perlin1 = minetest.get_perlin(329, 3, 0.6, 100)
+
+ -- Assume X and Z lengths are equal
+ local divlen = 16
+ local divs = (maxp.x-minp.x)/divlen+1;
+
+ for divx=0,divs-1 do
+ for divz=0,divs-1 do
+
+ local x0 = minp.x + math.floor((divx+0)*divlen)
+ local z0 = minp.z + math.floor((divz+0)*divlen)
+ local x1 = minp.x + math.floor((divx+1)*divlen)
+ local z1 = minp.z + math.floor((divz+1)*divlen)
+
+ -- Determine plant amount from perlin noise
+ local grass_amount = math.floor(perlin1:get2d({x=x0, y=z0}) ^ 3 * 9)
+
+ -- Find random positions for plant based on this random
+ local pr = PseudoRandom(seed+1)
+
+ for i=0,grass_amount do
+
+ local x = pr:next(x0, x1)
+ local z = pr:next(z0, z1)
+
+ -- Find ground level (0...15)
+ local ground_y = nil
+
+ for y=30,0,-1 do
+ if minetest.get_node({x=x,y=y,z=z}).name ~= "air" then
+ ground_y = y
+ break
+ end
+ end
+
+ if ground_y then
+
+ local p = {x=x,y=ground_y+1,z=z}
+ local nn = minetest.get_node(p).name
+
+ -- Check if the node can be replaced
+ if minetest.registered_nodes[nn] and
+
+ minetest.registered_nodes[nn].buildable_to then
+ nn = minetest.get_node({x=x,y=ground_y,z=z}).name
+
+ -- If dirt with grass, add plant in various stages of maturity
+ if nn == "default:dirt_with_grass" then
+
+ local type = math.random(1,11)
+ if type == 1 and ground_y > 15 then
+ minetest.set_node(p,{name="farming:potato_"..pr:next(3, 4)})
+ elseif type == 2 then
+ minetest.set_node(p,{name="farming:tomato_"..pr:next(7, 8)})
+ elseif type == 3 then
+ minetest.set_node(p,{name="farming:carrot_"..pr:next(7, 8)})
+ elseif type == 4 then
+ minetest.set_node(p,{name="farming:cucumber_4"})
+ elseif type == 5 then
+ minetest.set_node(p,{name="farming:corn_"..pr:next(7, 8)})
+ elseif type == 6 and ground_y > 20 then
+ minetest.set_node(p,{name="farming:coffee_5"})
+ elseif type == 7 and minetest.find_node_near(p, 3, {"group:water"}) then
+ minetest.set_node(p,{name="farming:melon_8"})
+ elseif type == 8 and ground_y > 15 then
+ minetest.set_node(p,{name="farming:pumpkin_8"})
+ elseif type == 9 and ground_y > 5 then
+ minetest.set_node(p,{name="farming:raspberry_4"})
+ elseif type == 10 and ground_y > 10 then
+ minetest.set_node(p,{name="farming:rhubarb_3"})
+ elseif type == 11 and ground_y > 5 then
+ minetest.set_node(p,{name="farming:blueberry_4"})
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+end)
diff --git a/melon.lua b/melon.lua
new file mode 100644
index 0000000..390b8bd
--- /dev/null
+++ b/melon.lua
@@ -0,0 +1,141 @@
+
+--= Melon
+
+minetest.register_craftitem("farming:melon_slice", {
+ description = "Melon Slice",
+ inventory_image = "farming_melon_slice.png",
+ on_place = function(itemstack, placer, pointed_thing)
+ return farming.place_seed(itemstack, placer, pointed_thing, "farming:melon_1")
+ end,
+ on_use = minetest.item_eat(2),
+})
+
+minetest.register_craft({
+ output = "farming:melon_8",
+ recipe = {
+ {"farming:melon_slice", "farming:melon_slice", "farming:melon_slice"},
+ {"farming:melon_slice", "farming:melon_slice", "farming:melon_slice"},
+ {"farming:melon_slice", "farming:melon_slice", "farming:melon_slice"},
+ }
+})
+
+minetest.register_craft({
+ output = "farming:melon_slice 9",
+ recipe = {
+ {"", "farming:melon_8", ""},
+ }
+})
+
+-- Define Melon growth stages
+
+minetest.register_node("farming:melon_1", {
+ drawtype = "plantlike",
+ tiles = {"farming_melon_1.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:melon_2", {
+ drawtype = "plantlike",
+ tiles = {"farming_melon_2.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:melon_3", {
+ drawtype = "plantlike",
+ tiles = {"farming_melon_3.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:melon_4", {
+ drawtype = "plantlike",
+ tiles = {"farming_melon_4.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:melon_5", {
+ drawtype = "plantlike",
+ tiles = {"farming_melon_5.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:melon_6", {
+ drawtype = "plantlike",
+ tiles = {"farming_melon_6.png"},
+ paramtype = "light",
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:melon_7", {
+ drawtype = "plantlike",
+ tiles = {"farming_melon_7.png"},
+ paramtype = "light",
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+-- Last stage of Melon growth doesnnot have growing=1 so abm never has to check these
+
+minetest.register_node("farming:melon_8", {
+ drawtype = "nodebox",
+ description = "Melon",
+ tiles = {"farming_melon_top.png", "farming_melon_top.png", "farming_melon_side.png"},
+ paramtype = "light",
+ walkable = true,
+ is_ground_content = true,
+ drop = {
+ items = {
+ {items = {'farming:melon_slice 9'},rarity=1},
+ }
+ },
+ groups = {snappy=3,flammable=2,plant=1},
+ sounds = default.node_sound_wood_defaults(),
+})
diff --git a/potato.lua b/potato.lua
new file mode 100644
index 0000000..9d4a4a7
--- /dev/null
+++ b/potato.lua
@@ -0,0 +1,97 @@
+
+--= Potato (Original textures from DocFarming mod)
+-- https://forum.minetest.net/viewtopic.php?id=3948
+
+minetest.register_craftitem("farming:potato", {
+ description = "Potato",
+ inventory_image = "farming_potato.png",
+ on_place = function(itemstack, placer, pointed_thing)
+ return farming.place_seed(itemstack, placer, pointed_thing, "farming:potato_1")
+ end,
+ on_use = minetest.item_eat(1),
+})
+
+minetest.register_craftitem("farming:baked_potato", {
+ description = "Baked Potato",
+ inventory_image = "farming_baked_potato.png",
+ on_use = minetest.item_eat(6),
+})
+
+minetest.register_craft({
+ type = "cooking",
+ cooktime = 10,
+ output = "farming:baked_potato",
+ recipe = "farming:potato"
+})
+
+-- Define Potato growth stages
+
+minetest.register_node("farming:potato_1", {
+ drawtype = "plantlike",
+ tiles = {"farming_potato_1.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:potato_2", {
+ drawtype = "plantlike",
+ tiles = {"farming_potato_2.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:potato_3", {
+ drawtype = "plantlike",
+ tiles = {"farming_potato_3.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ is_ground_content = true,
+ drop = {
+ items = {
+ {items = {'farming:potato'},rarity=1},
+ {items = {'farming:potato'},rarity=3},
+ }
+ },
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+-- Last stage of Potato growth doesnnot have growing=1 so abm never has to check these
+
+minetest.register_node("farming:potato_4", {
+ drawtype = "plantlike",
+ tiles = {"farming_potato_4.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ is_ground_content = true,
+ drop = {
+ items = {
+ {items = {'farming:potato 2'},rarity=1},
+ {items = {'farming:potato 3'},rarity=2},
+ }
+ },
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
diff --git a/pumpkin.lua b/pumpkin.lua
new file mode 100644
index 0000000..b7808b1
--- /dev/null
+++ b/pumpkin.lua
@@ -0,0 +1,216 @@
+
+--= Pumpkin (Big thanks to the PainterlyPack.net for Minecraft for allowing me to use these textures)
+
+minetest.register_node("farming:pumpkin", {
+ description = "Pumpkin",
+ tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png"},
+ groups = {snappy=3,flammable=2,plant=1},
+ drop = {
+ items = {
+ {items = {'farming:pumpkin_slice 9'},rarity=1},
+ }
+ },
+ sounds = default.node_sound_wood_defaults(),
+})
+
+minetest.register_craftitem("farming:pumpkin_slice", {
+ description = "Pumpkin Slice",
+ inventory_image = "farming_pumpkin_slice.png",
+ on_place = function(itemstack, placer, pointed_thing)
+ return farming.place_seed(itemstack, placer, pointed_thing, "farming:pumpkin_1")
+ end,
+ on_use = minetest.item_eat(2),
+})
+
+minetest.register_craft({
+ output = "farming:pumpkin",
+ recipe = {
+ {"farming:pumpkin_slice", "farming:pumpkin_slice", "farming:pumpkin_slice"},
+ {"farming:pumpkin_slice", "farming:pumpkin_slice", "farming:pumpkin_slice"},
+ {"farming:pumpkin_slice", "farming:pumpkin_slice", "farming:pumpkin_slice"},
+ }
+})
+
+minetest.register_craft({
+ output = "farming:pumpkin_slice 9",
+ recipe = {
+ {"", "farming:pumpkin", ""},
+ }
+})
+
+-- Jack 'O Lantern
+minetest.register_node("farming:jackolantern", {
+ description = "Jack 'O Lantern",
+ tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_face_off.png"},
+ paramtype2 = "facedir",
+ groups = {snappy=3,flammable=2},
+ sounds = default.node_sound_wood_defaults(),
+ on_punch = function(pos, node, puncher)
+ node.name = "farming:jackolantern_on"
+ minetest.set_node(pos, node)
+ end,
+})
+
+minetest.register_node("farming:jackolantern_on", {
+ description = "Jack 'O Lantern",
+ tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_face_on.png"},
+ light_source = 14,
+ paramtype2 = "facedir",
+ groups = {snappy=3,flammable=2},
+ sounds = default.node_sound_wood_defaults(),
+ drop = "farming:jackolantern",
+ on_punch = function(pos, node, puncher)
+ node.name = "farming:jackolantern"
+ minetest.set_node(pos, node)
+ end,
+})
+
+minetest.register_craft({
+ output = "farming:jackolantern",
+ recipe = {
+ {"", "", ""},
+ {"", "default:torch", ""},
+ {"", "farming:pumpkin", ""},
+ }
+})
+
+-- Pumpkin Bread
+minetest.register_craftitem("farming:pumpkin_bread", {
+ description = ("Pumpkin Bread"),
+ inventory_image = "farming_pumpkin_bread.png",
+ on_use = minetest.item_eat(8)
+})
+
+minetest.register_craftitem("farming:pumpkin_dough", {
+ description = "Pumpkin Dough",
+ inventory_image = "farming_pumpkin_dough.png",
+})
+
+minetest.register_craft({
+ output = "farming:pumpkin_dough",
+ type = "shapeless",
+ recipe = {"farming:flour", "farming:pumpkin_slice", "farming:pumpkin_slice"}
+})
+
+minetest.register_craft({
+ type = "cooking",
+ output = "farming:pumpkin_bread",
+ recipe = "farming:pumpkin_dough",
+ cooktime = 10
+})
+
+-- Define Pumpkin growth stages
+
+minetest.register_node("farming:pumpkin_1", {
+ drawtype = "plantlike",
+ tiles = {"farming_pumpkin_1.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:pumpkin_2", {
+ drawtype = "plantlike",
+ tiles = {"farming_pumpkin_2.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:pumpkin_3", {
+ drawtype = "plantlike",
+ tiles = {"farming_pumpkin_3.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:pumpkin_4", {
+ drawtype = "plantlike",
+ tiles = {"farming_pumpkin_4.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:pumpkin_5", {
+ drawtype = "plantlike",
+ tiles = {"farming_pumpkin_5.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:pumpkin_6", {
+ drawtype = "plantlike",
+ tiles = {"farming_pumpkin_6.png"},
+ paramtype = "light",
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:pumpkin_7", {
+ drawtype = "plantlike",
+ tiles = {"farming_pumpkin_7.png"},
+ paramtype = "light",
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+-- Last stage of Pumpkin growth does not have growing=1 so abm never has to check these
+
+minetest.register_node("farming:pumpkin_8", {
+ drawtype = "plantlike",
+ tiles = {"farming_pumpkin_8.png"},
+ paramtype = "light",
+ walkable = false,
+ buildable_to = true,
+ is_ground_content = true,
+ drop = {
+ items = {
+ {items = {'farming:pumpkin_slice 9'},rarity=1},
+ }
+ },
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1},
+ sounds = default.node_sound_defaults(),
+})
diff --git a/raspberry.lua b/raspberry.lua
new file mode 100644
index 0000000..48eea25
--- /dev/null
+++ b/raspberry.lua
@@ -0,0 +1,95 @@
+
+--= Raspberries
+
+minetest.register_craftitem("farming:raspberries", {
+ description = "Raspberries",
+ inventory_image = "farming_raspberries.png",
+ on_place = function(itemstack, placer, pointed_thing)
+ return farming.place_seed(itemstack, placer, pointed_thing, "farming:raspberry_1")
+ end,
+ on_use = minetest.item_eat(1),
+})
+
+-- Raspberry Smoothie
+
+minetest.register_craftitem("farming:smoothie_raspberry", {
+ description = "Raspberry Smoothie",
+ inventory_image = "farming_raspberry_smoothie.png",
+ on_use = minetest.item_eat(2, "vessels:drinking_glass"),
+})
+
+minetest.register_craft({
+ output = "farming:smoothie_raspberry",
+ recipe = {
+ {"default:snow"},
+ {"farming:raspberries"},
+ {"vessels:drinking_glass"},
+ }
+})
+
+-- Define Raspberry growth stages
+
+minetest.register_node("farming:raspberry_1", {
+ drawtype = "plantlike",
+ tiles = {"farming_raspberry_1.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:raspberry_2", {
+ drawtype = "plantlike",
+ tiles = {"farming_raspberry_2.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:raspberry_3", {
+ drawtype = "plantlike",
+ tiles = {"farming_raspberry_3.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+-- Last stage of Raspberry growth does not have growing=1 so abm never has to check these
+
+minetest.register_node("farming:raspberry_4", {
+ drawtype = "plantlike",
+ tiles = {"farming_raspberry_4.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ is_ground_content = true,
+ drop = {
+ items = {
+ {items = {'farming:raspberries 2'},rarity=1},
+ {items = {'farming:raspberries'},rarity=2},
+ {items = {'farming:raspberries'},rarity=3},
+ }
+ },
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
diff --git a/rhubarb.lua b/rhubarb.lua
new file mode 100644
index 0000000..37bd401
--- /dev/null
+++ b/rhubarb.lua
@@ -0,0 +1,79 @@
+
+--= Rhubarb
+
+minetest.register_craftitem("farming:rhubarb", {
+ description = "Rhubarb",
+ inventory_image = "farming_rhubarb.png",
+ on_place = function(itemstack, placer, pointed_thing)
+ return farming.place_seed(itemstack, placer, pointed_thing, "farming:rhubarb_1")
+ end,
+ on_use = minetest.item_eat(1),
+})
+
+minetest.register_craftitem("farming:rhubarb_pie", {
+ description = "Rhubarb Pie",
+ inventory_image = "farming_rhubarb_pie.png",
+ on_use = minetest.item_eat(6),
+})
+
+minetest.register_craft({
+ output = "farming:rhubarb_pie",
+ recipe = {
+ {"", "farming:sugar", ""},
+ {"farming:rhubarb", "farming:rhubarb", "farming:rhubarb"},
+ {"farming:wheat", "farming:wheat", "farming:wheat"},
+ }
+})
+
+-- Define Rhubarb growth stages
+
+minetest.register_node("farming:rhubarb_1", {
+ drawtype = "plantlike",
+ tiles = {"farming_rhubarb_1.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:rhubarb_2", {
+ drawtype = "plantlike",
+ tiles = {"farming_rhubarb_2.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+-- Last stage of Rhubarb growth doesnnot have growing=1 so abm never has to check these
+
+minetest.register_node("farming:rhubarb_3", {
+ drawtype = "plantlike",
+ tiles = {"farming_rhubarb_3.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ is_ground_content = true,
+ drop = {
+ items = {
+ {items = {'farming:rhubarb 2'},rarity=1},
+ {items = {'farming:rhubarb'},rarity=2},
+ {items = {'farming:rhubarb'},rarity=3},
+ }
+ },
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
diff --git a/soil.lua b/soil.lua
new file mode 100644
index 0000000..b459273
--- /dev/null
+++ b/soil.lua
@@ -0,0 +1,58 @@
+
+--= Soil Functions
+
+-- Normal Soil
+
+minetest.register_node("farming:soil", {
+ description = "Soil",
+ tiles = {"farming_soil.png", "default_dirt.png"},
+ drop = "default:dirt",
+ is_ground_content = true,
+ groups = {crumbly=3, not_in_creative_inventory=1, soil=2},
+ sounds = default.node_sound_dirt_defaults(),
+})
+minetest.register_alias("farming:desert_sand_soil", "farming:soil")
+
+-- Wet Soil
+
+minetest.register_node("farming:soil_wet", {
+ description = "Wet Soil",
+ tiles = {"farming_soil_wet.png", "farming_soil_wet_side.png"},
+ drop = "default:dirt",
+ is_ground_content = true,
+ groups = {crumbly=3, not_in_creative_inventory=1, soil=3},
+ sounds = default.node_sound_dirt_defaults(),
+})
+minetest.register_alias("farming:desert_sand_soil_wet", "farming:soil_wet")
+
+-- If Water near Soil then turn into Wet Soil
+
+minetest.register_abm({
+ nodenames = {"farming:soil", "farming:soil_wet"},
+ interval = 15,
+ chance = 4,
+ action = function(pos, node)
+
+ pos.y = pos.y+1
+ local nn = minetest.get_node(pos).name
+ pos.y = pos.y-1
+
+ -- what's on top of soil, if solid/not plant change soil to dirt
+ if minetest.registered_nodes[nn]
+ and minetest.registered_nodes[nn].walkable
+ and minetest.get_item_group(nn, "plant") == 0 then
+ minetest.set_node(pos, {name="default:dirt"})
+ end
+
+ -- check if there is water nearby and change soil accordingly
+ if minetest.find_node_near(pos, 3, {"group:water"}) then
+ if node.name == "farming:soil" then
+ minetest.set_node(pos, {name="farming:soil_wet"})
+ end
+ elseif node.name == "farming:soil_wet" then
+ minetest.set_node(pos, {name="farming:soil"})
+ elseif node.name == "farming:soil" then
+ minetest.set_node(pos, {name="default:dirt"})
+ end
+ end,
+})
diff --git a/sugar.lua b/sugar.lua
new file mode 100644
index 0000000..15bd9fa
--- /dev/null
+++ b/sugar.lua
@@ -0,0 +1,15 @@
+
+--= Sugar
+
+minetest.register_craftitem("farming:sugar", {
+ description = "Sugar",
+ inventory_image = "farming_sugar.png",
+})
+
+minetest.register_craft({
+ type = "cooking",
+ cooktime = 3,
+ output = "farming:sugar 2",
+ recipe = "default:papyrus",
+})
+
diff --git a/textures/default_junglegrass.png b/textures/default_junglegrass.png
new file mode 100644
index 0000000..5d8cdbc
--- /dev/null
+++ b/textures/default_junglegrass.png
Binary files differ
diff --git a/textures/farming_baked_potato.png b/textures/farming_baked_potato.png
new file mode 100644
index 0000000..425c4ae
--- /dev/null
+++ b/textures/farming_baked_potato.png
Binary files differ
diff --git a/textures/farming_blueberries.png b/textures/farming_blueberries.png
new file mode 100644
index 0000000..b0c4931
--- /dev/null
+++ b/textures/farming_blueberries.png
Binary files differ
diff --git a/textures/farming_blueberry_1.png b/textures/farming_blueberry_1.png
new file mode 100644
index 0000000..83832c8
--- /dev/null
+++ b/textures/farming_blueberry_1.png
Binary files differ
diff --git a/textures/farming_blueberry_2.png b/textures/farming_blueberry_2.png
new file mode 100644
index 0000000..308a0ca
--- /dev/null
+++ b/textures/farming_blueberry_2.png
Binary files differ
diff --git a/textures/farming_blueberry_3.png b/textures/farming_blueberry_3.png
new file mode 100644
index 0000000..43d2ab1
--- /dev/null
+++ b/textures/farming_blueberry_3.png
Binary files differ
diff --git a/textures/farming_blueberry_4.png b/textures/farming_blueberry_4.png
new file mode 100644
index 0000000..75fb69a
--- /dev/null
+++ b/textures/farming_blueberry_4.png
Binary files differ
diff --git a/textures/farming_blueberry_muffin.png b/textures/farming_blueberry_muffin.png
new file mode 100644
index 0000000..b1253d7
--- /dev/null
+++ b/textures/farming_blueberry_muffin.png
Binary files differ
diff --git a/textures/farming_bottle_ethanol.png b/textures/farming_bottle_ethanol.png
new file mode 100644
index 0000000..84e6162
--- /dev/null
+++ b/textures/farming_bottle_ethanol.png
Binary files differ
diff --git a/textures/farming_bread.png b/textures/farming_bread.png
new file mode 100644
index 0000000..bd00e3e
--- /dev/null
+++ b/textures/farming_bread.png
Binary files differ
diff --git a/textures/farming_carrot.png b/textures/farming_carrot.png
new file mode 100644
index 0000000..73f2fd4
--- /dev/null
+++ b/textures/farming_carrot.png
Binary files differ
diff --git a/textures/farming_carrot_1.png b/textures/farming_carrot_1.png
new file mode 100644
index 0000000..bbeae7e
--- /dev/null
+++ b/textures/farming_carrot_1.png
Binary files differ
diff --git a/textures/farming_carrot_2.png b/textures/farming_carrot_2.png
new file mode 100644
index 0000000..b24ecc0
--- /dev/null
+++ b/textures/farming_carrot_2.png
Binary files differ
diff --git a/textures/farming_carrot_3.png b/textures/farming_carrot_3.png
new file mode 100644
index 0000000..8400505
--- /dev/null
+++ b/textures/farming_carrot_3.png
Binary files differ
diff --git a/textures/farming_carrot_4.png b/textures/farming_carrot_4.png
new file mode 100644
index 0000000..32ee262
--- /dev/null
+++ b/textures/farming_carrot_4.png
Binary files differ
diff --git a/textures/farming_carrot_5.png b/textures/farming_carrot_5.png
new file mode 100644
index 0000000..0bcd9c1
--- /dev/null
+++ b/textures/farming_carrot_5.png
Binary files differ
diff --git a/textures/farming_carrot_6.png b/textures/farming_carrot_6.png
new file mode 100644
index 0000000..a17c6b2
--- /dev/null
+++ b/textures/farming_carrot_6.png
Binary files differ
diff --git a/textures/farming_carrot_7.png b/textures/farming_carrot_7.png
new file mode 100644
index 0000000..d26eee7
--- /dev/null
+++ b/textures/farming_carrot_7.png
Binary files differ
diff --git a/textures/farming_carrot_8.png b/textures/farming_carrot_8.png
new file mode 100644
index 0000000..00b6d92
--- /dev/null
+++ b/textures/farming_carrot_8.png
Binary files differ
diff --git a/textures/farming_carrot_gold.png b/textures/farming_carrot_gold.png
new file mode 100644
index 0000000..b817101
--- /dev/null
+++ b/textures/farming_carrot_gold.png
Binary files differ
diff --git a/textures/farming_chocolate_dark.png b/textures/farming_chocolate_dark.png
new file mode 100644
index 0000000..03243b2
--- /dev/null
+++ b/textures/farming_chocolate_dark.png
Binary files differ
diff --git a/textures/farming_cocoa_1.png b/textures/farming_cocoa_1.png
new file mode 100644
index 0000000..f887a1f
--- /dev/null
+++ b/textures/farming_cocoa_1.png
Binary files differ
diff --git a/textures/farming_cocoa_2.png b/textures/farming_cocoa_2.png
new file mode 100644
index 0000000..f0d3935
--- /dev/null
+++ b/textures/farming_cocoa_2.png
Binary files differ
diff --git a/textures/farming_cocoa_3.png b/textures/farming_cocoa_3.png
new file mode 100644
index 0000000..8eaf67e
--- /dev/null
+++ b/textures/farming_cocoa_3.png
Binary files differ
diff --git a/textures/farming_cocoa_beans.png b/textures/farming_cocoa_beans.png
new file mode 100644
index 0000000..4022f8e
--- /dev/null
+++ b/textures/farming_cocoa_beans.png
Binary files differ
diff --git a/textures/farming_coffee_1.png b/textures/farming_coffee_1.png
new file mode 100644
index 0000000..97c207a
--- /dev/null
+++ b/textures/farming_coffee_1.png
Binary files differ
diff --git a/textures/farming_coffee_2.png b/textures/farming_coffee_2.png
new file mode 100644
index 0000000..a659f85
--- /dev/null
+++ b/textures/farming_coffee_2.png
Binary files differ
diff --git a/textures/farming_coffee_3.png b/textures/farming_coffee_3.png
new file mode 100644
index 0000000..93088c8
--- /dev/null
+++ b/textures/farming_coffee_3.png
Binary files differ
diff --git a/textures/farming_coffee_4.png b/textures/farming_coffee_4.png
new file mode 100644
index 0000000..37a609f
--- /dev/null
+++ b/textures/farming_coffee_4.png
Binary files differ
diff --git a/textures/farming_coffee_5.png b/textures/farming_coffee_5.png
new file mode 100644
index 0000000..e624fbe
--- /dev/null
+++ b/textures/farming_coffee_5.png
Binary files differ
diff --git a/textures/farming_coffee_beans.png b/textures/farming_coffee_beans.png
new file mode 100644
index 0000000..0786f4e
--- /dev/null
+++ b/textures/farming_coffee_beans.png
Binary files differ
diff --git a/textures/farming_coffee_cup.png b/textures/farming_coffee_cup.png
new file mode 100644
index 0000000..d3820bc
--- /dev/null
+++ b/textures/farming_coffee_cup.png
Binary files differ
diff --git a/textures/farming_coffee_cup_hot.png b/textures/farming_coffee_cup_hot.png
new file mode 100644
index 0000000..f4fae90
--- /dev/null
+++ b/textures/farming_coffee_cup_hot.png
Binary files differ
diff --git a/textures/farming_cookie.png b/textures/farming_cookie.png
new file mode 100644
index 0000000..e80be35
--- /dev/null
+++ b/textures/farming_cookie.png
Binary files differ
diff --git a/textures/farming_corn.png b/textures/farming_corn.png
new file mode 100644
index 0000000..2a2894a
--- /dev/null
+++ b/textures/farming_corn.png
Binary files differ
diff --git a/textures/farming_corn_1.png b/textures/farming_corn_1.png
new file mode 100644
index 0000000..60e8b99
--- /dev/null
+++ b/textures/farming_corn_1.png
Binary files differ
diff --git a/textures/farming_corn_2.png b/textures/farming_corn_2.png
new file mode 100644
index 0000000..6ba6cc9
--- /dev/null
+++ b/textures/farming_corn_2.png
Binary files differ
diff --git a/textures/farming_corn_3.png b/textures/farming_corn_3.png
new file mode 100644
index 0000000..c5fa80b
--- /dev/null
+++ b/textures/farming_corn_3.png
Binary files differ
diff --git a/textures/farming_corn_4.png b/textures/farming_corn_4.png
new file mode 100644
index 0000000..a43632d
--- /dev/null
+++ b/textures/farming_corn_4.png
Binary files differ
diff --git a/textures/farming_corn_5.png b/textures/farming_corn_5.png
new file mode 100644
index 0000000..7b6fb02
--- /dev/null
+++ b/textures/farming_corn_5.png
Binary files differ
diff --git a/textures/farming_corn_6.png b/textures/farming_corn_6.png
new file mode 100644
index 0000000..313697b
--- /dev/null
+++ b/textures/farming_corn_6.png
Binary files differ
diff --git a/textures/farming_corn_7.png b/textures/farming_corn_7.png
new file mode 100644
index 0000000..6a937e7
--- /dev/null
+++ b/textures/farming_corn_7.png
Binary files differ
diff --git a/textures/farming_corn_8.png b/textures/farming_corn_8.png
new file mode 100644
index 0000000..77e442b
--- /dev/null
+++ b/textures/farming_corn_8.png
Binary files differ
diff --git a/textures/farming_corn_cob.png b/textures/farming_corn_cob.png
new file mode 100644
index 0000000..a2fd9da
--- /dev/null
+++ b/textures/farming_corn_cob.png
Binary files differ
diff --git a/textures/farming_cotton.png b/textures/farming_cotton.png
new file mode 100644
index 0000000..ee0c290
--- /dev/null
+++ b/textures/farming_cotton.png
Binary files differ
diff --git a/textures/farming_cotton_1.png b/textures/farming_cotton_1.png
new file mode 100644
index 0000000..8750adf
--- /dev/null
+++ b/textures/farming_cotton_1.png
Binary files differ
diff --git a/textures/farming_cotton_2.png b/textures/farming_cotton_2.png
new file mode 100644
index 0000000..dc1025b
--- /dev/null
+++ b/textures/farming_cotton_2.png
Binary files differ
diff --git a/textures/farming_cotton_3.png b/textures/farming_cotton_3.png
new file mode 100644
index 0000000..a1fe3b6
--- /dev/null
+++ b/textures/farming_cotton_3.png
Binary files differ
diff --git a/textures/farming_cotton_4.png b/textures/farming_cotton_4.png
new file mode 100644
index 0000000..d0096da
--- /dev/null
+++ b/textures/farming_cotton_4.png
Binary files differ
diff --git a/textures/farming_cotton_5.png b/textures/farming_cotton_5.png
new file mode 100644
index 0000000..11f67fc
--- /dev/null
+++ b/textures/farming_cotton_5.png
Binary files differ
diff --git a/textures/farming_cotton_6.png b/textures/farming_cotton_6.png
new file mode 100644
index 0000000..1334304
--- /dev/null
+++ b/textures/farming_cotton_6.png
Binary files differ
diff --git a/textures/farming_cotton_7.png b/textures/farming_cotton_7.png
new file mode 100644
index 0000000..fb98f1e
--- /dev/null
+++ b/textures/farming_cotton_7.png
Binary files differ
diff --git a/textures/farming_cotton_8.png b/textures/farming_cotton_8.png
new file mode 100644
index 0000000..ae9ed37
--- /dev/null
+++ b/textures/farming_cotton_8.png
Binary files differ
diff --git a/textures/farming_cotton_seed.png b/textures/farming_cotton_seed.png
new file mode 100644
index 0000000..70d2ac2
--- /dev/null
+++ b/textures/farming_cotton_seed.png
Binary files differ
diff --git a/textures/farming_cucumber.png b/textures/farming_cucumber.png
new file mode 100644
index 0000000..2acb7b2
--- /dev/null
+++ b/textures/farming_cucumber.png
Binary files differ
diff --git a/textures/farming_cucumber_1.png b/textures/farming_cucumber_1.png
new file mode 100644
index 0000000..e008fd1
--- /dev/null
+++ b/textures/farming_cucumber_1.png
Binary files differ
diff --git a/textures/farming_cucumber_2.png b/textures/farming_cucumber_2.png
new file mode 100644
index 0000000..9c345ff
--- /dev/null
+++ b/textures/farming_cucumber_2.png
Binary files differ
diff --git a/textures/farming_cucumber_3.png b/textures/farming_cucumber_3.png
new file mode 100644
index 0000000..25f3c54
--- /dev/null
+++ b/textures/farming_cucumber_3.png
Binary files differ
diff --git a/textures/farming_cucumber_4.png b/textures/farming_cucumber_4.png
new file mode 100644
index 0000000..fc62f2f
--- /dev/null
+++ b/textures/farming_cucumber_4.png
Binary files differ
diff --git a/textures/farming_desert_sand_soil.png b/textures/farming_desert_sand_soil.png
new file mode 100644
index 0000000..1450e01
--- /dev/null
+++ b/textures/farming_desert_sand_soil.png
Binary files differ
diff --git a/textures/farming_desert_sand_soil_wet.png b/textures/farming_desert_sand_soil_wet.png
new file mode 100644
index 0000000..cffa955
--- /dev/null
+++ b/textures/farming_desert_sand_soil_wet.png
Binary files differ
diff --git a/textures/farming_desert_sand_soil_wet_side.png b/textures/farming_desert_sand_soil_wet_side.png
new file mode 100644
index 0000000..fbb2815
--- /dev/null
+++ b/textures/farming_desert_sand_soil_wet_side.png
Binary files differ
diff --git a/textures/farming_donut.png b/textures/farming_donut.png
new file mode 100644
index 0000000..8985299
--- /dev/null
+++ b/textures/farming_donut.png
Binary files differ
diff --git a/textures/farming_donut_apple.png b/textures/farming_donut_apple.png
new file mode 100644
index 0000000..6dfe63d
--- /dev/null
+++ b/textures/farming_donut_apple.png
Binary files differ
diff --git a/textures/farming_donut_chocolate.png b/textures/farming_donut_chocolate.png
new file mode 100644
index 0000000..aa4b93f
--- /dev/null
+++ b/textures/farming_donut_chocolate.png
Binary files differ
diff --git a/textures/farming_flour.png b/textures/farming_flour.png
new file mode 100644
index 0000000..a526b20
--- /dev/null
+++ b/textures/farming_flour.png
Binary files differ
diff --git a/textures/farming_melon_1.png b/textures/farming_melon_1.png
new file mode 100644
index 0000000..3c6ea6d
--- /dev/null
+++ b/textures/farming_melon_1.png
Binary files differ
diff --git a/textures/farming_melon_2.png b/textures/farming_melon_2.png
new file mode 100644
index 0000000..185ed82
--- /dev/null
+++ b/textures/farming_melon_2.png
Binary files differ
diff --git a/textures/farming_melon_3.png b/textures/farming_melon_3.png
new file mode 100644
index 0000000..6e661f9
--- /dev/null
+++ b/textures/farming_melon_3.png
Binary files differ
diff --git a/textures/farming_melon_4.png b/textures/farming_melon_4.png
new file mode 100644
index 0000000..d9199f3
--- /dev/null
+++ b/textures/farming_melon_4.png
Binary files differ
diff --git a/textures/farming_melon_5.png b/textures/farming_melon_5.png
new file mode 100644
index 0000000..755cbd3
--- /dev/null
+++ b/textures/farming_melon_5.png
Binary files differ
diff --git a/textures/farming_melon_6.png b/textures/farming_melon_6.png
new file mode 100644
index 0000000..b31a5b4
--- /dev/null
+++ b/textures/farming_melon_6.png
Binary files differ
diff --git a/textures/farming_melon_7.png b/textures/farming_melon_7.png
new file mode 100644
index 0000000..3aebfdd
--- /dev/null
+++ b/textures/farming_melon_7.png
Binary files differ
diff --git a/textures/farming_melon_side.png b/textures/farming_melon_side.png
new file mode 100644
index 0000000..88e40c6
--- /dev/null
+++ b/textures/farming_melon_side.png
Binary files differ
diff --git a/textures/farming_melon_slice.png b/textures/farming_melon_slice.png
new file mode 100644
index 0000000..6ee9775
--- /dev/null
+++ b/textures/farming_melon_slice.png
Binary files differ
diff --git a/textures/farming_melon_top.png b/textures/farming_melon_top.png
new file mode 100644
index 0000000..f387dbd
--- /dev/null
+++ b/textures/farming_melon_top.png
Binary files differ
diff --git a/textures/farming_potato.png b/textures/farming_potato.png
new file mode 100644
index 0000000..6e91d6a
--- /dev/null
+++ b/textures/farming_potato.png
Binary files differ
diff --git a/textures/farming_potato_1.png b/textures/farming_potato_1.png
new file mode 100644
index 0000000..a9c0040
--- /dev/null
+++ b/textures/farming_potato_1.png
Binary files differ
diff --git a/textures/farming_potato_2.png b/textures/farming_potato_2.png
new file mode 100644
index 0000000..c81830c
--- /dev/null
+++ b/textures/farming_potato_2.png
Binary files differ
diff --git a/textures/farming_potato_3.png b/textures/farming_potato_3.png
new file mode 100644
index 0000000..a3d7920
--- /dev/null
+++ b/textures/farming_potato_3.png
Binary files differ
diff --git a/textures/farming_potato_4.png b/textures/farming_potato_4.png
new file mode 100644
index 0000000..405b7e5
--- /dev/null
+++ b/textures/farming_potato_4.png
Binary files differ
diff --git a/textures/farming_pumpkin_1.png b/textures/farming_pumpkin_1.png
new file mode 100644
index 0000000..e5b9a2b
--- /dev/null
+++ b/textures/farming_pumpkin_1.png
Binary files differ
diff --git a/textures/farming_pumpkin_2.png b/textures/farming_pumpkin_2.png
new file mode 100644
index 0000000..d977e8c
--- /dev/null
+++ b/textures/farming_pumpkin_2.png
Binary files differ
diff --git a/textures/farming_pumpkin_3.png b/textures/farming_pumpkin_3.png
new file mode 100644
index 0000000..83f8190
--- /dev/null
+++ b/textures/farming_pumpkin_3.png
Binary files differ
diff --git a/textures/farming_pumpkin_4.png b/textures/farming_pumpkin_4.png
new file mode 100644
index 0000000..20de004
--- /dev/null
+++ b/textures/farming_pumpkin_4.png
Binary files differ
diff --git a/textures/farming_pumpkin_5.png b/textures/farming_pumpkin_5.png
new file mode 100644
index 0000000..59fa78e
--- /dev/null
+++ b/textures/farming_pumpkin_5.png
Binary files differ
diff --git a/textures/farming_pumpkin_6.png b/textures/farming_pumpkin_6.png
new file mode 100644
index 0000000..6ae543e
--- /dev/null
+++ b/textures/farming_pumpkin_6.png
Binary files differ
diff --git a/textures/farming_pumpkin_7.png b/textures/farming_pumpkin_7.png
new file mode 100644
index 0000000..79190e0
--- /dev/null
+++ b/textures/farming_pumpkin_7.png
Binary files differ
diff --git a/textures/farming_pumpkin_8.png b/textures/farming_pumpkin_8.png
new file mode 100644
index 0000000..b941442
--- /dev/null
+++ b/textures/farming_pumpkin_8.png
Binary files differ
diff --git a/textures/farming_pumpkin_bread.png b/textures/farming_pumpkin_bread.png
new file mode 100644
index 0000000..0dfae08
--- /dev/null
+++ b/textures/farming_pumpkin_bread.png
Binary files differ
diff --git a/textures/farming_pumpkin_dough.png b/textures/farming_pumpkin_dough.png
new file mode 100644
index 0000000..62ea7a6
--- /dev/null
+++ b/textures/farming_pumpkin_dough.png
Binary files differ
diff --git a/textures/farming_pumpkin_face_off.png b/textures/farming_pumpkin_face_off.png
new file mode 100644
index 0000000..df70171
--- /dev/null
+++ b/textures/farming_pumpkin_face_off.png
Binary files differ
diff --git a/textures/farming_pumpkin_face_on.png b/textures/farming_pumpkin_face_on.png
new file mode 100644
index 0000000..fa71c9d
--- /dev/null
+++ b/textures/farming_pumpkin_face_on.png
Binary files differ
diff --git a/textures/farming_pumpkin_side.png b/textures/farming_pumpkin_side.png
new file mode 100644
index 0000000..2d30f20
--- /dev/null
+++ b/textures/farming_pumpkin_side.png
Binary files differ
diff --git a/textures/farming_pumpkin_slice.png b/textures/farming_pumpkin_slice.png
new file mode 100644
index 0000000..1fb659e
--- /dev/null
+++ b/textures/farming_pumpkin_slice.png
Binary files differ
diff --git a/textures/farming_pumpkin_top.png b/textures/farming_pumpkin_top.png
new file mode 100644
index 0000000..7928345
--- /dev/null
+++ b/textures/farming_pumpkin_top.png
Binary files differ
diff --git a/textures/farming_raspberries.png b/textures/farming_raspberries.png
new file mode 100644
index 0000000..ab96e1b
--- /dev/null
+++ b/textures/farming_raspberries.png
Binary files differ
diff --git a/textures/farming_raspberry_1.png b/textures/farming_raspberry_1.png
new file mode 100644
index 0000000..d1a7ffc
--- /dev/null
+++ b/textures/farming_raspberry_1.png
Binary files differ
diff --git a/textures/farming_raspberry_2.png b/textures/farming_raspberry_2.png
new file mode 100644
index 0000000..308a0ca
--- /dev/null
+++ b/textures/farming_raspberry_2.png
Binary files differ
diff --git a/textures/farming_raspberry_3.png b/textures/farming_raspberry_3.png
new file mode 100644
index 0000000..43d2ab1
--- /dev/null
+++ b/textures/farming_raspberry_3.png
Binary files differ
diff --git a/textures/farming_raspberry_4.png b/textures/farming_raspberry_4.png
new file mode 100644
index 0000000..32da6b9
--- /dev/null
+++ b/textures/farming_raspberry_4.png
Binary files differ
diff --git a/textures/farming_raspberry_smoothie.png b/textures/farming_raspberry_smoothie.png
new file mode 100644
index 0000000..fe178d1
--- /dev/null
+++ b/textures/farming_raspberry_smoothie.png
Binary files differ
diff --git a/textures/farming_rhubarb.png b/textures/farming_rhubarb.png
new file mode 100644
index 0000000..7d416ab
--- /dev/null
+++ b/textures/farming_rhubarb.png
Binary files differ
diff --git a/textures/farming_rhubarb_1.png b/textures/farming_rhubarb_1.png
new file mode 100644
index 0000000..01585b1
--- /dev/null
+++ b/textures/farming_rhubarb_1.png
Binary files differ
diff --git a/textures/farming_rhubarb_2.png b/textures/farming_rhubarb_2.png
new file mode 100644
index 0000000..71845c7
--- /dev/null
+++ b/textures/farming_rhubarb_2.png
Binary files differ
diff --git a/textures/farming_rhubarb_3.png b/textures/farming_rhubarb_3.png
new file mode 100644
index 0000000..b412f7e
--- /dev/null
+++ b/textures/farming_rhubarb_3.png
Binary files differ
diff --git a/textures/farming_rhubarb_pie.png b/textures/farming_rhubarb_pie.png
new file mode 100644
index 0000000..1f77b53
--- /dev/null
+++ b/textures/farming_rhubarb_pie.png
Binary files differ
diff --git a/textures/farming_soil.png b/textures/farming_soil.png
new file mode 100644
index 0000000..0be94e3
--- /dev/null
+++ b/textures/farming_soil.png
Binary files differ
diff --git a/textures/farming_soil_wet.png b/textures/farming_soil_wet.png
new file mode 100644
index 0000000..d5e335e
--- /dev/null
+++ b/textures/farming_soil_wet.png
Binary files differ
diff --git a/textures/farming_soil_wet_side.png b/textures/farming_soil_wet_side.png
new file mode 100644
index 0000000..6bd3a56
--- /dev/null
+++ b/textures/farming_soil_wet_side.png
Binary files differ
diff --git a/textures/farming_sugar.png b/textures/farming_sugar.png
new file mode 100644
index 0000000..5cb7fa0
--- /dev/null
+++ b/textures/farming_sugar.png
Binary files differ
diff --git a/textures/farming_tomato.png b/textures/farming_tomato.png
new file mode 100644
index 0000000..586aa56
--- /dev/null
+++ b/textures/farming_tomato.png
Binary files differ
diff --git a/textures/farming_tomato_1.png b/textures/farming_tomato_1.png
new file mode 100644
index 0000000..d858e58
--- /dev/null
+++ b/textures/farming_tomato_1.png
Binary files differ
diff --git a/textures/farming_tomato_2.png b/textures/farming_tomato_2.png
new file mode 100644
index 0000000..9d9ed6d
--- /dev/null
+++ b/textures/farming_tomato_2.png
Binary files differ
diff --git a/textures/farming_tomato_3.png b/textures/farming_tomato_3.png
new file mode 100644
index 0000000..fe3dcf0
--- /dev/null
+++ b/textures/farming_tomato_3.png
Binary files differ
diff --git a/textures/farming_tomato_4.png b/textures/farming_tomato_4.png
new file mode 100644
index 0000000..27c3282
--- /dev/null
+++ b/textures/farming_tomato_4.png
Binary files differ
diff --git a/textures/farming_tomato_5.png b/textures/farming_tomato_5.png
new file mode 100644
index 0000000..f369a68
--- /dev/null
+++ b/textures/farming_tomato_5.png
Binary files differ
diff --git a/textures/farming_tomato_6.png b/textures/farming_tomato_6.png
new file mode 100644
index 0000000..0135cb5
--- /dev/null
+++ b/textures/farming_tomato_6.png
Binary files differ
diff --git a/textures/farming_tomato_7.png b/textures/farming_tomato_7.png
new file mode 100644
index 0000000..4cd85f5
--- /dev/null
+++ b/textures/farming_tomato_7.png
Binary files differ
diff --git a/textures/farming_tomato_8.png b/textures/farming_tomato_8.png
new file mode 100644
index 0000000..0b49025
--- /dev/null
+++ b/textures/farming_tomato_8.png
Binary files differ
diff --git a/textures/farming_tool_bronzehoe.png b/textures/farming_tool_bronzehoe.png
new file mode 100644
index 0000000..ef07a80
--- /dev/null
+++ b/textures/farming_tool_bronzehoe.png
Binary files differ
diff --git a/textures/farming_tool_diamondhoe.png b/textures/farming_tool_diamondhoe.png
new file mode 100644
index 0000000..093acb8
--- /dev/null
+++ b/textures/farming_tool_diamondhoe.png
Binary files differ
diff --git a/textures/farming_tool_mesehoe.png b/textures/farming_tool_mesehoe.png
new file mode 100644
index 0000000..ffd597a
--- /dev/null
+++ b/textures/farming_tool_mesehoe.png
Binary files differ
diff --git a/textures/farming_tool_steelhoe.png b/textures/farming_tool_steelhoe.png
new file mode 100644
index 0000000..893a695
--- /dev/null
+++ b/textures/farming_tool_steelhoe.png
Binary files differ
diff --git a/textures/farming_tool_stonehoe.png b/textures/farming_tool_stonehoe.png
new file mode 100644
index 0000000..4f8dade
--- /dev/null
+++ b/textures/farming_tool_stonehoe.png
Binary files differ
diff --git a/textures/farming_tool_woodhoe.png b/textures/farming_tool_woodhoe.png
new file mode 100644
index 0000000..8b20d2d
--- /dev/null
+++ b/textures/farming_tool_woodhoe.png
Binary files differ
diff --git a/textures/farming_wheat.png b/textures/farming_wheat.png
new file mode 100644
index 0000000..8ecd735
--- /dev/null
+++ b/textures/farming_wheat.png
Binary files differ
diff --git a/textures/farming_wheat_1.png b/textures/farming_wheat_1.png
new file mode 100644
index 0000000..4943000
--- /dev/null
+++ b/textures/farming_wheat_1.png
Binary files differ
diff --git a/textures/farming_wheat_2.png b/textures/farming_wheat_2.png
new file mode 100644
index 0000000..63550d1
--- /dev/null
+++ b/textures/farming_wheat_2.png
Binary files differ
diff --git a/textures/farming_wheat_3.png b/textures/farming_wheat_3.png
new file mode 100644
index 0000000..00a8c66
--- /dev/null
+++ b/textures/farming_wheat_3.png
Binary files differ
diff --git a/textures/farming_wheat_4.png b/textures/farming_wheat_4.png
new file mode 100644
index 0000000..80b98aa
--- /dev/null
+++ b/textures/farming_wheat_4.png
Binary files differ
diff --git a/textures/farming_wheat_5.png b/textures/farming_wheat_5.png
new file mode 100644
index 0000000..1023f0c
--- /dev/null
+++ b/textures/farming_wheat_5.png
Binary files differ
diff --git a/textures/farming_wheat_6.png b/textures/farming_wheat_6.png
new file mode 100644
index 0000000..591c138
--- /dev/null
+++ b/textures/farming_wheat_6.png
Binary files differ
diff --git a/textures/farming_wheat_7.png b/textures/farming_wheat_7.png
new file mode 100644
index 0000000..98bc60a
--- /dev/null
+++ b/textures/farming_wheat_7.png
Binary files differ
diff --git a/textures/farming_wheat_8.png b/textures/farming_wheat_8.png
new file mode 100644
index 0000000..44bc532
--- /dev/null
+++ b/textures/farming_wheat_8.png
Binary files differ
diff --git a/textures/farming_wheat_seed.png b/textures/farming_wheat_seed.png
new file mode 100644
index 0000000..9afcd4d
--- /dev/null
+++ b/textures/farming_wheat_seed.png
Binary files differ
diff --git a/textures/vessels_drinking_cup.png b/textures/vessels_drinking_cup.png
new file mode 100644
index 0000000..2eba232
--- /dev/null
+++ b/textures/vessels_drinking_cup.png
Binary files differ
diff --git a/tomato.lua b/tomato.lua
new file mode 100644
index 0000000..3ec20f7
--- /dev/null
+++ b/tomato.lua
@@ -0,0 +1,138 @@
+
+--= Tomato (Original textures from link below)
+-- http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1288375-food-plus-mod-more-food-than-you-can-imagine-v2-9)
+
+minetest.register_craftitem("farming:tomato", {
+ description = "Tomato",
+ inventory_image = "farming_tomato.png",
+ on_place = function(itemstack, placer, pointed_thing)
+ return farming.place_seed(itemstack, placer, pointed_thing, "farming:tomato_1")
+ end,
+ on_use = minetest.item_eat(4),
+})
+
+-- Define Tomato growth stages
+
+minetest.register_node("farming:tomato_1", {
+ drawtype = "plantlike",
+ tiles = {"farming_tomato_1.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:tomato_2", {
+ drawtype = "plantlike",
+ tiles = {"farming_tomato_2.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:tomato_3", {
+ drawtype = "plantlike",
+ tiles = {"farming_tomato_3.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:tomato_4", {
+ drawtype = "plantlike",
+ tiles = {"farming_tomato_4.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:tomato_5", {
+ drawtype = "plantlike",
+ tiles = {"farming_tomato_5.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:tomato_6", {
+ drawtype = "plantlike",
+ tiles = {"farming_tomato_6.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:tomato_7", {
+ drawtype = "plantlike",
+ tiles = {"farming_tomato_7.png"},
+ paramtype = "light",
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ is_ground_content = true,
+ drop = {
+ items = {
+ {items = {'farming:tomato'},rarity=1},
+ {items = {'farming:tomato'},rarity=3},
+ }
+ },
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+-- Last stage of Carrot growth doesnnot have growing=1 so abm never has to check these
+
+minetest.register_node("farming:tomato_8", {
+ drawtype = "plantlike",
+ tiles = {"farming_tomato_8.png"},
+ paramtype = "light",
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ is_ground_content = true,
+ drop = {
+ items = {
+ {items = {'farming:tomato 3'},rarity=1},
+ {items = {'farming:tomato 3'},rarity=2},
+ }
+ },
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
diff --git a/wheat.lua b/wheat.lua
new file mode 100644
index 0000000..4acf4f8
--- /dev/null
+++ b/wheat.lua
@@ -0,0 +1,203 @@
+
+--= Wheat
+
+-- Wheat Seed
+
+--minetest.register_craftitem("farming:seed_wheat", {
+-- description = "Wheat Seed",
+-- inventory_image = "farming_wheat_seed.png",
+-- on_place = function(itemstack, placer, pointed_thing)
+-- return farming.place_seed(itemstack, placer, pointed_thing, "farming:wheat_1")
+-- end,
+--})
+
+minetest.register_node("farming:seed_wheat", {
+ description = "Wheat Seed",
+ tiles = {"farming_wheat_seed.png"},
+ inventory_image = "farming_wheat_seed.png",
+ wield_image = "farming_wheat_seed.png",
+ drawtype = "signlike",
+ groups = {seed = 1, snappy = 3, attached_node = 1},
+ paramtype = "light",
+ paramtype2 = "wallmounted",
+ walkable = false,
+ sunlight_propagates = true,
+ selection_box = {type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ on_place = function(itemstack, placer, pointed_thing)
+ return farming.place_seed(itemstack, placer, pointed_thing, "farming:wheat_1")
+ end,
+})
+
+-- Harvested Wheat
+
+minetest.register_craftitem("farming:wheat", {
+ description = "Wheat",
+ inventory_image = "farming_wheat.png",
+})
+
+-- flour
+
+minetest.register_craftitem("farming:flour", {
+ description = "Flour",
+ inventory_image = "farming_flour.png",
+})
+
+minetest.register_craft({
+ type = "shapeless",
+ output = "farming:flour",
+ recipe = {"farming:wheat", "farming:wheat", "farming:wheat", "farming:wheat"}
+})
+
+-- Bread
+
+minetest.register_craftitem("farming:bread", {
+ description = "Bread",
+ inventory_image = "farming_bread.png",
+ on_use = minetest.item_eat(4),
+})
+
+minetest.register_craft({
+ type = "cooking",
+ cooktime = 15,
+ output = "farming:bread",
+ recipe = "farming:flour"
+})
+
+-- Define Wheat growth stages
+
+minetest.register_node("farming:wheat_1", {
+ drawtype = "plantlike",
+ tiles = {"farming_wheat_1.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:wheat_2", {
+ drawtype = "plantlike",
+ tiles = {"farming_wheat_2.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:wheat_3", {
+ drawtype = "plantlike",
+ tiles = {"farming_wheat_3.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:wheat_4", {
+ drawtype = "plantlike",
+ tiles = {"farming_wheat_4.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = "",
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:wheat_5", {
+ drawtype = "plantlike",
+ tiles = {"farming_wheat_5.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = {
+ items = {
+ {items = {'farming:wheat'},rarity=2},
+ {items = {'farming:seed_wheat'},rarity=2},
+ }
+ },
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:wheat_6", {
+ drawtype = "plantlike",
+ tiles = {"farming_wheat_6.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = {
+ items = {
+ {items = {'farming:wheat'},rarity=2},
+ {items = {'farming:seed_wheat'},rarity=1},
+ }
+ },
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("farming:wheat_7", {
+ drawtype = "plantlike",
+ tiles = {"farming_wheat_7.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = {
+ items = {
+ {items = {'farming:wheat'},rarity=1},
+ {items = {'farming:wheat'},rarity=3},
+ {items = {'farming:seed_wheat'},rarity=1},
+ {items = {'farming:seed_wheat'},rarity=3},
+ }
+ },
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1,growing=1},
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+-- Last stage of Wheat growth doesnnot have growing=1 so abm never has to check these
+
+minetest.register_node("farming:wheat_8", {
+ drawtype = "plantlike",
+ tiles = {"farming_wheat_8.png"},
+ paramtype = "light",
+ waving = 1,
+ walkable = false,
+ buildable_to = true,
+ drop = {
+ items = {
+ {items = {'farming:wheat'},rarity=1},
+ {items = {'farming:wheat'},rarity=2},
+ {items = {'farming:seed_wheat'},rarity=1},
+ {items = {'farming:seed_wheat'},rarity=2},
+ }
+ },
+ selection_box = {type = "fixed",fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},},
+ groups = {snappy=3,flammable=2,plant=1,not_in_creative_inventory=1,attached_node=1},
+ sounds = default.node_sound_leaves_defaults(),
+})