1
0
Fork 0

add gradle

This commit is contained in:
Sen 2025-05-26 17:09:08 +02:00
parent bb6ebb0be8
commit 4e51e18bdc
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
3033 changed files with 470 additions and 0 deletions

View file

@ -0,0 +1,49 @@
package client.renderer.entity;
import org.lwjgl.opengl.GL11;
import client.renderer.model.ModelBat;
import common.entity.animal.EntityBat;
import common.util.ExtMath;
public class RenderBat extends RenderLiving<EntityBat>
{
private static final String batTextures = "textures/entity/bat.png";
public RenderBat(RenderManager renderManagerIn)
{
super(renderManagerIn, new ModelBat());
}
/**
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
*/
protected String getEntityTexture(EntityBat entity)
{
return batTextures;
}
/**
* Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
* entityLiving, partialTickTime
*/
protected void preRenderCallback(EntityBat entitylivingbaseIn, float partialTickTime)
{
GL11.glScalef(0.35F, 0.35F, 0.35F);
}
protected void rotateCorpse(EntityBat bat, float p_77043_2_, float p_77043_3_, float partialTicks)
{
if (!bat.getIsBatHanging())
{
GL11.glTranslatef(0.0F, ExtMath.cos(p_77043_2_ * 0.3F) * 0.1F, 0.0F);
}
else
{
GL11.glTranslatef(0.0F, -0.1F, 0.0F);
}
super.rotateCorpse(bat, p_77043_2_, p_77043_3_, partialTicks);
}
}