Skip to content

Built-in types: Fixed creating the conditions on Java runtimes without jdk.random - #9

Merged
whereareiam merged 1 commit into
devfrom
feature/default-random
Nov 13, 2026
Merged

whereareiam merged 1 commit into
devfrom
feature/default-random

Conversation

@whereareiam

Copy link
Copy Markdown
Owner

ConditionsOptions defaulted the source of chance to RandomGenerator.getDefault(), the L32X64MixRandom algorithm of the jdk.random module. A Java runtime without that module, such as the one Socialismus's journeys start Paper 1.20.6 on, failed to create the options: No implementation of the random number generator algorithm "L32X64MixRandom" is available.

The default is now new Random(), which is in java.base and safe to share between threads. A host can still pass its own random.

🤖 Generated with Claude Code

RandomGenerator.getDefault() needs an algorithm of the jdk.random module, which a Java runtime may leave out, such as the one Paper 1.20.6 runs on; creating the default options then failed. java.util.Random is in java.base and safe to share between threads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@whereareiam whereareiam added the skip-changelog Left out of the release notes label Nov 13, 2026
@whereareiam
whereareiam merged commit 3090ccb into dev Nov 13, 2026
3 of 4 checks passed
@whereareiam
whereareiam deleted the feature/default-random branch November 13, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Left out of the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant