summaryrefslogtreecommitdiff
path: root/plantlife_modpack/ferns
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2016-04-01 20:02:19 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2016-04-01 21:09:33 -0400
commitda66780a569712c23ae4f2996cfb4608a9f9d69d (patch)
tree217556029a78bc23ad4564720afc86de97228a04 /plantlife_modpack/ferns
parent615b22df4d423aded3613db7716943a2f389b047 (diff)
downloaddreambuilder_modpack-da66780a569712c23ae4f2996cfb4608a9f9d69d.tar
dreambuilder_modpack-da66780a569712c23ae4f2996cfb4608a9f9d69d.tar.gz
dreambuilder_modpack-da66780a569712c23ae4f2996cfb4608a9f9d69d.tar.bz2
dreambuilder_modpack-da66780a569712c23ae4f2996cfb4608a9f9d69d.tar.xz
dreambuilder_modpack-da66780a569712c23ae4f2996cfb4608a9f9d69d.zip
copy all standard Dreambuilder mods in from the old subgame
(exactly as last supplied there, updates to these mods will follow later)
Diffstat (limited to 'plantlife_modpack/ferns')
-rw-r--r--plantlife_modpack/ferns/crafting.lua104
-rw-r--r--plantlife_modpack/ferns/depends.txt2
-rw-r--r--plantlife_modpack/ferns/fern.lua196
-rw-r--r--plantlife_modpack/ferns/gianttreefern.lua336
-rw-r--r--plantlife_modpack/ferns/horsetail.lua156
-rw-r--r--plantlife_modpack/ferns/init.lua69
-rw-r--r--plantlife_modpack/ferns/settings.lua43
-rw-r--r--plantlife_modpack/ferns/textures/ferns_5.pngbin0 -> 550 bytes
-rw-r--r--plantlife_modpack/ferns/textures/ferns_6.pngbin0 -> 666 bytes
-rw-r--r--plantlife_modpack/ferns/textures/ferns_7.pngbin0 -> 669 bytes
-rw-r--r--plantlife_modpack/ferns/textures/ferns_8.pngbin0 -> 510 bytes
-rw-r--r--plantlife_modpack/ferns/textures/ferns_fern.pngbin0 -> 362 bytes
-rw-r--r--plantlife_modpack/ferns/textures/ferns_fern_big.pngbin0 -> 1170 bytes
-rw-r--r--plantlife_modpack/ferns/textures/ferns_fern_mid.pngbin0 -> 699 bytes
-rw-r--r--plantlife_modpack/ferns/textures/ferns_fern_tree.pngbin0 -> 1339 bytes
-rw-r--r--plantlife_modpack/ferns/textures/ferns_fern_tree_giant.pngbin0 -> 3250 bytes
-rw-r--r--plantlife_modpack/ferns/textures/ferns_fern_tree_inv.pngbin0 -> 391 bytes
-rw-r--r--plantlife_modpack/ferns/textures/ferns_fern_tree_tl.pngbin0 -> 264 bytes
-rw-r--r--plantlife_modpack/ferns/textures/ferns_fern_tree_tr.pngbin0 -> 256 bytes
-rw-r--r--plantlife_modpack/ferns/textures/ferns_fern_trunk.pngbin0 -> 765 bytes
-rw-r--r--plantlife_modpack/ferns/textures/ferns_fern_trunk_big.pngbin0 -> 684 bytes
-rw-r--r--plantlife_modpack/ferns/textures/ferns_fern_trunk_big_top.pngbin0 -> 398 bytes
-rw-r--r--plantlife_modpack/ferns/textures/ferns_fern_trunk_top.pngbin0 -> 233 bytes
-rw-r--r--plantlife_modpack/ferns/textures/ferns_ferntuber.pngbin0 -> 438 bytes
-rw-r--r--plantlife_modpack/ferns/textures/ferns_ferntuber_roasted.pngbin0 -> 428 bytes
-rw-r--r--plantlife_modpack/ferns/textures/ferns_fiddlehead.pngbin0 -> 327 bytes
-rw-r--r--plantlife_modpack/ferns/textures/ferns_fiddlehead_roasted.pngbin0 -> 521 bytes
-rw-r--r--plantlife_modpack/ferns/textures/ferns_horsetail_01.pngbin0 -> 150 bytes
-rw-r--r--plantlife_modpack/ferns/textures/ferns_horsetail_02.pngbin0 -> 166 bytes
-rw-r--r--plantlife_modpack/ferns/textures/ferns_horsetail_03.pngbin0 -> 199 bytes
-rw-r--r--plantlife_modpack/ferns/textures/ferns_horsetail_04.pngbin0 -> 224 bytes
-rw-r--r--plantlife_modpack/ferns/textures/ferns_sapling_tree_fern.pngbin0 -> 168 bytes
-rw-r--r--plantlife_modpack/ferns/textures/ferns_sapling_tree_fern_giant.pngbin0 -> 224 bytes
-rw-r--r--plantlife_modpack/ferns/textures/ferns_tree_fern_leave_big.pngbin0 -> 560 bytes
-rw-r--r--plantlife_modpack/ferns/textures/ferns_tree_fern_leave_big_cross.pngbin0 -> 724 bytes
-rw-r--r--plantlife_modpack/ferns/textures/ferns_tree_fern_leave_big_end.pngbin0 -> 456 bytes
-rw-r--r--plantlife_modpack/ferns/textures/not_in_use/archaeplantae_horsetails.pngbin0 -> 308 bytes
-rw-r--r--plantlife_modpack/ferns/textures/not_in_use/big picture 3.pngbin0 -> 1972 bytes
-rw-r--r--plantlife_modpack/ferns/textures/not_in_use/ferns_fern_big_left.pngbin0 -> 640 bytes
-rw-r--r--plantlife_modpack/ferns/textures/not_in_use/ferns_fern_big_right.pngbin0 -> 623 bytes
-rw-r--r--plantlife_modpack/ferns/textures/not_in_use/ferns_fern_mid_left.pngbin0 -> 393 bytes
-rw-r--r--plantlife_modpack/ferns/textures/not_in_use/ferns_fern_mid_right.pngbin0 -> 414 bytes
-rw-r--r--plantlife_modpack/ferns/textures/not_in_use/ferns_fern_tree_bl.pngbin0 -> 554 bytes
-rw-r--r--plantlife_modpack/ferns/textures/not_in_use/ferns_fern_tree_br.pngbin0 -> 544 bytes
-rw-r--r--plantlife_modpack/ferns/textures/not_in_use/ferns_fern_trunk_big_crown.pngbin0 -> 681 bytes
-rw-r--r--plantlife_modpack/ferns/textures/old/archaeplantae_fern_old4.pngbin0 -> 368 bytes
-rw-r--r--plantlife_modpack/ferns/textures/old/comb.pngbin0 -> 112 bytes
-rw-r--r--plantlife_modpack/ferns/textures/old/ferns_5_old.pngbin0 -> 461 bytes
-rw-r--r--plantlife_modpack/ferns/textures/old/ferns_6_old.pngbin0 -> 700 bytes
-rw-r--r--plantlife_modpack/ferns/textures/old/ferns_7_old.pngbin0 -> 677 bytes
-rw-r--r--plantlife_modpack/ferns/textures/old/ferns_fern_big_old.pngbin0 -> 1147 bytes
-rw-r--r--plantlife_modpack/ferns/textures/old/ferns_fern_mid_old.pngbin0 -> 664 bytes
-rw-r--r--plantlife_modpack/ferns/textures/old/ferns_fern_tree_old.pngbin0 -> 1294 bytes
-rw-r--r--plantlife_modpack/ferns/textures/old/ferns_fern_trunk_big_old2.pngbin0 -> 669 bytes
-rw-r--r--plantlife_modpack/ferns/textures/old/ferns_fern_trunk_big_top_old.pngbin0 -> 814 bytes
-rw-r--r--plantlife_modpack/ferns/textures/old/ferns_fern_trunk_big_top_old2.pngbin0 -> 714 bytes
-rw-r--r--plantlife_modpack/ferns/textures/old/ferns_fern_trunk_top_old.pngbin0 -> 230 bytes
-rw-r--r--plantlife_modpack/ferns/textures/old/ferns_horsetail_01_old2.pngbin0 -> 177 bytes
-rw-r--r--plantlife_modpack/ferns/textures/old/ferns_horsetail_02_old2.pngbin0 -> 204 bytes
-rw-r--r--plantlife_modpack/ferns/textures/old/ferns_horsetail_03_old2.pngbin0 -> 251 bytes
-rw-r--r--plantlife_modpack/ferns/textures/old/ferns_horsetail_04_old2.pngbin0 -> 279 bytes
-rw-r--r--plantlife_modpack/ferns/textures/old/ferns_tree_fern_leave_big_cross_old.pngbin0 -> 712 bytes
-rw-r--r--plantlife_modpack/ferns/textures/old/ferns_tree_fern_leave_big_end_old.pngbin0 -> 457 bytes
-rw-r--r--plantlife_modpack/ferns/textures/old/ferns_tree_fern_leave_big_old.pngbin0 -> 522 bytes
-rw-r--r--plantlife_modpack/ferns/treefern.lua228
65 files changed, 1134 insertions, 0 deletions
diff --git a/plantlife_modpack/ferns/crafting.lua b/plantlife_modpack/ferns/crafting.lua
new file mode 100644
index 0000000..8d8b3ed
--- /dev/null
+++ b/plantlife_modpack/ferns/crafting.lua
@@ -0,0 +1,104 @@
+-----------------------------------------------------------------------------------------------
+-- Ferns - Crafting 0.0.5
+-----------------------------------------------------------------------------------------------
+-- (by Mossmanikin)
+-- License (everything): WTFPL
+-----------------------------------------------------------------------------------------------
+minetest.register_craft({
+ type = "shapeless",
+ output = "ferns:fiddlehead 3",
+ recipe = {"ferns:fern_01"},
+ replacements = {
+ {"ferns:fern_01", "ferns:ferntuber"}
+ },
+})
+
+minetest.register_craft({
+ type = "shapeless",
+ output = "ferns:fiddlehead 3",
+ recipe = {"ferns:tree_fern_leaves"},
+ replacements = {
+ {"ferns:tree_fern_leaves", "ferns:sapling_tree_fern"}
+ },
+})
+-----------------------------------------------------------------------------------------------
+-- FIDDLEHEAD
+-----------------------------------------------------------------------------------------------
+minetest.register_alias("archaeplantae:fiddlehead", "ferns:fiddlehead")
+
+minetest.register_craftitem("ferns:fiddlehead", {
+ description = "Fiddlehead",
+ inventory_image = "ferns_fiddlehead.png",
+ on_use = minetest.item_eat(-1), -- slightly poisonous when raw
+})
+minetest.register_craft({
+ type = "cooking",
+ output = "ferns:fiddlehead_roasted",
+ recipe = "ferns:fiddlehead",
+ cooktime = 1,
+})
+minetest.register_craftitem("ferns:fiddlehead_roasted", {
+ description = "Roasted Fiddlehead",
+ inventory_image = "ferns_fiddlehead_roasted.png",
+ on_use = minetest.item_eat(1), -- edible when cooked
+})
+-----------------------------------------------------------------------------------------------
+-- FERN TUBER
+-----------------------------------------------------------------------------------------------
+minetest.register_alias("archaeplantae:ferntuber", "ferns:ferntuber")
+
+minetest.register_craftitem("ferns:ferntuber", {
+ description = "Fern Tuber",
+ inventory_image = "ferns_ferntuber.png",
+})
+minetest.register_craft({
+ type = "cooking",
+ output = "ferns:ferntuber_roasted",
+ recipe = "ferns:ferntuber",
+ cooktime = 3,
+})
+
+minetest.register_alias("archaeplantae:ferntuber_roasted", "ferns:ferntuber_roasted")
+
+minetest.register_craftitem("ferns:ferntuber_roasted", {
+ description = "Roasted Fern Tuber",
+ inventory_image = "ferns_ferntuber_roasted.png",
+ on_use = minetest.item_eat(3),
+})
+-----------------------------------------------------------------------------------------------
+-- HORSETAIL (EQUISETUM) --> GREEN DYE https://en.wikipedia.org/wiki/Equisetum
+-----------------------------------------------------------------------------------------------
+minetest.register_craft({
+ type = "shapeless",
+ output = "dye:green",
+ recipe = {"group:horsetail"},
+})
+-----------------------------------------------------------------------------------------------
+-- GLUE WOODEN TOOLS with RESIN & POLISH them with HORSETAIL (planned)
+-----------------------------------------------------------------------------------------------
+--[[minetest.register_craft({
+ type = "shapeless",
+ output = "default:pick_wood",
+ recipe = {"default:pick_wood","group:horsetail","farming:string","default:stick"},
+})
+minetest.register_craft({
+ type = "shapeless",
+ output = "default:shovel_wood",
+ recipe = {"default:shovel_wood","group:horsetail","farming:string","default:stick"},
+})
+minetest.register_craft({
+ type = "shapeless",
+ output = "default:axe_wood",
+ recipe = {"default:axe_wood","group:horsetail","farming:string","default:stick"},
+})
+minetest.register_craft({
+ type = "shapeless",
+ output = "default:sword_wood",
+ recipe = {"default:sword_wood","group:horsetail","farming:string","default:stick"},
+})
+minetest.register_craft({
+ type = "shapeless",
+ output = "farming:hoe_wood",
+ recipe = {"farming:hoe_wood","group:horsetail","farming:string","default:stick"},
+})]]
+
diff --git a/plantlife_modpack/ferns/depends.txt b/plantlife_modpack/ferns/depends.txt
new file mode 100644
index 0000000..9d994c0
--- /dev/null
+++ b/plantlife_modpack/ferns/depends.txt
@@ -0,0 +1,2 @@
+default
+biome_lib \ No newline at end of file
diff --git a/plantlife_modpack/ferns/fern.lua b/plantlife_modpack/ferns/fern.lua
new file mode 100644
index 0000000..51cac8f
--- /dev/null
+++ b/plantlife_modpack/ferns/fern.lua
@@ -0,0 +1,196 @@
+-----------------------------------------------------------------------------------------------
+-- Ferns - Fern 0.1.0
+-----------------------------------------------------------------------------------------------
+-- by Mossmanikin
+-- License (everything): WTFPL
+-- Contains code from: biome_lib
+-- Looked at code from: default, flowers, painting, trees
+-- Dependencies: biome_lib
+-- Supports: dryplants, stoneage, sumpf
+-----------------------------------------------------------------------------------------------
+-- some inspiration from here
+-- https://en.wikipedia.org/wiki/Athyrium_yokoscense
+-- http://www.mygarden.net.au/gardening/athyrium-yokoscense/3900/1
+-----------------------------------------------------------------------------------------------
+
+assert(abstract_ferns.config.enable_lady_fern == true)
+
+-- Maintain backward compatibilty
+minetest.register_alias("archaeplantae:fern", "ferns:fern_03")
+minetest.register_alias("archaeplantae:fern_mid", "ferns:fern_02")
+minetest.register_alias("archaeplantae:fern_small", "ferns:fern_01")
+minetest.register_alias("ferns:fern_04", "ferns:fern_02") -- for placing
+
+local nodenames = {}
+
+local function create_nodes()
+ local images = { "ferns_fern.png", "ferns_fern_mid.png", "ferns_fern_big.png" }
+ local vscales = { 1, 2, 2.2 }
+ local descs = { "Lady-fern (Athyrium)", nil, nil }
+
+ for i = 1, 3 do
+ local node_on_place = nil
+ if i == 1 then
+ node_on_place = function(itemstack, placer, pointed_thing)
+ -- place a random fern
+ local stack = ItemStack("ferns:fern_0"..math.random(1,4))
+ local ret = minetest.item_place(stack, placer, pointed_thing)
+ return ItemStack("ferns:fern_01 "..itemstack:get_count()-(1-ret:get_count())) -- TODO FIXME?
+ end
+ end
+ nodenames[i] = "ferns:fern_"..string.format("%02d", i)
+ minetest.register_node(nodenames[i], {
+ description = descs[i] or ("Lady-fern (Athyrium) " .. string.format("%02d", i)),
+ inventory_image = "ferns_fern.png",
+ drawtype = "plantlike",
+ visual_scale = vscales[i],
+ paramtype = "light",
+ tiles = { images[i] },
+ walkable = false,
+ buildable_to = true,
+ groups = {snappy=3,flammable=2,attached_node=1,not_in_creative_inventory=1},
+ sounds = default.node_sound_leaves_defaults(),
+ selection_box = {
+ type = "fixed",
+ fixed = {-7/16, -1/2, -7/16, 7/16, 0, 7/16},
+ },
+ drop = "ferns:fern_01",
+ on_place = node_on_place
+ })
+ end
+end
+
+-----------------------------------------------------------------------------------------------
+-- Init
+-----------------------------------------------------------------------------------------------
+
+create_nodes()
+
+-----------------------------------------------------------------------------------------------
+-- Spawning
+-----------------------------------------------------------------------------------------------
+
+if abstract_ferns.config.lady_ferns_near_tree == true then
+ biome_lib:register_generate_plant({ -- near trees (woodlands)
+ surface = {
+ "default:dirt_with_grass",
+ "default:mossycobble",
+ "default:desert_sand",
+ "default:sand",
+ "default:jungletree",
+ "stoneage:grass_with_silex",
+ "sumpf:sumpf"
+ },
+ max_count = 30,
+ rarity = 62,--63,
+ min_elevation = 1, -- above sea level
+ near_nodes = {"group:tree"},
+ near_nodes_size = 3,--4,
+ near_nodes_vertical = 2,--3,
+ near_nodes_count = 1,
+ plantlife_limit = -0.9,
+ humidity_max = -1.0,
+ humidity_min = 0.4,
+ temp_max = -0.5, -- 55 °C (too hot?)
+ temp_min = 0.75, -- -12 °C
+ random_facedir = { 0, 179 },
+ },
+ nodenames
+ )
+end
+
+if abstract_ferns.config.lady_ferns_near_rock == true then
+ biome_lib:register_generate_plant({ -- near stone (mountains)
+ surface = {
+ "default:dirt_with_grass",
+ "default:mossycobble",
+ "group:falling_node",
+ --"default:jungletree",
+ "stoneage:grass_with_silex",
+ "sumpf:sumpf"
+ },
+ max_count = 35,
+ rarity = 40,
+ min_elevation = 1, -- above sea level
+ near_nodes = {"group:stone"},
+ near_nodes_size = 1,
+ near_nodes_count = 16,
+ plantlife_limit = -0.9,
+ humidity_max = -1.0,
+ humidity_min = 0.4,
+ temp_max = -0.5, -- 55 °C (too hot?)
+ temp_min = 0.75, -- -12 °C
+ random_facedir = { 0, 179 },
+ },
+ nodenames
+ )
+end
+
+if abstract_ferns.config.lady_ferns_near_ores == true then -- this one causes a huge fps drop
+ biome_lib:register_generate_plant({ -- near ores (potential mining sites)
+ surface = {
+ "default:dirt_with_grass",
+ "default:mossycobble",
+ "default:stone_with_coal",
+ "default:stone_with_iron",
+ "moreores:mineral_tin",
+ "moreores:mineral_silver",
+ "sumpf:sumpf"
+ },
+ max_count = 1200,--1600, -- maybe too much? :D
+ rarity = 25,--15,
+ min_elevation = 1, -- above sea level
+ near_nodes = {
+ "default:stone_with_iron",
+ --"default:stone_with_copper",
+ --"default:stone_with_mese",
+ --"default:stone_with_gold",
+ --"default:stone_with_diamond",
+ "moreores:mineral_tin",
+ "moreores:mineral_silver"
+ --"moreores:mineral_mithril"
+ },
+ near_nodes_size = 2,
+ near_nodes_vertical = 4,--5,--6,
+ near_nodes_count = 2,--3,
+ plantlife_limit = -0.9,
+ humidity_max = -1.0,
+ humidity_min = 0.4,
+ temp_max = -0.5, -- 55 °C (too hot?)
+ temp_min = 0.75, -- -12 °C
+ random_facedir = { 0, 179 },
+ },
+ nodenames
+ )
+end
+
+if abstract_ferns.config.lady_ferns_in_groups == true then -- this one is meant as a replacement of Ferns_near_Ores
+ biome_lib:register_generate_plant({
+ surface = {
+ "default:dirt_with_grass",
+ "default:mossycobble",
+ "default:stone_with_coal",
+ "default:stone_with_iron",
+ "moreores:mineral_tin",
+ "moreores:mineral_silver",
+ "sumpf:sumpf"
+ },
+ max_count = 70,
+ rarity = 25,--15,
+ min_elevation = 1, -- above sea level
+ near_nodes = {
+ "default:stone"
+ },
+ near_nodes_size = 2,
+ near_nodes_vertical = 2,--6,
+ near_nodes_count = 3,
+ plantlife_limit = -0.9,
+ humidity_max = -1.0,
+ humidity_min = 0.4,
+ temp_max = -0.5, -- 55 °C (too hot?)
+ temp_min = 0.75, -- -12 °C
+ random_facedir = { 0, 179 },
+ },
+ nodenames
+ )
+end
diff --git a/plantlife_modpack/ferns/gianttreefern.lua b/plantlife_modpack/ferns/gianttreefern.lua
new file mode 100644
index 0000000..bc6516b
--- /dev/null
+++ b/plantlife_modpack/ferns/gianttreefern.lua
@@ -0,0 +1,336 @@
+-----------------------------------------------------------------------------------------------
+-- Ferns - Giant Tree Fern 0.1.1
+-----------------------------------------------------------------------------------------------
+-- by Mossmanikin
+-- License (everything): WTFPL
+-- Contains code from: biome_lib
+-- Looked at code from: 4seasons, default
+-- Supports: vines
+-----------------------------------------------------------------------------------------------
+
+assert(abstract_ferns.config.enable_giant_treefern == true)
+
+-- lot of code, lot to load
+
+abstract_ferns.grow_giant_tree_fern = function(pos)
+ local pos_01 = {x = pos.x, y = pos.y + 1, z = pos.z}
+ if minetest.get_node(pos_01).name ~= "air"
+ and minetest.get_node(pos_01).name ~= "ferns:sapling_giant_tree_fern"
+ and minetest.get_node(pos_01).name ~= "default:junglegrass" then
+ return
+ end
+
+ local size = math.random(12,16) -- min of range must be >= 4
+
+ local leafchecks = {
+ {
+ direction = 3,
+ positions = {
+ {x = pos.x + 1, y = pos.y + size - 1, z = pos.z },
+ {x = pos.x + 2, y = pos.y + size , z = pos.z },
+ {x = pos.x + 3, y = pos.y + size - 1, z = pos.z },
+ {x = pos.x + 4, y = pos.y + size - 2, z = pos.z }
+ }
+ },
+ {
+ direction = 1,
+ positions = {
+ {x = pos.x - 1, y = pos.y + size - 1, z = pos.z },
+ {x = pos.x - 2, y = pos.y + size, z = pos.z },
+ {x = pos.x - 3, y = pos.y + size - 1, z = pos.z },
+ {x = pos.x - 4, y = pos.y + size - 2, z = pos.z }
+ }
+ },
+ {
+ direction = 2,
+ positions = {
+ {x = pos.x , y = pos.y + size - 1, z = pos.z + 1},
+ {x = pos.x , y = pos.y + size , z = pos.z + 2},
+ {x = pos.x , y = pos.y + size - 1, z = pos.z + 3},
+ {x = pos.x , y = pos.y + size - 2, z = pos.z + 4}
+ }
+ },
+ {
+ direction = 0,
+ positions = {
+ {x = pos.x , y = pos.y + size - 1, z = pos.z - 1},
+ {x = pos.x , y = pos.y + size , z = pos.z - 2},
+ {x = pos.x , y = pos.y + size - 1, z = pos.z - 3},
+ {x = pos.x , y = pos.y + size - 2, z = pos.z - 4}
+ }
+ }
+ }
+
+ for i = 1, size-3 do
+ minetest.set_node({x = pos.x, y = pos.y + i, z = pos.z}, {name="ferns:fern_trunk_big"})
+ end
+ minetest.set_node({x = pos.x, y = pos.y + size-2, z = pos.z}, {name="ferns:fern_trunk_big_top"})
+ minetest.set_node({x = pos.x, y = pos.y + size-1, z = pos.z}, {name="ferns:tree_fern_leaves_giant"})
+
+ -- all the checking for air below is to prevent some ugly bugs (incomplete trunks of neighbouring trees), it's a bit slower, but worth the result
+
+ -- assert(#leafchecks == 4)
+ for i = 1, 4 do
+ local positions = leafchecks[i].positions
+ local rot = leafchecks[i].direction
+ local endpos = 4 -- If the loop below adds all intermediate leaves then the "terminating" leaf will be at positions[4]
+ -- assert(#positions == 4)
+ -- add leaves so long as the destination nodes are air
+ for j = 1, 3 do
+ if minetest.get_node(positions[j]).name == "air" then
+ minetest.set_node(positions[j], {name="ferns:tree_fern_leave_big"})
+ else
+ endpos = j
+ break
+ end
+ end
+ -- add the terminating leaf if required and possible
+ if endpos == 4 and minetest.get_node(positions[endpos]).name == "air" then
+ minetest.set_node(positions[endpos], {name="ferns:tree_fern_leave_big_end", param2=rot})
+ end
+ end
+end
+
+-----------------------------------------------------------------------------------------------
+-- GIANT TREE FERN LEAVES
+-----------------------------------------------------------------------------------------------
+minetest.register_node("ferns:tree_fern_leaves_giant", {
+ description = "Tree Fern Crown (Dicksonia)",
+ drawtype = "plantlike",
+ visual_scale = math.sqrt(8),
+ wield_scale = {x=0.175, y=0.175, z=0.175},
+ paramtype = "light",
+ tiles = {"ferns_fern_tree_giant.png"},
+ inventory_image = "ferns_fern_tree.png",
+ walkable = false,
+ groups = {
+ snappy=3,
+ flammable=2,
+ attached_node=1,
+ not_in_creative_inventory=1
+ },
+ drop = {
+ max_items = 2,
+ items = {
+ {
+ -- occasionally, drop a second sapling instead of leaves
+ -- (extra saplings can also be obtained by replanting and
+ -- reharvesting leaves)
+ items = {"ferns:sapling_giant_tree_fern"},
+ rarity = 10,
+ },
+ {
+ items = {"ferns:sapling_giant_tree_fern"},
+ },
+ {
+ items = {"ferns:tree_fern_leaves_giant"},
+ }
+ }
+ },
+ sounds = default.node_sound_leaves_defaults(),
+ selection_box = {
+ type = "fixed",
+ fixed = {-7/16, -1/2, -7/16, 7/16, 0, 7/16},
+ },
+})
+-----------------------------------------------------------------------------------------------
+-- GIANT TREE FERN LEAVE PART
+-----------------------------------------------------------------------------------------------
+minetest.register_node("ferns:tree_fern_leave_big", {
+ description = "Giant Tree Fern Leaves",
+ drawtype = "raillike",
+ paramtype = "light",
+ tiles = {
+ "ferns_tree_fern_leave_big.png",
+ },
+ walkable = false,
+ groups = {
+ snappy=3,
+ flammable=2,
+ attached_node=1,
+ not_in_creative_inventory=1
+ },
+ drop = "",
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+-----------------------------------------------------------------------------------------------
+-- GIANT TREE FERN LEAVE END
+-----------------------------------------------------------------------------------------------
+minetest.register_node("ferns:tree_fern_leave_big_end", {
+ description = "Giant Tree Fern Leave End",
+ drawtype = "nodebox",
+ paramtype = "light",
+ paramtype2 = "facedir",
+ tiles = { "ferns_tree_fern_leave_big_end.png" },
+ walkable = false,
+ node_box = {
+ type = "fixed",
+-- {left, bottom, front, right, top, back }
+ fixed = {-1/2, -1/2, 1/2, 1/2, 33/64, 1/2},
+ },
+ selection_box = {
+ type = "fixed",
+ fixed = {-1/2, -1/2, 1/2, 1/2, 33/64, 1/2},
+ },
+ groups = {
+ snappy=3,
+ flammable=2,
+ attached_node=1,
+ not_in_creative_inventory=1
+ },
+ drop = "",
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+-----------------------------------------------------------------------------------------------
+-- GIANT TREE FERN TRUNK TOP
+-----------------------------------------------------------------------------------------------
+minetest.register_node("ferns:fern_trunk_big_top", {
+ description = "Giant Fern Trunk",
+ drawtype = "nodebox",
+ paramtype = "light",
+ tiles = {
+ "ferns_fern_trunk_big_top.png^ferns_tree_fern_leave_big_cross.png",
+ "ferns_fern_trunk_big_top.png^ferns_tree_fern_leave_big_cross.png",
+ "ferns_fern_trunk_big.png"
+ },
+ node_box = {
+ type = "fixed",
+-- {left, bottom, front, right, top, back }
+ fixed = {
+ {-1/2, 33/64, -1/2, 1/2, 33/64, 1/2},
+ {-1/4, -1/2, -1/4, 1/4, 1/2, 1/4},
+ }
+ },
+ selection_box = {
+ type = "fixed",
+ fixed = {-1/4, -1/2, -1/4, 1/4, 1/2, 1/4},
+ },
+ groups = {
+ tree=1,
+ choppy=2,
+ oddly_breakable_by_hand=2,
+ flammable=3,
+ wood=1,
+ not_in_creative_inventory=1,
+ leafdecay=3 -- to support vines
+ },
+ drop = "ferns:fern_trunk_big",
+ sounds = default.node_sound_wood_defaults(),
+})
+
+-----------------------------------------------------------------------------------------------
+-- GIANT TREE FERN TRUNK
+-----------------------------------------------------------------------------------------------
+minetest.register_node("ferns:fern_trunk_big", {
+ description = "Giant Fern Trunk",
+ drawtype = "nodebox",
+ paramtype = "light",
+ tiles = {
+ "ferns_fern_trunk_big_top.png",
+ "ferns_fern_trunk_big_top.png",
+ "ferns_fern_trunk_big.png"
+ },
+ node_box = {
+ type = "fixed",
+ fixed = {-1/4, -1/2, -1/4, 1/4, 1/2, 1/4},
+ },
+ selection_box = {
+ type = "fixed",
+ fixed = {-1/4, -1/2, -1/4, 1/4, 1/2, 1/4},
+ },
+ groups = {tree=1,choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
+ sounds = default.node_sound_wood_defaults(),
+ after_destruct = function(pos,oldnode)
+ local node = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z})
+ if node.name == "ferns:fern_trunk_big" or node.name == "ferns:fern_trunk_big_top" then
+ minetest.dig_node({x=pos.x,y=pos.y+1,z=pos.z})
+ minetest.add_item(pos,"ferns:fern_trunk_big")
+ end
+ end,
+})
+
+-----------------------------------------------------------------------------------------------
+-- GIANT TREE FERN SAPLING
+-----------------------------------------------------------------------------------------------
+minetest.register_node("ferns:sapling_giant_tree_fern", {
+ description = "Giant Tree Fern Sapling",
+ drawtype = "plantlike",
+ paramtype = "light",
+ tiles = {"ferns_sapling_tree_fern_giant.png"},
+ inventory_image = "ferns_sapling_tree_fern_giant.png",
+ walkable = false,
+ groups = {snappy=3,flammable=2,flora=1,attached_node=1},
+ sounds = default.node_sound_leaves_defaults(),
+ selection_box = {
+ type = "fixed",
+ fixed = {-7/16, -1/2, -7/16, 7/16, 0, 7/16},
+ },
+})
+
+-- abm
+minetest.register_abm({
+ nodenames = "ferns:sapling_giant_tree_fern",
+ interval = 1000,
+ chance = 4,
+ action = function(pos, node, _, _)
+ abstract_ferns.grow_giant_tree_fern({x = pos.x, y = pos.y-1, z = pos.z})
+ end
+})
+
+-----------------------------------------------------------------------------------------------
+-- GENERATE GIANT TREE FERN
+-----------------------------------------------------------------------------------------------
+
+-- in jungles
+if abstract_ferns.config.enable_giant_treeferns_in_jungle == true then
+ biome_lib:register_generate_plant({
+ surface = {
+ "default:dirt_with_grass",
+ "default:sand",
+ "default:desert_sand"--,
+ --"dryplants:grass_short"
+ },
+ max_count = 12,--27,
+ avoid_nodes = {"group:tree"},
+ avoid_radius = 3,--4,
+ rarity = 85,
+ seed_diff = 329,
+ min_elevation = 1,
+ near_nodes = {"default:jungletree"},
+ near_nodes_size = 6,
+ near_nodes_vertical = 2,--4,
+ near_nodes_count = 1,
+ plantlife_limit = -0.9,
+ },
+ abstract_ferns.grow_giant_tree_fern
+ )
+end
+
+-- for oases & tropical beaches
+if abstract_ferns.config.enable_giant_treeferns_in_oases == true then
+ biome_lib:register_generate_plant({
+ surface = {
+ "default:sand"--,
+ --"default:desert_sand"
+ },
+ max_count = 10,--27,
+ rarity = 90,
+ seed_diff = 329,
+ neighbors = {"default:desert_sand"},
+ ncount = 1,
+ min_elevation = 1,
+ near_nodes = {"default:water_source"},
+ near_nodes_size = 2,
+ near_nodes_vertical = 1,
+ near_nodes_count = 1,
+ plantlife_limit = -0.9,
+ humidity_max = -1.0,
+ humidity_min = 1.0,
+ temp_max = -1.0,
+ temp_min = 1.0,
+ },
+ abstract_ferns.grow_giant_tree_fern
+ )
+end
diff --git a/plantlife_modpack/ferns/horsetail.lua b/plantlife_modpack/ferns/horsetail.lua
new file mode 100644
index 0000000..b87f1f9
--- /dev/null
+++ b/plantlife_modpack/ferns/horsetail.lua
@@ -0,0 +1,156 @@
+-----------------------------------------------------------------------------------------------
+-- Archae Plantae - Horsetail 0.0.5
+-----------------------------------------------------------------------------------------------
+-- by Mossmanikin
+-- License (everything): WTFPL
+-- Contains code from: biome_lib
+-- Looked at code from: default, flowers, trees
+-- Dependencies: biome_lib
+-- Supports: dryplants, stoneage, sumpf
+-----------------------------------------------------------------------------------------------
+
+assert(abstract_ferns.config.enable_horsetails == true)
+
+-----------------------------------------------------------------------------------------------
+-- HORSETAIL (EQUISETUM)
+-----------------------------------------------------------------------------------------------
+
+local node_names = {}
+
+local function create_nodes()
+ local selection_boxes = {
+ { -0.15, -1/2, -0.15, 0.15, -1/16, 0.15 },
+ { -0.15, -1/2, -0.15, 0.15, 1/16, 0.15 },
+ { -0.15, -1/2, -0.15, 0.15, 4/16, 0.15 },
+ { -0.15, -1/2, -0.15, 0.15, 7/16, 0.15 },
+ }
+
+ for i = 1, 4 do
+ local node_name = "ferns:horsetail_" .. string.format("%02d", i)
+ local node_img = "ferns_horsetail_" .. string.format("%02d", i) .. ".png"
+ local node_desc
+ local node_on_use = nil
+ local node_drop = "ferns:horsetail_04"
+
+ if i == 1 then
+ node_desc = "Young Horsetail (Equisetum)"
+ node_on_use = minetest.item_eat(1) -- young ones edible https://en.wikipedia.org/wiki/Equisetum
+ node_drop = node_name
+ elseif i == 4 then
+ node_desc = "Horsetail (Equisetum)"
+ else
+ node_desc = "Horsetail (Equisetum) ".. string.format("%02d", i)
+ end
+
+ node_names[i] = node_name
+
+ minetest.register_node(node_name, {
+ description = node_desc,
+ drawtype = "plantlike",
+ paramtype = "light",
+ tiles = { node_img },
+ inventory_image = node_img,
+ walkable = false,
+ buildable_to = true,
+ groups = {snappy=3,flammable=2,attached_node=1,horsetail=1},
+ sounds = default.node_sound_leaves_defaults(),
+ selection_box = {
+ type = "fixed",
+ fixed = selection_boxes[i],
+ },
+ on_use = node_on_use,
+ drop = node_drop,
+ })
+ end
+end
+
+-----------------------------------------------------------------------------------------------
+-- Init
+-----------------------------------------------------------------------------------------------
+
+create_nodes()
+
+-----------------------------------------------------------------------------------------------
+-- Spawning
+-----------------------------------------------------------------------------------------------
+if abstract_ferns.config.enable_horsetails_spawning == true then
+ biome_lib:spawn_on_surfaces({
+ spawn_delay = 1200,
+ spawn_plants = node_names,
+ spawn_chance = 400,
+ spawn_surfaces = {
+ "default:dirt_with_grass",
+ "default:desert_sand",
+ "default:sand",
+ "dryplants:grass_short",
+ "stoneage:grass_with_silex",
+ "default:mossycobble",
+ "default:gravel"
+ },
+ seed_diff = 329,
+ min_elevation = 1, -- above sea level
+ near_nodes = {"default:water_source","default:gravel"},
+ near_nodes_size = 2,
+ near_nodes_vertical = 1,
+ near_nodes_count = 1,
+ --random_facedir = { 0, 179 },
+ })
+end
+
+-----------------------------------------------------------------------------------------------
+-- Generating
+-----------------------------------------------------------------------------------------------
+
+if abstract_ferns.config.enable_horsetails_on_grass == true then
+ biome_lib:register_generate_plant({
+ surface = {
+ "default:dirt_with_grass",
+ "sumpf:sumpf"
+ },
+ max_count = 35,
+ rarity = 40,
+ min_elevation = 1, -- above sea level
+ near_nodes = {
+ "group:water", -- likes water (of course)
+ "default:gravel", -- near those on gravel
+ "default:sand", -- some like sand
+ "default:clay", -- some like clay
+ "stoneage:grass_with_silex",
+ "default:mossycobble",
+ "default:cobble",
+ "sumpf:sumpf"
+ },
+ near_nodes_size = 3,
+ near_nodes_vertical = 2,--3,
+ near_nodes_count = 1,
+ plantlife_limit = -0.9,
+ humidity_min = 0.4,
+ temp_max = -0.5, -- 55 °C
+ temp_min = 0.53, -- 0 °C, dies back in winter
+ --random_facedir = { 0, 179 },
+ },
+ node_names
+ )
+end
+
+if abstract_ferns.config.enable_horsetails_on_stones == true then
+ biome_lib:register_generate_plant({
+ surface = {
+ "default:gravel", -- roots go deep
+ "default:mossycobble",
+ "stoneage:dirt_with_silex",
+ "stoneage:grass_with_silex",
+ "stoneage:sand_with_silex", -- roots go deep
+ },
+ max_count = 35,
+ rarity = 20,
+ min_elevation = 1, -- above sea level
+ plantlife_limit = -0.9,
+ humidity_min = 0.4,
+ temp_max = -0.5, -- 55 °C
+ temp_min = 0.53, -- 0 °C, dies back in winter
+ --random_facedir = { 0, 179 },
+ },
+ node_names
+ )
+end
diff --git a/plantlife_modpack/ferns/init.lua b/plantlife_modpack/ferns/init.lua
new file mode 100644
index 0000000..b629d5d
--- /dev/null
+++ b/plantlife_modpack/ferns/init.lua
@@ -0,0 +1,69 @@
+-----------------------------------------------------------------------------------------------
+local title = "Ferns" -- former "Archae Plantae"
+local version = "0.2.0"
+local mname = "ferns" -- former "archaeplantae"
+-----------------------------------------------------------------------------------------------
+-- (by Mossmanikin)
+-- License (everything): WTFPL
+-----------------------------------------------------------------------------------------------
+
+abstract_ferns = {}
+
+dofile(minetest.get_modpath("ferns").."/settings.lua")
+
+if abstract_ferns.config.enable_lady_fern == true then
+ dofile(minetest.get_modpath("ferns").."/fern.lua")
+end
+
+if abstract_ferns.config.enable_horsetails == true then
+ dofile(minetest.get_modpath("ferns").."/horsetail.lua")
+end
+
+if abstract_ferns.config.enable_treefern == true then
+ dofile(minetest.get_modpath("ferns").."/treefern.lua")
+end
+
+if abstract_ferns.config.enable_giant_treefern == true then
+ dofile(minetest.get_modpath("ferns").."/gianttreefern.lua")
+end
+
+dofile(minetest.get_modpath("ferns").."/crafting.lua")
+
+
+-----------------------------------------------------------------------------
+-- TESTS
+-----------------------------------------------------------------------------
+local run_tests = true -- set to false to skip
+
+if run_tests then
+
+ -- These are, essentially, unit tests to make sure that all required item
+ -- strings are registered. The init sequence is not time critical so leaving
+ -- them here won't affect performance.
+
+ -- Check node names
+ if abstract_ferns.config.enable_horsetails then
+ print("[Mod] " ..title.. " Checking horsetail item strings")
+ assert(minetest.registered_items["ferns:horsetail_01"] ~= nil)
+ assert(minetest.registered_items["ferns:horsetail_02"] ~= nil)
+ assert(minetest.registered_items["ferns:horsetail_03"] ~= nil)
+ assert(minetest.registered_items["ferns:horsetail_04"] ~= nil)
+ end
+ if abstract_ferns.config.enable_lady_fern then
+ print("[Mod] ".. title .." Checking lady fern item strings")
+ assert(minetest.registered_items["ferns:fern_01"] ~= nil)
+ assert(minetest.registered_items["ferns:fern_02"] ~= nil)
+ assert(minetest.registered_items["ferns:fern_03"] ~= nil)
+ end
+ if abstract_ferns.config.enable_treefern then
+ print("[Mod] ".. title .." Checking tree fern item strings")
+ assert(minetest.registered_items["ferns:tree_fern_leaves"] ~= nil)
+ assert(minetest.registered_items["ferns:tree_fern_leaves_02"] ~= nil)
+ assert(minetest.registered_items["ferns:fern_trunk"] ~= nil)
+ assert(minetest.registered_items["ferns:sapling_tree_fern"] ~= nil)
+ end
+end
+
+-----------------------------------------------------------------------------------------------
+print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...")
+-----------------------------------------------------------------------------------------------
diff --git a/plantlife_modpack/ferns/settings.lua b/plantlife_modpack/ferns/settings.lua
new file mode 100644
index 0000000..8254fcf
--- /dev/null
+++ b/plantlife_modpack/ferns/settings.lua
@@ -0,0 +1,43 @@
+-- In case you don't wanna have errors:
+
+-- Only change what's behind a "=" (or "--").
+-- Don't use caps (behind a "=").
+
+-- If there's a "false" (behind a "=") you can change it to "true" (and the other way around).
+-- Spelling is important.
+-- If "true" or "false" is necessary as setting, everything(!) which is not spelled "true" will be read as if it were "false" (even "1", "True"...)
+
+-- If you wanna comment something (for example to remember the default value), you can do this by putting "--" in front of the comment.
+-- You can put "--" at the end of a line with "=" in it, or at the beginning of an empty/new line (minetest will ignore what's behind it then).
+-- But don't put "--" in front of a line with "=" in it (or else minetest will ignore the setting and you might get an error).
+
+-- If something is still unclear, don't hesitate to post your question @ https://forum.minetest.net/viewtopic.php?id=6921
+
+abstract_ferns.config = {}
+
+-- Which plants should generate/spawn?
+abstract_ferns.config.enable_lady_fern = true
+abstract_ferns.config.enable_horsetails = true
+abstract_ferns.config.enable_treefern = true
+abstract_ferns.config.enable_giant_treefern = true
+
+-- Where should they generate/spawn? (if they generate/spawn)
+--
+-- Lady-Fern
+abstract_ferns.config.lady_ferns_near_tree = true
+abstract_ferns.config.lady_ferns_near_rock = true
+abstract_ferns.config.lady_ferns_near_ores = true -- if there's a bunch of ferns there's ores nearby, this one causes a huge fps drop
+abstract_ferns.config.lady_ferns_in_groups = false -- this one is meant as a replacement of Ferns_near_Ores: ferns tend to generate in groups, less fps drop, no hint for nearby ores
+--
+-- Horsetails
+abstract_ferns.config.enable_horsetails_spawning = false -- horsetails will grow in already explored areas, over time, near water or gravel
+abstract_ferns.config.enable_horsetails_on_grass = true -- on dirt with grass and swamp (sumpf mod)
+abstract_ferns.config.enable_horsetails_on_stones = true -- on gravel, mossy cobble and silex (stoneage mod)
+--
+-- Tree_Fern
+abstract_ferns.config.enable_treeferns_in_jungle = true
+abstract_ferns.config.enable_treeferns_in_oases = true -- for oases and tropical beaches
+--
+-- Giant_Tree_Fern
+abstract_ferns.config.enable_giant_treeferns_in_jungle = true
+abstract_ferns.config.enable_giant_treeferns_in_oases = true -- for oases and tropical beaches
diff --git a/plantlife_modpack/ferns/textures/ferns_5.png b/plantlife_modpack/ferns/textures/ferns_5.png
new file mode 100644
index 0000000..7e40665
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/ferns_5.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/ferns_6.png b/plantlife_modpack/ferns/textures/ferns_6.png
new file mode 100644
index 0000000..107bbf6
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/ferns_6.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/ferns_7.png b/plantlife_modpack/ferns/textures/ferns_7.png
new file mode 100644
index 0000000..b1ac1f5
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/ferns_7.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/ferns_8.png b/plantlife_modpack/ferns/textures/ferns_8.png
new file mode 100644
index 0000000..db5510b
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/ferns_8.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/ferns_fern.png b/plantlife_modpack/ferns/textures/ferns_fern.png
new file mode 100644
index 0000000..7884e5a
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/ferns_fern.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/ferns_fern_big.png b/plantlife_modpack/ferns/textures/ferns_fern_big.png
new file mode 100644
index 0000000..42deb95
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/ferns_fern_big.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/ferns_fern_mid.png b/plantlife_modpack/ferns/textures/ferns_fern_mid.png
new file mode 100644
index 0000000..3213308
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/ferns_fern_mid.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/ferns_fern_tree.png b/plantlife_modpack/ferns/textures/ferns_fern_tree.png
new file mode 100644
index 0000000..8daeafd
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/ferns_fern_tree.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/ferns_fern_tree_giant.png b/plantlife_modpack/ferns/textures/ferns_fern_tree_giant.png
new file mode 100644
index 0000000..2e3adb7
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/ferns_fern_tree_giant.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/ferns_fern_tree_inv.png b/plantlife_modpack/ferns/textures/ferns_fern_tree_inv.png
new file mode 100644
index 0000000..5417669
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/ferns_fern_tree_inv.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/ferns_fern_tree_tl.png b/plantlife_modpack/ferns/textures/ferns_fern_tree_tl.png
new file mode 100644
index 0000000..16b6e3a
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/ferns_fern_tree_tl.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/ferns_fern_tree_tr.png b/plantlife_modpack/ferns/textures/ferns_fern_tree_tr.png
new file mode 100644
index 0000000..768430f
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/ferns_fern_tree_tr.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/ferns_fern_trunk.png b/plantlife_modpack/ferns/textures/ferns_fern_trunk.png
new file mode 100644
index 0000000..a8e1bf6
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/ferns_fern_trunk.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/ferns_fern_trunk_big.png b/plantlife_modpack/ferns/textures/ferns_fern_trunk_big.png
new file mode 100644
index 0000000..24ede0a
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/ferns_fern_trunk_big.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/ferns_fern_trunk_big_top.png b/plantlife_modpack/ferns/textures/ferns_fern_trunk_big_top.png
new file mode 100644
index 0000000..3e3c829
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/ferns_fern_trunk_big_top.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/ferns_fern_trunk_top.png b/plantlife_modpack/ferns/textures/ferns_fern_trunk_top.png
new file mode 100644
index 0000000..8b259cc
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/ferns_fern_trunk_top.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/ferns_ferntuber.png b/plantlife_modpack/ferns/textures/ferns_ferntuber.png
new file mode 100644
index 0000000..2d6785d
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/ferns_ferntuber.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/ferns_ferntuber_roasted.png b/plantlife_modpack/ferns/textures/ferns_ferntuber_roasted.png
new file mode 100644
index 0000000..f62a88d
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/ferns_ferntuber_roasted.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/ferns_fiddlehead.png b/plantlife_modpack/ferns/textures/ferns_fiddlehead.png
new file mode 100644
index 0000000..0925c78
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/ferns_fiddlehead.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/ferns_fiddlehead_roasted.png b/plantlife_modpack/ferns/textures/ferns_fiddlehead_roasted.png
new file mode 100644
index 0000000..9f4943c
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/ferns_fiddlehead_roasted.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/ferns_horsetail_01.png b/plantlife_modpack/ferns/textures/ferns_horsetail_01.png
new file mode 100644
index 0000000..60d3ca6
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/ferns_horsetail_01.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/ferns_horsetail_02.png b/plantlife_modpack/ferns/textures/ferns_horsetail_02.png
new file mode 100644
index 0000000..3c7edf7
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/ferns_horsetail_02.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/ferns_horsetail_03.png b/plantlife_modpack/ferns/textures/ferns_horsetail_03.png
new file mode 100644
index 0000000..5d28a46
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/ferns_horsetail_03.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/ferns_horsetail_04.png b/plantlife_modpack/ferns/textures/ferns_horsetail_04.png
new file mode 100644
index 0000000..a8254ed
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/ferns_horsetail_04.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/ferns_sapling_tree_fern.png b/plantlife_modpack/ferns/textures/ferns_sapling_tree_fern.png
new file mode 100644
index 0000000..b459d48
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/ferns_sapling_tree_fern.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/ferns_sapling_tree_fern_giant.png b/plantlife_modpack/ferns/textures/ferns_sapling_tree_fern_giant.png
new file mode 100644
index 0000000..e556016
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/ferns_sapling_tree_fern_giant.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/ferns_tree_fern_leave_big.png b/plantlife_modpack/ferns/textures/ferns_tree_fern_leave_big.png
new file mode 100644
index 0000000..09cc001
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/ferns_tree_fern_leave_big.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/ferns_tree_fern_leave_big_cross.png b/plantlife_modpack/ferns/textures/ferns_tree_fern_leave_big_cross.png
new file mode 100644
index 0000000..48f7e2c
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/ferns_tree_fern_leave_big_cross.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/ferns_tree_fern_leave_big_end.png b/plantlife_modpack/ferns/textures/ferns_tree_fern_leave_big_end.png
new file mode 100644
index 0000000..d0064fe
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/ferns_tree_fern_leave_big_end.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/not_in_use/archaeplantae_horsetails.png b/plantlife_modpack/ferns/textures/not_in_use/archaeplantae_horsetails.png
new file mode 100644
index 0000000..6ba89c1
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/not_in_use/archaeplantae_horsetails.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/not_in_use/big picture 3.png b/plantlife_modpack/ferns/textures/not_in_use/big picture 3.png
new file mode 100644
index 0000000..de344e6
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/not_in_use/big picture 3.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_big_left.png b/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_big_left.png
new file mode 100644
index 0000000..0fdf515
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_big_left.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_big_right.png b/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_big_right.png
new file mode 100644
index 0000000..d30def0
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_big_right.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_mid_left.png b/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_mid_left.png
new file mode 100644
index 0000000..d146df3
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_mid_left.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_mid_right.png b/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_mid_right.png
new file mode 100644
index 0000000..e10460a
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_mid_right.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_tree_bl.png b/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_tree_bl.png
new file mode 100644
index 0000000..e2fdb67
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_tree_bl.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_tree_br.png b/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_tree_br.png
new file mode 100644
index 0000000..eb547e8
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_tree_br.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_trunk_big_crown.png b/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_trunk_big_crown.png
new file mode 100644
index 0000000..7a12671
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/not_in_use/ferns_fern_trunk_big_crown.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/old/archaeplantae_fern_old4.png b/plantlife_modpack/ferns/textures/old/archaeplantae_fern_old4.png
new file mode 100644
index 0000000..a3d403c
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/old/archaeplantae_fern_old4.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/old/comb.png b/plantlife_modpack/ferns/textures/old/comb.png
new file mode 100644
index 0000000..ea1e19f
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/old/comb.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/old/ferns_5_old.png b/plantlife_modpack/ferns/textures/old/ferns_5_old.png
new file mode 100644
index 0000000..5676278
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/old/ferns_5_old.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/old/ferns_6_old.png b/plantlife_modpack/ferns/textures/old/ferns_6_old.png
new file mode 100644
index 0000000..36d6040
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/old/ferns_6_old.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/old/ferns_7_old.png b/plantlife_modpack/ferns/textures/old/ferns_7_old.png
new file mode 100644
index 0000000..8aabe61
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/old/ferns_7_old.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/old/ferns_fern_big_old.png b/plantlife_modpack/ferns/textures/old/ferns_fern_big_old.png
new file mode 100644
index 0000000..d17ed11
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/old/ferns_fern_big_old.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/old/ferns_fern_mid_old.png b/plantlife_modpack/ferns/textures/old/ferns_fern_mid_old.png
new file mode 100644
index 0000000..08513c2
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/old/ferns_fern_mid_old.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/old/ferns_fern_tree_old.png b/plantlife_modpack/ferns/textures/old/ferns_fern_tree_old.png
new file mode 100644
index 0000000..4599672
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/old/ferns_fern_tree_old.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/old/ferns_fern_trunk_big_old2.png b/plantlife_modpack/ferns/textures/old/ferns_fern_trunk_big_old2.png
new file mode 100644
index 0000000..a048ee0
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/old/ferns_fern_trunk_big_old2.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/old/ferns_fern_trunk_big_top_old.png b/plantlife_modpack/ferns/textures/old/ferns_fern_trunk_big_top_old.png
new file mode 100644
index 0000000..d83151f
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/old/ferns_fern_trunk_big_top_old.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/old/ferns_fern_trunk_big_top_old2.png b/plantlife_modpack/ferns/textures/old/ferns_fern_trunk_big_top_old2.png
new file mode 100644
index 0000000..244ddfe
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/old/ferns_fern_trunk_big_top_old2.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/old/ferns_fern_trunk_top_old.png b/plantlife_modpack/ferns/textures/old/ferns_fern_trunk_top_old.png
new file mode 100644
index 0000000..872fdab
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/old/ferns_fern_trunk_top_old.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/old/ferns_horsetail_01_old2.png b/plantlife_modpack/ferns/textures/old/ferns_horsetail_01_old2.png
new file mode 100644
index 0000000..7d55718
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/old/ferns_horsetail_01_old2.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/old/ferns_horsetail_02_old2.png b/plantlife_modpack/ferns/textures/old/ferns_horsetail_02_old2.png
new file mode 100644
index 0000000..d0b5563
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/old/ferns_horsetail_02_old2.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/old/ferns_horsetail_03_old2.png b/plantlife_modpack/ferns/textures/old/ferns_horsetail_03_old2.png
new file mode 100644
index 0000000..42cf76e
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/old/ferns_horsetail_03_old2.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/old/ferns_horsetail_04_old2.png b/plantlife_modpack/ferns/textures/old/ferns_horsetail_04_old2.png
new file mode 100644
index 0000000..600ebe7
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/old/ferns_horsetail_04_old2.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/old/ferns_tree_fern_leave_big_cross_old.png b/plantlife_modpack/ferns/textures/old/ferns_tree_fern_leave_big_cross_old.png
new file mode 100644
index 0000000..00ec9d8
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/old/ferns_tree_fern_leave_big_cross_old.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/old/ferns_tree_fern_leave_big_end_old.png b/plantlife_modpack/ferns/textures/old/ferns_tree_fern_leave_big_end_old.png
new file mode 100644
index 0000000..ce1a87d
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/old/ferns_tree_fern_leave_big_end_old.png
Binary files differ
diff --git a/plantlife_modpack/ferns/textures/old/ferns_tree_fern_leave_big_old.png b/plantlife_modpack/ferns/textures/old/ferns_tree_fern_leave_big_old.png
new file mode 100644
index 0000000..b568383
--- /dev/null
+++ b/plantlife_modpack/ferns/textures/old/ferns_tree_fern_leave_big_old.png
Binary files differ
diff --git a/plantlife_modpack/ferns/treefern.lua b/plantlife_modpack/ferns/treefern.lua
new file mode 100644
index 0000000..4ba502b
--- /dev/null
+++ b/plantlife_modpack/ferns/treefern.lua
@@ -0,0 +1,228 @@
+-----------------------------------------------------------------------------------------------
+-- Ferns - Tree Fern 0.1.1
+-----------------------------------------------------------------------------------------------
+-- by Mossmanikin
+-- License (everything): WTFPL
+-- Contains code from: biome_lib
+-- Looked at code from: default , trees
+-----------------------------------------------------------------------------------------------
+
+assert(abstract_ferns.config.enable_treefern == true)
+
+abstract_ferns.grow_tree_fern = function(pos)
+
+ local pos_01 = {x = pos.x, y = pos.y + 1, z = pos.z}
+ if minetest.get_node(pos_01).name ~= "air"
+ and minetest.get_node(pos_01).name ~= "ferns:sapling_tree_fern"
+ and minetest.get_node(pos_01).name ~= "default:junglegrass" then
+ return
+ end
+
+ local size = math.random(1, 4) + math.random(1, 4)
+ if (size > 5) then
+ size = 10 - size
+ end
+ size = size + 1
+ local crown = ({ "ferns:tree_fern_leaves", "ferns:tree_fern_leaves_02" })[math.random(1, 2)]
+
+ local i = 1
+ while (i < size-1) do
+ if minetest.get_node({x = pos.x, y = pos.y + i + 1, z = pos.z}).name ~= "air" then
+ break
+ end
+ minetest.set_node({x = pos.x, y = pos.y + i, z = pos.z}, { name = "ferns:fern_trunk" })
+ i = i + 1
+ end
+
+ minetest.set_node({x = pos.x, y = pos.y + i, z = pos.z}, { name = crown })
+end
+
+-----------------------------------------------------------------------------------------------
+-- TREE FERN LEAVES
+-----------------------------------------------------------------------------------------------
+
+-- TODO: Both of these nodes look the same?
+
+minetest.register_node("ferns:tree_fern_leaves", {
+ description = "Tree Fern Crown (Dicksonia)",
+ drawtype = "plantlike",
+ visual_scale = 2,
+ paramtype = "light",
+ paramtype2 = "facedir",
+ --tiles = {"[combine:32x32:0,0=top_left.png:0,16=bottom_left.png:16,0=top_right.png:16,16=bottom_right.png"},
+ tiles = {"ferns_fern_tree.png"},
+ inventory_image = "ferns_fern_tree_inv.png",
+ walkable = false,
+ groups = {snappy=3,flammable=2,attached_node=1},
+ drop = {
+ max_items = 2,
+ items = {
+ {
+ -- occasionally, drop a second sapling instead of leaves
+ -- (extra saplings can also be obtained by replanting and
+ -- reharvesting leaves)
+ items = {"ferns:sapling_tree_fern"},
+ rarity = 10,
+ },
+ {
+ items = {"ferns:sapling_tree_fern"},
+ },
+ {
+ items = {"ferns:tree_fern_leaves"},
+ }
+ }
+ },
+ sounds = default.node_sound_leaves_defaults(),
+ selection_box = {
+ type = "fixed",
+ fixed = {-7/16, -1/2, -7/16, 7/16, 0, 7/16},
+ },
+})
+minetest.register_node("ferns:tree_fern_leaves_02", {
+ drawtype = "plantlike",
+ visual_scale = 2,
+ paramtype = "light",
+ tiles = {"ferns_fern_big.png"},
+ walkable = false,
+ groups = {snappy=3,flammable=2,attached_node=1,not_in_creative_inventory=1},
+ drop = {
+ max_items = 2,
+ items = {
+ {
+ -- occasionally, drop a second sapling instead of leaves
+ -- (extra saplings can also be obtained by replanting and
+ -- reharvesting leaves)
+ items = {"ferns:sapling_tree_fern"},
+ rarity = 10,
+ },
+ {
+ items = {"ferns:sapling_tree_fern"},
+ },
+ {
+ items = {"ferns:tree_fern_leaves"},
+ }
+ }
+ },
+ sounds = default.node_sound_leaves_defaults(),
+ selection_box = {
+ type = "fixed",
+ fixed = {-7/16, -1/2, -7/16, 7/16, 0, 7/16},
+ },
+})
+-----------------------------------------------------------------------------------------------
+-- FERN TRUNK
+-----------------------------------------------------------------------------------------------
+minetest.register_node("ferns:fern_trunk", {
+ description = "Fern Trunk (Dicksonia)",
+ drawtype = "nodebox",
+ paramtype = "light",
+ tiles = {
+ "ferns_fern_trunk_top.png",
+ "ferns_fern_trunk_top.png",
+ "ferns_fern_trunk.png"
+ },
+ node_box = {
+ type = "fixed",
+ fixed = {-1/8, -1/2, -1/8, 1/8, 1/2, 1/8},
+ },
+ selection_box = {
+ type = "fixed",
+ fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},
+ },
+ groups = {tree=1,choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
+ sounds = default.node_sound_wood_defaults(),
+ after_destruct = function(pos,oldnode)
+ local node = minetest.get_node({x=pos.x,y=pos.y+1,z=pos.z})
+ if node.name == "ferns:fern_trunk" then
+ minetest.dig_node({x=pos.x,y=pos.y+1,z=pos.z})
+ minetest.add_item(pos,"ferns:fern_trunk")
+ end
+ end,
+})
+
+-----------------------------------------------------------------------------------------------
+-- TREE FERN SAPLING
+-----------------------------------------------------------------------------------------------
+minetest.register_node("ferns:sapling_tree_fern", {
+ description = "Tree Fern Sapling (Dicksonia)",
+ drawtype = "plantlike",
+ paramtype = "light",
+ paramtype2 = "facedir",
+ tiles = {"ferns_sapling_tree_fern.png"},
+ inventory_image = "ferns_sapling_tree_fern.png",
+ walkable = false,
+ groups = {snappy=3,flammable=2,flora=1,attached_node=1},
+ sounds = default.node_sound_leaves_defaults(),
+ selection_box = {
+ type = "fixed",
+ fixed = {-7/16, -1/2, -7/16, 7/16, 0, 7/16},
+ },
+})
+-- abm
+minetest.register_abm({
+ nodenames = "ferns:sapling_tree_fern",
+ interval = 1000,
+ chance = 4,
+ action = function(pos, node, _, _)
+ abstract_ferns.grow_tree_fern({x = pos.x, y = pos.y-1, z = pos.z})
+ end
+})
+
+-----------------------------------------------------------------------------------------------
+-- GENERATE TREE FERN
+-----------------------------------------------------------------------------------------------
+
+-- in jungles
+if abstract_ferns.config.enable_treeferns_in_jungle == true then
+ biome_lib:register_generate_plant({
+ surface = {
+ "default:dirt_with_grass",
+ "default:sand",
+ "default:desert_sand",
+ },
+ max_count = 35,--27,
+ avoid_nodes = {"default:tree"},
+ avoid_radius = 4,
+ rarity = 50,
+ seed_diff = 329,
+ min_elevation = -10,
+ near_nodes = {"default:jungletree"},
+ near_nodes_size = 6,
+ near_nodes_vertical = 2,--4,
+ near_nodes_count = 1,
+ plantlife_limit = -0.9,
+ humidity_max = -1.0,
+ humidity_min = 0.4,
+ temp_max = -0.5,
+ temp_min = 0.13,
+ },
+ abstract_ferns.grow_tree_fern
+ )
+end
+
+-- for oases & tropical beaches
+if abstract_ferns.config.enable_treeferns_in_oases == true then
+ biome_lib:register_generate_plant({
+ surface = {
+ "default:sand"--,
+ --"default:desert_sand"
+ },
+ max_count = 35,
+ rarity = 50,
+ seed_diff = 329,
+ neighbors = {"default:desert_sand"},
+ ncount = 1,
+ min_elevation = 1,
+ near_nodes = {"default:water_source"},
+ near_nodes_size = 2,
+ near_nodes_vertical = 1,
+ near_nodes_count = 1,
+ plantlife_limit = -0.9,
+ humidity_max = -1.0,
+ humidity_min = 1.0,
+ temp_max = -1.0,
+ temp_min = 1.0,
+ },
+ abstract_ferns.grow_tree_fern
+)
+end