Class SimpleReloadInstance<S>
java.lang.Object
net.minecraft.server.packs.resources.SimpleReloadInstance<S>
- All Implemented Interfaces:
ReloadInstance
- Direct Known Subclasses:
ProfiledReloadInstance
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CompletableFuture
<List<S>> protected final CompletableFuture
<Unit> private final AtomicInteger
private static final int
private int
private static final int
private final int
private static final int
(package private) final Set
<PreparableReloadListener> private int
private final AtomicInteger
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
SimpleReloadInstance
(Executor pBackgroundExecutor, Executor pGameExecutor, ResourceManager pResourceManager, List<PreparableReloadListener> pListeners, SimpleReloadInstance.StateFactory<S> pStateFactory, CompletableFuture<Unit> pAlsoWaitedFor) -
Method Summary
Modifier and TypeMethodDescriptionstatic ReloadInstance
create
(ResourceManager pResourceManager, List<PreparableReloadListener> pListeners, Executor pBackgroundExecutor, Executor pGameExecutor, CompletableFuture<Unit> pAlsoWaitedFor, boolean pProfiled) done()
float
static SimpleReloadInstance
<Void> of
(ResourceManager pResourceManager, List<PreparableReloadListener> pListeners, Executor pBackgroundExecutor, Executor pGameExecutor, CompletableFuture<Unit> pAlsoWaitedFor) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.server.packs.resources.ReloadInstance
checkExceptions, isDone
-
Field Details
-
PREPARATION_PROGRESS_WEIGHT
private static final int PREPARATION_PROGRESS_WEIGHT- See Also:
-
EXTRA_RELOAD_PROGRESS_WEIGHT
private static final int EXTRA_RELOAD_PROGRESS_WEIGHT- See Also:
-
LISTENER_PROGRESS_WEIGHT
private static final int LISTENER_PROGRESS_WEIGHT- See Also:
-
allPreparations
-
allDone
-
preparingListeners
-
listenerCount
private final int listenerCount -
startedReloads
private int startedReloads -
finishedReloads
private int finishedReloads -
startedTaskCounter
-
doneTaskCounter
-
-
Constructor Details
-
SimpleReloadInstance
protected SimpleReloadInstance(Executor pBackgroundExecutor, Executor pGameExecutor, ResourceManager pResourceManager, List<PreparableReloadListener> pListeners, SimpleReloadInstance.StateFactory<S> pStateFactory, CompletableFuture<Unit> pAlsoWaitedFor)
-
-
Method Details
-
of
public static SimpleReloadInstance<Void> of(ResourceManager pResourceManager, List<PreparableReloadListener> pListeners, Executor pBackgroundExecutor, Executor pGameExecutor, CompletableFuture<Unit> pAlsoWaitedFor) -
done
- Specified by:
done
in interfaceReloadInstance
-
getActualProgress
public float getActualProgress()- Specified by:
getActualProgress
in interfaceReloadInstance
-
create
public static ReloadInstance create(ResourceManager pResourceManager, List<PreparableReloadListener> pListeners, Executor pBackgroundExecutor, Executor pGameExecutor, CompletableFuture<Unit> pAlsoWaitedFor, boolean pProfiled)
-