Class ArrayUtil

java.lang.Object
com.blamejared.crafttweaker.api.util.ArrayUtil

public final class ArrayUtil extends Object
  • 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

      public static <T, U> net.minecraft.core.NonNullList<U> flattenToNNL(T[][] array, Supplier<U> empty, Function<T,U> converter)
    • flattenToNNL

      public static <T, U> net.minecraft.core.NonNullList<U> flattenToNNL(int width, int height, T[][] array, Supplier<U> empty, Function<T,U> converter)