Self planting saplings

User avatar
burli
Member
 
Posts: 1608
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
Developer
 
Posts: 4106
Joined: Thu Oct 03, 2013 07:48
Location: Switzerland
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 :)
Mod Search Engine - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

User avatar
burli
Member
 
Posts: 1608
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
Developer
 
Posts: 4106
Joined: Thu Oct 03, 2013 07:48
Location: Switzerland
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
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
Location: Scotland
GitHub: Fluffgar
In-game: Fluffgar

Re: Self planting saplings

by Fluffgar » Sun Dec 10, 2017 20:05

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.
 

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

Re: Self planting saplings

by Fluffgar » Sat Apr 21, 2018 11:22

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.
 

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

Re: Self planting saplings

by Krock » Sat Apr 21, 2018 12:54

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.
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
Location: Scotland
GitHub: Fluffgar
In-game: Fluffgar

Re: Self planting saplings

by Fluffgar » Sun Apr 22, 2018 05:42

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.
 


Return to Modding Discussion



Who is online

Users browsing this forum: Bing [Bot] and 2 guests