Class ArrayUtil
java.lang.Object
com.blamejared.crafttweaker.api.util.ArrayUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T[]copy(T[] array) static <T> T[]copyOf(T[] original, int newLength, T defaultValue) static <T,U> net.minecraft.core.NonNullList <U> flattenToNNL(int width, int height, T[][] array, Supplier<U> empty, Function<T, U> converter) static <T,U> net.minecraft.core.NonNullList <U> flattenToNNL(T[][] array, Supplier<U> empty, Function<T, U> converter) static <T> intgetMaxWidth(T[][] array) static <T> T[]mirror(T[] array) static <T> voidreplaceNulls(T[] arr, T defaultValue)
-
Method Details
-
copy
public static <T> T[] copy(T[] array) -
mirror
public static <T> T[] mirror(T[] array) -
copyOf
public static <T> T[] copyOf(T[] original, int newLength, T defaultValue) -
replaceNulls
public static <T> void replaceNulls(T[] arr, T defaultValue) -
getMaxWidth
public static <T> int getMaxWidth(T[][] array) -
flattenToNNL
-
flattenToNNL
-