forked from luanti-org/minetest_game
		
	Default/trees: Make 'can grow' public to enable over-riding
This commit is contained in:
		| @@ -6,7 +6,7 @@ | |||||||
|  |  | ||||||
| local random = math.random | local random = math.random | ||||||
|  |  | ||||||
| local function can_grow(pos) | function default.can_grow(pos) | ||||||
| 	local node_under = minetest.get_node_or_nil({x = pos.x, y = pos.y - 1, z = pos.z}) | 	local node_under = minetest.get_node_or_nil({x = pos.x, y = pos.y - 1, z = pos.z}) | ||||||
| 	if not node_under then | 	if not node_under then | ||||||
| 		return false | 		return false | ||||||
| @@ -32,7 +32,7 @@ minetest.register_abm({ | |||||||
| 	interval = 10, | 	interval = 10, | ||||||
| 	chance = 50, | 	chance = 50, | ||||||
| 	action = function(pos, node) | 	action = function(pos, node) | ||||||
| 		if not can_grow(pos) then | 		if not default.can_grow(pos) then | ||||||
| 			return | 			return | ||||||
| 		end | 		end | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user