summaryrefslogtreecommitdiff
path: root/node_defs.lua
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2013-02-11 12:23:05 -0500
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2013-02-11 12:23:05 -0500
commita0af3f26de0028e832eac202d3fd9ce93d68f65d (patch)
tree7a1a08edcbedbeaf3e0145eefabc991ec775e0c8 /node_defs.lua
parent1445263d734eabd017d3af1b57e19dc4e9870545 (diff)
added the ability to redefine apples so that they'll fall when nearby leaves
disappear (defaults to true). Moved leafdecay code into its own file. Moved sapling configs into settings.lua
Diffstat (limited to 'node_defs.lua')
-rw-r--r--node_defs.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/node_defs.lua b/node_defs.lua
index e8f0ba9..858f5af 100644
--- a/node_defs.lua
+++ b/node_defs.lua
@@ -186,6 +186,27 @@ minetest.register_node("moretrees:fir_leaves_bright", {
})
table.insert(moretrees.leaves_list, "moretrees:fir_leaves_bright")
+if moretrees.enable_redefine_apple then
+ minetest.register_node(":default:apple", {
+ description = "Apple",
+ drawtype = "plantlike",
+ visual_scale = 1.0,
+ tiles = {"default_apple.png"},
+ inventory_image = "default_apple.png",
+ paramtype = "light",
+ sunlight_propagates = true,
+ walkable = false,
+ selection_box = {
+ type = "fixed",
+ fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2}
+ },
+ groups = {fleshy=3,dig_immediate=3,flammable=2,attached_node=1},
+ on_use = minetest.item_eat(4),
+ sounds = default.node_sound_defaults(),
+ })
+end
+
+
-- Backward compatbility with old mods/nodes: