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 iek
  • 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 Liek;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 Liek;a:Lbaj$c;
    • entriesByTextureId

      private final Map<Identifier,AtlasManager.Entry> entriesByTextureId
      Mappings:
      Namespace Name Mixin selector
      named entriesByTextureId Lnet/minecraft/client/texture/AtlasManager;entriesByTextureId:Ljava/util/Map;
      intermediary field_61939 Lnet/minecraft/class_11697;field_61939:Ljava/util/Map;
      official c Liek;c:Ljava/util/Map;
    • entriesByDefinitionId

      private final Map<Identifier,AtlasManager.Entry> entriesByDefinitionId
      Mappings:
      Namespace Name Mixin selector
      named entriesByDefinitionId Lnet/minecraft/client/texture/AtlasManager;entriesByDefinitionId:Ljava/util/Map;
      intermediary field_61940 Lnet/minecraft/class_11697;field_61940:Ljava/util/Map;
      official d Liek;d: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 e Liek;e: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 f Liek;f: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> Liek;<init>(Licq;I)V
  • Method Details

    • 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 Liek;a(Lamj;)Licn;
    • acceptAtlasTextures

      public void acceptAtlasTextures(BiConsumer<Identifier,SpriteAtlasTexture> consumer)
      Mappings:
      Namespace Name Mixin selector
      named acceptAtlasTextures Lnet/minecraft/client/texture/AtlasManager;acceptAtlasTextures(Ljava/util/function/BiConsumer;)V
      intermediary method_73156 Lnet/minecraft/class_11697;method_73156(Ljava/util/function/BiConsumer;)V
      official a Liek;a(Ljava/util/function/BiConsumer;)V
    • 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 Liek;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 Lies;a(Lier;)Lico;
    • prepareSharedState

      public void prepareSharedState(ResourceReloader.Store store)
      Inserts state that should be shared between reloaders into the provided data store.
      Specified by:
      prepareSharedState in interface ResourceReloader
      Mappings:
      Namespace Name Mixin selector
      named prepareSharedState Lnet/minecraft/resource/ResourceReloader;prepareSharedState(Lnet/minecraft/resource/ResourceReloader$Store;)V
      intermediary prepareSharedState Lnet/minecraft/class_3302;prepareSharedState(Lnet/minecraft/class_3302$class_11558;)V
      official prepareSharedState Lbaj;prepareSharedState(Lbaj$b;)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 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$Store;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 Lbaj;reload(Lbaj$b;Ljava/util/concurrent/Executor;Lbaj$a;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;