Package net.minecraft.client.particle
Class ParticleSpriteManager
java.lang.Object
net.minecraft.client.particle.ParticleSpriteManager
- All Implemented Interfaces:
ResourceReloader
- Mappings:
Namespace Name named net/minecraft/client/particle/ParticleSpriteManagerintermediary net/minecraft/class_11939official hde
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static interfaceNested classes/interfaces inherited from interface net.minecraft.resource.ResourceReloader
ResourceReloader.Key<T>, ResourceReloader.Store, ResourceReloader.Synchronizer -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Loggerprivate static final ResourceFinderprivate final Int2ObjectMap<ParticleFactory<?>> private final Map<Identifier, ParticleSpriteManager.SimpleSpriteProvider> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidinit()private Optional<List<Identifier>> load(Identifier id, Resource resource) private <T extends ParticleEffect>
voidregister(ParticleType<T> type, ParticleFactory<T> factory) private <T extends ParticleEffect>
voidregister(ParticleType<T> type, ParticleSpriteManager.SpriteAwareFactory<T> factory) reload(ResourceReloader.Store store, Executor prepareExecutor, ResourceReloader.Synchronizer reloadSynchronizer, Executor applyExecutor) Performs a reload.voidsetOnPreparedTask(Runnable onPreparedTask) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.resource.ResourceReloader
getName, prepareSharedState
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector named LOGGERLnet/minecraft/client/particle/ParticleSpriteManager;LOGGER:Lorg/slf4j/Logger;intermediary field_62625Lnet/minecraft/class_11939;field_62625:Lorg/slf4j/Logger;official aLhde;a:Lorg/slf4j/Logger;
-
PARTICLE_RESOURCE_FINDER
- Mappings:
Namespace Name Mixin selector named PARTICLE_RESOURCE_FINDERLnet/minecraft/client/particle/ParticleSpriteManager;PARTICLE_RESOURCE_FINDER:Lnet/minecraft/resource/ResourceFinder;intermediary field_62626Lnet/minecraft/class_11939;field_62626:Lnet/minecraft/class_7654;official bLhde;b:Lamc;
-
spriteAwareParticleFactories
private final Map<Identifier,ParticleSpriteManager.SimpleSpriteProvider> spriteAwareParticleFactories- Mappings:
Namespace Name Mixin selector named spriteAwareParticleFactoriesLnet/minecraft/client/particle/ParticleSpriteManager;spriteAwareParticleFactories:Ljava/util/Map;intermediary field_62627Lnet/minecraft/class_11939;field_62627:Ljava/util/Map;official cLhde;c:Ljava/util/Map;
-
particleFactories
- Mappings:
Namespace Name Mixin selector named particleFactoriesLnet/minecraft/client/particle/ParticleSpriteManager;particleFactories:Lit/unimi/dsi/fastutil/ints/Int2ObjectMap;intermediary field_62628Lnet/minecraft/class_11939;field_62628:Lit/unimi/dsi/fastutil/ints/Int2ObjectMap;official dLhde;d:Lit/unimi/dsi/fastutil/ints/Int2ObjectMap;
-
onPreparedTask
- Mappings:
Namespace Name Mixin selector named onPreparedTaskLnet/minecraft/client/particle/ParticleSpriteManager;onPreparedTask:Ljava/lang/Runnable;intermediary field_62629Lnet/minecraft/class_11939;field_62629:Ljava/lang/Runnable;official eLhde;e:Ljava/lang/Runnable;
-
-
Constructor Details
-
ParticleSpriteManager
public ParticleSpriteManager()
-
-
Method Details
-
setOnPreparedTask
- Mappings:
Namespace Name Mixin selector named setOnPreparedTaskLnet/minecraft/client/particle/ParticleSpriteManager;setOnPreparedTask(Ljava/lang/Runnable;)Vintermediary method_74296Lnet/minecraft/class_11939;method_74296(Ljava/lang/Runnable;)Vofficial aLhde;a(Ljava/lang/Runnable;)V
-
init
private void init()- Mappings:
Namespace Name Mixin selector named initLnet/minecraft/client/particle/ParticleSpriteManager;init()Vintermediary method_74302Lnet/minecraft/class_11939;method_74302()Vofficial bLhde;b()V
-
register
- Mappings:
Namespace Name Mixin selector named registerLnet/minecraft/client/particle/ParticleSpriteManager;register(Lnet/minecraft/particle/ParticleType;Lnet/minecraft/client/particle/ParticleFactory;)Vintermediary method_74300Lnet/minecraft/class_11939;method_74300(Lnet/minecraft/class_2396;Lnet/minecraft/class_707;)Vofficial aLhde;a(Lmd;Lhdc;)V
-
register
private <T extends ParticleEffect> void register(ParticleType<T> type, ParticleSpriteManager.SpriteAwareFactory<T> factory) - Mappings:
Namespace Name Mixin selector named registerLnet/minecraft/client/particle/ParticleSpriteManager;register(Lnet/minecraft/particle/ParticleType;Lnet/minecraft/client/particle/ParticleSpriteManager$SpriteAwareFactory;)Vintermediary method_74301Lnet/minecraft/class_11939;method_74301(Lnet/minecraft/class_2396;Lnet/minecraft/class_11939$class_4091;)Vofficial aLhde;a(Lmd;Lhde$c;)V
-
reload
public CompletableFuture<Void> reload(ResourceReloader.Store store, Executor prepareExecutor, ResourceReloader.Synchronizer reloadSynchronizer, Executor applyExecutor) Performs a reload. Returns a future that is completed when the reload is completed.In a reload, there is a prepare stage and an apply stage. For the prepare stage, you should create completable futures with CompletableFuture.supplyAsync(..., prepareExecutor) to ensure the prepare actions are done with the prepare executor. Then, you should have a completable future for all the prepared actions, and call combinedPrepare.thenCompose(synchronizer::waitFor) to notify the
synchronizer. Finally, you should run CompletableFuture.thenAcceptAsync(..., applyExecutor) for apply actions. In the end, returns the result ofthenAcceptAsync.- Specified by:
reloadin interfaceResourceReloader- Returns:
- a future for the reload
- See Also:
- Mappings:
Namespace Name Mixin selector named reloadLnet/minecraft/resource/ResourceReloader;reload(Lnet/minecraft/resource/ResourceReloader$Store;Ljava/util/concurrent/Executor;Lnet/minecraft/resource/ResourceReloader$Synchronizer;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;intermediary method_25931Lnet/minecraft/class_3302;method_25931(Lnet/minecraft/class_3302$class_11558;Ljava/util/concurrent/Executor;Lnet/minecraft/class_3302$class_4045;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;official reloadLbaj;reload(Lbaj$b;Ljava/util/concurrent/Executor;Lbaj$a;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
-
load
- Mappings:
Namespace Name Mixin selector named loadLnet/minecraft/client/particle/ParticleSpriteManager;load(Lnet/minecraft/util/Identifier;Lnet/minecraft/resource/Resource;)Ljava/util/Optional;intermediary method_74293Lnet/minecraft/class_11939;method_74293(Lnet/minecraft/class_2960;Lnet/minecraft/class_3298;)Ljava/util/Optional;official aLhde;a(Lamj;Lban;)Ljava/util/Optional;
-
getParticleFactories
- Mappings:
Namespace Name Mixin selector named getParticleFactoriesLnet/minecraft/client/particle/ParticleSpriteManager;getParticleFactories()Lit/unimi/dsi/fastutil/ints/Int2ObjectMap;intermediary method_74292Lnet/minecraft/class_11939;method_74292()Lit/unimi/dsi/fastutil/ints/Int2ObjectMap;official aLhde;a()Lit/unimi/dsi/fastutil/ints/Int2ObjectMap;
-