Added Mediterranean biome with lemon and olive trees (thanks Felfa)

This commit is contained in:
tenplus1 2020-12-12 20:04:59 +00:00
parent 73daf5d95e
commit b188cdaa57
29 changed files with 414 additions and 5 deletions

View File

@ -10,6 +10,11 @@ Ethereal Mapgen mod for Minetest (works on all except v6)
## Changelog
### 1.28
- Added new Meditteranean biome with Lemon and Olive trees (thanks Felfa)
- Added Candied Lemon and Olive Oil items and recipe
### 1.27
- Added Etherium ore and dust

View File

@ -143,9 +143,6 @@ end
add_biome("grayness", 2, 41, 15, 30, ethereal.grayness,
nil, "ethereal:gray_dirt", 1, "default:dirt", 3)
--add_biome("grayness_ocean", -192, 1, 15, 30, ethereal.grayness,
-- nil, tmp, 2, "default:sand", 2)
add_biome("grayness_ocean", -28, 1, 15, 30, ethereal.grayness,
nil, tmp, 2, "default:sand", 2, "ethereal:blue_marble")
@ -190,6 +187,10 @@ add_biome("grove_ocean", -192, 2, 45, 35, ethereal.grove,
nil, "default:sand", 1, "default:sand", 2)
add_biome("mediterranean", 3, 50, 20, 45, ethereal.mediterranean,
nil, "ethereal:grove_dirt", 1, "default:dirt", 3)
add_biome("mushroom", 3, 50, 45, 55, ethereal.mushroom,
nil, "ethereal:mushroom_dirt", 1, "default:dirt", 3)

View File

@ -255,6 +255,10 @@ add_node({"ethereal:grove_dirt"}, 0.35, {"grove"}, 1, 100,
{"default:grass_2", "default:grass_3", "default:grass_4",
"default:grass_5"}, nil, nil, nil, ethereal.grove)
add_node({"ethereal:grove_dirt"}, 0.35, {"mediterranean"}, 1, 100,
{"default:grass_2", "default:grass_3", "default:grass_4",
"default:grass_5"}, nil, nil, nil, ethereal.mediterranean)
add_node({"ethereal:bamboo_dirt"}, 0.35, {"bamboo"}, 1, 100,
{"default:grass_2", "default:grass_3", "default:grass_4",
"default:grass_5"}, nil, nil, nil, ethereal.bamboo)

View File

@ -272,3 +272,102 @@ minetest.register_craft({
},
})
end
-- Lemon
minetest.register_node("ethereal:lemon", {
description = S("Lemon"),
drawtype = "plantlike",
tiles = {"lemon.png"},
inventory_image = "lemon_fruit.png",
wield_image = "lemon_fruit.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.27, -0.37, -0.27, 0.27, 0.44, 0.27}
},
groups = {
food_lemon = 1, fleshy = 3, dig_immediate = 3, flammable = 2,
leafdecay = 3, leafdecay_drop = 1
},
drop = "ethereal:lemon",
on_use = minetest.item_eat(3),
sounds = default.node_sound_leaves_defaults(),
after_place_node = function(pos, placer)
if placer:is_player() then
minetest.set_node(pos, {name = "ethereal:lemon", param2 = 1})
end
end,
})
-- Candied Lemon
minetest.register_craftitem("ethereal:candied_lemon", {
description = S("Candied Lemon"),
inventory_image = "ethereal_candied_lemon.png",
wield_image = "ethereal_candied_lemon.png",
groups = {food_candied_lemon = 1},
on_use = minetest.item_eat(5),
})
minetest.register_craft({
type = "shapeless",
output = "ethereal:candied_lemon",
recipe = {
"farming:baking_tray", "ethereal:lemon", "group:food_sugar"
},
replacements = {
{"farming:baking_tray", "farming:baking_tray"}
},
})
-- Olive
minetest.register_node("ethereal:olive", {
description = S("Olive"),
drawtype = "plantlike",
tiles = {"olive.png"},
inventory_image = "olive_fruit.png",
wield_image = "olive_fruit.png",
visual_scale = 0.2,
paramtype = "light",
sunlight_propagates = true,
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.1, -0.5, -0.1, 0.1, -0.3, 0.1}
},
groups = {
fleshy = 3, dig_immediate = 3, flammable = 2,
leafdecay = 3, leafdecay_drop = 1
},
drop = "ethereal:olive",
on_use = minetest.item_eat(1),
sounds = default.node_sound_leaves_defaults(),
after_place_node = function(pos, placer)
if placer:is_player() then
minetest.set_node(pos, {name = "ethereal:olive", param2 = 1})
end
end,
})
-- Olive Oil
minetest.register_craftitem("ethereal:olive_oil", {
description = S("Olive Oil"),
inventory_image = "ethereal_olive_oil.png",
wield_image = "ethereal_olive_oil.png",
groups = {food_oil = 1, food_olive_oil = 1, vessel = 1},
})
minetest.register_craft({
type = "shapeless",
output = "ethereal:olive_oil",
recipe = {
"farming:juicer", "vessels:glass_bottle",
"ethereal:olive", "ethereal:olive", "ethereal:olive",
"ethereal:olive", "ethereal:olive", "ethereal:olive"
},
replacements = {
{"farming:juicer", "farming:juicer"}
},
})

View File

@ -48,6 +48,7 @@ ethereal = {
reefs = minetest.settings:get('ethereal.reefs') or 1,
sakura = minetest.settings:get('ethereal.sakura') or 1,
tundra = minetest.settings:get('ethereal.tundra') or 1,
mediterranean = minetest.settings:get('ethereal.mediterranean') or 1
}
local path = minetest.get_modpath("ethereal")

View File

@ -325,6 +325,52 @@ minetest.register_node("ethereal:sakura_leaves2", {
after_place_node = default.after_place_leaves,
})
-- lemon tree leaves
minetest.register_node("ethereal:lemon_leaves", {
description = S("Lemon Tree Leaves"),
drawtype = leaftype,
visual_scale = leafscale,
tiles = {"lemon_leaves.png"},
inventory_image = "lemon_leaves.png",
wield_image = "lemon_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:lemon_tree_sapling"}, rarity = 25},
{items = {"ethereal:lemon_leaves"}}
}
},
sounds = default.node_sound_leaves_defaults(),
after_place_node = default.after_place_leaves,
})
-- olive tree leaves
minetest.register_node("ethereal:olive_leaves", {
description = S("Olive Tree Leaves"),
drawtype = leaftype,
visual_scale = leafscale,
tiles = {"olive_leaves.png"},
inventory_image = "olive_leaves.png",
wield_image = "olive_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:olive_tree_sapling"}, rarity = 25},
{items = {"ethereal:olive_leaves"}}
}
},
sounds = default.node_sound_leaves_defaults(),
after_place_node = default.after_place_leaves,
})
-- mushroom tops
minetest.register_node("ethereal:mushroom", {
description = S("Mushroom Cap"),
@ -446,8 +492,11 @@ if minetest.registered_nodes["default:dirt_with_rainforest_litter"] then
default.register_leafdecay({
trunks = {"default:tree"},
leaves = {
"default:apple", "default:leaves", "ethereal:orange",
"ethereal:orange_leaves", "ethereal:vine"},
"default:apple", "default:leaves",
"ethereal:orange", "ethereal:orange_leaves",
"ethereal:lemon", "ethereal:lemon_leaves",
"ethereal:vine"
},
radius = 3
})
@ -505,6 +554,12 @@ default.register_leafdecay({
radius = 3
})
default.register_leafdecay({
trunks = {"ethereal:olive_trunk"},
leaves = {"ethereal:olive_leaves", "ethereal:olive"},
radius = 3
})
default.register_leafdecay({
trunks = {"ethereal:mushroom_trunk"},
leaves = {"ethereal:mushroom", "ethereal:mushroom_pore"},

View File

@ -19,3 +19,11 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Textures by Felfa:
olive*.png
lemon*.png
Notice: Most texture authors are written inside code as comments, anything with no name
I have more than likely created myself :)

View File

@ -66,6 +66,8 @@ lucky_block:add_blocks({
{name = "ethereal:frost_tree_sapling", max = 10},
{name = "ethereal:sakura_sapling", max = 10},
{name = "ethereal:willow_sapling", max = 10},
{name = "ethereal:lemon_tree_sapling", max = 10},
{name = "ethereal:olive_tree_sapling", max = 10},
}},
{"flo", 5, {"ethereal:blue_marble_tile"}, 2},
{"dro", {"ethereal:blue_marble", "ethereal:blue_marble_tile"}, 8},

View File

@ -61,6 +61,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)
register_sapling("ethereal:lemon_tree", "Lemon", "lemon_tree_sapling", 7)
register_sapling("ethereal:olive_tree", "Olive", "olive_tree_sapling", 10)
local add_tree = function (pos, ofx, ofy, ofz, schem, replace)
-- check for schematic
@ -137,6 +140,14 @@ function ethereal.grow_sakura_tree(pos)
end
end
function ethereal.grow_lemon_tree(pos)
add_tree(pos, 2, 0, 2, ethereal.lemontree)
end
function ethereal.grow_olive_tree(pos)
add_tree(pos, 3, 0, 3, ethereal.olivetree)
end
-- check if sapling has enough height room to grow
local enough_height = function(pos, height)
@ -218,6 +229,14 @@ local grow_sapling = function(pos, node)
elseif node.name == "ethereal:sakura_sapling"
and under == "ethereal:bamboo_dirt" then
ethereal.grow_sakura_tree(pos)
elseif node.name == "ethereal:olive_tree_sapling"
and under == "ethereal:grove_dirt" then
ethereal.grow_olive_tree(pos)
elseif node.name == "ethereal:lemon_tree_sapling"
and under == "ethereal:grove_dirt" then
ethereal.grow_lemon_tree(pos)
end
end

65
schematics/lemon_tree.lua Normal file
View File

@ -0,0 +1,65 @@
local _ = {name = "air", param1 = 0}
local L = {name = "ethereal:lemon_leaves", param1 = 255}
local l = {name = "ethereal:lemon_leaves", param1 = 127}
local T = {name = "default:tree", param1 = 255}
local e = {name = "ethereal:lemon", param1 = 100}
ethereal.lemontree = {
size = {x = 5, y = 8, z = 5},
yslice_prob = {
{ypos = 0, prob = 127},
{ypos = 3, prob = 127},
},
data = {
_,_,_,_,_,
_,_,_,_,_,
_,_,_,_,_,
_,_,e,_,_,
_,L,L,L,e,
e,L,L,l,_,
_,l,L,L,_,
_,_,l,_,_,
_,_,_,_,_,
_,_,_,_,_,
_,_,_,_,_,
_,L,L,l,_,
l,L,l,L,L,
L,l,L,L,L,
L,L,L,l,L,
_,L,L,L,_,
_,_,T,_,_,
_,_,T,_,_,
_,_,T,_,_,
l,e,T,l,l,
L,L,T,L,l,
l,L,T,L,L,
L,L,L,l,L,
l,L,L,L,l,
_,_,_,_,_,
_,_,_,_,_,
_,_,_,_,_,
_,L,L,L,_,
L,l,L,L,L,
L,L,L,L,L,
L,L,L,L,l,
_,l,L,L,_,
_,_,_,_,_,
_,_,_,_,_,
_,_,_,_,_,
_,_,l,_,_,
e,L,L,l,_,
_,l,L,L,_,
_,L,L,L,e,
_,_,l,_,_,
}
}

88
schematics/olive_tree.lua Normal file
View File

@ -0,0 +1,88 @@
local _ = {name = "air", param1 = 0}
local L = {name = "ethereal:olive_leaves", param1 = 255}
local T = {name = "ethereal:olive_trunk", param1 = 255}
local o = {name = "ethereal:olive", param1 = 150}
ethereal.olivetree = {
size = {x = 8, y = 9, z = 7},
data = {
_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,
_,L,_,_,_,_,L,_,
_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,
_,_,L,_,L,L,o,_,
L,T,L,L,o,L,T,L,
_,L,_,_,_,_,L,_,
_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,
_,_,_,T,_,_,_,_,
_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,
_,L,T,L,_,T,L,_,
_,L,L,_,L,L,L,_,
_,_,_,L,L,_,_,_,
_,_,o,L,L,_,_,_,
_,_,_,_,_,_,_,_,
_,_,_,T,T,_,_,_,
_,_,_,T,T,_,_,_,
_,_,_,T,T,_,_,_,
_,_,L,T,T,_,_,_,
_,o,L,T,T,T,L,_,
_,L,L,T,T,L,o,_,
_,_,L,T,T,L,_,_,
_,_,L,T,T,L,_,_,
_,_,_,L,L,_,_,_,
_,_,_,_,T,_,_,_,
_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,
_,_,_,_,L,_,_,_,
_,_,L,T,L,L,_,_,
_,_,L,L,T,L,_,_,
_,_,_,L,L,L,_,_,
_,_,L,L,L,_,_,_,
_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,
_,_,o,L,_,_,_,_,
_,L,T,L,L,o,_,_,
_,_,L,_,L,T,L,_,
_,_,o,_,_,L,_,_,
_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,
_,_,L,_,_,_,_,_,
_,_,_,_,_,L,_,_,
_,_,_,_,_,_,_,_,
_,_,_,_,_,_,_,_,
}
}

View File

@ -23,6 +23,8 @@ dofile(path .. "redwood_tree.lua")
dofile(path .. "vinetree.lua")
dofile(path .. "sakura.lua")
dofile(path .. "igloo.lua")
dofile(path .. "lemon_tree.lua")
dofile(path .. "olive_tree.lua")
-- helper function
@ -149,6 +151,14 @@ add_schem({"ethereal:bamboo_dirt"}, 0.08, {"bamboo"}, 1, 100, ethereal.bush,
add_schem({"default:dirt_with_grass"}, 0.02, {"swamp"}, 1, 100,
ethereal.vinetree, ethereal.swamp)
-- lemon tree
add_schem({"ethereal:grove_dirt"}, 0.002, {"mediterranean"}, 5, 50,
ethereal.lemontree, ethereal.mediterranean)
-- olive tree
add_schem({"ethereal:grove_dirt"}, 0.002, {"mediterranean"}, 5, 35,
ethereal.olivetree, ethereal.mediterranean)
-- default large cactus
if ethereal.desert == 1 then

View File

@ -40,3 +40,4 @@ ethereal.swamp = 1 -- Swamp areas with vines on tree's, mushrooms, lilly's a
ethereal.sealife = 1 -- Enable coral and seaweed
ethereal.reefs = 1 -- Enable new coral reefs in default
ethereal.sakura = 1 -- Enable sakura biomes with trees
ethereal.mediterranean = 1 -- Enable Mediterranean biome

View File

@ -35,3 +35,4 @@ ethereal.sealife (Coral and Seaweed biome, 1 = Enable / 0 = Disable) int 1
ethereal.reefs (MT5 Coral biome, 1 = Enable / 0 = Disable) int 1
ethereal.sakura (Sakura biome, 1 = Enable / 0 = Disable) int 1
ethereal.tundra (Tundra biome, 1 = Enable / 0 = Disable) int 1
ethereal.mediterranean (Mediterranean biome, 1 = Enable / 0 = Disable) int 1

View File

@ -103,6 +103,13 @@ stairs.register_all("sakura_wood", "ethereal:sakura_wood",
S("Sakura Wood"),
default.node_sound_wood_defaults())
stairs.register_all("olive_wood", "ethereal:olive_wood",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
{"olive_wood.png"},
S("Olive Wood stair"),
S("Olive Wood Slab"),
default.node_sound_wood_defaults())
-- Stairs Plus (in More Blocks)
elseif minetest.global_exists("stairsplus") then
@ -221,6 +228,13 @@ stairsplus:register_all("ethereal", "sakura_wood", "ethereal:sakura_wood", {
sounds = default.node_sound_wood_defaults(),
})
stairsplus:register_all("ethereal", "olive_wood", "ethereal:olive_wood", {
description = S("Olive"),
tiles = {"olive_wood.png"},
groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(),
})
-- Default Stairs
else
@ -339,4 +353,12 @@ stairs.register_stair_and_slab("sakura_wood", "ethereal:sakura_wood",
S("Sakura Wood Stair"),
S("Sakura Wood Slab"),
default.node_sound_wood_defaults())
stairs.register_stair_and_slab("olive_wood", "ethereal:olive_wood",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
{"olive_wood.png"},
S("Olive Wood Stair"),
S("Olive Wood Slab"),
default.node_sound_wood_defaults())
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

BIN
textures/lemon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 B

BIN
textures/lemon_fruit.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B

BIN
textures/lemon_leaves.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 B

BIN
textures/olive.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 465 B

BIN
textures/olive_fruit.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
textures/olive_leaves.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

BIN
textures/olive_trunk.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 884 B

BIN
textures/olive_wood.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 B

View File

@ -288,3 +288,31 @@ minetest.register_craft({
recipe = "ethereal:bamboo",
burntime = 1,
})
-- olive trunk
minetest.register_node("ethereal:olive_trunk", {
description = S("Olive Trunk"),
tiles = {
"olive_trunk_top.png",
"olive_trunk_top.png",
"olive_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,
})
-- olive wood
minetest.register_node("ethereal:olive_wood", {
description = S("Olive Wood"),
tiles = {"olive_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:olive_wood 4",
recipe = {{"ethereal:olive_trunk"}}
})