We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f6c056d commit 34e5d4bCopy full SHA for 34e5d4b
src/main/java/doggytalents/common/util/RandomUtil.java
@@ -8,4 +8,9 @@ public static float nextFloatRemapped(RandomSource random) {
8
return random.nextFloat() * 2 - 1;
9
}
10
11
+ public static int randomOffsetNonZero(RandomSource random, int radius) {
12
+ int ret = random.nextInt(radius * 2) - radius;
13
+ return ret >= 0 ? ret + 1 : ret;
14
+ }
15
+
16
0 commit comments