From 64db3d14d894396580972cb2b6bb3a79befdd1c0 Mon Sep 17 00:00:00 2001 From: ShadowNinja Date: Tue, 17 Dec 2013 14:24:06 -0500 Subject: [PATCH] Remove duplicate ABM --- technic/tools/tree_tap.lua | 7 +++++-- technic_worldgen/rubber.lua | 13 ------------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/technic/tools/tree_tap.lua b/technic/tools/tree_tap.lua index ab53955..3e6b674 100644 --- a/technic/tools/tree_tap.lua +++ b/technic/tools/tree_tap.lua @@ -65,8 +65,11 @@ minetest.register_abm({ interval = 60, chance = 15, action = function(pos, node) - node.name = "moretrees:rubber_tree_trunk" - minetest.set_node(pos, node) + local meta = minetest.get_meta(pos) + if meta:get_int("placed") ~= 0 then + return + end + minetest.set_node(pos, {name="moretrees:rubber_tree_trunk"}) end }) diff --git a/technic_worldgen/rubber.lua b/technic_worldgen/rubber.lua index e47ba51..0e6d182 100644 --- a/technic_worldgen/rubber.lua +++ b/technic_worldgen/rubber.lua @@ -44,19 +44,6 @@ minetest.register_node(":moretrees:rubber_tree_trunk_empty", { end, }) -minetest.register_abm({ - nodenames = {"moretrees:rubber_tree_trunk_empty"}, - interval = 60, - chance = 15, - action = function(pos, node) - local meta = minetest.get_meta(pos) - if meta:get_int("placed") ~= 0 then - return - end - minetest.set_node(pos, {name="moretrees:rubber_tree_trunk"}) - end -}) - minetest.register_node(":moretrees:rubber_tree_leaves", { drawtype = "allfaces_optional", tiles = {"technic_rubber_leaves.png"},