From 6e1eb9ee9b100a4b7f65f68124a94f6bf9e60e27 Mon Sep 17 00:00:00 2001
From: tchncs <tchncs@vivaldi.net>
Date: Wed, 7 Dec 2016 16:03:46 +0100
Subject: [PATCH] tree leaves got a chance to drop sticks

---
 leaves.lua | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/leaves.lua b/leaves.lua
index 1998e0b..2447c88 100644
--- a/leaves.lua
+++ b/leaves.lua
@@ -15,6 +15,12 @@ minetest.override_item("default:leaves", {
 	inventory_image = "default_leaves.png",
 	wield_image = "default_leaves.png",
 	walkable = ethereal.leafwalk,
+    drop = {
+        max_items = 1,
+        items = {
+            {items = {'default:sapling'}, rarity = 20},
+            {items = {'default:stick'}, rarity = 30},
+            {items = {'default:leaves'}}
 })
 
 -- default jungle tree leaves
@@ -24,6 +30,14 @@ minetest.override_item("default:jungleleaves", {
 	inventory_image = "default_jungleleaves.png",
 	wield_image = "default_jungleleaves.png",
 	walkable = ethereal.leafwalk,
+    drop = {
+        max_items = 1,
+        items = {
+            {items = {'default:junglesapling'}, rarity = 20},
+            {items = {'default:stick'}, rarity = 30},
+            {items = {'default:jungleleaves'}}
+        }
+    },
 })
 
 -- default pine tree leaves
@@ -38,6 +52,7 @@ minetest.override_item("default:pine_needles", {
 		items = {
 			{items = {"default:pine_sapling"}, rarity = 20},
 			{items = {"ethereal:pine_nuts"}, rarity = 5},
+            {items = {'default:stick'}, rarity = 30},
 			{items = {"default:pine_needles"}}
 		}
 	},
@@ -51,8 +66,17 @@ minetest.override_item("default:acacia_leaves", {
 	wield_image = "default_acacia_leaves.png",
 	visual_scale = 1.2,
 	walkable = ethereal.leafwalk,
+    drop = {
+        max_items = 1,
+        items = {
+            {items = {"default:acacia_sapling"}, rarity = 20},
+            {items = {'default:stick'}, rarity = 30},
+            {items = {"default:acacia_leaves"}}
+        }
+    },
 })
 
+
 -- default aspen tree leaves
 minetest.override_item("default:aspen_leaves", {
 	drawtype = leaftype,
@@ -60,6 +84,14 @@ minetest.override_item("default:aspen_leaves", {
 	wield_image = "default_aspen_leaves.png",
 	visual_scale = 1.2,
 	walkable = ethereal.leafwalk,
+    drop = {
+        max_items = 1,
+        items = {
+            {items = {"default:aspen_sapling"}, rarity = 20},
+            {items = {'default:stick'}, rarity = 30},
+            {items = {"default:aspen_leaves"}}
+        }
+    },
 })
 
 -- willow twig
@@ -78,6 +110,7 @@ minetest.register_node("ethereal:willow_twig", {
 		max_items = 1,
 		items = {
 			{items = {"ethereal:willow_sapling"}, rarity = 50},
+            {items = {'default:stick'}, rarity = 30},
 			{items = {"ethereal:willow_twig"}}
 		}
 	},
@@ -101,6 +134,7 @@ minetest.register_node("ethereal:redwood_leaves", {
 		max_items = 1,
 		items = {
 			{items = {"ethereal:redwood_sapling"}, rarity = 50},
+            {items = {"default:stick"}, rarity = 30},
 			{items = {"ethereal:redwood_leaves"}}
 		}
 	},
@@ -124,6 +158,7 @@ minetest.register_node("ethereal:orange_leaves", {
 		max_items = 1,
 		items = {
 			{items = {"ethereal:orange_tree_sapling"}, rarity = 15},
+            {items = {"default:stick"}, rarity = 30},
 			{items = {"ethereal:orange_leaves"}}
 		}
 	},
@@ -147,6 +182,7 @@ minetest.register_node("ethereal:bananaleaves", {
 		max_items = 1,
 		items = {
 			{items = {"ethereal:banana_tree_sapling"}, rarity = 10},
+            {items = {"default:stick"}, rarity = 30},
 			{items = {"ethereal:bananaleaves"}}
 		}
 	},
@@ -170,6 +206,7 @@ minetest.register_node("ethereal:yellowleaves", {
 		max_items = 1,
 		items = {
 			{items = {"ethereal:yellow_tree_sapling"}, rarity = 50},
+            {items = {"default:stick"}, rarity = 30},
 			{items = {"ethereal:yellowleaves"}}
 		}
 	},
@@ -196,6 +233,7 @@ minetest.register_node("ethereal:palmleaves", {
 		max_items = 1,
 		items = {
 			{items = {"ethereal:palm_sapling"}, rarity = 10},
+            {items = {"default:stick"}, rarity = 30},
 			{items = {"ethereal:palmleaves"}}
 		}
 	},
@@ -219,6 +257,7 @@ minetest.register_node("ethereal:birch_leaves", {
 		max_items = 1,
 		items = {
 			{items = {"ethereal:birch_sapling"}, rarity = 20},
+            {items = {"default:stick"}, rarity = 30},
 			{items = {"ethereal:birch_leaves"}}
 		}
 	},
@@ -242,6 +281,7 @@ minetest.register_node("ethereal:frost_leaves", {
 		max_items = 1,
 		items = {
 			{items = {"ethereal:frost_tree_sapling"}, rarity = 15},
+            {items = {"default:stick"}, rarity = 30},
 			{items = {"ethereal:frost_leaves"}}
 		}
 	},
@@ -266,6 +306,7 @@ minetest.register_node("ethereal:bamboo_leaves", {
 		max_items = 1,
 		items = {
 			{items = {"ethereal:bamboo_sprout"}, rarity = 10},
+            {items = {"default:stick"}, rarity = 30},
 			{items = {"ethereal:bamboo_leaves"}}
 		}
 	},
-- 
GitLab