Package net.minecraft.resource
Interface ResourceReloader.Synchronizer
- Enclosing interface:
 ResourceReloader
- Functional Interface:
 - This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
 
A synchronizer to indicate completion of a reloader's prepare stage and
 to allow start of the apply stage only if all reloaders have finished
 the prepare stage.
- Mappings:
 Namespace Name named net/minecraft/resource/ResourceReloader$Synchronizerintermediary net/minecraft/class_3302$class_4045official axi$a
- 
Method Summary
Modifier and TypeMethodDescription<T> CompletableFuture<T> whenPrepared(T preparedObject) Indicates, to the ongoing reload, that this reloader has finished its preparation stage with thepreparedObjectas its result. 
- 
Method Details
- 
whenPrepared
Indicates, to the ongoing reload, that this reloader has finished its preparation stage with thepreparedObjectas its result.Returns a completable future that the apply stage depends on. This returned future is completed when all the reloaders have completed their prepare stages in the reload.
Example:
CompletableFuture<SomeObject> prepareStage = ...; prepareStage.thenCompose(synchronizer::whenPrepared) .thenAcceptAsync(..., applyExecutor);- Parameters:
 preparedObject- the result of the prepare stage- Returns:
 - a completable future as the precondition for the apply stage
 - Mappings:
 Namespace Name Mixin selector named whenPreparedLnet/minecraft/resource/ResourceReloader$Synchronizer;whenPrepared(Ljava/lang/Object;)Ljava/util/concurrent/CompletableFuture;intermediary method_18352Lnet/minecraft/class_3302$class_4045;method_18352(Ljava/lang/Object;)Ljava/util/concurrent/CompletableFuture;official waitLaxi$a;wait(Ljava/lang/Object;)Ljava/util/concurrent/CompletableFuture;
 
 -