9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-19 15:09:25 +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,11 +56,7 @@ 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));
return (int) ((seed = seed * MULTIPLIER + INCREMENT & SEED_MASK) >>> (INT_BITS - bits));
}
public static class FasterRandomSourcePositionalRandomFactory implements PositionalRandomFactory {