[Mod] TreeCapitator [treecapitator]
- Hybrid Dog
- Member
- Posts: 2834
- Joined: Thu Nov 01, 2012 12:46
- GitHub: HybridDog
Re: [Mod] TreeCapitator [treecapitator]
I'm curious what the difference between this mod, Timber, New Timber, and New New Timber are. I've never used any of them, so I'm not sure what the differences are.
- Hybrid Dog
- Member
- Posts: 2834
- Joined: Thu Nov 01, 2012 12:46
- GitHub: HybridDog
Jeija's timber mod caused following: If you dig one of the nodes listed there then the nodes above them also become dug (if they have the same name).
It's deprecated now because its function is added to default for papyrus and cactus.
l haven't tested the other ones, deivan's mod obviously additionally removes whole trees (with leaves) in comparison to Jeija's mod.
deivan's mod is obviously three years old.
My mod doesn't add the straight digging up function to papyrus etc.,
the leaves of trees next to the chopped one are kept,
treecapitating only works if it's a tree with leaves and the tree is not rotated to avoid destroying trunk house corners,
if sneak is pressed, the tree doesn't become capitated,
a sound is played, etc..
But my version doesn't support growing_trees, which is, if l remember correctly, an old, more or less remarkable mod.
Nemin32's version is almost the same as deivan's, the only difference is that the axe is needed to chop the whole tree, l assume.
It's deprecated now because its function is added to default for papyrus and cactus.
l haven't tested the other ones, deivan's mod obviously additionally removes whole trees (with leaves) in comparison to Jeija's mod.
deivan's mod is obviously three years old.
My mod doesn't add the straight digging up function to papyrus etc.,
the leaves of trees next to the chopped one are kept,
treecapitating only works if it's a tree with leaves and the tree is not rotated to avoid destroying trunk house corners,
if sneak is pressed, the tree doesn't become capitated,
a sound is played, etc..
But my version doesn't support growing_trees, which is, if l remember correctly, an old, more or less remarkable mod.
Nemin32's version is almost the same as deivan's, the only difference is that the axe is needed to chop the whole tree, l assume.
Spoiler
Code: Select all
diff --git a/init.lua b/init.lua
index b403450..cd1f5fb 100644
--- a/init.lua
+++ b/init.lua
@@ -7,9 +7,7 @@
local nt={}
--nt.limit=2 --Range from the last cut node to search nodes do cut, 1 is good, 2 is optimal to servers with growing trees.
-local nt_nodenames={}
-
-local nt_nodenames_list={
+local nt_nodenames={
"default:jungletree",
"default:papyrus",
"default:cactus",
@@ -48,20 +46,36 @@ local nt_nodenames_list={
}
minetest.register_on_dignode(function(pos, node, digger)
- local i=1
- nm = node.name
-
- if(nt_nodenames["default:tree"]==nil) then
- while nt_nodenames_list[i]~=nil do
- nt_nodenames[nt_nodenames_list[i]]=nt_nodenames_list[i]
- i = i + 1
- end
- end
-
- if(nt_nodenames[nm]~=nil) then
- nt_primary(pos,node,digger,0)
- return false
+ local idx = digger:get_wield_index()
+ local inv = digger:get_inventory()
+ local stack = inv:get_stack("main", idx):get_name()
+ print(stack)
+ list_of_axes = {
+ "default:axe_stone",
+ "default:axe_bronze",
+ "default:axe_steel",
+ "default:axe_mese",
+ "default:axe_stone"
+ }
+ for _,v in pairs(list_of_axes) do
+ if v == stack then
+ -- do something
+ --if stack == "default:axe_stone" then
+ local i=1
+ while nt_nodenames[i]~=nil do
+ nm = node.name
+
+ if nm==nt_nodenames[i] then
+ nt_primary(pos,node,digger,0)
+ return false
+ end
+
+ i = i + 1
+ end
+ --end
+ break
end
+end
end)
- AccidentallyRhine
- Member
- Posts: 252
- Joined: Sun Aug 02, 2015 05:43
Re: [Mod] TreeCapitator [treecapitator]
FYI, appending fruits = {"default:snow"} to init.lua where pinetrees are registered, is a great way to eliminate the floating rings of snow that are left after cutting down a pine tree.
As follows:
It sounds stupid, but it works ...as far as I can validate.
As follows:
Code: Select all
treecapitator.register_tree({
trees = {"default:pine_tree"},
leaves = {"default:pine_needles"},
range = 6,
fruits = {"default:snow"}
})
- Hybrid Dog
- Member
- Posts: 2834
- Joined: Thu Nov 01, 2012 12:46
- GitHub: HybridDog
- fireglow
- Member
- Posts: 93
- Joined: Fri Mar 28, 2014 11:36
- IRC: fireglow
- In-game: fireglow
- Location: Germany
Re: [Mod] TreeCapitator [treecapitator]
Could somebody please add support for the mg v7 default tree, it's now growing with branches, like so:
After cutting the main trunk with, the branches remain:
Edit: The main trunk is sometimes 2, sometimes 3 nodes high before it branches off.
After cutting the main trunk with, the branches remain:
Edit: The main trunk is sometimes 2, sometimes 3 nodes high before it branches off.
- Hybrid Dog
- Member
- Posts: 2834
- Joined: Thu Nov 01, 2012 12:46
- GitHub: HybridDog
Re: [Mod] TreeCapitator [treecapitator]
AnxiousInfusion, sorry for the long delay, now snow falls down after capitating trees (with falling_extras it makes fun watching snow suddenly fall from there).
l added support for v7 trees.
fireglow, does mgv7 also offer the other trees, the mgv6 ones?
l added support for v7 trees.
fireglow, does mgv7 also offer the other trees, the mgv6 ones?
- fireglow
- Member
- Posts: 93
- Joined: Fri Mar 28, 2014 11:36
- IRC: fireglow
- In-game: fireglow
- Location: Germany
Re: [Mod] TreeCapitator [treecapitator]
I believe the default:sapling only grows into the branched version of the tree.Hybrid Dog wrote:l added support for v7 trees.
fireglow, does mgv7 also offer the other trees, the mgv6 ones?
However, there are servers (like mine ;) that have other treemods installed (for example farming_plus) the trees of which are akin to the regular, old v6 trees. In the case of farming_plus, en example is farming_plus:banana_sapling.
I just tested the v7 default:sapling, everything works perfect. Thank you! :-)
Re: [Mod] TreeCapitator [treecapitator]
I used this mod very often on servers with mapgen v6 and it works very well.
on servers with mapgen v7, it seems that it does not work well for all kind of trees.
do I need a newer version of the mod?
regards,
atorian37
sorry I just realised, that I did not read all the post here, I need a newer version I see....sorry :(
on servers with mapgen v7, it seems that it does not work well for all kind of trees.
do I need a newer version of the mod?
regards,
atorian37
sorry I just realised, that I did not read all the post here, I need a newer version I see....sorry :(
- Hybrid Dog
- Member
- Posts: 2834
- Joined: Thu Nov 01, 2012 12:46
- GitHub: HybridDog
The new version only supports mgv7 apple trees. The other ones (e.g. jungletree) aren't implemented yet.
Trees are registered in trees.lua.
https://github.com/HybridDog/treecapita ... es.lua#L45
Trees are registered in trees.lua.
https://github.com/HybridDog/treecapita ... es.lua#L45
Re: [Mod] TreeCapitator [treecapitator]
Doesnt seem to work?
- Hybrid Dog
- Member
- Posts: 2834
- Joined: Thu Nov 01, 2012 12:46
- GitHub: HybridDog
Who is online
Users browsing this forum: No registered users and 39 guests