Class SimpleReloadInstance<S>
java.lang.Object
net.minecraft.server.packs.resources.SimpleReloadInstance<S>
- All Implemented Interfaces:
ReloadInstance
- Direct Known Subclasses:
ProfiledReloadInstance
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected CompletableFuture<List<S>>
protected CompletableFuture<Unit>
private AtomicInteger
private static int
private int
private static int
private int
private static int
(package private) Set<PreparableReloadListener>
protected ResourceManager
private int
private AtomicInteger
-
Constructor Summary
ModifierConstructorDescriptionprotected
SimpleReloadInstance(Executor p_10808_, Executor p_10809_, ResourceManager p_10810_, List<PreparableReloadListener> p_10811_, SimpleReloadInstance.StateFactory<S> p_10812_, CompletableFuture<Unit> p_10813_)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
done()
float
boolean
isDone()
static SimpleReloadInstance<Void>
of(ResourceManager p_10816_, List<PreparableReloadListener> p_10817_, Executor p_10818_, Executor p_10819_, CompletableFuture<Unit> p_10820_)
-
Field Details
-
PREPARATION_PROGRESS_WEIGHT
private static final int PREPARATION_PROGRESS_WEIGHT- See Also:
- Constant Field Values
-
EXTRA_RELOAD_PROGRESS_WEIGHT
private static final int EXTRA_RELOAD_PROGRESS_WEIGHT- See Also:
- Constant Field Values
-
LISTENER_PROGRESS_WEIGHT
private static final int LISTENER_PROGRESS_WEIGHT- See Also:
- Constant Field Values
-
resourceManager
-
allPreparations
-
allDone
-
preparingListeners
-
listenerCount
private final int listenerCount -
startedReloads
private int startedReloads -
finishedReloads
private int finishedReloads -
startedTaskCounter
-
doneTaskCounter
-
-
Constructor Details
-
SimpleReloadInstance
protected SimpleReloadInstance(Executor p_10808_, Executor p_10809_, ResourceManager p_10810_, List<PreparableReloadListener> p_10811_, SimpleReloadInstance.StateFactory<S> p_10812_, CompletableFuture<Unit> p_10813_)
-
-
Method Details
-
of
public static SimpleReloadInstance<Void> of(ResourceManager p_10816_, List<PreparableReloadListener> p_10817_, Executor p_10818_, Executor p_10819_, CompletableFuture<Unit> p_10820_) -
done
- Specified by:
done
in interfaceReloadInstance
-
getActualProgress
public float getActualProgress()- Specified by:
getActualProgress
in interfaceReloadInstance
-
isDone
public boolean isDone()- Specified by:
isDone
in interfaceReloadInstance
-
checkExceptions
public void checkExceptions()- Specified by:
checkExceptions
in interfaceReloadInstance
-