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 ResourceLocationprivate 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 voidapply(SpriteLoader.Preparations preparations, ProfilerFiller profiler) voidclose()protected TextureAtlasSpritegetSprite(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, waitMethods 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:
reloadin interfacePreparableReloadListener
-
apply
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-