add gradle
This commit is contained in:
parent
bb6ebb0be8
commit
4e51e18bdc
3033 changed files with 470 additions and 0 deletions
49
client/src/main/java/client/renderer/entity/RenderBat.java
Executable file
49
client/src/main/java/client/renderer/entity/RenderBat.java
Executable 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);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue