summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--technic/tools/tree_tap.lua7
-rw-r--r--technic_worldgen/rubber.lua13
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"},