Skip to content

Fix Important Crash Issue With Custom Generator World (Datapack/Plugins)#6219

Closed
Euphillya wants to merge 3 commits into
PaperMC:masterfrom
Euphillya:master
Closed

Fix Important Crash Issue With Custom Generator World (Datapack/Plugins)#6219
Euphillya wants to merge 3 commits into
PaperMC:masterfrom
Euphillya:master

Conversation

@Euphillya
Copy link
Copy Markdown
Contributor

@Euphillya Euphillya commented Jul 18, 2021

Fix #6028

@Euphillya Euphillya requested review from a team as code owners July 18, 2021 02:31
@electronicboy
Copy link
Copy Markdown
Member

That is only one of the several dozen of these, and I question why we're getting an empty list here, this doesn't seem like a real fix?

@Euphillya
Copy link
Copy Markdown
Contributor Author

In fact, in the TreeFeacture.java file, the condition:

if (bl && (!set.isEmpty() || !set2.isEmpty())) {

asks if one or the other is empty, set2 is not empty but "set " happens to be. We can limit ask to check the 2 at the same time.

@electronicboy
Copy link
Copy Markdown
Member

Yarn shows that as

        if (!bl || set.isEmpty() && set2.isEmpty()) {
            return false;
        }

Which looks more accurate to the intent there, yay decompilers...

I'm somewhat confused on this one, are there any "trees" without leaves? Some of the populators seem to care about that though, which makes me wonder about some of the reports, is something borking up the chain I wonder

@Euphillya
Copy link
Copy Markdown
Contributor Author

With datapacks and plugins that change the generation of biomes, it is possible to have trees without leaves as in my case that I had with my server (datapack).

@Euphillya
Copy link
Copy Markdown
Contributor Author

I discovered that the bug is also on the file: CocoaDecorator, therefore changing the condition is much better directly.

@Euphillya Euphillya marked this pull request as draft July 18, 2021 09:50
@Euphillya Euphillya marked this pull request as ready for review July 18, 2021 10:32
@Euphillya
Copy link
Copy Markdown
Contributor Author

up

@Euphillya Euphillya changed the title Fix issue PaperMC#6028 Fix Important Crash Issue With Custom Generator (Datapack/Plugins) Jul 19, 2021
@Euphillya Euphillya changed the title Fix Important Crash Issue With Custom Generator (Datapack/Plugins) Fix Important Crash Issue With Custom Generator World (Datapack/Plugins) Jul 19, 2021
foss-mc added a commit to PatinaMC/Patina that referenced this pull request Jul 23, 2021
@electronicboy
Copy link
Copy Markdown
Member

electronicboy commented Jul 23, 2021

I'm still not sure that this is actually a correct fix, does tree gen still work properly with this? For me, this screams that it would prevent generation in cases for trees which don't have leaves and logs, which while it would fix the crash, it would prevent those things from generating

(Standard vanilla trees would be fine, but, the trees which trigger this crash won't be generated as the logic is not being ran, the sad truth here is that the best option is probs to fix the actual issues)

@Euphillya Euphillya closed this Jul 30, 2021
@Euphillya
Copy link
Copy Markdown
Contributor Author

Since apparently this is not the right solution, I close this PR.

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

Successfully merging this pull request may close these issues.

TreeFeature crash

2 participants