forked from minetest-mods/moreblocks
Tree horizontal in 0.4.8
Use abm for fix facedir and convert tree and jungletree.
This commit is contained in:
parent
524dcb1396
commit
280bb943f9
18
aliases.lua
18
aliases.lua
|
@ -186,3 +186,21 @@ minetest.register_alias("moreblocks:emptybookshelf", "moreblocks:empty_bookshelf
|
||||||
minetest.register_alias("moreblocks:junglestick", "moreblocks:jungle_stick")
|
minetest.register_alias("moreblocks:junglestick", "moreblocks:jungle_stick")
|
||||||
minetest.register_alias("moreblocks:splitstonesquare","moreblocks:split_stone_tile")
|
minetest.register_alias("moreblocks:splitstonesquare","moreblocks:split_stone_tile")
|
||||||
minetest.register_alias("moreblocks:allfacestree","moreblocks:all_faces_tree")
|
minetest.register_alias("moreblocks:allfacestree","moreblocks:all_faces_tree")
|
||||||
|
|
||||||
|
--Abm for Horizontal_tree (fix facedir)
|
||||||
|
|
||||||
|
minetest.register_abm({
|
||||||
|
nodenames = {"moreblocks:horizontal_tree","moreblocks:horizontal_jungle_tree"},
|
||||||
|
interval = 1,
|
||||||
|
chance = 1,
|
||||||
|
action = function(pos, node)
|
||||||
|
local convert_facedir={7,12,9,18}
|
||||||
|
if node.name=="moreblocks:horizontal_tree" then
|
||||||
|
node.name="default:tree"
|
||||||
|
else
|
||||||
|
node.name="default:jungletree"
|
||||||
|
end
|
||||||
|
minetest.set_node(pos, {name=node.name,param2=convert_facedir[node.param2+1]})
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
45
crafting.lua
45
crafting.lua
|
@ -181,20 +181,6 @@ minetest.register_craft({
|
||||||
recipe = {"default:steel_ingot", "default:stonebrick"},
|
recipe = {"default:steel_ingot", "default:stonebrick"},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "default:wood 4",
|
|
||||||
recipe = {
|
|
||||||
{"moreblocks:horizontal_tree"},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "default:junglewood 4",
|
|
||||||
recipe = {
|
|
||||||
{"moreblocks:horizontal_jungle_tree"},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "moreblocks:plankstone 4",
|
output = "moreblocks:plankstone 4",
|
||||||
recipe = {
|
recipe = {
|
||||||
|
@ -348,37 +334,6 @@ minetest.register_craft({
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "moreblocks:horizontal_tree 2",
|
|
||||||
recipe = {
|
|
||||||
{"default:tree", "", "default:tree"},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "default:tree 2",
|
|
||||||
recipe = {
|
|
||||||
{"moreblocks:horizontal_tree"},
|
|
||||||
{"moreblocks:horizontal_tree"},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "moreblocks:horizontal_jungle_tree 2",
|
|
||||||
recipe = {
|
|
||||||
{"default:jungletree", "", "default:jungletree"},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "default:jungletree 2",
|
|
||||||
recipe = {
|
|
||||||
{"moreblocks:horizontal_jungle_tree"},
|
|
||||||
{"moreblocks:horizontal_jungle_tree"},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "moreblocks:circular_saw 1",
|
output = "moreblocks:circular_saw 1",
|
||||||
recipe = {
|
recipe = {
|
||||||
|
|
20
init.lua
20
init.lua
|
@ -261,26 +261,6 @@ minetest.register_node("moreblocks:fence_jungle_wood", {
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("moreblocks:horizontal_tree", {
|
|
||||||
description = S("Horizontal Tree"),
|
|
||||||
tiles = {"default_tree.png", "default_tree.png", "default_tree.png^[transformR90",
|
|
||||||
"default_tree.png^[transformR90", "default_tree_top.png", "default_tree_top.png"},
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
groups = {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
|
|
||||||
sounds = default.node_sound_wood_defaults(),
|
|
||||||
furnace_burntime = 30,
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("moreblocks:horizontal_jungle_tree", {
|
|
||||||
description = S("Horizontal Jungle Tree"),
|
|
||||||
tiles = {"default_jungletree.png", "default_jungletree.png", "default_jungletree.png^[transformR90",
|
|
||||||
"default_jungletree.png^[transformR90", "default_jungletree_top.png", "default_jungletree_top.png"},
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
groups = {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
|
|
||||||
sounds = default.node_sound_wood_defaults(),
|
|
||||||
furnace_burntime = 30,
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("moreblocks:all_faces_tree", {
|
minetest.register_node("moreblocks:all_faces_tree", {
|
||||||
description = S("All-faces Tree"),
|
description = S("All-faces Tree"),
|
||||||
tiles = {"default_tree_top.png"},
|
tiles = {"default_tree_top.png"},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user