mirror of
https://git.zelz.net/catfoolyou/Project164.git
synced 2025-12-14 15:37:41 +00:00
25w14b fix rendering bugs (for real)
This commit is contained in:
@@ -5,7 +5,7 @@ import java.util.List;
|
||||
|
||||
public class ConfigConstants {
|
||||
|
||||
public static final String version = "25w14a";
|
||||
public static final String version = "25w14b";
|
||||
public static final String mainMenuString = "Eaglercraft " + version;
|
||||
|
||||
public static final String forkMe = "https://git.zelz.net/catfoolyou/Project164";
|
||||
|
||||
@@ -345,7 +345,7 @@ public class EntityHorse extends EntityAnimal implements IInvBasic
|
||||
private void func_110266_cB()
|
||||
{
|
||||
this.openHorseMouth();
|
||||
this.worldObj.playSoundAtEntity(this, "eating", 1.0F, 1.0F + (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F);
|
||||
this.worldObj.playSoundAtEntity(this, "random.eat", 1.0F, 1.0F + (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -672,7 +672,7 @@ public class EntityHorse extends EntityAnimal implements IInvBasic
|
||||
var3 = this.func_110241_cb();
|
||||
this.field_110280_bR[2] = horseArmorTextures[var3];
|
||||
if(horseArmorTextures[var3] != null){
|
||||
this.field_110286_bQ = this.field_110286_bQ + horseArmorTextures[var3];
|
||||
//this.field_110286_bQ = this.field_110286_bQ + horseArmorTextures[var3];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -43,8 +43,6 @@ public class RenderEnderman extends RenderLiving
|
||||
return endermanTextures;
|
||||
}
|
||||
|
||||
private static final TextureLocation terrain = new TextureLocation("/terrain.png");
|
||||
|
||||
/**
|
||||
* Render the block an enderman is carrying
|
||||
*/
|
||||
|
||||
@@ -3,12 +3,12 @@ package net.minecraft.src;
|
||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class RenderHorse extends RenderLiving
|
||||
{
|
||||
private static final Map field_110852_a = new HashMap<>();
|
||||
private static List<TextureLocation> horseVariantTextures = new ArrayList<TextureLocation>();
|
||||
private static final TextureLocation whiteHorseTextures = new TextureLocation("textures/entity/horse/horse_white.png");
|
||||
private static final TextureLocation muleTextures = new TextureLocation("textures/entity/horse/mule.png");
|
||||
private static final TextureLocation donkeyTextures = new TextureLocation("textures/entity/horse/donkey.png");
|
||||
@@ -38,7 +38,7 @@ public class RenderHorse extends RenderLiving
|
||||
super.preRenderCallback(par1EntityHorse, par2);
|
||||
}
|
||||
|
||||
protected void func_110846_a(EntityHorse par1EntityHorse, float par2, float par3, float par4, float par5, float par6, float par7)
|
||||
protected void renderHorse(EntityHorse par1EntityHorse, float par2, float par3, float par4, float par5, float par6, float par7)
|
||||
{
|
||||
if (par1EntityHorse.isInvisible())
|
||||
{
|
||||
@@ -48,10 +48,16 @@ public class RenderHorse extends RenderLiving
|
||||
{
|
||||
this.bindEntityTexture(par1EntityHorse);
|
||||
this.mainModel.render(par1EntityHorse, par2, par3, par4, par5, par6, par7);
|
||||
if(!horseVariantTextures.isEmpty()){
|
||||
for(TextureLocation tex : horseVariantTextures){
|
||||
tex.bindTexture();
|
||||
this.mainModel.render(par1EntityHorse, par2, par3, par4, par5, par6, par7);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected TextureLocation func_110849_a(EntityHorse par1EntityHorse)
|
||||
protected TextureLocation getHorseTextures(EntityHorse par1EntityHorse)
|
||||
{
|
||||
if (!par1EntityHorse.func_110239_cn())
|
||||
{
|
||||
@@ -76,20 +82,21 @@ public class RenderHorse extends RenderLiving
|
||||
}
|
||||
else
|
||||
{
|
||||
return this.func_110848_b(par1EntityHorse);
|
||||
return this.getHorseVarTextures(par1EntityHorse);
|
||||
}
|
||||
}
|
||||
|
||||
private TextureLocation func_110848_b(EntityHorse par1EntityHorse)
|
||||
private TextureLocation getHorseVarTextures(EntityHorse par1EntityHorse)
|
||||
{
|
||||
String var2 = par1EntityHorse.getHorseTexture();
|
||||
TextureLocation var3 = (TextureLocation)field_110852_a.get(var2);
|
||||
TextureLocation var3 = new TextureLocation(var2);
|
||||
|
||||
if (var3 == null)
|
||||
{
|
||||
var3 = new TextureLocation(var2);
|
||||
var3.bindTexture();
|
||||
field_110852_a.put(var2, var3);
|
||||
String[] varTextures = par1EntityHorse.getVariantTexturePaths();
|
||||
|
||||
for(String tex : varTextures){
|
||||
if(tex != null){
|
||||
horseVariantTextures.add(new TextureLocation(tex));
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
@@ -109,12 +116,12 @@ public class RenderHorse extends RenderLiving
|
||||
*/
|
||||
protected void renderModel(EntityLivingBase par1EntityLivingBase, float par2, float par3, float par4, float par5, float par6, float par7)
|
||||
{
|
||||
this.func_110846_a((EntityHorse)par1EntityLivingBase, par2, par3, par4, par5, par6, par7);
|
||||
this.renderHorse((EntityHorse)par1EntityLivingBase, par2, par3, par4, par5, par6, par7);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void bindTexture(EntityLivingBase par1EntityLiving) {
|
||||
this.func_110849_a((EntityHorse) par1EntityLiving).bindTexture();
|
||||
this.getHorseTextures((EntityHorse) par1EntityLiving).bindTexture();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -122,6 +129,6 @@ public class RenderHorse extends RenderLiving
|
||||
*/
|
||||
protected TextureLocation getEntityTexture(Entity par1Entity)
|
||||
{
|
||||
return this.func_110849_a((EntityHorse)par1Entity);
|
||||
return this.getHorseTextures((EntityHorse)par1Entity);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ public abstract class RenderLiving extends RendererLivingEntity
|
||||
public void doRenderLiving(EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8, float par9)
|
||||
{
|
||||
super.doRenderLiving(par1EntityLiving, par2, par4, par6, par8, par9);
|
||||
this.func_110827_b(par1EntityLiving, par2, par4, par6, par8, par9);
|
||||
this.renderLeash(par1EntityLiving, par2, par4, par6, par8, par9);
|
||||
}
|
||||
|
||||
private double func_110828_a(double par1, double par3, double par5)
|
||||
@@ -26,7 +26,7 @@ public abstract class RenderLiving extends RendererLivingEntity
|
||||
return par1 + (par3 - par1) * par5;
|
||||
}
|
||||
|
||||
protected void func_110827_b(EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8, float par9)
|
||||
protected void renderLeash(EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8, float par9)
|
||||
{
|
||||
Entity var10 = par1EntityLiving.getLeashedToEntity();
|
||||
|
||||
@@ -34,8 +34,8 @@ public abstract class RenderLiving extends RendererLivingEntity
|
||||
{
|
||||
par4 -= (1.6D - (double)par1EntityLiving.height) * 0.5D;
|
||||
Tessellator var11 = Tessellator.instance;
|
||||
double var12 = this.func_110828_a((double)var10.prevRotationYaw, (double)var10.rotationYaw, (double)(par9 * 0.5F)) * 0.01745329238474369D;
|
||||
double var14 = this.func_110828_a((double)var10.prevRotationPitch, (double)var10.rotationPitch, (double)(par9 * 0.5F)) * 0.01745329238474369D;
|
||||
double var12 = this.func_110828_a(var10.prevRotationYaw, var10.rotationYaw, par9 * 0.5F) * 0.01745329238474369D;
|
||||
double var14 = this.func_110828_a(var10.prevRotationPitch, var10.rotationPitch, par9 * 0.5F) * 0.01745329238474369D;
|
||||
double var16 = Math.cos(var12);
|
||||
double var18 = Math.sin(var12);
|
||||
double var20 = Math.sin(var14);
|
||||
@@ -48,25 +48,25 @@ public abstract class RenderLiving extends RendererLivingEntity
|
||||
}
|
||||
|
||||
double var22 = Math.cos(var14);
|
||||
double var24 = this.func_110828_a(var10.prevPosX, var10.posX, (double)par9) - var16 * 0.7D - var18 * 0.5D * var22;
|
||||
double var26 = this.func_110828_a(var10.prevPosY + (double)var10.getEyeHeight() * 0.7D, var10.posY + (double)var10.getEyeHeight() * 0.7D, (double)par9) - var20 * 0.5D - 0.25D;
|
||||
double var28 = this.func_110828_a(var10.prevPosZ, var10.posZ, (double)par9) - var18 * 0.7D + var16 * 0.5D * var22;
|
||||
double var30 = this.func_110828_a((double)par1EntityLiving.prevRenderYawOffset, (double)par1EntityLiving.renderYawOffset, (double)par9) * 0.01745329238474369D + (Math.PI / 2D);
|
||||
double var24 = this.func_110828_a(var10.prevPosX, var10.posX, par9) - var16 * 0.7D - var18 * 0.5D * var22;
|
||||
double var26 = this.func_110828_a(var10.prevPosY + (double)var10.getEyeHeight() * 0.7D, var10.posY + (double)var10.getEyeHeight() * 0.7D, par9) - var20 * 0.5D - 0.25D;
|
||||
double var28 = this.func_110828_a(var10.prevPosZ, var10.posZ, par9) - var18 * 0.7D + var16 * 0.5D * var22;
|
||||
double var30 = this.func_110828_a(par1EntityLiving.prevRenderYawOffset, par1EntityLiving.renderYawOffset, par9) * 0.01745329238474369D + (Math.PI / 2D);
|
||||
var16 = Math.cos(var30) * (double)par1EntityLiving.width * 0.4D;
|
||||
var18 = Math.sin(var30) * (double)par1EntityLiving.width * 0.4D;
|
||||
double var32 = this.func_110828_a(par1EntityLiving.prevPosX, par1EntityLiving.posX, (double)par9) + var16;
|
||||
double var34 = this.func_110828_a(par1EntityLiving.prevPosY, par1EntityLiving.posY, (double)par9);
|
||||
double var36 = this.func_110828_a(par1EntityLiving.prevPosZ, par1EntityLiving.posZ, (double)par9) + var18;
|
||||
double var32 = this.func_110828_a(par1EntityLiving.prevPosX, par1EntityLiving.posX, par9) + var16;
|
||||
double var34 = this.func_110828_a(par1EntityLiving.prevPosY, par1EntityLiving.posY, par9);
|
||||
double var36 = this.func_110828_a(par1EntityLiving.prevPosZ, par1EntityLiving.posZ, par9) + var18;
|
||||
par2 += var16;
|
||||
par6 += var18;
|
||||
double var38 = (double)((float)(var24 - var32));
|
||||
double var40 = (double)((float)(var26 - var34));
|
||||
double var42 = (double)((float)(var28 - var36));
|
||||
double var38 = (float)(var24 - var32);
|
||||
double var40 = (float)(var26 - var34);
|
||||
double var42 = (float)(var28 - var36);
|
||||
EaglerAdapter.glDisable(EaglerAdapter.GL_TEXTURE_2D);
|
||||
EaglerAdapter.glDisable(EaglerAdapter.GL_LIGHTING);
|
||||
EaglerAdapter.glDisable(EaglerAdapter.GL_CULL_FACE);
|
||||
boolean var44 = true;
|
||||
double var45 = 0.025D;
|
||||
// boolean var44 = true;
|
||||
// double var45 = 0.025D;
|
||||
var11.startDrawing(5);
|
||||
int var47;
|
||||
float var48;
|
||||
|
||||
Reference in New Issue
Block a user