From 7b9aac91b2bdfd777dc2df92ea689dd7ff23ca96 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Sat, 5 Jul 2014 01:46:33 -0400 Subject: [PATCH] make apple blossoms only grow on trees within 20m of water by default --- nature_classic/blossom.lua | 4 +++- nature_classic/config.lua | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/nature_classic/blossom.lua b/nature_classic/blossom.lua index c159e63..ca7d011 100644 --- a/nature_classic/blossom.lua +++ b/nature_classic/blossom.lua @@ -41,7 +41,9 @@ minetest.register_abm({ chance = BLOSSOM_CHANCE, action = function(pos, node, active_object_count, active_object_count_wider) - nature:grow_node(pos, BLOSSOM_NODE) + if nature:is_near_water(pos) then + nature:grow_node(pos, BLOSSOM_NODE) + end end }) diff --git a/nature_classic/config.lua b/nature_classic/config.lua index 49278e0..2862bc7 100644 --- a/nature_classic/config.lua +++ b/nature_classic/config.lua @@ -1,6 +1,6 @@ -- Set on which distance from water can the tree still grow. -- Grows anywhere if set to -1. -DISTANCE_FROM_WATER = -1 +DISTANCE_FROM_WATER = 20 -- Minimum light level needed to grow. Default is 8, which means daylight. MINIMUM_GROWTH_LIGHT = 8