added birch wood + added a nodebox for string
@ -1,6 +1,39 @@
|
||||
minetest.register_craftitem("default:string", {
|
||||
minetest.register_node("default:string", {
|
||||
description = "String",
|
||||
inventory_image = "default_string.png",
|
||||
tiles = {"default_string_top.png", "default_string_top.png", "default_string.png"},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-2/16, -3/16, -2/16, 2/16, 4/16, 2/16},
|
||||
{-3/16, -4/16, -3/16, 3/16, -3/16, 3/16},
|
||||
{-3/16, 4/16, -3/16, 3/16, 5/16, 3/16}
|
||||
}
|
||||
},
|
||||
placeable = false,
|
||||
groups = {cracky = 3, snappy = 3},
|
||||
on_place = minetest.rotate_and_place,
|
||||
})
|
||||
|
||||
minetest.register_node("default:string_strong", {
|
||||
description = "Strong String",
|
||||
tiles = {"default_string_top.png", "default_string_top.png", "default_string_strong.png"},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-2/16, -3/16, -2/16, 2/16, 4/16, 2/16},
|
||||
{-3/16, -4/16, -3/16, 3/16, -3/16, 3/16},
|
||||
{-3/16, 4/16, -3/16, 3/16, 5/16, 3/16}
|
||||
}
|
||||
},
|
||||
placeable = false,
|
||||
groups = {cracky = 3, snappy = 3},
|
||||
on_place = minetest.rotate_and_place,
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:stone_item", {
|
||||
@ -34,12 +67,6 @@ minetest.register_craftitem("default:ruby", {
|
||||
inventory_image = "default_ruby.png",
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craftitem("default:string_strong", {
|
||||
description = "Strong String",
|
||||
inventory_image = "default_string_strong.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:stick", {
|
||||
description = "Stick",
|
||||
inventory_image = "default_stick.png",
|
||||
|
@ -5,6 +5,7 @@ local modpath = minetest.get_modpath("default")
|
||||
dofile(modpath.."/functions.lua")
|
||||
dofile(modpath.."/player.lua")
|
||||
dofile(modpath.."/craftitems.lua")
|
||||
dofile(modpath.."/trees.lua")
|
||||
dofile(modpath.."/nodes.lua")
|
||||
dofile(modpath.."/tools.lua")
|
||||
dofile(modpath.."/craft.lua")
|
||||
|
@ -299,185 +299,8 @@ minetest.register_node("default:water_flowing", {
|
||||
post_effect_color = {a=100, r=0, g=64, b=200},
|
||||
})
|
||||
|
||||
-- wood
|
||||
|
||||
minetest.register_node("default:wood", {
|
||||
description = "Wood",
|
||||
tiles = {"default_wood.png"},
|
||||
groups = {choppy = 3},
|
||||
sounds = default.sounds.wood(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:wooden_planks", {
|
||||
description = "Wooden Planks",
|
||||
tiles = {"default_wooden_planks.png"},
|
||||
groups = {choppy = 3},
|
||||
sounds = default.sounds.wood(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:wooden_planks_2", {
|
||||
description = "Wooden Planks",
|
||||
tiles = {"default_wooden_planks_2.png"},
|
||||
groups = {choppy = 3},
|
||||
sounds = default.sounds.wood(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:jungle_wood", {
|
||||
description = "Jungle Wood",
|
||||
tiles = {"default_jungle_wood.png"},
|
||||
groups = {choppy = 3},
|
||||
sounds = default.sounds.wood(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:wooden_planks_jungle", {
|
||||
description = "Wooden Planks (Jungle wood)",
|
||||
tiles = {"default_wooden_planks_jungle.png"},
|
||||
groups = {choppy = 3},
|
||||
sounds = default.sounds.wood(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:wooden_planks_2_jungle", {
|
||||
description = "Wooden Planks (Jungle wood)",
|
||||
tiles = {"default_wooden_planks_2_jungle.png"},
|
||||
groups = {choppy = 3},
|
||||
sounds = default.sounds.wood(),
|
||||
})
|
||||
|
||||
-- log
|
||||
|
||||
minetest.register_node("default:log", {
|
||||
description = "Log",
|
||||
tiles = {"default_log_top.png","default_log_top.png","default_log.png"},
|
||||
groups = {choppy = 3},
|
||||
sounds = default.sounds.wood(),
|
||||
paramtype2 = "facedir",
|
||||
on_place = minetest.rotate_and_place,
|
||||
})
|
||||
|
||||
minetest.register_node("default:log_1", {
|
||||
description = "Log (thick)",
|
||||
tiles = {"default_log_top.png","default_log_top.png","default_log.png"},
|
||||
groups = {choppy = 3},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-6/16, -0.5, -6/16, 6/16, 0.5, 6/16},
|
||||
},
|
||||
},
|
||||
sounds = default.sounds.wood(),
|
||||
paramtype2 = "facedir",
|
||||
on_place = minetest.rotate_and_place,
|
||||
})
|
||||
|
||||
minetest.register_node("default:log_2", {
|
||||
description = "Log",
|
||||
tiles = {"default_log_top.png","default_log_top.png","default_log.png"},
|
||||
groups = {choppy = 3},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-4/16, -0.5, -4/16, 4/16, 0.5, 4/16},
|
||||
},
|
||||
},
|
||||
sounds = default.sounds.wood(),
|
||||
paramtype2 = "facedir",
|
||||
on_place = minetest.rotate_and_place,
|
||||
})
|
||||
|
||||
minetest.register_node("default:log_3", {
|
||||
description = "Log (thin)",
|
||||
tiles = {"default_log_top.png","default_log_top.png","default_log.png"},
|
||||
groups = {choppy = 3},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-2/16, -0.5, -2/16, 2/16, 0.5, 2/16},
|
||||
},
|
||||
},
|
||||
sounds = default.sounds.wood(),
|
||||
paramtype2 = "facedir",
|
||||
on_place = minetest.rotate_and_place,
|
||||
})
|
||||
|
||||
minetest.register_node("default:jungle_tree", {
|
||||
description = "Jungle Tree",
|
||||
tiles = {"default_jungle_tree_top.png", "default_jungle_tree_top.png", "default_jungle_tree.png"},
|
||||
groups = {choppy = 3},
|
||||
sounds = default.sounds.wood(),
|
||||
paramtype2 = "facedir",
|
||||
on_place = minetest.rotate_and_place,
|
||||
})
|
||||
|
||||
-- plants
|
||||
|
||||
minetest.register_node("default:sapling", {
|
||||
description = "Sapling",
|
||||
tiles = {"default_sapling.png"},
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
inventory_image = "default_sapling.png",
|
||||
buildable_to = true,
|
||||
walkable = false,
|
||||
groups = {crumbly = 3, sapling = 1},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -0.4, 0.5},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"default:sapling"},
|
||||
neighbors = {"default:grass", "default:dirt"},
|
||||
interval = 1.0,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
minetest.set_node(pos, {name = "air"})
|
||||
if math.random(2) == 1 then
|
||||
local path = minetest.get_modpath("default") .. "/schematics/tree2.mts"
|
||||
minetest.place_schematic({x = pos.x - 1, y = pos.y - 0, z = pos.z - 1}, path, 0, nil, false)
|
||||
else
|
||||
local path = minetest.get_modpath("default") .. "/schematics/tree1.mts"
|
||||
minetest.place_schematic({x = pos.x - 2, y = pos.y - 0, z = pos.z - 2}, path, 0, nil, false)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("default:sapling_2", {
|
||||
description = "Sapling",
|
||||
tiles = {"default_sapling_2.png"},
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
inventory_image = "default_sapling_2.png",
|
||||
buildable_to = true,
|
||||
walkable = false,
|
||||
groups = {crumbly = 3, sapling = 1},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -0.4, 0.5},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"default:sapling_2"},
|
||||
neighbors = {"default:grass", "default:dirt"},
|
||||
interval = 1.0,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
minetest.set_node(pos, {name = "air"})
|
||||
local path = minetest.get_modpath("default") .. "/schematics/pinetree1.mts"
|
||||
minetest.place_schematic({x = pos.x - 2, y = pos.y - 0, z = pos.z - 2}, path, 0, nil, false)
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("default:plant_grass", {
|
||||
description = "Grass (Plant)",
|
||||
tiles = {"default_plant_grass.png"},
|
||||
|
BIN
mods/default/textures/default_log_birch.png
Normal file
After Width: | Height: | Size: 290 B |
BIN
mods/default/textures/default_log_birch_top.png
Normal file
After Width: | Height: | Size: 268 B |
Before Width: | Height: | Size: 245 B After Width: | Height: | Size: 225 B |
Before Width: | Height: | Size: 245 B After Width: | Height: | Size: 225 B |
BIN
mods/default/textures/default_string_top.png
Normal file
After Width: | Height: | Size: 160 B |
BIN
mods/default/textures/default_wood_birch.png
Normal file
After Width: | Height: | Size: 242 B |
BIN
mods/default/textures/default_wooden_planks_2_birch.png
Normal file
After Width: | Height: | Size: 223 B |
BIN
mods/default/textures/default_wooden_planks_birch.png
Normal file
After Width: | Height: | Size: 232 B |
208
mods/default/trees.lua
Normal file
@ -0,0 +1,208 @@
|
||||
-- wood
|
||||
|
||||
minetest.register_node("default:wood", {
|
||||
description = "Wood",
|
||||
tiles = {"default_wood.png"},
|
||||
groups = {choppy = 3},
|
||||
sounds = default.sounds.wood(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:wooden_planks", {
|
||||
description = "Wooden Planks",
|
||||
tiles = {"default_wooden_planks.png"},
|
||||
groups = {choppy = 3},
|
||||
sounds = default.sounds.wood(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:wooden_planks_2", {
|
||||
description = "Wooden Planks",
|
||||
tiles = {"default_wooden_planks_2.png"},
|
||||
groups = {choppy = 3},
|
||||
sounds = default.sounds.wood(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:jungle_wood", {
|
||||
description = "Jungle Wood",
|
||||
tiles = {"default_jungle_wood.png"},
|
||||
groups = {choppy = 3},
|
||||
sounds = default.sounds.wood(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:wooden_planks_jungle", {
|
||||
description = "Wooden Planks (Jungle Wood)",
|
||||
tiles = {"default_wooden_planks_jungle.png"},
|
||||
groups = {choppy = 3},
|
||||
sounds = default.sounds.wood(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:wooden_planks_2_jungle", {
|
||||
description = "Wooden Planks (Jungle Wood)",
|
||||
tiles = {"default_wooden_planks_2_jungle.png"},
|
||||
groups = {choppy = 3},
|
||||
sounds = default.sounds.wood(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:birch_wood", {
|
||||
description = "Birch Wood",
|
||||
tiles = {"default_wood_birch.png"},
|
||||
groups = {choppy = 3},
|
||||
sounds = default.sounds.wood(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:wooden_planks_jungle", {
|
||||
description = "Wooden Planks (Birch Wood)",
|
||||
tiles = {"default_wooden_planks_birch.png"},
|
||||
groups = {choppy = 3},
|
||||
sounds = default.sounds.wood(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:wooden_planks_2_jungle", {
|
||||
description = "Wooden Planks (Birch Wood)",
|
||||
tiles = {"default_wooden_planks_2_birch.png"},
|
||||
groups = {choppy = 3},
|
||||
sounds = default.sounds.wood(),
|
||||
})
|
||||
|
||||
-- log
|
||||
|
||||
minetest.register_node("default:log", {
|
||||
description = "Log",
|
||||
tiles = {"default_log_top.png","default_log_top.png","default_log.png"},
|
||||
groups = {choppy = 3},
|
||||
sounds = default.sounds.wood(),
|
||||
paramtype2 = "facedir",
|
||||
on_place = minetest.rotate_and_place,
|
||||
})
|
||||
|
||||
minetest.register_node("default:log_1", {
|
||||
description = "Log (thick)",
|
||||
tiles = {"default_log_top.png","default_log_top.png","default_log.png"},
|
||||
groups = {choppy = 3},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-6/16, -0.5, -6/16, 6/16, 0.5, 6/16},
|
||||
},
|
||||
},
|
||||
sounds = default.sounds.wood(),
|
||||
paramtype2 = "facedir",
|
||||
on_place = minetest.rotate_and_place,
|
||||
})
|
||||
|
||||
minetest.register_node("default:log_2", {
|
||||
description = "Log",
|
||||
tiles = {"default_log_top.png","default_log_top.png","default_log.png"},
|
||||
groups = {choppy = 3},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-4/16, -0.5, -4/16, 4/16, 0.5, 4/16},
|
||||
},
|
||||
},
|
||||
sounds = default.sounds.wood(),
|
||||
paramtype2 = "facedir",
|
||||
on_place = minetest.rotate_and_place,
|
||||
})
|
||||
|
||||
minetest.register_node("default:log_3", {
|
||||
description = "Log (thin)",
|
||||
tiles = {"default_log_top.png","default_log_top.png","default_log.png"},
|
||||
groups = {choppy = 3},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-2/16, -0.5, -2/16, 2/16, 0.5, 2/16},
|
||||
},
|
||||
},
|
||||
sounds = default.sounds.wood(),
|
||||
paramtype2 = "facedir",
|
||||
on_place = minetest.rotate_and_place,
|
||||
})
|
||||
|
||||
minetest.register_node("default:jungle_tree", {
|
||||
description = "Jungle Tree",
|
||||
tiles = {"default_jungle_tree_top.png", "default_jungle_tree_top.png", "default_jungle_tree.png"},
|
||||
groups = {choppy = 3},
|
||||
sounds = default.sounds.wood(),
|
||||
paramtype2 = "facedir",
|
||||
on_place = minetest.rotate_and_place,
|
||||
})
|
||||
|
||||
minetest.register_node("default:log_birch", {
|
||||
description = "Birch Log",
|
||||
tiles = {"default_log_birch_top.png","default_log_birch_top.png","default_log_birch.png"},
|
||||
groups = {choppy = 3},
|
||||
sounds = default.sounds.wood(),
|
||||
paramtype2 = "facedir",
|
||||
on_place = minetest.rotate_and_place,
|
||||
})
|
||||
|
||||
-- saplings
|
||||
|
||||
minetest.register_node("default:sapling", {
|
||||
description = "Sapling",
|
||||
tiles = {"default_sapling.png"},
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
inventory_image = "default_sapling.png",
|
||||
buildable_to = true,
|
||||
walkable = false,
|
||||
groups = {crumbly = 3, sapling = 1},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -0.4, 0.5},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"default:sapling"},
|
||||
neighbors = {"default:grass", "default:dirt"},
|
||||
interval = 1.0,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
minetest.set_node(pos, {name = "air"})
|
||||
if math.random(2) == 1 then
|
||||
local path = minetest.get_modpath("default") .. "/schematics/tree2.mts"
|
||||
minetest.place_schematic({x = pos.x - 1, y = pos.y - 0, z = pos.z - 1}, path, 0, nil, false)
|
||||
else
|
||||
local path = minetest.get_modpath("default") .. "/schematics/tree1.mts"
|
||||
minetest.place_schematic({x = pos.x - 2, y = pos.y - 0, z = pos.z - 2}, path, 0, nil, false)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("default:sapling_2", {
|
||||
description = "Sapling",
|
||||
tiles = {"default_sapling_2.png"},
|
||||
drawtype = "plantlike",
|
||||
paramtype = "light",
|
||||
inventory_image = "default_sapling_2.png",
|
||||
buildable_to = true,
|
||||
walkable = false,
|
||||
groups = {crumbly = 3, sapling = 1},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -0.4, 0.5},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"default:sapling_2"},
|
||||
neighbors = {"default:grass", "default:dirt"},
|
||||
interval = 1.0,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
minetest.set_node(pos, {name = "air"})
|
||||
local path = minetest.get_modpath("default") .. "/schematics/pinetree1.mts"
|
||||
minetest.place_schematic({x = pos.x - 2, y = pos.y - 0, z = pos.z - 2}, path, 0, nil, false)
|
||||
end,
|
||||
})
|