Interface ResourceReload

All Known Implementing Classes:
ProfiledResourceReload, ReloadableResourceManagerImpl.FailedResourceReloadMonitor, SimpleResourceReload

public interface ResourceReload
Represents a resource reload.
See Also:
ReloadableResourceManager.reload(java.util.concurrent.Executor, java.util.concurrent.Executor, CompletableFuture, java.util.List)
  • Method Summary

    Modifier and Type Method Description
    float getProgress()
    Returns a fraction between 0 and 1 indicating the progress of this reload.
    boolean isComplete()
    Returns if this reload has completed, either normally or abnormally.
    boolean isPrepareStageComplete()  
    void throwException()
    Throws an unchecked exception from this reload, if there is any.
    CompletableFuture<Unit> whenComplete()
    Returns a future for the reload.
  • Method Details

    • whenComplete

      CompletableFuture<Unit> whenComplete()
      Returns a future for the reload. The returned future is completed when the reload completes.
    • getProgress

      @Environment(CLIENT) float getProgress()
      Returns a fraction between 0 and 1 indicating the progress of this reload.
    • isPrepareStageComplete

      @Environment(CLIENT) boolean isPrepareStageComplete()
    • isComplete

      @Environment(CLIENT) boolean isComplete()
      Returns if this reload has completed, either normally or abnormally.
    • throwException

      @Environment(CLIENT) void throwException()
      Throws an unchecked exception from this reload, if there is any. Does nothing if the reload has not completed or terminated.