mirror of
https://github.com/ACGaming/Spackenmobs
synced 2024-06-02 18:49:45 +02:00
49 lines
1.9 KiB
Java
49 lines
1.9 KiB
Java
package mod.acgaming.spackenmobs.render;
|
|
|
|
import net.minecraft.client.model.ModelGhast;
|
|
import net.minecraft.client.renderer.GlStateManager;
|
|
import net.minecraft.client.renderer.entity.Render;
|
|
import net.minecraft.client.renderer.entity.RenderLiving;
|
|
import net.minecraft.client.renderer.entity.RenderManager;
|
|
import net.minecraft.util.ResourceLocation;
|
|
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
|
import net.minecraftforge.fml.relauncher.Side;
|
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
|
|
|
import mod.acgaming.spackenmobs.entities.EntityTileraGhast;
|
|
|
|
@SideOnly(Side.CLIENT)
|
|
public class RenderTileraGhast extends RenderLiving<EntityTileraGhast>
|
|
{
|
|
public static final RenderTileraGhast.Factory FACTORY = new RenderTileraGhast.Factory();
|
|
private static final ResourceLocation TILERA_GHAST_TEXTURE = new ResourceLocation("spackenmobs:textures/entities/tilera_ghast.png");
|
|
private static final ResourceLocation TILERA_GHAST_SHOOTING_TEXTURE = new ResourceLocation("spackenmobs:textures/entities/tilera_ghast_shooting.png");
|
|
|
|
public RenderTileraGhast(RenderManager renderManagerIn)
|
|
{
|
|
super(renderManagerIn, new ModelGhast(), 0.5F);
|
|
}
|
|
|
|
protected ResourceLocation getEntityTexture(EntityTileraGhast entity)
|
|
{
|
|
return entity.isAttacking() ? TILERA_GHAST_SHOOTING_TEXTURE : TILERA_GHAST_TEXTURE;
|
|
}
|
|
|
|
protected void preRenderCallback(EntityTileraGhast entitylivingbaseIn, float partialTickTime)
|
|
{
|
|
float f = 1.0F;
|
|
float f1 = 4.5F;
|
|
float f2 = 4.5F;
|
|
GlStateManager.scale(4.5F, 4.5F, 4.5F);
|
|
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
|
}
|
|
|
|
private static class Factory implements IRenderFactory<EntityTileraGhast>
|
|
{
|
|
@Override
|
|
public Render<? super EntityTileraGhast> createRenderFor(RenderManager manager)
|
|
{
|
|
return new RenderTileraGhast(manager);
|
|
}
|
|
}
|
|
} |