summaryrefslogtreecommitdiff
path: root/youngtrees
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2016-04-01 21:00:20 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2016-04-01 21:10:04 -0400
commit888b0ebfec8c2eff9015163549a7e47443cb8665 (patch)
tree915080159bfaa6ba6e226087c7ce0e8d5464b518 /youngtrees
parentda66780a569712c23ae4f2996cfb4608a9f9d69d (diff)
downloaddreambuilder_modpack-888b0ebfec8c2eff9015163549a7e47443cb8665.tar
dreambuilder_modpack-888b0ebfec8c2eff9015163549a7e47443cb8665.tar.gz
dreambuilder_modpack-888b0ebfec8c2eff9015163549a7e47443cb8665.tar.bz2
dreambuilder_modpack-888b0ebfec8c2eff9015163549a7e47443cb8665.tar.xz
dreambuilder_modpack-888b0ebfec8c2eff9015163549a7e47443cb8665.zip
"explode" all modpacks into their individual components
(you can't have a modpack buried inside a modpack)
Diffstat (limited to 'youngtrees')
-rw-r--r--youngtrees/depends.txt2
-rw-r--r--youngtrees/init.lua146
-rw-r--r--youngtrees/textures/bamboo.pngbin0 -> 112 bytes
-rw-r--r--youngtrees/textures/unused/sapling.pngbin0 -> 14617 bytes
-rw-r--r--youngtrees/textures/unused/sapling16x.pngbin0 -> 1020 bytes
-rw-r--r--youngtrees/textures/youngtree16xa.pngbin0 -> 420 bytes
-rw-r--r--youngtrees/textures/youngtree16xb.pngbin0 -> 314 bytes
-rw-r--r--youngtrees/textures/youngtree16xc.pngbin0 -> 142 bytes
-rw-r--r--youngtrees/textures/youngtree2branch.pngbin0 -> 129 bytes
9 files changed, 148 insertions, 0 deletions
diff --git a/youngtrees/depends.txt b/youngtrees/depends.txt
new file mode 100644
index 0000000..4e35179
--- /dev/null
+++ b/youngtrees/depends.txt
@@ -0,0 +1,2 @@
+default
+biome_lib \ No newline at end of file
diff --git a/youngtrees/init.lua b/youngtrees/init.lua
new file mode 100644
index 0000000..183e86e
--- /dev/null
+++ b/youngtrees/init.lua
@@ -0,0 +1,146 @@
+abstract_youngtrees = {}
+
+minetest.register_node("youngtrees:bamboo", {
+ description = "Young Bamboo Tree",
+ drawtype="nodebox",
+ tiles = {"bamboo.png"},
+ paramtype = "light",
+ walkable = false,
+ is_ground_content = true,
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.058251,-0.500000,-0.413681,0.066749,0.500000,-0.282500}, --NodeBox 1
+ {-0.058251,-0.500000,-0.103123,0.066749,0.500000,0.038672}, --NodeBox 2
+ {-0.058251,-0.500000,0.181227,0.066749,0.500000,0.342500}, --NodeBox 3
+ }
+ },
+ groups = {snappy=3,flammable=2},
+ sounds = default.node_sound_leaves_defaults(),
+ drop = 'trunks:twig_1'
+})
+
+minetest.register_node("youngtrees:youngtree2_middle",{
+ description = "Young Tree 2 (middle)",
+ drawtype="nodebox",
+ tiles = {"youngtree2branch.png"},
+ inventory_image = "youngtree2branch.png",
+ wield_image = "youngtree2branch.png",
+ paramtype = "light",
+ walkable = false,
+ is_ground_content = true,
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {0.125000,-0.500000,-0.500000,0.500000,-0.187500,-0.125000}, --NodeBox 1
+ {-0.187500,-0.187500,-0.500000,0.500000,0.125000,0.250000}, --NodeBox 2
+ {-0.500000,0.125000,-0.500000,0.500000,0.500000,0.500000}, --NodeBox 3
+ }
+ },
+ groups = {snappy=3,flammable=2},
+ sounds = default.node_sound_leaves_defaults(),
+ drop = 'trunks:twig_1'
+})
+
+minetest.register_node("youngtrees:youngtree_top", {
+ description = "Young Tree (top)",
+ drawtype = "plantlike",
+ tiles = {"youngtree16xa.png"},
+ inventory_image = "youngtree16xa.png",
+ wield_image = "youngtree16xa.png",
+ paramtype = "light",
+ walkable = false,
+ is_ground_content = true,
+ selection_box = {
+ type = "fixed",
+ fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
+ },
+ groups = {snappy=3,flammable=2},
+ sounds = default.node_sound_leaves_defaults(),
+ drop = 'trunks:twig_1'
+})
+
+
+minetest.register_node("youngtrees:youngtree_middle", {
+ description = "Young Tree (middle)",
+ drawtype = "plantlike",
+ tiles = {"youngtree16xb.png"},
+ inventory_image = "youngtree16xb.png",
+ wield_image = "youngtree16xb.png",
+ paramtype = "light",
+ walkable = false,
+ is_ground_content = true,
+ selection_box = {
+ type = "fixed",
+ fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
+ },
+ groups = {snappy=3,flammable=2},
+ sounds = default.node_sound_leaves_defaults(),
+ drop = 'trunks:twig_1'
+})
+
+
+
+minetest.register_node("youngtrees:youngtree_bottom", {
+ description = "Young Tree (bottom)",
+ drawtype = "plantlike",
+ tiles = {"youngtree16xc.png"},
+ inventory_image = "youngtree16xc.png",
+ wield_image = "youngtree16xc.png",
+ paramtype = "light",
+ walkable = false,
+ is_ground_content = true,
+ selection_box = {
+ type = "fixed",
+ fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
+ },
+ groups = {snappy=3,flammable=2},
+ sounds = default.node_sound_leaves_defaults(),
+ drop = 'trunks:twig_1'
+})
+
+
+ abstract_youngtrees.grow_youngtree = function(pos)
+ local height = math.random(1,3)
+ abstract_youngtrees.grow_youngtree_node(pos,height)
+end
+
+abstract_youngtrees.grow_youngtree_node = function(pos, height)
+
+
+ local right_here = {x=pos.x, y=pos.y+1, z=pos.z}
+ local above_right_here = {x=pos.x, y=pos.y+2, z=pos.z}
+
+ if minetest.get_node(right_here).name == "air" -- instead of check_air = true,
+ or minetest.get_node(right_here).name == "default:junglegrass" then
+ if height == 1 then
+ minetest.set_node(right_here, {name="youngtrees:youngtree_top"})
+ end
+ if height == 2 then
+ minetest.set_node(right_here, {name="youngtrees:youngtree_bottom"})
+ minetest.set_node(above_right_here, {name="youngtrees:youngtree_top"})
+ end
+ if height == 3 then
+ local two_above_right_here = {x=pos.x, y=pos.y+3, z=pos.z}
+ minetest.set_node(right_here, {name="youngtrees:youngtree_bottom"})
+ minetest.set_node(above_right_here, {name="youngtrees:youngtree_middle"})
+ minetest.set_node(two_above_right_here, {name="youngtrees:youngtree_top"})
+ end
+ end
+end
+
+
+biome_lib:register_generate_plant({
+ surface = {
+ "default:dirt_with_grass",
+ "stoneage:grass_with_silex",
+ "sumpf:peat",
+ "sumpf:sumpf"
+ },
+ max_count = 55, --10,15
+ rarity = 101 - 4, --3,4
+ min_elevation = 1, -- above sea level
+ plantlife_limit = -0.9,
+ },
+ abstract_youngtrees.grow_youngtree
+)
diff --git a/youngtrees/textures/bamboo.png b/youngtrees/textures/bamboo.png
new file mode 100644
index 0000000..018d42e
--- /dev/null
+++ b/youngtrees/textures/bamboo.png
Binary files differ
diff --git a/youngtrees/textures/unused/sapling.png b/youngtrees/textures/unused/sapling.png
new file mode 100644
index 0000000..a3d5127
--- /dev/null
+++ b/youngtrees/textures/unused/sapling.png
Binary files differ
diff --git a/youngtrees/textures/unused/sapling16x.png b/youngtrees/textures/unused/sapling16x.png
new file mode 100644
index 0000000..45b86ee
--- /dev/null
+++ b/youngtrees/textures/unused/sapling16x.png
Binary files differ
diff --git a/youngtrees/textures/youngtree16xa.png b/youngtrees/textures/youngtree16xa.png
new file mode 100644
index 0000000..9bba623
--- /dev/null
+++ b/youngtrees/textures/youngtree16xa.png
Binary files differ
diff --git a/youngtrees/textures/youngtree16xb.png b/youngtrees/textures/youngtree16xb.png
new file mode 100644
index 0000000..d83b7a3
--- /dev/null
+++ b/youngtrees/textures/youngtree16xb.png
Binary files differ
diff --git a/youngtrees/textures/youngtree16xc.png b/youngtrees/textures/youngtree16xc.png
new file mode 100644
index 0000000..cfe3cf1
--- /dev/null
+++ b/youngtrees/textures/youngtree16xc.png
Binary files differ
diff --git a/youngtrees/textures/youngtree2branch.png b/youngtrees/textures/youngtree2branch.png
new file mode 100644
index 0000000..89b2f23
--- /dev/null
+++ b/youngtrees/textures/youngtree2branch.png
Binary files differ