Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dead ongen saplings due to biome_lib secession #35

Merged
merged 8 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions default_settings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ moretrees.dates_item_drop_ichance = 10 -- inverse probability of ripe dates dr
moretrees.sapling_interval = 100
moretrees.sapling_chance = 5

-- Enable this only if you have used an old moretrees version which was using biome_lib
-- and when you notice large areas with ongen saplings that don't grow
moretrees.grow_legacy_saplings = false

-- If this variable is set to true, drop leaves out as entities during leaf
-- decay, rather than just disappearing them.

Expand Down
15 changes: 14 additions & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -383,4 +383,17 @@ function moretrees.grow_fir_snow(pos)
minetest.spawn_tree(pos,moretrees.fir_model)
end

print("[Moretrees] Loaded (2013-02-11)")
if moretrees.grow_legacy_saplings then
minetest.register_lbm({
name = "moretrees:grow_ongen_saplings",
label = "Grow legacy ongen saplings",
nodenames = {"group:moretrees_ongen"},
run_at_every_load = true,
action = function(pos)
minetest.log("info", "[moretrees] Starting growth timer for legacy ongen sapling at "..minetest.pos_to_string(pos, 0))
minetest.get_node_timer(pos):start(math.random(2, 10))
end
})
end

minetest.log("info", "[moretrees] Loading done")
10 changes: 9 additions & 1 deletion node_defs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,15 @@ for i in ipairs(moretrees.treelist) do
})
end

local ongen_groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1,sapling=1,not_in_creative_inventory=1}
local ongen_groups = {
snappy = 2,
dig_immediate = 3,
flammable = 2,
attached_node = 1,
sapling = 1,
moretrees_ongen = 1,
not_in_creative_inventory = 1
}
if minetest.settings:get_bool("creative_mode", false) then
ongen_groups["not_in_creative_inventory"]=nil
end
Expand Down
4 changes: 4 additions & 0 deletions settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ moretrees.dates_item_drop_ichance = tonumber(stg:get("moretrees.dates_item_drop_
moretrees.sapling_interval = 100
moretrees.sapling_chance = 5

-- Enable this only if you have used an old moretrees version which was using biome_lib
-- and when you notice large areas with ongen saplings that don't grow
moretrees.grow_legacy_saplings = stg:get_bool("moretrees.grow_legacy_saplings", false)

-- If this variable is set to true, drop leaves out as entities during leaf
-- decay, rather than just disappearing them.
moretrees.decay_leaves_as_items = stg:get_bool("moretrees.decay_leaves_as_items", false)