9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-23 00:49:31 +00:00

Port random generator fix from 1.21.4

This commit is contained in:
HaHaWTH
2025-06-15 19:38:04 +14:00
parent 81f5783445
commit 0e1ff0ecd2

View File

@@ -56,13 +56,9 @@ public class FasterRandomSource implements BitRandomSource {
@Override
public final int next(int bits) {
if (useDirectImpl) {
return (int) ((seed = seed * MULTIPLIER + INCREMENT & SEED_MASK) >>> (INT_BITS - bits));
}
return (int) ((seed * MULTIPLIER + INCREMENT & SEED_MASK) >>> (INT_BITS - bits));
}
public static class FasterRandomSourcePositionalRandomFactory implements PositionalRandomFactory {
private final long seed;