Advertisement
Guest User

Untitled

a guest
Dec 28th, 2015
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. public void renderTileEntityAt(TileEntity te, double x, double y, double z, float partialTicks, int destroyStage) {
  2. GL11.glPushMatrix();
  3.  
  4.  
  5.  
  6.  
  7.  
  8. Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("miencraft:diamond_block"));
  9. Tessellator.getInstance().getWorldRenderer().startDrawingQuads();
  10. int NUM_PIZZA_SLICES=2000;
  11. for(int i = 0; i <= NUM_PIZZA_SLICES; i++){ //NUM_PIZZA_SLICES decides how round the circle looks.
  12. double SUBDIVISIONS=180;
  13. double angle = Math.PI * 2 * i / SUBDIVISIONS;
  14. //GL11.glVertex2f((float) Math.cos(angle), (float) Math.sin(angle));
  15. Tessellator.getInstance().getWorldRenderer().addVertex((float) Math.cos(angle),(float) Math.sin(angle),z);
  16. }
  17. Tessellator.getInstance().getWorldRenderer().finishDrawing();
  18. Tessellator.getInstance().draw();
  19. GlStateManager.popMatrix();
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement