Package net.minecraft.resource
Class ReloadableResourceManagerImpl.FailedResourceReloadMonitor
java.lang.Object
net.minecraft.resource.ReloadableResourceManagerImpl.FailedResourceReloadMonitor
- All Implemented Interfaces:
ResourceReload
- Enclosing class:
- ReloadableResourceManagerImpl
static class ReloadableResourceManagerImpl.FailedResourceReloadMonitor extends Object implements ResourceReload
-
Field Summary
Fields Modifier and Type Field Description private ReloadableResourceManagerImpl.PackAdditionFailedExceptionexceptionprivate CompletableFuture<Unit>future -
Constructor Summary
Constructors Constructor Description FailedResourceReloadMonitor(ReloadableResourceManagerImpl.PackAdditionFailedException exception) -
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.
-
Field Details
-
exception
-
future
-
-
Constructor Details
-
FailedResourceReloadMonitor
public FailedResourceReloadMonitor(ReloadableResourceManagerImpl.PackAdditionFailedException exception)
-
-
Method Details
-
whenComplete
Returns a future for the reload. The returned future is completed when the reload completes.- Specified by:
whenCompletein interfaceResourceReload
-
getProgress
@Environment(CLIENT) public float getProgress()Returns a fraction between 0 and 1 indicating the progress of this reload.- Specified by:
getProgressin interfaceResourceReload
-
isPrepareStageComplete
@Environment(CLIENT) public boolean isPrepareStageComplete()- Specified by:
isPrepareStageCompletein interfaceResourceReload
-
isComplete
@Environment(CLIENT) public boolean isComplete()Returns if this reload has completed, either normally or abnormally.- Specified by:
isCompletein interfaceResourceReload
-
throwException
@Environment(CLIENT) public void throwException()Throws an unchecked exception from this reload, if there is any. Does nothing if the reload has not completed or terminated.- Specified by:
throwExceptionin interfaceResourceReload
-