Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replanting Feature #266

Open
MMRT1387 opened this issue Dec 18, 2021 · 5 comments
Open

Replanting Feature #266

MMRT1387 opened this issue Dec 18, 2021 · 5 comments

Comments

@MMRT1387
Copy link

Describe the feature

add replanting ... when we chop down a tree the saplings will replant

@Rakambda
Copy link
Member

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.

@Hellzbellz123
Copy link

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?

@MobButcher
Copy link
Contributor

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.

@5alidshammout
Copy link

  • 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

@SimplyYourAverageDev
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants