summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--technic/tools/tree_tap.lua7
-rw-r--r--technic_worldgen/rubber.lua8
2 files changed, 3 insertions, 12 deletions
diff --git a/technic/tools/tree_tap.lua b/technic/tools/tree_tap.lua
index 275f4b6..f4b12bf 100644
--- a/technic/tools/tree_tap.lua
+++ b/technic/tools/tree_tap.lua
@@ -65,11 +65,10 @@ minetest.register_abm({
interval = 60,
chance = 15,
action = function(pos, node)
- local meta = minetest.get_meta(pos)
- if meta:get_int("placed") ~= 0 then
- return
+ if minetest.find_node_near(pos, (moretrees and moretrees.leafdecay_radius) or 5, {"moretrees:rubber_tree_leaves"}) then
+ node.name = "moretrees:rubber_tree_trunk"
+ minetest.swap_node(pos, node)
end
- minetest.set_node(pos, {name="moretrees:rubber_tree_trunk"})
end
})
diff --git a/technic_worldgen/rubber.lua b/technic_worldgen/rubber.lua
index f04be84..93b6d66 100644
--- a/technic_worldgen/rubber.lua
+++ b/technic_worldgen/rubber.lua
@@ -27,10 +27,6 @@ minetest.register_node(":moretrees:rubber_tree_trunk", {
groups = {tree=1, snappy=1, choppy=2, oddly_breakable_by_hand=1,
flammable=2},
sounds = default.node_sound_wood_defaults(),
- after_place_node = function(pos, placer, itemstack)
- local meta = minetest.get_meta(pos)
- meta:set_int("placed", 1)
- end,
})
minetest.register_node(":moretrees:rubber_tree_trunk_empty", {
@@ -40,10 +36,6 @@ minetest.register_node(":moretrees:rubber_tree_trunk_empty", {
groups = {tree=1, snappy=1, choppy=2, oddly_breakable_by_hand=1,
flammable=2, not_in_creative_inventory=1},
sounds = default.node_sound_wood_defaults(),
- after_place_node = function(pos, placer, itemstack)
- local meta = minetest.get_meta(pos)
- meta:set_int("placed", 1)
- end,
})
minetest.register_node(":moretrees:rubber_tree_leaves", {