1

What the different class files do.

memitu_infinity's Avatar memitu_infinity11/13/14 2:37 pm
11/14/2014 5:42 am
Jacob Rigoberto's Avatar Jacob Rigoberto
This post is to tell people(who want to know) what the class files in a minecraft jar do. Im doing a 1.8 client. If you would like to see what different classes from different clients do, just ask me.

Starting off, "a.class".

What it does is it allows you to write things.
Heres the code:
Click to reveal
import com.google.common.collect.Lists; import com.google.common.collect.Maps; import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; public final class a extends enum { public static a[] values() { return (a[])D.clone(); } public static a valueOf(string s1) { return (a)enum.valueOf(a, s1); } private static string c(string s1) { return s1.toLowerCase().replaceAll("[^a-z]", ""); } private a(string s1, int i1, string s2, char c1, int j1) { this(s1, i1, s2, c1, false, j1); } private a(string s1, int i1, string s2, char c1, boolean flag) { this(s1, i1, s2, c1, flag, -1); } private a(string s1, int i1, string s2, char c1, boolean flag, int j1) { super(s1, i1); y = s2; z = c1; A = flag; C = j1; B = (new StringBuilder()).append("\247").append(c1).toString(); } public int b() { return C; } public boolean c() { return A; } public boolean d() { return !A && this != v; } public string e() { return name().toLowerCase(); } public string toString() { return B; } public static string a(string s1) { return s1 != null ? x.matcher(s1).replaceAll("") : null; } public static a b(string s1) { if(s1 == null) return null; else return (a)w.get(c(s1)); } public static a a(int i1) { if(i1 < 0) return v; a aa[] = values(); int j1 = aa.length; for(int k1 = 0; k1 < j1; k1++) { a a1 = aa[k1]; if(a1.b() == i1) return a1; } return null; } public static collection a(boolean flag, boolean flag1) { arraylist arraylist = Lists.newArrayList(); a aa[] = values(); int i1 = aa.length; for(int j1 = 0; j1 < i1; j1++) { a a1 = aa[j1]; if((!a1.d() || flag) && (!a1.c() || flag1)) arraylist.add(a1.e()); } return arraylist; } public static final a a; public static final a b; public static final a c; public static final a d; public static final a e; public static final a f; public static final a g; public static final a h; public static final a i; public static final a j; public static final a k; public static final a l; public static final a m; public static final a n; public static final a o; public static final a p; public static final a q; public static final a r; public static final a s; public static final a t; public static final a u; public static final a v; private static final map w; private static final Pattern x = Pattern.compile((new StringBuilder()).append("(?i)").append(string.valueOf('\247')).append("[0-9A-FK-OR]").toString()); private final string y; private final char z; private final boolean A; private final string B; private final int C; private static final a D[]; static { a = new a("BLACK", 0, "BLACK", '0', 0); b = new a("DARK_BLUE", 1, "DARK_BLUE", '1', 1); c = new a("DARK_GREEN", 2, "DARK_GREEN", '2', 2); d = new a("DARK_AQUA", 3, "DARK_AQUA", '3', 3); e = new a("DARK_RED", 4, "DARK_RED", '4', 4); f = new a("DARK_PURPLE", 5, "DARK_PURPLE", '5', 5); g = new a("GOLD", 6, "GOLD", '6', 6); h = new a("GRAY", 7, "GRAY", '7', 7); i = new a("DARK_GRAY", 8, "DARK_GRAY", '8', 8); j = new a("BLUE", 9, "BLUE", '9', 9); k = new a("GREEN", 10, "GREEN", 'a', 10); l = new a("AQUA", 11, "AQUA", 'b', 11); m = new a("RED", 12, "RED", 'c', 12); n = new a("LIGHT_PURPLE", 13, "LIGHT_PURPLE", 'd', 13); o = new a("YELLOW", 14, "YELLOW", 'e', 14); p = new a("WHITE", 15, "WHITE", 'f', 15); q = new a("OBFUSCATED", 16, "OBFUSCATED", 'k', true); r = new a("BOLD", 17, "BOLD", 'l', true); s = new a("STRIKETHROUGH", 18, "STRIKETHROUGH", 'm', true); t = new a("UNDERLINE", 19, "UNDERLINE", 'n', true); u = new a("ITALIC", 20, "ITALIC", 'o', true); v = new a("RESET", 21, "RESET", 'r', -1); D = (new a[] { a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v }); w = Maps.newHashMap(); a aa[] = values(); int i1 = aa.length; for(int j1 = 0; j1 < i1; j1++) { a a1 = aa[j1]; w.put(c(a1.y), a1); } } }
Posted by memitu_infinity's Avatar
memitu_infinity
Level 11 : Journeyman Engineer
3

Create an account or sign in to comment.

10

1
11/14/2014 5:42 am
Level 43 : Master Pokemon
Jacob Rigoberto
Jacob Rigoberto's Avatar
How do you decrypt the .class files anyway?
1
11/13/2014 5:26 pm
Level 7 : Apprentice Toast
redacted1234567
redacted1234567's Avatar
Why are you deobfuscating minecraft. MCP and the new gradle is for that, or is it just for fun?
1
11/13/2014 3:07 pm
Level 52 : Grandmaster Programmer
kristinnvikar
kristinnvikar's Avatar
it is the crash report class
1
11/13/2014 3:03 pm
Level 14 : Journeyman Modder
searchndstroy
searchndstroy's Avatar
memitu_infinity"b.class" allows you to "Print" the text you write with "a.class".
Click to reveal
import com.google.common.collect.Lists; import java.io.*; import java.text.SimpleDateFormat; import java.util.*; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.ArrayUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; public class b { public b(string s, throwable throwable) { g = true; h = new StackTraceElement[0]; b = s; c = throwable; h(); } private void h() { d.a("Minecraft Version", new c(this)); d.a("Operating System", new d(this)); d.a("Java Version", new e(this)); d.a("Java VM Version", new f(this)); d.a("Memory", new g(this)); d.a("JVM Flags", new h(this)); d.a("IntCache", new i(this)); } public string a() { return b; } public throwable b() { return c; } public void a(StringBuilder stringbuilder) { if((h == null || h.length <= 0) && e.size() > 0) h = (StackTraceElement[])ArrayUtils.subarray(((j)e.get(0)).a(), 0, 1); if(h != null && h.length > 0) { stringbuilder.append("-- Head --\n"); stringbuilder.append("Stacktrace:\n"); StackTraceElement astacktraceelement[] = h; int k = astacktraceelement.length; for(int l = 0; l < k; l++) { StackTraceElement stacktraceelement = astacktraceelement[l]; stringbuilder.append("\t").append("at ").append(stacktraceelement.toString()); stringbuilder.append("\n"); } stringbuilder.append("\n"); } for(iterator iterator = e.iterator(); iterator.hasNext(); stringbuilder.append("\n\n")) { j j1 = (j)iterator.next(); j1.a(stringbuilder); } d.a(stringbuilder); } public string d() { stringwriter stringwriter; printwriter printwriter; object obj; stringwriter = null; printwriter = null; obj = c; if(((throwable) (obj)).getMessage() == null) { if(obj instanceof nullpointerexception) obj = new nullpointerexception(b); else if(obj instanceof stackoverflowerror) obj = new stackoverflowerror(b); else if(obj instanceof outofmemoryerror) obj = new outofmemoryerror(b); ((throwable) (obj)).setStackTrace(c.getStackTrace()); } string s = ((throwable) (obj)).toString(); string s1; stringwriter = new stringwriter(); printwriter = new printwriter(stringwriter); ((throwable) (obj)).printStackTrace(printwriter); s1 = stringwriter.toString(); IOUtils.closeQuietly(stringwriter); IOUtils.closeQuietly(printwriter); break MISSING_BLOCK_LABEL_148; exception exception; exception; IOUtils.closeQuietly(stringwriter); IOUtils.closeQuietly(printwriter); throw exception; return s1; } public string e() { StringBuilder stringbuilder = new StringBuilder(); stringbuilder.append("---- Minecraft Crash Report ----\n"); stringbuilder.append("// "); stringbuilder.append(i()); stringbuilder.append("\n\n"); stringbuilder.append("Time: "); stringbuilder.append((new simpledateformat()).format(new date())); stringbuilder.append("\n"); stringbuilder.append("Description: "); stringbuilder.append(b); stringbuilder.append("\n\n"); stringbuilder.append(d()); stringbuilder.append("\n\nA detailed walkthrough of the error, its code path and all known details is as follows:\n"); for(int k = 0; k < 87; k++) stringbuilder.append("-"); stringbuilder.append("\n\n"); a(stringbuilder); return stringbuilder.toString(); } public file f() { return f; } public boolean a(file file) { if(f != null) return false; if(file.getParentFile() != null) file.getParentFile().mkdirs(); filewriter filewriter = new filewriter(file); filewriter.write(e()); filewriter.close(); f = file; return true; throwable throwable; throwable; a.error((new StringBuilder()).append("Could not save crash report to ").append(file).toString(), throwable); return false; } public j g() { return d; } public j a(string s) { return a(s, 1); } public j a(string s, int k) { j j1 = new j(this, s); if(g) { int l = j1.a(k); StackTraceElement astacktraceelement[] = c.getStackTrace(); StackTraceElement stacktraceelement = null; StackTraceElement stacktraceelement1 = null; int i1 = astacktraceelement.length - l; if(i1 < 0) system.out.println((new StringBuilder()).append("Negative index in crash report handler (").append(astacktraceelement.length).append("/").append(l).append(")").toString()); if(astacktraceelement != null && 0 <= i1 && i1 < astacktraceelement.length) { stacktraceelement = astacktraceelement[i1]; if((astacktraceelement.length + 1) - l < astacktraceelement.length) stacktraceelement1 = astacktraceelement[(astacktraceelement.length + 1) - l]; } g = j1.a(stacktraceelement, stacktraceelement1); if(l > 0 && !e.isEmpty()) { j j2 = (j)e.get(e.size() - 1); j2.b(l); } else if(astacktraceelement != null && astacktraceelement.length >= l && 0 <= i1 && i1 < astacktraceelement.length) { h = new StackTraceElement[i1]; system.arraycopy(astacktraceelement, 0, h, 0, h.length); } else { g = false; } } e.add(j1); return j1; } private static string i() { string as[] = { "Who set us up the TNT?", "Everything's going to plan. No, really, that was supposed to happen.", "Uh... Did I do that?", "Oops.", "Why did you do that?", "I feel sad now :(", "My bad.", "I'm sorry, Dave.", "I let you down. Sorry :(", "On the bright side, I bought you a teddy bear!", "Daisy, daisy...", "Oh - I know what I did wrong!", "Hey, that tickles! Hehehe!", "I blame Dinnerbone.", "You should try our sister game, Minceraft!", "Don't be sad. I'll do better next time, I promise!", "Don't be sad, have a hug! <3", "I just don't know what went wrong :(", "Shall we play a game?", "Quite honestly, I wouldn't worry myself about that.", "I bet Cylons wouldn't have this problem.", "Sorry :(", "Surprise! Haha. Well, this is awkward.", "Would you like a cupcake?", "Hi. I'm Minecraft, and I'm a crashaholic.", "Ooh. Shiny.", "This doesn't make any sense!", "Why is it breaking :(", "Don't do that.", "Ouch. That hurt :(", "You're mean.", "This is a token for 1 free hug. Redeem at your nearest Mojangsta: [~~HUG~~]", "There are four lights!", "But it works on my machine." }; return as[(int)(system.nanoTime() % (long)as.length)]; throwable throwable; throwable; return "Witty comment unavailable :("; } public static b a(throwable throwable, string s) { b b1; if(throwable instanceof u) b1 = ((u)throwable).a(); else b1 = new b(s, throwable); return b1; } private static final Logger a = LogManager.getLogger(); private final string b; private final throwable c; private final j d = new j(this, "System Details"); private final list e = Lists.newArrayList(); private file f; private boolean g; private StackTraceElement h[]; }


This looks like the crash report class.
1
11/13/2014 2:59 pm
Level 11 : Journeyman Engineer
memitu_infinity
memitu_infinity's Avatar
"b.class" allows you to "Print" the text you write with "a.class".
Click to reveal
import com.google.common.collect.Lists; import java.io.*; import java.text.SimpleDateFormat; import java.util.*; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.ArrayUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; public class b { public b(string s, throwable throwable) { g = true; h = new StackTraceElement[0]; b = s; c = throwable; h(); } private void h() { d.a("Minecraft Version", new c(this)); d.a("Operating System", new d(this)); d.a("Java Version", new e(this)); d.a("Java VM Version", new f(this)); d.a("Memory", new g(this)); d.a("JVM Flags", new h(this)); d.a("IntCache", new i(this)); } public string a() { return b; } public throwable b() { return c; } public void a(StringBuilder stringbuilder) { if((h == null || h.length <= 0) && e.size() > 0) h = (StackTraceElement[])ArrayUtils.subarray(((j)e.get(0)).a(), 0, 1); if(h != null && h.length > 0) { stringbuilder.append("-- Head --\n"); stringbuilder.append("Stacktrace:\n"); StackTraceElement astacktraceelement[] = h; int k = astacktraceelement.length; for(int l = 0; l < k; l++) { StackTraceElement stacktraceelement = astacktraceelement[l]; stringbuilder.append("\t").append("at ").append(stacktraceelement.toString()); stringbuilder.append("\n"); } stringbuilder.append("\n"); } for(iterator iterator = e.iterator(); iterator.hasNext(); stringbuilder.append("\n\n")) { j j1 = (j)iterator.next(); j1.a(stringbuilder); } d.a(stringbuilder); } public string d() { stringwriter stringwriter; printwriter printwriter; object obj; stringwriter = null; printwriter = null; obj = c; if(((throwable) (obj)).getMessage() == null) { if(obj instanceof nullpointerexception) obj = new nullpointerexception(b); else if(obj instanceof stackoverflowerror) obj = new stackoverflowerror(b); else if(obj instanceof outofmemoryerror) obj = new outofmemoryerror(b); ((throwable) (obj)).setStackTrace(c.getStackTrace()); } string s = ((throwable) (obj)).toString(); string s1; stringwriter = new stringwriter(); printwriter = new printwriter(stringwriter); ((throwable) (obj)).printStackTrace(printwriter); s1 = stringwriter.toString(); IOUtils.closeQuietly(stringwriter); IOUtils.closeQuietly(printwriter); break MISSING_BLOCK_LABEL_148; exception exception; exception; IOUtils.closeQuietly(stringwriter); IOUtils.closeQuietly(printwriter); throw exception; return s1; } public string e() { StringBuilder stringbuilder = new StringBuilder(); stringbuilder.append("---- Minecraft Crash Report ----\n"); stringbuilder.append("// "); stringbuilder.append(i()); stringbuilder.append("\n\n"); stringbuilder.append("Time: "); stringbuilder.append((new simpledateformat()).format(new date())); stringbuilder.append("\n"); stringbuilder.append("Description: "); stringbuilder.append(b); stringbuilder.append("\n\n"); stringbuilder.append(d()); stringbuilder.append("\n\nA detailed walkthrough of the error, its code path and all known details is as follows:\n"); for(int k = 0; k < 87; k++) stringbuilder.append("-"); stringbuilder.append("\n\n"); a(stringbuilder); return stringbuilder.toString(); } public file f() { return f; } public boolean a(file file) { if(f != null) return false; if(file.getParentFile() != null) file.getParentFile().mkdirs(); filewriter filewriter = new filewriter(file); filewriter.write(e()); filewriter.close(); f = file; return true; throwable throwable; throwable; a.error((new StringBuilder()).append("Could not save crash report to ").append(file).toString(), throwable); return false; } public j g() { return d; } public j a(string s) { return a(s, 1); } public j a(string s, int k) { j j1 = new j(this, s); if(g) { int l = j1.a(k); StackTraceElement astacktraceelement[] = c.getStackTrace(); StackTraceElement stacktraceelement = null; StackTraceElement stacktraceelement1 = null; int i1 = astacktraceelement.length - l; if(i1 < 0) system.out.println((new StringBuilder()).append("Negative index in crash report handler (").append(astacktraceelement.length).append("/").append(l).append(")").toString()); if(astacktraceelement != null && 0 <= i1 && i1 < astacktraceelement.length) { stacktraceelement = astacktraceelement[i1]; if((astacktraceelement.length + 1) - l < astacktraceelement.length) stacktraceelement1 = astacktraceelement[(astacktraceelement.length + 1) - l]; } g = j1.a(stacktraceelement, stacktraceelement1); if(l > 0 && !e.isEmpty()) { j j2 = (j)e.get(e.size() - 1); j2.b(l); } else if(astacktraceelement != null && astacktraceelement.length >= l && 0 <= i1 && i1 < astacktraceelement.length) { h = new StackTraceElement[i1]; system.arraycopy(astacktraceelement, 0, h, 0, h.length); } else { g = false; } } e.add(j1); return j1; } private static string i() { string as[] = { "Who set us up the TNT?", "Everything's going to plan. No, really, that was supposed to happen.", "Uh... Did I do that?", "Oops.", "Why did you do that?", "I feel sad now :(", "My bad.", "I'm sorry, Dave.", "I let you down. Sorry :(", "On the bright side, I bought you a teddy bear!", "Daisy, daisy...", "Oh - I know what I did wrong!", "Hey, that tickles! Hehehe!", "I blame Dinnerbone.", "You should try our sister game, Minceraft!", "Don't be sad. I'll do better next time, I promise!", "Don't be sad, have a hug! <3", "I just don't know what went wrong :(", "Shall we play a game?", "Quite honestly, I wouldn't worry myself about that.", "I bet Cylons wouldn't have this problem.", "Sorry :(", "Surprise! Haha. Well, this is awkward.", "Would you like a cupcake?", "Hi. I'm Minecraft, and I'm a crashaholic.", "Ooh. Shiny.", "This doesn't make any sense!", "Why is it breaking :(", "Don't do that.", "Ouch. That hurt :(", "You're mean.", "This is a token for 1 free hug. Redeem at your nearest Mojangsta: [~~HUG~~]", "There are four lights!", "But it works on my machine." }; return as[(int)(system.nanoTime() % (long)as.length)]; throwable throwable; throwable; return "Witty comment unavailable :("; } public static b a(throwable throwable, string s) { b b1; if(throwable instanceof u) b1 = ((u)throwable).a(); else b1 = new b(s, throwable); return b1; } private static final Logger a = LogManager.getLogger(); private final string b; private final throwable c; private final j d = new j(this, "System Details"); private final list e = Lists.newArrayList(); private file f; private boolean g; private StackTraceElement h[]; }
1
11/13/2014 2:56 pm
Level 11 : Journeyman Engineer
memitu_infinity
memitu_infinity's Avatar
and yes. i know that. but none of them tell you what ALL the class files do, AND give you the code.
1
11/13/2014 2:56 pm
Level 11 : Journeyman Engineer
memitu_infinity
memitu_infinity's Avatar
ok, fine. none of these are really that important. thier just variables for "a.class"
i'll write them for you in order.
Click to reveal
public class aab extends zb { public aab(xu xu1) { a = xu1; } public boolean a() { return a.o.w(); } public void c() { ((aay)a.s()).e(true); } public void d() { ((aay)a.s()).e(false); } private xu a; }

This one, "aac.class", does the "Random" symbol you can use.
Click to reveal
import java.util.Random; public class aac extends zb { public aac(abt abt1, double d1) { a = abt1; b = d1; a(1); } public boolean a() { if(a.cm() || a.l == null) return false; brw brw1 = abf.a(a, 5, 4); if(brw1 == null) { return false; } else { c = brw1.a; d = brw1.b; e = brw1.c; return true; } } public void c() { a.s().a(c, d, e, b); } public boolean b() { return !a.s().m() && a.l != null; } public void e() { if(a.bb().nextInt(50) == 0) { if(a.l instanceof ahd) { int i = a.cA(); int j = a.cG(); if(j > 0 && a.bb().nextInt(j) < i) { a.h((ahd)a.l); a.o.a(a, (byte)7); return; } a.u(5); } a.l.a(null); a.l = null; a.cU(); a.o.a(a, (byte)6); } } private abt a; private double b; private double c; private double d; private double e; }

Click to reveal
public class aad extends zb { public aad(xx xx1) { a = xx1; a(5); } public boolean a() { if(!a.cj()) return false; if(a.V()) return false; if(!a.C) return false; xm xm1 = a.cm(); if(xm1 == null) return true; if(a.h(xm1) < 144D && xm1.bc() != null) return false; else return b; } public void c() { a.s().n(); a.n(true); } public void d() { a.n(false); } public void a(boolean flag) { b = flag; } private xx a; private boolean b; }

Click to reveal
public class aae extends zb { public aae(aep aep1) { a = aep1; a(1); } public boolean a() { xm xm = a.u(); return a.ck() > 0 || xm != null && a.h(xm) < 9D; } public void c() { a.s().n(); b = a.u(); } public void d() { b = null; } public void e() { if(b == null) { a.a(-1); return; } if(a.h(b) > 49D) { a.a(-1); return; } if(!a.t().a(b)) { a.a(-1); return; } else { a.a(1); return; } } aep a; xm b; }

This one, "aaf.class", allows you to have an empty text.
Click to reveal
import java.util.*; public class aaf extends zb { public aaf(agp agp1) { a = agp1; a(3); } public boolean a() { if(a.l() >= 0) return false; if(!a.o.w()) return false; list list = a.o.a(acq, a.aQ().b(6D, 2D, 6D)); if(list.isEmpty()) return false; iterator iterator = list.iterator(); do { if(!iterator.hasNext()) break; acq acq1 = (acq)iterator.next(); if(acq1.ck() <= 0) continue; b = acq1; break; } while(true); return b != null; } public boolean b() { return b.ck() > 0; } public void c() { c = a.bb().nextInt(320); d = false; b.s().n(); } public void d() { b = null; a.s().n(); } public void e() { a.p().a(b, 30F, 30F); if(b.ck() == c) { a.s().a(b, 0.5D); d = true; } if(d && a.h(b) < 4D) { b.a(false); a.s().n(); } } private agp a; private acq b; private int c; private boolean d; }



Ok. im getting tired of this. just let me know if you want it.
1
11/13/2014 2:47 pm
Level 35 : Artisan Birb
Karrfis
Karrfis's Avatar
1
11/13/2014 2:47 pm
Level 11 : Journeyman Engineer
memitu_infinity
memitu_infinity's Avatar
"aaa.class" is also not of much importance but...
Click to reveal
public class aaa extends zb { public aaa(xu xu1) { a = xu1; if(!(xu1.s() instanceof aay)) throw new illegalargumentexception("Unsupported mob type for RestrictOpenDoorGoal"); else return; } public boolean a() { if(a.o.w()) return false; dt dt1 = new dt(a); abi abi1 = a.o.ae().a(dt1, 16); if(abi1 == null) return false; b = abi1.b(dt1); if(b == null) return false; else return (double)b.b(dt1) < 2.25D; } public boolean b() { if(a.o.w()) return false; else return !b.i() && b.c(new dt(a)); } public void c() { ((aay)a.s()).b(false); ((aay)a.s()).c(false); } public void d() { ((aay)a.s()).b(true); ((aay)a.s()).c(true); b = null; } public void e() { b.b(); } private xu a; private abh b; }
1
11/13/2014 2:40 pm
Level 11 : Journeyman Engineer
memitu_infinity
memitu_infinity's Avatar
"aa.class" is a very small class, and isn't really of much importance.
BUT... if you really want the code...
Click to reveal
public class aa { protected aa(double d, double d1, boolean flag) { a = d; b = d1; c = flag; } public double a() { return a; } public double b() { return b; } public boolean c() { return c; } private final double a; private final double b; private final boolean c; }
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome