Call stitcher for non-existent textures as well. Probably allows

for generated textures. Hmmm
This commit is contained in:
Christian 2013-03-06 10:29:25 -05:00
parent 5ff9983772
commit 101ae36f57
1 changed files with 25 additions and 4 deletions

View File

@ -1,6 +1,14 @@
--- ../src_base/minecraft/net/minecraft/client/renderer/texture/TextureManager.java --- ../src_base/minecraft/net/minecraft/client/renderer/texture/TextureManager.java
+++ ../src_work/minecraft/net/minecraft/client/renderer/texture/TextureManager.java +++ ../src_work/minecraft/net/minecraft/client/renderer/texture/TextureManager.java
@@ -66,17 +66,27 @@ @@ -6,6 +6,7 @@
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
+import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -66,17 +67,38 @@
public List func_94266_e(String par1Str) public List func_94266_e(String par1Str)
{ {
@ -16,10 +24,19 @@
try try
{ {
- BufferedImage bufferedimage = ImageIO.read(itexturepack.getResourceAsStream("/" + par1Str)); - BufferedImage bufferedimage = ImageIO.read(itexturepack.getResourceAsStream("/" + par1Str));
+ BufferedImage bufferedimage = ImageIO.read(itexturepack.getResourceAsStream("/" + textureFile)); - int i = bufferedimage.getHeight();
int i = bufferedimage.getHeight(); - int j = bufferedimage.getWidth();
int j = bufferedimage.getWidth();
- String s1 = this.func_98146_d(par1Str); - String s1 = this.func_98146_d(par1Str);
+ InputStream textureInputStream = itexturepack.getResourceAsStream("/" + textureFile);
+ BufferedImage bufferedimage = null;
+ int i = 0;
+ int j = 0;
+ if (textureInputStream!=null)
+ {
+ bufferedimage = ImageIO.read(textureInputStream);
+ i = bufferedimage.getHeight();
+ j = bufferedimage.getWidth();
+ }
+ String s1 = textureName; + String s1 = textureName;
- if (this.func_98147_a(par1Str, itexturepack)) - if (this.func_98147_a(par1Str, itexturepack))
@ -27,6 +44,10 @@
+ { + {
+ ; + ;
+ } + }
+ else if (textureInputStream == null)
+ {
+ throw new FileNotFoundException();
+ }
+ else if (this.func_98147_a(par1Str, itexturepack)) + else if (this.func_98147_a(par1Str, itexturepack))
{ {
int k = j; int k = j;