aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/GTIteratorRandom.java
blob: 1b14e5b8ff5b60f5feecda705fd58bad9b31dfa1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package gregtech.common;

import java.util.Random;

public class GTIteratorRandom extends Random {

    private static final long serialVersionUID = 1L;
    public int mIterationStep = 2147483647;

    @Override
    public int nextInt(int aParameter) {
        if ((this.mIterationStep == 0) || (this.mIterationStep > aParameter)) {
            this.mIterationStep = aParameter;
        }
        return --this.mIterationStep;
    }
}