Package net.minecraft.src

Examples of net.minecraft.src.TextureObject


    instances.clear();
    initialized = true;
  }

  static void registerAnimations() {
    TextureObject texture = TexturePackAPI.getTextureObject(ITEMS_PNG);

    if (texture instanceof TextureMap) {
      List animations = ((TextureMap)texture).listAnimatedSprites;
      Iterator i$ = instances.values().iterator();
View Full Code Here


        Iterator i$ = textureManager2.mapTextureObjects.entrySet().iterator();

        while (i$.hasNext()) {
          Entry resource = (Entry)i$.next();
          ResourceLocation resource1 = (ResourceLocation)resource.getKey();
          TextureObject texture = (TextureObject)resource.getValue();

          if (texture instanceof SimpleTexture && !TexturePackAPI.hasResource(resource1)) {
            texturesToUnload2.add(resource1);
          }
        }
View Full Code Here

  public static int getTextureIfLoaded(ResourceLocation resource) {
    if (resource == null) {
      return -1;
    } else {
      TextureObject texture = Minecraft.getMinecraft().getTextureManager().getTexture(resource);
      return texture instanceof AbstractTexture ? ((AbstractTexture)texture).glTextureId : -1;
    }
  }
View Full Code Here

    }
  }

  public static void unloadTexture(ResourceLocation resource) {
    TextureManager textureManager = Minecraft.getMinecraft().getTextureManager();
    TextureObject texture = textureManager.getTexture(resource);

    if (texture != null && !(texture instanceof TextureMap) && !(texture instanceof DynamicTexture)) {
      if (texture instanceof AbstractTexture) {
        ((AbstractTexture)texture).unloadGLTexture();
      }
View Full Code Here

TOP

Related Classes of net.minecraft.src.TextureObject

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.