Skip to content

Improve BiomeMask performance#3082

Merged
dordsor21 merged 2 commits intomainfrom
perf/BIomeMask
Feb 9, 2025
Merged

Improve BiomeMask performance#3082
dordsor21 merged 2 commits intomainfrom
perf/BIomeMask

Conversation

@SirYwell
Copy link
Member

Overview

Description

BiomeMask and biome access generally are rather slow, and a lot of the slowness is caused by inefficient translation and slow contains checks. The adaption from NMS biomes to WE BiomeType can be simplified as we already set the legacy id (= NMS-internal id). The HashSet can be replaced by a boolean array, similar to how BlockMask works.

### Submitter Checklist
- [x] Make sure you are opening from a topic branch (**/feature/fix/docs/ branch** (right side)) and not your main branch.
- [x] Ensure that the pull request title represents the desired changelog entry.
- [x] New public fields and methods are annotated with `@since TODO`.
- [x] I read and followed the [contribution guidelines](https://github.com/IntellectualSites/.github/blob/main/CONTRIBUTING.md).

@SirYwell SirYwell requested a review from a team as a code owner January 19, 2025 17:54
@dordsor21 dordsor21 requested review from a team and PierreSchwang January 26, 2025 18:33
@dordsor21 dordsor21 merged commit 1fddb83 into main Feb 9, 2025
9 checks passed
@dordsor21 dordsor21 deleted the perf/BIomeMask branch February 9, 2025 09:04
@NotMyFault NotMyFault added the Feature This PR adds a new feature label Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature This PR adds a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants