Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public final void b()
- {
- File file1;
- b.p.a("Grabbing large screenshot");
- File file = new File(System.getProperty("user.home", "."));
- for(int j1 = 0; (file1 = new File(file, (new StringBuilder()).append("mc_map_").append(i.format(j1)).append(".png").toString())).exists(); j1++);
- file1 = file1.getAbsoluteFile();
- b.p.b("Rendering");
- b.p.a(0);
- int i1 = (b.d.a << 4) + (b.d.b << 4);
- int k1 = (b.d.c << 4) + i1 / 2;
- BufferedImage bufferedimage;
- Graphics g1 = (bufferedimage = new BufferedImage(i1, k1, 1)).getGraphics();
- int l1 = b.b;
- int i2 = b.c;
- int j2 = (i1 / l1 + 1) * (k1 / i2 + 1);
- int k2 = 0;
- for(int l2 = 0; l2 < i1; l2 += l1)
- {
- for(int i3 = 0; i3 < k1; i3 += i2)
- {
- k2++;
- b.p.a((k2 * 100) / j2);
- float f1 = 0.0F;
- float f3 = i3 - k1 / 2;
- float f2 = l2 - i1 / 2;
- Object obj = this;
- if(j == null)
- obj.j = BufferUtils.createByteBuffer(((e) (obj)).b.b * ((e) (obj)).b.c << 2);
- net.minecraft.client.g.a a1 = ((e) (obj)).b.f;
- g g2 = ((e) (obj)).b.d;
- net.minecraft.client.a.b b1 = ((e) (obj)).b.e;
- GL11.glViewport(0, 0, ((e) (obj)).b.b, ((e) (obj)).b.c);
- ((e) (obj)).f(0.0F);
- GL11.glClear(16640);
- GL11.glEnable(2884);
- obj.d = 512 >> (((e) (obj)).b.w.e << 1);
- GL11.glMatrixMode(5889);
- GL11.glLoadIdentity();
- GL11.glOrtho(0.0D, ((e) (obj)).b.b, 0.0D, ((e) (obj)).b.c, 10D, 10000D);
- GL11.glMatrixMode(5888);
- GL11.glLoadIdentity();
- GL11.glTranslatef(-f2, -f3, -5000F);
- GL11.glScalef(16F, -16F, -16F);
- f2 = 1.0F;
- f2 = 0.0F;
- f2 = 0.0F;
- f2 = 0.0F;
- f2 = 0.0F;
- f2 = 0.0F;
- f2 = 0.5F;
- f2 = 1.0F;
- f2 = 0.0F;
- f2 = -1F;
- f2 = 1.0F;
- f2 = 0.0F;
- f2 = 0.0F;
- f2 = 0.0F;
- f2 = -0.5F;
- f2 = 1.0F;
- Object obj1 = obj;
- ((e) (obj)).k.clear();
- ((e) (obj1)).k.put(1.0F).put(-0.5F).put(0.0F).put(0.0F);
- ((e) (obj1)).k.put(0.0F).put(1.0F).put(-1F).put(0.0F);
- ((e) (obj1)).k.put(1.0F).put(0.5F).put(0.0F).put(0.0F);
- ((e) (obj1)).k.put(0.0F).put(0.0F).put(0.0F).put(1.0F);
- ((e) (obj1)).k.flip();
- GL11.glMultMatrix(((e) (obj1)).k);
- GL11.glRotatef(0.0F, 0.0F, 1.0F, 0.0F);
- GL11.glTranslatef((float)(-g2.a) / 2.0F, (float)(-g2.c) / 2.0F, (float)(-g2.b) / 2.0F);
- obj1 = new d();
- ((e) (obj)).b.e.a(((net.minecraft.client.a.b.e) (obj1)));
- ((e) (obj)).b.e.a(a1);
- ((e) (obj)).d();
- GL11.glEnable(2912);
- GL11.glFogi(2917, 9729);
- f3 = (float)g2.c * 8F;
- GL11.glFogf(2915, 5000F - f3);
- GL11.glFogf(2916, 5000F + f3 * 8F);
- net.minecraft.client.c.b();
- b1.a(((e) (obj)).b(0.0F), ((net.minecraft.client.a.b.e) (obj1)), 0.0F);
- net.minecraft.client.c.a();
- GL11.glBindTexture(3553, ((e) (obj)).b.m.a("/terrain.png"));
- b1.a(a1, 0);
- b1.f();
- if(g2.u < g2.c)
- b1.a(0.0F);
- GL11.glEnable(3042);
- GL11.glBlendFunc(770, 771);
- GL11.glColorMask(false, false, false, false);
- obj1 = b1.a(a1, 1);
- GL11.glColorMask(true, true, true, true);
- if(obj1 > 0)
- b1.();
- if(g2.g() >= 0)
- b1.g();
- GL11.glDepthMask(true);
- GL11.glDisable(3042);
- GL11.glDisable(2912);
- ((e) (obj)).j.clear();
- GL11.glPixelStorei(3333, 1);
- GL11.glReadPixels(0, 0, ((e) (obj)).b.b, ((e) (obj)).b.c, 6407, 5121, ((e) (obj)).j);
- obj = a(((e) (obj)).j, l1, i2);
- g1.drawImage(((java.awt.Image) (obj)), l2, i3, null);
- }
- }
- g1.dispose();
- b.p.b((new StringBuilder()).append("Saving as ").append(file1.toString()).toString());
- b.p.a(100);
- FileOutputStream fileoutputstream = new FileOutputStream(file1);
- ImageIO.write(bufferedimage, "png", fileoutputstream);
- fileoutputstream.close();
- return;
- JVM INSTR dup ;
- Throwable throwable;
- throwable;
- printStackTrace();
- }
Advertisement
Add Comment
Please, Sign In to add comment