43 lines
2.0 KiB
Diff
43 lines
2.0 KiB
Diff
--- a/net/minecraft/client/renderer/texture/Stitcher.java
|
|
+++ b/net/minecraft/client/renderer/texture/Stitcher.java
|
|
@@ -14,6 +14,8 @@
|
|
|
|
@OnlyIn(Dist.CLIENT)
|
|
public class Stitcher {
|
|
+ private static final org.apache.logging.log4j.Logger LOGGER = org.apache.logging.log4j.LogManager.getLogger();
|
|
+
|
|
private static final Comparator<Stitcher.Holder> field_217797_a = Comparator.<Stitcher.Holder, Integer>comparing((p_217793_0_) -> {
|
|
return -p_217793_0_.field_94201_d;
|
|
}).thenComparing((p_217795_0_) -> {
|
|
@@ -54,6 +56,12 @@
|
|
|
|
for(Stitcher.Holder stitcher$holder : list) {
|
|
if (!this.func_94310_b(stitcher$holder)) {
|
|
+ LOGGER.info(new net.minecraftforge.fml.loading.AdvancedLogMessageAdapter(sb->{
|
|
+ sb.append("Unable to fit: ").append(stitcher$holder.field_229213_a_.func_229248_a_());
|
|
+ sb.append(" - size: ").append(stitcher$holder.field_229213_a_.func_229250_b_()).append("x").append(stitcher$holder.field_229213_a_.func_229252_c_());
|
|
+ sb.append(" - Maybe try a lower resolution resourcepack?\n");
|
|
+ list.forEach(h-> sb.append("\t").append(h).append("\n"));
|
|
+ }));
|
|
throw new StitcherException(stitcher$holder.field_229213_a_, list.stream().map((p_229212_0_) -> {
|
|
return p_229212_0_.field_229213_a_;
|
|
}).collect(ImmutableList.toImmutableList()));
|
|
@@ -103,7 +111,7 @@
|
|
boolean flag4 = flag2 && j != l;
|
|
boolean flag;
|
|
if (flag3 ^ flag4) {
|
|
- flag = flag3;
|
|
+ flag = !flag3 && flag1; // Forge: Fix stitcher not expanding entire height before growing width, and (potentially) growing larger then the max size.
|
|
} else {
|
|
flag = flag1 && i <= j;
|
|
}
|
|
@@ -140,7 +148,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_229213_a_.func_229248_a_() + '}';
|
|
}
|
|
}
|
|
|