Package net.minecraft.resources
Class AsyncReloader<S>
- java.lang.Object
-
- net.minecraft.resources.AsyncReloader<S>
-
- All Implemented Interfaces:
IAsyncReloader
- Direct Known Subclasses:
DebugAsyncReloader
public class AsyncReloader<S> extends java.lang.Object implements IAsyncReloader
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
AsyncReloader.IStateFactory<S>
-
Field Summary
Fields Modifier and Type Field Description protected java.util.concurrent.CompletableFuture<java.util.List<S>>
allDone
protected java.util.concurrent.CompletableFuture<Unit>
allPreparations
private java.util.concurrent.atomic.AtomicInteger
doneTaskCounter
private int
finishedReloads
private int
listenerCount
private java.util.Set<IFutureReloadListener>
preparingListeners
protected IResourceManager
resourceManager
private int
startedReloads
private java.util.concurrent.atomic.AtomicInteger
startedTaskCounter
-
Constructor Summary
Constructors Modifier Constructor Description protected
AsyncReloader(java.util.concurrent.Executor p_i50690_1_, java.util.concurrent.Executor p_i50690_2_, IResourceManager p_i50690_3_, java.util.List<IFutureReloadListener> p_i50690_4_, AsyncReloader.IStateFactory<S> p_i50690_5_, java.util.concurrent.CompletableFuture<Unit> p_i50690_6_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkExceptions()
java.util.concurrent.CompletableFuture<Unit>
done()
float
getActualProgress()
boolean
isApplying()
boolean
isDone()
static AsyncReloader<java.lang.Void>
of(IResourceManager p_219562_0_, java.util.List<IFutureReloadListener> p_219562_1_, java.util.concurrent.Executor p_219562_2_, java.util.concurrent.Executor p_219562_3_, java.util.concurrent.CompletableFuture<Unit> p_219562_4_)
-
-
-
Field Detail
-
resourceManager
protected final IResourceManager resourceManager
-
allPreparations
protected final java.util.concurrent.CompletableFuture<Unit> allPreparations
-
allDone
protected final java.util.concurrent.CompletableFuture<java.util.List<S>> allDone
-
preparingListeners
private final java.util.Set<IFutureReloadListener> preparingListeners
-
listenerCount
private final int listenerCount
-
startedReloads
private int startedReloads
-
finishedReloads
private int finishedReloads
-
startedTaskCounter
private final java.util.concurrent.atomic.AtomicInteger startedTaskCounter
-
doneTaskCounter
private final java.util.concurrent.atomic.AtomicInteger doneTaskCounter
-
-
Constructor Detail
-
AsyncReloader
protected AsyncReloader(java.util.concurrent.Executor p_i50690_1_, java.util.concurrent.Executor p_i50690_2_, IResourceManager p_i50690_3_, java.util.List<IFutureReloadListener> p_i50690_4_, AsyncReloader.IStateFactory<S> p_i50690_5_, java.util.concurrent.CompletableFuture<Unit> p_i50690_6_)
-
-
Method Detail
-
of
public static AsyncReloader<java.lang.Void> of(IResourceManager p_219562_0_, java.util.List<IFutureReloadListener> p_219562_1_, java.util.concurrent.Executor p_219562_2_, java.util.concurrent.Executor p_219562_3_, java.util.concurrent.CompletableFuture<Unit> p_219562_4_)
-
done
public java.util.concurrent.CompletableFuture<Unit> 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
-
-