Interface PreparableModelLoadingPlugin.DataLoader<T>

Enclosing interface:
PreparableModelLoadingPlugin<T>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface PreparableModelLoadingPlugin.DataLoader<T>
  • Method Summary

    Modifier and Type
    Method
    Description
    load(net.minecraft.server.packs.resources.PreparableReloadListener.SharedState resourceReloaderStore, Executor executor)
    Returns a CompletableFuture that will load the data.
  • Method Details

    • load

      CompletableFuture<T> load(net.minecraft.server.packs.resources.PreparableReloadListener.SharedState resourceReloaderStore, Executor executor)
      Returns a CompletableFuture that will load the data. Do not block the thread when this function is called, rather use CompletableFuture.supplyAsync(Supplier, Executor) to compute the data. The completable future should be scheduled to run using the passed executor.
      Parameters:
      resourceReloaderStore - The PreparableReloadListener.SharedState instance. Use PreparableReloadListener.SharedState.resourceManager() to retrieve resources.
      executor - The executor that must be used to schedule any completable future.