@@ -0,0 +1,2179 @@
+package us.looking_glass.util;%0A%0Aimport java.util.Arrays;%0Aimport java.util.Random;%0A%0Apublic final class Well1024a %7B%0A    protected int index = 0;%0A    protected final int%5B%5D v = new int%5B32%5D;%0A    private static final int m1 = 3;%0A    private static final int m2 = 24;%0A    private static final int m3 = 10;%0A%0A    public final void setSeed(int%5B%5D seed) %7B%0A        Arrays.fill(v, 0);%0A        int lim = Math.min(seed.length, 32);%0A        for (int i = 0; i %3C lim; i++)%0A            v%5Bi%5D = seed%5Bi%5D;%0A    %7D%0A%0A    private final int iRm1(int i) %7B%0A        return (i + 31) & 0x1f;%0A    %7D%0A%0A    private final int i1(int i) %7B%0A        return (i + m1) & 0x1f;%0A    %7D%0A%0A    private final int i2(int i) %7B%0A        return (i + m2) & 0x1f;%0A    %7D%0A%0A    private final int i3(int i) %7B%0A        return (i + m3) & 0x1f;%0A    %7D%0A%0A    public int next(final int bits) %7B%0A        final int indexRm1 = iRm1(index);%0A        final int v0 = v%5Bindex%5D;%0A        final int vM1 = v%5Bi1(index)%5D;%0A        final int vM2 = v%5Bi2(index)%5D;%0A        final int vM3 = v%5Bi3(index)%5D;%0A%0A        final int z0 = v%5BindexRm1%5D;%0A        final int z1 = v0 %5E (vM1 %5E (vM1 %3E%3E%3E 8));%0A        final int z2 = (vM2 %5E (vM2 %3C%3C 19)) %5E (vM3 %5E(vM3 %3C%3C 14));%0A        final int z3 = z1 %5E z2;%0A        final int z4 = (z0 %5E (z0 %3C%3C 11)) %5E (z1 %5E (z1 %3C%3C 7)) %5E (z2 %5E (z2 %3C%3C 13));%0A%0A        v%5Bindex%5D = z3;%0A        v%5BindexRm1%5D = z4;%0A        index = indexRm1;%0A        return z4 %3E%3E%3E (32 - bits);%0A    %7D%0A%0A    public double nextDouble() %7B%0A        final long high = ((long) next(26)) %3C%3C 26;%0A        final int low = next(26);%0A        return (high %7C low) * 0x1.0p-52d;%0A    %7D%0A%0A    public int nextInt(int n) %7B%0A        if (n %3E 0) %7B%0A            if ((n & -n) == n) %7B%0A                return (int) ((n * (long) next(31)) %3E%3E 31);%0A            %7D%0A            int bits;%0A            int val;%0A            do %7B%0A                bits = next(31);%0A                val = bits %25 n;%0A            %7D while (bits - val + (n - 1) %3C 0);%0A            return val;%0A        %7D%0A        throw new IllegalArgumentException(String.format(%22Value not positive: %25d%22, n));%0A    %7D%0A%0A    public int nextInt(int m, int n) %7B%0A        return m + nextInt(n - m);%0A    %7D%0A%0A    public float nextFloat() %7B%0A        return next(23) * 0x1.0p-23f;%0A    %7D%0A%7D%0A

Add minimal Well1024a PRNG implementation.