From b03ba5e1b0427c2f631f17de537d0ce24169d422 Mon Sep 17 00:00:00 2001 From: Sergei Mozhaisky Date: Sat, 11 Jul 2020 17:19:05 +0000 Subject: [PATCH] update oak_steampunk; fall oak trunk --- MineStead_modpack/oak_steampunk/init.lua | 12 +++++++--- fallen_trees/init.lua | 4 ++++ fallen_trees/oak_steampunk.lua | 29 ++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 fallen_trees/oak_steampunk.lua diff --git a/MineStead_modpack/oak_steampunk/init.lua b/MineStead_modpack/oak_steampunk/init.lua index 33ddc5d..0178c25 100644 --- a/MineStead_modpack/oak_steampunk/init.lua +++ b/MineStead_modpack/oak_steampunk/init.lua @@ -87,7 +87,6 @@ local _ = { local T = { name = "oak_steampunk:oak_tree_trunk", - force_place = true, } local L = { @@ -176,9 +175,9 @@ oak_tree_schematic = { minetest.register_decoration({ deco_type = "schematic", place_on = {"default:dirt_with_grass", "default:dirt_with_coniferous_litter", "dirt_with_snow"}, - biomes = {"coniferous_forest", "taiga"}, -- "grassland", "deciduous_forest", + biomes = {"grassland", "snowy_grassland"}, -- "deciduous_forest", "coniferous_forest", "taiga" sidelen = 5, - fill_ratio = 0.001, + fill_ratio = 0.0005, schematic = oak_tree_schematic, rotation = 'random', y_min = 20, @@ -186,6 +185,13 @@ minetest.register_decoration({ flags = {place_center_z = true, place_center_x = true}, }) +-- register leaf decay for oak tree +default.register_leafdecay({ + trunks = {"oak_steampunk:oak_tree_trunk"}, + leaves = {"oak_steampunk:oak_tree_leaves"}, + radius = 3, +}) + minetest.register_craft({ output = "oak_steampunk:oak_tree_planks 4", recipe = {{"oak_steampunk:oak_tree_trunk"}} diff --git a/fallen_trees/init.lua b/fallen_trees/init.lua index d370caf..d075704 100644 --- a/fallen_trees/init.lua +++ b/fallen_trees/init.lua @@ -89,6 +89,10 @@ if minetest.get_modpath("real_trees") then dofile(mod_path .. "/real_trees.lua") end +if minetest.get_modpath("oak_steampunk") then + dofile(mod_path .. "/oak_steampunk.lua") +end + -- -- Minetest engine debug logging diff --git a/fallen_trees/oak_steampunk.lua b/fallen_trees/oak_steampunk.lua new file mode 100644 index 0000000..654edbe --- /dev/null +++ b/fallen_trees/oak_steampunk.lua @@ -0,0 +1,29 @@ +--[[ + Fallen Trees - Adds tree nodes to the falling_node group. + Copyright (C) 2018 Hamlet + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +--]] + + +-- +-- Nodes overriders +-- + +minetest.override_item("oak_steampunk:oak_tree_trunk", { + groups = { + tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2, + falling_node = 1 + } +})