summaryrefslogtreecommitdiff
path: root/blueberry.lua
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 /blueberry.lua
Signed-off-by: tenplus1
Diffstat (limited to 'blueberry.lua')
-rw-r--r--blueberry.lua93
1 files changed, 93 insertions, 0 deletions
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(),
+})