}
})
+minetest.register_craft({
+ output = 'default:junglewood 4',
+ recipe = {
+ {'default:jungletree'},
+ }
+})
+
minetest.register_craft({
output = 'default:stick 4',
recipe = {
minetest.register_craft({
type = "fuel",
- recipe = "default:leaves",
+ recipe = "group:leaves",
burntime = 1,
})
burntime = 40,
})
+minetest.register_craft({
+ type = "fuel",
+ recipe = "default:junglesapling",
+ burntime = 10,
+})
+
--
-- Node definitions
--
sounds = default.node_sound_wood_defaults(),
})
+minetest.register_node("default:junglewood", {
+ description = "Junglewood Planks",
+ tiles = {"default_junglewood.png"},
+ is_ground_content = true,
+ groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
+ sounds = default.node_sound_wood_defaults(),
+})
+
+minetest.register_node("default:jungleleaves", {
+ description = "Jungle Leaves",
+ drawtype = "allfaces_optional",
+ visual_scale = 1.3,
+ tiles = {"default_jungleleaves.png"},
+ paramtype = "light",
+ groups = {snappy=3, leafdecay=3, flammable=2, leaves=1},
+ drop = {
+ max_items = 1,
+ items = {
+ {
+ -- player will get sapling with 1/20 chance
+ items = {'default:junglesapling'},
+ rarity = 20,
+ },
+ {
+ -- player will get leaves only if he get no saplings,
+ -- this is because max_items is 1
+ items = {'default:jungleleaves'},
+ }
+ }
+ },
+ sounds = default.node_sound_leaves_defaults(),
+})
+
+minetest.register_node("default:junglesapling", {
+ description = "Jungle Sapling",
+ drawtype = "plantlike",
+ visual_scale = 1.0,
+ tiles = {"default_junglesapling.png"},
+ inventory_image = "default_junglesapling.png",
+ wield_image = "default_junglesapling.png",
+ paramtype = "light",
+ walkable = false,
+ selection_box = {
+ type = "fixed",
+ fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
+ },
+ groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1},
+ sounds = default.node_sound_defaults(),
+})
+-- alias for tree growing abm in content_abm.cpp
+minetest.register_alias("junglesapling", "default:junglesapling")
+
minetest.register_node("default:junglegrass", {
description = "Jungle Grass",
drawtype = "plantlike",
visual_scale = 1.3,
tiles = {"default_leaves.png"},
paramtype = "light",
- groups = {snappy=3, leafdecay=3, flammable=2},
+ groups = {snappy=3, leafdecay=3, flammable=2, leaves=1},
drop = {
max_items = 1,
items = {