public class TextureMap extends AbstractTexture implements ITickableTextureObject
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
basePath |
private ITextureMapPopulator |
iconCreator |
private java.util.List<TextureAtlasSprite> |
listAnimatedSprites |
private java.util.Set<ResourceLocation> |
loadedSprites |
private java.util.Deque<ResourceLocation> |
loadingSprites |
static ResourceLocation |
LOCATION_BLOCKS_TEXTURE |
static ResourceLocation |
LOCATION_MISSING_TEXTURE |
private static org.apache.logging.log4j.Logger |
LOGGER |
private java.util.Map<java.lang.String,TextureAtlasSprite> |
mapRegisteredSprites |
private java.util.Map<java.lang.String,TextureAtlasSprite> |
mapUploadedSprites |
private int |
mipmapLevels |
private TextureAtlasSprite |
missingImage |
blur, blurLast, glTextureId, mipmap, mipmapLast
Constructor and Description |
---|
TextureMap(java.lang.String basePathIn) |
TextureMap(java.lang.String basePathIn,
boolean skipFirst) |
TextureMap(java.lang.String basePathIn,
ITextureMapPopulator iconCreatorIn) |
TextureMap(java.lang.String basePathIn,
ITextureMapPopulator iconCreatorIn,
boolean skipFirst) |
Modifier and Type | Method and Description |
---|---|
private void |
finishLoading(Stitcher stitcher,
ProgressManager.ProgressBar bar,
int j,
int k) |
private boolean |
generateMipmaps(IResourceManager resourceManager,
TextureAtlasSprite texture) |
TextureAtlasSprite |
getAtlasSprite(java.lang.String iconName) |
java.lang.String |
getBasePath() |
int |
getMipmapLevels() |
TextureAtlasSprite |
getMissingSprite() |
private ResourceLocation |
getResourceLocation(TextureAtlasSprite p_184396_1_) |
TextureAtlasSprite |
getTextureExtry(java.lang.String name)
Grabs the registered entry for the specified name, returning null if there was not a entry.
|
private void |
initMissingImage() |
void |
loadSprites(IResourceManager resourceManager,
ITextureMapPopulator iconCreatorIn) |
void |
loadTexture(IResourceManager resourceManager) |
private int |
loadTexture(Stitcher stitcher,
IResourceManager resourceManager,
ResourceLocation location,
TextureAtlasSprite textureatlassprite,
ProgressManager.ProgressBar bar,
int j,
int k) |
void |
loadTextureAtlas(IResourceManager resourceManager) |
TextureAtlasSprite |
registerSprite(ResourceLocation location) |
void |
setMipmapLevels(int mipmapLevelsIn) |
boolean |
setTextureEntry(TextureAtlasSprite entry)
Adds a texture registry entry to this map for the specified name if one does not already exist.
|
void |
tick() |
void |
updateAnimations() |
deleteGlTexture, getGlTextureId, restoreLastBlurMipmap, setBlurMipmap, setBlurMipmapDirect
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getGlTextureId, restoreLastBlurMipmap, setBlurMipmap
private static final org.apache.logging.log4j.Logger LOGGER
public static final ResourceLocation LOCATION_MISSING_TEXTURE
public static final ResourceLocation LOCATION_BLOCKS_TEXTURE
private final java.util.List<TextureAtlasSprite> listAnimatedSprites
private final java.util.Map<java.lang.String,TextureAtlasSprite> mapRegisteredSprites
private final java.util.Map<java.lang.String,TextureAtlasSprite> mapUploadedSprites
private final java.lang.String basePath
private final ITextureMapPopulator iconCreator
private int mipmapLevels
private final TextureAtlasSprite missingImage
private final java.util.Deque<ResourceLocation> loadingSprites
private final java.util.Set<ResourceLocation> loadedSprites
public TextureMap(java.lang.String basePathIn)
public TextureMap(java.lang.String basePathIn, @Nullable ITextureMapPopulator iconCreatorIn)
public TextureMap(java.lang.String basePathIn, boolean skipFirst)
public TextureMap(java.lang.String basePathIn, @Nullable ITextureMapPopulator iconCreatorIn, boolean skipFirst)
private void initMissingImage()
public void loadTexture(IResourceManager resourceManager) throws java.io.IOException
loadTexture
in interface ITextureObject
java.io.IOException
public void loadSprites(IResourceManager resourceManager, ITextureMapPopulator iconCreatorIn)
public void loadTextureAtlas(IResourceManager resourceManager)
private int loadTexture(Stitcher stitcher, IResourceManager resourceManager, ResourceLocation location, TextureAtlasSprite textureatlassprite, ProgressManager.ProgressBar bar, int j, int k)
private void finishLoading(Stitcher stitcher, ProgressManager.ProgressBar bar, int j, int k)
private boolean generateMipmaps(IResourceManager resourceManager, TextureAtlasSprite texture)
private ResourceLocation getResourceLocation(TextureAtlasSprite p_184396_1_)
public TextureAtlasSprite getAtlasSprite(java.lang.String iconName)
public void updateAnimations()
public TextureAtlasSprite registerSprite(ResourceLocation location)
public void setMipmapLevels(int mipmapLevelsIn)
public TextureAtlasSprite getMissingSprite()
@Nullable public TextureAtlasSprite getTextureExtry(java.lang.String name)
name
- The name of the entry to findpublic boolean setTextureEntry(TextureAtlasSprite entry)
entry
- Entry instancepublic java.lang.String getBasePath()
public int getMipmapLevels()