Antique Atlas compat

This commit is contained in:
FalsePattern committed 2022-07-11 01:04:40 +02:00
1 parent b1c8d1edb2
commit eebb1d629e
7 files changed
+115

No files matched your search

@@ -0,0 +1,21 @@
package com.falsepattern.endlessids.mixin.helpers;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class ShortUtil {
public static int unsignedShortToInt(short s) {
return s & 65535;
}
public static int[] unsignedShortToIntArray(short[] shorts) {
int[] ints = new int[shorts.length];
for(int i = 0; i < shorts.length; ++i) {
ints[i] = unsignedShortToInt(shorts[i]);
}
return ints;
}
}