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
-
Field Summary
Modifier and TypeFieldDescriptionprotected final CompletableFuture<List<S>>
protected final CompletableFuture<Unit>
private final AtomicInteger
private int
private final int
private final Set<IFutureReloadListener>
protected final IResourceManager
private int
private final AtomicInteger
-
Constructor Summary
ModifierConstructorDescriptionprotected
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 Summary
Modifier and TypeMethodDescriptionvoid
done()
float
boolean
boolean
isDone()
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:
done
in interfaceIAsyncReloader
-
getActualProgress
public float getActualProgress()- Specified by:
getActualProgress
in interfaceIAsyncReloader
-
isApplying
public boolean isApplying()- Specified by:
isApplying
in interfaceIAsyncReloader
-
isDone
public boolean isDone()- Specified by:
isDone
in interfaceIAsyncReloader
-
checkExceptions
public void checkExceptions()- Specified by:
checkExceptions
in interfaceIAsyncReloader
-