Package net.minecraft.resource
Interface ResourceReload
- All Known Implementing Classes:
ProfiledResourceReload,ReloadableResourceManagerImpl.FailedResourceReloadMonitor,SimpleResourceReload
public interface ResourceReload
Represents a resource reload.
-
Method Summary
Modifier and Type Method Description floatgetProgress()Returns a fraction between 0 and 1 indicating the progress of this reload.booleanisComplete()Returns if this reload has completed, either normally or abnormally.booleanisPrepareStageComplete()voidthrowException()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.
-