类 SimpleResourceReload<S>
- java.lang.Object
-
- net.minecraft.resource.SimpleResourceReload<S>
-
- 类型参数:
S- the result type for each reloader in the reload
- 所有已实现的接口:
ResourceReload
- 直接已知子类:
ProfiledResourceReload
public class SimpleResourceReload<S> extends Object implements ResourceReload
A simple implementation of resource reload.- Mappings:
Namespace Name official adqintermediary net/minecraft/class_4014named net/minecraft/resource/SimpleResourceReload
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static interfaceSimpleResourceReload.Factory<S>A factory that creates a completable future for each reloader in the resource reload.
-
字段概要
字段 修饰符和类型 字段 说明 private intappliedCountprotected CompletableFuture<List<S>>applyStageFutureprivate static intFIRST_PREPARE_APPLY_WEIGHTThe weight of either prepare or apply stages' progress in the total progress calculation.protected ResourceManagermanagerprivate AtomicIntegerpreparedCountprotected CompletableFuture<Unit>prepareStageFutureprivate static intRELOADER_WEIGHTThe weight of reloaders' progress in the total progress calculation.private intreloaderCountprivate static intSECOND_PREPARE_APPLY_WEIGHTThe weight of either prepare or apply stages' progress in the total progress calculation.private inttoApplyCountprivate AtomicIntegertoPrepareCountprivate Set<ResourceReloader>waitingReloaders
-
构造器概要
构造器 限定符 构造器 说明 protectedSimpleResourceReload(Executor prepareExecutor, Executor applyExecutor, ResourceManager manager, List<ResourceReloader> reloaders, SimpleResourceReload.Factory<S> factory, CompletableFuture<Unit> initialStage)
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 static SimpleResourceReload<Void>create(ResourceManager manager, List<ResourceReloader> reloaders, Executor prepareExecutor, Executor applyExecutor, CompletableFuture<Unit> initialStage)Creates a simple resource reload without additional results.floatgetProgress()Returns a fraction between 0 and 1 indicating the progress of this reload.booleanisComplete()Returns if this reload has completed, either normally or abnormally.voidthrowException()Throws an unchecked exception from this reload, if there is any.CompletableFuture<Unit>whenComplete()Returns a future for the reload.
-
-
-
字段详细资料
-
FIRST_PREPARE_APPLY_WEIGHT
private static final int FIRST_PREPARE_APPLY_WEIGHT
The weight of either prepare or apply stages' progress in the total progress calculation. Has value 2.- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official dLadq;d:Iintermediary field_29784Lnet/minecraft/class_4014;field_29784:Inamed FIRST_PREPARE_APPLY_WEIGHTLnet/minecraft/resource/SimpleResourceReload;FIRST_PREPARE_APPLY_WEIGHT:I
-
SECOND_PREPARE_APPLY_WEIGHT
private static final int SECOND_PREPARE_APPLY_WEIGHT
The weight of either prepare or apply stages' progress in the total progress calculation. Has value 2.- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official eLadq;e:Iintermediary field_29785Lnet/minecraft/class_4014;field_29785:Inamed SECOND_PREPARE_APPLY_WEIGHTLnet/minecraft/resource/SimpleResourceReload;SECOND_PREPARE_APPLY_WEIGHT:I
-
RELOADER_WEIGHT
private static final int RELOADER_WEIGHT
The weight of reloaders' progress in the total progress calculation. Has value 1.- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official fLadq;f:Iintermediary field_29786Lnet/minecraft/class_4014;field_29786:Inamed RELOADER_WEIGHTLnet/minecraft/resource/SimpleResourceReload;RELOADER_WEIGHT:I
-
manager
protected final ResourceManager manager
- Mappings:
Namespace Name Mixin selector official aLadq;a:Ladl;intermediary field_17927Lnet/minecraft/class_4014;field_17927:Lnet/minecraft/class_3300;named managerLnet/minecraft/resource/SimpleResourceReload;manager:Lnet/minecraft/resource/ResourceManager;
-
prepareStageFuture
protected final CompletableFuture<Unit> prepareStageFuture
- Mappings:
Namespace Name Mixin selector official bLadq;b:Ljava/util/concurrent/CompletableFuture;intermediary field_18042Lnet/minecraft/class_4014;field_18042:Ljava/util/concurrent/CompletableFuture;named prepareStageFutureLnet/minecraft/resource/SimpleResourceReload;prepareStageFuture:Ljava/util/concurrent/CompletableFuture;
-
applyStageFuture
protected final CompletableFuture<List<S>> applyStageFuture
- Mappings:
Namespace Name Mixin selector official cLadq;c:Ljava/util/concurrent/CompletableFuture;intermediary field_18043Lnet/minecraft/class_4014;field_18043:Ljava/util/concurrent/CompletableFuture;named applyStageFutureLnet/minecraft/resource/SimpleResourceReload;applyStageFuture:Ljava/util/concurrent/CompletableFuture;
-
waitingReloaders
private final Set<ResourceReloader> waitingReloaders
- Mappings:
Namespace Name Mixin selector official gLadq;g:Ljava/util/Set;intermediary field_18044Lnet/minecraft/class_4014;field_18044:Ljava/util/Set;named waitingReloadersLnet/minecraft/resource/SimpleResourceReload;waitingReloaders:Ljava/util/Set;
-
reloaderCount
private final int reloaderCount
- Mappings:
Namespace Name Mixin selector official hLadq;h:Iintermediary field_18045Lnet/minecraft/class_4014;field_18045:Inamed reloaderCountLnet/minecraft/resource/SimpleResourceReload;reloaderCount:I
-
toApplyCount
private int toApplyCount
- Mappings:
Namespace Name Mixin selector official iLadq;i:Iintermediary field_18046Lnet/minecraft/class_4014;field_18046:Inamed toApplyCountLnet/minecraft/resource/SimpleResourceReload;toApplyCount:I
-
appliedCount
private int appliedCount
- Mappings:
Namespace Name Mixin selector official jLadq;j:Iintermediary field_18047Lnet/minecraft/class_4014;field_18047:Inamed appliedCountLnet/minecraft/resource/SimpleResourceReload;appliedCount:I
-
toPrepareCount
private final AtomicInteger toPrepareCount
- Mappings:
Namespace Name Mixin selector official kLadq;k:Ljava/util/concurrent/atomic/AtomicInteger;intermediary field_18048Lnet/minecraft/class_4014;field_18048:Ljava/util/concurrent/atomic/AtomicInteger;named toPrepareCountLnet/minecraft/resource/SimpleResourceReload;toPrepareCount:Ljava/util/concurrent/atomic/AtomicInteger;
-
preparedCount
private final AtomicInteger preparedCount
- Mappings:
Namespace Name Mixin selector official lLadq;l:Ljava/util/concurrent/atomic/AtomicInteger;intermediary field_18049Lnet/minecraft/class_4014;field_18049:Ljava/util/concurrent/atomic/AtomicInteger;named preparedCountLnet/minecraft/resource/SimpleResourceReload;preparedCount:Ljava/util/concurrent/atomic/AtomicInteger;
-
-
构造器详细资料
-
SimpleResourceReload
protected SimpleResourceReload(Executor prepareExecutor, Executor applyExecutor, ResourceManager manager, List<ResourceReloader> reloaders, SimpleResourceReload.Factory<S> factory, CompletableFuture<Unit> initialStage)
- Mappings:
Namespace Name Mixin selector official <init>Ladq;<init>(Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;Ladl;Ljava/util/List;Ladq$a;Ljava/util/concurrent/CompletableFuture;)Vintermediary <init>Lnet/minecraft/class_4014;<init>(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;)Vnamed <init>Lnet/minecraft/resource/SimpleResourceReload;<init>(Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;Lnet/minecraft/resource/ResourceManager;Ljava/util/List;Lnet/minecraft/resource/SimpleResourceReload$Factory;Ljava/util/concurrent/CompletableFuture;)V
-
-
方法详细资料
-
create
public static SimpleResourceReload<Void> create(ResourceManager manager, List<ResourceReloader> reloaders, Executor prepareExecutor, Executor applyExecutor, CompletableFuture<Unit> initialStage)
Creates a simple resource reload without additional results.- Mappings:
Namespace Name Mixin selector official aLadq;a(Ladl;Ljava/util/List;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;Ljava/util/concurrent/CompletableFuture;)Ladq;intermediary method_18369Lnet/minecraft/class_4014;method_18369(Lnet/minecraft/class_3300;Ljava/util/List;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;Ljava/util/concurrent/CompletableFuture;)Lnet/minecraft/class_4014;named createLnet/minecraft/resource/SimpleResourceReload;create(Lnet/minecraft/resource/ResourceManager;Ljava/util/List;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;Ljava/util/concurrent/CompletableFuture;)Lnet/minecraft/resource/SimpleResourceReload;
-
whenComplete
public CompletableFuture<Unit> whenComplete()
Returns a future for the reload. The returned future is completed when the reload completes.- 指定者:
whenComplete在接口中ResourceReload- Mappings:
Namespace Name Mixin selector official aLadi;a()Ljava/util/concurrent/CompletableFuture;intermediary method_18364Lnet/minecraft/class_4011;method_18364()Ljava/util/concurrent/CompletableFuture;named whenCompleteLnet/minecraft/resource/ResourceReload;whenComplete()Ljava/util/concurrent/CompletableFuture;
-
getProgress
public float getProgress()
Returns a fraction between 0 and 1 indicating the progress of this reload.- 指定者:
getProgress在接口中ResourceReload- Mappings:
Namespace Name Mixin selector official bLadi;b()Fintermediary method_18229Lnet/minecraft/class_4011;method_18229()Fnamed getProgressLnet/minecraft/resource/ResourceReload;getProgress()F
-
isComplete
public boolean isComplete()
Returns if this reload has completed, either normally or abnormally.- 指定者:
isComplete在接口中ResourceReload- Mappings:
Namespace Name Mixin selector official cLadi;c()Zintermediary method_18787Lnet/minecraft/class_4011;method_18787()Znamed isCompleteLnet/minecraft/resource/ResourceReload;isComplete()Z
-
throwException
public void throwException()
Throws an unchecked exception from this reload, if there is any. Does nothing if the reload has not completed or terminated.- 指定者:
throwException在接口中ResourceReload- Mappings:
Namespace Name Mixin selector official dLadi;d()Vintermediary method_18849Lnet/minecraft/class_4011;method_18849()Vnamed throwExceptionLnet/minecraft/resource/ResourceReload;throwException()V
-
-