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

The sides of trees are cut off on chunk boundaries #39

Open
naalit opened this issue Aug 10, 2021 · 2 comments
Open

The sides of trees are cut off on chunk boundaries #39

naalit opened this issue Aug 10, 2021 · 2 comments
Labels
Type: Bug Issues reporting and PRs fixing problems

Comments

@naalit
Copy link
Contributor

naalit commented Aug 10, 2021

Upon further investigation, this seems to happen every time a tree spans more than one chunk - I haven't seen any trees which have successfully generated blocks in more than one chunk. Here's an example:

Terasology-210810134014-1920x1080

I wonder if this is because the side chunks aren't loaded when it tries to set the blocks, and so the setting of blocks is silently ignored (a problem which was discussed on Discord some time ago)?

@naalit naalit added the Type: Bug Issues reporting and PRs fixing problems label Aug 10, 2021
@naalit naalit changed the title The sides of trees are often cut off The sides of trees are cut off on chunk boundaries Aug 11, 2021
@skaldarnar
Copy link
Contributor

I guess the simple explanation here is that the respective facet provider(s) don't use any borders at all, e.g.,

@Produces(TreeFacet.class)
@Requires(@Facet(FloraFacet.class))
public class TreeProvider implements FacetProvider {

The counterpart in CoreWorlds does use borders for its dependencies:

https://github.com/Terasology/CoreWorlds/blob/02a4cb208b6067cb84017d06af0972b1bacc43e5/src/main/java/org/terasology/core/world/generator/facetProviders/DefaultTreeProvider.java#L46-L52

It also extends the facet area it produces in the process() method:

https://github.com/Terasology/CoreWorlds/blob/02a4cb208b6067cb84017d06af0972b1bacc43e5/src/main/java/org/terasology/core/world/generator/facetProviders/DefaultTreeProvider.java#L99-L100

I guess the tricky part in general is to know what the maximum dimensions of trees are to figure out how big the border must be.

@naalit
Copy link
Contributor Author

naalit commented Aug 12, 2021

This is fixed for the trees that MR currently generates by the latest commit in #38 which adds a border. Larger trees will still be broken, but making it work with trees of arbitrary sizes will take a lot of work and a lot of things will need to be figured out, so that's on hold for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issues reporting and PRs fixing problems
Projects
None yet
Development

No branches or pull requests

2 participants