added sakura biome, tree, sapling, wood, stairs, fence, gate

This commit is contained in:
TenPlus1 2019-02-16 12:23:14 +00:00
parent 80a450dbe4
commit cc57167367
18 changed files with 159 additions and 7 deletions

View File

@ -6,10 +6,17 @@ Ethereal Mapgen mod for Minetest (works on all except v6)
- https://forum.minetest.net/viewtopic.php?f=11&t=14638
## Lucky Blocks
41
42
## Changelog
### 1.26
- Added Sakura biome, pink sakura trees and saplings
- 1 in 10 chance of sakura sapling growing into white sakura
- Bamboo grows in higher elevation while sakura grows in lower
- Added sakura wood stairs, fence and gates
### 1.25
- Converted .mts files into schematic tables for easier editing

View File

@ -72,3 +72,11 @@ default.register_fence("ethereal:fence_birch", {
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults()
})
default.register_fence("ethereal:fence_sakura", {
description = S("Sakura Fence"),
texture = "ethereal_sakura_wood.png",
material = "ethereal:sakura_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults()
})

View File

@ -66,6 +66,13 @@ doors.register_fencegate("ethereal:fencegate_birch", {
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}
})
doors.register_fencegate("ethereal:fencegate_sakura", {
description = S("Sakura Wood Fence Gate"),
texture = "ethereal_sakura_wood.png",
material = "ethereal:sakura_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}
})
-- add compatibility for ethereal's to default wooden gates
minetest.register_alias("ethereal:fencegate_wood_open", "doors:gate_wood_open")
minetest.register_alias("ethereal:fencegate_wood_closed", "doors:gate_wood_closed")

View File

@ -45,6 +45,7 @@ ethereal = {
swamp = 1, -- Swamp areas with vines on tree's, mushrooms, lilly's and clay sand
sealife = 1, -- Enable coral and seaweed
reefs = 1, -- Enable new 0.4.15 coral reefs in default
sakura = 1, -- Enable sakura biome with trees
}
local path = minetest.get_modpath("ethereal")

View File

@ -278,6 +278,51 @@ minetest.register_node("ethereal:bamboo_leaves", {
after_place_node = default.after_place_leaves,
})
-- sakura leaves
minetest.register_node("ethereal:sakura_leaves", {
description = S("Sakura Leaves"),
drawtype = leaftype,
visual_scale = 1.4,
tiles = {"ethereal_sakura_leaves.png"},
inventory_image = "ethereal_sakura_leaves.png",
wield_image = "ethereal_sakura_leaves.png",
paramtype = "light",
walkable = ethereal.leafwalk,
waving = 1,
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
drop = {
max_items = 1,
items = {
{items = {"ethereal:sakura_sapling"}, rarity = 30},
{items = {"ethereal:sakura_leaves"}}
}
},
sounds = default.node_sound_leaves_defaults(),
after_place_node = default.after_place_leaves,
})
minetest.register_node("ethereal:sakura_leaves2", {
description = S("Sakura Leaves"),
drawtype = leaftype,
visual_scale = 1.4,
tiles = {"ethereal_sakura_leaves2.png"},
inventory_image = "ethereal_sakura_leaves2.png",
wield_image = "ethereal_sakura_leaves2.png",
paramtype = "light",
walkable = ethereal.leafwalk,
waving = 1,
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
drop = {
max_items = 1,
items = {
{items = {"ethereal:sakura_sapling"}, rarity = 30},
{items = {"ethereal:sakura_leaves2"}}
}
},
sounds = default.node_sound_leaves_defaults(),
after_place_node = default.after_place_leaves,
})
-- mushroom tops
minetest.register_node("ethereal:mushroom", {
description = S("Mushroom Cap"),

View File

@ -55,6 +55,18 @@ lucky_block:add_blocks({
{"exp", 4},
{"dro", {"ethereal:crystal_gilly_staff"}},
{"dro", {"ethereal:light_staff"}},
{"nod", "default:chest", 0, {
{name = "ethereal:birch_sapling", max = 10},
{name = "ethereal:palm_sapling", max = 10},
{name = "ethereal:orange_tree_sapling", max = 10},
{name = "ethereal:redwood_sapling", max = 10},
{name = "ethereal:bamboo_sprout", max = 10},
{name = "ethereal:banana_tree_sapling", max = 10},
{name = "ethereal:mushroom_sapling", max = 10},
{name = "ethereal:frost_tree_sapling", max = 10},
{name = "ethereal:sakura_sapling", max = 10},
{name = "ethereal:willow_sapling", max = 10},
}},
})
if minetest.get_modpath("3d_armor") then

View File

@ -114,10 +114,16 @@ add_biome("clearing", nil, "default:dirt_with_grass", 1, "default:dirt", 3,
nil, nil, nil, nil, nil, 3, 71, 45, 65, 1) -- ADDED
add_biome("bamboo", nil, "ethereal:bamboo_dirt", 1, "default:dirt", 3,
nil, nil, nil, nil, nil, 3, 71, 45, 75, ethereal.bamboo)
nil, nil, nil, nil, nil, 25, 70, 45, 75, ethereal.bamboo)
add_biome("bamboo_ocean", nil, "default:sand", 1, "default:sand", 2,
nil, nil, nil, nil, nil, -192, 2, 45, 75, ethereal.bamboo)
--add_biome("bamboo_ocean", nil, "default:sand", 1, "default:sand", 2,
--nil, nil, nil, nil, nil, -192, 2, 45, 75, ethereal.bamboo)
add_biome("sakura", nil, "ethereal:bamboo_dirt", 1, "default:dirt", 3,
nil, nil, nil, nil, nil, 3, 25, 45, 75, ethereal.sakura)
add_biome("sakura_ocean", nil, "default:sand", 1, "default:sand", 2,
nil, nil, nil, nil, nil, -192, 2, 45, 75, ethereal.sakura)
add_biome("mesa", nil, "default:dirt_with_dry_grass", 1, "bakedclay:orange", 15,
nil, nil, nil, nil, nil, 1, 71, 25, 28, ethereal.mesa)
@ -236,7 +242,7 @@ add_biome("swamp_ocean", nil, "default:sand", 2, "default:clay", 2,
--= schematic decorations
local add_schem = function(a, b, c, d, e, f, g)
local add_schem = function(a, b, c, d, e, f, g, h)
if g ~= 1 then return end
@ -250,6 +256,7 @@ local add_schem = function(a, b, c, d, e, f, g)
y_max = e,
schematic = f,
flags = "place_center_x, place_center_z",
replacements = h,
})
end
@ -272,6 +279,9 @@ if ethereal.glacier then
})
end
--sakura tree
add_schem({"ethereal:bamboo_dirt"}, 0.01, {"sakura"}, 1, 100, path .. "sakura.mts", ethereal.sakura)
-- redwood tree
add_schem({"default:dirt_with_dry_grass"}, 0.0025, {"mesa"}, 1, 100, ethereal.redwood_tree, ethereal.mesa)
@ -576,6 +586,7 @@ add_node({"ethereal:bamboo_dirt"}, 0.35, {"bamboo"}, 1, 100, {"default:grass_2",
"default:grass_4", "default:grass_5"}, nil, nil, nil, ethereal.bamboo)
add_node({"default:dirt_with_grass"}, 0.35, {"clearing", "swamp"}, 1, 100, {"default:grass_3",
"default:grass_4"}, nil, nil, nil, 1)
add_node({"ethereal:bamboo_dirt"}, 0.35, {"sakura"}, 1, 100, {"default:grass_2", "default:grass_3", "default:grass_4", "default:grass_5"}, nil, nil, nil, ethereal.sakura)
-- grass on sand
add_node({"default:sand"}, 0.25, {"sandclay"}, 3, 4, {"default:grass_2", "default:grass_3"}, nil, nil, nil, ethereal.sandclay)

View File

@ -60,8 +60,9 @@ register_sapling("ethereal:palm", "Palm", "moretrees_palm_sapling", 9)
register_sapling("ethereal:redwood", "Redwood", "redwood_sapling", 31)
register_sapling("ethereal:orange_tree", "Orange", "orange_tree_sapling", 6)
register_sapling("ethereal:birch", "Birch", "moretrees_birch_sapling", 7)
register_sapling("ethereal:sakura", "Sakura", "ethereal_sakura_sapling", 10)
local add_tree = function (pos, ofx, ofy, ofz, schem)
local add_tree = function (pos, ofx, ofy, ofz, schem, replace)
-- check for schematic
if not schem then
print (S("Schematic not found"))
@ -71,7 +72,7 @@ local add_tree = function (pos, ofx, ofy, ofz, schem)
minetest.swap_node(pos, {name = "air"})
minetest.place_schematic(
{x = pos.x - ofx, y = pos.y - ofy, z = pos.z - ofz},
schem, 0, nil, false)
schem, 0, replace, false)
end
local path = minetest.get_modpath("ethereal") .. "/schematics/"
@ -121,6 +122,16 @@ function ethereal.grow_birch_tree(pos)
add_tree(pos, 2, 0, 2, ethereal.birchtree)
end
function ethereal.grow_sakura_tree(pos)
local white = math.random(10)
if white == 1 then
white = {{"ethereal:sakura_leaves", "ethereal:sakura_leaves2"}}
else
white = nil
end
add_tree(pos, 4, 0, 2, path .. "sakura.mts", white)
end
-- check if sapling has enough height room to grow
local enough_height = function(pos, height)

BIN
schematics/sakura.mts Normal file

Binary file not shown.

View File

@ -39,3 +39,4 @@ ethereal.sandclay = 1 -- Sand areas with clay underneath
ethereal.swamp = 1 -- Swamp areas with vines on tree's, mushrooms, lilly's and clay sand
ethereal.sealife = 1 -- Enable coral and seaweed
ethereal.reefs = 1 -- Enable new coral reefs in default
ethereal.sakura = 1 -- Enable sakura biomes with trees

View File

@ -105,6 +105,13 @@ stairs.register_all("bamboo_wood", "ethereal:bamboo_block",
S("Bamboo Slab"),
default.node_sound_wood_defaults())
stairs.register_all("sakura_wood", "ethereal:sakura_wood",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
{"ethereal_sakura_wood.png"},
S("Sakura Wood stair"),
S("Sakura Wood Slab"),
default.node_sound_wood_defaults())
-- Stairs Plus (in More Blocks)
elseif minetest.global_exists("stairsplus") then
@ -209,6 +216,13 @@ stairsplus:register_all("ethereal", "bamboo_wood", "ethereal:bamboo_block", {
sounds = default.node_sound_wood_defaults(),
})
stairsplus:register_all("ethereal", "sakura_wood", "ethereal:sakura_wood", {
description = S("Sakura"),
tiles = {"ethereal_sakura_wood.png"},
groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(),
})
-- Default Stairs
else
@ -314,4 +328,11 @@ stairs.register_stair_and_slab("bamboo_wood", "ethereal:bamboo_block",
S("Bamboo Slab"),
default.node_sound_wood_defaults())
stairs.register_stair_and_slab("sakura_wood", "ethereal:sakura_wood",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
{"ethereal_sakura_wood.png"},
S("Sakura Wood Stair"),
S("Sakura Wood Slab"),
default.node_sound_wood_defaults())
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 564 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 592 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 529 B

View File

@ -1,6 +1,34 @@
local S = ethereal.intllib
-- sakura trunk
minetest.register_node("ethereal:sakura_trunk", {
description = S("Sakura Trunk"),
tiles = {
"ethereal_sakura_trunk_top.png",
"ethereal_sakura_trunk_top.png",
"ethereal_sakura_trunk.png"
},
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
sounds = default.node_sound_wood_defaults(),
paramtype2 = "facedir",
on_place = minetest.rotate_node,
})
-- sakura wood
minetest.register_node("ethereal:sakura_wood", {
description = S("Sakura Wood"),
tiles = {"ethereal_sakura_wood.png"},
is_ground_content = false,
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(),
})
minetest.register_craft({
output = "ethereal:sakura_wood 4",
recipe = {{"ethereal:sakura_trunk"}}
})
-- willow trunk
minetest.register_node("ethereal:willow_trunk", {
description = S("Willow Trunk"),