First merging of weaponry into tinkers

This commit is contained in:
Bernhard Bonigl committed 2014-10-05 19:49:26 +02:00
1 parent 6e1ea0e736
commit 73b25d19f0
191 files changed
+5325 -1

No files matched your search

@@ -0,0 +1,29 @@
package boni.tinkersweaponry.client.entityrenderer;
import boni.tinkersweaponry.entity.JavelinEntity;
import org.lwjgl.opengl.GL11;
public class JavelinEntityRenderer extends ProjectileBaseRenderer<JavelinEntity> {
@Override
public void customRendering(JavelinEntity entity, double x, double y, double z, float p_76986_8_, float p_76986_9_) {
// rotate it into the direction we threw it
GL11.glRotatef(entity.rotationYaw, 0f, 1f, 0f);
GL11.glRotatef(-entity.rotationPitch, 1f, 0f, 0f);
// rotate it so it faces forward
GL11.glRotatef(90f, 1f, 0f, 0f);
// roll it all aroun
GL11.glRotated(entity.roll, 0, 1, 0);
// make it looooong
GL11.glScalef(1.5F, 3.0F, 1.5F);
GL11.glTranslatef(0f, -0.5f, 0f);
// rotate the projectile it so it faces upwards (because the graphic itself is rotated by 45°)
GL11.glRotatef(45, 0f, 0f, 1f);
toolCoreRenderer.setDepth(1/16f);
}
}