Update tool ASM to 5.0.3

Add set(TileEntity) method to BlockCoord
Remove unused imports
This commit is contained in:
Chicken-Bomes committed 2014-11-07 01:04:43 +10:00
1 parent e570e12e13
commit 4a40b215d5
3 files changed
+13 -3

No files matched your search

+8 -2
View File
@@ -8,6 +8,8 @@ import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.tree.*;
import org.objectweb.asm.util.ASMifier;
import org.objectweb.asm.util.Textifier;
import org.objectweb.asm.util.TraceClassVisitor;
import java.io.File;
@@ -145,7 +147,7 @@ public class ASMHelper
replacement.accept(original);
}
public static void dump(Acceptor acceptor, File file, boolean filterImportant, boolean sortLocals) {
public static void dump(Acceptor acceptor, File file, boolean filterImportant, boolean sortLocals, boolean textify) {
try {
if(!file.getParentFile().exists())
file.getParentFile().mkdirs();
@@ -153,7 +155,7 @@ public class ASMHelper
file.createNewFile();
PrintWriter pout = new PrintWriter(file);
ClassVisitor cv = new TraceClassVisitor(pout);
ClassVisitor cv = new TraceClassVisitor(null, textify ? new Textifier() : new ASMifier(), pout);
if(filterImportant) cv = new ImportantInsnVisitor(cv);
if(sortLocals) cv = new LocalVariablesSorterVisitor(cv);
acceptor.accept(cv);
@@ -163,6 +165,10 @@ public class ASMHelper
}
}
public static void dump(Acceptor acceptor, File file, boolean filterImportant, boolean sortLocals) {
dump(acceptor, file, filterImportant, sortLocals, config.getTag("textify").getBooleanValue(true));
}
public static void dump(final byte[] bytes, File file, boolean filterImportant, boolean sortLocals) {
dump(new Acceptor()
{
+1 -1
View File
@@ -14,7 +14,7 @@ import java.util.List;
public class LibDownloader
{
private static String[] libs = new String[] {
"org/ow2/asm/asm-debug-all/4.1/asm-debug-all-4.1.jar",
"org/ow2/asm/asm-debug-all/5.0.3/asm-debug-all-5.0.3.jar",
"com/google/guava/guava/14.0/guava-14.0.jar",
"net/sf/jopt-simple/jopt-simple/4.5/jopt-simple-4.5.jar",
"org/apache/logging/log4j/log4j-core/2.0-beta9/log4j-core-2.0-beta9.jar",
+4
View File
@@ -219,6 +219,10 @@ public class BlockCoord implements Comparable<BlockCoord>, Copyable<BlockCoord>
return set(ia[0], ia[1], ia[2]);
}
public BlockCoord set(TileEntity tile) {
return set(tile.xCoord, tile.yCoord, tile.zCoord);
}
public int toSide()
{
if(!isAxial()) return -1;