Add debug for max texture size and output when Texture Atlas can not stitch all textures.
This commit is contained in:
parent
b2033d642c
commit
2bfa1ffc05
2 changed files with 26 additions and 4 deletions
|
@ -0,0 +1,21 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/renderer/texture/Stitcher.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/renderer/texture/Stitcher.java
|
||||
@@ -73,6 +73,9 @@
|
||||
if (!this.func_94310_b(holder))
|
||||
{
|
||||
String s = String.format("Unable to fit: %s - size: %dx%d - Maybe try a lowerresolution resourcepack?", new Object[] {holder.func_98150_a().func_94215_i(), Integer.valueOf(holder.func_98150_a().func_94211_a()), Integer.valueOf(holder.func_98150_a().func_94216_b())});
|
||||
+ net.minecraftforge.fml.common.FMLLog.info(s);
|
||||
+ for (Stitcher.Holder h : aholder)
|
||||
+ net.minecraftforge.fml.common.FMLLog.info(" %s", h);
|
||||
throw new StitcherException(holder, s);
|
||||
}
|
||||
}
|
||||
@@ -276,7 +279,7 @@
|
||||
|
||||
public String toString()
|
||||
{
|
||||
- return "Holder{width=" + this.field_94204_c + ", height=" + this.field_94201_d + '}';
|
||||
+ return "Holder{width=" + this.field_94204_c + ", height=" + this.field_94201_d + ", name=" + this.field_98151_a.func_94215_i() + '}';
|
||||
}
|
||||
|
||||
public int compareTo(Stitcher.Holder p_compareTo_1_)
|
|
@ -1,14 +1,15 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/renderer/texture/TextureMap.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/renderer/texture/TextureMap.java
|
||||
@@ -104,6 +104,7 @@
|
||||
@@ -104,6 +104,8 @@
|
||||
this.field_94258_i.clear();
|
||||
int j = Integer.MAX_VALUE;
|
||||
int k = 1 << this.field_147636_j;
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onTextureStitchedPre(this);
|
||||
+ net.minecraftforge.fml.common.FMLLog.info("Max texture size: %d", i);
|
||||
net.minecraftforge.fml.common.ProgressManager.ProgressBar bar = net.minecraftforge.fml.common.ProgressManager.push("Texture stitching", skipFirst ? 0 : this.field_110574_e.size());
|
||||
Iterator iterator = this.field_110574_e.entrySet().iterator();
|
||||
|
||||
@@ -115,6 +116,16 @@
|
||||
@@ -115,6 +117,16 @@
|
||||
ResourceLocation resourcelocation1 = this.func_147634_a(resourcelocation, 0);
|
||||
bar.step(resourcelocation1.func_110623_a());
|
||||
|
||||
|
@ -25,7 +26,7 @@
|
|||
try
|
||||
{
|
||||
IResource iresource = p_110571_1_.func_110536_a(resourcelocation1);
|
||||
@@ -301,6 +312,9 @@
|
||||
@@ -301,6 +313,9 @@
|
||||
textureatlassprite2.func_94217_a(this.field_94249_f);
|
||||
}
|
||||
|
||||
|
@ -35,7 +36,7 @@
|
|||
TextureUtil.func_177055_a(this.field_94254_c.replaceAll("/", "_"), this.func_110552_b(), this.field_147636_j, stitcher.func_110935_a(), stitcher.func_110936_b());
|
||||
net.minecraftforge.fml.common.ProgressManager.pop(bar);
|
||||
}
|
||||
@@ -368,4 +382,37 @@
|
||||
@@ -368,4 +383,37 @@
|
||||
{
|
||||
return this.field_94249_f;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue