@Override protected void customCustomRendering(EntityArrow entity, double x, double y, double z, float entityYaw, float partialTicks) { if(!entity.inGround) { entity.roll += entity.rollSpeed * partialTicks; } float r = entity.roll; GL11.glRotatef(r, 0f, 0f, 1f); } }
@Override public void customRendering(EntityShuriken entity, double x, double y, double z, float entityYaw, float partialTicks) { // make it smaller GL11.glScalef(0.6F, 0.6F, 0.6F); // rotate it into the direction we threw it GL11.glRotatef(entity.rotationYaw, 0f, 1f, 0f); GL11.glRotatef(-entity.rotationPitch, 1f, 0f, 0f); // add some diversity GL11.glRotatef(entity.rollAngle, 0f, 0f, 1f); // rotate it into a horizontal position GL11.glRotatef(90f, 1f, 0f, 0f); if(!entity.inGround) { entity.spin += 20 * partialTicks; } float r = entity.spin; // shurikens spin around their center a lot. *spin* GL11.glRotatef(r, 0f, 0f, 1f); // also make it a bit thicker //toolCoreRenderer.setDepth(1/20f); } }
public void customRendering(T entity, double x, double y, double z, float entityYaw, float partialTicks) { // flip it, flop it, pop it, pull it, push it, rotate it, translate it, TECHNOLOGY // rotate it into the direction we threw it GL11.glRotatef(entity.rotationYaw, 0f, 1f, 0f); GL11.glRotatef(-entity.rotationPitch, 1f, 0f, 0f); // adjust "stuck" depth if(entity.inGround) { GL11.glTranslated(0, 0, -entity.getStuckDepth()); } customCustomRendering(entity, x, y, z, entityYaw, partialTicks); // rotate it so it faces forward GL11.glRotatef(-90f, 0f, 1f, 0f); // rotate the projectile it so it faces upwards GL11.glRotatef(-45, 0f, 0f, 1f); }
/** * @see org.newdawn.slick.opengl.renderer.SGL#glRotatef(float, float, float, float) */ public void glRotatef(float angle, float x, float y, float z) { GL11.glRotatef(angle, x, y, z); }
if(f11 > 0.0F) { float f12 = -MathHelper.sin(f11 * 3.0F) * f11; GL11.glRotatef(f12, 0.0F, 0.0F, 1.0F);
@Override protected void applyRotations(@Nonnull EntityDireSlime p_77043_1_, float p_77043_2_, float p_77043_3_, float p_77043_4_) { // this.rotateCorpse(entityLiving, p_77043_2_, p_77043_3_, partialTicks); if (p_77043_1_.deathTime > 0) { float f3 = (p_77043_1_.deathTime + p_77043_4_ - 1.0F) / 20.0F * 1.6F; f3 = Math.max(MathHelper.sqrt(f3), 1.0F); GL11.glRotatef(f3 * this.getDeathMaxRotation(p_77043_1_), 0.0F, 0.0F, 1.0F); } }
@Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { if (type == ItemRenderType.INVENTORY) { super.renderItem(type, item, data); } else { GL11.glRotatef(90, 1, 0, 0); draw(0.1f, 0.2f, true); } }
@Override public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { GL11.glRotatef(-90, 0.0F, 1.0F, 0.0F); super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(entity, f, f1, f2, f3, f4, f5); Stand.render(f5); Stand2.render(f5); Stand3.render(f5); Stand4.render(f5); GL11.glRotatef(+90, 0.0F, 1.0F, 0.0F); }
@Override public void draw() { super.draw(); //Colored cable only GL11.glRotatef(descriptor.initialRotateDeg, 1.f, 0.f, 0.f); descriptor.render.draw(this, UtilsClient.distanceFromClientPlayer(this.tileEntity)); }
@Override public void render(T te, double x, double y, double z, float partialTicks, int destroyStage, float alpha) { GL11.glPushMatrix(); GL11.glTranslated(x + 0.5, y + 1.0, z + 0.5); GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F); if (te != null) GL11.glRotatef(-BlockUtils.getRotationFromOrientation(te.getOrientation()), 0, 1, 0); bindTexture(texture); model.render(te, partialTicks); GL11.glPopMatrix(); }
public void draw(float angle, float x, float y, float z, float angle2, float x2, float y2, float z2) { if (locked) return; GL11.glPushMatrix(); GL11.glTranslatef(ox, oy, oz); GL11.glRotatef(angle, x, y, z); GL11.glTranslatef(ox2, oy2, oz2); GL11.glRotatef(angle2, x2, y2, z2); GL11.glTranslatef(-ox2, -oy2, -oz2); GL11.glTranslatef(-ox, -oy, -oz); draw(); GL11.glPopMatrix(); }
@Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { if (type != ItemRenderType.INVENTORY) { GL11.glTranslatef(0.0f, 0.0f, -0.2f); GL11.glScalef(1.25f, 1.25f, 1.25f); GL11.glRotatef(-90.f, 0.f, 1.f, 0.f); draw(); } else { super.renderItem(type, item, data); } }
@Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { if (type == ItemRenderType.INVENTORY) { super.renderItem(type, item, data); } else { GL11.glRotatef(270, 1, 0, 0); GL11.glTranslatef(-0.6f, 0f, 0f); GL11.glScalef(2f, 2f, 2f); draw(0); } }
@Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { if (type == ItemRenderType.INVENTORY) { super.renderItem(type, item, data); } else { GL11.glTranslatef(0.0f, 0.0f, -0.2f); GL11.glScalef(1.25f, 1.25f, 1.25f); GL11.glRotatef(-90.f, 0.f, 1.f, 0.f); draw(); } }
@Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { if (type != ItemRenderType.INVENTORY) { GL11.glTranslatef(0.0f, 0.0f, -0.2f); GL11.glScalef(1.25f, 1.25f, 1.25f); GL11.glRotatef(-90.f, 0.f, 1.f, 0.f); draw(); } else { super.renderItem(type, item, data); } }
public void draw(float angle, float x, float y, float z) { if (locked) return; GL11.glPushMatrix(); GL11.glTranslatef(ox, oy, oz); GL11.glRotatef(angle, x, y, z); GL11.glTranslatef(-ox, -oy, -oz); draw(); GL11.glPopMatrix(); }
public void draw(float angle, float x, float y, float z, float texOffsetX, float texOffsetY) { if (locked) return; GL11.glPushMatrix(); GL11.glTranslatef(ox, oy, oz); GL11.glRotatef(angle, x, y, z); GL11.glTranslatef(-ox, -oy, -oz); draw(texOffsetX, texOffsetY); GL11.glPopMatrix(); }
public void drawNoBind(float angle, float x, float y, float z) { if (locked) return; GL11.glPushMatrix(); GL11.glTranslatef(ox, oy, oz); GL11.glRotatef(angle, x, y, z); GL11.glTranslatef(-ox, -oy, -oz); drawNoBind(); GL11.glPopMatrix(); }