Self planting saplings

User avatar
burli
Member
 
Posts: 1313
Joined: Fri Apr 10, 2015 13:18

Self planting saplings

by burli » Wed Jul 27, 2016 11:49

I'm looking for a mod for self planting saplings. But the only mods I found changs the drop behaviour from item drop to node drop.

But I would still like item drop, but instead of despawning they should plant. Is there any mod doing this? Is this possible at all?
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: Self planting saplings

by Krock » Wed Jul 27, 2016 16:12

There's a mod I wrote a while ago with some various things in it. The sapling auto-planter is one of them:
https://github.com/SmallJoker/special/b ... lanter.lua
But this also requires a change in the __builtin:item entity: https://github.com/SmallJoker/special/b ... e.lua#L219

With some experimenting it's possible to move the auto planting function into a new mod :)
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

User avatar
burli
Member
 
Posts: 1313
Joined: Fri Apr 10, 2015 13:18

Re: Self planting saplings

by burli » Wed Jul 27, 2016 17:09

Strange solution. Let me guess: dropped item despawn is coded in C++? There is no node timer or something involved
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: Self planting saplings

by Krock » Wed Jul 27, 2016 19:28

No, the expire time is set/defined in builtin/game/item_entity.lua.
I extracted the whole auto-plant code into a new mod, which can be found here: https://github.com/SmallJoker/peoplecan ... ecantplant
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 


Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron