net.minecraft.resource

public class SimpleResourceReload<S>

implements ResourceReload

net.minecraft.server.packs.resources.SimpleReloadInstance
net.minecraft.class_4014
net.minecraft.resource.SimpleResourceReload

Field summary

Modifier and TypeField
private static final int
PREPARATION_PROGRESS_WEIGHT
field_29784
FIRST_PREPARE_APPLY_WEIGHT
private static final int
EXTRA_RELOAD_PROGRESS_WEIGHT
field_29785
SECOND_PREPARE_APPLY_WEIGHT
private static final int
LISTENER_PROGRESS_WEIGHT
field_29786
RELOADER_WEIGHT
private final CompletableFuture<Unit>
allPreparations
field_18042
prepareStageFuture
private CompletableFuture<List<S>>
allDone
field_18043
applyStageFuture
private final Set<ResourceReloader>
preparingListeners
field_18044
waitingReloaders
private final int
listenerCount
field_18045
reloaderCount
private final AtomicInteger
startedTasks
field_18048
toPrepareCount
private final AtomicInteger
finishedTasks
field_56609
preparedCount
private final AtomicInteger
startedReloads
field_18046
toApplyCount
private final AtomicInteger
finishedReloads
field_18047
appliedCount

Constructor summary

ModifierConstructor
protected (List<ResourceReloader> waitingReloaders)

Method summary

Modifier and TypeMethod
public static ResourceReload
of(ResourceManager resourceManager, List<PreparableReloadListener> listeners, Executor taskExecutor, Executor mainThreadExecutor, CompletableFuture<Unit> initialTask)
method_18369(class_3300 arg0, List<class_3302> arg1, Executor arg2, Executor arg3, CompletableFuture<class_3902> arg4)
create(ResourceManager manager, List<ResourceReloader> reloaders, Executor prepareExecutor, Executor applyExecutor, CompletableFuture<Unit> initialStage)
protected void
startTasks(Executor taskExecutor, Executor mainThreadExecutor, ResourceManager resourceManager, List<PreparableReloadListener> listeners, SimpleReloadInstance$StateFactory<S> stateFactory, CompletableFuture<?> initialTask)
method_67578(Executor arg0, Executor arg1, class_3300 arg2, List<class_3302> arg3, class_4014$class_4047<S> arg4, CompletableFuture<?> arg5)
start(Executor prepareExecutor, Executor applyExecutor, ResourceManager manager, List<ResourceReloader> reloaders, SimpleResourceReload$Factory<S> factory, CompletableFuture<?> initialStage)
protected CompletableFuture<List<S>>
prepareTasks(Executor taskExecutor, Executor mainThreadExecutor, ResourceManager resourceManager, List<PreparableReloadListener> listeners, SimpleReloadInstance$StateFactory<S> stateFactory, CompletableFuture<?> initialTask)
method_67571(Executor arg0, Executor arg1, class_3300 arg2, List<class_3302> arg3, class_4014$class_4047<S> arg4, CompletableFuture<?> arg5)
startAsync(Executor prepareExecutor, Executor applyExecutor, ResourceManager manager, List<ResourceReloader> reloaders, SimpleResourceReload$Factory<S> factory, CompletableFuture<?> initialStage)
private ResourceReloader$Synchronizer
createBarrierForListener(PreparableReloadListener listener, CompletableFuture<?> previousBarrier, Executor mainThreadExecutor)
method_67573(class_3302 arg0, CompletableFuture<?> arg1, Executor arg2)
createSynchronizer(ResourceReloader reloader, CompletableFuture<?> future, Executor applyExecutor)
public CompletableFuture<?>
done()
method_18364()
whenComplete()
public float
getActualProgress()
method_18229()
getProgress()
private static int
weightProgress(int preparationTasks, int reloadTasks, int listeners)
method_67572(int arg0, int arg1, int arg2)
toWeighted(int prepare, int apply, int total)
public static ResourceReload
create(ResourceManager resourceManager, List<PreparableReloadListener> listeners, Executor backgroundExecutor, Executor mainThreadExecutor, CompletableFuture<Unit> initialTask, boolean enableProfiling)
method_40087(class_3300 arg0, List<class_3302> arg1, Executor arg2, Executor arg3, CompletableFuture<class_3902> arg4, boolean arg5)
start(ResourceManager manager, List<ResourceReloader> reloaders, Executor prepareExecutor, Executor applyExecutor, CompletableFuture<Unit> initialStage, boolean profiled)
private static void
lambda$prepareTasks$4(PreparableReloadListener$SharedState arg0, PreparableReloadListener arg1)
method_72366(class_3302$class_11558 arg0, class_3302 arg1)
method_72366(ResourceReloader$Store arg0, ResourceReloader reloader)
private void
lambda$prepareTasks$3(Executor arg0, Runnable arg1)
method_67575(Executor arg0, Runnable arg1)
method_67575(Executor arg0, Runnable runnable)
private void
lambda$prepareTasks$2(Runnable arg0)
method_67574(Runnable arg0)
method_67574(Runnable arg0)
private void
lambda$prepareTasks$1(Executor arg0, Runnable arg1)
method_67577(Executor arg0, Runnable arg1)
method_67577(Executor arg0, Runnable runnable)
private void
lambda$prepareTasks$0(Runnable arg0)
method_67576(Runnable arg0)
method_67576(Runnable arg0)