Class TextureManager

java.lang.Object
net.minecraft.client.texture.TextureManager
All Implemented Interfaces:
AutoCloseable, TextureTickListener, ResourceReloader

@Environment(CLIENT) public class TextureManager extends Object implements ResourceReloader, TextureTickListener, AutoCloseable
Mappings:
Namespace Name
named net/minecraft/client/texture/TextureManager
intermediary net/minecraft/class_1060
official hev
  • Field Details Link icon

    • LOGGER Link icon

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      named LOGGER Lnet/minecraft/client/texture/TextureManager;LOGGER:Lorg/slf4j/Logger;
      intermediary field_5288 Lnet/minecraft/class_1060;field_5288:Lorg/slf4j/Logger;
      official b Lhev;b:Lorg/slf4j/Logger;
    • MISSING_IDENTIFIER Link icon

      public static final Identifier MISSING_IDENTIFIER
      Mappings:
      Namespace Name Mixin selector
      named MISSING_IDENTIFIER Lnet/minecraft/client/texture/TextureManager;MISSING_IDENTIFIER:Lnet/minecraft/util/Identifier;
      intermediary field_5285 Lnet/minecraft/class_1060;field_5285:Lnet/minecraft/class_2960;
      official a Lhev;a:Lakv;
    • textures Link icon

      private final Map<Identifier,AbstractTexture> textures
      Mappings:
      Namespace Name Mixin selector
      named textures Lnet/minecraft/client/texture/TextureManager;textures:Ljava/util/Map;
      intermediary field_5286 Lnet/minecraft/class_1060;field_5286:Ljava/util/Map;
      official c Lhev;c:Ljava/util/Map;
    • tickListeners Link icon

      private final Set<TextureTickListener> tickListeners
      Mappings:
      Namespace Name Mixin selector
      named tickListeners Lnet/minecraft/client/texture/TextureManager;tickListeners:Ljava/util/Set;
      intermediary field_5284 Lnet/minecraft/class_1060;field_5284:Ljava/util/Set;
      official d Lhev;d:Ljava/util/Set;
    • resourceContainer Link icon

      private final ResourceManager resourceContainer
      Mappings:
      Namespace Name Mixin selector
      named resourceContainer Lnet/minecraft/client/texture/TextureManager;resourceContainer:Lnet/minecraft/resource/ResourceManager;
      intermediary field_5287 Lnet/minecraft/class_1060;field_5287:Lnet/minecraft/class_3300;
      official e Lhev;e:Laup;
  • Constructor Details Link icon

    • TextureManager Link icon

      public TextureManager(ResourceManager resourceManager)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/client/texture/TextureManager;<init>(Lnet/minecraft/resource/ResourceManager;)V
      intermediary <init> Lnet/minecraft/class_1060;<init>(Lnet/minecraft/class_3300;)V
      official <init> Lhev;<init>(Laup;)V
  • Method Details Link icon

    • registerTexture Link icon

      public void registerTexture(Identifier id, ReloadableTexture texture)
      Mappings:
      Namespace Name Mixin selector
      named registerTexture Lnet/minecraft/client/texture/TextureManager;registerTexture(Lnet/minecraft/util/Identifier;Lnet/minecraft/client/texture/ReloadableTexture;)V
      intermediary method_65876 Lnet/minecraft/class_1060;method_65876(Lnet/minecraft/class_2960;Lnet/minecraft/class_10537;)V
      official a Lhev;a(Lakv;Lhek;)V
    • loadTexture Link icon

      private TextureContents loadTexture(Identifier id, ReloadableTexture texture)
      Mappings:
      Namespace Name Mixin selector
      named loadTexture Lnet/minecraft/client/texture/TextureManager;loadTexture(Lnet/minecraft/util/Identifier;Lnet/minecraft/client/texture/ReloadableTexture;)Lnet/minecraft/client/texture/TextureContents;
      intermediary method_65925 Lnet/minecraft/class_1060;method_65925(Lnet/minecraft/class_2960;Lnet/minecraft/class_10537;)Lnet/minecraft/class_10539;
      official b Lhev;b(Lakv;Lhek;)Lheu;
    • registerTexture Link icon

      public void registerTexture(Identifier id)
      Mappings:
      Namespace Name Mixin selector
      named registerTexture Lnet/minecraft/client/texture/TextureManager;registerTexture(Lnet/minecraft/util/Identifier;)V
      intermediary method_65875 Lnet/minecraft/class_1060;method_65875(Lnet/minecraft/class_2960;)V
      official a Lhev;a(Lakv;)V
    • registerTexture Link icon

      public void registerTexture(Identifier id, AbstractTexture texture)
      Mappings:
      Namespace Name Mixin selector
      named registerTexture Lnet/minecraft/client/texture/TextureManager;registerTexture(Lnet/minecraft/util/Identifier;Lnet/minecraft/client/texture/AbstractTexture;)V
      intermediary method_4616 Lnet/minecraft/class_1060;method_4616(Lnet/minecraft/class_2960;Lnet/minecraft/class_1044;)V
      official a Lhev;a(Lakv;Lhee;)V
    • closeTexture Link icon

      private void closeTexture(Identifier id, AbstractTexture texture)
      Mappings:
      Namespace Name Mixin selector
      named closeTexture Lnet/minecraft/client/texture/TextureManager;closeTexture(Lnet/minecraft/util/Identifier;Lnet/minecraft/client/texture/AbstractTexture;)V
      intermediary method_30299 Lnet/minecraft/class_1060;method_30299(Lnet/minecraft/class_2960;Lnet/minecraft/class_1044;)V
      official b Lhev;b(Lakv;Lhee;)V
    • getTexture Link icon

      public AbstractTexture getTexture(Identifier id)
      Mappings:
      Namespace Name Mixin selector
      named getTexture Lnet/minecraft/client/texture/TextureManager;getTexture(Lnet/minecraft/util/Identifier;)Lnet/minecraft/client/texture/AbstractTexture;
      intermediary method_4619 Lnet/minecraft/class_1060;method_4619(Lnet/minecraft/class_2960;)Lnet/minecraft/class_1044;
      official b Lhev;b(Lakv;)Lhee;
    • tick Link icon

      public void tick()
      Specified by:
      tick in interface TextureTickListener
      Mappings:
      Namespace Name Mixin selector
      named tick Lnet/minecraft/client/texture/TextureTickListener;tick()V
      intermediary method_4622 Lnet/minecraft/class_1061;method_4622()V
      official e Lhew;e()V
    • destroyTexture Link icon

      public void destroyTexture(Identifier id)
      Mappings:
      Namespace Name Mixin selector
      named destroyTexture Lnet/minecraft/client/texture/TextureManager;destroyTexture(Lnet/minecraft/util/Identifier;)V
      intermediary method_4615 Lnet/minecraft/class_1060;method_4615(Lnet/minecraft/class_2960;)V
      official c Lhev;c(Lakv;)V
    • close Link icon

      public void close()
      Specified by:
      close in interface AutoCloseable
    • reload Link icon

      public 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 of thenAcceptAsync.

      Specified by:
      reload in 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;
    • dumpDynamicTextures Link icon

      public void dumpDynamicTextures(Path path)
      Mappings:
      Namespace Name Mixin selector
      named dumpDynamicTextures Lnet/minecraft/client/texture/TextureManager;dumpDynamicTextures(Ljava/nio/file/Path;)V
      intermediary method_49715 Lnet/minecraft/class_1060;method_49715(Ljava/nio/file/Path;)V
      official a Lhev;a(Ljava/nio/file/Path;)V
    • dumpDynamicTexturesInternal Link icon

      private void dumpDynamicTexturesInternal(Path path)
      Mappings:
      Namespace Name Mixin selector
      named dumpDynamicTexturesInternal Lnet/minecraft/client/texture/TextureManager;dumpDynamicTexturesInternal(Ljava/nio/file/Path;)V
      intermediary method_49717 Lnet/minecraft/class_1060;method_49717(Ljava/nio/file/Path;)V
      official b Lhev;b(Ljava/nio/file/Path;)V
    • loadTexture Link icon

      private static TextureContents loadTexture(ResourceManager resourceManager, Identifier textureId, ReloadableTexture texture) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      named loadTexture Lnet/minecraft/client/texture/TextureManager;loadTexture(Lnet/minecraft/resource/ResourceManager;Lnet/minecraft/util/Identifier;Lnet/minecraft/client/texture/ReloadableTexture;)Lnet/minecraft/client/texture/TextureContents;
      intermediary method_65877 Lnet/minecraft/class_1060;method_65877(Lnet/minecraft/class_3300;Lnet/minecraft/class_2960;Lnet/minecraft/class_10537;)Lnet/minecraft/class_10539;
      official a Lhev;a(Laup;Lakv;Lhek;)Lheu;
    • reloadTexture Link icon

      private static TextureManager.ReloadedTexture reloadTexture(ResourceManager resourceManager, Identifier textureId, ReloadableTexture texture, Executor prepareExecutor)
      Mappings:
      Namespace Name Mixin selector
      named reloadTexture Lnet/minecraft/client/texture/TextureManager;reloadTexture(Lnet/minecraft/resource/ResourceManager;Lnet/minecraft/util/Identifier;Lnet/minecraft/client/texture/ReloadableTexture;Ljava/util/concurrent/Executor;)Lnet/minecraft/client/texture/TextureManager$ReloadedTexture;
      intermediary method_65878 Lnet/minecraft/class_1060;method_65878(Lnet/minecraft/class_3300;Lnet/minecraft/class_2960;Lnet/minecraft/class_10537;Ljava/util/concurrent/Executor;)Lnet/minecraft/class_1060$class_10540;
      official a Lhev;a(Laup;Lakv;Lhek;Ljava/util/concurrent/Executor;)Lhev$a;