Replanting Feature
MMRT1387 opened this issue ยท 5 comments
Describe the feature
add replanting ... when we chop down a tree the saplings will replant
I'll keep it open as a reference but not sure this will be implemented.
To me you already get enough advantages by having it all chopped down so you can still make some effort to replant it back. It can be argued that it can be toggled in the settings and yeah for sure it can.
However there are technical difficulties :
- How do we identify what sapling correspond to the tree ? Has to take into account potentially modded tress as well as nether mushrooms.
- What can the sapling be placed on ? It can't be on a stone for example, And again it has to take into account modded sapling that may behave quite differently.
- Where do we place the sapling ? If you cut a tree mid air, what happens ?
I don't think the 2 lats points are the hardest, but the first one seems a bit tricky to me. There's no direct way (i think) of knowing the sapling item from the log.
I dont remember what mod does did it this way, but use whatever sapling drops from the tree leaves? as for the where to plant thing, you could follow along the the log down to the base in code by checking if log@z -1 is not log and plant there, that would also be stupid enough to work with any type of tree, not counting mushroom trees maybe?
I'll keep it open as a reference but not sure this will be implemented.
To me you already get enough advantages by having it all chopped down so you can still make some effort to replant it back. It can be argued that it can be toggled in the settings and yeah for sure it can.
However there are technical difficulties :
- How do we identify what sapling correspond to the tree ? Has to take into account potentially modded tress as well as nether mushrooms.
- What can the sapling be placed on ? It can't be on a stone for example, And again it has to take into account modded sapling that may behave quite differently.
- Where do we place the sapling ? If you cut a tree mid air, what happens ?
I don't think the 2 lats points are the hardest, but the first one seems a bit tricky to me. There's no direct way (i think) of knowing the sapling item from the log.
I would love to add this feature. You can set it so that it's not activated on default and it can only be activated by editing the config files.
Replanting would also require an override list and/or allow-/blocklists for the edge case where loottable for a leaf for some reason contains more than one "plantable" item. You can't just assume that the tree is placed on a block you can plant a sapling on, otherwise you can grow a tree, replace the dirt with stone, and use the mod to "plant" a sapling on the stone. So unless there are easily accessible predefined tables or something that describe where you can plant what, implementing this feature would be rough and approximate.
Personally, I believe that this feature would be useful, but that would mean either breaking some other mods that behave in unforeseen ways or neglecting them entirely. And replanting manually is not that difficult anyway, you just keep a sapling next to your axe.
- What can the sapling be placed on ? It can't be on a stone for example, And again it has to take into account modded sapling that may behave quite differently.
- Where do we place the sapling ? If you cut a tree mid air, what happens ?
if the sapling can be placed, just do it, else an additional sapling is dropped