Package net.minecraft.client.texture
Class SpriteAtlasHolder
java.lang.Object
net.minecraft.client.texture.SpriteAtlasHolder
- All Implemented Interfaces:
AutoCloseable,ResourceReloader
- Direct Known Subclasses:
PaintingManager,StatusEffectSpriteManager
@Environment(CLIENT)
public abstract class SpriteAtlasHolder
extends Object
implements ResourceReloader, AutoCloseable
- Mappings:
Namespace Name intermediary net/minecraft/class_4075official fvlnamed net/minecraft/client/texture/SpriteAtlasHolder
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.resource.ResourceReloader
ResourceReloader.Synchronizer -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSpriteAtlasHolder(TextureManager textureManager, Identifier atlasId, Identifier identifier) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidafterReload(SpriteLoader.StitchResult stitchResult, Profiler profiler) voidclose()protected SpritegetSprite(Identifier objectId) final CompletableFuture<Void>reload(ResourceReloader.Synchronizer synchronizer, ResourceManager manager, Profiler prepareProfiler, Profiler applyProfiler, Executor prepareExecutor, Executor applyExecutor) Performs a reload.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
-
Field Details
-
atlas
- Mappings:
Namespace Name Mixin selector intermediary field_18230Lnet/minecraft/class_4075;field_18230:Lnet/minecraft/class_1059;official aLfvl;a:Lfuj;named atlasLnet/minecraft/client/texture/SpriteAtlasHolder;atlas:Lnet/minecraft/client/texture/SpriteAtlasTexture;
-
field_41425
- Mappings:
Namespace Name Mixin selector intermediary field_41425Lnet/minecraft/class_4075;field_41425:Lnet/minecraft/class_2960;official bLfvl;b:Lacq;named field_41425Lnet/minecraft/client/texture/SpriteAtlasHolder;field_41425:Lnet/minecraft/util/Identifier;
-
-
Constructor Details
-
SpriteAtlasHolder
- Mappings:
Namespace Name Mixin selector intermediary <init>Lnet/minecraft/class_4075;<init>(Lnet/minecraft/class_1060;Lnet/minecraft/class_2960;Lnet/minecraft/class_2960;)Vofficial <init>Lfvl;<init>(Lful;Lacq;Lacq;)Vnamed <init>Lnet/minecraft/client/texture/SpriteAtlasHolder;<init>(Lnet/minecraft/client/texture/TextureManager;Lnet/minecraft/util/Identifier;Lnet/minecraft/util/Identifier;)V
-
-
Method Details
-
getSprite
- Mappings:
Namespace Name Mixin selector intermediary method_18667Lnet/minecraft/class_4075;method_18667(Lnet/minecraft/class_2960;)Lnet/minecraft/class_1058;official aLfvl;a(Lacq;)Lfuk;named getSpriteLnet/minecraft/client/texture/SpriteAtlasHolder;getSprite(Lnet/minecraft/util/Identifier;)Lnet/minecraft/client/texture/Sprite;
-
reload
public final CompletableFuture<Void> reload(ResourceReloader.Synchronizer synchronizer, ResourceManager manager, Profiler prepareProfiler, Profiler applyProfiler, Executor prepareExecutor, 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- Parameters:
synchronizer- the synchronizermanager- the resource managerprepareProfiler- the profiler for prepare stageapplyProfiler- the profiler for apply stageprepareExecutor- the executor for prepare stageapplyExecutor- the executor for apply stage- Returns:
- a future for the reload
- See Also:
- Mappings:
Namespace Name Mixin selector intermediary method_25931Lnet/minecraft/class_3302;method_25931(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;official aLakr;a(Lakr$a;Lakx;Lbam;Lbam;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;named reloadLnet/minecraft/resource/ResourceReloader;reload(Lnet/minecraft/resource/ResourceReloader$Synchronizer;Lnet/minecraft/resource/ResourceManager;Lnet/minecraft/util/profiler/Profiler;Lnet/minecraft/util/profiler/Profiler;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
-
afterReload
- Mappings:
Namespace Name Mixin selector intermediary method_18666Lnet/minecraft/class_4075;method_18666(Lnet/minecraft/class_7766$class_7767;Lnet/minecraft/class_3695;)Vofficial aLfvl;a(Lfuf$a;Lbam;)Vnamed afterReloadLnet/minecraft/client/texture/SpriteAtlasHolder;afterReload(Lnet/minecraft/client/texture/SpriteLoader$StitchResult;Lnet/minecraft/util/profiler/Profiler;)V
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-