-- mods/default/nodes.lua
+
+--[[ Node name convention:
+
+Although many node names are in combined-word form, the required form for new
+node names is words separated by underscores. If both forms are used in written
+language (for example pinewood and pine wood) the underscore form should be used.
+
+--]]
+
+
--[[ Index:
Stone
default:jungleleaves
default:junglesapling
-default:pinetree
-default:pinewood
+default:pine_tree
+default:pine_wood
default:pine_needles
default:pine_sapling
-minetest.register_node("default:pinetree", {
+minetest.register_node("default:pine_tree", {
description = "Pine Tree",
- tiles = {
- "default_pinetree_top.png",
- "default_pinetree_top.png",
- "default_pinetree.png"
- },
+ tiles = {"default_pine_tree_top.png", "default_pine_tree_top.png",
+ "default_pine_tree.png"},
paramtype2 = "facedir",
is_ground_content = false,
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
on_place = minetest.rotate_node
})
-minetest.register_node("default:pinewood", {
- description = "Pinewood Planks",
- tiles = {"default_pinewood.png"},
+minetest.register_node("default:pine_wood", {
+ description = "Pine Wood Planks",
+ tiles = {"default_pine_wood.png"},
is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, wood = 1},
sounds = default.node_sound_wood_defaults(),
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,
- sapling = 1
- },
+ groups = {snappy = 2, dig_immediate = 3, flammable = 2,
+ attached_node = 1, sapling = 1},
sounds = default.node_sound_leaves_defaults(),
})
minetest.register_node("default:acacia_tree", {
description = "Acacia Tree",
- tiles = {
- "default_acacia_tree_top.png",
- "default_acacia_tree_top.png",
- "default_acacia_tree.png"
- },
+ tiles = {"default_acacia_tree_top.png", "default_acacia_tree_top.png",
+ "default_acacia_tree.png"},
paramtype2 = "facedir",
is_ground_content = false,
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
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,
- sapling = 1
- },
+ groups = {snappy = 2, dig_immediate = 3, flammable = 2,
+ attached_node = 1, sapling = 1},
sounds = default.node_sound_leaves_defaults(),
})
local c_air = minetest.get_content_id("air")
local c_ignore = minetest.get_content_id("ignore")
- local c_pinetree = minetest.get_content_id("default:pinetree")
+ local c_pine_tree = minetest.get_content_id("default:pine_tree")
local c_pine_needles = minetest.get_content_id("default:pine_needles")
local c_snow = minetest.get_content_id("default:snow")
local c_snowblock = minetest.get_content_id("default:snowblock")
end
-- Trunk
- data[a:index(x, y, z)] = c_pinetree -- Force-place lowest trunk node to replace sapling
+ data[a:index(x, y, z)] = c_pine_tree -- Force-place lowest trunk node to replace sapling
for yy = y + 1, maxy do
local vi = a:index(x, yy, z)
local node_id = data[vi]
- if node_id == c_air or node_id == c_ignore or node_id == c_pine_needles then
- data[vi] = c_pinetree
+ if node_id == c_air or node_id == c_ignore or
+ node_id == c_pine_needles or node_id == c_snow then
+ data[vi] = c_pine_tree
end
end
"Junglewood Slab",
default.node_sound_wood_defaults())
-stairs.register_stair_and_slab("pinewood", "default:pinewood",
+stairs.register_stair_and_slab("pine_wood", "default:pine_wood",
{snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
- {"default_pinewood.png"},
- "Pinewood Stair",
- "Pinewood Slab",
+ {"default_pine_wood.png"},
+ "Pine Wood Stair",
+ "Pine Wood Slab",
default.node_sound_wood_defaults())
stairs.register_stair_and_slab("acacia_wood", "default:acacia_wood",