2014-11-09 11:17:41 -08:00
|
|
|
-- Leaf style (set in init.lua file)
|
|
|
|
if ethereal.leaftype == 0 then
|
|
|
|
leaftype = "plantlike"
|
|
|
|
else
|
|
|
|
leaftype = "allfaces_optional"
|
|
|
|
end
|
|
|
|
|
|
|
|
--= Define leaves for ALL trees (and Mushroom Tops)
|
|
|
|
|
|
|
|
-- Acacia Leaves
|
2015-07-24 03:11:22 -07:00
|
|
|
if not minetest.registered_nodes["default:acacia_leaves"] then
|
2014-11-09 11:17:41 -08:00
|
|
|
minetest.register_node("ethereal:acacia_leaves", {
|
|
|
|
description = "Acacia Leaves",
|
|
|
|
drawtype = leaftype,
|
|
|
|
tiles = {"moretrees_acacia_leaves.png"},
|
|
|
|
inventory_image = "moretrees_acacia_leaves.png",
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
|
|
|
visual_scale = 1.2,
|
|
|
|
waving = 1,
|
2015-07-04 04:22:39 -07:00
|
|
|
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
|
2014-11-09 11:17:41 -08:00
|
|
|
drop = {
|
|
|
|
max_items = 1,
|
|
|
|
items = {
|
2015-07-04 04:22:39 -07:00
|
|
|
{items = {"ethereal:acacia_sapling"}, rarity = 20},
|
|
|
|
{items = {"ethereal:acacia_leaves"}}
|
2014-11-09 11:17:41 -08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
2015-04-25 01:05:34 -07:00
|
|
|
after_place_node = default.after_place_leaves,
|
2014-11-09 11:17:41 -08:00
|
|
|
})
|
2015-07-24 03:11:22 -07:00
|
|
|
else
|
|
|
|
minetest.override_item("default:acacia_leaves", {
|
|
|
|
drawtype = leaftype,
|
2015-07-25 08:45:29 -07:00
|
|
|
tiles = {"moretrees_acacia_leaves.png"},
|
|
|
|
inventory_image = "moretrees_acacia_leaves.png",
|
2015-07-24 03:11:22 -07:00
|
|
|
visual_scale = 1.2,
|
2015-07-25 08:45:29 -07:00
|
|
|
walkable = false,
|
|
|
|
drop = {
|
|
|
|
max_items = 1,
|
|
|
|
items = {
|
|
|
|
{items = {"ethereal:acacia_sapling"}, rarity = 20},
|
|
|
|
{items = {"ethereal:acacia_leaves"}}
|
|
|
|
}
|
|
|
|
},
|
2015-07-24 03:11:22 -07:00
|
|
|
})
|
2015-07-25 08:45:29 -07:00
|
|
|
minetest.register_alias("ethereal:acacia_leaves", "default:acacia_leaves")
|
2015-07-24 03:11:22 -07:00
|
|
|
end
|
2014-11-09 11:17:41 -08:00
|
|
|
|
|
|
|
-- Willow Twig
|
|
|
|
minetest.register_node("ethereal:willow_twig", {
|
|
|
|
description = "Willow Twig",
|
|
|
|
drawtype = "plantlike",
|
|
|
|
tiles = {"willow_twig.png"},
|
|
|
|
inventory_image = "willow_twig.png",
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
|
|
|
visual_scale = 1.2,
|
|
|
|
waving = 1,
|
2015-07-04 04:22:39 -07:00
|
|
|
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
|
2014-11-09 11:17:41 -08:00
|
|
|
drop = {
|
|
|
|
max_items = 1,
|
|
|
|
items = {
|
2015-07-04 04:22:39 -07:00
|
|
|
{items = {"ethereal:willow_sapling"}, rarity = 50},
|
|
|
|
{items = {"ethereal:willow_twig"}}
|
2014-11-09 11:17:41 -08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
2015-04-25 01:05:34 -07:00
|
|
|
after_place_node = default.after_place_leaves,
|
2014-11-09 11:17:41 -08:00
|
|
|
})
|
|
|
|
|
|
|
|
-- Redwood leaves
|
|
|
|
minetest.register_node("ethereal:redwood_leaves", {
|
|
|
|
description = "Redwood Leaves",
|
|
|
|
drawtype = leaftype,
|
|
|
|
visual_scale = 1.2,
|
|
|
|
tiles = {"redwood_leaves.png"},
|
|
|
|
inventory_image = "redwood_leaves.png",
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
|
|
|
waving = 1,
|
2015-07-04 04:22:39 -07:00
|
|
|
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
|
2014-11-09 11:17:41 -08:00
|
|
|
drop = {
|
|
|
|
max_items = 1,
|
|
|
|
items = {
|
2015-07-04 04:22:39 -07:00
|
|
|
{items = {"ethereal:redwood_sapling"}, rarity = 50},
|
|
|
|
{items = {"ethereal:redwood_leaves"}}
|
2014-11-09 11:17:41 -08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
2015-04-25 01:05:34 -07:00
|
|
|
after_place_node = default.after_place_leaves,
|
2014-11-09 11:17:41 -08:00
|
|
|
})
|
|
|
|
|
|
|
|
-- Default Apple Tree Leaves
|
2015-05-29 02:25:35 -07:00
|
|
|
minetest.override_item("default:leaves", {
|
2014-11-09 11:17:41 -08:00
|
|
|
drawtype = leaftype,
|
|
|
|
visual_scale = 1.2,
|
|
|
|
inventory_image = "default_leaves.png",
|
|
|
|
walkable = false,
|
|
|
|
drop = {
|
|
|
|
max_items = 1,
|
|
|
|
items = {
|
2015-07-04 04:22:39 -07:00
|
|
|
{items = {"ethereal:tree_sapling"}, rarity = 20},
|
|
|
|
{items = {"default:leaves"}}
|
2014-11-09 11:17:41 -08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Default Orange Tree Leaves
|
|
|
|
minetest.register_node("ethereal:orange_leaves", {
|
|
|
|
description = "Orange Leaves",
|
|
|
|
drawtype = leaftype,
|
|
|
|
visual_scale = 1.2,
|
|
|
|
tiles = {"orange_leaves.png"},
|
|
|
|
inventory_image = "orange_leaves.png",
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
|
|
|
waving = 1,
|
2015-07-04 04:22:39 -07:00
|
|
|
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
|
2014-11-09 11:17:41 -08:00
|
|
|
drop = {
|
|
|
|
max_items = 1,
|
|
|
|
items = {
|
2015-07-04 04:22:39 -07:00
|
|
|
{items = {"ethereal:orange_tree_sapling"}, rarity = 20},
|
|
|
|
{items = {"ethereal:orange_leaves"}}
|
2014-11-09 11:17:41 -08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
2015-04-25 01:05:34 -07:00
|
|
|
after_place_node = default.after_place_leaves,
|
2014-11-09 11:17:41 -08:00
|
|
|
})
|
|
|
|
|
|
|
|
-- Default Jungle Tree Leaves
|
2015-05-29 02:25:35 -07:00
|
|
|
minetest.override_item("default:jungleleaves", {
|
2014-11-09 11:17:41 -08:00
|
|
|
drawtype = leaftype,
|
|
|
|
visual_scale = 1.2,
|
|
|
|
inventory_image = "default_jungleleaves.png",
|
|
|
|
walkable = false,
|
|
|
|
drop = {
|
|
|
|
max_items = 1,
|
|
|
|
items = {
|
2015-07-04 04:22:39 -07:00
|
|
|
{items = {"ethereal:jungle_tree_sapling"}, rarity = 20},
|
|
|
|
{items = {"default:jungleleaves"}}
|
2014-11-09 11:17:41 -08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Default Banana Tree Leaves
|
|
|
|
minetest.register_node("ethereal:bananaleaves", {
|
|
|
|
description = "Banana Leaves",
|
|
|
|
drawtype = leaftype,
|
|
|
|
visual_scale = 1.2,
|
|
|
|
tiles = {"banana_leaf.png"},
|
|
|
|
inventory_image = "banana_leaf.png",
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
|
|
|
waving = 1,
|
2015-07-04 04:22:39 -07:00
|
|
|
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
|
2014-11-09 11:17:41 -08:00
|
|
|
drop = {
|
|
|
|
max_items = 1,
|
|
|
|
items = {
|
2015-07-04 04:22:39 -07:00
|
|
|
{items = {"ethereal:banana_tree_sapling"}, rarity = 20},
|
|
|
|
{items = {"ethereal:bananaleaves"}}
|
2014-11-09 11:17:41 -08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
2015-04-25 01:05:34 -07:00
|
|
|
after_place_node = default.after_place_leaves,
|
2014-11-09 11:17:41 -08:00
|
|
|
})
|
|
|
|
|
|
|
|
-- Healing Tree Leaves
|
|
|
|
minetest.register_node("ethereal:yellowleaves", {
|
|
|
|
description = "Healing Tree Leaves",
|
|
|
|
drawtype = leaftype,
|
|
|
|
visual_scale = 1.2,
|
|
|
|
tiles = {"yellow_leaves.png"},
|
|
|
|
inventory_image = "yellow_leaves.png",
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
|
|
|
waving = 1,
|
2015-07-04 04:22:39 -07:00
|
|
|
groups = {snappy = 3, leafdecay = 3, leaves = 1},
|
2014-11-09 11:17:41 -08:00
|
|
|
drop = {
|
|
|
|
max_items = 1,
|
|
|
|
items = {
|
2015-07-04 04:22:39 -07:00
|
|
|
{items = {"ethereal:yellow_tree_sapling"}, rarity = 50},
|
|
|
|
{items = {"ethereal:yellowleaves"}}
|
2014-11-09 11:17:41 -08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
-- Leaves are edible, heal half a heart
|
|
|
|
on_use = minetest.item_eat(1),
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
2015-04-25 01:05:34 -07:00
|
|
|
after_place_node = default.after_place_leaves,
|
2014-11-09 11:17:41 -08:00
|
|
|
light_source = 9,
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Palm Tree Leaves
|
|
|
|
minetest.register_node("ethereal:palmleaves", {
|
|
|
|
description = "Palm Leaves",
|
|
|
|
drawtype = leaftype,
|
|
|
|
visual_scale = 1.2,
|
|
|
|
tiles = {"moretrees_palm_leaves.png"},
|
|
|
|
inventory_image = "moretrees_palm_leaves.png",
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
|
|
|
waving = 1,
|
2015-07-04 04:22:39 -07:00
|
|
|
groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2},
|
2014-11-09 11:17:41 -08:00
|
|
|
drop = {
|
|
|
|
max_items = 1,
|
|
|
|
items = {
|
2015-07-04 04:22:39 -07:00
|
|
|
{items = {"ethereal:palm_sapling"}, rarity = 20},
|
|
|
|
{items = {"ethereal:palmleaves"}}
|
2014-11-09 11:17:41 -08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
2015-04-25 01:05:34 -07:00
|
|
|
after_place_node = default.after_place_leaves,
|
2014-11-09 11:17:41 -08:00
|
|
|
})
|
|
|
|
|
|
|
|
-- Pine Tree Leaves
|
2015-07-24 03:11:22 -07:00
|
|
|
minetest.override_item("default:pine_needles", {
|
2014-11-09 11:17:41 -08:00
|
|
|
drawtype = leaftype,
|
|
|
|
visual_scale = 1.2,
|
|
|
|
tiles = {"pine_leaves.png"},
|
|
|
|
inventory_image = "pine_leaves.png",
|
2015-07-25 08:45:29 -07:00
|
|
|
walkable = false,
|
2014-11-09 11:17:41 -08:00
|
|
|
drop = {
|
|
|
|
max_items = 1,
|
|
|
|
items = {
|
2015-07-04 04:22:39 -07:00
|
|
|
{items = {"ethereal:pine_tree_sapling"}, rarity = 20},
|
|
|
|
{items = {"ethereal:pine_nuts"}, rarity = 5},
|
2015-07-29 13:23:37 -07:00
|
|
|
{items = {"default:pine_needles"}}
|
2014-11-09 11:17:41 -08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
})
|
2015-07-24 03:11:22 -07:00
|
|
|
minetest.register_alias("ethereal:pineleaves", "default:pine_needles")
|
2014-11-09 11:17:41 -08:00
|
|
|
|
|
|
|
-- Frost Tree Leaves
|
|
|
|
minetest.register_node("ethereal:frost_leaves", {
|
|
|
|
description = "Frost Leaves",
|
|
|
|
drawtype = leaftype,
|
|
|
|
visual_scale = 1.2,
|
|
|
|
tiles = {"ethereal_frost_leaves.png"},
|
|
|
|
inventory_image = "ethereal_frost_leaves.png",
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
|
|
|
waving = 1,
|
2015-07-04 04:22:39 -07:00
|
|
|
groups = {snappy = 3, leafdecay = 3, leaves = 1, puts_out_fire = 1},
|
2014-11-09 11:17:41 -08:00
|
|
|
drop = {
|
|
|
|
max_items = 1,
|
|
|
|
items = {
|
2015-07-04 04:22:39 -07:00
|
|
|
{items = {"ethereal:frost_tree_sapling"}, rarity = 20},
|
|
|
|
{items = {"ethereal:frost_leaves"}}
|
2014-11-09 11:17:41 -08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
light_source = 9,
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
2015-04-25 01:05:34 -07:00
|
|
|
after_place_node = default.after_place_leaves,
|
2014-11-09 11:17:41 -08:00
|
|
|
})
|
|
|
|
|
|
|
|
-- Mushroom Tops
|
|
|
|
minetest.register_node("ethereal:mushroom", {
|
|
|
|
description = "Mushroom Cap",
|
|
|
|
tiles = {"mushroom_block.png"},
|
2015-07-04 04:22:39 -07:00
|
|
|
groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
2014-11-09 11:17:41 -08:00
|
|
|
drop = {
|
|
|
|
max_items = 1,
|
|
|
|
items = {
|
2015-07-04 04:22:39 -07:00
|
|
|
{items = {"ethereal:mushroom_sapling"}, rarity = 20},
|
|
|
|
{items = {"ethereal:mushroom"}}
|
2014-11-09 11:17:41 -08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
sounds = default.node_sound_wood_defaults(),
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "fuel",
|
|
|
|
recipe = "ethereal:mushroom",
|
|
|
|
burntime = 10,
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Mushroom Pore (Spongelike block inside mushrooms that has special properties)
|
|
|
|
minetest.register_node("ethereal:mushroom_pore", {
|
|
|
|
description = "Mushroom Pore",
|
|
|
|
tiles = {"mushroom_pore.png"},
|
2015-07-04 04:22:39 -07:00
|
|
|
groups = {
|
|
|
|
snappy = 3, cracky = 3, choppy = 3, oddly_breakable_by_hand = 3,
|
|
|
|
disable_jump = 1, fall_damage_add_percent = -100
|
|
|
|
},
|
2014-11-09 11:17:41 -08:00
|
|
|
sounds = default.node_sound_dirt_defaults(),
|
2015-07-04 04:22:39 -07:00
|
|
|
})
|