mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
36 lines
1.2 KiB
Java
36 lines
1.2 KiB
Java
package com.hbm.render.entity.projectile;
|
|
|
|
import org.lwjgl.opengl.GL11;
|
|
|
|
import com.hbm.main.ResourceManager;
|
|
|
|
import net.minecraft.client.renderer.entity.Render;
|
|
import net.minecraft.entity.Entity;
|
|
import net.minecraft.util.ResourceLocation;
|
|
|
|
public class RenderGrenade extends Render {
|
|
|
|
@Override
|
|
public void doRender(Entity p_76986_1_, double x, double y, double z, float p_76986_8_, float p_76986_9_) {
|
|
|
|
GL11.glPushMatrix();
|
|
GL11.glTranslatef((float)x, (float)y + 0.125F, (float)z);
|
|
GL11.glRotatef(p_76986_1_.prevRotationYaw + (p_76986_1_.rotationYaw - p_76986_1_.prevRotationYaw) * p_76986_9_ - 90.0F, 0.0F, 1.0F, 0.0F);
|
|
GL11.glRotatef(p_76986_1_.prevRotationPitch + (p_76986_1_.rotationPitch - p_76986_1_.prevRotationPitch) * p_76986_9_, 0.0F, 0.0F, 1.0F);
|
|
|
|
GL11.glRotatef(90, 0F, 1F, 0F);
|
|
GL11.glScaled(0.125, 0.125, 0.125);
|
|
GL11.glEnable(GL11.GL_LIGHTING);
|
|
GL11.glEnable(GL11.GL_CULL_FACE);
|
|
bindTexture(ResourceManager.grenade_mk2);
|
|
ResourceManager.grenade_frag.renderAll();
|
|
|
|
GL11.glPopMatrix();
|
|
}
|
|
|
|
@Override
|
|
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
|
|
return ResourceManager.grenade_mk2;
|
|
}
|
|
}
|