diff options
author | Jat <jinan15@hotmail.com> | 2013-12-27 17:00:45 +0100 |
---|---|---|
committer | Jat <jinan15@hotmail.com> | 2013-12-27 17:00:45 +0100 |
commit | 280bb943f9e137e896f9a4352c9071d0f55a756b (patch) | |
tree | 1ff0021b78a8e4bead264429c2de7b13b00376c0 /aliases.lua | |
parent | 524dcb1396aa9df0f60c6f74d91c2e24c19e9ad6 (diff) |
Tree horizontal in 0.4.8
Use abm for fix facedir and convert tree and jungletree.
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, +}) + |