diff options
author | Calinou <calinou9999spam@gmail.com> | 2014-01-20 09:59:23 -0800 |
---|---|---|
committer | Calinou <calinou9999spam@gmail.com> | 2014-01-20 09:59:23 -0800 |
commit | 72edf9b41d0a297e0512f2305d89f06a985b1023 (patch) | |
tree | 4ccd369857ffe447e91e8c72f8542385f4f74632 /aliases.lua | |
parent | 1002fd4dbf43850a196f627d8ba15e3f9ec39361 (diff) | |
parent | 280bb943f9e137e896f9a4352c9071d0f55a756b (diff) |
Merge pull request #12 from Jat15/patch-horizontaltree
Use 6d facedir for horizontal trees.
Diffstat (limited to 'aliases.lua')
-rw-r--r-- | aliases.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/aliases.lua b/aliases.lua index 5df0a33..ad79bd5 100644 --- a/aliases.lua +++ b/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, +}) + |