Class TextureManager
java.lang.Object
net.minecraft.client.renderer.texture.TextureManager
- All Implemented Interfaces:
AutoCloseable
,Tickable
,PreparableReloadListener
public class TextureManager
extends Object
implements PreparableReloadListener, Tickable, AutoCloseable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final record
Nested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
PreparableReloadListener.PreparationBarrier
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map
<ResourceLocation, AbstractTexture> static final ResourceLocation
private static final org.slf4j.Logger
private final ResourceManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
dumpAllSheets
(Path p_276129_) getTexture
(ResourceLocation p_118507_) private static TextureContents
loadContents
(ResourceManager p_389428_, ResourceLocation p_389405_, ReloadableTexture p_389480_) private TextureContents
loadContentsSafe
(ResourceLocation p_390395_, ReloadableTexture p_390396_) void
register
(ResourceLocation p_118496_, AbstractTexture p_118497_) void
registerAndLoad
(ResourceLocation p_389410_, ReloadableTexture p_389421_) void
registerForNextReload
(ResourceLocation p_389634_) void
release
(ResourceLocation p_118514_) reload
(PreparableReloadListener.PreparationBarrier p_118476_, ResourceManager p_118477_, Executor p_118480_, Executor p_118481_) private void
safeClose
(ResourceLocation p_118509_, AbstractTexture p_118510_) private static TextureManager.PendingReload
scheduleLoad
(ResourceManager p_389696_, ResourceLocation p_389555_, ReloadableTexture p_389691_, Executor p_389430_) 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.server.packs.resources.PreparableReloadListener
getName
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
INTENTIONAL_MISSING_TEXTURE
-
byPath
-
tickableTextures
-
resourceManager
-
-
Constructor Details
-
TextureManager
-
-
Method Details
-
registerAndLoad
-
loadContentsSafe
-
registerForNextReload
-
register
-
safeClose
-
getTexture
-
tick
public void tick() -
release
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
reload
public CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier p_118476_, ResourceManager p_118477_, Executor p_118480_, Executor p_118481_) - Specified by:
reload
in interfacePreparableReloadListener
-
dumpAllSheets
-
loadContents
private static TextureContents loadContents(ResourceManager p_389428_, ResourceLocation p_389405_, ReloadableTexture p_389480_) throws IOException - Throws:
IOException
-
scheduleLoad
private static TextureManager.PendingReload scheduleLoad(ResourceManager p_389696_, ResourceLocation p_389555_, ReloadableTexture p_389691_, Executor p_389430_)
-