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

Fix World.getWorldType not detecting amplified and large biomes #10314

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LeonTG
Copy link

@LeonTG LeonTG commented Mar 10, 2024

I fixed this in my Paper fork, I figured this was a good enough change to PR upstream so other people can enjoy the fix!

It works by accessing the settings of the NoiseBasedChunkGenerator and checking if it has amplified or large biome settings! and I've tested it to make sure it works too

First time making a PR to a project like this, so hopefully I did it correctly!

@LeonTG LeonTG requested a review from a team as a code owner March 10, 2024 20:03
* Gets the type of this world.
*
* @return Type of this world.
- * @deprecated world type is only used to select the default word generation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be left deprecated, the concept of a WorldType no longer exists, and the enum itself is even outdated because of the fact that this no longer exists.

While we can match the existing setting templates for now, this is not a mechanism which makes sense in the long run, IMHO

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I remove that part of the patch entirely or is it worth making it change the wording of the java doc deprecation explaination instead?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just thought of another idea, would methods like isFlat(), isAmplified() and isLargeBiomes() be a better alternative for the API portion of this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree with keeping it deprecated. While I agree that WorldType is not a good representation of how worlds work now, there isn't an alternative yet and WorldType itself is not deprecated. This method was only deprecated because of the bug that this PR fixes, so un-deprecated it seems appropriate. It can be re-deprecated with a different message when alternative API is added.

@Machine-Maker
Copy link
Member

After some more discussion, I think the immediate solution is to add this fix, but at the same time, also add the missing options to WorldType, which include the missing NoiseGeneratorSettings types, like caves, and floating islands.

@LeonTG
Copy link
Author

LeonTG commented Mar 16, 2024

After some more discussion, I think the immediate solution is to add this fix, but at the same time, also add the missing options to WorldType, which include the missing NoiseGeneratorSettings types, like caves, and floating islands.

Alright I can do that

What about my idea of also adding isFlat(), isAmplified() methods? should I add that too or leave it be for you guys to figure out a better plan?

@Machine-Maker
Copy link
Member

What about my idea of also adding isFlat(), isAmplified() methods?

No, I don't think so.

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.

None yet

3 participants