Fixed mob textures

This commit is contained in:
peytonplayz585 2023-07-27 09:11:34 -07:00
parent 4ab4413114
commit 621ac46ae3
4 changed files with 13 additions and 9 deletions

View File

@ -180,7 +180,7 @@ public final class ItemRenderer {
GL11.glRotatef(-var4 * 20.0F, 0.0F, 0.0F, 1.0F); GL11.glRotatef(-var4 * 20.0F, 0.0F, 0.0F, 1.0F);
} }
GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTextureForDownloadableImage(this.mc.thePlayer.skinUrl, this.mc.thePlayer.getTexture())); GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTextureForDownloadableImage(this.mc.thePlayer.getTexture()));
GL11.glTranslatef(-0.2F, -0.3F, 0.1F); GL11.glTranslatef(-0.2F, -0.3F, 0.1F);
GL11.glRotatef(120.0F, 0.0F, 0.0F, 1.0F); GL11.glRotatef(120.0F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(200.0F, 1.0F, 0.0F, 0.0F); GL11.glRotatef(200.0F, 1.0F, 0.0F, 0.0F);

View File

@ -33,9 +33,6 @@ public class RenderEngine {
singleIntBuffer.clear(); singleIntBuffer.clear();
BufferUtils.generateTextureNames(singleIntBuffer); BufferUtils.generateTextureNames(singleIntBuffer);
int i = singleIntBuffer.get(0); int i = singleIntBuffer.get(0);
//if (s.startsWith("##")) {
// setupTexture(unwrapImageByColumns(readTextureImage(texturepackbase.func_6481_a(s.substring(2)))), i);
//} else
if (s.startsWith("%clamp%")) { if (s.startsWith("%clamp%")) {
clampTexture = true; clampTexture = true;
setupTexture(readTextureImage(GL11.loadResourceBytes(s.substring(7))), i); setupTexture(readTextureImage(GL11.loadResourceBytes(s.substring(7))), i);
@ -162,8 +159,15 @@ public class RenderEngine {
GL11.glDeleteTextures(i); GL11.glDeleteTextures(i);
} }
public int getTextureForDownloadableImage(String s, String s1) { public int getTextureForDownloadableImage(String s) {
return getTexture("/char.png"); // if(s.contains("creeper")) {
// return getTexture("/mob/creeper.png");
// } else if(s.contains("pig")) {
// return getTexture("/mob/pig.png");
// } else if(s.contains("sheep")) {
// return getTexture("/mob/sheep.png");
// }
return getTexture(s);
} }
private int averageColor(int i, int j) { private int averageColor(int i, int j) {

View File

@ -29,9 +29,9 @@ public abstract class Render {
RenderEngine.bindTexture(var2.getTexture(var1)); RenderEngine.bindTexture(var2.getTexture(var1));
} }
protected final void loadDownloadableImageTexture(String var1, String var2) { protected final void loadDownloadableImageTexture(String var1) {
RenderEngine var3 = this.renderManager.renderEngine; RenderEngine var3 = this.renderManager.renderEngine;
RenderEngine.bindTexture(var3.getTextureForDownloadableImage(var1, var2)); RenderEngine.bindTexture(var3.getTextureForDownloadableImage(var1));
} }
public static void renderOffsetAABB(AxisAlignedBB var0) { public static void renderOffsetAABB(AxisAlignedBB var0) {

View File

@ -48,7 +48,7 @@ public class RenderLiving extends Render {
var3 = 1.0F; var3 = 1.0F;
} }
this.loadDownloadableImageTexture(var1.skinUrl, var1.getTexture()); this.loadDownloadableImageTexture(var1.getTexture());
GL11.glEnable(GL11.GL_ALPHA_TEST); GL11.glEnable(GL11.GL_ALPHA_TEST);
this.mainModel.render(var4, var3, var2, var7 - var5, var8, 1.0F); this.mainModel.render(var4, var3, var2, var7 - var5, var8, 1.0F);