Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void drawPlayerESP(double d, double d1, double d2){
- GL11.glBlendFunc(770, 771);
- GL11.glColor3f(255, 255, 255);
- GL11.glLineWidth(1.0f);
- GL11.glDisable(3553 /*GL_TEXTURE_2D*/);
- GL11.glDisable(2929 /*GL_DEPTH_TEST*/);
- GL11.glDepthMask(false);
- drawOutlinedBoundingBox(new AxisAlignedBB(d - 0.5, d1 + 0.1, d2 - 0.5, d + 0.5, d1 + 2.0, d2 + 0.5));
- GL11.glDepthMask(true);
- GL11.glEnable(3553 /*GL_TEXTURE_2D*/);
- GL11.glEnable(2929 /*GL_DEPTH_TEST*/);
- }
- public void Tracer() {
- GL11.glBlendFunc(770, 771);
- GL11.glLineWidth(2.0f);
- GL11.glDisable(2929);
- GL11.glDisable(3553 /*GL_TEXTURE_2D*/);
- GL11.glDepthMask(false);
- double size = 0.45;
- double ytSize = 0.35;
- GL11.glBegin(GL11.GL_LINES);
- for(int x = 0; x < mc.theWorld.playerEntities.size(); x ++) {
- Entity entity = (Entity) mc.theWorld.playerEntities.get(x);
- if(getDistanceSqToEntity(entity) < 80D){ //if player is closer then 8.0m
- GL11.glColor3f(255, 0, 0); //draw red tracer line
- } else {
- GL11.glColor3f(0, 255, 255); //draw aqua tracer line
- }
- double X = entity.posX;
- double Y = entity.posY;
- double Z = entity.posZ;
- double mX = mc.thePlayer.posX;
- double mY = mc.thePlayer.posY;
- double mZ = mc.thePlayer.posZ;
- double dX = (mX - X);
- double dY = (mY - Y);
- double dZ = (mZ - Z);
- if(X != mX && Y != mY && Z != mZ) {
- GL11.glVertex3d(0, 0, 0);
- GL11.glVertex3d((-dX + size) - 0.5, (ytSize - dY) + 1.0, (-dZ - size) + 0.5);
- }
- }
- GL11.glEnd();
- GL11.glDepthMask(true);
- GL11.glEnable(2929);
- GL11.glEnable(3553 /*GL_TEXTURE_2D*/);
- }
- public double getDistanceSqToEntity(Entity par1Entity)
- {
- double d = mc.thePlayer.posX - par1Entity.posX;
- double d1 = mc.thePlayer.posY - par1Entity.posY;
- double d2 = mc.thePlayer.posZ - par1Entity.posZ;
- return d * d + d1 * d1 + d2 * d2;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement