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 inconsistency of placed feature locations #3369

Merged
merged 2 commits into from
Oct 8, 2023

Conversation

apple502j
Copy link
Contributor

@apple502j apple502j commented Oct 7, 2023

BiomeSource#getBiomes mixin applies to all biome sources, including one for Overworld. The return value is a set; however one caller in the worldgen code iterates over it: PlacedFeatureIndexer. Using a hash set here randomizes the return value, affecting feature placement. Use a linked hash set instead.

Requesting backport for all supported versions.

Fixes #3366

`BiomeSource#getBiomes` mixin applies to all biome sources, including one for Overworld.
The return value is a set; however one caller in the worldgen code iterates over it: `PlacedFeatureIndexer`.
Using a hash set here randomizes the return value, affecting feature placement.
Use a linked hash set instead.
@apple502j apple502j added bug Something isn't working small change priority:high High priority PRs that need review and work now. Review these first. labels Oct 7, 2023
@modmuss50 modmuss50 added the merge me please Pull requests that are ready to merge label Oct 8, 2023
@modmuss50 modmuss50 merged commit 661cc8c into FabricMC:1.20.2 Oct 8, 2023
modmuss50 pushed a commit that referenced this pull request Oct 8, 2023
* Fix inconsistency of placed feature locations

`BiomeSource#getBiomes` mixin applies to all biome sources, including one for Overworld.
The return value is a set; however one caller in the worldgen code iterates over it: `PlacedFeatureIndexer`.
Using a hash set here randomizes the return value, affecting feature placement.
Use a linked hash set instead.

* Improve fix to only make changes when required.

---------

Co-authored-by: modmuss50 <[email protected]>
(cherry picked from commit 661cc8c)
modmuss50 pushed a commit that referenced this pull request Oct 8, 2023
* Fix inconsistency of placed feature locations

`BiomeSource#getBiomes` mixin applies to all biome sources, including one for Overworld.
The return value is a set; however one caller in the worldgen code iterates over it: `PlacedFeatureIndexer`.
Using a hash set here randomizes the return value, affecting feature placement.
Use a linked hash set instead.

* Improve fix to only make changes when required.

---------

Co-authored-by: modmuss50 <[email protected]>
(cherry picked from commit 661cc8c)
modmuss50 pushed a commit that referenced this pull request Oct 8, 2023
* Fix inconsistency of placed feature locations

`BiomeSource#getBiomes` mixin applies to all biome sources, including one for Overworld.
The return value is a set; however one caller in the worldgen code iterates over it: `PlacedFeatureIndexer`.
Using a hash set here randomizes the return value, affecting feature placement.
Use a linked hash set instead.

* Improve fix to only make changes when required.

---------

Co-authored-by: modmuss50 <[email protected]>
(cherry picked from commit 661cc8c)
(cherry picked from commit 215bbe9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working merge me please Pull requests that are ready to merge priority:high High priority PRs that need review and work now. Review these first. small change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Instaling fabric API slightly changes the world generation
2 participants