Self planting saplings

Post Reply
User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

Self planting saplings

by burli » Post

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
Developer
Posts: 4650
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: Self planting saplings

by Krock » Post

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 :)
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

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

Re: Self planting saplings

by burli » Post

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

User avatar
Krock
Developer
Posts: 4650
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: Self planting saplings

by Krock » Post

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
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
Fluffgar
Member
Posts: 23
Joined: Sun Dec 10, 2017 19:40
GitHub: Fluffgar
In-game: Fluffgar
Location: Scotland
Contact:

Re: Self planting saplings

by Fluffgar » Post

Used to love the old Nature Overhaul mod in Minecraft. A lot of ambition, but it never quite got there and the project was abandoned. That began with self-planting saplings. Would be very interested in a mod or mods that introduced a more dynamic / living world.
Fluffgardian Texture Pack viewtopic.php?f=4&t=19956

User avatar
Fluffgar
Member
Posts: 23
Joined: Sun Dec 10, 2017 19:40
GitHub: Fluffgar
In-game: Fluffgar
Location: Scotland
Contact:

Re: Self planting saplings

by Fluffgar » Post

Krock wrote: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 :)
Does your mod/modpack have a forum thread of it's own? Really interested to follow this. Love trees having a chance to to self-plant.
Fluffgardian Texture Pack viewtopic.php?f=4&t=19956

User avatar
Krock
Developer
Posts: 4650
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: Self planting saplings

by Krock » Post

Fluffgar wrote:Does your mod/modpack have a forum thread of it's own? Really interested to follow this. Love trees having a chance to to self-plant.
Meanwhile the sapling auto-plant code was fully moved here. Whereas this modpack is fully functional, it only follows the idea of providing an example for modders on how you could code it.
You can be notified about changes (PRs, issues) using the "Follow" option on GitHub. If you prefer standalone mod, announced in a forum topic, then feel free to create your own mod based on my source code.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
Fluffgar
Member
Posts: 23
Joined: Sun Dec 10, 2017 19:40
GitHub: Fluffgar
In-game: Fluffgar
Location: Scotland
Contact:

Re: Self planting saplings

by Fluffgar » Post

Krock wrote:Meanwhile the sapling auto-plant code was fully moved here. Whereas this modpack is fully functional, it only follows the idea of providing an example for modders on how you could code it.
You can be notified about changes (PRs, issues) using the "Follow" option on GitHub. If you prefer standalone mod, announced in a forum topic, then feel free to create your own mod based on my source code.
Did the Watch/Follow thing on GitHub. Would be good to use your saplings example as a basis for a mod. In the past I've proven remarkably unskilled at coding, however. This has put me off attempting to.
Fluffgardian Texture Pack viewtopic.php?f=4&t=19956

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests