Class SpriteAtlasHolder

java.lang.Object
net.minecraft.client.texture.SpriteAtlasHolder
All Implemented Interfaces:
AutoCloseable, ResourceReloader
Direct Known Subclasses:
GuiAtlasManager, PaintingManager, StatusEffectSpriteManager

@Environment(CLIENT) public abstract class SpriteAtlasHolder extends Object implements ResourceReloader, AutoCloseable
Mappings:
Namespace Name
official gah
intermediary net/minecraft/class_4075
named net/minecraft/client/texture/SpriteAtlasHolder
  • Field Details

    • atlas

      private final SpriteAtlasTexture atlas
      Mappings:
      Namespace Name Mixin selector
      official a Lgah;a:Lfzd;
      intermediary field_18230 Lnet/minecraft/class_4075;field_18230:Lnet/minecraft/class_1059;
      named atlas Lnet/minecraft/client/texture/SpriteAtlasHolder;atlas:Lnet/minecraft/client/texture/SpriteAtlasTexture;
    • sourcePath

      private final Identifier sourcePath
      Mappings:
      Namespace Name Mixin selector
      official b Lgah;b:Laew;
      intermediary field_41425 Lnet/minecraft/class_4075;field_41425:Lnet/minecraft/class_2960;
      named sourcePath Lnet/minecraft/client/texture/SpriteAtlasHolder;sourcePath:Lnet/minecraft/util/Identifier;
    • metadataReaders

      private final Set<ResourceMetadataReader<?>> metadataReaders
      Mappings:
      Namespace Name Mixin selector
      official c Lgah;c:Ljava/util/Set;
      intermediary field_45644 Lnet/minecraft/class_4075;field_45644:Ljava/util/Set;
      named metadataReaders Lnet/minecraft/client/texture/SpriteAtlasHolder;metadataReaders:Ljava/util/Set;
  • Constructor Details

    • SpriteAtlasHolder

      public SpriteAtlasHolder(TextureManager textureManager, Identifier atlasId, Identifier sourcePath)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lgah;<init>(Lfzf;Laew;Laew;)V
      intermediary <init> Lnet/minecraft/class_4075;<init>(Lnet/minecraft/class_1060;Lnet/minecraft/class_2960;Lnet/minecraft/class_2960;)V
      named <init> Lnet/minecraft/client/texture/SpriteAtlasHolder;<init>(Lnet/minecraft/client/texture/TextureManager;Lnet/minecraft/util/Identifier;Lnet/minecraft/util/Identifier;)V
    • SpriteAtlasHolder

      public SpriteAtlasHolder(TextureManager textureManager, Identifier atlasId, Identifier sourcePath, Set<ResourceMetadataReader<?>> metadataReaders)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lgah;<init>(Lfzf;Laew;Laew;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
      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
  • Method Details

    • getSprite

      protected Sprite getSprite(Identifier objectId)
      Mappings:
      Namespace Name Mixin selector
      official a Lgah;a(Laew;)Lfze;
      intermediary method_18667 Lnet/minecraft/class_4075;method_18667(Lnet/minecraft/class_2960;)Lnet/minecraft/class_1058;
      named getSprite Lnet/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 of thenAcceptAsync.

      Specified by:
      reload in interface ResourceReloader
      Parameters:
      synchronizer - the synchronizer
      manager - the resource manager
      prepareProfiler - the profiler for prepare stage
      applyProfiler - the profiler for apply stage
      prepareExecutor - the executor for prepare stage
      applyExecutor - the executor for apply stage
      Returns:
      a future for the reload
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Lann;a(Lann$a;Lant;Lbdp;Lbdp;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;Lnet/minecraft/class_3695;Lnet/minecraft/class_3695;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
      named reload Lnet/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

      private void afterReload(SpriteLoader.StitchResult stitchResult, Profiler profiler)
      Mappings:
      Namespace Name Mixin selector
      official a Lgah;a(Lfyz$a;Lbdp;)V
      intermediary method_18666 Lnet/minecraft/class_4075;method_18666(Lnet/minecraft/class_7766$class_7767;Lnet/minecraft/class_3695;)V
      named afterReload Lnet/minecraft/client/texture/SpriteAtlasHolder;afterReload(Lnet/minecraft/client/texture/SpriteLoader$StitchResult;Lnet/minecraft/util/profiler/Profiler;)V
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable