forked from rudzik8/mcl_decor
117 lines
2.8 KiB
Lua
117 lines
2.8 KiB
Lua
|
-- mcl_decor/paths.lua
|
||
|
|
||
|
local S = minetest.get_translator(minetest.get_current_modname())
|
||
|
|
||
|
--=-- API --=--
|
||
|
function mcl_decor.register_path(name, desc, material, tiles, sgroup, sounds)
|
||
|
minetest.register_node(name, {
|
||
|
description = desc,
|
||
|
tiles = {tiles},
|
||
|
wield_image = "mcl_decor_path_alpha.png^"..tiles.."^" ..
|
||
|
"mcl_decor_path_alpha.png^[makealpha:255,126,126",
|
||
|
inventory_image = "mcl_decor_path_alpha.png^"..tiles.."^" ..
|
||
|
"mcl_decor_path_alpha.png^[makealpha:255,126,126",
|
||
|
groups = {handy=1, [sgroup]=1, attached_node=1, dig_by_piston=1, deco_block=1},
|
||
|
drawtype = "nodebox",
|
||
|
paramtype = "light",
|
||
|
sunlight_propagates = true,
|
||
|
buildable_to = true,
|
||
|
walkable = true,
|
||
|
node_box = {
|
||
|
type = "fixed",
|
||
|
fixed = {
|
||
|
{-0.4375, -0.5, -0.4375, -0.125, -0.4375, -0.125},
|
||
|
{-0.125, -0.5, -0.0625, 0.0625, -0.4375, 0.125},
|
||
|
{-0.3125, -0.5, 0.1875, -0.0625, -0.4375, 0.4375},
|
||
|
{0.0625, -0.5, -0.375, 0.25, -0.4375, -0.1875},
|
||
|
{0.125, -0.5, 0.125, 0.375, -0.4375, 0.375},
|
||
|
{0.25, -0.5, -0.125, 0.375, -0.4375, 0},
|
||
|
{-0.4375, -0.5, 0, -0.3125, -0.4375, 0.125},
|
||
|
}
|
||
|
},
|
||
|
selection_box = {
|
||
|
type = "fixed",
|
||
|
fixed = {
|
||
|
{-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5},
|
||
|
}
|
||
|
},
|
||
|
collision_box = {
|
||
|
type = "fixed",
|
||
|
fixed = {
|
||
|
{-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5},
|
||
|
}
|
||
|
},
|
||
|
_mcl_blast_resistance = 0.3,
|
||
|
_mcl_hardness = 0.3,
|
||
|
sounds = sounds
|
||
|
})
|
||
|
minetest.register_craft({
|
||
|
output = name.." 16",
|
||
|
recipe = {
|
||
|
{material, "", material},
|
||
|
{"", material, ""},
|
||
|
{material, "", material}
|
||
|
}
|
||
|
})
|
||
|
end
|
||
|
|
||
|
|
||
|
|
||
|
--=-- REGISTER --=--
|
||
|
mcl_decor.register_path(
|
||
|
"mcl_decor:gravel_path",
|
||
|
S("Gravel Path"),
|
||
|
"mcl_core:gravel",
|
||
|
"default_gravel.png",
|
||
|
"shovely",
|
||
|
mcl_sounds.node_sound_dirt_defaults({footstep = {name="default_gravel_footstep", gain=0.45}})
|
||
|
)
|
||
|
mcl_decor.register_path(
|
||
|
"mcl_decor:cobble_path",
|
||
|
S("Cobblestone Path"),
|
||
|
"mcl_core:cobble",
|
||
|
"default_cobble.png",
|
||
|
"pickaxey",
|
||
|
mcl_sounds.node_sound_stone_defaults()
|
||
|
)
|
||
|
mcl_decor.register_path(
|
||
|
"mcl_decor:stone_path",
|
||
|
S("Stone Path"),
|
||
|
"mcl_core:stone",
|
||
|
"default_stone.png",
|
||
|
"pickaxey",
|
||
|
mcl_sounds.node_sound_stone_defaults()
|
||
|
)
|
||
|
mcl_decor.register_path(
|
||
|
"mcl_decor:granite_path",
|
||
|
S("Granite Path"),
|
||
|
"mcl_core:granite",
|
||
|
"mcl_core_granite.png",
|
||
|
"pickaxey",
|
||
|
mcl_sounds.node_sound_stone_defaults()
|
||
|
)
|
||
|
mcl_decor.register_path(
|
||
|
"mcl_decor:andesite_path",
|
||
|
S("Andesite Path"),
|
||
|
"mcl_core:andesite",
|
||
|
"mcl_core_andesite.png",
|
||
|
"pickaxey",
|
||
|
mcl_sounds.node_sound_stone_defaults()
|
||
|
)
|
||
|
mcl_decor.register_path(
|
||
|
"mcl_decor:diorite_path",
|
||
|
S("Diorite Path"),
|
||
|
"mcl_core:diorite",
|
||
|
"mcl_core_diorite.png",
|
||
|
"pickaxey",
|
||
|
mcl_sounds.node_sound_stone_defaults()
|
||
|
)
|
||
|
mcl_decor.register_path(
|
||
|
"mcl_decor:netherrack_path",
|
||
|
S("Netherrack Path"),
|
||
|
"mcl_nether:netherrack",
|
||
|
"mcl_nether_netherrack.png",
|
||
|
"pickaxey",
|
||
|
mcl_sounds.node_sound_stone_defaults()
|
||
|
)
|