Package net.minecraft.resources
Class AsyncReloader<S>
java.lang.Object
net.minecraft.resources.AsyncReloader<S>
- All Implemented Interfaces:
IAsyncReloader
- Direct Known Subclasses:
DebugAsyncReloader
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final CompletableFuture<List<S>>protected final CompletableFuture<Unit>private final AtomicIntegerprivate intprivate final intprivate final Set<IFutureReloadListener>protected final IResourceManagerprivate intprivate final AtomicInteger -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAsyncReloader(Executor p_i50690_1_, Executor p_i50690_2_, IResourceManager p_i50690_3_, List<IFutureReloadListener> p_i50690_4_, AsyncReloader.IStateFactory<S> p_i50690_5_, CompletableFuture<Unit> p_i50690_6_) -
Method Summary
Modifier and TypeMethodDescriptionvoiddone()floatbooleanbooleanisDone()static AsyncReloader<Void>of(IResourceManager p_219562_0_, List<IFutureReloadListener> p_219562_1_, Executor p_219562_2_, Executor p_219562_3_, CompletableFuture<Unit> p_219562_4_)
-
Field Details
-
resourceManager
-
allPreparations
-
allDone
-
preparingListeners
-
listenerCount
private final int listenerCount -
startedReloads
private int startedReloads -
finishedReloads
private int finishedReloads -
startedTaskCounter
-
doneTaskCounter
-
-
Constructor Details
-
AsyncReloader
protected AsyncReloader(Executor p_i50690_1_, Executor p_i50690_2_, IResourceManager p_i50690_3_, List<IFutureReloadListener> p_i50690_4_, AsyncReloader.IStateFactory<S> p_i50690_5_, CompletableFuture<Unit> p_i50690_6_)
-
-
Method Details
-
of
public static AsyncReloader<Void> of(IResourceManager p_219562_0_, List<IFutureReloadListener> p_219562_1_, Executor p_219562_2_, Executor p_219562_3_, CompletableFuture<Unit> p_219562_4_) -
done
- Specified by:
donein interfaceIAsyncReloader
-
getActualProgress
public float getActualProgress()- Specified by:
getActualProgressin interfaceIAsyncReloader
-
isApplying
public boolean isApplying()- Specified by:
isApplyingin interfaceIAsyncReloader
-
isDone
public boolean isDone()- Specified by:
isDonein interfaceIAsyncReloader
-
checkExceptions
public void checkExceptions()- Specified by:
checkExceptionsin interfaceIAsyncReloader
-