Change nodes to be more consistent with minetest_game, add inner/outer stairs (#3)
* Remove bamboo:block_h and its recipes in favor of rotating bamboo:block * Use stair's register_slab_and_stair instead * Add alias for backwards compatmaster
parent
68c6033964
commit
ff436dd670
|
@ -1,2 +1,3 @@
|
|||
default
|
||||
stairs
|
||||
moreblocks?
|
||||
|
|
137
init.lua
137
init.lua
|
@ -20,60 +20,30 @@ minetest.register_node("bamboo:bamboo",{
|
|||
})
|
||||
|
||||
minetest.register_node("bamboo:block",{
|
||||
description = "Bamboo block",
|
||||
description = "Bamboo Block",
|
||||
tiles = {"bamboo_bottom.png", "bamboo_bottom.png", "bamboo_block.png"},
|
||||
groups = {choppy=2, oddly_breakable_by_hand=2, flammable=2, wood=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
paramtype2 = "facedir",
|
||||
on_place = minetest.rotate_node
|
||||
})
|
||||
|
||||
minetest.register_alias("bamboo:block_h", "bamboo:block")
|
||||
|
||||
dofile(minetest.get_modpath("bamboo").."/mapgen.lua")
|
||||
|
||||
|
||||
minetest.register_node("bamboo:block_h",{
|
||||
description = "Bamboo block",
|
||||
tiles = {"bamboo_block.png",
|
||||
"bamboo_block.png",
|
||||
"bamboo_block.png^[transformR90",
|
||||
"bamboo_block.png^[transformR90",
|
||||
"bamboo_bottom.png",
|
||||
"bamboo_bottom.png"},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy=2,oddly_breakable_by_hand=2,flammable=2,wood=1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node("bamboo:slab_h",{
|
||||
description = "Bamboo slab",
|
||||
tiles = {"bamboo_block.png",
|
||||
"bamboo_block.png",
|
||||
"bamboo_block.png^[transformR90",
|
||||
"bamboo_block.png^[transformR90",
|
||||
"bamboo_bottom.png",
|
||||
"bamboo_bottom.png"},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy=2,oddly_breakable_by_hand=2,flammable=2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.0, 0.5},
|
||||
}
|
||||
}
|
||||
})
|
||||
stairs.register_stair_and_slab( -- creates crafting recipes
|
||||
"bamboo",
|
||||
"bamboo:block",
|
||||
{choppy=2, oddly_breakable_by_hand=2, flammable=2, wood=1},
|
||||
{"bamboo_bottom.png", "bamboo_bottom.png", "bamboo_block.png"},
|
||||
"Bamboo Stair",
|
||||
"Bamboo Slab",
|
||||
default.node_sound_wood_defaults()
|
||||
)
|
||||
|
||||
minetest.register_node("bamboo:slab_v",{
|
||||
description = "Bamboo slab",
|
||||
description = "Bamboo Slab",
|
||||
tiles = {"bamboo_bottom.png", "bamboo_bottom.png", "bamboo_block.png"},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
|
@ -88,6 +58,8 @@ minetest.register_node("bamboo:slab_v",{
|
|||
}
|
||||
})
|
||||
|
||||
minetest.register_alias("bamboo:slab_h", "stairs:slab_bamboo")
|
||||
|
||||
-- Craftings
|
||||
|
||||
minetest.register_craft({
|
||||
|
@ -97,22 +69,6 @@ minetest.register_craft({
|
|||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "bamboo:block 2",
|
||||
recipe = {
|
||||
{"bamboo:block_h"},
|
||||
{""},
|
||||
{"bamboo:block_h"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "bamboo:block_h 2",
|
||||
recipe = {
|
||||
{"bamboo:block", "", "bamboo:block"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "bamboo:slab_h 6",
|
||||
recipe = {
|
||||
|
@ -120,24 +76,15 @@ minetest.register_craft({
|
|||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "bamboo:slab_v 6",
|
||||
recipe = {
|
||||
{"bamboo:block"},
|
||||
{"bamboo:block"},
|
||||
{"bamboo:block"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "bamboo:slab_v",
|
||||
recipe = {
|
||||
{"bamboo:slab_h"},
|
||||
{"stairs:slab_bamboo"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "bamboo:slab_h",
|
||||
output = "stairs:slab_bamboo",
|
||||
recipe = {
|
||||
{"bamboo:slab_v"},
|
||||
}
|
||||
|
@ -146,15 +93,8 @@ minetest.register_craft({
|
|||
minetest.register_craft({
|
||||
output = "bamboo:block",
|
||||
recipe = {
|
||||
{"bamboo:slab_v", "bamboo:slab_v"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "bamboo:block",
|
||||
recipe = {
|
||||
{"bamboo:slab_h"},
|
||||
{"bamboo:slab_h"},
|
||||
{"bamboo:slab"},
|
||||
{"bamboo:slab"},
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -172,29 +112,22 @@ minetest.register_craft({
|
|||
burntime = 50,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "bamboo:block_h",
|
||||
burntime = 50,
|
||||
})
|
||||
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
register_stair_slab_panel_micro(
|
||||
"bamboo",
|
||||
"block",
|
||||
"bamboo:block",
|
||||
{choppy=2, oddly_breakable_by_hand=2, flammable=2},
|
||||
{
|
||||
"bamboo_block.png",
|
||||
"bamboo_block.png",
|
||||
"bamboo_bottom.png",
|
||||
"bamboo_bottom.png",
|
||||
"bamboo_block.png",
|
||||
"bamboo_block.png"
|
||||
},
|
||||
"Bamboo",
|
||||
"block",
|
||||
0
|
||||
"bamboo",
|
||||
"block",
|
||||
"bamboo:block",
|
||||
{choppy=2, oddly_breakable_by_hand=2, flammable=2}, {
|
||||
"bamboo_block.png",
|
||||
"bamboo_block.png",
|
||||
"bamboo_bottom.png",
|
||||
"bamboo_bottom.png",
|
||||
"bamboo_block.png",
|
||||
"bamboo_block.png"
|
||||
},
|
||||
"Bamboo",
|
||||
"block",
|
||||
0
|
||||
)
|
||||
table.insert(circular_saw.known_stairs, "bamboo:block")
|
||||
end
|
||||
|
@ -236,4 +169,4 @@ minetest.register_abm({
|
|||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue