diff --git a/mappings/net/minecraft/client/gui/screen/SplashScreen.mapping b/mappings/net/minecraft/client/gui/screen/SplashScreen.mapping index 4cb4113b52..9afe17e63d 100644 --- a/mappings/net/minecraft/client/gui/screen/SplashScreen.mapping +++ b/mappings/net/minecraft/client/gui/screen/SplashScreen.mapping @@ -1,11 +1,11 @@ CLASS net/minecraft/class_425 net/minecraft/client/gui/screen/SplashScreen - FIELD field_17767 reloadMonitor Lnet/minecraft/class_4011; + FIELD field_17767 reload Lnet/minecraft/class_4011; FIELD field_17770 progress F - FIELD field_17771 applyCompleteTime J + FIELD field_17771 reloadCompleteTime J FIELD field_18217 client Lnet/minecraft/class_310; FIELD field_18218 exceptionHandler Ljava/util/function/Consumer; FIELD field_18219 reloading Z - FIELD field_18220 prepareCompleteTime J + FIELD field_18220 reloadStartTime J FIELD field_2483 LOGO Lnet/minecraft/class_2960; FIELD field_25041 BRAND_ARGB I FIELD field_25042 BRAND_RGB I diff --git a/mappings/net/minecraft/resource/JsonDataLoader.mapping b/mappings/net/minecraft/resource/JsonDataLoader.mapping index 4c60362442..e272ecaee6 100644 --- a/mappings/net/minecraft/resource/JsonDataLoader.mapping +++ b/mappings/net/minecraft/resource/JsonDataLoader.mapping @@ -1,4 +1,6 @@ CLASS net/minecraft/class_4309 net/minecraft/resource/JsonDataLoader + COMMENT An abstract implementation of resource reloader that reads JSON files + COMMENT into Gson representations in the prepare stage. FIELD field_19377 LOGGER Lorg/apache/logging/log4j/Logger; FIELD field_19378 FILE_SUFFIX_LENGTH I FIELD field_19379 gson Lcom/google/gson/Gson; diff --git a/mappings/net/minecraft/resource/ProfilingResourceReloader.mapping b/mappings/net/minecraft/resource/ProfiledResourceReload.mapping similarity index 65% rename from mappings/net/minecraft/resource/ProfilingResourceReloader.mapping rename to mappings/net/minecraft/resource/ProfiledResourceReload.mapping index 5295d7fed7..92b61f0963 100644 --- a/mappings/net/minecraft/resource/ProfilingResourceReloader.mapping +++ b/mappings/net/minecraft/resource/ProfiledResourceReload.mapping @@ -1,17 +1,28 @@ -CLASS net/minecraft/class_4010 net/minecraft/resource/ProfilingResourceReloader +CLASS net/minecraft/class_4010 net/minecraft/resource/ProfiledResourceReload + COMMENT An implementation of resource reload that includes an additional profiling + COMMENT summary for each reloader. FIELD field_17918 LOGGER Lorg/apache/logging/log4j/Logger; FIELD field_17919 reloadTimer Lcom/google/common/base/Stopwatch; METHOD (Lnet/minecraft/class_3300;Ljava/util/List;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;Ljava/util/concurrent/CompletableFuture;)V ARG 1 manager - ARG 2 listeners + ARG 2 reloaders ARG 3 prepareExecutor ARG 4 applyExecutor + ARG 5 initialStage METHOD method_18238 finish (Ljava/util/List;)V ARG 1 summaries + METHOD method_18354 (Ljava/util/concurrent/Executor;Ljava/util/concurrent/atomic/AtomicLong;Ljava/lang/Runnable;)V + ARG 2 application METHOD method_18355 (Ljava/util/concurrent/Executor;Lnet/minecraft/class_3302$class_4045;Lnet/minecraft/class_3300;Lnet/minecraft/class_3302;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture; - ARG 4 prepareExecutor - ARG 5 applyExecutor + ARG 1 synchronizer + ARG 2 resourceManager + ARG 3 reloader + ARG 4 prepare + ARG 5 apply + METHOD method_18358 (Ljava/util/concurrent/Executor;Ljava/util/concurrent/atomic/AtomicLong;Ljava/lang/Runnable;)V + ARG 2 preparation CLASS class_4046 Summary + COMMENT The profiling summary for each reloader in the reload. FIELD field_18037 name Ljava/lang/String; FIELD field_18038 prepareProfile Lnet/minecraft/class_3696; FIELD field_18039 applyProfile Lnet/minecraft/class_3696; diff --git a/mappings/net/minecraft/resource/ReloadableResourceManager.mapping b/mappings/net/minecraft/resource/ReloadableResourceManager.mapping index cba3e427ee..a5f7a0abe8 100644 --- a/mappings/net/minecraft/resource/ReloadableResourceManager.mapping +++ b/mappings/net/minecraft/resource/ReloadableResourceManager.mapping @@ -1,13 +1,46 @@ CLASS net/minecraft/class_3296 net/minecraft/resource/ReloadableResourceManager - METHOD method_14477 registerListener (Lnet/minecraft/class_3302;)V - ARG 1 listener - METHOD method_14478 beginReload (Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;Ljava/util/List;Ljava/util/concurrent/CompletableFuture;)Ljava/util/concurrent/CompletableFuture; + COMMENT A resource manager that has a reload mechanism. Reloading allows + COMMENT reloaders to update when resources change. Accessing resources in + COMMENT reloads can reduce impact on game performance as well. + COMMENT + COMMENT

In each reload, all reloaders in this resource manager will have + COMMENT their {@linkplain ResourceReloader#reload reload} called. + COMMENT + COMMENT @see ResourceReloader + METHOD method_14477 registerReloader (Lnet/minecraft/class_3302;)V + COMMENT Registers a resource reloader to this manager. + ARG 1 reloader + COMMENT the reloader + METHOD method_14478 reload (Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;Ljava/util/List;Ljava/util/concurrent/CompletableFuture;)Ljava/util/concurrent/CompletableFuture; + COMMENT Performs a reload. This returns a future that is completed when the + COMMENT reload is completed. + COMMENT + COMMENT @return the future of the reload + COMMENT @see #reload(Executor, Executor, CompletableFuture, List) ARG 1 prepareExecutor + COMMENT an executor for the prepare stage ARG 2 applyExecutor + COMMENT an executor for the apply stage ARG 3 packs + COMMENT a list of resource packs providing resources ARG 4 initialStage - METHOD method_18232 beginMonitoredReload (Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;Ljava/util/concurrent/CompletableFuture;Ljava/util/List;)Lnet/minecraft/class_4011; + COMMENT a completable future to be completed before this reload + METHOD method_18232 reload (Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;Ljava/util/concurrent/CompletableFuture;Ljava/util/List;)Lnet/minecraft/class_4011; + COMMENT Performs a reload. Returns an object that yields some insights to the + COMMENT reload. + COMMENT + COMMENT

{@code prepareExecutor} may be asynchronous. {@code applyExecutor} must + COMMENT synchronize with the game engine so changes are properly made to it. + COMMENT The reload will only begin after {@code initialStage} has completed. + COMMENT Earlier elements in {@code packs} have lower priorities. + COMMENT + COMMENT @return the reload + COMMENT @see ResourceReloader#reload ARG 1 prepareExecutor + COMMENT an executor for the prepare stage ARG 2 applyExecutor + COMMENT an executor for the apply stage ARG 3 initialStage + COMMENT a completable future to be completed before this reload ARG 4 packs + COMMENT a list of resource packs providing resources diff --git a/mappings/net/minecraft/resource/ReloadableResourceManagerImpl.mapping b/mappings/net/minecraft/resource/ReloadableResourceManagerImpl.mapping index 14904b0b77..e2353afde7 100644 --- a/mappings/net/minecraft/resource/ReloadableResourceManagerImpl.mapping +++ b/mappings/net/minecraft/resource/ReloadableResourceManagerImpl.mapping @@ -3,14 +3,14 @@ CLASS net/minecraft/class_3304 net/minecraft/resource/ReloadableResourceManagerI FIELD field_14293 namespaceManagers Ljava/util/Map; FIELD field_14294 type Lnet/minecraft/class_3264; FIELD field_14295 LOGGER Lorg/apache/logging/log4j/Logger; - FIELD field_17935 listeners Ljava/util/List; + FIELD field_17935 reloaders Ljava/util/List; FIELD field_25145 packs Ljava/util/List; METHOD (Lnet/minecraft/class_3264;)V ARG 1 type METHOD method_14475 addPack (Lnet/minecraft/class_3262;)V ARG 1 pack METHOD method_14495 clear ()V - CLASS class_4742 FailedResourceReloadMonitor + CLASS class_4742 FailedReload FIELD field_21810 exception Lnet/minecraft/class_3304$class_4743; FIELD field_21811 future Ljava/util/concurrent/CompletableFuture; METHOD (Lnet/minecraft/class_3304$class_4743;)V diff --git a/mappings/net/minecraft/resource/ResourceReload.mapping b/mappings/net/minecraft/resource/ResourceReload.mapping new file mode 100644 index 0000000000..ae45057e92 --- /dev/null +++ b/mappings/net/minecraft/resource/ResourceReload.mapping @@ -0,0 +1,16 @@ +CLASS net/minecraft/class_4011 net/minecraft/resource/ResourceReload + COMMENT Represents a resource reload. + COMMENT + COMMENT @see ReloadableResourceManager#reload(java.util.concurrent.Executor, + COMMENT java.util.concurrent.Executor, CompletableFuture, java.util.List) + METHOD method_18229 getProgress ()F + COMMENT Returns a fraction between 0 and 1 indicating the progress of this + COMMENT reload. + METHOD method_18364 whenComplete ()Ljava/util/concurrent/CompletableFuture; + COMMENT Returns a future for the reload. The returned future is completed when + COMMENT the reload completes. + METHOD method_18787 isComplete ()Z + COMMENT Returns if this reload has completed, either normally or abnormally. + METHOD method_18849 throwException ()V + COMMENT Throws an unchecked exception from this reload, if there is any. Does + COMMENT nothing if the reload has not completed or terminated. diff --git a/mappings/net/minecraft/resource/ResourceReloadListener.mapping b/mappings/net/minecraft/resource/ResourceReloadListener.mapping deleted file mode 100644 index ed81219cf8..0000000000 --- a/mappings/net/minecraft/resource/ResourceReloadListener.mapping +++ /dev/null @@ -1,12 +0,0 @@ -CLASS net/minecraft/class_3302 net/minecraft/resource/ResourceReloadListener - METHOD method_22322 getName ()Ljava/lang/String; - METHOD method_25931 reload (Lnet/minecraft/class_3302$class_4045;Lnet/minecraft/class_3300;Lnet/minecraft/class_3695;Lnet/minecraft/class_3695;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture; - ARG 1 synchronizer - ARG 2 manager - ARG 3 prepareProfiler - ARG 4 applyProfiler - ARG 5 prepareExecutor - ARG 6 applyExecutor - CLASS class_4045 Synchronizer - METHOD method_18352 whenPrepared (Ljava/lang/Object;)Ljava/util/concurrent/CompletableFuture; - ARG 1 preparedObject diff --git a/mappings/net/minecraft/resource/ResourceReloadMonitor.mapping b/mappings/net/minecraft/resource/ResourceReloadMonitor.mapping deleted file mode 100644 index f0dae02762..0000000000 --- a/mappings/net/minecraft/resource/ResourceReloadMonitor.mapping +++ /dev/null @@ -1,5 +0,0 @@ -CLASS net/minecraft/class_4011 net/minecraft/resource/ResourceReloadMonitor - METHOD method_18229 getProgress ()F - METHOD method_18364 whenComplete ()Ljava/util/concurrent/CompletableFuture; - METHOD method_18787 isApplyStageComplete ()Z - METHOD method_18849 throwExceptions ()V diff --git a/mappings/net/minecraft/resource/ResourceReloader.mapping b/mappings/net/minecraft/resource/ResourceReloader.mapping index ef26024d40..16d9b09f3e 100644 --- a/mappings/net/minecraft/resource/ResourceReloader.mapping +++ b/mappings/net/minecraft/resource/ResourceReloader.mapping @@ -1,30 +1,65 @@ -CLASS net/minecraft/class_4014 net/minecraft/resource/ResourceReloader - FIELD field_17927 manager Lnet/minecraft/class_3300; - FIELD field_18042 prepareStageFuture Ljava/util/concurrent/CompletableFuture; - FIELD field_18043 applyStageFuture Ljava/util/concurrent/CompletableFuture; - FIELD field_18044 waitingListeners Ljava/util/Set; - FIELD field_18045 listenerCount I - FIELD field_18046 applyingCount I - FIELD field_18047 appliedCount I - FIELD field_18048 preparingCount Ljava/util/concurrent/atomic/AtomicInteger; - FIELD field_18049 preparedCount Ljava/util/concurrent/atomic/AtomicInteger; - METHOD (Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;Lnet/minecraft/class_3300;Ljava/util/List;Lnet/minecraft/class_4014$class_4047;Ljava/util/concurrent/CompletableFuture;)V - ARG 1 prepareExecutor - ARG 2 applyExecutor - ARG 3 manager - ARG 4 listeners - ARG 5 creator - ARG 6 initialStage - METHOD method_18369 create (Lnet/minecraft/class_3300;Ljava/util/List;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;Ljava/util/concurrent/CompletableFuture;)Lnet/minecraft/class_4014; - ARG 0 manager - ARG 1 listeners - ARG 2 prepareExecutor - ARG 3 applyExecutor - ARG 4 initialStage - CLASS class_4047 Factory - METHOD create (Lnet/minecraft/class_3302$class_4045;Lnet/minecraft/class_3300;Lnet/minecraft/class_3302;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture; - ARG 1 helper - ARG 2 manager - ARG 3 listener - ARG 4 prepareExecutor - ARG 5 applyExecutor +CLASS net/minecraft/class_3302 net/minecraft/resource/ResourceReloader + COMMENT A resource reloader performs actual reloading in its {@linkplain #reload + COMMENT reload} in a reloadable resource manager it is registered to. + COMMENT + COMMENT @see ReloadableResourceManager + COMMENT @see SinglePreparationResourceReloader SinglePreparationResourceReloader + COMMENT (completes preparation in one method) + COMMENT @see SynchronousResourceReloader SynchronousResourceReloader + COMMENT (performs all reloading in the apply executor) + METHOD method_22322 getName ()Ljava/lang/String; + COMMENT Returns a user-friendly name for logging. + METHOD method_25931 reload (Lnet/minecraft/class_3302$class_4045;Lnet/minecraft/class_3300;Lnet/minecraft/class_3695;Lnet/minecraft/class_3695;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture; + COMMENT Performs a reload. Returns a future that is completed when the reload + COMMENT is completed. + COMMENT + COMMENT

In a reload, there is a prepare stage and an apply stage. For the + COMMENT prepare stage, you should create completable futures with {@linkplain + COMMENT CompletableFuture#supplyAsync(Supplier, Executor) + COMMENT CompletableFuture.supplyAsync(..., prepareExecutor)} + COMMENT to ensure the prepare actions are done with the prepare executor. Then, + COMMENT you should have a completable future for all the prepared actions, and + COMMENT call {@linkplain CompletableFuture#thenCompose(Function) + COMMENT combinedPrepare.thenCompose(synchronizer::waitFor)} + COMMENT to notify the {@code synchronizer}. Finally, you should run {@linkplain + COMMENT CompletableFuture#thenAcceptAsync(Consumer, Executor) + COMMENT CompletableFuture.thenAcceptAsync(..., applyExecutor)} for apply actions. + COMMENT In the end, returns the result of {@code thenAcceptAsync}. + COMMENT + COMMENT @return a future for the reload + COMMENT @see ReloadableResourceManager#reload(Executor, Executor, + COMMENT CompletableFuture, List) + ARG 1 synchronizer + COMMENT the synchronizer + ARG 2 manager + COMMENT the resource manager + ARG 3 prepareProfiler + COMMENT the profiler for prepare stage + ARG 4 applyProfiler + COMMENT the profiler for apply stage + ARG 5 prepareExecutor + COMMENT the executor for prepare stage + ARG 6 applyExecutor + COMMENT the executor for apply stage + CLASS class_4045 Synchronizer + COMMENT A synchronizer to indicate completion of a reloader's prepare stage and + COMMENT to allow start of the apply stage only if all reloaders have finished + COMMENT the prepare stage. + METHOD method_18352 whenPrepared (Ljava/lang/Object;)Ljava/util/concurrent/CompletableFuture; + COMMENT Indicates, to the ongoing reload, that this reloader has finished its + COMMENT preparation stage with the {@code preparedObject} as its result. + COMMENT + COMMENT

Returns a completable future that the apply stage depends on. This + COMMENT returned future is completed when all the reloaders have completed their + COMMENT prepare stages in the reload. + COMMENT + COMMENT

Example: + COMMENT {@code + COMMENT CompletableFuture prepareStage = ...; + COMMENT prepareStage.thenCompose(synchronizer::whenPrepared) + COMMENT .thenAcceptAsync(..., applyExecutor); + COMMENT } + COMMENT + COMMENT @return a completable future as the precondition for the apply stage + ARG 1 preparedObject + COMMENT the result of the prepare stage diff --git a/mappings/net/minecraft/resource/ServerResourceManager.mapping b/mappings/net/minecraft/resource/ServerResourceManager.mapping index 6f7637a4fb..fc809382e1 100644 --- a/mappings/net/minecraft/resource/ServerResourceManager.mapping +++ b/mappings/net/minecraft/resource/ServerResourceManager.mapping @@ -1,4 +1,5 @@ CLASS net/minecraft/class_5350 net/minecraft/resource/ServerResourceManager + FIELD field_25334 COMPLETED_UNIT Ljava/util/concurrent/CompletableFuture; FIELD field_25335 resourceManager Lnet/minecraft/class_3296; FIELD field_25336 commandManager Lnet/minecraft/class_2170; FIELD field_25337 recipeManager Lnet/minecraft/class_1863; @@ -10,10 +11,16 @@ CLASS net/minecraft/class_5350 net/minecraft/resource/ServerResourceManager FIELD field_28017 lootFunctionManager Lnet/minecraft/class_5640; METHOD (Lnet/minecraft/class_5455;Lnet/minecraft/class_2170$class_5364;I)V ARG 1 registryManager + ARG 2 commandEnvironment + ARG 3 functionPermissionLevel METHOD method_29465 getFunctionLoader ()Lnet/minecraft/class_5349; METHOD method_29466 reload (Ljava/util/List;Lnet/minecraft/class_5455;Lnet/minecraft/class_2170$class_5364;ILjava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture; ARG 0 packs ARG 1 registryManager + ARG 2 commandEnvironment + ARG 3 functionPermissionLevel + ARG 4 prepareExecutor + ARG 5 applyExecutor METHOD method_29468 getLootConditionManager ()Lnet/minecraft/class_4567; METHOD method_29469 getLootManager ()Lnet/minecraft/class_60; METHOD method_29470 getRegistryTagManager ()Lnet/minecraft/class_5415; diff --git a/mappings/net/minecraft/resource/SimpleResourceReload.mapping b/mappings/net/minecraft/resource/SimpleResourceReload.mapping new file mode 100644 index 0000000000..d7113e3157 --- /dev/null +++ b/mappings/net/minecraft/resource/SimpleResourceReload.mapping @@ -0,0 +1,48 @@ +CLASS net/minecraft/class_4014 net/minecraft/resource/SimpleResourceReload + COMMENT A simple implementation of resource reload. + COMMENT + COMMENT @param the result type for each reloader in the reload + FIELD field_17927 manager Lnet/minecraft/class_3300; + FIELD field_18042 prepareStageFuture Ljava/util/concurrent/CompletableFuture; + FIELD field_18043 applyStageFuture Ljava/util/concurrent/CompletableFuture; + FIELD field_18044 waitingReloaders Ljava/util/Set; + FIELD field_18045 reloaderCount I + FIELD field_18046 toApplyCount I + FIELD field_18047 appliedCount I + FIELD field_18048 toPrepareCount Ljava/util/concurrent/atomic/AtomicInteger; + FIELD field_18049 preparedCount Ljava/util/concurrent/atomic/AtomicInteger; + METHOD (Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;Lnet/minecraft/class_3300;Ljava/util/List;Lnet/minecraft/class_4014$class_4047;Ljava/util/concurrent/CompletableFuture;)V + ARG 1 prepareExecutor + ARG 2 applyExecutor + ARG 3 manager + ARG 4 reloaders + ARG 5 factory + ARG 6 initialStage + METHOD method_18366 (Ljava/util/List;)Lnet/minecraft/class_3902; + ARG 0 results + METHOD method_18367 (Ljava/util/concurrent/Executor;Ljava/lang/Runnable;)V + ARG 2 application + METHOD method_18368 (Ljava/util/concurrent/Executor;Lnet/minecraft/class_3302$class_4045;Lnet/minecraft/class_3300;Lnet/minecraft/class_3302;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture; + ARG 1 synchronizer + ARG 2 resourceManager + ARG 3 reloader + ARG 4 prepare + ARG 5 apply + METHOD method_18369 create (Lnet/minecraft/class_3300;Ljava/util/List;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;Ljava/util/concurrent/CompletableFuture;)Lnet/minecraft/class_4014; + COMMENT Creates a simple resource reload without additional results. + ARG 0 manager + ARG 1 reloaders + ARG 2 prepareExecutor + ARG 3 applyExecutor + ARG 4 initialStage + METHOD method_18372 (Ljava/util/concurrent/Executor;Ljava/lang/Runnable;)V + ARG 2 preparation + CLASS class_4047 Factory + COMMENT A factory that creates a completable future for each reloader in the + COMMENT resource reload. + METHOD create (Lnet/minecraft/class_3302$class_4045;Lnet/minecraft/class_3300;Lnet/minecraft/class_3302;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture; + ARG 1 synchronizer + ARG 2 manager + ARG 3 reloader + ARG 4 prepareExecutor + ARG 5 applyExecutor diff --git a/mappings/net/minecraft/resource/SinglePreparationResourceReloadListener.mapping b/mappings/net/minecraft/resource/SinglePreparationResourceReloadListener.mapping deleted file mode 100644 index 9f597527f9..0000000000 --- a/mappings/net/minecraft/resource/SinglePreparationResourceReloadListener.mapping +++ /dev/null @@ -1,8 +0,0 @@ -CLASS net/minecraft/class_4080 net/minecraft/resource/SinglePreparationResourceReloadListener - METHOD method_18788 apply (Ljava/lang/Object;Lnet/minecraft/class_3300;Lnet/minecraft/class_3695;)V - ARG 1 loader - ARG 2 manager - ARG 3 profiler - METHOD method_18789 prepare (Lnet/minecraft/class_3300;Lnet/minecraft/class_3695;)Ljava/lang/Object; - ARG 1 manager - ARG 2 profiler diff --git a/mappings/net/minecraft/resource/SinglePreparationResourceReloader.mapping b/mappings/net/minecraft/resource/SinglePreparationResourceReloader.mapping new file mode 100644 index 0000000000..57d5b32b09 --- /dev/null +++ b/mappings/net/minecraft/resource/SinglePreparationResourceReloader.mapping @@ -0,0 +1,27 @@ +CLASS net/minecraft/class_4080 net/minecraft/resource/SinglePreparationResourceReloader + COMMENT A base resource reloader implementation that prepares an object in a + COMMENT single call (as opposed to in multiple concurrent tasks) and handles + COMMENT the prepared object in the apply stage. + COMMENT + COMMENT @param the intermediate object type + METHOD method_18788 apply (Ljava/lang/Object;Lnet/minecraft/class_3300;Lnet/minecraft/class_3695;)V + COMMENT Handles the prepared intermediate object. + COMMENT + COMMENT

This method is called in the apply executor, or the game engine, in a + COMMENT reload. + ARG 1 prepared + COMMENT the prepared object + ARG 2 manager + COMMENT the resource manager + ARG 3 profiler + COMMENT the apply profiler + METHOD method_18789 prepare (Lnet/minecraft/class_3300;Lnet/minecraft/class_3695;)Ljava/lang/Object; + COMMENT Prepares the intermediate object. + COMMENT + COMMENT

This method is called in the prepare executor in a reload. + COMMENT + COMMENT @return the prepared object + ARG 1 manager + COMMENT the resource manager + ARG 2 profiler + COMMENT the prepare profiler diff --git a/mappings/net/minecraft/resource/SynchronousResourceReloadListener.mapping b/mappings/net/minecraft/resource/SynchronousResourceReloadListener.mapping deleted file mode 100644 index bf156b47c6..0000000000 --- a/mappings/net/minecraft/resource/SynchronousResourceReloadListener.mapping +++ /dev/null @@ -1,3 +0,0 @@ -CLASS net/minecraft/class_4013 net/minecraft/resource/SynchronousResourceReloadListener - METHOD method_14491 apply (Lnet/minecraft/class_3300;)V - ARG 1 manager diff --git a/mappings/net/minecraft/resource/SynchronousResourceReloader.mapping b/mappings/net/minecraft/resource/SynchronousResourceReloader.mapping new file mode 100644 index 0000000000..49e5e0394b --- /dev/null +++ b/mappings/net/minecraft/resource/SynchronousResourceReloader.mapping @@ -0,0 +1,13 @@ +CLASS net/minecraft/class_4013 net/minecraft/resource/SynchronousResourceReloader + COMMENT A base resource reloader that does all its work in the apply executor, + COMMENT or the game engine's thread. + COMMENT + COMMENT @apiNote This resource reloader is useful as a resource reload callback + COMMENT that doesn't need resource manager access. If you access the resource + COMMENT manager, consider writing resource reloaders that have a proper prepare + COMMENT stage instead by moving resource manager access to the prepare stage. + COMMENT That can speed up resource reloaders significantly. + METHOD method_14491 reload (Lnet/minecraft/class_3300;)V + COMMENT Performs the reload in the apply executor, or the game engine. + ARG 1 manager + COMMENT the resource manager