wasliebob

Untitled

May 18th, 2014
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. public void renderCircle(TileEntityClasher te, double x, double y, double z, float f)
  2. {
  3. Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("thaumcraftextras:textures/gui/circle.png"));
  4. double d1 = 0.0001D;
  5. OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit);
  6. GL11.glDisable(GL11.GL_TEXTURE_2D);
  7. OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);
  8. GL11.glEnable(GL11.GL_TEXTURE_2D);
  9.  
  10. Tessellator t = Tessellator.instance;
  11. GL11.glPushMatrix();
  12. GL11.glTranslated(x, y + 1, z);
  13. GL11.glRotated(90D, 1D, 0D, 0D);
  14. GL11.glScaled(2D, 2D, 2D);
  15.  
  16. GL11.glPushMatrix();
  17. yRotation += f*speed;
  18. if (yRotation <= 360) {
  19. yRotation -= 360;
  20. }
  21. GL11.glTranslated(0.5D, 0, 0.5D);
  22. GL11.glRotatef(yRotation, 0F, 0F, 1F);
  23. GL11.glTranslated(-0.5D, 0, -0.5D);
  24.  
  25. t.startDrawingQuads();
  26. vertex(te, t, d1);
  27. t.draw();
  28. GL11.glPopMatrix();
  29. GL11.glPopMatrix();
  30. }
  31.  
  32. public void vertex(TileEntityClasher te, Tessellator t, double d1)
  33. {
  34. t.setColorOpaque_I(Color.cyan.getRGB());
  35. t.addVertexWithUV(0, 0 + 1.0D, 0 - d1, 1.0D, 0.0D);
  36. t.addVertexWithUV(0 + 1.0D, 0 + 1.0D, 0 - d1, 0.0D, 0.0D);
  37. t.addVertexWithUV(0 + 1.0D, 0 + 0.0D, 0 - d1, 0.0D, 1.0D);
  38. t.addVertexWithUV(0, 0 + 0.05D, 0 - d1, 1.0D, 1.0D);
  39. }
Advertisement
Add Comment
Please, Sign In to add comment