forked from minetest-mods/moreblocks
Merge pull request #12 from Jat15/patch-horizontaltree
Use 6d facedir for horizontal trees.
This commit is contained in:
commit
72edf9b41d
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:splitstonesquare","moreblocks:split_stone_tile")
|
||||
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
@ -191,20 +191,6 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
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({
|
||||
output = "moreblocks:plankstone 4",
|
||||
recipe = {
|
||||
@ -358,37 +344,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({
|
||||
output = "moreblocks:circular_saw 1",
|
||||
recipe = {
|
||||
|
20
init.lua
20
init.lua
@ -272,26 +272,6 @@ minetest.register_node("moreblocks:fence_jungle_wood", {
|
||||
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", {
|
||||
description = S("All-faces Tree"),
|
||||
tiles = {"default_tree_top.png"},
|
||||
|
Loading…
Reference in New Issue
Block a user