Package net.minecraft.client.texture
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 hbl
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.resource.ResourceReloader
ResourceReloader.Synchronizer
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final Logger
static final Identifier
private final ResourceManager
private final Map
<Identifier, AbstractTexture> private final Set
<TextureTickListener> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
private void
closeTexture
(Identifier id, AbstractTexture texture) void
void
dumpDynamicTextures
(Path path) private void
getOrDefault
(Identifier id, AbstractTexture fallback) getTexture
(Identifier id) private AbstractTexture
loadTexture
(Identifier id, AbstractTexture texture) loadTextureAsync
(Identifier id, Executor executor) registerDynamicTexture
(String prefix, NativeImageBackedTexture texture) void
registerTexture
(Identifier id, AbstractTexture texture) reload
(ResourceReloader.Synchronizer synchronizer, ResourceManager manager, Executor prepareExecutor, Executor applyExecutor) Performs a reload.private static void
runOnRenderThread
(Runnable runnable) void
tick()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.resource.ResourceReloader
getName
-
Field Details
-
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
Lhbl;b:Lorg/slf4j/Logger;
-
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
Lhbl;a:Lalz;
-
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
Lhbl;c:Ljava/util/Map;
-
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
Lhbl;d:Ljava/util/Set;
-
dynamicIdCounters
- Mappings:
Namespace Name Mixin selector named dynamicIdCounters
Lnet/minecraft/client/texture/TextureManager;dynamicIdCounters:Ljava/util/Map;
intermediary field_5283
Lnet/minecraft/class_1060;field_5283:Ljava/util/Map;
official e
Lhbl;e:Ljava/util/Map;
-
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 f
Lhbl;f:Lavv;
-
-
Constructor Details
-
TextureManager
- 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>
Lhbl;<init>(Lavv;)V
-
-
Method Details
-
registerTexture
- 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
Lhbl;a(Lalz;Lhav;)V
-
closeTexture
- 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 c
Lhbl;c(Lalz;Lhav;)V
-
loadTexture
- Mappings:
Namespace Name Mixin selector named loadTexture
Lnet/minecraft/client/texture/TextureManager;loadTexture(Lnet/minecraft/util/Identifier;Lnet/minecraft/client/texture/AbstractTexture;)Lnet/minecraft/client/texture/AbstractTexture;
intermediary method_24303
Lnet/minecraft/class_1060;method_24303(Lnet/minecraft/class_2960;Lnet/minecraft/class_1044;)Lnet/minecraft/class_1044;
official d
Lhbl;d(Lalz;Lhav;)Lhav;
-
getTexture
- 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 a
Lhbl;a(Lalz;)Lhav;
-
getOrDefault
- Mappings:
Namespace Name Mixin selector named getOrDefault
Lnet/minecraft/client/texture/TextureManager;getOrDefault(Lnet/minecraft/util/Identifier;Lnet/minecraft/client/texture/AbstractTexture;)Lnet/minecraft/client/texture/AbstractTexture;
intermediary method_34590
Lnet/minecraft/class_1060;method_34590(Lnet/minecraft/class_2960;Lnet/minecraft/class_1044;)Lnet/minecraft/class_1044;
official b
Lhbl;b(Lalz;Lhav;)Lhav;
-
registerDynamicTexture
- Mappings:
Namespace Name Mixin selector named registerDynamicTexture
Lnet/minecraft/client/texture/TextureManager;registerDynamicTexture(Ljava/lang/String;Lnet/minecraft/client/texture/NativeImageBackedTexture;)Lnet/minecraft/util/Identifier;
intermediary method_4617
Lnet/minecraft/class_1060;method_4617(Ljava/lang/String;Lnet/minecraft/class_1043;)Lnet/minecraft/class_2960;
official a
Lhbl;a(Ljava/lang/String;Lhax;)Lalz;
-
loadTextureAsync
- Mappings:
Namespace Name Mixin selector named loadTextureAsync
Lnet/minecraft/client/texture/TextureManager;loadTextureAsync(Lnet/minecraft/util/Identifier;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
intermediary method_18168
Lnet/minecraft/class_1060;method_18168(Lnet/minecraft/class_2960;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
official a
Lhbl;a(Lalz;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
-
runOnRenderThread
- Mappings:
Namespace Name Mixin selector named runOnRenderThread
Lnet/minecraft/client/texture/TextureManager;runOnRenderThread(Ljava/lang/Runnable;)V
intermediary method_22812
Lnet/minecraft/class_1060;method_22812(Ljava/lang/Runnable;)V
official a
Lhbl;a(Ljava/lang/Runnable;)V
-
tick
public void tick()- Specified by:
tick
in interfaceTextureTickListener
- 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 f
Lhbm;f()V
-
destroyTexture
- 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 b
Lhbl;b(Lalz;)V
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
reload
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 ofthenAcceptAsync
.- Specified by:
reload
in interfaceResourceReloader
- Parameters:
synchronizer
- the synchronizermanager
- 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
Lavp;a(Lavp$a;Lavv;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
-
dumpDynamicTextures
- 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
Lhbl;a(Ljava/nio/file/Path;)V
-
dumpDynamicTexturesInternal
- 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
Lhbl;b(Ljava/nio/file/Path;)V
-