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
,MobEffectTextureManager
,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
<MetadataSectionSerializer<?>> protected final TextureAtlas
-
Constructor Summary
ConstructorsConstructorDescriptionTextureAtlasHolder
(TextureManager textureManager, ResourceLocation textureAtlasLocation, ResourceLocation atlasInfoLocation) TextureAtlasHolder
(TextureManager textureManager, ResourceLocation textureAtlasLocation, ResourceLocation atlasInfoLocation, Set<MetadataSectionSerializer<?>> metadataSections) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
apply
(SpriteLoader.Preparations preparations, ProfilerFiller profiler) void
close()
protected TextureAtlasSprite
getSprite
(ResourceLocation location) Gets a sprite associated with the passed resource location.final CompletableFuture
<Void> reload
(PreparableReloadListener.PreparationBarrier preparationBarrier, ResourceManager resourceManager, ProfilerFiller preparationsProfiler, ProfilerFiller reloadProfiler, Executor backgroundExecutor, Executor gameExecutor) 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 textureManager, ResourceLocation textureAtlasLocation, ResourceLocation atlasInfoLocation) -
TextureAtlasHolder
public TextureAtlasHolder(TextureManager textureManager, ResourceLocation textureAtlasLocation, ResourceLocation atlasInfoLocation, Set<MetadataSectionSerializer<?>> metadataSections)
-
-
Method Details
-
getSprite
Gets a sprite associated with the passed resource location. -
reload
public final CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier preparationBarrier, ResourceManager resourceManager, ProfilerFiller preparationsProfiler, ProfilerFiller reloadProfiler, Executor backgroundExecutor, Executor gameExecutor) - Specified by:
reload
in interfacePreparableReloadListener
-
apply
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-