diff options
-rw-r--r-- | aliases.lua | 18 | ||||
-rw-r--r-- | crafting.lua | 45 | ||||
-rw-r--r-- | init.lua | 20 |
3 files changed, 18 insertions, 65 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, +}) + diff --git a/crafting.lua b/crafting.lua index 0410ad0..1bc98c5 100644 --- a/crafting.lua +++ b/crafting.lua @@ -182,20 +182,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 = { {"default:stone", "default:wood"}, @@ -349,37 +335,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 = { { "", "default:steel_ingot", "" }, @@ -261,26 +261,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"},
|