add foxes, temp textures

This commit is contained in:
Sen 2025-06-15 01:06:10 +02:00
parent cdf8db1b50
commit ad930fcbdc
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
6 changed files with 150 additions and 8 deletions

View file

@ -21,6 +21,7 @@ import client.renderer.entity.RenderFallingBlock;
import client.renderer.entity.RenderFireball;
import client.renderer.entity.RenderFish;
import client.renderer.entity.RenderFlyingBox;
import client.renderer.entity.RenderFox;
import client.renderer.entity.RenderHorse;
import client.renderer.entity.RenderHumanoid;
import client.renderer.entity.RenderItem;
@ -68,6 +69,7 @@ import common.entity.animal.EntityBat;
import common.entity.animal.EntityChicken;
import common.entity.animal.EntityCow;
import common.entity.animal.EntityDragon;
import common.entity.animal.EntityFox;
import common.entity.animal.EntityHorse;
import common.entity.animal.EntityMooshroom;
import common.entity.animal.EntityMouse;
@ -116,6 +118,7 @@ public abstract class RenderRegistry {
map.put(EntityCow.class, new RenderCow(mgr, new ModelCow()));
map.put(EntityMooshroom.class, new RenderMooshroom(mgr, new ModelCow()));
map.put(EntityWolf.class, new RenderWolf(mgr, new ModelWolf()));
map.put(EntityFox.class, new RenderFox(mgr, new ModelWolf()));
map.put(EntityChicken.class, new RenderChicken(mgr, new ModelChicken()));
map.put(EntityOcelot.class, new RenderOcelot(mgr, new ModelOcelot()));
map.put(EntityRabbit.class, new RenderRabbit(mgr, new ModelRabbit()));

View file

@ -0,0 +1,20 @@
package client.renderer.entity;
import client.renderer.model.ModelBase;
import common.entity.animal.EntityFox;
public class RenderFox extends RenderLiving<EntityFox> {
private static final String FOX_TEXTURE = "textures/entity/fox.png";
public RenderFox(RenderManager renderManagerIn, ModelBase modelBaseIn) {
super(renderManagerIn, modelBaseIn);
}
protected float handleRotationFloat(EntityFox livingBase, float partialTicks) {
return (float)Math.PI / 5F;
}
protected String getEntityTexture(EntityFox entity) {
return FOX_TEXTURE;
}
}

View file

@ -110,11 +110,11 @@ public class ModelWolf extends ModelBase
* Used for easily adding entity-dependent animations. The second and third float params here are the same second
* and third as in the setRotationAngles method.
*/
public void setLivingAnimations(EntityLiving entitylivingbaseIn, float p_78086_2_, float p_78086_3_, float partialTickTime)
public void setLivingAnimations(EntityLiving living, float p_78086_2_, float p_78086_3_, float partialTickTime)
{
EntityWolf entitywolf = (EntityWolf)entitylivingbaseIn;
EntityWolf wolf = living instanceof EntityWolf ? (EntityWolf)living : null;
if (entitywolf.isAngry())
if (wolf != null && wolf.isAngry())
{
this.wolfTail.rotateAngleY = 0.0F;
}
@ -123,7 +123,7 @@ public class ModelWolf extends ModelBase
this.wolfTail.rotateAngleY = ExtMath.cos(p_78086_2_ * 0.6662F) * 1.4F * p_78086_3_;
}
if (entitywolf.isSitting())
if (wolf != null && wolf.isSitting())
{
this.wolfMane.setRotationPoint(-1.0F, 16.0F, -3.0F);
this.wolfMane.rotateAngleX = ((float)Math.PI * 2F / 5F);
@ -157,10 +157,12 @@ public class ModelWolf extends ModelBase
this.wolfLeg4.rotateAngleX = ExtMath.cos(p_78086_2_ * 0.6662F) * 1.4F * p_78086_3_;
}
this.wolfHeadMain.rotateAngleZ = entitywolf.getInterestedAngle(partialTickTime) + entitywolf.getShakeAngle(partialTickTime, 0.0F);
this.wolfMane.rotateAngleZ = entitywolf.getShakeAngle(partialTickTime, -0.08F);
this.wolfBody.rotateAngleZ = entitywolf.getShakeAngle(partialTickTime, -0.16F);
this.wolfTail.rotateAngleZ = entitywolf.getShakeAngle(partialTickTime, -0.2F);
if(wolf != null) {
this.wolfHeadMain.rotateAngleZ = wolf.getInterestedAngle(partialTickTime) + wolf.getShakeAngle(partialTickTime, 0.0F);
this.wolfMane.rotateAngleZ = wolf.getShakeAngle(partialTickTime, -0.08F);
this.wolfBody.rotateAngleZ = wolf.getShakeAngle(partialTickTime, -0.16F);
this.wolfTail.rotateAngleZ = wolf.getShakeAngle(partialTickTime, -0.2F);
}
}
/**

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB