Class AtlasManager

java.lang.Object
net.minecraft.client.texture.AtlasManager
All Implemented Interfaces:
AutoCloseable, SpriteHolder, ResourceReloader

@Environment(CLIENT) public class AtlasManager extends Object implements ResourceReloader, SpriteHolder, AutoCloseable
Mappings:
Namespace Name
named net/minecraft/client/texture/AtlasManager
intermediary net/minecraft/class_11697
official hxb
  • Field Details

    • ATLAS_METADATA

      private static final List<AtlasManager.Metadata> ATLAS_METADATA
      Mappings:
      Namespace Name Mixin selector
      named ATLAS_METADATA Lnet/minecraft/client/texture/AtlasManager;ATLAS_METADATA:Ljava/util/List;
      intermediary field_61862 Lnet/minecraft/class_11697;field_61862:Ljava/util/List;
      official b Lhxb;b:Ljava/util/List;
    • stitchKey

      public static final ResourceReloader.Key<AtlasManager.Stitch> stitchKey
      Mappings:
      Namespace Name Mixin selector
      named stitchKey Lnet/minecraft/client/texture/AtlasManager;stitchKey:Lnet/minecraft/resource/ResourceReloader$Key;
      intermediary field_61861 Lnet/minecraft/class_11697;field_61861:Lnet/minecraft/class_3302$class_11559;
      official a Lhxb;a:Laxn$c;
    • entries

      private final Map<Identifier,AtlasManager.Entry> entries
      Mappings:
      Namespace Name Mixin selector
      named entries Lnet/minecraft/client/texture/AtlasManager;entries:Ljava/util/Map;
      intermediary field_61863 Lnet/minecraft/class_11697;field_61863:Ljava/util/Map;
      official c Lhxb;c:Ljava/util/Map;
    • sprites

      private Map<SpriteIdentifier,Sprite> sprites
      Mappings:
      Namespace Name Mixin selector
      named sprites Lnet/minecraft/client/texture/AtlasManager;sprites:Ljava/util/Map;
      intermediary field_61864 Lnet/minecraft/class_11697;field_61864:Ljava/util/Map;
      official d Lhxb;d:Ljava/util/Map;
    • mipmapLevels

      private int mipmapLevels
      Mappings:
      Namespace Name Mixin selector
      named mipmapLevels Lnet/minecraft/client/texture/AtlasManager;mipmapLevels:I
      intermediary field_61865 Lnet/minecraft/class_11697;field_61865:I
      official e Lhxb;e:I
  • Constructor Details

    • AtlasManager

      public AtlasManager(TextureManager textureManager, int mipmapLevels)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/client/texture/AtlasManager;<init>(Lnet/minecraft/client/texture/TextureManager;I)V
      intermediary <init> Lnet/minecraft/class_11697;<init>(Lnet/minecraft/class_1060;I)V
      official <init> Lhxb;<init>(Lhvf;I)V
  • Method Details

    • getEntry

      private AtlasManager.Entry getEntry(Identifier id)
      Mappings:
      Namespace Name Mixin selector
      named getEntry Lnet/minecraft/client/texture/AtlasManager;getEntry(Lnet/minecraft/util/Identifier;)Lnet/minecraft/client/texture/AtlasManager$Entry;
      intermediary method_73033 Lnet/minecraft/class_11697;method_73033(Lnet/minecraft/class_2960;)Lnet/minecraft/class_11697$class_7772;
      official b Lhxb;b(Lamh;)Lhxb$b;
    • getAtlasTexture

      public SpriteAtlasTexture getAtlasTexture(Identifier id)
      Mappings:
      Namespace Name Mixin selector
      named getAtlasTexture Lnet/minecraft/client/texture/AtlasManager;getAtlasTexture(Lnet/minecraft/util/Identifier;)Lnet/minecraft/client/texture/SpriteAtlasTexture;
      intermediary method_73025 Lnet/minecraft/class_11697;method_73025(Lnet/minecraft/class_2960;)Lnet/minecraft/class_1059;
      official a Lhxb;a(Lamh;)Lhvc;
    • setMipmapLevels

      public void setMipmapLevels(int mipmapLevels)
      Mappings:
      Namespace Name Mixin selector
      named setMipmapLevels Lnet/minecraft/client/texture/AtlasManager;setMipmapLevels(I)V
      intermediary method_73024 Lnet/minecraft/class_11697;method_73024(I)V
      official a Lhxb;a(I)V
    • close

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

      public Sprite getSprite(SpriteIdentifier id)
      Specified by:
      getSprite in interface SpriteHolder
      Mappings:
      Namespace Name Mixin selector
      named getSprite Lnet/minecraft/client/texture/SpriteHolder;getSprite(Lnet/minecraft/client/util/SpriteIdentifier;)Lnet/minecraft/client/texture/Sprite;
      intermediary method_73030 Lnet/minecraft/class_11701;method_73030(Lnet/minecraft/class_4730;)Lnet/minecraft/class_1058;
      official a Lhxj;a(Lhxi;)Lhvd;
    • prepareSharedState

      public void prepareSharedState(ResourceReloader.class_11558 class_11558)
      Specified by:
      prepareSharedState in interface ResourceReloader
    • reload

      public CompletableFuture<Void> reload(ResourceReloader.class_11558 class_11558, Executor executor, ResourceReloader.Synchronizer synchronizer, 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
      Returns:
      a future for the reload
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named reload Lnet/minecraft/resource/ResourceReloader;reload(Lnet/minecraft/resource/ResourceReloader$class_11558;Ljava/util/concurrent/Executor;Lnet/minecraft/resource/ResourceReloader$Synchronizer;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
      intermediary method_25931 Lnet/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 reload Laxn;reload(Laxn$b;Ljava/util/concurrent/Executor;Laxn$a;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;