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

Player-Planted Trees Appear Flattened and Identical #56

Open
izharus opened this issue Dec 22, 2024 · 3 comments
Open

Player-Planted Trees Appear Flattened and Identical #56

izharus opened this issue Dec 22, 2024 · 3 comments

Comments

@izharus
Copy link

izharus commented Dec 22, 2024

Player-Planted Trees Appear Flattened and Identical

Issue Description

  • Minecraft Version: 1.20.1
  • Dynamic Trees Version: 1.3.6
  • Dynamic Trees TFC Version: 2.0.1

Player-planted trees are not growing properly.

Observed Behavior

  • Trees generated naturally in the world look fine and retain their unique features.
  • Some trees planted by players, however, appear identical, flattened, and visually strange.

Expected Behavior

Player-planted trees should grow with the same variety and characteristics as naturally generated trees.

Steps to Reproduce

  1. Generate a new world with the above versions of the mods.
  2. Plant and grow Douglas Fir as a player.
  3. Find Douglas Fir in the world.

Additional Notes

  • This behavior does not affect all tree types, but only certain species.
  • I am willing to provide a complete list of affected tree types if the developer is ready to investigate and address this issue.

Attachments

  • Naturally generated tree and player-planted tree (Douglas Fir):
    image
@Gaelmare
Copy link
Owner

Thanks for the report! The issue here is the tree growth parameters in https://github.com/Gaelmare/dynamictreestfc/blob/1.20.x/resources/trees.py do not correctly build the
https://github.com/Gaelmare/dynamictreestfc/blob/1.20.x/src/main/resources/trees/dttfc/species/douglas_fir.json
file with good parameters that match the precompiled "JOCode" for worldgen trees of the same species.

In general, the tree growth parameters in DTTFC may or may not match the JOCode library. The JOCode library can be rebuilt using these DT tools as described here: https://github.com/DynamicTreesTeam/DynamicTrees/wiki/Tree-Packs:-Jocodes. If the growth parameters are wrong, that won't help.

If you would like to contribute, please consider making a PR to update the trees.py file to set the growth parameters to match the JOCodes. The https://github.com/Gaelmare/dynamictreestfc/blob/1.20.x/JOCODE_CREDITS.txt is mostly correct about where the tree shapes came from, and we should be able to track down the growth parameters from those sources.

My analysis of the JOCode files shows:
Kapok=DT Vanilla Jungle
Mangrove=DT Vanilla Mangrove without a trailing newline at EOF
Acacia=DT Vanilla Acacia
Palm=DT BYG Palm
Ash/Aspen/Birch/Hevea=DT Vanilla Birch (yes, Hevea is from IE/TFC IE Compat, does no harm to include)
Douglas Fir=DT Vanilla Mega Spruce
Maple=DT BOP Mahogany
Blackwood/Chestnut/Hickory/Rosewood=DT Vanilla Dark Oak
Oak/Willow=DT Vanilla Oak
Pine/Sequoia/Spruce/Sycamore/White Cedar=DT Vanilla Spruce

If you wanted to correct the JOCODE_CREDITS.txt file as well in your PR, feel free.

Thanks for caring enough to file this! Let me know how much you want to contribute.

@izharus
Copy link
Author

izharus commented Dec 23, 2024

Thank you for the detailed response. I will try modifying trees.py, and if everything works correctly, I'll create a PR.

@izharus
Copy link
Author

izharus commented Dec 23, 2024

It looks like the *rm.resource_dir argument is unnecessary here: link. In the rm.write method, self.resource_dir is already being added at the beginning of the path (at least that's the case with Python 3.10). Moreover, unpacking a string that contains a path in this context seems odd. If necessary, I can create a PR for this fix as well.

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

No branches or pull requests

2 participants