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
base: master
Are you sure you want to change the base?
Conversation
* Gets the type of this world. | ||
* | ||
* @return Type of this world. | ||
- * @deprecated world type is only used to select the default word generation |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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 |
No, I don't think so. |
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!