Advertisement
gegy1000

script

May 24th, 2015
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. int xPosition = script.getX() + 60;
  2. int yPosition = script.getY() + 60;
  3.  
  4. int size = 0;
  5. double x = 0;
  6. double y = 0;
  7. int xPosStart = xPosition - 32;
  8. int yPosStart = yPosition - 32;
  9. int xPosEnd = xPosStart + 32;
  10. int yPosEnd = yPosStart + 32;
  11. Tessellator tessellator = Tessellator.instance;
  12.  
  13. mc.getTextureManager().bindTexture(defaultScriptTexture);
  14.  
  15. GL11.glPushMatrix();
  16. GL11.glEnable(GL11.GL_BLEND);
  17. GL11.glDisable(GL11.GL_DEPTH_TEST);
  18. GL11.glDepthMask(false);
  19. GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
  20. GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  21. GL11.glDisable(GL11.GL_ALPHA_TEST);
  22. tessellator.startDrawingQuads();
  23. tessellator.addVertexWithUV(-size + x + xPosStart, (double)yPosEnd + y + size / 2, -90.0D, 0.0D, 1.0D);
  24. tessellator.addVertexWithUV((double)xPosEnd + size + x, (double)yPosEnd + y + size / 2, -90.0D, 1.0D, 1.0D);
  25. tessellator.addVertexWithUV((double)xPosEnd + size + x / 2, -size + y + yPosStart + size / 2, -90.0D, 1.0D, 0.0D);
  26. tessellator.addVertexWithUV(-size + x + xPosStart / 2, -size + y + yPosStart + size / 2, -90.0D, 0.0D, 0.0D);
  27. tessellator.draw();
  28. GL11.glDepthMask(true);
  29. GL11.glEnable(GL11.GL_DEPTH_TEST);
  30. GL11.glEnable(GL11.GL_ALPHA_TEST);
  31. GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  32. GL11.glPopMatrix();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement