aboutsummaryrefslogtreecommitdiff
path: root/aliases.lua
diff options
context:
space:
mode:
authorCalinou <calinou9999spam@gmail.com>2014-01-20 09:59:23 -0800
committerCalinou <calinou9999spam@gmail.com>2014-01-20 09:59:23 -0800
commit72edf9b41d0a297e0512f2305d89f06a985b1023 (patch)
tree4ccd369857ffe447e91e8c72f8542385f4f74632 /aliases.lua
parent1002fd4dbf43850a196f627d8ba15e3f9ec39361 (diff)
parent280bb943f9e137e896f9a4352c9071d0f55a756b (diff)
downloadmoreblocks-72edf9b41d0a297e0512f2305d89f06a985b1023.tar.gz
moreblocks-72edf9b41d0a297e0512f2305d89f06a985b1023.tar.bz2
moreblocks-72edf9b41d0a297e0512f2305d89f06a985b1023.zip
Merge pull request #12 from Jat15/patch-horizontaltree
Use 6d facedir for horizontal trees.
Diffstat (limited to 'aliases.lua')
-rw-r--r--aliases.lua18
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,
+})
+