mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 18:25:59 +03:00
40 lines
1.6 KiB
Diff
40 lines
1.6 KiB
Diff
--- ../src-base/minecraft/net/minecraft/client/renderer/texture/TextureUtil.java
|
|
+++ ../src-work/minecraft/net/minecraft/client/renderer/texture/TextureUtil.java
|
|
@@ -83,6 +83,7 @@
|
|
int[] aint1 = aint[l1 - 1];
|
|
int[] aint2 = new int[aint1.length >> 2];
|
|
int j = p_147949_1_ >> l1;
|
|
+ if (j > 0) { // FORGE: forcing higher mipmap levels on odd textures needs this check
|
|
int k = aint2.length / j;
|
|
int l = j << 1;
|
|
|
|
@@ -94,6 +95,7 @@
|
|
aint2[i1 + j1 * j] = blendColors(aint1[k1 + 0], aint1[k1 + 1], aint1[k1 + 0 + l], aint1[k1 + 1 + l], flag);
|
|
}
|
|
}
|
|
+ } // end if (j > 0)
|
|
|
|
aint[l1] = aint2;
|
|
}
|
|
@@ -168,6 +170,7 @@
|
|
for (int i = 0; i < p_147955_0_.length; ++i)
|
|
{
|
|
int[] aint = p_147955_0_[i];
|
|
+ if ((p_147955_1_ >> i <= 0) || (p_147955_2_ >> i <= 0)) break;
|
|
uploadTextureSub(i, aint, p_147955_1_ >> i, p_147955_2_ >> i, p_147955_3_ >> i, p_147955_4_ >> i, p_147955_5_, p_147955_6_, p_147955_0_.length > 1);
|
|
}
|
|
}
|
|
@@ -202,9 +205,11 @@
|
|
|
|
public static void allocateTextureImpl(int glTextureId, int mipmapLevels, int width, int height)
|
|
{
|
|
+ synchronized (net.minecraftforge.fml.client.SplashProgress.class)
|
|
+ {
|
|
deleteTexture(glTextureId);
|
|
bindTexture(glTextureId);
|
|
-
|
|
+ }
|
|
if (mipmapLevels >= 0)
|
|
{
|
|
GlStateManager.glTexParameteri(3553, 33085, mipmapLevels);
|