Java 类net.minecraft.client.renderer.texture.TextureObject 实例源码

项目:RuneCraftery    文件:TextureManager.java   
public boolean func_110579_a(ResourceLocation p_110579_1_, TextureObject p_110579_2_) {
   boolean var3 = true;

   try {
      ((TextureObject)p_110579_2_).func_110551_a(this.field_110582_d);
   } catch (IOException var8) {
      Minecraft.func_71410_x().func_98033_al().func_98235_b("Failed to load texture: " + p_110579_1_, var8);
      p_110579_2_ = TextureUtil.field_111001_a;
      this.field_110585_a.put(p_110579_1_, p_110579_2_);
      var3 = false;
   } catch (Throwable var9) {
      CrashReport var5 = CrashReport.func_85055_a(var9, "Registering texture");
      CrashReportCategory var6 = var5.func_85058_a("Resource location being registered");
      var6.func_71507_a("Resource location", p_110579_1_);
      var6.func_71500_a("Texture object class", new TextureManagerINNER1(this, (TextureObject)p_110579_2_));
      throw new ReportedException(var5);
   }

   this.field_110585_a.put(p_110579_1_, p_110579_2_);
   return var3;
}
项目:RuneCraftery    文件:TextureManager.java   
public void func_110549_a(ResourceManager p_110549_1_) {
   Iterator var2 = this.field_110585_a.entrySet().iterator();

   while(var2.hasNext()) {
      Entry var3 = (Entry)var2.next();
      this.func_110579_a((ResourceLocation)var3.getKey(), (TextureObject)var3.getValue());
   }

}
项目:SevenCommons    文件:Rendering.java   
/**
 * <p>Unload the texture specified by the given ResourceLocation.</p>
 *
 * @param loc the ResourceLocation
 */
public static void unloadTexture(ResourceLocation loc) {
    TextureObject tex = SCReflector.instance.getTexturesMap(Minecraft.getMinecraft().renderEngine).remove(loc);
    if (tex != null) {
        glDeleteTextures(tex.getGlTextureId());
    }
}
项目:Nucleum-Omnium    文件:DevCapes.java   
/**
 * Used to download images. Copied from AbstractClientPlayer to remove
 * a conditional.
 *
 * @param par0ResourceLocation
 * @param par1Str
 * @param par2ResourceLocation
 * @param par3IImageBuffer
 * @return
 */
private static ThreadDownloadImageData makeDownloadThread(ResourceLocation par0ResourceLocation, String par1Str, ResourceLocation par2ResourceLocation, IImageBuffer par3IImageBuffer)
{
    TextureManager texturemanager = Minecraft.getMinecraft().getTextureManager();

    TextureObject object = new ThreadDownloadImageData(par1Str, par2ResourceLocation, par3IImageBuffer);
    // Binds ResourceLocation to this.
    texturemanager.loadTexture(par0ResourceLocation, object);

    return (ThreadDownloadImageData) object;
}
项目:RuneCraftery    文件:TextureManager.java   
public TextureObject func_110581_b(ResourceLocation p_110581_1_) {
   return (TextureObject)this.field_110585_a.get(p_110581_1_);
}
项目:RuneCraftery    文件:TextureManagerINNER1.java   
TextureManagerINNER1(TextureManager p_i1283_1_, TextureObject p_i1283_2_) {
   this.field_135061_b = p_i1283_1_;
   this.field_135062_a = p_i1283_2_;
}
项目:SevenCommons    文件:SCReflector.java   
@SideOnly(Side.CLIENT)
@Getter(field = F_MAP_TEXTURE_OBJECTS, srg = true)
Map<ResourceLocation, TextureObject> getTexturesMap(TextureManager manager);