Skip to content
/ Paper Public
forked from PaperMC/Paper
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

[pull] master from PaperMC:master #899

Merged
merged 1 commit into from
Nov 27, 2024
Merged

[pull] master from PaperMC:master #899

merged 1 commit into from
Nov 27, 2024

Conversation

pull[bot]
Copy link

@pull pull bot commented Nov 27, 2024

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? 💖 Please sponsor : )

ThreadUnsafeRandom is a random implementation that is
identical to LegacyRandomSource behaviourally, but
without the thread checks.

SimpleThreadUnsafeRandom is ThreadUnsafeRandom except with
its nextInt(int) function replaced with a faster
but more biased implementation when bound is very large.

Additionally, replace Level/Entity randoms with ThreadUnsafeRandom.
This avoids the expensive CAS logic at the expense of losing the
thread check.
@pull pull bot added the ⤵️ pull label Nov 27, 2024
@pull pull bot merged commit afb5b13 into ign-gg:master Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

1 participant