iPeer

Untitled

Oct 28th, 2011
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 4.96 KB | None | 0 0
  1. public final void b()
  2.     {
  3.         File file1;
  4.         b.p.a("Grabbing large screenshot");
  5.         File file = new File(System.getProperty("user.home", "."));
  6.         for(int j1 = 0; (file1 = new File(file, (new StringBuilder()).append("mc_map_").append(i.format(j1)).append(".png").toString())).exists(); j1++);
  7.         file1 = file1.getAbsoluteFile();
  8.         b.p.b("Rendering");
  9.         b.p.a(0);
  10.         int i1 = (b.d.a << 4) + (b.d.b << 4);
  11.         int k1 = (b.d.c << 4) + i1 / 2;
  12.         BufferedImage bufferedimage;
  13.         Graphics g1 = (bufferedimage = new BufferedImage(i1, k1, 1)).getGraphics();
  14.         int l1 = b.b;
  15.         int i2 = b.c;
  16.         int j2 = (i1 / l1 + 1) * (k1 / i2 + 1);
  17.         int k2 = 0;
  18.         for(int l2 = 0; l2 < i1; l2 += l1)
  19.         {
  20.             for(int i3 = 0; i3 < k1; i3 += i2)
  21.             {
  22.                 k2++;
  23.                 b.p.a((k2 * 100) / j2);
  24.                 float f1 = 0.0F;
  25.                 float f3 = i3 - k1 / 2;
  26.                 float f2 = l2 - i1 / 2;
  27.                 Object obj = this;
  28.                 if(j == null)
  29.                     obj.j = BufferUtils.createByteBuffer(((e) (obj)).b.b * ((e) (obj)).b.c << 2);
  30.                 net.minecraft.client.g.a a1 = ((e) (obj)).b.f;
  31.                 g g2 = ((e) (obj)).b.d;
  32.                 net.minecraft.client.a.b b1 = ((e) (obj)).b.e;
  33.                 GL11.glViewport(0, 0, ((e) (obj)).b.b, ((e) (obj)).b.c);
  34.                 ((e) (obj)).f(0.0F);
  35.                 GL11.glClear(16640);
  36.                 GL11.glEnable(2884);
  37.                 obj.d = 512 >> (((e) (obj)).b.w.e << 1);
  38.                 GL11.glMatrixMode(5889);
  39.                 GL11.glLoadIdentity();
  40.                 GL11.glOrtho(0.0D, ((e) (obj)).b.b, 0.0D, ((e) (obj)).b.c, 10D, 10000D);
  41.                 GL11.glMatrixMode(5888);
  42.                 GL11.glLoadIdentity();
  43.                 GL11.glTranslatef(-f2, -f3, -5000F);
  44.                 GL11.glScalef(16F, -16F, -16F);
  45.                 f2 = 1.0F;
  46.                 f2 = 0.0F;
  47.                 f2 = 0.0F;
  48.                 f2 = 0.0F;
  49.                 f2 = 0.0F;
  50.                 f2 = 0.0F;
  51.                 f2 = 0.5F;
  52.                 f2 = 1.0F;
  53.                 f2 = 0.0F;
  54.                 f2 = -1F;
  55.                 f2 = 1.0F;
  56.                 f2 = 0.0F;
  57.                 f2 = 0.0F;
  58.                 f2 = 0.0F;
  59.                 f2 = -0.5F;
  60.                 f2 = 1.0F;
  61.                 Object obj1 = obj;
  62.                 ((e) (obj)).k.clear();
  63.                 ((e) (obj1)).k.put(1.0F).put(-0.5F).put(0.0F).put(0.0F);
  64.                 ((e) (obj1)).k.put(0.0F).put(1.0F).put(-1F).put(0.0F);
  65.                 ((e) (obj1)).k.put(1.0F).put(0.5F).put(0.0F).put(0.0F);
  66.                 ((e) (obj1)).k.put(0.0F).put(0.0F).put(0.0F).put(1.0F);
  67.                 ((e) (obj1)).k.flip();
  68.                 GL11.glMultMatrix(((e) (obj1)).k);
  69.                 GL11.glRotatef(0.0F, 0.0F, 1.0F, 0.0F);
  70.                 GL11.glTranslatef((float)(-g2.a) / 2.0F, (float)(-g2.c) / 2.0F, (float)(-g2.b) / 2.0F);
  71.                 obj1 = new d();
  72.                 ((e) (obj)).b.e.a(((net.minecraft.client.a.b.e) (obj1)));
  73.                 ((e) (obj)).b.e.a(a1);
  74.                 ((e) (obj)).d();
  75.                 GL11.glEnable(2912);
  76.                 GL11.glFogi(2917, 9729);
  77.                 f3 = (float)g2.c * 8F;
  78.                 GL11.glFogf(2915, 5000F - f3);
  79.                 GL11.glFogf(2916, 5000F + f3 * 8F);
  80.                 net.minecraft.client.c.b();
  81.                 b1.a(((e) (obj)).b(0.0F), ((net.minecraft.client.a.b.e) (obj1)), 0.0F);
  82.                 net.minecraft.client.c.a();
  83.                 GL11.glBindTexture(3553, ((e) (obj)).b.m.a("/terrain.png"));
  84.                 b1.a(a1, 0);
  85.                 b1.f();
  86.                 if(g2.u < g2.c)
  87.                     b1.a(0.0F);
  88.                 GL11.glEnable(3042);
  89.                 GL11.glBlendFunc(770, 771);
  90.                 GL11.glColorMask(false, false, false, false);
  91.                 obj1 = b1.a(a1, 1);
  92.                 GL11.glColorMask(true, true, true, true);
  93.                 if(obj1 > 0)
  94.                     b1.();
  95.                 if(g2.g() >= 0)
  96.                     b1.g();
  97.                 GL11.glDepthMask(true);
  98.                 GL11.glDisable(3042);
  99.                 GL11.glDisable(2912);
  100.                 ((e) (obj)).j.clear();
  101.                 GL11.glPixelStorei(3333, 1);
  102.                 GL11.glReadPixels(0, 0, ((e) (obj)).b.b, ((e) (obj)).b.c, 6407, 5121, ((e) (obj)).j);
  103.                 obj = a(((e) (obj)).j, l1, i2);
  104.                 g1.drawImage(((java.awt.Image) (obj)), l2, i3, null);
  105.             }
  106.  
  107.         }
  108.  
  109.         g1.dispose();
  110.         b.p.b((new StringBuilder()).append("Saving as ").append(file1.toString()).toString());
  111.         b.p.a(100);
  112.         FileOutputStream fileoutputstream = new FileOutputStream(file1);
  113.         ImageIO.write(bufferedimage, "png", fileoutputstream);
  114.         fileoutputstream.close();
  115.         return;
  116.         JVM INSTR dup ;
  117.         Throwable throwable;
  118.         throwable;
  119.         printStackTrace();
  120.     }
Advertisement
Add Comment
Please, Sign In to add comment