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 TypeFieldDescriptionprivate CompletableFuture
<List<S>> (package private) final CompletableFuture
<Unit> private static final int
private final AtomicInteger
private final AtomicInteger
private static final int
private final int
private static final int
(package private) final Set
<PreparableReloadListener> private final AtomicInteger
private final AtomicInteger
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
SimpleReloadInstance
(List<PreparableReloadListener> p_10811_) -
Method Summary
Modifier and TypeMethodDescriptionstatic ReloadInstance
create
(ResourceManager p_203835_, List<PreparableReloadListener> p_203836_, Executor p_203837_, Executor p_203838_, CompletableFuture<Unit> p_203839_, boolean p_203840_) createBarrierForListener
(PreparableReloadListener p_405338_, CompletableFuture<?> p_404885_, Executor p_405684_) done()
float
static ReloadInstance
of
(ResourceManager p_10816_, List<PreparableReloadListener> p_10817_, Executor p_10818_, Executor p_10819_, CompletableFuture<Unit> p_10820_) protected CompletableFuture
<List<S>> prepareTasks
(Executor p_405268_, Executor p_405682_, ResourceManager p_404829_, List<PreparableReloadListener> p_405049_, SimpleReloadInstance.StateFactory<S> p_405573_, CompletableFuture<?> p_405777_) protected void
startTasks
(Executor p_405149_, Executor p_404751_, ResourceManager p_404875_, List<PreparableReloadListener> p_404801_, SimpleReloadInstance.StateFactory<S> p_405705_, CompletableFuture<?> p_405320_) private static int
weightProgress
(int p_404933_, int p_405172_, int p_405849_) 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 -
startedTasks
-
finishedTasks
-
startedReloads
-
finishedReloads
-
-
Constructor Details
-
SimpleReloadInstance
-
-
Method Details
-
of
public static ReloadInstance of(ResourceManager p_10816_, List<PreparableReloadListener> p_10817_, Executor p_10818_, Executor p_10819_, CompletableFuture<Unit> p_10820_) -
startTasks
protected void startTasks(Executor p_405149_, Executor p_404751_, ResourceManager p_404875_, List<PreparableReloadListener> p_404801_, SimpleReloadInstance.StateFactory<S> p_405705_, CompletableFuture<?> p_405320_) -
prepareTasks
protected CompletableFuture<List<S>> prepareTasks(Executor p_405268_, Executor p_405682_, ResourceManager p_404829_, List<PreparableReloadListener> p_405049_, SimpleReloadInstance.StateFactory<S> p_405573_, CompletableFuture<?> p_405777_) -
createBarrierForListener
private PreparableReloadListener.PreparationBarrier createBarrierForListener(PreparableReloadListener p_405338_, CompletableFuture<?> p_404885_, Executor p_405684_) -
done
- Specified by:
done
in interfaceReloadInstance
-
getActualProgress
public float getActualProgress()- Specified by:
getActualProgress
in interfaceReloadInstance
-
weightProgress
private static int weightProgress(int p_404933_, int p_405172_, int p_405849_) -
create
public static ReloadInstance create(ResourceManager p_203835_, List<PreparableReloadListener> p_203836_, Executor p_203837_, Executor p_203838_, CompletableFuture<Unit> p_203839_, boolean p_203840_)
-