Mojira Archive
MC-239059

Java Random reimplemented incorrectly

A few members of our community have been studying the latest snapshot code and they claim to have found an issue in the class LegacyRandomSource.
Java documentation specifies that Next(bits) should return (int)(seed >>> (48 - bits)). However, current code seems to return (int)(seed >> (48 - bits)).
This could cause future issues related to nextInt returning negative numbers in rare cases, and incomplete parity with Bedrock.

Members that confirmed this issue in our community: cortex and MrSpike.

Unresolved

MC@h Matt

2021-10-15, 06:28 PM

2023-08-28, 01:34 PM

11

10

Community Consensus

Low

Platform

World generation

21w41a - 22w14a21w41a, 1.18 Pre-release 1, 1.18 Release Candidate 1, 1.18.1 Release Candidate 2, 22w11a, 22w14a

-