Told Proguard not to touch things it doesn't understand
This commit is contained in:
5
scripts/proguard.pro
vendored
5
scripts/proguard.pro
vendored
@@ -17,6 +17,11 @@
|
|||||||
|
|
||||||
-keep class baritone.api.** { *; } # this is the keep api
|
-keep class baritone.api.** { *; } # this is the keep api
|
||||||
|
|
||||||
|
# Proguard does not know the commands framework better than I do
|
||||||
|
# It needs its empty constructors and simple names to work correctly
|
||||||
|
-keep class baritone.api.utils.command.** { *; }
|
||||||
|
-keepclasseswithmembernames class baritone.api.utils.command.** { *; }
|
||||||
|
|
||||||
# service provider needs these class names
|
# service provider needs these class names
|
||||||
-keep class baritone.BaritoneProvider
|
-keep class baritone.BaritoneProvider
|
||||||
-keep class baritone.api.IBaritoneProvider
|
-keep class baritone.api.IBaritoneProvider
|
||||||
|
@@ -63,6 +63,7 @@ public class CommandUnhandledException extends CommandErrorMessageException {
|
|||||||
|
|
||||||
// line = line.replaceFirst("\\(([^)]+)\\)$", "\n\t . $1");
|
// line = line.replaceFirst("\\(([^)]+)\\)$", "\n\t . $1");
|
||||||
line = line.replaceFirst("\\([^:]+:(\\d+)\\)$", ":$1");
|
line = line.replaceFirst("\\([^:]+:(\\d+)\\)$", ":$1");
|
||||||
|
line = line.replaceFirst("\\(Unknown Source\\)$", "");
|
||||||
lines.set(i, line);
|
lines.set(i, line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -214,9 +214,9 @@ public class ArgConsumer {
|
|||||||
public <T extends IDatatype> T getDatatype(Class<T> datatype) {
|
public <T extends IDatatype> T getDatatype(Class<T> datatype) {
|
||||||
try {
|
try {
|
||||||
return datatype.getConstructor(ArgConsumer.class).newInstance(this);
|
return datatype.getConstructor(ArgConsumer.class).newInstance(this);
|
||||||
} catch (RuntimeException e) {
|
} catch (InvocationTargetException e) {
|
||||||
throw new CommandInvalidTypeException(has() ? peek() : consumed(), datatype.getSimpleName());
|
throw new CommandInvalidTypeException(has() ? peek() : consumed(), datatype.getSimpleName());
|
||||||
} catch (NoSuchMethodException | IllegalAccessException | InstantiationException | InvocationTargetException e) {
|
} catch (NoSuchMethodException | IllegalAccessException | InstantiationException e) {
|
||||||
throw new CommandUnhandledException(e);
|
throw new CommandUnhandledException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user