public static class SpriteHolderRegistry.SpriteHolder extends java.lang.Object implements ISprite
TextureAtlasSprite
that is automatically refreshed when the resource packs are
reloaded. As such you should store this in a static final field in a client-side class, and make sure that the
class is initialised before init.Modifier and Type | Field and Description |
---|---|
net.minecraft.util.ResourceLocation |
spriteLocation |
Modifier and Type | Method and Description |
---|---|
void |
bindTexture()
Binds this sprites backing texture so that this sprite will be referenced when you use the results of
ISprite.getInterpU(double) and ISprite.getInterpV(double) |
DataMetadataSection |
getExtraData(boolean samePack) |
double |
getInterpU(double u) |
double |
getInterpV(double v) |
net.minecraft.client.renderer.texture.TextureAtlasSprite |
getSprite() |
protected void |
onTextureStitchPre(net.minecraft.client.renderer.texture.TextureMap map) |
protected void onTextureStitchPre(net.minecraft.client.renderer.texture.TextureMap map)
public net.minecraft.client.renderer.texture.TextureAtlasSprite getSprite()
public double getInterpU(double u)
getInterpU
in interface ISprite
u
- A value between 0 and 1public double getInterpV(double v)
getInterpV
in interface ISprite
v
- A value between 0 and 1public void bindTexture()
ISprite
ISprite.getInterpU(double)
and ISprite.getInterpV(double)
bindTexture
in interface ISprite
public DataMetadataSection getExtraData(boolean samePack)