net.minecraft.client.renderer.texture

## Class TextureMap

- java.lang.Object
- - net.minecraft.client.renderer.texture.AbstractTexture
  - - net.minecraft.client.renderer.texture.TextureMap

- All Implemented Interfaces:
    IconRegister, TextureObject, Tickable, TickableTextureObject

      public class TextureMap
      extends AbstractTexture
      implements TickableTextureObject, IconRegister

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `String` | `basePath`
    `static ResourceLocation` | `locationBlocksTexture`
    `static ResourceLocation` | `locationItemsTexture`
    `int` | `textureType` 0 = terrain.png, 1 = items.png

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TextureMap(int par1, String par2Str)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `TextureAtlasSprite` | `getAtlasSprite(String par1Str)`
    `TextureAtlasSprite` | `getTextureExtry(String name)` Grabs the registered entry for the specified name, returning null if there was not a entry.
    `int` | `getTextureType()`
    `void` | `loadTexture(ResourceManager par1ResourceManager)`
    `void` | `loadTextureAtlas(ResourceManager par1ResourceManager)`
    `Icon` | `registerIcon(String par1Str)`
    `boolean` | `setTextureEntry(String name, TextureAtlasSprite entry)` Adds a texture registry entry to this map for the specified name if one does not already exist.
    `void` | `tick()`
    `void` | `updateAnimations()`

    - ### Methods inherited from class net.minecraft.client.renderer.texture.AbstractTexture

      `getGlTextureId`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface net.minecraft.client.renderer.texture.TextureObject

      `getGlTextureId`

- - ### Field Detail

    - #### locationBlocksTexture

          public static final ResourceLocation locationBlocksTexture

    - #### locationItemsTexture

          public static final ResourceLocation locationItemsTexture

    - #### textureType

          public final int textureType

      0 = terrain.png, 1 = items.png

    - #### basePath

          public final String basePath

  - ### Constructor Detail

    - #### TextureMap

          public TextureMap(int par1,
                    String par2Str)

  - ### Method Detail

    - #### loadTexture

          public void loadTexture(ResourceManager par1ResourceManager)
                           throws IOException

      Specified by:
        `loadTexture` in interface `TextureObject`
      Throws:
        `IOException`

    - #### loadTextureAtlas

          public void loadTextureAtlas(ResourceManager par1ResourceManager)

    - #### getAtlasSprite

          public TextureAtlasSprite getAtlasSprite(String par1Str)

    - #### updateAnimations

          public void updateAnimations()

    - #### registerIcon

          public Icon registerIcon(String par1Str)

      Specified by:
        `registerIcon` in interface `IconRegister`

    - #### getTextureType

          public int getTextureType()

    - #### tick

          public void tick()

      Specified by:
        `tick` in interface `Tickable`

    - #### getTextureExtry

          public TextureAtlasSprite getTextureExtry(String name)

      Grabs the registered entry for the specified name, returning null if there was not a entry. Opposed to registerIcon, this will not instantiate the entry, useful to test if a mapping exists.
      Parameters:
        `name` - The name of the entry to find
      Returns:
        The registered entry, null if nothing was registered.

    - #### setTextureEntry

          public boolean setTextureEntry(String name,
                                TextureAtlasSprite entry)

      Adds a texture registry entry to this map for the specified name if one does not already exist. Returns false if the map already contains a entry for the specified name.
      Parameters:
        `name` - Entry name
        `entry` - Entry instance
      Returns:
        True if the entry was added to the map, false otherwise.