[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4866: Undefined array key "database_gc"
FOSS gamedev and creative worlds • View topic - Self planting saplings
Page 1 of 1

Self planting saplings

PostPosted: Wed Jul 27, 2016 11:49
by burli
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?

Re: Self planting saplings

PostPosted: Wed Jul 27, 2016 16:12
by Krock
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 :)

Re: Self planting saplings

PostPosted: Wed Jul 27, 2016 17:09
by burli
Strange solution. Let me guess: dropped item despawn is coded in C++? There is no node timer or something involved

Re: Self planting saplings

PostPosted: Wed Jul 27, 2016 19:28
by Krock
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