Package net.minecraft.client.texture
Class SpriteAtlasHolder
java.lang.Object
net.minecraft.resource.SinglePreparationResourceReloadListener<SpriteAtlasTexture.Data>
net.minecraft.client.texture.SpriteAtlasHolder
- All Implemented Interfaces:
AutoCloseable
,ResourceReloadListener
- Direct Known Subclasses:
PaintingManager
,StatusEffectSpriteManager
@Environment(CLIENT) public abstract class SpriteAtlasHolder extends SinglePreparationResourceReloadListener<SpriteAtlasTexture.Data> implements AutoCloseable
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.resource.ResourceReloadListener
ResourceReloadListener.Synchronizer
-
Field Summary
Fields Modifier and Type Field Description private SpriteAtlasTexture
atlas
private String
pathPrefix
-
Constructor Summary
Constructors Constructor Description SpriteAtlasHolder(TextureManager textureManager, Identifier atlasId, String pathPrefix)
-
Method Summary
Modifier and Type Method Description protected void
apply(SpriteAtlasTexture.Data data, ResourceManager resourceManager, Profiler profiler)
void
close()
protected Sprite
getSprite(Identifier objectId)
protected abstract Stream<Identifier>
getSprites()
protected SpriteAtlasTexture.Data
prepare(ResourceManager resourceManager, Profiler profiler)
private Identifier
toSpriteId(Identifier objectId)
Methods inherited from class net.minecraft.resource.SinglePreparationResourceReloadListener
reload
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.resource.ResourceReloadListener
getName
-
Field Details
-
atlas
-
pathPrefix
-
-
Constructor Details
-
SpriteAtlasHolder
-
-
Method Details
-
getSprites
-
getSprite
-
toSpriteId
-
prepare
- Specified by:
prepare
in classSinglePreparationResourceReloadListener<SpriteAtlasTexture.Data>
-
apply
protected void apply(SpriteAtlasTexture.Data data, ResourceManager resourceManager, Profiler profiler)- Specified by:
apply
in classSinglePreparationResourceReloadListener<SpriteAtlasTexture.Data>
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-