Package net.minecraft.client.resources
Class TextureAtlasHolder
java.lang.Object
net.minecraft.client.resources.TextureAtlasHolder
- All Implemented Interfaces:
AutoCloseable
,PreparableReloadListener
- Direct Known Subclasses:
GuiSpriteManager
,MapDecorationTextureManager
,PaintingTextureManager
public abstract class TextureAtlasHolder
extends Object
implements PreparableReloadListener, AutoCloseable
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
PreparableReloadListener.PreparationBarrier
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ResourceLocation
private final Set
<MetadataSectionType<?>> protected final TextureAtlas
-
Constructor Summary
ConstructorsConstructorDescriptionTextureAtlasHolder
(TextureManager pTextureManager, ResourceLocation pTextureAtlasLocation, ResourceLocation pAtlasInfoLocation) TextureAtlasHolder
(TextureManager pTextureManager, ResourceLocation pTextureAtlasLocation, ResourceLocation pAtlasInfoLocation, Set<MetadataSectionType<?>> pMetadataSections) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
apply
(SpriteLoader.Preparations p_252333_) void
close()
protected TextureAtlasSprite
getSprite
(ResourceLocation pLocation) Gets a sprite associated with the passed resource location.final CompletableFuture
<Void> reload
(PreparableReloadListener.PreparationBarrier pBarrier, ResourceManager pManager, Executor pBackgroundExecutor, Executor pGameExecutor) 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
-
textureAtlas
-
atlasInfoLocation
-
metadataSections
-
-
Constructor Details
-
TextureAtlasHolder
public TextureAtlasHolder(TextureManager pTextureManager, ResourceLocation pTextureAtlasLocation, ResourceLocation pAtlasInfoLocation) -
TextureAtlasHolder
public TextureAtlasHolder(TextureManager pTextureManager, ResourceLocation pTextureAtlasLocation, ResourceLocation pAtlasInfoLocation, Set<MetadataSectionType<?>> pMetadataSections)
-
-
Method Details
-
getSprite
Gets a sprite associated with the passed resource location. -
reload
public final CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier pBarrier, ResourceManager pManager, Executor pBackgroundExecutor, Executor pGameExecutor) - Specified by:
reload
in interfacePreparableReloadListener
-
apply
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-