2016-05-17 23:40:05 +03:00
|
|
|
|
2024-08-16 13:05:33 +03:00
|
|
|
local S = minetest.get_translator("ethereal")
|
2016-06-09 17:08:34 +03:00
|
|
|
|
2024-08-16 13:05:33 +03:00
|
|
|
-- set leaftype (0 for block, 1 for plantlike)
|
2022-09-30 19:26:44 +03:00
|
|
|
|
2016-05-17 23:40:05 +03:00
|
|
|
local leaftype = "plantlike"
|
2020-06-28 22:58:37 +03:00
|
|
|
local leafscale = 1.4
|
2016-05-17 23:40:05 +03:00
|
|
|
|
|
|
|
if ethereal.leaftype ~= 0 then
|
2014-11-09 22:17:41 +03:00
|
|
|
leaftype = "allfaces_optional"
|
2020-06-28 22:58:37 +03:00
|
|
|
leafscale = 1.0
|
2014-11-09 22:17:41 +03:00
|
|
|
end
|
|
|
|
|
2016-05-17 23:40:05 +03:00
|
|
|
-- default apple tree leaves
|
2024-08-16 13:05:33 +03:00
|
|
|
|
2016-05-17 23:40:05 +03:00
|
|
|
minetest.override_item("default:leaves", {
|
|
|
|
drawtype = leaftype,
|
2020-06-28 22:58:37 +03:00
|
|
|
visual_scale = leafscale,
|
2016-05-17 23:40:05 +03:00
|
|
|
inventory_image = "default_leaves.png",
|
|
|
|
wield_image = "default_leaves.png",
|
2021-11-27 13:54:46 +03:00
|
|
|
walkable = ethereal.leafwalk
|
2016-05-17 23:40:05 +03:00
|
|
|
})
|
2014-11-09 22:17:41 +03:00
|
|
|
|
2018-06-07 11:37:19 +03:00
|
|
|
-- ability to craft big tree sapling
|
2024-08-16 13:05:33 +03:00
|
|
|
|
2018-06-07 11:37:19 +03:00
|
|
|
minetest.register_craft({
|
2023-06-08 18:06:57 +03:00
|
|
|
recipe = {{"default:sapling", "default:sapling", "default:sapling"}},
|
2018-06-07 11:37:19 +03:00
|
|
|
output = "ethereal:big_tree_sapling"
|
|
|
|
})
|
|
|
|
|
2016-05-17 23:40:05 +03:00
|
|
|
-- default jungle tree leaves
|
2024-08-16 13:05:33 +03:00
|
|
|
|
2016-05-17 23:40:05 +03:00
|
|
|
minetest.override_item("default:jungleleaves", {
|
2014-11-09 22:17:41 +03:00
|
|
|
drawtype = leaftype,
|
2020-06-28 22:58:37 +03:00
|
|
|
visual_scale = leafscale,
|
2016-05-17 23:40:05 +03:00
|
|
|
inventory_image = "default_jungleleaves.png",
|
|
|
|
wield_image = "default_jungleleaves.png",
|
2021-11-27 13:54:46 +03:00
|
|
|
walkable = ethereal.leafwalk
|
2016-05-17 23:40:05 +03:00
|
|
|
})
|
|
|
|
|
|
|
|
-- default pine tree leaves
|
2024-08-16 13:05:33 +03:00
|
|
|
|
2016-05-17 23:40:05 +03:00
|
|
|
minetest.override_item("default:pine_needles", {
|
|
|
|
drawtype = leaftype,
|
2020-06-28 22:58:37 +03:00
|
|
|
visual_scale = leafscale,
|
2016-05-17 23:40:05 +03:00
|
|
|
inventory_image = "default_pine_needles.png",
|
|
|
|
wield_image = "default_pine_needles.png",
|
|
|
|
walkable = ethereal.leafwalk,
|
2014-11-09 22:17:41 +03:00
|
|
|
drop = {
|
|
|
|
max_items = 1,
|
|
|
|
items = {
|
2016-05-17 23:40:05 +03:00
|
|
|
{items = {"default:pine_sapling"}, rarity = 20},
|
|
|
|
{items = {"ethereal:pine_nuts"}, rarity = 5},
|
|
|
|
{items = {"default:pine_needles"}}
|
2014-11-09 22:17:41 +03:00
|
|
|
}
|
2021-11-27 13:54:46 +03:00
|
|
|
}
|
2014-11-09 22:17:41 +03:00
|
|
|
})
|
2016-05-17 23:40:05 +03:00
|
|
|
|
|
|
|
-- default acacia tree leaves
|
2024-08-16 13:05:33 +03:00
|
|
|
|
2015-07-24 13:11:22 +03:00
|
|
|
minetest.override_item("default:acacia_leaves", {
|
|
|
|
drawtype = leaftype,
|
2016-05-17 23:40:05 +03:00
|
|
|
inventory_image = "default_acacia_leaves.png",
|
|
|
|
wield_image = "default_acacia_leaves.png",
|
2020-06-28 22:58:37 +03:00
|
|
|
visual_scale = leafscale,
|
2021-11-27 13:54:46 +03:00
|
|
|
walkable = ethereal.leafwalk
|
2016-05-17 23:40:05 +03:00
|
|
|
})
|
|
|
|
|
|
|
|
-- default aspen tree leaves
|
2024-08-16 13:05:33 +03:00
|
|
|
|
2016-05-17 23:40:05 +03:00
|
|
|
minetest.override_item("default:aspen_leaves", {
|
|
|
|
drawtype = leaftype,
|
|
|
|
inventory_image = "default_aspen_leaves.png",
|
|
|
|
wield_image = "default_aspen_leaves.png",
|
2020-06-28 22:58:37 +03:00
|
|
|
visual_scale = leafscale,
|
2021-11-27 13:54:46 +03:00
|
|
|
walkable = ethereal.leafwalk
|
2015-07-24 13:11:22 +03:00
|
|
|
})
|
2014-11-09 22:17:41 +03:00
|
|
|
|
2016-05-17 23:40:05 +03:00
|
|
|
-- willow twig
|
2024-08-16 13:05:33 +03:00
|
|
|
|
2014-11-09 22:17:41 +03:00
|
|
|
minetest.register_node("ethereal:willow_twig", {
|
2016-06-09 17:08:34 +03:00
|
|
|
description = S("Willow Twig"),
|
2014-11-09 22:17:41 +03:00
|
|
|
drawtype = "plantlike",
|
2021-04-02 23:06:43 +03:00
|
|
|
tiles = {"ethereal_willow_twig.png"},
|
|
|
|
inventory_image = "ethereal_willow_twig.png",
|
|
|
|
wield_image = "ethereal_willow_twig.png",
|
2014-11-09 22:17:41 +03:00
|
|
|
paramtype = "light",
|
2016-01-21 17:59:28 +03:00
|
|
|
walkable = ethereal.leafwalk,
|
2023-04-19 10:15:53 +03:00
|
|
|
visual_scale = 1.4,
|
2014-11-09 22:17:41 +03:00
|
|
|
waving = 1,
|
2015-07-04 14:22:39 +03:00
|
|
|
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
|
2014-11-09 22:17:41 +03:00
|
|
|
drop = {
|
|
|
|
max_items = 1,
|
|
|
|
items = {
|
2015-07-04 14:22:39 +03:00
|
|
|
{items = {"ethereal:willow_sapling"}, rarity = 50},
|
|
|
|
{items = {"ethereal:willow_twig"}}
|
2014-11-09 22:17:41 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
2021-04-02 23:06:43 +03:00
|
|
|
after_place_node = default.after_place_leaves
|
2014-11-09 22:17:41 +03:00
|
|
|
})
|
|
|
|
|
2016-05-17 23:40:05 +03:00
|
|
|
-- redwood leaves
|
2024-08-16 13:05:33 +03:00
|
|
|
|
2014-11-09 22:17:41 +03:00
|
|
|
minetest.register_node("ethereal:redwood_leaves", {
|
2016-06-09 17:08:34 +03:00
|
|
|
description = S("Redwood Leaves"),
|
2014-11-09 22:17:41 +03:00
|
|
|
drawtype = leaftype,
|
2020-06-28 22:58:37 +03:00
|
|
|
visual_scale = leafscale,
|
2021-04-02 23:06:43 +03:00
|
|
|
tiles = {"ethereal_redwood_leaves.png"},
|
|
|
|
inventory_image = "ethereal_redwood_leaves.png",
|
|
|
|
wield_image = "ethereal_redwood_leaves.png",
|
2014-11-09 22:17:41 +03:00
|
|
|
paramtype = "light",
|
2016-01-21 17:59:28 +03:00
|
|
|
walkable = ethereal.leafwalk,
|
2014-11-09 22:17:41 +03:00
|
|
|
waving = 1,
|
2015-07-04 14:22:39 +03:00
|
|
|
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
|
2014-11-09 22:17:41 +03:00
|
|
|
drop = {
|
|
|
|
max_items = 1,
|
|
|
|
items = {
|
2015-07-04 14:22:39 +03:00
|
|
|
{items = {"ethereal:redwood_sapling"}, rarity = 50},
|
|
|
|
{items = {"ethereal:redwood_leaves"}}
|
2014-11-09 22:17:41 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
2021-04-02 23:06:43 +03:00
|
|
|
after_place_node = default.after_place_leaves
|
2014-11-09 22:17:41 +03:00
|
|
|
})
|
|
|
|
|
2016-05-17 23:40:05 +03:00
|
|
|
-- orange tree leaves
|
2024-08-16 13:05:33 +03:00
|
|
|
|
2014-11-09 22:17:41 +03:00
|
|
|
minetest.register_node("ethereal:orange_leaves", {
|
2016-06-09 17:08:34 +03:00
|
|
|
description = S("Orange Leaves"),
|
2014-11-09 22:17:41 +03:00
|
|
|
drawtype = leaftype,
|
2020-06-28 22:58:37 +03:00
|
|
|
visual_scale = leafscale,
|
2021-04-02 23:06:43 +03:00
|
|
|
tiles = {"ethereal_orange_leaves.png"},
|
|
|
|
inventory_image = "ethereal_orange_leaves.png",
|
|
|
|
wield_image = "ethereal_orange_leaves.png",
|
2014-11-09 22:17:41 +03:00
|
|
|
paramtype = "light",
|
2016-01-21 17:59:28 +03:00
|
|
|
walkable = ethereal.leafwalk,
|
2014-11-09 22:17:41 +03:00
|
|
|
waving = 1,
|
2015-07-04 14:22:39 +03:00
|
|
|
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
|
2014-11-09 22:17:41 +03:00
|
|
|
drop = {
|
|
|
|
max_items = 1,
|
|
|
|
items = {
|
2016-01-31 17:25:48 +03:00
|
|
|
{items = {"ethereal:orange_tree_sapling"}, rarity = 15},
|
2015-07-04 14:22:39 +03:00
|
|
|
{items = {"ethereal:orange_leaves"}}
|
2014-11-09 22:17:41 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
2021-04-02 23:06:43 +03:00
|
|
|
after_place_node = default.after_place_leaves
|
2014-11-09 22:17:41 +03:00
|
|
|
})
|
|
|
|
|
2016-05-17 23:40:05 +03:00
|
|
|
-- banana tree leaves
|
2024-08-16 13:05:33 +03:00
|
|
|
|
2014-11-09 22:17:41 +03:00
|
|
|
minetest.register_node("ethereal:bananaleaves", {
|
2016-06-09 17:08:34 +03:00
|
|
|
description = S("Banana Leaves"),
|
2014-11-09 22:17:41 +03:00
|
|
|
drawtype = leaftype,
|
2020-06-28 22:58:37 +03:00
|
|
|
visual_scale = leafscale,
|
2021-04-02 23:06:43 +03:00
|
|
|
tiles = {"ethereal_banana_leaf.png"},
|
|
|
|
inventory_image = "ethereal_banana_leaf.png",
|
|
|
|
wield_image = "ethereal_banana_leaf.png",
|
2014-11-09 22:17:41 +03:00
|
|
|
paramtype = "light",
|
2016-01-21 17:59:28 +03:00
|
|
|
walkable = ethereal.leafwalk,
|
2014-11-09 22:17:41 +03:00
|
|
|
waving = 1,
|
2015-07-04 14:22:39 +03:00
|
|
|
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
|
2014-11-09 22:17:41 +03:00
|
|
|
drop = {
|
|
|
|
max_items = 1,
|
|
|
|
items = {
|
2016-05-17 23:40:05 +03:00
|
|
|
{items = {"ethereal:banana_tree_sapling"}, rarity = 10},
|
2015-07-04 14:22:39 +03:00
|
|
|
{items = {"ethereal:bananaleaves"}}
|
2014-11-09 22:17:41 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
2021-04-02 23:06:43 +03:00
|
|
|
after_place_node = default.after_place_leaves
|
2014-11-09 22:17:41 +03:00
|
|
|
})
|
|
|
|
|
2016-05-17 23:40:05 +03:00
|
|
|
-- healing tree leaves
|
2024-08-16 13:05:33 +03:00
|
|
|
|
2014-11-09 22:17:41 +03:00
|
|
|
minetest.register_node("ethereal:yellowleaves", {
|
2024-07-26 18:54:52 +03:00
|
|
|
description = S("Healing Tree Leaves"),
|
2014-11-09 22:17:41 +03:00
|
|
|
drawtype = leaftype,
|
2020-06-28 22:58:37 +03:00
|
|
|
visual_scale = leafscale,
|
2021-04-02 23:06:43 +03:00
|
|
|
tiles = {"ethereal_yellow_leaves.png"},
|
|
|
|
inventory_image = "ethereal_yellow_leaves.png",
|
|
|
|
wield_image = "ethereal_yellow_leaves.png",
|
2014-11-09 22:17:41 +03:00
|
|
|
paramtype = "light",
|
2016-01-21 17:59:28 +03:00
|
|
|
walkable = ethereal.leafwalk,
|
2014-11-09 22:17:41 +03:00
|
|
|
waving = 1,
|
2024-07-26 16:20:20 +03:00
|
|
|
groups = {snappy = 3, leafdecay = 3, leaves = 1, eatable = 1},
|
2014-11-09 22:17:41 +03:00
|
|
|
drop = {
|
|
|
|
max_items = 1,
|
|
|
|
items = {
|
2015-07-04 14:22:39 +03:00
|
|
|
{items = {"ethereal:yellow_tree_sapling"}, rarity = 50},
|
|
|
|
{items = {"ethereal:yellowleaves"}}
|
2014-11-09 22:17:41 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
on_use = minetest.item_eat(1),
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
2015-04-25 11:05:34 +03:00
|
|
|
after_place_node = default.after_place_leaves,
|
2021-04-02 23:06:43 +03:00
|
|
|
light_source = 9
|
2014-11-09 22:17:41 +03:00
|
|
|
})
|
|
|
|
|
2016-05-17 23:40:05 +03:00
|
|
|
-- palm tree leaves
|
2024-08-16 13:05:33 +03:00
|
|
|
|
2014-11-09 22:17:41 +03:00
|
|
|
minetest.register_node("ethereal:palmleaves", {
|
2016-06-09 17:08:34 +03:00
|
|
|
description = S("Palm Leaves"),
|
2014-11-09 22:17:41 +03:00
|
|
|
drawtype = leaftype,
|
2020-06-28 22:58:37 +03:00
|
|
|
visual_scale = leafscale,
|
2014-11-09 22:17:41 +03:00
|
|
|
tiles = {"moretrees_palm_leaves.png"},
|
|
|
|
inventory_image = "moretrees_palm_leaves.png",
|
2015-11-23 23:43:48 +03:00
|
|
|
wield_image = "moretrees_palm_leaves.png",
|
2014-11-09 22:17:41 +03:00
|
|
|
paramtype = "light",
|
2016-01-21 17:59:28 +03:00
|
|
|
walkable = ethereal.leafwalk,
|
2014-11-09 22:17:41 +03:00
|
|
|
waving = 1,
|
2015-07-04 14:22:39 +03:00
|
|
|
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
|
2014-11-09 22:17:41 +03:00
|
|
|
drop = {
|
|
|
|
max_items = 1,
|
|
|
|
items = {
|
2016-07-12 22:27:07 +03:00
|
|
|
{items = {"ethereal:palm_sapling"}, rarity = 10},
|
2015-07-04 14:22:39 +03:00
|
|
|
{items = {"ethereal:palmleaves"}}
|
2014-11-09 22:17:41 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
2021-04-02 23:06:43 +03:00
|
|
|
after_place_node = default.after_place_leaves
|
2015-11-14 13:21:06 +03:00
|
|
|
})
|
|
|
|
|
2016-05-17 23:40:05 +03:00
|
|
|
-- birch tree leaves
|
2024-08-16 13:05:33 +03:00
|
|
|
|
2015-11-14 13:21:06 +03:00
|
|
|
minetest.register_node("ethereal:birch_leaves", {
|
2016-06-09 17:08:34 +03:00
|
|
|
description = S("Birch Leaves"),
|
2015-11-14 13:21:06 +03:00
|
|
|
drawtype = leaftype,
|
2020-06-28 22:58:37 +03:00
|
|
|
visual_scale = leafscale,
|
2015-11-14 13:21:06 +03:00
|
|
|
tiles = {"moretrees_birch_leaves.png"},
|
|
|
|
inventory_image = "moretrees_birch_leaves.png",
|
2015-11-23 23:43:48 +03:00
|
|
|
wield_image = "moretrees_birch_leaves.png",
|
2015-11-14 13:21:06 +03:00
|
|
|
paramtype = "light",
|
2016-01-21 17:59:28 +03:00
|
|
|
walkable = ethereal.leafwalk,
|
2015-11-14 13:21:06 +03:00
|
|
|
waving = 1,
|
|
|
|
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
|
|
|
|
drop = {
|
|
|
|
max_items = 1,
|
|
|
|
items = {
|
|
|
|
{items = {"ethereal:birch_sapling"}, rarity = 20},
|
|
|
|
{items = {"ethereal:birch_leaves"}}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
2021-04-02 23:06:43 +03:00
|
|
|
after_place_node = default.after_place_leaves
|
2014-11-09 22:17:41 +03:00
|
|
|
})
|
|
|
|
|
2016-05-17 23:40:05 +03:00
|
|
|
-- frost tree leaves
|
2024-08-16 13:05:33 +03:00
|
|
|
|
2016-05-17 23:40:05 +03:00
|
|
|
minetest.register_node("ethereal:frost_leaves", {
|
2016-06-09 17:08:34 +03:00
|
|
|
description = S("Frost Leaves"),
|
2014-11-09 22:17:41 +03:00
|
|
|
drawtype = leaftype,
|
2020-06-28 22:58:37 +03:00
|
|
|
visual_scale = leafscale,
|
2016-05-17 23:40:05 +03:00
|
|
|
tiles = {"ethereal_frost_leaves.png"},
|
|
|
|
inventory_image = "ethereal_frost_leaves.png",
|
|
|
|
wield_image = "ethereal_frost_leaves.png",
|
|
|
|
paramtype = "light",
|
2016-01-21 17:59:28 +03:00
|
|
|
walkable = ethereal.leafwalk,
|
2016-05-17 23:40:05 +03:00
|
|
|
waving = 1,
|
|
|
|
groups = {snappy = 3, leafdecay = 3, leaves = 1, puts_out_fire = 1},
|
2014-11-09 22:17:41 +03:00
|
|
|
drop = {
|
|
|
|
max_items = 1,
|
|
|
|
items = {
|
2016-05-17 23:40:05 +03:00
|
|
|
{items = {"ethereal:frost_tree_sapling"}, rarity = 15},
|
|
|
|
{items = {"ethereal:frost_leaves"}}
|
2014-11-09 22:17:41 +03:00
|
|
|
}
|
|
|
|
},
|
2016-05-17 23:40:05 +03:00
|
|
|
light_source = 9,
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
2021-04-02 23:06:43 +03:00
|
|
|
after_place_node = default.after_place_leaves
|
2014-11-09 22:17:41 +03:00
|
|
|
})
|
|
|
|
|
2016-05-17 23:40:05 +03:00
|
|
|
-- bamboo stalk leaves
|
2024-08-16 13:05:33 +03:00
|
|
|
|
2016-05-17 23:40:05 +03:00
|
|
|
minetest.register_node("ethereal:bamboo_leaves", {
|
2016-06-09 17:08:34 +03:00
|
|
|
description = S("Bamboo Leaves"),
|
2014-11-09 22:17:41 +03:00
|
|
|
drawtype = leaftype,
|
2020-06-28 22:58:37 +03:00
|
|
|
visual_scale = leafscale,
|
2021-04-02 23:06:43 +03:00
|
|
|
tiles = {"ethereal_bamboo_leaves.png"},
|
|
|
|
inventory_image = "ethereal_bamboo_leaves.png",
|
|
|
|
wield_image = "ethereal_bamboo_leaves.png",
|
2014-11-09 22:17:41 +03:00
|
|
|
paramtype = "light",
|
2016-01-21 17:59:28 +03:00
|
|
|
walkable = ethereal.leafwalk,
|
2014-11-09 22:17:41 +03:00
|
|
|
waving = 1,
|
2016-05-17 23:40:05 +03:00
|
|
|
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
|
2014-11-09 22:17:41 +03:00
|
|
|
drop = {
|
|
|
|
max_items = 1,
|
|
|
|
items = {
|
2016-05-17 23:40:05 +03:00
|
|
|
{items = {"ethereal:bamboo_sprout"}, rarity = 10},
|
|
|
|
{items = {"ethereal:bamboo_leaves"}}
|
2014-11-09 22:17:41 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
2021-04-02 23:06:43 +03:00
|
|
|
after_place_node = default.after_place_leaves
|
2019-02-16 15:23:14 +03:00
|
|
|
})
|
|
|
|
|
|
|
|
-- sakura leaves
|
2024-08-16 13:05:33 +03:00
|
|
|
|
2019-02-16 15:23:14 +03:00
|
|
|
minetest.register_node("ethereal:sakura_leaves", {
|
|
|
|
description = S("Sakura Leaves"),
|
|
|
|
drawtype = leaftype,
|
2020-06-28 22:58:37 +03:00
|
|
|
visual_scale = leafscale,
|
2019-02-16 15:23:14 +03:00
|
|
|
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(),
|
2021-04-02 23:06:43 +03:00
|
|
|
after_place_node = default.after_place_leaves
|
2019-02-16 15:23:14 +03:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("ethereal:sakura_leaves2", {
|
|
|
|
description = S("Sakura Leaves"),
|
|
|
|
drawtype = leaftype,
|
2020-06-28 22:58:37 +03:00
|
|
|
visual_scale = leafscale,
|
2019-02-16 15:23:14 +03:00
|
|
|
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(),
|
2021-04-02 23:06:43 +03:00
|
|
|
after_place_node = default.after_place_leaves
|
2014-11-09 22:17:41 +03:00
|
|
|
})
|
|
|
|
|
2020-12-12 23:04:59 +03:00
|
|
|
-- lemon tree leaves
|
2024-08-16 13:05:33 +03:00
|
|
|
|
2020-12-12 23:04:59 +03:00
|
|
|
minetest.register_node("ethereal:lemon_leaves", {
|
|
|
|
description = S("Lemon Tree Leaves"),
|
|
|
|
drawtype = leaftype,
|
|
|
|
visual_scale = leafscale,
|
2021-04-02 23:06:43 +03:00
|
|
|
tiles = {"ethereal_lemon_leaves.png"},
|
|
|
|
inventory_image = "ethereal_lemon_leaves.png",
|
|
|
|
wield_image = "ethereal_lemon_leaves.png",
|
2020-12-12 23:04:59 +03:00
|
|
|
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(),
|
2021-04-02 23:06:43 +03:00
|
|
|
after_place_node = default.after_place_leaves
|
2020-12-12 23:04:59 +03:00
|
|
|
})
|
|
|
|
|
|
|
|
-- olive tree leaves
|
2024-08-16 13:05:33 +03:00
|
|
|
|
2020-12-12 23:04:59 +03:00
|
|
|
minetest.register_node("ethereal:olive_leaves", {
|
|
|
|
description = S("Olive Tree Leaves"),
|
|
|
|
drawtype = leaftype,
|
|
|
|
visual_scale = leafscale,
|
2021-04-02 23:06:43 +03:00
|
|
|
tiles = {"ethereal_olive_leaves.png"},
|
|
|
|
inventory_image = "ethereal_olive_leaves.png",
|
|
|
|
wield_image = "ethereal_olive_leaves.png",
|
2020-12-12 23:04:59 +03:00
|
|
|
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(),
|
2021-04-02 23:06:43 +03:00
|
|
|
after_place_node = default.after_place_leaves
|
2020-12-12 23:04:59 +03:00
|
|
|
})
|
|
|
|
|
2024-08-16 13:05:33 +03:00
|
|
|
-- red mushroom top
|
|
|
|
|
2014-11-09 22:17:41 +03:00
|
|
|
minetest.register_node("ethereal:mushroom", {
|
2016-06-09 17:08:34 +03:00
|
|
|
description = S("Mushroom Cap"),
|
2021-04-02 23:06:43 +03:00
|
|
|
tiles = {"ethereal_mushroom_block.png"},
|
2020-09-23 22:42:07 +03:00
|
|
|
groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2, leafdecay = 3},
|
2014-11-09 22:17:41 +03:00
|
|
|
drop = {
|
|
|
|
max_items = 1,
|
|
|
|
items = {
|
2015-07-04 14:22:39 +03:00
|
|
|
{items = {"ethereal:mushroom_sapling"}, rarity = 20},
|
|
|
|
{items = {"ethereal:mushroom"}}
|
2014-11-09 22:17:41 +03:00
|
|
|
}
|
|
|
|
},
|
2021-04-02 23:06:43 +03:00
|
|
|
sounds = default.node_sound_wood_defaults()
|
2014-11-09 22:17:41 +03:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "fuel",
|
|
|
|
recipe = "ethereal:mushroom",
|
2021-04-02 23:06:43 +03:00
|
|
|
burntime = 10
|
2014-11-09 22:17:41 +03:00
|
|
|
})
|
|
|
|
|
2024-08-16 13:05:33 +03:00
|
|
|
-- brown mushroom top
|
|
|
|
|
2024-05-07 09:34:52 +03:00
|
|
|
minetest.register_node("ethereal:mushroom_brown", {
|
|
|
|
description = S("Brown Mushroom Cap"),
|
|
|
|
tiles = {"ethereal_mushroom_block_brown.png"},
|
|
|
|
groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2, leafdecay = 3},
|
|
|
|
drop = {
|
|
|
|
max_items = 1,
|
|
|
|
items = {
|
|
|
|
{items = {"ethereal:mushroom_brown_sapling"}, rarity = 15},
|
|
|
|
{items = {"ethereal:mushroom_brown"}}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
sounds = default.node_sound_wood_defaults()
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "fuel",
|
|
|
|
recipe = "ethereal:mushroom_brown",
|
|
|
|
burntime = 10
|
|
|
|
})
|
|
|
|
|
2016-05-17 23:40:05 +03:00
|
|
|
-- mushroom pore (spongelike material found inside giant shrooms)
|
2024-08-16 13:05:33 +03:00
|
|
|
|
2014-11-09 22:17:41 +03:00
|
|
|
minetest.register_node("ethereal:mushroom_pore", {
|
2016-06-09 17:08:34 +03:00
|
|
|
description = S("Mushroom Pore"),
|
2021-04-02 23:06:43 +03:00
|
|
|
tiles = {"ethereal_mushroom_pore.png"},
|
2015-07-04 14:22:39 +03:00
|
|
|
groups = {
|
|
|
|
snappy = 3, cracky = 3, choppy = 3, oddly_breakable_by_hand = 3,
|
2020-09-23 22:42:07 +03:00
|
|
|
flammable = 2, disable_jump = 1, fall_damage_add_percent = -100,
|
|
|
|
leafdecay = 3
|
2015-07-04 14:22:39 +03:00
|
|
|
},
|
2021-04-02 23:06:43 +03:00
|
|
|
sounds = default.node_sound_dirt_defaults()
|
2015-08-31 19:40:29 +03:00
|
|
|
})
|
|
|
|
|
2017-01-27 21:53:38 +03:00
|
|
|
minetest.register_craft({
|
|
|
|
type = "fuel",
|
|
|
|
recipe = "ethereal:mushroom_pore",
|
2021-04-02 23:06:43 +03:00
|
|
|
burntime = 3
|
2017-01-27 21:53:38 +03:00
|
|
|
})
|
|
|
|
|
2016-05-17 23:40:05 +03:00
|
|
|
-- hedge block
|
2024-08-16 13:05:33 +03:00
|
|
|
|
2015-08-31 19:40:29 +03:00
|
|
|
minetest.register_node("ethereal:bush", {
|
2016-06-09 17:08:34 +03:00
|
|
|
description = S("Bush"),
|
2015-08-31 19:40:29 +03:00
|
|
|
tiles = {"ethereal_bush.png"},
|
|
|
|
walkable = true,
|
|
|
|
groups = {snappy = 3, flammable = 2},
|
2021-04-02 23:06:43 +03:00
|
|
|
sounds = default.node_sound_leaves_defaults()
|
2015-08-31 19:40:29 +03:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "ethereal:bush",
|
|
|
|
recipe = {
|
|
|
|
{"group:leaves", "group:leaves", "group:leaves"},
|
2016-05-17 23:40:05 +03:00
|
|
|
{"group:leaves", "ethereal:bamboo_leaves", "group:leaves"},
|
2021-04-02 23:06:43 +03:00
|
|
|
{"group:leaves", "group:leaves", "group:leaves"}
|
2016-05-17 23:40:05 +03:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2017-01-27 21:53:38 +03:00
|
|
|
minetest.register_craft({
|
|
|
|
type = "fuel",
|
|
|
|
recipe = "ethereal:bush",
|
2021-04-02 23:06:43 +03:00
|
|
|
burntime = 1
|
2017-01-27 21:53:38 +03:00
|
|
|
})
|
|
|
|
|
2016-05-17 23:40:05 +03:00
|
|
|
-- bush block #2
|
2024-08-16 13:05:33 +03:00
|
|
|
|
2016-05-17 23:40:05 +03:00
|
|
|
minetest.register_node("ethereal:bush2", {
|
|
|
|
drawtype = "allfaces_optional",
|
2016-06-09 17:08:34 +03:00
|
|
|
description = S("Bush #2"),
|
2016-05-17 23:40:05 +03:00
|
|
|
tiles = {"default_aspen_leaves.png"},
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = true,
|
|
|
|
groups = {snappy = 3, flammable = 2},
|
2021-04-02 23:06:43 +03:00
|
|
|
sounds = default.node_sound_leaves_defaults()
|
2016-05-17 23:40:05 +03:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "ethereal:bush2",
|
|
|
|
recipe = {
|
|
|
|
{"group:leaves", "group:leaves", "group:leaves"},
|
|
|
|
{"group:leaves", "default:aspen_leaves", "group:leaves"},
|
2021-04-02 23:06:43 +03:00
|
|
|
{"group:leaves", "group:leaves", "group:leaves"}
|
2015-08-31 19:40:29 +03:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2017-01-27 21:53:38 +03:00
|
|
|
minetest.register_craft({
|
|
|
|
type = "fuel",
|
|
|
|
recipe = "ethereal:bush2",
|
2021-04-02 23:06:43 +03:00
|
|
|
burntime = 1
|
2017-01-27 21:53:38 +03:00
|
|
|
})
|
|
|
|
|
2016-05-17 23:40:05 +03:00
|
|
|
-- bush block #3
|
2024-08-16 13:05:33 +03:00
|
|
|
|
2016-05-17 23:40:05 +03:00
|
|
|
minetest.register_node("ethereal:bush3", {
|
|
|
|
drawtype = "allfaces_optional",
|
2016-06-09 17:08:34 +03:00
|
|
|
description = S("Bush #3"),
|
2016-05-17 23:40:05 +03:00
|
|
|
tiles = {"default_pine_needles.png"},
|
2015-08-31 19:40:29 +03:00
|
|
|
paramtype = "light",
|
2016-05-17 23:40:05 +03:00
|
|
|
walkable = true,
|
|
|
|
groups = {snappy = 3, flammable = 2},
|
2021-04-02 23:06:43 +03:00
|
|
|
sounds = default.node_sound_leaves_defaults()
|
2016-05-17 23:40:05 +03:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
output = "ethereal:bush3",
|
|
|
|
recipe = {
|
|
|
|
{"group:leaves", "group:leaves", "group:leaves"},
|
|
|
|
{"group:leaves", "default:pine_needles", "group:leaves"},
|
2021-04-02 23:06:43 +03:00
|
|
|
{"group:leaves", "group:leaves", "group:leaves"}
|
2016-05-17 23:40:05 +03:00
|
|
|
}
|
2015-11-23 23:43:48 +03:00
|
|
|
})
|
2017-01-27 21:53:38 +03:00
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "fuel",
|
|
|
|
recipe = "ethereal:bush3",
|
2021-04-02 23:06:43 +03:00
|
|
|
burntime = 1
|
2017-01-27 21:53:38 +03:00
|
|
|
})
|
2017-02-28 22:33:34 +03:00
|
|
|
|
2023-06-08 18:06:57 +03:00
|
|
|
-- basandra bush stem, leaves
|
2024-08-16 13:05:33 +03:00
|
|
|
|
2023-06-08 18:06:57 +03:00
|
|
|
minetest.register_node("ethereal:basandra_bush_stem", {
|
|
|
|
description = S("Basandra Bush Stem"),
|
|
|
|
drawtype = "plantlike",
|
|
|
|
visual_scale = 1.41,
|
2023-06-22 16:57:56 +03:00
|
|
|
walkable = false,
|
2023-06-08 18:06:57 +03:00
|
|
|
damage_per_second = 2,
|
|
|
|
tiles = {"ethereal_basandra_bush_stem.png"},
|
|
|
|
inventory_image = "ethereal_basandra_bush_stem.png",
|
|
|
|
wield_image = "ethereal_basandra_bush_stem.png",
|
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
|
|
|
sounds = default.node_sound_wood_defaults(),
|
|
|
|
selection_box = {
|
2024-08-16 13:05:33 +03:00
|
|
|
type = "fixed", fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, 0.5, 7 / 16},
|
2023-06-08 18:06:57 +03:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("ethereal:basandra_bush_leaves", {
|
|
|
|
description = S("Basandra Bush Leaves"),
|
|
|
|
drawtype = "allfaces_optional",
|
|
|
|
tiles = {"ethereal_basandra_bush_leaves.png"},
|
|
|
|
paramtype = "light",
|
|
|
|
groups = {snappy = 3, flammable = 2, leaves = 1},
|
|
|
|
drop = {
|
|
|
|
max_items = 1,
|
|
|
|
items = {
|
|
|
|
{items = {"ethereal:basandra_bush_sapling"}, rarity = 5},
|
|
|
|
{items = {"ethereal:basandra_bush_leaves"}}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
sounds = default.node_sound_leaves_defaults()
|
|
|
|
})
|
2022-09-30 19:26:44 +03:00
|
|
|
|
2024-08-16 13:05:33 +03:00
|
|
|
-- leafdecay helper function
|
|
|
|
|
|
|
|
local function decay(tru, lea, rad)
|
|
|
|
default.register_leafdecay({trunks = tru, leaves = lea, radius = rad})
|
2017-02-28 22:33:34 +03:00
|
|
|
end
|
2024-08-16 13:05:33 +03:00
|
|
|
|
|
|
|
-- add leafdecay registrations
|
|
|
|
|
|
|
|
decay({"default:tree"}, {"default:apple", "default:leaves", "ethereal:orange",
|
|
|
|
"ethereal:orange_leaves", "ethereal:lemon", "ethereal:lemon_leaves",
|
|
|
|
"ethereal:vine"}, 3)
|
|
|
|
|
|
|
|
decay({"ethereal:willow_trunk"}, {"ethereal:willow_twig"}, 3)
|
|
|
|
|
|
|
|
decay({"ethereal:redwood_trunk"}, {"ethereal:redwood_leaves"}, 3)
|
|
|
|
|
|
|
|
decay({"ethereal:frost_tree"}, {"ethereal:frost_leaves"}, 3)
|
|
|
|
|
|
|
|
decay({"ethereal:yellow_trunk"}, {"ethereal:yellowleaves", "ethereal:golden_apple"}, 3)
|
|
|
|
|
|
|
|
decay({"ethereal:palm_trunk"}, {"ethereal:palmleaves", "ethereal:coconut"}, 3)
|
|
|
|
|
|
|
|
decay({"ethereal:banana_trunk"}, {"ethereal:bananaleaves", "ethereal:banana",
|
|
|
|
"ethereal:banana_bunch"}, 3)
|
|
|
|
|
|
|
|
decay({"ethereal:birch_trunk"}, {"ethereal:birch_leaves"}, 3)
|
|
|
|
|
|
|
|
decay({"ethereal:bamboo"}, {"ethereal:bamboo_leaves"}, 3)
|
|
|
|
|
|
|
|
decay({"ethereal:sakura_trunk"}, {"ethereal:sakura_leaves", "ethereal:sakura_leaves2"}, 3)
|
|
|
|
|
|
|
|
decay({"ethereal:olive_trunk"}, {"ethereal:olive_leaves", "ethereal:olive"}, 3)
|
|
|
|
|
|
|
|
decay({"ethereal:mushroom_trunk"}, {"ethereal:mushroom", "ethereal:mushroom_brown",
|
|
|
|
"ethereal:mushroom_pore", "ethereal:lightstring"}, 4)
|
2024-09-09 12:44:10 +03:00
|
|
|
|
2024-09-09 14:08:56 +03:00
|
|
|
-- falling leaf particles
|
2024-09-09 12:44:10 +03:00
|
|
|
|
2024-09-09 14:08:56 +03:00
|
|
|
if minetest.settings:get_bool("ethereal.leaf_particles") ~= false then
|
2024-09-09 12:44:10 +03:00
|
|
|
|
|
|
|
local leaf_list = {
|
|
|
|
{"ethereal:frost_leaves", "331b37", 9},
|
|
|
|
{"ethereal:bananaleaves", "28581e"},
|
|
|
|
{"ethereal:lemon_leaves", "507c1e"},
|
|
|
|
{"ethereal:olive_leaves", "416531"},
|
|
|
|
{"ethereal:orange_leaves", "1a3b1b"},
|
|
|
|
{"ethereal:redwood_leaves", "15342a"},
|
|
|
|
{"ethereal:sakura_leaves", "c281a9"},
|
|
|
|
{"ethereal:sakura_leaves2", "d4cbac"},
|
|
|
|
{"ethereal:willow_twig", "0b9445"},
|
|
|
|
{"ethereal:yellowleaves", "8b5f00", 9},
|
|
|
|
{"ethereal:birch_leaves", "274527"},
|
|
|
|
{"ethereal:palmleaves", "2b6000"},
|
|
|
|
{"ethereal:bamboo_leaves", "445811"},
|
|
|
|
{"default:acacia_leaves", "296600"},
|
|
|
|
{"default:aspen_leaves", "395d16"},
|
|
|
|
{"default:jungleleaves", "141e10"},
|
|
|
|
{"default:pine_needles", "00280e"},
|
|
|
|
{"default:leaves", "223a20"}
|
|
|
|
}
|
|
|
|
|
|
|
|
minetest.register_abm({
|
|
|
|
label = "Ethereal falling leaves",
|
|
|
|
nodenames = {"group:leaves"},
|
|
|
|
neighbors = {"air"},
|
|
|
|
interval = 7,
|
|
|
|
chance = 50,
|
|
|
|
catch_up = false,
|
|
|
|
|
|
|
|
action = function(pos, node)
|
|
|
|
|
2024-09-10 09:23:22 +03:00
|
|
|
local text, glow
|
2024-09-09 12:44:10 +03:00
|
|
|
|
|
|
|
for n = 1, #leaf_list do
|
|
|
|
|
|
|
|
if node.name == leaf_list[n][1] then
|
2024-09-10 09:23:22 +03:00
|
|
|
|
|
|
|
text = "ethereal_falling_leaf.png^[multiply:#"
|
|
|
|
.. leaf_list[n][2] .. "70"
|
|
|
|
|
|
|
|
glow = leaf_list[n][3] ; break
|
2024-09-09 12:44:10 +03:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2024-09-10 09:23:22 +03:00
|
|
|
if text then
|
2024-09-09 12:44:10 +03:00
|
|
|
|
|
|
|
minetest.add_particlespawner({
|
2024-09-13 10:32:29 +03:00
|
|
|
amount = 1,
|
2024-09-09 12:44:10 +03:00
|
|
|
time = 2,
|
|
|
|
minpos = {x = pos.x - 1, y = pos.y - 1, z = pos.z - 1},
|
|
|
|
maxpos = {x = pos.x + 1, y = pos.y, z = pos.z + 1},
|
|
|
|
minvel = {x = -0.8, y = -1, z = -0.8},
|
|
|
|
maxvel = {x = 0.8, y = -3, z = 0.8},
|
|
|
|
minacc = {x = -0.1, y = -1, z = -0.1},
|
|
|
|
mixacc = {x = 0.2, y = -3, z = 0.2},
|
2024-09-13 10:32:29 +03:00
|
|
|
minexptime = 5,
|
2024-09-09 12:44:10 +03:00
|
|
|
maxexptime = 10,
|
2024-09-13 10:32:29 +03:00
|
|
|
minsize = 3,
|
|
|
|
maxsize = 5,
|
2024-09-09 12:44:10 +03:00
|
|
|
collisiondetection = false,
|
2024-09-10 09:23:22 +03:00
|
|
|
texture = text,
|
2024-09-09 12:44:10 +03:00
|
|
|
vertical = true,
|
|
|
|
glow = glow
|
|
|
|
})
|
|
|
|
end
|
|
|
|
end
|
|
|
|
})
|
|
|
|
end
|