Package net.minecraft.client.texture
Class SpriteAtlasHolder
java.lang.Object
net.minecraft.client.texture.SpriteAtlasHolder
- All Implemented Interfaces:
- AutoCloseable,- ResourceReloader
- Direct Known Subclasses:
- GuiAtlasManager,- MapDecorationsAtlasManager,- PaintingManager,- StatusEffectSpriteManager
@Environment(CLIENT)
public abstract class SpriteAtlasHolder
extends Object
implements ResourceReloader, AutoCloseable
- Mappings:
- Namespace - Name - named - net/minecraft/client/texture/SpriteAtlasHolder- intermediary - net/minecraft/class_4075- official - hfy
- 
Nested Class SummaryNested classes/interfaces inherited from interface net.minecraft.resource.ResourceReloaderResourceReloader.Synchronizer
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final SpriteAtlasTextureprivate final Set<ResourceMetadataSerializer<?>> private final Identifier
- 
Constructor SummaryConstructorsConstructorDescriptionSpriteAtlasHolder(TextureManager textureManager, Identifier atlasId, Identifier sourcePath) SpriteAtlasHolder(TextureManager textureManager, Identifier atlasId, Identifier sourcePath, Set<ResourceMetadataSerializer<?>> metadataReaders) 
- 
Method SummaryModifier and TypeMethodDescriptionprivate voidafterReload(SpriteLoader.StitchResult stitchResult) voidclose()protected SpritegetSprite(Identifier objectId) final CompletableFuture<Void> reload(ResourceReloader.Synchronizer synchronizer, ResourceManager manager, Executor prepareExecutor, Executor applyExecutor) Performs a reload.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.resource.ResourceReloadergetName
- 
Field Details- 
atlas- Mappings:
- Namespace - Name - Mixin selector - named - atlas- Lnet/minecraft/client/texture/SpriteAtlasHolder;atlas:Lnet/minecraft/client/texture/SpriteAtlasTexture;- intermediary - field_18230- Lnet/minecraft/class_4075;field_18230:Lnet/minecraft/class_1059;- official - a- Lhfy;a:Lhes;
 
- 
sourcePath- Mappings:
- Namespace - Name - Mixin selector - named - sourcePath- Lnet/minecraft/client/texture/SpriteAtlasHolder;sourcePath:Lnet/minecraft/util/Identifier;- intermediary - field_41425- Lnet/minecraft/class_4075;field_41425:Lnet/minecraft/class_2960;- official - b- Lhfy;b:Lakv;
 
- 
metadataReaders- Mappings:
- Namespace - Name - Mixin selector - named - metadataReaders- Lnet/minecraft/client/texture/SpriteAtlasHolder;metadataReaders:Ljava/util/Set;- intermediary - field_45644- Lnet/minecraft/class_4075;field_45644:Ljava/util/Set;- official - c- Lhfy;c:Ljava/util/Set;
 
 
- 
- 
Constructor Details- 
SpriteAtlasHolder- Mappings:
- Namespace - Name - Mixin selector - named - <init>- Lnet/minecraft/client/texture/SpriteAtlasHolder;<init>(Lnet/minecraft/client/texture/TextureManager;Lnet/minecraft/util/Identifier;Lnet/minecraft/util/Identifier;)V- intermediary - <init>- Lnet/minecraft/class_4075;<init>(Lnet/minecraft/class_1060;Lnet/minecraft/class_2960;Lnet/minecraft/class_2960;)V- official - <init>- Lhfy;<init>(Lhev;Lakv;Lakv;)V
 
- 
SpriteAtlasHolderpublic SpriteAtlasHolder(TextureManager textureManager, Identifier atlasId, Identifier sourcePath, Set<ResourceMetadataSerializer<?>> metadataReaders) - Mappings:
- Namespace - Name - Mixin selector - named - <init>- Lnet/minecraft/client/texture/SpriteAtlasHolder;<init>(Lnet/minecraft/client/texture/TextureManager;Lnet/minecraft/util/Identifier;Lnet/minecraft/util/Identifier;Ljava/util/Set;)V- intermediary - <init>- Lnet/minecraft/class_4075;<init>(Lnet/minecraft/class_1060;Lnet/minecraft/class_2960;Lnet/minecraft/class_2960;Ljava/util/Set;)V- official - <init>- Lhfy;<init>(Lhev;Lakv;Lakv;Ljava/util/Set;)V
 
 
- 
- 
Method Details- 
getSprite- Mappings:
- Namespace - Name - Mixin selector - named - getSprite- Lnet/minecraft/client/texture/SpriteAtlasHolder;getSprite(Lnet/minecraft/util/Identifier;)Lnet/minecraft/client/texture/Sprite;- intermediary - method_18667- Lnet/minecraft/class_4075;method_18667(Lnet/minecraft/class_2960;)Lnet/minecraft/class_1058;- official - a- Lhfy;a(Lakv;)Lhet;
 
- 
reloadpublic final CompletableFuture<Void> reload(ResourceReloader.Synchronizer synchronizer, ResourceManager manager, 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 interface- ResourceReloader
- Parameters:
- synchronizer- the synchronizer
- manager- the resource manager
- Returns:
- a future for the reload
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - reload- Lnet/minecraft/resource/ResourceReloader;reload(Lnet/minecraft/resource/ResourceReloader$Synchronizer;Lnet/minecraft/resource/ResourceManager;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;- intermediary - method_25931- Lnet/minecraft/class_3302;method_25931(Lnet/minecraft/class_3302$class_4045;Lnet/minecraft/class_3300;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;- official - a- Lauj;a(Lauj$a;Laup;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
 
- 
afterReload- Mappings:
- Namespace - Name - Mixin selector - named - afterReload- Lnet/minecraft/client/texture/SpriteAtlasHolder;afterReload(Lnet/minecraft/client/texture/SpriteLoader$StitchResult;)V- intermediary - method_18666- Lnet/minecraft/class_4075;method_18666(Lnet/minecraft/class_7766$class_7767;)V- official - a- Lhfy;a(Lheo$a;)V
 
- 
closepublic void close()- Specified by:
- closein interface- AutoCloseable
 
 
-