Package net.minecraft.client.texture
Class SpriteAtlasHolder
java.lang.Object
net.minecraft.resource.SinglePreparationResourceReloader<SpriteAtlasTexture.Data>
net.minecraft.client.texture.SpriteAtlasHolder
- All Implemented Interfaces:
AutoCloseable,ResourceReloader
- Direct Known Subclasses:
PaintingManager,StatusEffectSpriteManager
@Environment(CLIENT) public abstract class SpriteAtlasHolder extends SinglePreparationResourceReloader<SpriteAtlasTexture.Data> implements AutoCloseable
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.resource.ResourceReloader
ResourceReloader.Synchronizer -
Field Summary
Fields Modifier and Type Field Description private SpriteAtlasTextureatlasprivate StringpathPrefix -
Constructor Summary
Constructors Constructor Description SpriteAtlasHolder(TextureManager textureManager, Identifier atlasId, String pathPrefix) -
Method Summary
Modifier and Type Method Description protected voidapply(SpriteAtlasTexture.Data data, ResourceManager resourceManager, Profiler profiler)Handles the prepared intermediate object.voidclose()protected SpritegetSprite(Identifier objectId)protected abstract Stream<Identifier>getSprites()protected SpriteAtlasTexture.Dataprepare(ResourceManager resourceManager, Profiler profiler)Prepares the intermediate object.private IdentifiertoSpriteId(Identifier objectId)Methods inherited from class net.minecraft.resource.SinglePreparationResourceReloader
reloadMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.resource.ResourceReloader
getName
-
Field Details
-
atlas
-
pathPrefix
-
-
Constructor Details
-
SpriteAtlasHolder
-
-
Method Details
-
getSprites
-
getSprite
-
toSpriteId
-
prepare
Description copied from class:SinglePreparationResourceReloaderPrepares the intermediate object.This method is called in the prepare executor in a reload.
- Specified by:
preparein classSinglePreparationResourceReloader<SpriteAtlasTexture.Data>- Parameters:
resourceManager- the resource managerprofiler- the prepare profiler- Returns:
- the prepared object
-
apply
protected void apply(SpriteAtlasTexture.Data data, ResourceManager resourceManager, Profiler profiler)Description copied from class:SinglePreparationResourceReloaderHandles the prepared intermediate object.This method is called in the apply executor, or the game engine, in a reload.
- Specified by:
applyin classSinglePreparationResourceReloader<SpriteAtlasTexture.Data>- Parameters:
data- the prepared objectresourceManager- the resource managerprofiler- the apply profiler
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-